@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/plus-jakarta-sans-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --floor: #f8f9fa;
  --well: #f1f5f9;
  --well-line: #e2e8f0;
  --panel: #ffffff;
  --line: #cbd5e1;
  --ink: #0f172a;
  --muted: #475569;
  --chrome: #0f172a;
  --chrome-2: #1e293b;
  --chrome-ink: #f8fafc;
  --chrome-muted: #cbd5e1;
  --brand: #047857;
  --brand-hover: #065f46;
  --brand-ink: #ffffff;
  --brand-soft: #d1fae5;
  --brand-text: #065f46;
  --ring: #059669;
  --info: #0369a1;
  --info-soft: #e0f2fe;
  --info-line: #7dd3fc;
  --accent: #b45309;
  --accent-text: #92400e;
  --accent-soft: #fef3c7;
  --accent-line: #d97706;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  --good: #047857;
  --good-soft: #d1fae5;
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 8px;
  --tap: 48px;
  --nav-h: 64px;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--floor);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--floor); -webkit-tap-highlight-color: transparent; font-size: 15px; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
h1 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; margin: 0 0 .75rem; }
h2 { font-size: 1.1rem; letter-spacing: -.01em; font-weight: 650; margin: 1.2rem 0 .5rem; }
.mono, .num { font-family: var(--mono); }
.caps { font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--bad); min-height: 1.2em; font-weight: 600; }
.warn-text { color: var(--accent-text); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: .6rem .8rem; border-radius: var(--r); }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 1rem; }
.row.between { justify-content: space-between; }
.center { display: grid; place-items: center; text-align: center; padding: 2rem 1rem; }
.scroll-x { overflow-x: auto; }
.ico { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--tap); padding: 0 1.1rem; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--panel); font-weight: 650; }
.btn:hover { border-color: var(--muted); }
.btn:active { background: var(--well); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.block { width: 100%; }
.btn.xl { min-height: 60px; font-size: 1.1rem; }
.btn.small { min-height: 36px; padding: 0 .7rem; }
.btn.icon { width: 52px; min-height: 52px; padding: 0; background: var(--well); }
.btn:disabled { opacity: .45; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .9rem; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--panel); font-weight: 650; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.chip.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.badge { display: inline-block; font-family: var(--mono); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .45rem; border-radius: var(--r-sm); background: var(--well); border: 1px solid var(--well-line); color: var(--muted); margin-left: .4rem; vertical-align: middle; }
.badge.ws { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }

input, select, textarea { min-height: 44px; border: 1.5px solid var(--line); border-radius: var(--r); padding: .4rem .6rem; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 2px var(--ring); }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; accent-color: var(--brand); }
input[type=date] { width: auto; }
input.bad { border-color: var(--bad); background: var(--bad-soft); }
.field { display: grid; gap: .3rem; margin: .5rem 0; }
.field > span { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.check { display: flex; gap: .6rem; align-items: center; min-height: 44px; }

.topbar { position: sticky; top: 0; z-index: 20; background: var(--chrome); color: var(--chrome-ink); border-bottom: 1px solid #000; }
.bar { display: flex; align-items: center; gap: .5rem; padding: .45rem .75rem; min-height: 52px; }
.till-tag { font-family: var(--mono); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .5rem; border: 1px solid #475569; border-radius: var(--r-sm); background: var(--chrome-2); color: var(--chrome-ink); white-space: nowrap; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; }
.user-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; border: 0; background: transparent; color: var(--chrome-ink); padding: 0 .25rem; font-weight: 650; min-width: 0; }
.user-btn .avatar-sm { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 800; flex: none; }
@media (max-width: 420px) { .user-btn .uname { display: none; } }
.user-btn .uname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 10ch; }
.spacer { flex: 1; }
.status-pill { display: inline-flex; align-items: center; gap: .4rem; min-height: 32px; border-radius: 999px; padding: 0 .75rem; border: 1.5px solid transparent; font-family: var(--mono); font-weight: 700; font-size: .75rem; white-space: nowrap; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.status-pill.on { background: var(--brand-soft); color: var(--brand-text); border-color: #34d399; }
.status-pill.off { background: var(--accent-soft); color: #78350f; border-color: var(--accent-line); }
.lang-btn { min-height: 36px; min-width: 40px; border-radius: var(--r); border: 1px solid #475569; background: var(--chrome-2); color: var(--chrome-ink); padding: 0 .55rem; font-family: var(--mono); font-weight: 700; font-size: .8rem; }
.login .lang-btn { color: var(--ink); border-color: var(--line); background: var(--panel); min-height: 44px; font-family: var(--sans); font-size: .95rem; }
.brand-row { display: flex; align-items: center; gap: .6rem; padding: 0 .75rem .55rem; }
.brand-row .ico { color: #6ee7b7; width: 26px; height: 26px; }
.brand { display: grid; line-height: 1.15; min-width: 0; }
.brand strong { font-size: 1.2rem; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .sub { font-family: var(--mono); font-size: .75rem; color: var(--chrome-muted); letter-spacing: .03em; }

.nav { display: flex; gap: .25rem; }
.nav-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .8rem; border: 0; border-radius: var(--r); background: transparent; color: var(--chrome-muted); font-weight: 650; white-space: nowrap; }
.nav-btn.active { background: var(--brand); color: #fff; }
.nav-btn .ico { width: 20px; height: 20px; }
.nav-more { display: none; }
.nav.bottom { display: none; }
.wide-nav { padding: 0 .75rem .5rem; overflow-x: auto; scrollbar-width: none; }
.till-tag .tag-short { display: none; }
.sheet-nav { display: grid; gap: .4rem; }
.sheet-nav .nav-btn { color: var(--ink); background: var(--well); border: 1.5px solid var(--well-line); min-height: 56px; justify-content: flex-start; font-size: 1.05rem; }
.sheet-nav .nav-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.main { padding: .75rem; max-width: 1400px; margin: 0 auto; }
.panel { background: var(--panel); border-radius: var(--r-lg); padding: 1rem; border: 1px solid var(--line); }
.panel.narrow { max-width: 520px; margin: 0 auto; }
.panel.wide { max-width: 1200px; margin: 0 auto; }

.login { max-width: 760px; margin: 0 auto; padding: 0 0 2rem; min-height: 100vh; }
.login-band { background: var(--chrome); color: var(--chrome-ink); padding: 1.25rem 1rem 1.5rem; }
.login-band .mark { display: flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--chrome-muted); margin-bottom: .6rem; }
.login-band .mark .ico { color: #6ee7b7; }
.login-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.login-head h1 { margin: 0; }
.login-band .lang-btn { color: var(--chrome-ink); border-color: #475569; background: var(--chrome-2); }
.login .user-grid { padding: 0 1rem; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-top: 1rem; width: 100%; max-width: 760px; }
.user-card { display: grid; gap: .3rem; justify-items: center; padding: 1.1rem .5rem; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--panel); }
.user-card:hover { border-color: var(--brand); }
.user-card .avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); font-size: 1.5rem; font-weight: 800; }
.user-card .name { font-weight: 700; font-size: 1.1rem; }
.user-card .muted { font-family: var(--mono); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }
.pin-input { font-family: var(--mono); font-size: 2rem; text-align: center; letter-spacing: .5em; }

.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .6rem 0; }
.numpad .key { min-height: 56px; font-family: var(--mono); font-size: 1.4rem; font-weight: 700; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--well); }
.numpad .key:active { background: var(--well-line); }
.numpad .key.fn { color: var(--muted); font-size: 1.1rem; background: #e2e8f0; }
.numpad .key.enter { grid-column: span 3; background: var(--brand); color: #fff; border-color: var(--brand); }
.big-input { font-family: var(--mono); font-size: 2rem; font-weight: 700; text-align: right; min-height: 64px; letter-spacing: -.02em; }

.sell { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr); gap: .75rem; align-items: start; }
.pick { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .75rem; }
.cart-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); position: sticky; top: 120px; overflow: clip; }
.search-row { display: flex; gap: .5rem; }
.search-box { position: relative; flex: 1; min-width: 0; }
.search-box .ico { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search { font-size: 1.05rem; min-height: 52px; }
.search-box .search { padding-left: 2.6rem; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin-top: .6rem; }
.results.small { grid-template-columns: 1fr; }
.result { display: grid; gap: .2rem; text-align: left; padding: .7rem; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--panel); min-height: 72px; align-content: start; }
.result:active { background: var(--well); }
.result .r-name { font-weight: 650; }
.result .r-meta { font-family: var(--mono); color: var(--brand-text); font-weight: 700; }
.result .r-stock { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.result .r-stock.low { color: var(--accent-text); font-weight: 700; }
.result.quick { border-color: var(--info-line); }
.cart-top { display: flex; align-items: center; gap: .5rem; padding: .8rem .9rem .4rem; }
.cart-top h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
.cart-top .count { font-family: var(--mono); font-size: .75rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px; background: #e0e7ff; color: #3730a3; }
.cart-top .clear { margin-left: auto; }
.cart-head { display: flex; gap: .4rem; flex-wrap: wrap; padding: 0 .9rem .6rem; }
.cart-head .cust { flex: 1 1 100%; justify-content: flex-start; min-height: 48px; text-align: left; }
.cart-head .cust.ws { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.cart-head .cust .cust-tier { font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cart-head .cust .ico.edit { margin-left: auto; width: 18px; height: 18px; }
.lines { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--well-line); }
.line { display: grid; grid-template-columns: 1fr auto auto auto; gap: .5rem; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--well-line); min-height: 64px; }
.return .line { padding-left: 0; padding-right: 0; }
.l-main { display: grid; min-width: 0; gap: .1rem; }
.l-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.l-attrs { font-family: var(--mono); font-size: .78rem; color: var(--muted); letter-spacing: .02em; }
.l-unit { font-family: var(--mono); font-size: .8rem; }
.l-disc { grid-column: 1 / -1; font-family: var(--mono); font-size: .75rem; color: var(--brand-text); }
.l-qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--well); }
.qbtn, .xbtn { width: 42px; height: 44px; border: 0; background: transparent; font-size: 1.25rem; font-weight: 600; color: var(--muted); }
.qbtn:active { background: var(--well-line); }
.xbtn { color: var(--muted); }
.qv { min-width: 2.2ch; text-align: center; font-family: var(--mono); font-weight: 700; font-size: 1.05rem; }
.l-total { font-family: var(--mono); font-weight: 700; font-size: 1.1rem; min-width: 6ch; text-align: right; letter-spacing: -.02em; }
.empty { padding: 2rem 1rem; text-align: center; display: grid; justify-items: center; gap: .5rem; border-top: 1px solid var(--well-line); }
.empty .ico { width: 40px; height: 40px; color: var(--line); }
.totals { margin: .8rem .9rem; display: grid; gap: .3rem; padding: .8rem .9rem; background: var(--well); border: 1px solid var(--well-line); border-radius: var(--r-lg); font-variant-numeric: tabular-nums; }
.return .totals { margin-left: 0; margin-right: 0; }
.trow { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); }
.trow > span:last-child { font-family: var(--mono); color: var(--ink); }
.trow.disc, .trow.disc > span:last-child { color: var(--brand-text); }
.trow.small > span:last-child { color: var(--muted); }
.grand { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border-top: 1.5px dashed var(--line); padding-top: .55rem; margin-top: .3rem; }
.grand > span { font-weight: 700; font-size: 1.15rem; }
.grand strong { font-family: var(--mono); font-size: 2.2rem; letter-spacing: -.04em; line-height: 1.05; }
.pay-bar { padding: 0 .9rem .9rem; }
.btn.pay { justify-content: space-between; min-height: 64px; padding: 0 1.1rem; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.btn.pay .ico { width: 28px; height: 28px; }
.btn.pay .pay-label { flex: 1; text-align: left; }

.vgrid { border-collapse: separate; border-spacing: .35rem; }
.vgrid th { font-family: var(--mono); font-size: .8rem; color: var(--muted); padding: 0 .3rem; }
.vcell { display: grid; gap: .1rem; min-width: 96px; min-height: 64px; padding: .4rem; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--panel); text-align: center; }
.vcell.low { border-color: var(--accent-line); background: var(--accent-soft); }
.vcell.out { opacity: .55; }
.vcell.none { display: grid; place-items: center; color: var(--muted); border-style: dashed; background: var(--well); }
.vprice { font-family: var(--mono); font-weight: 700; }
.vstock { font-family: var(--mono); font-size: .72rem; color: var(--muted); }

.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal { background: var(--panel); border-radius: var(--r-lg); border: 2px solid var(--ink); padding: 1.1rem; width: min(440px, 100%); max-height: calc(100vh - 2rem); overflow: auto; }
.modal.wide { width: min(980px, 100%); }
.modal.full { width: min(1100px, 100%); }
.modal h2 { margin-top: 0; }
.confirm-text { font-size: 1.1rem; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; margin: .4rem 0; }
.seg button { min-height: 44px; padding: 0 1rem; border: 0; background: #fff; font-weight: 700; }
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button.on { background: var(--brand); color: #fff; }
.cust-list { display: grid; gap: .35rem; margin: .6rem 0; max-height: 50vh; overflow: auto; }
.cust-list .cust { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 52px; padding: .4rem .75rem; text-align: left; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--panel); font-weight: 600; }

.pay-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: .6rem; border-bottom: 1.5px dashed var(--line); margin-bottom: .6rem; }
.pay-head .muted { font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pay-total { font-family: var(--mono); font-size: 2.6rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.pay-total.small { font-size: 1.6rem; }
.pay-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tender-input { font-family: var(--mono); font-size: 2.4rem; font-weight: 700; text-align: right; min-height: 72px; letter-spacing: -.03em; }
.quick-cash { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .5rem 0; }
.quick-cash .btn { font-family: var(--mono); padding: 0 .4rem; min-height: 52px; }
.change { display: grid; gap: .2rem; padding: .8rem 1rem; border-radius: var(--r-lg); background: var(--well); border: 1.5px solid var(--well-line); margin-top: .5rem; }
.change span { font-family: var(--mono); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; }
.change strong { font-family: var(--mono); font-size: 3.2rem; line-height: 1.05; letter-spacing: -.04em; }
.change.ok { background: var(--good-soft); border-color: #34d399; }
.change.ok span { color: var(--brand-text); }
.change.ok strong { color: var(--brand-text); }
.change.short { background: var(--accent-soft); border-color: var(--accent-line); }
.change.short span, .change.short strong { color: var(--accent-text); }
.change.huge strong { font-size: 4.2rem; }
.pay-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.done { text-align: center; }
.preview { margin-top: .6rem; }
.preview .receipt { border: 1px dashed var(--line); margin-top: .5rem; }

.kv { width: 100%; border-collapse: collapse; }
.kv th { text-align: left; font-weight: 500; padding: .4rem 0; color: var(--muted); }
.kv td { text-align: right; padding: .4rem 0; font-family: var(--mono); }
.kv tr { border-bottom: 1px solid var(--well-line); }
.kv tr.strong th, .kv tr.strong td { font-weight: 800; color: var(--ink); }
.kv tr.muted td { color: var(--muted); }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { padding: .45rem .5rem; border-bottom: 1px solid var(--well-line); text-align: left; white-space: nowrap; }
.grid th { font-family: var(--mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.grid .num { text-align: right; }
.grid .neg, .neg { color: var(--bad); font-weight: 700; }
.grid .pos { color: var(--accent-text); font-weight: 700; }
.grid tfoot th { color: var(--ink); }
.grid.edit td { padding: .2rem; }
.cell-input { min-width: 80px; min-height: 40px; }
.cell-input.sku, .cell-input.barcode { min-width: 130px; font-family: var(--mono); }

.diff { display: flex; justify-content: space-between; align-items: baseline; padding: .7rem 1rem; border-radius: var(--r-lg); border: 1.5px solid transparent; margin: .6rem 0; font-weight: 700; }
.diff strong { font-family: var(--mono); font-size: 1.8rem; letter-spacing: -.03em; }
.diff.big strong { font-size: 3rem; }
.diff.even { background: var(--good-soft); color: var(--brand-text); border-color: #34d399; }
.diff.short { background: var(--bad-soft); color: var(--bad); border-color: #fca5a5; }
.diff.over { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.denom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .4rem; margin: .5rem 0; }
.denom { display: grid; grid-template-columns: 1fr 80px; align-items: center; gap: .4rem; font-family: var(--mono); font-weight: 700; }
.qty-input { min-height: 40px; text-align: right; font-family: var(--mono); }
.denoms summary, details summary { cursor: pointer; font-weight: 700; min-height: 40px; padding: .4rem 0; }

.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.checks { border-radius: var(--r-lg); border: 1.5px solid transparent; padding: .7rem 1rem; margin-top: 1.2rem; }
.checks.ok { background: var(--good-soft); color: var(--brand-text); border-color: #34d399; }
.checks.bad { background: var(--bad-soft); color: var(--bad); border-color: #fca5a5; }
.checks ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .9rem; }

.stock-list { display: grid; gap: .5rem; margin-top: .6rem; }
.stock-item { text-align: left; padding: .75rem; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--panel); }
.stock-item:active { background: var(--well); }
.stock-item.inactive { opacity: .6; }
.si-head { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.si-vars { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.si-var { font-family: var(--mono); font-size: .78rem; padding: .15rem .45rem; border-radius: var(--r-sm); background: var(--well); border: 1px solid var(--well-line); }
.si-var.low { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; align-items: end; }
.sample { font-family: var(--mono); font-size: .75rem; background: var(--well); border: 1px solid var(--well-line); padding: .5rem; border-radius: var(--r); white-space: pre-wrap; word-break: break-all; }
.po { border: 1.5px solid var(--line); border-radius: var(--r); padding: .75rem; margin-bottom: .5rem; }
.po-list { display: grid; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin-top: 1rem; }
.card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem; background: var(--panel); }
.card h2 { margin-top: 0; }
.settings .grid td { white-space: normal; }

.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 1rem); opacity: 0; transition: .2s; background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: var(--r); z-index: 100; font-weight: 650; max-width: calc(100vw - 2rem); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { background: var(--accent-text); }
.toast.ok { background: var(--brand); }
.print-frame { position: fixed; width: 0; height: 0; border: 0; right: 0; bottom: 0; }
.cam { width: 100%; border-radius: var(--r); background: #000; }

@media (min-width: 861px) {
  .brand-row { display: none; }
  .bar .brand { display: grid; }
  .bar .brand strong { font-size: 1rem; max-width: 18ch; }
}
@media (max-width: 860px) {
  .bar .brand { display: none; }
  .till-tag .tag-long { display: none; }
  .till-tag .tag-short { display: inline; }
  .wide-nav { display: none; }
  .nav.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 6px .5rem calc(6px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1.5px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .25rem; }
  .nav.bottom .nav-btn { flex-direction: column; justify-content: center; gap: 2px; min-height: 0; height: 100%; padding: 0 .2rem; color: var(--muted); font-family: var(--mono); font-size: .68rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; overflow: hidden; }
  .nav.bottom .nav-btn span { max-width: 100%; white-space: normal; text-align: center; line-height: 1.1; }
  .nav.bottom .nav-btn.active { background: var(--brand); color: #fff; }
  .nav.bottom .nav-btn.overflow { display: none; }
  .nav.bottom .nav-more { display: inline-flex; }
  body.has-nav .main { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + .75rem); }
  html.kb-open .nav.bottom { display: none; }
  html.kb-open body.has-nav .main { padding-bottom: .75rem; }
  .sell { grid-template-columns: 1fr; gap: .6rem; }
  .pick { display: contents; }
  .search-row { order: 0; }
  .results { order: 1; margin-top: 0; }
  .results.quickmode { display: flex; overflow-x: auto; scrollbar-width: none; gap: .45rem; margin: 0 -.75rem; padding: 0 .75rem; }
  .results.quickmode .result { flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: 0 .85rem; border-radius: var(--r); white-space: nowrap; }
  .results.quickmode .result .r-meta { order: -1; font-size: .9rem; }
  .cart-col { position: static; order: 2; }
  .pay-bar { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); background: var(--panel); padding-top: .6rem; border-top: 1px solid var(--well-line); z-index: 5; }
  html.kb-open .pay-bar { bottom: 0; }
  .pay-body { grid-template-columns: 1fr; }
  .pay-right { order: -1; display: none; }
  .report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .main { padding: .5rem; }
  .results:not(.quickmode) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results.quickmode { margin: 0 -.5rem; padding: 0 .5rem; }
  .line { grid-template-columns: 1fr auto auto; padding: .6rem .75rem; }
  .line .xbtn { display: none; }
  .cart-top, .cart-head { padding-left: .75rem; padding-right: .75rem; }
  .totals { margin: .6rem .75rem; }
  .pay-bar { padding-left: .75rem; padding-right: .75rem; }
  .grand strong { font-size: 2rem; }
  .pay-total { font-size: 2.1rem; }
  .change strong { font-size: 2.8rem; }
  .change.huge strong { font-size: 3.4rem; }
  .tender-input { font-size: 2rem; }
  .pay-actions .btn { flex: 1 1 45%; }
  .modal { padding: .9rem; }
  .modal-back { padding: .5rem; }
  .vcell { min-width: 76px; }
}
