/* Cashier screen: built for a tablet on the counter at rush hour. Big targets, state in color and shape.
   Same printed-paper look as the rest of Pickup: paper cards, ink outlines, hard shadows, no blur. */
body.staff { min-height: 100dvh; }
.s-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: var(--surface) var(--grain);
  border-bottom: 2px solid var(--outline);
}
body.staff::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--surface); }
.s-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.s-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--brand-soft, var(--surface-2)); border: 2px solid var(--outline); overflow: hidden; flex: none; }
.s-logo img { width: 100%; height: 100%; object-fit: contain; }
.s-brand b { display: block; font-size: 1rem; line-height: 1.2; }
.s-brand small { color: var(--muted); font-size: 0.78rem; }
.s-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }
.s-stat { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; border: 1.5px solid var(--outline); background: var(--surface-2); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.s-stat b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.s-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.s-tools .btn { min-height: 40px; padding: 8px 12px; font-size: 0.86rem; }
.s-tools .btn.on { background: var(--warn-soft); color: var(--warn-ink); }

.s-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); font-weight: 600; font-size: 0.9rem; border-bottom: 2px solid var(--outline); }
.s-banner.warn { background: var(--warn-soft); color: var(--warn-ink); }
.s-banner.info { background: var(--info-soft); color: var(--info-ink); }
.s-banner.bad { background: var(--bad-soft); color: var(--bad-ink); }
.s-banner .btn { margin-inline-start: auto; }

.s-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
@media (max-width: 980px) { .s-layout { grid-template-columns: minmax(0, 1fr); } }

.s-compose { position: sticky; top: 84px; display: grid; gap: 14px; }
@media (max-width: 980px) { .s-compose { position: static; } }
.s-compose .card { display: grid; gap: 12px; padding: 16px; }
/* the one button that matters at rush hour: a big printed key */
.s-new {
  min-height: 92px;
  border: 2px solid var(--outline);
  border-radius: 20px;
  background: var(--brand, var(--signal));
  color: var(--on-brand, #fff);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 4px 5px 0 var(--ink-shadow);
  transition: transform 0.1s, box-shadow 0.1s;
}
.s-new:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--ink-shadow); }
.s-new small { display: block; font-family: var(--font-ui); font-size: 0.85rem; font-weight: 500; opacity: 0.9; }
.s-eta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.s-eta button { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--outline); background: var(--surface); color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.s-eta button[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: 2px 2px 0 var(--signal); }
.s-suggest { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.s-suggest button { border: 1.5px solid var(--outline); background: var(--info-soft); color: var(--info-ink); border-radius: 8px; padding: 3px 12px; font-weight: 700; }
.s-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; text-align: center; height: 70px; direction: ltr; letter-spacing: 0.06em; }
.s-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; direction: ltr; }
.s-pad button { min-height: 56px; border-radius: 12px; border: 1.5px solid var(--outline); background: var(--surface-2); color: var(--ink); font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: var(--shadow-1); }
.s-pad button:active { transform: translate(2px, 2px); box-shadow: none; background: var(--surface-3); }
.s-last { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--good-soft); color: var(--good-ink); border: 2px solid var(--outline); box-shadow: var(--shadow-2); animation: pop 0.3s ease; }
.s-last .n { font-family: var(--font-display); font-size: 3rem; font-weight: 800; line-height: 1; direction: ltr; }
.s-last p { font-size: 0.88rem; }

