/* Luxis POS — front-of-house touch surface.
   Self-contained: system fonts only, zero external resources (the
   self-containment test enforces this). Token vocabulary is the established
   Luxis family look (see bench.css): Living System charcoal substrate with
   the Luxis brand gold as the single accent, so Luxis, Solstice, and the ERP
   read as one product line. Gold is reserved for primary actions, the
   wordmark, and focus. Usability > intuitiveness > aesthetics. */

:root {
  /* charcoal substrate — mirrors Living System --ls-bg* */
  --bg:        #0b0c10;
  --bg-2:      #0e0f13;
  --panel:     #14161c;
  --panel-2:   #1b1e27;
  --panel-hi:  #232733;
  --line:      rgba(255, 255, 255, 0.07);
  --line-2:    rgba(255, 255, 255, 0.12);
  --ink:       #eef0f6;
  --ink-2:     #a6abb8;
  --ink-3:     #6a7082;
  /* Luxis brand gold (sibling of Solstice amber) */
  --gold:      #c49032;
  --gold-hi:   #d4a84b;
  --gold-soft: rgba(196, 144, 50, 0.14);
  --grad:      linear-gradient(135deg, #c49032, #d4a84b);
  --green:     #2dd4bf;
  --green-soft:rgba(45, 212, 191, 0.14);
  --red:       #f87171;
  --red-soft:  rgba(248, 113, 113, 0.14);
  --violet:    #a78bfa;
  --radius:    12px;
  --radius-sm: 8px;
  --sans: ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  font: 15px/1.45 var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(196, 144, 50, 0.06), transparent 60%),
    var(--bg-2);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
input { user-select: text; }

button { font: inherit; cursor: pointer; touch-action: manipulation; }
input, button {
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color .13s ease, background .13s ease, box-shadow .13s ease;
}
input { font-size: 17px; width: 100%; }
input::placeholder { color: var(--ink-3); }
input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
button:hover:not(:disabled) { background: var(--panel-hi); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.38; cursor: not-allowed; }

h3 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--ink-2);
}
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); }
.money, .num { font-variant-numeric: tabular-nums; }
.err-line { color: var(--red); min-height: 20px; font-size: 14px; padding: 4px 0; }
.mgr-note { text-transform: none; letter-spacing: .3px; font-weight: 500; font-size: 11px; }

.btn { min-height: 52px; font-weight: 600; }
.btn-gold {
  background: var(--grad);
  color: #17130a;
  font-weight: 700;
  border: none;
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.07); background: var(--grad); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }

/* ── wordmark — LUXIS with the amber-diamond accent ─────────────────── */
.wordmark {
  font-weight: 800;
  letter-spacing: 3px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  padding-right: 13px;
  display: inline-block;
}
.wordmark::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--gold-hi);
  border-radius: 1px;
}
.wordmark.lg { font-size: 30px; }
.wordmark.sm { font-size: 18px; }
.wordmark.tiny { font-size: 15px; letter-spacing: 2px; padding-right: 11px; margin: 0 auto; }

/* ── pills / badges / dots ──────────────────────────────────────────── */
.pill {
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--panel-2);
  white-space: nowrap;
  color: var(--ink-2);
}
.pill.ok   { border-color: rgba(45, 212, 191, 0.5);  background: var(--green-soft); color: var(--green); }
.pill.bad  { border-color: rgba(248, 113, 113, 0.5); background: var(--red-soft);   color: var(--red); }
.pill.warn { border-color: rgba(196, 144, 50, 0.5);  background: var(--gold-soft);  color: var(--gold-hi); }

