/* =====================================================================
   Ubipass staff screens (website part 3, 2026-11-25): the job picker and staff sign-in (console.html), the job
   screens (staff.html, also in the KP Staff app), the entrance screen (door.html), the live dashboard (live.html)
   and the "Now serving" TV (queue.html). Loaded after styles.css; on console and staff in place of the old
   staff-redesign.css. Chris's logo system: cream in light mode, black in dark mode, Pass Blue for the brand,
   following the phone's, tablet's or computer's setting. Each job keeps its own colour, now one of the four
   accents. Same screens and tools as before: only the look changes.
   ===================================================================== */
:root {
  color-scheme: light dark;
  --s-page: #FEF6EB; --s-card: #FFFFFF; --s-line: #EADFCC; --s-rule: #F2E8D8; --s-field: #CDBDA3; --s-hover: #F6ECDD;
  --s-text: #1A0E08; --s-muted: #6B5E52; --s-link: #0B2FA7; --s-num: #0B2FA7;
  --s-blue: #0B2FA7; --s-blue-h: #08237D; --s-cream: #FEF6EB; --s-ink: #1A0E08;
  --s-soft: #F2E8D9; --s-tint: #E7EBF8;
  --s-ok: #3F6212; --s-ok-soft: #EEF3D2; --s-err: #B42318; --s-err-soft: #FBE0D6;
  --s-warn: #8A4B00; --s-warn-soft: #FCEBCB; --s-mauve-t: #7A3550; --s-mauve-soft: #F6E3EA;
  --s-orange: #F0A63A; --s-lime: #C9D96B; --s-coral: #E8643A; --s-mauve: #C07A93;
  --s-bar: #0B2FA7; --s-tv-soft: rgba(26, 14, 8, 0.06);
  --s-dim: rgba(26, 14, 8, 0.45); --s-lift: 0 18px 36px -24px rgba(26, 14, 8, 0.35);
  --s-strip: linear-gradient(90deg, var(--s-orange) 0 25%, var(--s-lime) 25% 50%, var(--s-coral) 50% 75%, var(--s-mauve) 75% 100%);
  /* styles.css names, so its own rules (and the pages' own <style> blocks) use the new colours too */
  --ink: var(--s-text); --ink-2: var(--s-text); --muted: var(--s-muted); --brand: var(--s-blue); --brand-deep: var(--s-blue-h);
  --line: var(--s-line); --field: var(--s-field); --paper: var(--s-page); --card: var(--s-card); --tint: var(--s-tint);
  --accent: var(--s-orange); --good: var(--s-ok); --warn: var(--s-warn); --bad: var(--s-err); --sun: var(--s-orange); --ph-blue: var(--s-blue);
}
@media (prefers-color-scheme: dark) {
  :root {
    --s-page: #000000; --s-card: #141414; --s-line: #2B2B2B; --s-rule: #1E1E1E; --s-field: #4A4540; --s-hover: #161616;
    --s-text: #FEF6EB; --s-muted: #A9A196; --s-link: #FEF6EB; --s-num: #8FA3F0;
    --s-soft: #1C1C1C; --s-tint: #141B33;
    --s-ok: #C9D96B; --s-ok-soft: #1C2414; --s-err: #F08A66; --s-err-soft: #2A1712;
    --s-warn: #F0A63A; --s-warn-soft: #2A1F0E; --s-mauve-t: #E3A9BE; --s-mauve-soft: #2A1820;
    --s-bar: #8FA3F0; --s-tv-soft: rgba(254, 246, 235, 0.07);
    --s-dim: rgba(0, 0, 0, 0.7); --s-lift: 0 18px 36px -20px rgba(0, 0, 0, 0.9);
  }
}
@keyframes s-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Page ---------- */
html body { font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--s-page) !important; color: var(--s-text);
  border-top: 0 !important; border-image: none !important; -webkit-font-smoothing: antialiased; }
html body a { color: var(--s-link); }
html body :is(h1, h2, h3) { color: var(--s-text); letter-spacing: -0.02em; }
html body :is(.small-print, .hint, label .hint, .en) { color: var(--s-muted); }
html body main.console::before, html body.role-ui main.wrap::before { content: none !important; }

/* The wordmark: the UP symbol, "ubipass", and the screen's name as a small tag */
html body .u-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--s-text); font-weight: 800; font-size: 22px; letter-spacing: -0.04em; line-height: 1; text-decoration: none; }
html body .u-logo svg { width: 18px; height: 23px; fill: none; stroke: var(--s-link); stroke-width: 27; stroke-linecap: round; stroke-linejoin: round; flex: none; }
html body .u-logo small { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--s-muted); background: var(--s-soft); border-radius: 6px; padding: 3px 6px; margin-left: 4px; }

/* ---------- Cards, buttons, fields, chips, notes ---------- */
html body .card { background: var(--s-card); color: var(--s-text); border: 1px solid var(--s-line) !important; border-radius: 22px !important; box-shadow: none !important; }
html body main :where(button:not(.secondary, .link, .good, .bad, .rs-btn, .rb-btn, .rb-out, [role="tab"], .chip, .f-chip, [aria-pressed], .role-tile), .btn:not(.secondary)),
html body .modal :where(button:not(.secondary, .link, .good, .bad)) {
  background: var(--s-blue) !important; color: var(--s-cream) !important; border: 1.5px solid var(--s-blue) !important; border-radius: 14px !important; box-shadow: none !important; font-weight: 800; }
