/* Themes. The default is Daylight — a counter is usually a bright place, and staff
   read a light screen faster there. Every other palette redefines the same tokens, so
   nothing below this block ever needs to know which one is on. */

:root {
  --bg: #e9edf3;
  --bg-2: #f2f5f9;
  --panel: #ffffff;
  --panel-2: #f4f6fa;
  --line: #c3ccdb;
  --line-soft: #dde3ec;
  --ink: #16202f;
  --ink-2: #4d5c73;
  --ink-3: #78869d;
  --acc: #3d5ce0;
  --acc-ink: #ffffff;
  --acc-soft: rgba(61, 92, 224, 0.12);
  --ok: #12a06a;
  --warn: #b6790c;
  --danger: #d24545;
  --shadow: 0 14px 32px rgba(20, 32, 56, 0.14);
  /* A terminal has no floating cards. Depth is a hairline and a value step, never a
     drop shadow — the only shadow in the app is under a modal, which really is above. */
  --e1: none;
  --e2: none;
  --e3: 0 24px 48px -20px rgba(16, 24, 40, 0.34);
  --scrim: rgba(12, 18, 32, 0.55);
  --radius: 6px;
  --radius-sm: 4px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Paper — warm light, easier on the eyes through a long evening shift. */
:root[data-theme="paper"] {
  --bg: #f4efe4;
  --bg-2: #ede6d8;
  --panel: #fffdf8;
  --panel-2: #f8f3e8;
  --line: #ddd3c0;
  --line-soft: #e9e2d3;
  --ink: #2b2519;
  --ink-2: #5f5747;
  --ink-3: #8a806d;
  --acc: #a3572a;
  --acc-ink: #fffdf8;
  --acc-soft: rgba(163, 87, 42, 0.14);
  --ok: #3f7a4a;
  --warn: #9a6b12;
  --danger: #b1442f;
  --shadow: 0 14px 32px rgba(70, 52, 24, 0.16);
}

/* Counter — the dark slate this app shipped with. */
:root[data-theme="counter"], :root[data-theme="dark"] {
  --bg: #0a0d12;
  --bg-2: #10151c;
  --panel: #151b24;
  --panel-2: #1b232e;
  --line: #2a3442;
  --line-soft: #212a36;
  --ink: #e8eef7;
  --ink-2: #9fb0c9;
  --ink-3: #6b7c96;
  --acc: #6c8cff;
  --acc-ink: #ffffff;
  --acc-soft: rgba(108, 140, 255, 0.16);
  --ok: #34d399;
  --warn: #f6b545;
  --danger: #f26d6d;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --e1: none;
  --e2: none;
  --e3: 0 28px 56px -22px rgba(0, 0, 0, 0.75);
  --scrim: rgba(2, 5, 12, 0.72);
}

/* Midnight — near black, for a screen that faces the forecourt at 3am. */
:root[data-theme="midnight"] {
  --bg: #05070c;
  --bg-2: #090d15;
  --panel: #0f141f;
  --panel-2: #141b28;
  --line: #1f2836;
  --line-soft: #171e2a;
  --ink: #e6ecf5;
  --ink-2: #93a2b8;
  --ink-3: #5e6c82;
  --acc: #38bdf8;
  --acc-ink: #04202e;
  --acc-soft: rgba(56, 189, 248, 0.16);
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  --e1: none;
  --e2: none;
  --e3: 0 28px 56px -22px rgba(0, 0, 0, 0.85);
  --scrim: rgba(0, 0, 0, 0.78);
}

/* Lapis & Gold — the lion's own colours. */
:root[data-theme="lapis"] {
  --bg: #0a1230;
  --bg-2: #0f1a41;
  --panel: #14204c;
  --panel-2: #1a2859;
  --line: #27366f;
  --line-soft: #1e2c60;
  --ink: #f4f7ff;
  --ink-2: #b3c0e0;
  --ink-3: #7e8cb6;
  --acc: #e5b954;
  --acc-ink: #21170a;
  --acc-soft: rgba(229, 185, 84, 0.16);
  --ok: #3ddc9a;
  --warn: #f0a500;
  --danger: #ff7a7a;
  --shadow: 0 18px 40px rgba(2, 8, 26, 0.6);
  --e1: none;
  --e2: none;
  --e3: 0 28px 56px -22px rgba(2, 8, 26, 0.85);
  --scrim: rgba(4, 10, 32, 0.74);
}

/* High contrast — black on white, heavier rules, no soft greys. */
:root[data-theme="contrast"] {
  --bg: #ffffff;
  --bg-2: #f0f0f0;
  --panel: #ffffff;
  --panel-2: #f4f4f4;
  --line: #55585d;
  --line-soft: #9aa0a6;
  --ink: #000000;
  --ink-2: #1c1f24;
  --ink-3: #3d434b;
  --acc: #0b3fbf;
  --acc-ink: #ffffff;
  --acc-soft: rgba(11, 63, 191, 0.16);
  --ok: #0a6b3d;
  --warn: #7a4c00;
  --danger: #a3001b;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-variant-numeric: tabular-nums;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body.is-modal { overflow: hidden; }

h1, h2, h3, p, ol, ul { margin: 0; }
button { font: inherit; color: inherit; }

/* ---------- shell ---------- */

.shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.nav {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  overflow-y: auto;
}

.nav__brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.nav__mark { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 4px; overflow: hidden; display: block; }
.nav__mark svg { width: 100%; height: 100%; display: block; }
.nav__brandText { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nav__brandText strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__brandText span { font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }

.nav__list { display: flex; flex-direction: column; gap: 2px; }
.nav__btn {
  display: flex; align-items: center; gap: 10px;
  position: relative; padding: 10px 12px; border: 0; border-radius: 0;
  background: transparent; color: var(--ink-2);
  cursor: pointer; text-align: left; width: 100%;
}
.nav__btn:hover { background: var(--panel); color: var(--ink); }
.nav__btn.is-active { background: var(--panel); color: var(--ink); }
.nav__btn.is-active::before {
  content: ""; position: absolute; left: -14px; top: 0; bottom: 0; width: 3px; background: var(--acc);
}
.nav__icon { width: 19px; height: 19px; display: block; flex: none; color: currentColor; }
.ic { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav__label { flex: 1; font-size: 14px; }
.nav__badge {
  min-width: 20px; padding: 1px 5px; border-radius: 3px; font-family: var(--mono);
  background: var(--acc); color: var(--acc-ink);
  font-size: 12px; font-weight: 600; text-align: center;
}
.nav__badge--live { background: var(--ok); color: #06281c; }
.nav__foot { margin-top: auto; padding: 0 8px; }
.nav__hint { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-3); flex-wrap: wrap; }
.nav__hint kbd {
  font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2);
}

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 18px; height: 58px; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.top__ctx { display: flex; align-items: center; gap: 12px; }
.top__store { display: flex; flex-direction: column; line-height: 1.15; }
.top__store b { font-size: 13px; font-weight: 650; letter-spacing: -0.01em; }
.top__store span { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.top__sep { width: 1px; height: 26px; background: var(--line); }
.top__who {
  display: flex; align-items: center; gap: 9px;
  padding: 3px 9px 3px 3px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--panel); color: var(--ink); cursor: pointer;
}
.top__who:hover { border-color: var(--ink-3); }
.avatar {
  width: 30px; height: 30px; border-radius: 3px; display: grid; place-items: center;
  background: var(--acc-soft); color: var(--acc); font-size: 12px; font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent);
}
.top__whoName { display: flex; flex-direction: column; line-height: 1.15; }
.top__whoName b { font-size: 13px; font-weight: 600; }
.top__whoName span { font-size: 10.5px; color: var(--ink-3); text-transform: capitalize; }
.top__left, .top__right { display: flex; align-items: center; gap: 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px; border-radius: 3px; border: 1px solid var(--line);
  background: var(--panel); font-size: 11.5px; color: var(--ink-2);
  font-family: var(--mono); letter-spacing: -0.01em;
}
.pill .ic { width: 14px; height: 14px; }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
button.pill { cursor: pointer; }
.pill--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pill--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pill--ghost { background: transparent; }

.view { flex: 1; min-height: 0; overflow: hidden; display: flex; }

/* ---------- generic page ---------- */

.page { flex: 1; min-height: 0; min-width: 0; overflow-y: auto; padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 16px; }
.page > * { flex-shrink: 0; }
.page__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page__title { font-size: 24px; letter-spacing: -0.02em; }
.page__sub { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.page__acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page__bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page__bar .input--search { max-width: 280px; margin-left: auto; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel--pad { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.panel__title { font-size: 14px; letter-spacing: 0.02em; }
.panel__sub { font-size: 12.5px; color: var(--ink-2); }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }

.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--acc);
  background: var(--panel); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13.5px; color: var(--ink-2);
}
.notice--warn { border-left-color: var(--warn); }

.empty { padding: 28px 16px; text-align: center; color: var(--ink-3); }
.empty__title { font-size: 14px; color: var(--ink-2); }
.empty__hint { font-size: 12.5px; margin-top: 4px; }

/* ---------- controls ---------- */

.btn {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  padding: 8px 13px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; font-weight: 550;
}
.btn:hover { border-color: var(--acc); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; border-color: var(--line); }
.btn--primary { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 55%, transparent); color: var(--danger); }
.btn--ghost { background: transparent; }
.btn--block { width: 100%; padding: 16px; font-size: 16px; border-radius: 0; letter-spacing: -0.01em; }

.input {
  width: 100%; padding: 8px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  font-size: 14px;
}
.input:focus { outline: 2px solid var(--acc-soft); border-color: var(--acc); }
.input--search { background: var(--panel); }
select.input { cursor: pointer; }

.check { width: 18px; height: 18px; accent-color: var(--acc); }

.field { display: flex; flex-direction: column; gap: 5px; }
.field__label { font-size: 12px; color: var(--ink-2); }
.field--inline { flex-direction: row; align-items: center; gap: 8px; font-size: 13.5px; }

.form { display: flex; flex-direction: column; gap: 12px; }
.form--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .form--grid { grid-template-columns: 1fr; } }
.form__error { color: var(--danger); font-size: 12.5px; }