.badge {
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px;
  text-transform: uppercase; letter-spacing: .4px;
}
.badge.open    { background: var(--gold-soft);  border: 1px solid rgba(196, 144, 50, 0.5);  color: var(--gold-hi); }
.badge.settled { background: var(--green-soft); border: 1px solid rgba(45, 212, 191, 0.5);  color: var(--green); }
.badge.fired   { background: rgba(167, 139, 250, 0.14); border: 1px solid rgba(167, 139, 250, 0.5); color: var(--violet); }
.badge.comp    { background: rgba(167, 139, 250, 0.14); border: 1px solid rgba(167, 139, 250, 0.5); color: var(--violet); }
.badge.closed  { background: var(--panel-hi); border: 1px solid var(--line-2); color: var(--ink-2); }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); display: inline-block; }
.dot.on { background: var(--green); box-shadow: 0 0 6px rgba(45, 212, 191, 0.7); }

/* ── offline banner + toasts ────────────────────────────────────────── */
#offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 400;
  background: linear-gradient(180deg, #7a1f1f, #641818);
  color: #fff; font-weight: 700; text-align: center; padding: 10px;
  letter-spacing: .3px;
}
#toast-strip {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--panel-hi);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(-6px);
  transition: opacity .14s ease, transform .14s ease;
  max-width: 640px;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { border-color: rgba(248, 113, 113, 0.55); color: #fdb0b0; }
.toast.success { border-color: rgba(45, 212, 191, 0.5); color: var(--green); }

/* ── screens ────────────────────────────────────────────────────────── */
.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: flex; }

/* ── station setup ──────────────────────────────────────────────────── */
#scr-setup { align-items: center; justify-content: center; }
.setup-card {
  width: min(460px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
}
.setup-sub { color: var(--ink-3); margin: 6px 0 22px; font-size: 13px; }
.fld-label {
  display: block; text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--ink-2);
  margin: 14px 0 6px;
}
.fld-hint { text-transform: none; letter-spacing: .2px; font-weight: 500; color: var(--ink-3); }
#su-redeem { width: 100%; margin-top: 20px; min-height: 58px; font-size: 16px; }
.setup-note { color: var(--ink-3); font-size: 12px; margin: 14px 0 0; line-height: 1.5; }

/* ── lock screen ────────────────────────────────────────────────────── */
#scr-lock { flex-direction: column; }
.lock-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), transparent);
}
.lock-head .pill:last-child { margin-left: auto; }
.lock-body { flex: 1; display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 24px; }

.staff-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  width: min(880px, 94vw);
}
.staff-tile {
  min-height: 104px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-size: 18px; font-weight: 700;
  transition: border-color .13s ease, background .13s ease, transform .13s ease;
}
.staff-tile:hover:not(:disabled) { border-color: var(--gold); background: var(--panel-hi); }
.staff-tile .role-chip {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--ink-3);
}
.staff-tile.mgr .role-chip { color: var(--gold-hi); }
.staff-tile.last { border-color: rgba(196, 144, 50, 0.55); box-shadow: 0 0 0 3px var(--gold-soft); }
.staff-tile.nopin { opacity: .38; }
.staff-tiles.compact { width: 100%; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.staff-tiles.compact .staff-tile { min-height: 76px; font-size: 15px; }

.pinpane { width: 340px; max-width: 92vw; text-align: center; }
.pin-back { margin-bottom: 6px; }
.pin-who { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.pin-dots { min-height: 34px; display: flex; gap: 12px; justify-content: center; align-items: center; margin: 8px 0 16px; }
.pin-dots .pd {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--line-2); background: transparent;
}
.pin-dots .pd.full { background: var(--gold-hi); border-color: var(--gold-hi); }

/* ── numpad ─────────────────────────────────────────────────────────── */
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.np-key {
  min-height: 74px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  font-size: 26px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.np-key:active:not(:disabled) { background: var(--panel-hi); transform: scale(0.97); }
.np-key.fn { font-size: 19px; color: var(--ink-2); }
.np-key.go {
  background: var(--grad); border: none; color: #17130a; font-weight: 800; font-size: 19px;
}
.np-key.go:active:not(:disabled) { filter: brightness(0.92); }
.numpad.compact .np-key { min-height: 58px; font-size: 21px; }

.amt-display {
  font-size: 34px; font-weight: 800; text-align: right;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 16px; margin-bottom: 12px; letter-spacing: .5px;
}

/* ── register layout ────────────────────────────────────────────────── */
#scr-register.active { display: grid; grid-template-columns: 86px 1fr 400px; }

#rail {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  padding: 14px 8px 12px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.rail-tabs { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.rail-tab {
  min-height: 58px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line-2);
  color: var(--ink-2); font-size: 12px; font-weight: 700;
  padding: 6px 4px; line-height: 1.2; word-break: break-word;
}
.rail-tab.active { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-hi); }
.rail-spacer { flex: 1; }
.rail-btn {
  min-height: 56px; font-size: 12px; font-weight: 700; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.rail-btn.lock { border-color: rgba(196, 144, 50, 0.4); color: var(--gold-hi); }
#rail .pill { text-align: center; padding: 4px 4px; font-size: 11px; }

/* menu pane */
#menu-pane { display: flex; flex-direction: column; padding: 12px 12px 10px; min-width: 0; }
.menu-chips { display: flex; gap: 8px; padding-bottom: 10px; flex-wrap: wrap; }
.menu-chip {
  min-height: 44px; border-radius: 999px; padding: 6px 18px; font-weight: 700; font-size: 13px;
}
.menu-chip.active { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-hi); }