html body main :where(button:not(.secondary, .link, .good, .bad, .rs-btn, .rb-btn, .rb-out, [role="tab"], .chip, .f-chip, [aria-pressed], .role-tile):hover:not(:disabled), .btn:not(.secondary):hover) {
  background: var(--s-blue-h) !important; border-color: var(--s-blue-h) !important; }
html body :is(button.secondary, .btn.secondary) { background: var(--s-card) !important; color: var(--s-link) !important; border: 1.5px solid var(--s-line) !important; border-radius: 14px !important; box-shadow: none !important; font-weight: 800; }
html body :is(button.secondary, .btn.secondary):hover:not(:disabled) { border-color: var(--s-link) !important; }
html body button.good { background: var(--s-lime) !important; border: 1.5px solid var(--s-lime) !important; color: #1A0E08 !important; border-radius: 14px !important; box-shadow: none !important; }
html body button.bad { background: var(--s-err) !important; border-color: var(--s-err) !important; color: var(--s-page) !important; border-radius: 14px !important; box-shadow: none !important; }
html body button.link { color: var(--s-link) !important; }
html body :is(button, .btn, summary, a):focus-visible { outline: 3px solid var(--s-link) !important; outline-offset: 2px; }
html body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(.switch), html body select, html body textarea {
  background-color: var(--s-card) !important; color: var(--s-text) !important; border: 1.5px solid var(--s-field) !important; border-radius: 14px !important; }
html body :is(input, textarea)::placeholder { color: var(--s-muted); opacity: 1; }
html body :is(input, select, textarea):focus { outline: 0 !important; border-color: var(--s-link) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--s-link) 18%, transparent) !important; }
html body input:is([type="checkbox"], [type="radio"]) { background-color: transparent !important; accent-color: var(--s-blue); }
html body input[aria-invalid="true"] { border-color: var(--s-err) !important; background-color: var(--s-err-soft) !important; }
html body input.filled { background-color: var(--s-ok-soft) !important; }
html body th { background: var(--s-soft) !important; color: var(--s-muted) !important; }
html body :is(th, td) { border-color: var(--s-rule) !important; }
html body .table-box { border: 1px solid var(--s-line); border-radius: 14px; background: var(--s-card); }
html body .chip { background: var(--s-soft); color: var(--s-muted); }
html body :is(.chip.sent, .chip.open, .chip.ok, .pill.ok, .ps-pill.verified, .done-tag.ok, .in-pill, .q-pill.st-done) { background: var(--s-ok-soft) !important; color: var(--s-ok) !important; }
html body :is(.chip.pending_approval, .chip.scheduled, .pill.warn, .ps-pill.review, .ps-pill.unchecked, .q-pill.st-skipped) { background: var(--s-warn-soft) !important; color: var(--s-warn) !important; }
html body :is(.chip.rejected, .chip.closed, .pill.bad, .ps-pill.needed, .done-tag.no) { background: var(--s-err-soft) !important; color: var(--s-err) !important; }
html body :is(.q-pill, .q-pill.st-called, .q-pill.st-waiting) { background: var(--s-tint) !important; color: var(--s-num) !important; }
html body .q-pill.st-cancelled { background: var(--s-soft) !important; color: var(--s-muted) !important; }
html body .staff-id { background: var(--s-soft) !important; color: var(--s-text); }
html body .msg { border-radius: 14px; }
html body .msg.info { background: var(--s-tint) !important; color: var(--s-text) !important; }
html body .msg.ok { background: var(--s-ok-soft) !important; color: var(--s-ok) !important; }
html body .msg.error { background: var(--s-err-soft) !important; color: var(--s-err) !important; }
html body .notice { background: var(--s-card) !important; border-color: var(--s-line) !important; color: var(--s-text); }
html body .modal { background: var(--s-dim) !important; }
html body .modal .card { box-shadow: var(--s-lift) !important; }
html body :is(main, .modal) button.f-chip { background: var(--s-card) !important; color: var(--s-text) !important; border: 1px solid var(--s-line) !important; border-radius: 999px !important; box-shadow: none !important; }
html body :is(main, .modal) button.f-chip[aria-pressed="true"] { background: var(--s-text) !important; color: var(--s-page) !important; border-color: var(--s-text) !important; }
html body .demo-banner { background: var(--s-soft) !important; color: var(--s-text) !important; border: 0 !important; }
html body .demo-banner b { background: var(--s-text) !important; color: var(--s-page) !important; }
html body .rp-btn { min-height: 0 !important; padding: 8px 14px !important; font-size: 13px !important; font-weight: 800; border-radius: 999px !important;
  background: var(--s-text) !important; color: var(--s-page) !important; border: 0 !important; box-shadow: var(--s-lift) !important; }
html body :is(.kp-toast) { background: var(--s-text) !important; color: var(--s-page) !important; }
html body .ask-card { background: var(--s-card) !important; color: var(--s-text) !important; border: 1px solid var(--s-line) !important; }

/* The offline list bar on the staff page: ready (lime), waiting (orange), problem (red) in the page's colours */
html body .off-bar.ok { background: var(--s-ok-soft) !important; color: var(--s-ok) !important; }
html body .off-bar.ok span { color: var(--s-ok) !important; }
html body .off-bar.pending { background: var(--s-warn-soft) !important; color: var(--s-warn) !important; }
html body .off-bar.down { background: var(--s-err-soft) !important; color: var(--s-err) !important; }