.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.seg__btn { border: 0; background: transparent; color: var(--ink-2); padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.seg__btn.is-active { background: var(--acc); color: var(--acc-ink); }

.chip {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  border-radius: 999px; padding: 7px 13px; cursor: pointer; font-size: 13px;
}
.chip:hover { border-color: var(--acc); }

.link { border: 0; background: transparent; color: var(--acc); cursor: pointer; font-size: 13px; padding: 2px 4px; }
.link:hover { text-decoration: underline; }
.link--danger { color: var(--danger); }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-2);
}
.badge--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.badge--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }

/* ---------- till ---------- */

.till { flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-columns: 1fr 380px; }

.catalog { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 0; gap: 0; }
.catalog__bar { display: flex; gap: 0; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.searchWrap { position: relative; flex: 1; min-width: 0; }
.searchWrap__icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.searchWrap .input { padding-left: 38px; height: 46px; border: 0; border-radius: 0; background: transparent; font-size: 14px; }
.btn--icon { display: inline-flex; align-items: center; gap: 8px; height: 46px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; padding: 0 18px; }
.btn--icon .ic { width: 17px; height: 17px; }
.cats { display: flex; gap: 0; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.cats__btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink-2);
  border-radius: 0; padding: 9px 13px; cursor: pointer; font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: background 0.1s linear, color 0.1s linear;
}
.cats__btn:hover { color: var(--ink); background: var(--panel-2); }
.cats__dot { width: 6px; height: 6px; border-radius: 1px; background: var(--cat, var(--ink-3)); }
.cats__btn.is-active { background: var(--ink); color: var(--panel); }
.cats__btn.is-active .cats__dot { background: var(--panel); }