/* ring controls — qty-per-tap + course chips above the grid */
#mp-controls { display: flex; align-items: center; gap: 22px; padding-bottom: 10px; flex-wrap: wrap; }
.ctl-group { display: flex; align-items: center; gap: 8px; }
.ctl-lab {
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: var(--ink-3);
}
.chip-strip { display: flex; gap: 6px; }
.chip {
  min-height: 44px; min-width: 52px; border-radius: 999px;
  font-weight: 700; font-size: 14px; padding: 6px 12px;
}
.chip.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-hi); }

#mp-grid { flex: 1; display: grid; gap: 10px; min-height: 0; }
.tile {
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line-2);
  padding: 10px 12px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  text-align: left; gap: 6px;
  font-size: 15px; font-weight: 650;
  min-height: 84px;
  overflow: hidden;
}
.tile:hover:not(:disabled) { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.tile:active:not(:disabled) { transform: scale(0.985); }
.tile .t-name { line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile .t-price { color: var(--gold-hi); font-weight: 700; font-variant-numeric: tabular-nums; }
.tile.out { opacity: 0.35; }
.tile .t-86 { font-size: 10px; font-weight: 800; color: var(--red); letter-spacing: 1px; }

#mp-pager {
  display: flex; align-items: center; gap: 12px; padding-top: 10px; min-height: 66px;
}
.pg-btn { min-width: 96px; min-height: 56px; font-size: 26px; font-weight: 700; }
.pg-info { flex: 1; text-align: center; color: var(--ink-3); font-size: 13px; }

/* order rail */
#order-rail {
  display: flex; flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  min-height: 0;
}
#or-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.or-title { font-weight: 700; font-size: 15px; white-space: nowrap; }
#or-head .actor { margin-left: auto; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
#or-head .actor.expiring { border-color: rgba(196, 144, 50, 0.5); color: var(--gold-hi); }

.or-lines { flex: 1; overflow-y: auto; min-height: 0; }
.or-empty { color: var(--ink-3); text-align: center; padding: 40px 20px; font-size: 14px; }
.line-row {
  width: 100%; display: block; text-align: left;
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 10px 14px; color: var(--ink);
}
.line-row:hover:not(:disabled) { background: var(--panel-2); }
.line-row .lr-top { display: flex; gap: 8px; align-items: baseline; }
.line-row .lr-name { flex: 1; font-weight: 650; }
.line-row .lr-qty { color: var(--ink-3); font-size: 13px; }
.line-row .lr-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.line-row .lr-mods { color: var(--ink-3); font-size: 13px; padding: 2px 0 0 12px; }
.line-row .lr-flags { display: flex; gap: 6px; padding-top: 4px; }
.line-row.voided .lr-name, .line-row.voided .lr-total { text-decoration: line-through; color: var(--ink-3); }
.line-row.comped .lr-name { color: var(--violet); }
.seat-chip {
  font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 7px;
  background: var(--panel-hi); border: 1px solid var(--line-2); color: var(--ink-2);
}
.course-head {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 5px;
  background: var(--bg); border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: var(--ink-2);
}
.course-head .badge { margin-left: auto; }

