/* Shared look for the staff and admin apps: large touch targets for iPads, clear status colours. */
:root {
  --bg: #f4f1ea; --surface: #ffffff; --surface-2: #f8f6f1; --ink: #10262c; --muted: #56676c; --line: #dcd6ca;
  --lagoon: #0e6b78; --lagoon-ink: #ffffff; --good: #1f7a4d; --warn: #9a5b00; --bad: #b3261e;
  --good-bg: #e5f4e4; --warn-bg: #fbf0dc; --bad-bg: #fbebeb; --info-bg: #e7f1fb;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1a1d; --surface: #162428; --surface-2: #1c2d32; --ink: #eef3f2; --muted: #9db0b4; --line: #2b4046;
    --lagoon: #4fb3c0; --lagoon-ink: #08262b; --good: #6fd29b; --warn: #f0b45a; --bad: #ff8a80;
    --good-bg: #173527; --warn-bg: #3a2c12; --bad-bg: #3d1a18; --info-bg: #13283a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 17px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
.wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; }
.narrow { max-width: 460px; }
h1 { font-size: 26px; margin: 4px 0 6px; } h2 { font-size: 20px; margin: 22px 0 8px; } h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 6px 0; } .muted { color: var(--muted); } .small { font-size: 14px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.brand { font-weight: 800; letter-spacing: .01em; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 12px 0; }
.field { display: grid; gap: 4px; margin: 10px 0; }
.field label { font-weight: 700; font-size: 15px; }
input, select { font: inherit; min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); width: 100%; }
button { font: inherit; cursor: pointer; }
.btn { min-height: 52px; padding: 10px 20px; border-radius: 14px; border: 0; background: var(--lagoon); color: var(--lagoon-ink); font-weight: 700; }
.btn.alt { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 15px; border-radius: 10px; }
.btn.danger { background: var(--surface); color: var(--bad); border: 2px solid var(--bad); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.list { display: grid; gap: 8px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.chip { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.chip.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.alert { border-radius: 12px; padding: 10px 14px; margin: 10px 0; background: var(--info-bg); }
.alert.bad { background: var(--bad-bg); color: var(--bad); } .alert.good { background: var(--good-bg); color: var(--good); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; }
.tabs button { min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.bigcode { font: 800 38px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; margin: 8px 0; }
.copy { word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; background: var(--surface-2); border-radius: 10px; padding: 10px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.person { min-height: 76px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); }
.person[aria-pressed="true"] { border-color: var(--lagoon); box-shadow: 0 0 0 2px var(--lagoon) inset; }
.person b { display: block; } .person span { font-size: 14px; color: var(--muted); }
.dots { display: flex; gap: 14px; justify-content: center; margin: 12px 0; }
.dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); }
.dots i.on { background: var(--ink); }
.keypad { display: grid; grid-template-columns: repeat(3, 84px); gap: 10px; justify-content: center; }
.keypad button { height: 68px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 26px; font-weight: 700; }
@media (max-width: 420px) { .keypad { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Express Desk ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.btn.show { background: #2d1e5f; color: #fff; }
.btn.good { background: var(--good); color: #fff; }
.viewfinder { position: relative; width: 100%; max-width: 520px; aspect-ratio: 4 / 3; background: #000; border-radius: 16px; overflow: hidden; margin-bottom: 10px; }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.callRow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 6px; }
.nextUp { color: var(--muted); font-size: 15px; }
.countLine { color: var(--muted); font-size: 15px; margin: 6px 0 10px; }
.countLine b { color: var(--ink); }
.trow { display: grid; grid-template-columns: 76px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.trow .code { font: 800 18px ui-monospace, SFMono-Regular, Menlo, monospace; }
.trow .meta { font-size: 14px; color: var(--muted); }
.trow .right { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.chip { white-space: nowrap; }
.trow.bellman { border-left: 6px solid #c8553f; }
.chip.lane { background: #fbe7e2; color: #a2402d; border-color: transparent; }
.card.open { border: 2px solid var(--lagoon); }
.tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: 10px 0; }
.track { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.track .k { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.guard { font-size: 14px; background: var(--warn-bg); color: var(--ink); border-radius: 10px; padding: 8px 12px; }
.log { font-size: 13px; color: var(--muted); max-height: 160px; overflow: auto; }
.overlay { position: fixed; inset: 0; background: rgba(10, 20, 24, .55); display: grid; place-items: center; padding: 16px; z-index: 20; }
.sheet { background: var(--surface); color: var(--ink); border-radius: 20px; padding: 20px; width: min(560px, 100%); max-height: 92vh; overflow: auto; }
.sheet.wide { width: min(900px, 100%); }
.tmplGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.tmpl { display: flex; gap: 10px; align-items: center; text-align: left; min-height: 60px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.tmpl[disabled] { opacity: .45; cursor: not-allowed; }
.sec { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; }
.showWrap { position: fixed; inset: 0; z-index: 30; background: #10262c; color: #fff; display: grid; grid-template-rows: auto 1fr auto; padding: 24px; }
.showWrap .langTag { justify-self: start; background: rgba(255,255,255,.15); border-radius: 999px; padding: 6px 14px; font-weight: 700; }
.showMsg { display: grid; place-content: center; text-align: center; gap: 18px; padding: 10px; }
.showMsg .icon { font-size: 72px; }
.showMsg .text { font-size: clamp(30px, 6vw, 58px); font-weight: 700; line-height: 1.2; }
.showMsg .label { font-size: 20px; opacity: .8; }
.showFoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; opacity: .9; }
.walkTicket { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: baseline; background: var(--surface-2); border-radius: 14px; padding: 14px; margin: 10px 0; }
.walkTicket b { font: 800 30px ui-monospace, SFMono-Regular, Menlo, monospace; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); border-radius: 14px; padding: 12px 18px; z-index: 40; max-width: 92vw; }
:root { --imap-pin: var(--lagoon); --imap-surface: var(--surface); --imap-line: var(--line); --imap-ink: var(--ink); }
.imap-stage.editing { cursor: crosshair; }