.grid {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 1px; align-content: start; background: var(--line);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}

/* Product tiles are typographic, not pictorial. A colour rail carries the category so
   a hand finds beer before an eye reads the label; the height is stated because a grid
   track will not grow for a flex container's wrapped text. */
.tile {
  position: relative; height: 106px; padding: 9px 11px 10px 14px;
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  border: 0; border-radius: 0; background: var(--panel);
  cursor: pointer; text-align: left; overflow: hidden;
  transition: background 0.1s linear;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cat); }
.tile > * { flex-shrink: 0; }
.tile:hover { background: var(--panel-2); }
.tile:active { background: color-mix(in srgb, var(--cat) 14%, var(--panel-2)); }
.tile:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.tile.is-out { opacity: 0.44; }
.tile__cat { font-size: 9.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--cat); }
.tile__name {
  font-size: 13.5px; line-height: 1.28; font-weight: 550; letter-spacing: -0.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile__foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; }
.tile__price { font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.tile__stock { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.tile__stock.is-low { color: var(--warn); }
.tile__stock.is-out { color: var(--danger); }
.tile__age {
  position: absolute; top: 9px; right: 9px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em; padding: 1px 5px; border-radius: 2px;
  color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent);
}

.ticket {
  border-left: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; min-height: 0; padding: 0; gap: 0;
}
/* A hairline gradient at each end of the scroller, so a long ticket reads as scrollable. */
.ticket__scroll { position: relative; flex: 1; min-height: 0; display: flex; }
.ticket__scroll::before, .ticket__scroll::after {
  content: ""; position: absolute; left: 0; right: 0; height: 18px; pointer-events: none; z-index: 1;
}
.ticket__scroll::before { top: 0; background: linear-gradient(var(--bg-2), transparent); }
.ticket__scroll::after { bottom: 0; background: linear-gradient(transparent, var(--bg-2)); }
.ticket__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.ticket__title { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; }
.ticket__meta { font-size: 12px; color: var(--ink-3); }
.ticket__cust {
  border: 1px dashed var(--line); background: transparent; color: var(--ink-2);
  border-radius: 999px; padding: 5px 11px; cursor: pointer; font-size: 12.5px; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ticket__cust:hover { border-color: var(--acc); color: var(--ink); }

.lines { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 0; }
.line {
  display: grid; grid-template-columns: 3px 1fr auto auto; gap: 10px; align-items: center;
  padding: 8px 14px 8px 0; border: 0; border-bottom: 1px solid var(--line-soft);
  border-radius: 0; background: transparent;
}
.line:hover { background: var(--panel); }
.line.is-muted { opacity: 0.5; }
.line.is-new { animation: lineIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes lineIn {
  from { background: color-mix(in srgb, var(--cat) 22%, var(--panel)); transform: translateX(6px); }
  to { background: var(--panel); transform: none; }
}
.line__dot { align-self: stretch; border-radius: 0; background: var(--cat, var(--line)); min-height: 30px; }
.line__main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.line__name { font-size: 13.5px; font-weight: 550; letter-spacing: -0.005em; }
.line__unit, .line__note, .line__disc { font-size: 11.5px; color: var(--ink-3); }
.line__disc { color: var(--warn); }
.line__qty { display: flex; align-items: center; gap: 2px; }
.stepper {
  width: 26px; height: 26px; border-radius: 3px; border: 1px solid var(--line);
  background: var(--panel-2); cursor: pointer; display: grid; place-items: center; color: var(--ink-2);
}
.stepper .ic { width: 14px; height: 14px; }
.stepper:hover { border-color: var(--acc); color: var(--ink); }
.line__count { min-width: 22px; text-align: center; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.line__right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 74px; }
.line__amt { font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.line__tools { display: flex; gap: 1px; opacity: 0; transition: opacity 0.14s ease; }
.line:hover .line__tools, .line:focus-within .line__tools { opacity: 1; }
.iconbtn {
  width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent;
  color: var(--ink-3); cursor: pointer; display: grid; place-items: center;
}
.iconbtn .ic { width: 13px; height: 13px; }
.iconbtn:hover { background: var(--panel-2); color: var(--ink); }
.iconbtn--danger:hover { color: var(--danger); }

.ticket__totals { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-top: 1px solid var(--line); }
.tot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.tot span:last-child { font-family: var(--mono); }
.tot--grand {
  font-size: 15px; font-weight: 600; color: var(--ink); padding-top: 10px; margin-top: 6px;
  border-top: 1px solid var(--line); letter-spacing: 0.04em; text-transform: uppercase; align-items: baseline;
}
.tot--grand span:last-child { font-size: 28px; font-weight: 680; letter-spacing: -0.035em; text-transform: none; }
.ticket__acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.ticket__acts .btn {
  padding: 13px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; border: 0; border-radius: 0; background: var(--bg-2); color: var(--ink-2);
}
.ticket__acts .btn:hover { background: var(--panel); color: var(--ink); }

/* ---------- floor ---------- */

.floor { display: flex; flex-direction: column; gap: 18px; }
.zone__title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 8px; }
.zone__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tbl {
  position: relative; display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  height: 132px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  cursor: pointer; text-align: left;
}
.tbl:hover { border-color: var(--acc); }
.tbl.is-open { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.tbl__head { display: flex; align-items: center; gap: 8px; }
.tbl__icon { width: 17px; height: 17px; color: var(--ink-3); }
.tbl.is-open .tbl__icon { color: var(--ok); }
.tbl__name { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.tbl__seats { font-size: 11.5px; color: var(--ink-3); }
.tbl__total { margin-top: auto; font-size: 17px; font-weight: 700; }
.tbl__free { margin-top: auto; font-size: 13px; color: var(--ink-3); }
.tbl__meta { font-size: 11px; color: var(--ink-3); }
.tbl__move {
  position: absolute; top: 10px; right: 10px; width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-2); font-size: 13px;
}
.tbl__move:hover { border-color: var(--acc); }

/* ---------- tables of data ---------- */

table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600;
}
table.table td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.table tr:last-child td { border-bottom: 0; }
table.table tr.is-muted { opacity: 0.5; }
table.table .num { text-align: right; font-family: var(--mono); }
table.table .actions { text-align: right; white-space: nowrap; }
.cellName { display: block; }
.cellSub { display: block; font-size: 11.5px; color: var(--ink-3); }
.is-pos { color: var(--ok); }
.is-neg { color: var(--danger); }

/* ---------- stats & charts ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.stat__value { font-family: var(--mono); font-size: 23px; letter-spacing: -0.03em; font-weight: 600; }
.stat__sub { font-size: 12px; color: var(--ink-2); }

.chart { display: flex; align-items: flex-end; gap: 4px; height: 170px; }
.chart__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 5px; }
.chart__bar { width: 100%; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--acc), color-mix(in srgb, var(--acc) 45%, transparent)); }
.chart__bar.is-empty { background: var(--line); }
.chart__tick { font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.mix { display: flex; flex-direction: column; gap: 10px; }
.mix__row { display: grid; grid-template-columns: 120px 1fr 84px; gap: 10px; align-items: center; font-size: 13px; }
.mix__label { color: var(--ink-2); }
.mix__track { height: 9px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.mix__fill { height: 100%; background: var(--acc); border-radius: 999px; }
.mix__value { text-align: right; font-variant-numeric: tabular-nums; }

.rank { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: rank; }
.rank__row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; font-size: 13.5px; align-items: baseline; }
.rank__qty { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rank__val { font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }

.drawer { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.drawer__acts { display: flex; gap: 8px; }

/* ---------- upstreams ---------- */

.ups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.up { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.up__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.up__name { font-size: 16px; }
.up__stars { font-size: 12.5px; color: var(--warn); font-variant-numeric: tabular-nums; }
.up__repo { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.up__blurb { font-size: 13px; color: var(--ink-2); }
.up__take { font-size: 13px; border-left: 2px solid var(--acc); padding-left: 10px; }
.up__takeLabel { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--acc); margin-bottom: 2px; }
.up__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.up__link { color: var(--acc); font-size: 12.5px; text-decoration: none; margin-left: auto; }
.up__link:hover { text-decoration: underline; }

.code {
  font-family: var(--mono); font-size: 12px; background: var(--bg); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px;
  max-height: 320px; overflow: auto; white-space: pre; margin: 0;
}

/* ---------- modal ---------- */

.modal {
  position: fixed; inset: 0; z-index: 60;
  background: var(--scrim); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 20px;
}
.modal__card {
  width: min(460px, 100%); max-height: min(88vh, 780px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--e3); display: flex; flex-direction: column; overflow: hidden;
}
.modal__card--wide { width: min(880px, 100%); }
.modal__head { position: relative; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.modal__title { font-size: 17px; }
.modal__sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.modal__x {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer;
}
.modal__x:hover { border-color: var(--acc); }
.modal__body { padding: 18px 20px; overflow-y: auto; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.dialog { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.dialog__note { font-size: 12.5px; color: var(--ink-2); text-align: center; }
.dialog__note.is-ok { color: var(--ok); }
.dialog__note.is-warn { color: var(--warn); }
.dialog__label { font-size: 12px; color: var(--ink-2); }

.picker { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.picker__row {
  display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); cursor: pointer;
}
.picker__row:hover { border-color: var(--acc); }
.picker__row.is-active { border-color: var(--acc); background: var(--acc-soft); }
.picker__row--split { flex-direction: row; align-items: center; gap: 8px; padding: 0; background: transparent; border: 0; }
.picker__main { flex: 1; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); cursor: pointer; }
.picker__main:hover { border-color: var(--acc); }
.picker__kill { width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel-2); color: var(--danger); cursor: pointer; }
.picker__name { font-size: 14px; }
.picker__meta { font-size: 12px; color: var(--ink-3); }

/* ---------- keypad & payment ---------- */

.keypad { display: flex; flex-direction: column; gap: 8px; }
.keypad__display {
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg); text-align: right; font-size: 24px; font-weight: 600;
  font-family: var(--mono);
}
.keypad__keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad__key {
  padding: 14px 0; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel-2); cursor: pointer; font-size: 18px;
}
.keypad__key:hover { border-color: var(--acc); }
.keypad__key--fn { color: var(--ink-2); }

.pay { display: grid; grid-template-columns: 1fr 260px; gap: 18px; }
@media (max-width: 720px) { .pay { grid-template-columns: 1fr; } }
.pay__left, .pay__right { display: flex; flex-direction: column; gap: 12px; }
.pay__due { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.pay__dueLabel { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.pay__dueValue { font-size: 32px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pay__change { font-size: 13px; color: var(--ok); }
.pay__methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 6px; }
.pay__method {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 11px 6px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2);
  cursor: pointer; font-size: 12.5px;
}
.pay__method.is-active { border-color: var(--acc); background: var(--acc-soft); }
.pay__methodIcon { font-size: 18px; }
.pay__quick { display: flex; gap: 6px; flex-wrap: wrap; }
.pay__taken { display: flex; flex-direction: column; gap: 6px; }
.pay__row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--panel-2); font-size: 13px; }
.pay__undo { border: 0; background: transparent; color: var(--danger); cursor: pointer; }

.refund { display: grid; grid-template-columns: 1fr 260px; gap: 18px; }
@media (max-width: 720px) { .refund { grid-template-columns: 1fr; } }
.refund__lines { display: flex; flex-direction: column; gap: 6px; max-height: 48vh; overflow-y: auto; }
.refund__side { display: flex; flex-direction: column; gap: 12px; }
.refund__total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.refund__total strong { font-size: 22px; font-variant-numeric: tabular-nums; }

/* ---------- receipt ---------- */

.receiptWrap { display: flex; justify-content: center; }
.receipt {
  width: 100%; max-width: 340px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px; font-family: var(--mono); font-size: 12px;
}
.receipt__head { text-align: center; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.receipt__head h3 { font-size: 14px; font-family: var(--sans); }
.receipt__head p { font-size: 11px; color: var(--ink-3); }
.receipt__lines { padding: 10px 0; display: flex; flex-direction: column; gap: 5px; }
.receipt__line { display: grid; grid-template-columns: 30px 1fr auto; gap: 6px; }
.receipt__qty { color: var(--ink-3); }
.receipt__name { display: flex; flex-direction: column; }
.receipt__note { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.receipt__amt { font-variant-numeric: tabular-nums; }
.receipt__totals { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 3px; }
.receipt__total { display: flex; justify-content: space-between; color: var(--ink-2); }
.receipt__total.is-strong { color: var(--ink); font-size: 14px; font-weight: 700; }
.receipt__rule { height: 1px; background: var(--line); margin: 6px 0; }
.receipt__foot { text-align: center; margin-top: 12px; color: var(--ink-3); font-size: 11px; }

/* ---------- toasts ---------- */

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 10px 16px; border-radius: 999px; background: var(--panel);
  border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13.5px;
  animation: toastIn 0.18s ease-out;
}
.toast--ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.toast--warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.toast.is-out { opacity: 0; transition: opacity 0.35s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .shell { grid-template-columns: 68px 1fr; }
  .nav__brandText, .nav__label, .nav__hint { display: none; }
  .nav__btn { justify-content: center; }
  .till { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .ticket { border-left: 0; border-top: 1px solid var(--line); max-height: 56vh; }
}

/* ---------- print ---------- */

@media print {
  body { background: #fff; color: #000; overflow: visible; }
  .shell, .toasts, .modal__head, .modal__foot { display: none !important; }
  .modal { position: static; background: none; padding: 0; display: block; backdrop-filter: none; }
  .modal__card { border: 0; box-shadow: none; max-height: none; width: auto; }
  .modal__body { overflow: visible; padding: 0; }
  .receipt { border: 0; background: #fff; color: #000; max-width: none; }
  .receipt__total, .receipt__head p, .receipt__qty, .receipt__foot { color: #000; }
}


/* ---------- channel orders ---------- */

.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.order {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.order.is-new { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc-soft); }
.order.is-late { border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.order__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.order__ch { font-size: 14px; font-weight: 600; }
.order__no { font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); }
.order__who { font-size: 12.5px; color: var(--ink-2); }
.order__items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.order__items li { display: flex; justify-content: space-between; gap: 8px; }
.order__note { display: block; width: 100%; font-size: 11.5px; color: var(--ink-3); font-style: normal; }
.order__totals { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.order__fee { font-size: 11.5px; color: var(--ink-3); }
.order__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.order__due { font-size: 12px; color: var(--ink-2); }
.order__due.is-late { color: var(--danger); }
.order__acts { display: flex; gap: 6px; }
.order__acts .btn { padding: 7px 12px; font-size: 13px; }

/* ---------- integrations ---------- */

.chan { display: flex; flex-direction: column; gap: 14px; }
.chan__group { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); margin-bottom: 8px; }
.chan__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.chan__card {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); cursor: pointer;
}
.chan__card:hover { border-color: var(--acc); }
.chan__card.is-on { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--panel-2)); }
.chan__icon { font-size: 20px; }
.chan__name { font-size: 13.5px; }
.chan__state { font-size: 11.5px; color: var(--ink-3); }
.chan__card.is-on .chan__state { color: var(--ok); }
.chan__meta { font-size: 11px; color: var(--ink-3); }

/* ---------- uplift ---------- */

.stackGap { display: flex; flex-direction: column; gap: 14px; }
.score { display: flex; align-items: baseline; gap: 10px; }
.score__value { font-size: 40px; letter-spacing: -0.03em; }
.score__hint { font-size: 12.5px; color: var(--ink-2); }
.sigs { display: flex; flex-direction: column; gap: 12px; }
.sig { display: flex; flex-direction: column; gap: 4px; }
.sig__head { display: flex; justify-content: space-between; font-size: 13px; }
.sig__value { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.sig__hint { font-size: 11.5px; color: var(--ink-3); }
.mix__fill.is-low { background: var(--danger); }
.mix__fill.is-mid { background: var(--warn); }

.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.deal {
  display: flex; flex-direction: column; gap: 3px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2);
}
.deal.is-draft { border-style: dashed; }
.deal__kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--acc); }
.deal__name { font-size: 13.5px; }
.deal__price { font-size: 13px; color: var(--ink-2); }
.deal__price s { color: var(--ink-3); }
.deal__meta { font-size: 11px; color: var(--ink-3); }

/* ---------- camera ---------- */

.cam {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-sm);
  overflow: hidden; background: #000; display: grid; place-items: center;
}
.cam__video { width: 100%; height: 100%; object-fit: cover; }
.cam__loading { color: var(--ink-2); font-size: 13px; padding: 20px; text-align: center; }
.cam__reticle {
  position: absolute; inset: 22% 12%; border: 2px solid var(--acc);
  border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.28);
}