.or-totals { border-top: 1px solid var(--line); padding: 10px 14px 6px; }
.or-totals .tr { display: flex; justify-content: space-between; padding: 2px 0; color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 14px; }
.or-totals .tr.grand {
  font-weight: 800; color: var(--ink); font-size: 22px;
  border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 8px;
}

#or-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px 12px 12px;
}
.oa { min-height: 56px; font-size: 15px; }
.oa-pay { grid-column: 1 / -1; min-height: 68px; font-size: 21px; letter-spacing: .5px; }

/* ── overlays (centered) ────────────────────────────────────────────── */
.ov {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 4, 6, 0.72);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .13s ease;
}
.ov.open { opacity: 1; pointer-events: auto; }
.ov.top { z-index: 150; }
.ov.topmost { z-index: 200; }
.ov-card {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 20px;
  width: min(480px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(10px);
  transition: transform .14s ease;
}
.ov.open .ov-card { transform: none; }
.ov-card.wide { width: min(680px, 94vw); }
.ov-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.ov-actions .btn { min-width: 130px; }

/* modifier prompt */
.mod-body { max-height: 52vh; overflow-y: auto; }
.mod-group {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; margin: 10px 0; background: var(--panel-2);
}
.mod-group.child { margin-left: 22px; border-color: rgba(196, 144, 50, 0.35); }
.mod-group .mg-head { font-weight: 700; margin-bottom: 6px; }
.mod-group .req { color: var(--gold-hi); font-size: 12px; font-weight: 600; margin-left: 8px; }
.mod-opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  min-height: 52px; margin: 6px 0; padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line-2);
  font-size: 15px; font-weight: 600;
}
.mod-opt .box {
  width: 24px; height: 24px; border-radius: 6px; flex: none;
  border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #17130a; font-weight: 900;
}
.mod-opt.on { border-color: var(--gold); background: var(--gold-soft); }
.mod-opt.on .box { background: var(--gold-hi); border-color: var(--gold-hi); }
.mod-opt .mo-price { margin-left: auto; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.mod-opt.out { opacity: .4; }

/* line actions */
.la-body { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.la-body .btn { min-height: 60px; font-size: 16px; }
.la-body .btn.danger { border-color: rgba(248, 113, 113, 0.5); color: var(--red); }

/* reason grid */
.reason-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.reason-grid.col { grid-template-columns: 1fr; }
.reason-btn { min-height: 58px; font-size: 15px; font-weight: 600; }
.reason-btn.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-hi); }

/* discount */
.dc-row { display: flex; align-items: center; gap: 14px; margin: 10px 0; }
.dc-lab { width: 64px; color: var(--ink-3); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg .seg-btn { min-height: 48px; min-width: 96px; font-weight: 700; }
.seg .seg-btn.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-hi); }
.dc-mid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.dc-reasons-col .reason-grid { max-height: 300px; overflow-y: auto; }