/* ---------- Jobs: each has its own colour (an accent) ---------- */
html body :is([data-pick="admin"], [data-as="admin"]) { --rc: var(--s-blue) !important; --ron: var(--s-cream) !important; }
html body :is([data-pick="front_gro"], [data-as="front_gro"], [data-pick="door"], [data-as="door"]) { --rc: var(--s-coral) !important; --ron: #1A0E08 !important; }
html body :is([data-pick="embassy_services"], [data-as="embassy_services"]) { --rc: var(--s-lime) !important; --ron: #1A0E08 !important; }
html body :is([data-pick="internal_gro"], [data-as="internal_gro"]) { --rc: var(--s-orange) !important; --ron: #1A0E08 !important; }
html body :is([data-pick="vip"], [data-as="vip"]) { --rc: var(--s-mauve) !important; --ron: #1A0E08 !important; }
/* The sign-in card's job colour is set by console.js from its own list: matched here by that colour */
html body #roleHead[style*="#0E7C66"] { --rc: var(--s-blue) !important; --ron: var(--s-cream) !important; }
html body #roleHead[style*="#B7791F"] { --rc: var(--s-coral) !important; --ron: #1A0E08 !important; }
html body #roleHead[style*="#0038A8"] { --rc: var(--s-lime) !important; --ron: #1A0E08 !important; }
html body #roleHead[style*="#2E7D32"] { --rc: var(--s-orange) !important; --ron: #1A0E08 !important; }
html body #roleHead[style*="#9D174D"] { --rc: var(--s-mauve) !important; --ron: #1A0E08 !important; }
html body[data-duty="front_gro"], html body[data-duty="door"] { --role-c: var(--s-coral) !important; --role-on: #1A0E08; }
html body[data-duty="embassy_services"] { --role-c: var(--s-lime) !important; --role-on: #1A0E08; }
html body[data-duty="internal_gro"] { --role-c: var(--s-orange) !important; --role-on: #1A0E08; }
html body[data-duty] { --role-t: color-mix(in srgb, var(--role-c) 22%, var(--s-card)) !important; }

/* ---------- Job picker and sign-in (console.html) ---------- */
html body .console h1 { font-size: 34px; letter-spacing: -0.035em; color: var(--s-text) !important; background: none !important; -webkit-text-fill-color: currentColor; }
html body .console .c-date { color: var(--s-muted); font-weight: 700; }
html body .console .c-lbl { color: var(--s-muted); font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; font-size: 12.5px; }
html body .console .c-lbl::before { content: none !important; }
/* Your event today: the one standout, Pass Blue with the four-colour strip */
html body .c-today { position: relative; overflow: hidden; border-radius: 22px; padding: 18px 18px 24px; color: var(--s-cream);
  background: radial-gradient(70% 90% at 100% 0%, rgba(143, 163, 240, 0.35), transparent 60%), var(--s-blue) !important; box-shadow: none !important; animation: s-rise 380ms cubic-bezier(.2, .8, .2, 1) both; }
html body .c-today::before { content: none !important; }
html body .c-today::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--s-strip) !important; }
html body .c-today .c-when { display: inline-flex; padding: 5px 11px; border-radius: 999px; background: var(--s-orange) !important; color: #1A0E08 !important; font-size: 13px; font-weight: 800; }
html body .c-today h2 { margin: 10px 0 2px; font-size: 22px; line-height: 1.2; color: var(--s-cream) !important; overflow-wrap: anywhere; }
html body .c-today p { margin: 0; font-size: 14.5px; color: rgba(254, 246, 235, 0.85) !important; }
html body .c-today .c-go { margin-top: 14px; min-height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16.5px;
  text-decoration: none; background: var(--s-cream) !important; color: var(--s-blue) !important; }
html body .c-today .c-go::after { content: none !important; }
/* Job tiles: white (dark grey in dark mode), the job's colour as a top line and as the icon's square */
html body .role-grid .role-tile { position: relative; overflow: hidden; background: var(--s-card) !important; border: 1px solid var(--s-line) !important; box-shadow: none !important;
  border-radius: 20px !important; animation: s-rise 380ms cubic-bezier(.2, .8, .2, 1) both; }
html body .role-grid .role-tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--rc); }
html body .role-grid .role-tile .r-ico { background: var(--rc) !important; color: var(--ron) !important; }
html body .role-grid .role-tile b { color: var(--s-text) !important; }
html body .role-grid .role-tile small { color: var(--s-muted) !important; }
html body .role-grid .role-tile:is(:hover, :focus-visible) { border-color: var(--s-text) !important; }
/* Other tiles (Door check-in guide, Admin tools...) */
html body .console .c-tile { background: var(--s-card) !important; color: var(--s-text) !important; border: 1px solid var(--s-line) !important; box-shadow: none !important; }
html body .console .c-tile small { color: var(--s-muted) !important; }
html body .console .c-tile .c-ico { background: var(--s-soft) !important; color: var(--s-text) !important; }
html body .console .c-tile[href="staff.html"] .c-ico { background: var(--s-tint) !important; color: var(--s-num) !important; }
html body .console .c-tile[href="admin.html"] .c-ico { background: var(--s-blue) !important; color: var(--s-cream) !important; }
html body .console .c-tile[href="vip-door.html"] .c-ico { background: var(--s-mauve) !important; color: #1A0E08 !important; }
html body .console .c-tile[href="guide.html"] .c-ico { background: var(--s-orange) !important; color: #1A0E08 !important; }
html body .console .role-head .r-ico { background: var(--rc, var(--s-blue)) !important; color: var(--ron, var(--s-cream)) !important; }
html body .console .role-head { background: var(--s-card) !important; border: 1px solid var(--s-line) !important; border-left: 6px solid var(--rc, var(--s-blue)) !important; color: var(--s-text); }
html body .console .role-head :is(b, strong) { color: var(--s-text) !important; }

/* ---------- Job screens (staff.html) ---------- */
/* The job bar: the job's colour, dark words on it (cream on Pass Blue for admins) */
html body .role-bar { position: sticky; overflow: hidden; border-radius: 20px !important; padding: 12px 14px 16px !important; box-shadow: none !important;
  background: var(--role-c, var(--s-blue)) !important; color: var(--role-on, var(--s-cream)) !important; }
html body .role-bar::before { content: none !important; }
html body .role-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--s-strip) !important; }
html body .role-bar :is(b, small, span, .rb-txt) { color: var(--role-on, var(--s-cream)) !important; }
html body .role-bar .rb-ico { background: rgba(26, 14, 8, 0.1) !important; color: var(--role-on, var(--s-cream)) !important; border-radius: 14px !important; }
html body .role-bar :is(.rb-btn, .rb-out) { background: rgba(26, 14, 8, 0.12) !important; color: var(--role-on, var(--s-cream)) !important; box-shadow: none !important; border: 0 !important; }
html body .role-switch .rs-btn { background: var(--s-card) !important; color: var(--s-text) !important; border: 1.5px solid var(--s-line) !important; border-radius: 14px !important; box-shadow: none !important; }
html body.role-ui main .card { background: var(--s-card); border: 1px solid var(--s-line) !important; border-radius: 22px !important; box-shadow: none !important; animation: s-rise 340ms cubic-bezier(.2, .8, .2, 1) both; }
html body.role-ui section.card { border-top: 5px solid var(--role-c) !important; }
html body.role-ui main .card > h2:first-child { font-size: 24px; letter-spacing: -0.03em; color: var(--s-text) !important; background: none !important; -webkit-text-fill-color: currentColor; }
html body.role-ui main .card.dark { background: var(--s-blue) !important; color: var(--s-cream); border-color: var(--s-blue) !important; }
html body.role-ui main .card.dark :is(h1, h2, b, span, p) { color: var(--s-cream) !important; }
/* The tab bar: floating; the open screen in the job's colour */
html body.role-ui .tabs.admin-tabs { background: color-mix(in srgb, var(--s-card) 96%, transparent) !important; border: 1px solid var(--s-line) !important; border-radius: 24px !important; box-shadow: var(--s-lift) !important; }
html body.role-ui .tabs.admin-tabs [role="tab"] { background: transparent !important; color: var(--s-muted) !important; box-shadow: none !important; border: 0 !important; }
html body.role-ui .tabs.admin-tabs [role="tab"][aria-selected="true"] { background: var(--role-c) !important; color: var(--role-on, var(--s-cream)) !important; border-radius: 16px !important; }
/* The camera scanner stays dark in both modes (it reads well in bright halls), with corners in the four accents */
html body.role-ui #tabScan { background: #0A0A0A !important; color: #FEF6EB; border-color: #2B2B2B !important; }
html body.role-ui #tabScan > h2:first-child, html body.role-ui #tabScan :is(label, h2, h3, b, .small-print) { color: #FEF6EB !important; }
html body.role-ui #tabScan input { background-color: rgba(254, 246, 235, 0.08) !important; color: #FEF6EB !important; border-color: rgba(254, 246, 235, 0.22) !important; }
html body.role-ui #tabScan input::placeholder { color: rgba(254, 246, 235, 0.55); }
html body.role-ui #tabScan button.secondary { background: rgba(254, 246, 235, 0.08) !important; color: #FEF6EB !important; border-color: rgba(254, 246, 235, 0.25) !important; }
html body.role-ui #tabScan #reader { position: relative; min-height: 240px; border-radius: 20px; overflow: hidden; background: #000; }
html body.role-ui #tabScan #reader::before { content: ""; position: absolute; inset: 18px; z-index: 2; pointer-events: none; border-radius: 18px;
  background:
    linear-gradient(#F0A63A, #F0A63A) top left / 46px 5px no-repeat, linear-gradient(#F0A63A, #F0A63A) top left / 5px 46px no-repeat,
    linear-gradient(#C9D96B, #C9D96B) top right / 46px 5px no-repeat, linear-gradient(#C9D96B, #C9D96B) top right / 5px 46px no-repeat,
    linear-gradient(#E8643A, #E8643A) bottom left / 46px 5px no-repeat, linear-gradient(#E8643A, #E8643A) bottom left / 5px 46px no-repeat,
    linear-gradient(#C07A93, #C07A93) bottom right / 46px 5px no-repeat, linear-gradient(#C07A93, #C07A93) bottom right / 5px 46px no-repeat; }
@keyframes s-sweep { 0%, 100% { top: 22%; } 50% { top: 76%; } }
html body.role-ui #tabScan #reader::after { content: ""; position: absolute; z-index: 2; left: 34px; right: 34px; top: 48%; height: 3px; border-radius: 3px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #F0A63A, transparent); box-shadow: 0 0 18px #F0A63A; animation: s-sweep 2.6s ease-in-out infinite; }
/* Scan results: one strong colour, readable from a distance. Welcome = lime, check = orange, stop = red, VIP = Pass Blue */
@keyframes s-pop { from { opacity: 0; transform: translateY(40px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes s-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
html body .result:not([hidden]) { animation: s-pop 260ms cubic-bezier(.2, .8, .2, 1) both; }
html body .result.good { background: #C9D96B !important; color: #1A0E08 !important; }
html body .result.warn { background: #F0A63A !important; color: #1A0E08 !important; }
html body .result.bad { background: #B42318 !important; color: #FEF6EB !important; }
html body .result.vip { background: radial-gradient(70% 60% at 100% 0%, rgba(143, 163, 240, 0.4), transparent 60%), #0B2FA7 !important; color: #FEF6EB !important; }
html body .result:is(.good, .warn) :is(h1, h2, h3, b, p, span, small, .big) { color: #1A0E08 !important; }
html body .result:is(.bad, .vip) :is(h1, h2, h3, b, p, span, small, .big) { color: #FEF6EB !important; }
html body .result.bad:not([hidden]) .big, html body .result.warn:not([hidden]) .big { animation: s-shake 420ms ease 200ms both; }
html body .result .big { font-size: 40px; letter-spacing: -0.02em; }
html body .result button#rNext { min-height: 60px; min-width: 240px; border-radius: 18px !important; font-size: 19px; font-weight: 800;
  background: #1A0E08 !important; color: #FEF6EB !important; border-color: #1A0E08 !important; }
html body .result:is(.bad, .vip) button#rNext { background: #FEF6EB !important; color: #1A0E08 !important; border-color: #FEF6EB !important; }
html body .result:is(.warn, .bad)::before { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; font-size: 54px; font-weight: 900; margin: 0 auto 6px;
  background: rgba(254, 246, 235, 0.95); animation: s-pop 300ms cubic-bezier(.2, .8, .2, 1) both; }
html body .result.warn::before { content: "!"; color: #8A4B00; }
html body .result.bad::before { content: "✕"; color: #B42318; }

/* The priority-lane ribbon on a scan result (senior / PWD / pregnant): dark, so it shows on every result colour */
html body .result .r-pri { background: #1A0E08 !important; color: #FEF6EB !important; }
/* Event host page: the host's kind of group */
html body .host-tag { background: var(--s-warn-soft) !important; color: var(--s-warn) !important; }

/* ---------- Staff page with a sidebar (a login with every job, on a tablet or computer; 2026-11-25): like the admin
   page, the sidebar is the page colour, the open screen a white (dark: grey) pill, the Ubipass wordmark on top ---------- */
@media (min-width: 768px) {
  html body.has-side:not(.role-ui) { background: var(--s-page) !important; }
  html body.has-side:not(.role-ui) .admin-tabs { background: var(--s-page) !important; border-right: 1px solid var(--s-line); border-top: 0 !important; border-image: none !important; box-shadow: none !important; }
  html body.has-side:not(.role-ui) .admin-tabs::before { content: none !important; }
  html body.has-side:not(.role-ui) .side-brand { color: var(--s-text) !important; padding: 6px 10px 20px !important; }
  html body.has-side:not(.role-ui) .side-brand .u-logo { flex-direction: row !important; font-size: 22px !important; }
  html body.has-side:not(.role-ui) .side-brand .u-logo > span { display: inline; flex-direction: row; font-size: inherit; line-height: 1; color: var(--s-text); }
  html body.has-side:not(.role-ui) .side-brand .u-logo small { display: inline-block; margin-top: 0; color: var(--s-muted) !important; background: var(--s-soft) !important; }
  html body.has-side:not(.role-ui) .admin-tabs button { color: var(--s-muted) !important; background: transparent !important; border: 1px solid transparent !important;
    border-radius: 12px !important; box-shadow: none !important; font-weight: 650 !important; }
  html body.has-side:not(.role-ui) .side-home { color: var(--s-muted) !important; background: transparent !important; }
  html body.has-side:not(.role-ui) .side-home:hover { background: var(--s-hover) !important; color: var(--s-text) !important; }
  html body.has-side:not(.role-ui) .admin-tabs button:hover { background: var(--s-hover) !important; color: var(--s-text) !important; }
  html body.has-side:not(.role-ui) .admin-tabs button[aria-selected="true"], html body.has-side:not(.role-ui) .admin-tabs button[aria-selected="true"]:hover {
    background: var(--s-card) !important; color: var(--s-text) !important; font-weight: 800 !important; border-color: var(--s-line) !important; box-shadow: none !important; }
  html body.has-side:not(.role-ui) .admin-tabs button[aria-selected="true"] .nav-ico { color: var(--s-num); }
  html body.has-side:not(.role-ui) .topbar { background: color-mix(in srgb, var(--s-page) 88%, transparent) !important; border-bottom: 1px solid var(--s-line) !important; }
  html body.has-side:not(.role-ui) .page-head h1 { color: var(--s-text) !important; background: none !important; -webkit-text-fill-color: currentColor; }
  html body.has-side:not(.role-ui) .crumb { color: var(--s-muted) !important; }
  html body.has-side:not(.role-ui) #whoami { background: var(--s-card) !important; color: var(--s-text) !important; border-color: var(--s-line) !important; }
}

/* ---------- Entrance screen (door.html) ---------- */
html body.door { background: var(--s-page) !important; color: var(--s-text) !important; }
html body.door .door-wrap h1 { color: var(--s-text) !important; font-size: clamp(34px, 6.4vw, 64px); letter-spacing: -0.04em; }
html body.door .door-wrap :is(.en, .door-steps) { color: var(--s-muted) !important; }
html body.door #doorQr { background: #FFFFFF !important; border: 1px solid var(--s-line); border-radius: 24px; }
html body.door .door-meta span { background: var(--s-card) !important; border: 1px solid var(--s-line); color: var(--s-text); }
html body.door #doorBar { background: var(--s-soft) !important; }
html body.door #doorBar i { background: var(--s-num) !important; }
html body.door .door-wrap .about { color: var(--s-muted) !important; }

/* ---------- Live dashboard (live.html) ---------- */
html body :is(.kpi, .panel) { background: var(--s-card) !important; border: 1px solid var(--s-line); border-radius: 22px !important; box-shadow: none !important; color: var(--s-text); }
html body .kpi b { letter-spacing: -0.03em; color: var(--s-text); }
html body .kpi .bar { background: var(--s-soft) !important; }
html body .kpi .bar i { background: var(--s-bar) !important; }
html body .chart .col i { background: var(--s-bar) !important; }
html body .live-dot { color: var(--s-ok) !important; }
html body .live-dot i { background: var(--s-coral) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--s-coral) 25%, transparent); }
html body .slotbar { background: var(--s-soft) !important; }
html body .slotbar i.booked { background: color-mix(in srgb, var(--s-bar) 35%, var(--s-card)) !important; }
html body .slotbar i.present { background: var(--s-bar) !important; }
html body .gate-row em { background: var(--s-bar) !important; }
html body :is(.qrow, .recent li) { border-color: var(--s-rule) !important; }

/* ---------- "Now serving" TV (queue.html) ---------- */
html:has(body.tv), html:has(body.door) { background: var(--s-page) !important; }
html body.tv { background: var(--s-page) !important; color: var(--s-text) !important; }
html body.tv .tv-foot b { color: var(--s-text) !important; }
html body.tv .tv-head h1, html body.tv :is(.tv-lbl, .tv-meta, .tv-foot) { color: var(--s-muted) !important; }
html body.tv .tv-head .u-logo { font-size: clamp(24px, 2.6vw, 40px); }
html body.tv .tv-head .u-logo svg { width: 0.8em; height: 1em; }
html body.tv .tv-clock { color: var(--s-text); }
html body.tv .tv-svc { background: var(--s-card) !important; border: 1px solid var(--s-line); }
html body.tv .tv-svc h2 { color: var(--s-text) !important; }
html body.tv .tv-svc h2 b { background: var(--s-orange) !important; color: #1A0E08 !important; }
html body.tv .tv-svc:nth-child(4n+2) h2 b { background: var(--s-lime) !important; }
html body.tv .tv-svc:nth-child(4n+3) h2 b { background: var(--s-coral) !important; }
html body.tv .tv-svc:nth-child(4n+4) h2 b { background: var(--s-mauve) !important; }
html body.tv .tv-now div { background: var(--s-blue) !important; color: var(--s-cream) !important; }
html body.tv .tv-now div b { color: var(--s-cream); }
html body.tv .tv-now div span { color: rgba(254, 246, 235, 0.85) !important; }
html body.tv .tv-now div.fresh { background: var(--s-orange) !important; color: #1A0E08 !important; }
html body.tv .tv-now div.fresh :is(b, span) { color: #1A0E08 !important; }
html body.tv .tv-next { color: var(--s-text); }
html body.tv .tv-empty { color: var(--s-muted); }

/* ---------- Courts TV (courts.html): the same cards as the "Now serving" TV ---------- */
html body.tv :is(.tv-sess-h, .tv-court h2 small, .tv-free, .tv-line) { color: var(--s-muted) !important; }
html body.tv .tv-court { background: var(--s-card) !important; border: 1px solid var(--s-line); }
html body.tv .tv-court h2 { color: var(--s-text) !important; }
html body.tv .tv-court.fresh { box-shadow: 0 0 0 4px var(--s-orange) !important; }
html body.tv .tv-lvl { background: var(--s-orange) !important; color: #1A0E08 !important; }
html body.tv .tv-team { background: var(--s-soft) !important; color: var(--s-text) !important; }
html body.tv .tv-team .lbl { color: var(--s-num) !important; }
html body.tv .tv-team .bench { color: var(--s-muted) !important; }
html body.tv .tv-vs { color: var(--s-err) !important; }
html body.tv :is(.tv-note, .tv-next small) { color: var(--s-warn) !important; }

/* ---------- VIP entrance tablet (vip-door.html): the camera screen stays dark in both modes (door.html has its own
   #screen, so these rules only touch the one with the camera stage) ---------- */
html body.vipdoor, html body #screen:has(.vd-stage) { background: #000 !important; color: #FEF6EB !important; }
html body #screen:has(.vd-stage) .vd-top { background: rgba(254, 246, 235, 0.06) !important; }
html body #screen:has(.vd-stage) .vd-top .u-logo { color: #FEF6EB; }
html body #screen:has(.vd-stage) .vd-top .u-logo svg { stroke: #8FA3F0; }
html body #screen:has(.vd-stage) .vd-top .u-logo small { background: rgba(254, 246, 235, 0.12); color: #D9CDBE; }
html body #screen:has(.vd-stage) .vd-meta span { background: rgba(254, 246, 235, 0.12) !important; }
html body #screen:has(.vd-stage) .vd-stage::after { background: radial-gradient(ellipse 34% 44% at 50% 46%, transparent 0 96%, rgba(0, 0, 0, 0.62) 100%) !important; }
html body #screen:has(.vd-stage) .vd-oval.seen { border-color: #F0A63A !important; }
html body #screen:has(.vd-stage) .vd-oval.match { border-color: #C9D96B !important; box-shadow: 0 0 0 10px rgba(201, 217, 107, 0.25) !important; }
html body #screen:has(.vd-stage) .vd-say b { background: rgba(0, 0, 0, 0.8) !important; }
html body #screen:has(.vd-stage) :is(.vd-say small, .vd-bottom .lbl) { color: #D9CDBE !important; }
html body #screen:has(.vd-stage) .vd-welcome { background: radial-gradient(70% 60% at 100% 0%, rgba(143, 163, 240, 0.4), transparent 60%), #0B2FA7 !important; }
html body #screen:has(.vd-stage) .vd-welcome .ph { border-color: #F0A63A !important; background: #08237D !important; }
html body #screen:has(.vd-stage) .vd-welcome :is(.cat, .seat) { color: #F0A63A !important; }
html body #screen:has(.vd-stage) .vd-welcome h1 { color: #FEF6EB !important; }
html body #screen:has(.vd-stage) .vd-welcome :is(.org, .tl) { color: rgba(254, 246, 235, 0.85) !important; }
html body #screen:has(.vd-stage) .vd-welcome .ok { background: #C9D96B !important; color: #1A0E08 !important; }
html body #screen:has(.vd-stage) .vd-bottom { background: rgba(254, 246, 235, 0.06) !important; }
html body #screen:has(.vd-stage) .vd-recent > div { background: rgba(254, 246, 235, 0.1) !important; }
html body #screen:has(.vd-stage) .vd-recent button { background: rgba(254, 246, 235, 0.18) !important; color: #FEF6EB !important; }
html body #screen:has(.vd-stage) #loading { background: #000 !important; color: #FEF6EB !important; }

/* ---------- Check-in guide (guide.html): boxes in the page colours; printing is always light ---------- */
html body .g .box { background: var(--s-card) !important; border-color: var(--s-line) !important; color: var(--s-text); }
html body .g .rule { background: var(--s-err-soft) !important; border-color: var(--s-err) !important; }
/* The guide's samples of the scan results, in the same colours as the results themselves */
html body .g .sw.g1 { background: #C9D96B !important; color: #1A0E08 !important; }
html body .g .sw.a1 { background: #F0A63A !important; color: #1A0E08 !important; }
html body .g .sw.r1 { background: #B42318 !important; color: #FEF6EB !important; }
html body .g .sw.y1 { background: #1A0E08 !important; color: #FEF6EB !important; box-shadow: 0 0 0 1px var(--s-line); }
html body .g .sw.b1 { background: #0B2FA7 !important; color: #FEF6EB !important; }
/* ---------- The Ubipass GRO app on every device (2026-11-28, Chris: "make sure the gro app is fixed for all devices";
   drawn in Figma, page "GRO app on all devices", fixes 1 to 8). Tablets and laptops first; phones keep their look except
   fixes 1 and 2. Look only: nothing works differently. ---------- */

/* 1. Dark mode: the service list (Front GRO), the tables board and its tables (Internal GRO) and the VIP list kept
      fixed light boxes from styles.css, so their words (cream in dark mode) could not be read (1.1:1). They use the
      Ubipass colours now, light and dark. */
html body .cv-svc { background: var(--s-card) !important; border-color: var(--s-line) !important; color: var(--s-text); }
html body .cv-svc span { color: var(--s-text) !important; }
html body .cv-svc small { color: var(--s-muted) !important; }
html body .cv-svc:has(input:checked) { background: var(--s-ok-soft) !important; border-color: var(--s-ok) !important; }
html body .fl-svc { background: var(--s-card) !important; border-color: var(--s-line) !important; color: var(--s-text); }
html body :is(.fl-head > b, .fl-table b, .fl-row b, .fl-next summary, .fl-tools) { color: var(--s-text) !important; }
html body .fl-table { background: var(--s-soft) !important; color: var(--s-text); }
html body .fl-table.busy { background: var(--s-ok-soft) !important; border-color: var(--s-ok) !important; }
html body .fl-table.busy.late { background: var(--s-warn-soft) !important; border-color: var(--s-warn) !important; }
html body .fl-n { color: var(--s-muted) !important; }
html body .fl-stats span { background: var(--s-tint) !important; color: var(--s-text); }
html body .fl-row { border-top-color: var(--s-line) !important; }
html body .vip-row { background: var(--s-card) !important; border-color: var(--s-line) !important; color: var(--s-text); }
html body .vip-row.here { background: var(--s-tint) !important; }
html body .vip-row b { color: var(--s-text) !important; }

/* 2. In the app, the floating "☰ Menu" button (common.js) sat on top of the bottom menu on phones and hid its first tab
      (Check in, Help desk). The job screens don't show it: their coloured bar has Switch job and Sign out. With every
      job on a tablet or computer, the sidebar's "All tools" does the same. Elsewhere (VIP tablet, live) it stays, big
      enough for a finger; on the TV screens (queue, courts) it keeps its size, so it covers no more of the QR code. */
html.in-app body.role-ui .admin-menu { display: none !important; }
@media (min-width: 768px) { html.in-app body.has-side .admin-menu { display: none !important; } }
@media (pointer: coarse) { html.in-app body:not(.tv) .admin-menu { min-height: 48px; display: inline-flex; align-items: center; padding: 0 18px; } }

/* 3. "Report a problem" on a touch screen (tablets): the round flag button phones already have (52px) at the bottom
      right, and room at the end of the job screens so it never stays over a button. On a computer: the small label. */
@media (pointer: coarse) and (min-width: 768px) {
  html body .rp-btn { width: 52px !important; height: 52px !important; padding: 0 !important; border-radius: 50% !important; font-size: 0 !important;
    overflow: hidden; display: grid !important; place-items: center; right: 16px !important; bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important; }
  html body .rp-btn > * { display: none !important; }
  html body .rp-btn::before { content: ""; display: block; width: 22px; height: 22px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'/%3E%3Cpath d='M4 22v-7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'/%3E%3Cpath d='M4 22v-7'/%3E%3C/svg%3E") center / contain no-repeat; }
  html body.door-app main.wrap.wide { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* 4. Job screens on a tablet or computer: every box as wide as the column. The all-jobs layout's "align to the start"
      (styles.css, body.door-app #vMain) made each box only as wide as its words: the event-and-gate box under the gear
      took half the width, and the tables board stopped short of the coloured bar. */
@media (min-width: 768px) {
  html body.role-ui.door-app #vMain { align-items: stretch !important; }
}

/* 5. Wide screens (sideways tablets, laptops): one column of tools of at most 860px in the middle, with the coloured
      bar, the switch buttons and the menu the same width, and help text at most 70 letters a line (it ran to 150, and
      the main buttons were almost 1,000px wide). Internal GRO keeps a wide page (up to 1,400px) for its columns. */
@media (min-width: 1024px) {
  html body.role-ui:not([data-duty="internal_gro"]) main.wrap.wide { max-width: 860px !important; }
  html body.role-ui[data-duty="internal_gro"] main.wrap.wide { max-width: 1400px !important; }
  html body.role-ui #vMain :is(.small-print, section.card > p) { max-width: 70ch; }
  html body.role-ui .role-switch .rs-btn { flex: 0 1 260px; }
  html body.role-ui[data-duty="internal_gro"] .fl-board { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important; }
}

/* 6. Touch screens (tablets): every button on the job screens at least 48px high, as on phones (they fell back to
      the computer sizes: − and + 34px, Pause, Done and Call again 36 to 38px). */
@media (pointer: coarse) and (min-width: 768px) {
  html body.role-ui #vMain section.card :is(button, .btn):not(.chip) { min-height: 48px; }
  html body:is(.role-ui, .has-side) .fl-tools button { min-width: 52px; min-height: 48px !important; }
  html body.role-ui .fl-tools button { font-size: 18px !important; }
  html body:is(.role-ui, .has-side) :is(.fl-act, .fl-row) button { min-height: 48px !important; }
  html body.role-ui :is(.fl-act, .fl-row) button { padding: 0 16px !important; }
  html body.role-ui .fl-next summary { min-height: 48px; display: flex; align-items: center; }
}

/* 7. The job picker (and the signed-out "Who's signing in?") on a tablet or computer, in the app and in a browser: the
      event card across the top, "Or pick a job" above the jobs, the jobs as equal tiles in two columns, the guide as the
      same kind of tile ("Or pick a job" used to float beside the event card, the jobs were one long bar each in the app,
      and the guide a big tile of its own). The app keeps the Admin tile off. */
@media (min-width: 768px) {
  html body #vMenu:not([hidden]) { display: flex !important; flex-direction: column; }
  html body #vMenu .c-today { width: 100%; }
  html body :is(#vMenu, #vRoles) .role-grid, html.in-app body :is(#vMenu, #vRoles) .role-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 14px !important; }
  html body :is(#vMenu, #vRoles) .role-grid .role-tile, html.in-app body :is(#vMenu, #vRoles) .role-grid .role-tile {
    display: grid !important; grid-template-columns: 52px 1fr; column-gap: 14px; row-gap: 2px; align-items: center; min-height: 92px; padding: 16px 18px !important; }
  html body :is(#vMenu, #vRoles) .role-grid .role-tile[hidden] { display: none !important; }
  html body :is(#vMenu, #vRoles) .role-grid .role-tile .r-ico { grid-row: 1 / span 2; width: 52px; height: 52px; }
  html body :is(#vMenu, #vRoles) .role-grid .role-tile b { align-self: end; font-size: 19px; }
  html body :is(#vMenu, #vRoles) .role-grid .role-tile small { align-self: start; font-size: 14px; }
  html body #vMenu .c-tile { display: flex !important; flex-direction: row !important; align-items: center; gap: 14px; padding: 16px 18px; min-height: 92px; border-radius: 18px; }
  html body #vMenu .c-tile .c-ico { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; }
  html body #vMenu #mOut { align-self: flex-start; }
}
html.in-app body :is(#vMenu, #vRoles) .role-grid .role-tile.web-only { display: none !important; }

/* 8. Scan result on a tablet or computer: bigger words, to read at arm's length at the door (phones unchanged). */
@media (min-width: 768px) {
  html body .result #rBig { font-size: clamp(44px, 6vw, 72px) !important; }
  html body .result #rName { font-size: clamp(28px, 3.6vw, 40px) !important; }
  html body .result #rNote { font-size: 20px !important; }
  html body .result .r-pri { font-size: 16px !important; padding: 8px 16px !important; }
}

@media print {
  :root { color-scheme: light;
    --s-page: #FFFFFF; --s-card: #FFFFFF; --s-line: #D9CCB8; --s-rule: #EADFCC; --s-text: #1A0E08; --s-muted: #4F443A; --s-link: #0B2FA7; --s-num: #0B2FA7;
    --s-soft: #F2E8D9; --s-tint: #E7EBF8; --s-ok: #3F6212; --s-ok-soft: #EEF3D2; --s-err: #B42318; --s-err-soft: #FBE0D6; --s-warn: #8A4B00; --s-warn-soft: #FCEBCB; }
  html body { background: #FFFFFF !important; }
  html body .rp-btn { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html body *, html body *::before, html body *::after { animation: none !important; transition: none !important; }
}