.audit { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.audit__row { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--panel-2); }
.audit__shot { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.audit__shot--none { display: grid; place-items: center; font-size: 11px; color: var(--ink-3); }

/* An age-restricted line is flagged on the grid, not only at the tender screen. */
.card__age {
  position: absolute; top: 10px; right: 10px;
  padding: 1px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent);
  color: var(--warn); font-size: 10.5px; font-weight: 600;
}
.card { position: relative; }

/* Multi-buys that fired on this ticket, named so staff can answer "why that price?" */
.ticket__promos { display: flex; flex-direction: column; gap: 3px; padding: 8px 14px; border-top: 1px dashed var(--line); }
.ticket__promo { font-size: 11.5px; color: var(--ok); }
.picker__row--check { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }

/* ---------- theme picker ---------- */

.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.theme {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); cursor: pointer;
}
.theme:hover { border-color: var(--acc); }
.theme.is-active { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.theme__swatch { display: flex; gap: 4px; margin-bottom: 4px; }
.theme__chip { width: 26px; height: 26px; border-radius: 7px; border: 1px solid rgba(128, 128, 128, 0.35); }
.theme__name { font-size: 13.5px; font-weight: 600; }
.theme__hint { font-size: 11.5px; color: var(--ink-3); }

/* ---------- denomination count sheet ---------- */

.count { display: flex; flex-direction: column; gap: 10px; }
.count__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.count__row { display: grid; grid-template-columns: 62px 1fr 74px; gap: 8px; align-items: center; font-size: 13px; }
.count__row--roll .count__label { color: var(--ink-3); }
.count__label { color: var(--ink-2); }
.count__input { padding: 6px 8px; text-align: right; }
.count__line { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 12.5px; }
.count__foot {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line);
}
.count__total { font-size: 24px; font-variant-numeric: tabular-nums; }