/* split sheet (even + by-seat) */
.sp-sec {
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--ink-2); margin: 16px 0 4px;
}
.sp-seat { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.sp-note { color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.sp-row { display: flex; align-items: center; gap: 10px; min-height: 52px; text-align: left; font-weight: 600; }
.sp-row .sp-count { margin-left: auto; color: var(--ink-3); font-size: 13px; }
.sp-headline { font-size: 17px; font-weight: 800; padding: 4px 0; }

/* fire-by-course sheet */
.fr-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 2px 0; }
.fr-status .badge { margin-left: auto; }

/* escalation */
.es-title { color: var(--gold-hi); font-size: 14px; }

/* ── sheets (full-height right) ─────────────────────────────────────── */
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(480px, 100vw);
  background: var(--panel);
  border-left: 1px solid var(--line-2);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column;
  transform: translateX(103%);
  transition: transform .15s ease;
}
.sheet.open { transform: none; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line);
}
.sheet-head h3 { margin: 0; }
.sheet-x { min-width: 96px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 14px 16px 18px; }

/* tender */
.due-label { text-align: center; color: var(--ink-3); font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.due { text-align: center; font-size: 54px; font-weight: 800; color: var(--ink); line-height: 1.15; margin-bottom: 8px; }
.tb-note { margin-bottom: 12px; font-size: 14px; color: var(--ink-2); }
.tb-list { display: grid; gap: 8px; }
.tb-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 64px; padding: 12px 14px; text-align: left;
}
.tb-row.current { border-color: var(--gold); background: var(--gold-soft); }
.tb-row .tb-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tb-row .tb-target { font-weight: 700; font-size: 16px; }
.tb-row .tb-meta { font-size: 13px; color: var(--ink-3); }
.tb-row .tb-amt { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 17px; }
.tb-row .tb-age { margin-left: 10px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tb-row .tb-age.stale { color: var(--red); font-weight: 700; }

.tn-checks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.tn-check {
  display: flex; align-items: center; gap: 10px; min-height: 52px;
  text-align: left; font-weight: 600;
}
.tn-check.on { border-color: var(--gold); background: var(--gold-soft); }
.tn-check .tc-amt { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.tn-check.settled { opacity: .55; }
/* Player comp tender. Deliberately NOT gold: gold is the "take the money"
   action (Apply cash / Close Order), and a comp settles a check without any
   cash arriving. Also deliberately not violet — violet is the manager
   write-down directly above it, and confusing those two is the one mistake
   this button must not invite. */
.tn-playercomp {
  width: 100%; margin-bottom: 10px;
  border-color: rgba(52, 211, 153, 0.5); color: var(--green);
}
.tn-playercomp:disabled { opacity: .45; border-color: var(--line); color: var(--ink-3); }
.ca-note { margin-bottom: 12px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.ca-code {
  width: 100%; padding: 16px; margin-bottom: 14px;
  font-family: var(--mono); font-size: 18px; letter-spacing: .04em; text-align: center;
  color: var(--ink); background: var(--panel-hi);
  border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none;
}
.ca-code:focus { border-color: var(--gold); }

.tn-comp {
  width: 100%; margin-bottom: 10px;
  border-color: rgba(167, 139, 250, 0.5); color: var(--violet);
}
.tn-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.tn-quick .btn { min-height: 56px; font-size: 17px; font-weight: 700; }
.tn-apply { width: 100%; min-height: 64px; font-size: 19px; margin-top: 12px; }
.change {
  text-align: center; font-size: 60px; font-weight: 800; color: var(--gold-hi);
  padding: 10px 0 4px; line-height: 1.1;
}
.change .ch-label { display: block; font-size: 13px; letter-spacing: 3px; color: var(--ink-3); font-weight: 800; }
.tn-payments { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.tn-pay-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 13px;
}
.tn-pay-row .btn { min-height: 40px; padding: 4px 12px; font-size: 12px; margin-left: auto; }
.tn-pay-row.reversed { opacity: .5; text-decoration: line-through; }
.tn-settled { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.tn-settled .btn { min-height: 62px; font-size: 18px; }

/* drawer sheet */
.dw-status { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.dw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dw-grid .btn { min-height: 62px; font-size: 15px; }
.dw-grid .btn.span { grid-column: 1 / -1; }
.dw-form { display: flex; flex-direction: column; gap: 12px; }
.dw-form .fld-label { margin: 4px 0 0; }
.dw-note { color: var(--ink-3); font-size: 12px; line-height: 1.5; margin-top: 12px; }

/* reports */
.rp-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.rp-actions .btn { min-height: 56px; }
.rp-out { overflow-x: auto; }
.rp-out table { border-collapse: collapse; width: 100%; margin: 6px 0 14px; }
.rp-out th, .rp-out td { border: 1px solid var(--line); padding: 6px 10px; font-size: 13px; text-align: left; }
.rp-out th { color: var(--ink-2); background: var(--panel-2); }
.rp-out td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.rp-out caption { text-align: left; font-weight: 700; color: var(--gold-hi); padding: 4px 0; caption-side: top; }
.rp-out .overshort-bad { color: var(--red); font-weight: 700; }
.rp-out .overshort-ok { color: var(--green); }

/* ── narrow registers (1280×800 and down) ───────────────────────────── */
@media (max-width: 1300px) {
  #scr-register.active { grid-template-columns: 78px 1fr 372px; }
  .due { font-size: 46px; }
  .change { font-size: 52px; }
}

/* ── offline command journal: provisional badges + queue inspector ───── */
/* Rule (ADR-001 client queue): a provisional figure NEVER renders without
   its badge. Everything below exists to make that impossible to miss. */

.badge.prov {
  background: var(--gold-soft);
  border: 1px dashed rgba(196, 144, 50, 0.7);
  color: var(--gold-hi);
}

.prov-banner {
  text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 2px;
  color: var(--gold-hi); background: var(--gold-soft);
  border: 1px dashed rgba(196, 144, 50, 0.7); border-radius: var(--radius-sm);
  padding: 4px 8px; margin-bottom: 6px;
}

.tr.prov { color: var(--gold-hi); }
.tr.prov .money { color: var(--gold-hi); }

#tn-due.prov { color: var(--gold-hi); }
#tn-due-label.prov { color: var(--gold-hi); font-weight: 800; letter-spacing: 1px; }

.change.prov { color: var(--gold-hi); border: 1px dashed rgba(196, 144, 50, 0.7); border-radius: var(--radius); padding: 8px; }
.change.prov .ch-label { color: var(--gold-hi); }
.prov-note { display: block; font-size: 12px; letter-spacing: 1px; color: var(--ink-2); margin-top: 2px; }

/* rail queue badge */
#rl-queue { position: relative; }
.qbadge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
  border-radius: 10px; padding: 0 5px; font-size: 11px; font-weight: 800;
  line-height: 20px; text-align: center;
  background: var(--gold); color: #14161c; border: 1px solid var(--panel);
}
.qbadge.attn { background: var(--red); color: #fff; }

/* queue inspector sheet */
.qu-sec {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--ink-3);
  border-bottom: 1px solid var(--line-2); padding-bottom: 4px; margin: 18px 0 8px;
}
.qu-sec.attn { color: var(--red); border-bottom-color: rgba(248, 113, 113, 0.5); }
.qu-stream { font-family: var(--mono); font-size: 12px; color: var(--gold-hi); margin: 8px 0 2px; }
.qu-row {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 10px; margin: 4px 0; display: flex; flex-direction: column; gap: 2px;
}
.qu-row.bad { border-color: rgba(248, 113, 113, 0.5); background: var(--red-soft); }
.qu-main { font-size: 14px; font-weight: 600; }
.qu-sub { font-size: 12px; color: var(--ink-2); }
.qu-row.bad .qu-sub { color: var(--red); }
.qu-ack { min-height: 40px; margin-top: 6px; align-self: flex-start; padding: 4px 14px; font-size: 12px; }
.qu-empty { color: var(--ink-3); font-size: 13px; padding: 2px 0 6px; }
.qu-note { color: var(--gold-hi); font-size: 13px; padding: 2px 0 6px; }
