/* Default look = the 8792 Toast-tickets board tokens, ported verbatim from
   cenas-kitchen-runtime/scripts/local_tickets_ui.py (the definitive source).
   --panel-2/--blue are dead upstream tokens: blue family used as rgba literals. */
:root {
  --bg: #07090c;
  --panel: #111722;
  --ink: #f6f7f2;
  --muted: #9ba6b4;
  --line: #263241;
  --gold: #f3c74f;
  --green: #42d392;
  --orange: #f18f3b;
  --red: #e2483f;
  --text-scale: 1;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 9, 12, 0.96);
  border-bottom: 1px solid var(--line);
  padding: 14px clamp(14px, 2vw, 28px);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.brand small { color: var(--gold); font-weight: 800; font-size: 12px; letter-spacing: 0.16em; }
.brand strong { font-size: clamp(24px, 4vw, 42px); line-height: 1; font-weight: 900; }
.meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.pulse { width: 10px; height: 10px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 5px rgba(66,211,146,.1); }
button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
button.active { background: #b10d15; border-color: #e0444b; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.grid {
  padding: 12px clamp(14px, 2vw, 28px) 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
  align-items: start;
}
.ticket {
  min-height: 280px;
  border: 1px solid var(--line);
  border-top-width: 5px;
  border-radius: 8px;
  background: linear-gradient(180deg, #141b28, #0e131d);
  overflow: hidden;
}
.ticket.fresh { border-top-color: var(--green); }
.ticket.working { border-top-color: var(--gold); }
.ticket.late { border-top-color: var(--orange); }
.ticket.critical { border-top-color: var(--red); }
.ticket.done { border-top-color: #667085; opacity: .78; }
.timer {
  min-width: 58px; min-height: 50px; border-radius: 8px;
  background: rgba(255,255,255,.06);
  display: grid; place-items: center;
  font-size: 20px; font-weight: 900; color: var(--gold);
}
.ticket.critical .timer { color: #ff756f; }
.qty { color: var(--gold); font-size: calc(20px * var(--text-scale)); font-weight: 900; }
.item-name { font-size: calc(17px * var(--text-scale)); font-weight: 850; overflow-wrap: anywhere; }
.mods { color: #cbd2dc; font-size: calc(12px * var(--text-scale)); font-weight: 700; display: grid; gap: 3px; }
.mod { padding-left: 10px; border-left: 2px solid rgba(243,199,79,.35); }
.mod.freetext { background: rgba(243,199,79,.14); color: #ffe08a; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 26px; padding: 5px 8px; border-radius: 7px;
  border: 1px solid rgba(92,167,255,.35); background: rgba(92,167,255,.12);
  color: #acd1ff; font-size: 10px; font-weight: 950;
}
.pill.fulfilled { border-color: rgba(66,211,146,.5); background: rgba(66,211,146,.14); color: #9af0c6; }
.pill.partial { border-color: rgba(243,199,79,.5); background: rgba(243,199,79,.14); color: #ffe08a; }

/* ---- pairing keypad ---- */
.pairwrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.paircard {
  width: min(420px, 94vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #141b28, #0e131d);
  padding: 26px;
}
.paircard h1 { margin: 0 0 4px; font-size: 24px; font-weight: 900; }
.paircard h1 small { color: var(--gold); font-size: 12px; letter-spacing: .16em; display: block; margin-bottom: 6px; }
.paircard p { color: var(--muted); font-size: 13px; margin: 4px 0 18px; }
.pindisplay {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0d12;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; letter-spacing: .3em;
  margin-bottom: 14px;
  color: var(--ink);
}
.pindisplay.muted { color: var(--muted); font-size: 14px; letter-spacing: 0; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { min-height: 60px; font-size: 22px; font-weight: 900; }
.pairmsg { min-height: 22px; margin-top: 12px; font-size: 13px; font-weight: 800; color: var(--red); text-align: center; }
.pairmsg.ok { color: var(--green); }
.stepchip { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