/* ---------- tender station ---------- */

body.is-paying { overflow: hidden; }
.payscreen {
  position: fixed; inset: 0; z-index: 70; background: var(--bg);
  display: flex; flex-direction: column;
  animation: payIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes payIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .payscreen { animation: none; } }

.payscreen__top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 62px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.payscreen__id { display: flex; flex-direction: column; line-height: 1.2; }
.payscreen__id strong { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; }
.payscreen__id span { font-size: 12px; color: var(--ink-3); }
.payscreen__back {
  display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink-2); cursor: pointer; font-size: 13.5px;
}
.payscreen__back:hover { color: var(--ink); border-color: var(--ink-3); }
.payscreen__back .ic { width: 15px; height: 15px; }
.payscreen__back kbd {
  font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--panel-2);
}

.payscreen__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.payscreen__order {
  border-right: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; min-height: 0; padding: 20px 22px;
}
.pay__lines { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.pay__line {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: baseline;
  padding: 9px 12px; border-left: 3px solid var(--cat);
  border-bottom: 1px solid var(--line-soft); background: transparent; font-size: 13.5px;
}
.pay__lineQty { color: var(--ink-3); font-family: var(--mono); }
.pay__lineName { min-width: 0; }
.pay__lineAmt { font-weight: 600; font-family: var(--mono); }
.payscreen__totals { padding-top: 16px; margin-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }

.payscreen__tender { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px; min-height: 0; overflow-y: auto; }
.pay__due {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 22px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2);
}
.pay__dueLabel { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); font-weight: 600; }
.pay__dueValue { font-family: var(--mono); font-size: clamp(44px, 6vw, 66px); line-height: 1; letter-spacing: -0.05em; font-weight: 600; }
.pay__change { font-size: 15px; color: var(--ok); font-weight: 600; margin-top: 6px; }

