/* AX mobile — built on the AX design guide shared with the ERP:
   warm greige ground with soft glows, frosted-glass cards (24px), one near-black headline tile per screen,
   16px tiles, pill controls, Urbanist (500 body / 600 labels / 700 numbers), tabular figures. */
:root {
  --bg: #efefec;
  --glow-1: #fbfbf9;
  --glow-2: #f7f7f4;
  --glass: #fbfbf9e6;
  --glass-solid: #fcfcfb;
  --rim: #ffffffcc;
  --ink: #111111;
  --on-ink: #f7f7f5;
  --ink-muted: #bdbdb8;
  --text: #111111;
  --muted: #5c5c5a;
  --faint: #73736f;
  --line: #11111117;
  --well: #1111110f;
  --accent: #bcd4f2;
  --accent-soft: #e3edf9;
  --on-accent: #0f1f33;
  --good: #237a48;
  --good-soft: #e2f1e7;
  --bad: #bf3644;
  --bad-soft: #f8e3e5;
  --warn: #8a5a00;
  --warn-soft: #fbefd5;
  --shadow: 0 1px 0 #ffffffb3 inset, 0 24px 48px -30px #00000038;
  --shadow-pop: 0 24px 60px -18px #00000047, 0 2px 6px #00000012;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --r-card: 24px;
  --r-tile: 16px;
  --r-input: 12px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0d10; --glow-1: #17181d; --glow-2: #121317; --glass: #1b1c21c7; --glass-solid: #18191d; --rim: #ffffff14;
    --ink: #f2f2ef; --on-ink: #111111; --ink-muted: #5c5c5a; --text: #f2f2ef; --muted: #b0b0aa; --faint: #8a8a85;
    --line: #ffffff14; --well: #ffffff0d; --accent: #8fb4e3; --accent-soft: #1d2a3a; --on-accent: #e3edf9;
    --good: #6cc790; --good-soft: #17301f; --bad: #f08a92; --bad-soft: #3a1a1e; --warn: #e5b14d; --warn-soft: #33270f;
    --shadow: 0 24px 48px -30px #000000a0; --shadow-pop: 0 24px 60px -18px #000000b0; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0d10; --glow-1: #17181d; --glow-2: #121317; --glass: #1b1c21c7; --glass-solid: #18191d; --rim: #ffffff14;
  --ink: #f2f2ef; --on-ink: #111111; --ink-muted: #5c5c5a; --text: #f2f2ef; --muted: #b0b0aa; --faint: #8a8a85;
  --line: #ffffff14; --well: #ffffff0d; --accent: #8fb4e3; --accent-soft: #1d2a3a; --on-accent: #e3edf9;
  --good: #6cc790; --good-soft: #17301f; --bad: #f08a92; --bad-soft: #3a1a1e; --warn: #e5b14d; --warn-soft: #33270f;
  --shadow: 0 24px 48px -30px #000000a0; --shadow-pop: 0 24px 60px -18px #000000b0; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1400px 700px at 0% 0%, var(--glow-1) 0%, transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, var(--glow-2) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 500 15px/1.45 "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a { color: inherit; text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; } }

.app { min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  padding: calc(var(--safe-t) + 8px) 18px 10px;
  background: var(--bg);
  transition: box-shadow 0.2s var(--ease);
}
.top.scrolled { box-shadow: 0 10px 24px -18px #00000059; }
.island-bar { display: flex; justify-content: center; min-height: 30px; margin-bottom: 8px; }
.island {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 5px 14px; border-radius: 999px;
  background: #0d0e11; color: #f7f7f5; border: 1px solid #ffffff24; font-size: 12px; font-weight: 700; letter-spacing: -0.01em;
  box-shadow: 0 1px 0 #ffffff1f inset, 0 10px 24px -8px #00000073; transition: transform 0.16s var(--ease);
}
.island:active { transform: scale(0.97); }
.island-dot { width: 7px; height: 7px; border-radius: 50%; background: #5ad68a; box-shadow: 0 0 0 3px #5ad68a33; }
.island-dot.off { background: #8a8a85; box-shadow: none; }
.island-sep { opacity: 0.45; }
.island-val { font-variant-numeric: tabular-nums; }

.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.brand-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { height: 22px; width: auto; display: block; }
.logo.white { display: none; }
:root[data-theme="dark"] .logo.black { display: none; }
:root[data-theme="dark"] .logo.white { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo.black { display: none; }
  :root:not([data-theme="light"]) .logo.white { display: block; }
}
.top-title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.top-kicker { font-size: 13px; font-weight: 600; color: var(--faint); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--rim); background: var(--glass); box-shadow: var(--shadow);
  color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:active { transform: scale(0.96); }
.icon-btn.spin svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.filters { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }
.seg::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rim);
  background: var(--glass);
  color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

/* ---------- Content ---------- */
.view { flex: 1; padding: 6px 18px calc(var(--tab-h) + var(--safe-b) + 36px); outline: none; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .view { max-width: 720px; margin: 0 auto; width: 100%; } }

.card {
  background: var(--glass);
  border: 1px solid var(--rim); border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 18px 20px;
}

/* The one dark headline tile per screen */
.card.ink {
  background: var(--ink); color: var(--on-ink); border-color: #2a2a2a; box-shadow: var(--shadow-pop);
  padding: 22px 22px 20px;
}
.card.ink .card-title, .card.ink .sub, .card.ink .label, .card.ink .chart-axis { color: var(--ink-muted); }
.card.ink .card-link { color: var(--on-ink); background: #ffffff1f; }
.card.ink .split-bar { background: #ffffff1f; }
.card.ink .split-bar > span { background: var(--accent); }
.card.ink .chart rect { fill: #ffffff38; }
.card.ink .chart rect.hi { fill: var(--accent); }
:root[data-theme="dark"] .card.ink .card-link, :root[data-theme="dark"] .card.ink .split-bar { background: #0000001a; }
:root[data-theme="dark"] .card.ink .chart rect { fill: #00000026; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-title { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.card-link {
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--well); color: var(--text);
}
.hero-num { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.big-num { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.12; }
.label { font-size: 12.5px; font-weight: 600; color: var(--faint); }
.sub { font-size: 14px; color: var(--muted); }
.up { color: var(--good); } .down { color: var(--bad); }

/* Tiles inside cards */
.tile { background: var(--well); border-radius: var(--r-tile); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .big-num { font-size: 22px; }
.tile.accent { background: var(--accent-soft); color: var(--on-accent); }
.tile.accent .label { color: var(--on-accent); opacity: 0.75; }
.card.ink .tile { background: #ffffff14; }
:root[data-theme="dark"] .card.ink .tile { background: #0000000f; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.grid2 > .stat { background: var(--well); border-radius: var(--r-tile); padding: 12px 14px; min-width: 0; }
.grid2 > .stat .big-num { font-size: 22px; }
.card.ink .grid2 > .stat { background: #ffffff14; }
:root[data-theme="dark"] .card.ink .grid2 > .stat { background: #0000000f; }
.top-kicker .logo { height: 14px; display: inline-block; vertical-align: -1px; }
.top-kicker .logo.white { display: none; }

/* Store split */
.split { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.split-row { display: grid; grid-template-columns: 88px 1fr auto; align-items: center; gap: 10px; }
.split-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-bar { height: 8px; background: var(--well); border-radius: 99px; overflow: hidden; }
.split-bar > span { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.split-val { font-size: 14px; font-weight: 700; }

/* Lists */
.list { margin: 4px -20px -18px; }
.row, .row-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 20px; border-top: 1px solid var(--line); color: inherit;
}
.row-link:active { background: var(--well); }
.row-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.row-text { min-width: 0; }
.row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 12.5px; color: var(--faint); font-weight: 500; }
.row-val { text-align: right; flex: none; font-weight: 700; }
.row-val .row-sub { font-weight: 500; }
.avatar {
  width: 36px; height: 36px; border-radius: 12px; background: var(--well); display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--muted); flex: none;
}
.rank { width: 26px; height: 26px; border-radius: 9px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.chev { color: var(--faint); font-size: 20px; font-weight: 500; }

/* Chart */
.chart { width: 100%; height: 132px; display: block; margin-top: 14px; }
.chart rect { fill: var(--ink); stroke: none; opacity: 0.85; }
.chart rect.hi { fill: var(--accent); opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; color: var(--faint); margin-top: 6px; }

/* Notes, badges, states */
.note {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: var(--r-tile);
  background: var(--warn-soft); color: var(--text); font-size: 13.5px; border: 1px solid var(--rim);
}
.note svg { color: var(--warn); flex: none; width: 19px; height: 19px; margin-top: 1px; }
.note.info { background: var(--accent-soft); color: var(--on-accent); }
.note.info svg { color: var(--on-accent); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--well); color: var(--muted); }
.badge.ok { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

.skel { background: linear-gradient(90deg, var(--well), #11111108, var(--well)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel.h40 { height: 40px; width: 60%; } .skel.h14 { height: 14px; width: 40%; margin-top: 10px; } .skel.h80 { height: 84px; margin-top: 14px; }
.empty { text-align: center; padding: 26px 12px; color: var(--faint); font-size: 14px; font-weight: 600; }
.error-card { text-align: center; padding: 30px 20px; }
.error-card h2 { margin: 0 0 6px; font-size: 19px; font-weight: 700; }
.error-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px;
  border-radius: 999px; border: 0; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: var(--shadow-pop); transition: transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--glass); color: var(--text); border: 1px solid var(--rim); box-shadow: var(--shadow); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.78; }
.btn-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  display: inline-block; flex: none; animation: spin 0.75s linear infinite;
}

/* Search */
.search {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--rim); box-shadow: var(--shadow);
}
.search svg { color: var(--faint); width: 18px; height: 18px; }
.search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; font-weight: 500; min-width: 0; }

/* Sign in */
.login { min-height: 82dvh; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.login .card { padding: 24px 22px; display: flex; flex-direction: column; gap: 16px; }
.login-card.is-busy .field input, .login-card.is-busy .check { opacity: 0.6; pointer-events: none; }
.auth-checking {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r-input);
  background: var(--accent-soft); color: var(--on-accent); font-size: 13.5px; font-weight: 600;
}
.login-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 6px; }
.login-brand .logo { height: 34px; }
.login-title { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.field input {
  height: 50px; border-radius: var(--r-input); border: 1px solid var(--line); background: var(--glass-solid); padding: 0 14px; font-size: 16px;
}
.field input:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: transparent; }
.check {
  display: flex; align-items: flex-start; gap: 11px; padding: 4px 2px; cursor: pointer; user-select: none;
}
.check input[type="checkbox"] {
  width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--ink); cursor: pointer;
}
.check-text { display: flex; flex-direction: column; gap: 1px; font-size: 14px; font-weight: 600; color: var(--text); }
.check-sub { font-size: 12.5px; font-weight: 500; color: var(--faint); }
.form-error { color: var(--bad); font-size: 14px; font-weight: 600; min-height: 20px; }

/* ---------- Floating tab bar ---------- */
.tabs {
  position: fixed; left: 14px; right: 14px; bottom: calc(10px + var(--safe-b)); z-index: 6;
  display: flex; gap: 4px; height: var(--tab-h); padding: 7px;
  background: var(--glass); backdrop-filter: saturate(1.3) blur(22px); -webkit-backdrop-filter: saturate(1.3) blur(22px);
  border: 1px solid var(--rim); border-radius: 999px; box-shadow: var(--shadow-pop);
}
@media (min-width: 720px) { .tabs { left: 50%; right: auto; transform: translateX(-50%); width: 520px; } }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 999px; color: var(--faint); font-size: 11px; font-weight: 700; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.tab.active { background: var(--ink); color: var(--on-ink); }
.tab svg { width: 21px; height: 21px; }

.section-title { margin: 6px 4px 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.muted { color: var(--faint); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; }

/* Stock list views */
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.filter-row { display: flex; gap: 8px; }
.filter-row .search { flex: 1; }
.select {
  height: 48px; border-radius: 999px; border: 1px solid var(--rim); background: var(--glass); box-shadow: var(--shadow);
  padding: 0 14px; font-weight: 600; font-size: 14px; color: var(--text); max-width: 46%;
}
.see-all { display: block; text-align: center; padding: 14px 0 2px; font-size: 14px; font-weight: 700; color: var(--text); border-top: 1px solid var(--line); margin: 14px -20px -4px; }
.list + .see-all { margin-top: 18px; }
.metric { display: inline-block; min-width: 0; }
.list-count { font-size: 13px; font-weight: 600; color: var(--faint); margin: 2px 4px 0; }
#list-box > .list { margin-top: -18px; }
#list-box > .list > :first-child { border-top: 0; }

/* Barcode scanner trigger & modal */
.search-row { display: flex; align-items: center; gap: 8px; }
.search-row .search { flex: 1; min-width: 0; }
.scan-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rim);
  background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 700;
  cursor: pointer; box-shadow: var(--shadow); white-space: nowrap; transition: transform 0.15s var(--ease);
}
.scan-btn:active { transform: scale(0.96); }
.scan-btn svg { width: 18px; height: 18px; flex: none; }

.scan-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: #0b0c0fb8; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 12px 12px calc(12px + var(--safe-b));
}
@media (min-width: 720px) { .scan-backdrop { align-items: center; padding: 24px; } }
.scan-sheet {
  width: 100%; max-width: 520px; max-height: calc(100dvh - 24px); overflow-y: auto;
  background: var(--glass-solid); border: 1px solid var(--rim); border-radius: var(--r-card);
  box-shadow: var(--shadow-pop); padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.scan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scan-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.scan-head-actions { display: flex; align-items: center; gap: 8px; }
.scan-pill-btn {
  height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--well); color: var(--text); font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.scan-pill-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.scan-pill-btn svg { width: 16px; height: 16px; }

.scan-viewport {
  position: relative; flex: none; width: 100%; aspect-ratio: 16 / 9; min-height: 150px; border-radius: var(--r-tile);
  background: #0d0e11; overflow: hidden; display: grid; place-items: center;
}
.scan-viewport video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-reticle {
  position: relative; width: 72%; height: 54%; border-radius: 14px;
  border: 2px solid #ffffff55; box-shadow: 0 0 0 999px #00000048; pointer-events: none;
}
.scan-reticle::after {
  content: ""; position: absolute; left: 8%; right: 8%; top: 50%; height: 2px;
  background: var(--accent); box-shadow: 0 0 10px var(--accent); opacity: 0.9;
}
.scan-stage-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  align-items: center; padding: 12px; pointer-events: none;
}
.scan-status-pill {
  padding: 5px 12px; border-radius: 999px; background: #0d0e11cc; color: #f7f7f5;
  font-size: 12px; font-weight: 600; text-align: center; max-width: 100%;
}

.scan-lookup-form { display: flex; gap: 8px; align-items: center; width: 100%; min-width: 0; flex: none; }
.scan-lookup-form .search { flex: 1; min-width: 0; height: 46px; box-shadow: none; border-color: var(--line); padding: 0 12px; }
.scan-lookup-form .btn { height: 46px; padding: 0 16px; box-shadow: none; flex: none; white-space: nowrap; }

.scan-result-card {
  border-radius: var(--r-tile); background: var(--well); padding: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.scan-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.scan-stores { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.scan-store-tile {
  background: var(--glass-solid); border: 1px solid var(--line); border-radius: var(--r-input);
  padding: 9px 10px; display: flex; flex-direction: column; gap: 2px;
}
.scan-store-tile .label { font-size: 11.5px; }
.scan-store-qty { font-size: 18px; font-weight: 700; }

.scan-stock-form {
  display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--line); padding-top: 12px;
}
.scan-form-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 440px) { .scan-form-row { grid-template-columns: 1fr; } }
.scan-wh-select {
  height: 46px; border-radius: var(--r-input); border: 1px solid var(--line);
  background: var(--glass-solid); padding: 0 12px; font-size: 14px; font-weight: 600; width: 100%;
}
.scan-stepper {
  display: inline-flex; align-items: center; border-radius: var(--r-input); width: 100%;
  border: 1px solid var(--line); background: var(--glass-solid); overflow: hidden; height: 46px;
}
.scan-step-btn {
  width: 48px; height: 100%; border: 0; background: transparent; font-size: 20px; font-weight: 700;
  cursor: pointer; display: grid; place-items: center; flex: none;
}
.scan-step-btn:active { background: var(--well); }
.scan-qty-input {
  flex: 1; min-width: 64px; height: 100%; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  background: transparent; text-align: center; font-size: 17px; font-weight: 700; outline: none;
}
.scan-note-input {
  height: 44px; border-radius: var(--r-input); border: 1px solid var(--line);
  background: var(--glass-solid); padding: 0 12px; font-size: 14px; width: 100%;
}
.scan-feedback { font-size: 13.5px; font-weight: 600; min-height: 18px; }
.scan-feedback.ok { color: var(--good); }
.scan-feedback.err { color: var(--bad); }
.scan-match-list { display: flex; flex-direction: column; gap: 6px; }
.scan-match-btn {
  width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r-input);
  border: 1px solid var(--line); background: var(--glass-solid); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}

/* Online analytics & catalogue */
.fresh { font-size: 12px; font-weight: 600; color: var(--faint); padding-top: 6px; }
.online-subtabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px;
  border-radius: 999px; background: var(--well); border: 1px solid var(--rim);
}
.online-subtab {
  height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.online-subtab[aria-selected="true"] { background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow); }
.online-filter-bar { display: flex; gap: 8px; align-items: center; }
.online-filter-bar .search { flex: 1; min-width: 0; height: 46px; }
.online-filter-bar .select { height: 46px; max-width: 44%; flex: none; }
.mrp { font-size: 12px; font-weight: 500; color: var(--faint); text-decoration: line-through; margin-right: 4px; }
.cat-thumb {
  width: 40px; height: 40px; border-radius: 11px; background: #f5f5f3; border: 1px solid var(--line);
  object-fit: cover; flex: none; display: block;
}
.cat-hero-img {
  width: 56px; height: 56px; border-radius: 14px; background: #f5f5f3; border: 1px solid var(--line);
  object-fit: cover; flex: none; display: block;
}
.split-wide .split-row { grid-template-columns: 110px 1fr auto; }
.detail-row-head { display: flex; align-items: flex-start; gap: 12px; }
.detail-row-meta { min-width: 0; flex: 1; }
.detail-title { font-size: 19px; line-height: 1.2; word-break: break-word; }
.detail-kv { display: flex; flex-direction: column; gap: 8px; }
.detail-line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px;
}
.detail-line:first-child { border-top: 0; padding-top: 0; }
.detail-line .k { color: var(--faint); font-weight: 600; flex: none; }
.detail-line .v { text-align: right; font-weight: 600; min-width: 0; word-break: break-word; }
.variant-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-input); background: var(--glass-solid); border: 1px solid var(--line);
}
.variant-list { display: flex; flex-direction: column; gap: 7px; }
.card-action-btn {
  border: 0; background: var(--well); color: var(--text); font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.card.ink .card-action-btn { background: #ffffff1f; color: var(--on-ink); }
:root[data-theme="dark"] .card.ink .card-action-btn { background: #0000001a; }
button.row-link {
  width: 100%; border-left: 0; border-right: 0; border-bottom: 0;
  background: transparent; text-align: left; cursor: pointer; font: inherit;
}