.s-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 680px) { .s-board { grid-template-columns: minmax(0, 1fr); } }
.s-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.s-col-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 2px; }
.s-col-head h2 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
.s-col-head .count { min-width: 32px; height: 28px; padding: 0 8px; border-radius: 8px; border: 1.5px solid var(--outline); display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.s-col.waiting .count { background: var(--warn-soft); color: var(--warn-ink); }
.s-col.ready .count { background: var(--good-soft); color: var(--good-ink); }

/* An order is a paper card; its state is a highlighter stripe down the start edge. */
.s-card { --tone: var(--line-strong); position: relative; display: grid; gap: 10px; padding: 14px 14px 14px 14px; padding-inline-start: 24px; border-radius: 16px; background: var(--surface) var(--grain); border: 2px solid var(--outline); box-shadow: var(--shadow-2); }
.s-card::before { content: ""; position: absolute; inset-block: 12px; inset-inline-start: 8px; width: 6px; border-radius: 4px; background: var(--tone); }
.s-card.is-new { animation: slideIn 0.3s ease; }
.s-card.waiting { --tone: var(--warn); }
.s-card.late { --tone: var(--bad); background: color-mix(in srgb, var(--bad-soft) 60%, var(--surface)) var(--grain); }
.s-card.ready { --tone: var(--good); }
.s-card.noack { --tone: var(--bad); }
.s-card-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.s-n { font-family: var(--font-display); font-weight: 800; font-size: 2.3rem; line-height: 1; min-width: 64px; direction: ltr; text-align: start; }
.s-meta { flex: 1; min-width: 0; display: grid; gap: 4px; }
.s-meta .line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.84rem; color: var(--ink-2); }
.s-bar { height: 10px; border-radius: 6px; border: 1.5px solid var(--outline); background: var(--surface-2); overflow: hidden; }
.s-bar i { display: block; height: 100%; background: var(--good); transition: width 1s linear; }
.s-bar i.warn { background: var(--warn); }
.s-bar i.bad { background: var(--bad); }
.s-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.s-actions .grow { flex: 1; }
.s-eta-adj { display: inline-flex; align-items: center; border: 1.5px solid var(--outline); border-radius: 10px; overflow: hidden; background: var(--surface); }
.s-eta-adj button { width: 42px; min-height: 44px; border: 0; background: var(--surface); color: var(--ink); font-size: 1.2rem; font-weight: 700; }
.s-eta-adj button:active { background: var(--surface-3); }
.s-eta-adj span { min-width: 56px; text-align: center; font-weight: 700; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.s-go { min-height: 48px; font-size: 1.05rem; padding-inline: 20px; }
.s-live { display: inline-flex; align-items: center; gap: 6px; }
.s-live .dot { animation: pulseDot 1.4s ease-in-out infinite; }
.s-cheer { position: absolute; inset-inline-end: 14px; top: -6px; font-size: 1.8rem; pointer-events: none; filter: var(--sticker); animation: cheerUp 1.6s ease-out forwards; }
.s-empty { padding: 26px 14px; border: 2px dashed var(--line-strong); border-radius: 16px; text-align: center; color: var(--muted); }

.s-pin { min-height: 100dvh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.s-pin-box { width: min(360px, 100%); display: grid; gap: 14px; justify-items: center; text-align: center; }
.s-pin-box .code-input { width: 100%; }

/* Team performance: one row per person, numbers as chips that wrap. */
.st-chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.st { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 10px; border-radius: 8px; border: 1.5px solid var(--outline); background: var(--surface); font-size: 0.8rem; color: var(--ink-2); }
.st b { font-size: 0.95rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.team-row.idle { opacity: 0.6; }

/* A dispatcher has no order entry; this card takes its place. */
.s-role-card { justify-items: start; }
.s-role-card .ic { font-size: 2rem; line-height: 1; filter: var(--sticker); }
.s-role-card b { font-family: var(--font-display); font-size: 1.3rem; }
.s-role-card p { font-size: 0.9rem; line-height: 1.6; }

.s-qr { width: min(260px, 70vw); aspect-ratio: 1; margin: 0 auto; padding: 10px; background: #fff; border: 2px solid var(--outline); border-radius: 14px; box-shadow: var(--shadow-2); }
.s-qr img { width: 100%; height: 100%; display: block; }

@keyframes slideIn { from { transform: translateY(-6px); opacity: 0; } }
@keyframes pulseDot { 50% { opacity: 0.3; } }
@keyframes cheerUp { from { transform: translateY(0) scale(0.6); opacity: 0; } 20% { opacity: 1; transform: scale(1.2); } to { transform: translateY(-60px) scale(1); opacity: 0; } }

/* ---- TV board: an ink board with paper tickets pinned on it, readable from across the room ---- */
body.tv { min-height: 100dvh; background: #1b1814 var(--grain); color: #fbf5e9; overflow: hidden; }
.tv-wrap { height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; gap: 2vh; padding: 3vh max(3vw, env(safe-area-inset-right, 0px)) 3vh max(3vw, env(safe-area-inset-left, 0px)); }
.tv-head { display: flex; align-items: center; gap: 2vw; }
.tv-head .s-logo { width: 7vh; height: 7vh; border-radius: 2vh; font-size: 4vh; background: #fbf5e9; border: 0.3vh solid #000; box-shadow: 0.5vh 0.6vh 0 #000; }
.tv-head b { font-family: var(--font-display); font-size: 4.4vh; font-weight: 800; padding-inline: 0.6vw; background: linear-gradient(transparent 58%, color-mix(in srgb, var(--brand, #ff5a1f) 70%, transparent) 58% 92%, transparent 92%); }
.tv-clock { margin-inline-start: auto; font-size: 4vh; font-weight: 700; font-variant-numeric: tabular-nums; color: #d8ccb4; }
.tv-cols { display: grid; grid-template-columns: 1fr 1.35fr; gap: 3vw; min-height: 0; }
.tv-col { display: grid; grid-template-rows: auto 1fr; gap: 2vh; min-height: 0; border-radius: 3vh; padding: 3vh 2.4vw; border: 0.35vh dashed #6b604f; }
.tv-col.ready { border: 0.4vh solid #22c272; background: rgba(34, 194, 114, 0.08); }
.tv-col h2 { font-family: var(--font-display); font-size: 4.2vh; font-weight: 800; display: flex; align-items: center; gap: 1.2vw; }
.tv-nums { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2vh 1.8vw; padding: 0 0.8vh 0.8vh 0; overflow: hidden; direction: ltr; }
/* waiting numbers are quiet; ready ones are cream tickets with a hard shadow */
.tv-num { font-family: var(--font-display); font-weight: 800; line-height: 1; padding: 1.2vh 1.6vw; border-radius: 1.6vh; background: #2e2921; color: #efe4cf; border: 0.3vh solid #5a5041; font-size: 6vh; min-width: 11vh; text-align: center; }
.tv-col.ready .tv-num { font-size: 10vh; background: #fbf5e9; color: #201c17; border: 0.4vh solid #000; box-shadow: 0.7vh 0.8vh 0 #000; }
.tv-col.ready .tv-num.fresh { background: #22c272; color: #0b1f12; animation: tvPulse 1s ease-in-out 6 alternate; }
.tv-foot { display: flex; align-items: center; gap: 2vw; }
.tv-qr { width: 15vh; height: 15vh; background: #fff; border: 0.4vh solid #000; border-radius: 2vh; padding: 1vh; flex: none; box-shadow: 0.6vh 0.7vh 0 #000; transform: rotate(-2deg); }
.tv-qr img { width: 100%; height: 100%; }
.tv-foot p { font-size: 3.4vh; font-weight: 700; }
.tv-foot small { display: block; font-size: 2.2vh; color: #a3967f; font-weight: 400; }
.tv-start { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(27, 24, 20, 0.82); z-index: 5; }
.tv-start button { font-size: 1.4rem; min-height: 70px; padding: 0 40px; }
@keyframes tvPulse { to { transform: scale(1.06) rotate(-1.5deg); box-shadow: 1.1vh 1.3vh 0 #000; } }