.pay__methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.pay__method {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  cursor: pointer; font-size: 12.5px; color: var(--ink-2);
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.pay__method:hover { border-color: var(--ink-3); color: var(--ink); }
.pay__method.is-active {
  border-color: var(--acc); background: var(--acc-soft); color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 40%, transparent);
}
.pay__methodIcon { width: 22px; height: 22px; }
.pay__methodName { font-weight: 550; }

.chip--exact { border-color: color-mix(in srgb, var(--acc) 45%, transparent); color: var(--ink); }

.payscreen__padRow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.payscreen__side { display: flex; flex-direction: column; gap: 10px; }
.payscreen .keypad__display { font-family: var(--mono); font-size: 30px; padding: 14px 16px; font-weight: 600; }
.payscreen .keypad__key { padding: 18px 0; font-size: 20px; font-weight: 550; }
.payscreen .keypad__key:active { background: var(--acc-soft); }
.pay__rowName { display: inline-flex; align-items: center; gap: 8px; }
.pay__rowName .ic { width: 15px; height: 15px; color: var(--ink-3); }
.pay__row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 9px;
  background: var(--panel); font-size: 13.5px; font-variant-numeric: tabular-nums;
}
.payscreen .btn--block { padding: 17px; font-size: 16px; border-radius: var(--radius); font-weight: 650; }
.btn--go { background: var(--ok); border-color: var(--ok); color: #04231a; }
.btn--go:hover { filter: brightness(1.06); }
.payscreen__hint { display: flex; align-items: center; gap: 5px; justify-content: center; font-size: 11.5px; color: var(--ink-3); }
.payscreen__hint kbd {
  font-family: var(--mono); font-size: 10px; padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--panel-2);
}

@media (max-width: 1000px) {
  .payscreen__body { grid-template-columns: 1fr; }
  .payscreen__order { border-right: 0; border-bottom: 1px solid var(--line); max-height: 34vh; }
  .payscreen__padRow { grid-template-columns: 1fr; }
}
