/* One appearance preference across the shared shell, terminal and accounting. */
:root{
    color-scheme: light;
    --bg:#eef3f8;--surface:#fff;--surface-2:#f7f9fc;--text:#172334;--muted:#66758a;--border:#d9e1eb;--brand:#18314f;--accent:#2f6da3;
    --bus-floor:#edf2f7;--bus-aisle:#dbe4ed;--bus-ink:#43566d;
    --seat-free:#f8fbff;--seat-new:#ffd9d9;--seat-processing:#ffe7bd;--seat-served:#d9eaff;--seat-paid:#d8f1df;--seat-ink:#18314f;
    --good-bg:#e4f5ea;--good-text:#25613c;--bad-bg:#ffe5e5;--bad-text:#8c2525;--warm-bg:#fff4e8;--warm-text:#8a4a17;--info-bg:#eaf1f7;--info-text:#245f96;
    --shadow:0 12px 34px rgba(25,49,79,.12);
}
html[data-theme="light"]{
    color-scheme: light;
    --bg:#eef3f8;--surface:#fff;--surface-2:#f7f9fc;--text:#172334;--muted:#66758a;--border:#d9e1eb;--brand:#18314f;--accent:#2f6da3;
    --bus-floor:#edf2f7;--bus-aisle:#dbe4ed;--bus-ink:#43566d;
    --seat-free:#f8fbff;--seat-new:#ffd9d9;--seat-processing:#ffe7bd;--seat-served:#d9eaff;--seat-paid:#d8f1df;--seat-ink:#18314f;
    --good-bg:#e4f5ea;--good-text:#25613c;--bad-bg:#ffe5e5;--bad-text:#8c2525;--warm-bg:#fff4e8;--warm-text:#8a4a17;--info-bg:#eaf1f7;--info-text:#245f96;
    --shadow:0 12px 34px rgba(25,49,79,.12);
}
html[data-theme="dark"]{
    color-scheme: dark;
    --bg:#0b1220;--surface:#111d2c;--surface-2:#182638;--text:#e5edf7;--muted:#a5b5c9;--border:#34475d;--brand:#315e87;--accent:#91bfee;
    --bus-floor:#172738;--bus-aisle:#0e1a28;--bus-ink:#b4c6d9;
    --seat-free:#263c51;--seat-new:#672d35;--seat-processing:#684a22;--seat-served:#234869;--seat-paid:#234c38;--seat-ink:#f0f5fb;
    --good-bg:#153526;--good-text:#a0ddb4;--bad-bg:#402027;--bad-text:#f3b1b5;--warm-bg:#3e2d1c;--warm-text:#edc08c;--info-bg:#19324d;--info-text:#a8cdef;
    --shadow:0 14px 36px rgba(0,0,0,.28);
}
@media(prefers-color-scheme:dark){html[data-theme="automatic"]{
    color-scheme: dark;
    --bg:#0b1220;--surface:#111d2c;--surface-2:#182638;--text:#e5edf7;--muted:#a5b5c9;--border:#34475d;--brand:#315e87;--accent:#91bfee;
    --bus-floor:#172738;--bus-aisle:#0e1a28;--bus-ink:#b4c6d9;
    --seat-free:#263c51;--seat-new:#672d35;--seat-processing:#684a22;--seat-served:#234869;--seat-paid:#234c38;--seat-ink:#f0f5fb;
    --good-bg:#153526;--good-text:#a0ddb4;--bad-bg:#402027;--bad-text:#f3b1b5;--warm-bg:#3e2d1c;--warm-text:#edc08c;--info-bg:#19324d;--info-text:#a8cdef;
    --shadow:0 14px 36px rgba(0,0,0,.28);
}}

html[data-theme] body{background:var(--bg);color:var(--text)}
html[data-theme] .bus-map{background:linear-gradient(90deg,var(--bus-floor) 0 43%,var(--bus-aisle) 43% 57%,var(--bus-floor) 57%);box-shadow:inset 0 0 0 3px var(--border)}
html[data-theme] .bus-map .bus-front{color:var(--bus-ink)}
html[data-theme] .bus-facility{background:var(--bus-aisle);color:var(--bus-ink);border-color:var(--border)}
html[data-theme] .bus-map .seat{color:var(--seat-ink)}
html[data-theme] .seat.seat-status-free{background:var(--seat-free)}
html[data-theme] .seat.seat-status-new{background:var(--seat-new)}
html[data-theme] .seat.seat-status-processing{background:var(--seat-processing)}
html[data-theme] .seat.seat-status-served{background:var(--seat-served)}
html[data-theme] .seat.seat-status-paid{background:var(--seat-paid)}
html[data-theme] .seat.selected{box-shadow:0 0 0 4px var(--surface),0 0 0 7px var(--accent)}
html[data-theme] .legend-dot.free{background:var(--seat-free)}
html[data-theme] .flash-success{background:var(--good-bg);color:var(--good-text)}
html[data-theme] .flash-error,html[data-theme] .form-error{background:var(--bad-bg);color:var(--bad-text)}
html[data-theme] .status-pill{background:var(--warm-bg);color:var(--warm-text)}
html[data-theme] .summary-count-open,html[data-theme] .seat-status-badge.seat-status-new,html[data-theme] .button-danger{color:var(--bad-text)}
html[data-theme] .summary-count-served,html[data-theme] .seat-status-badge.seat-status-served{color:var(--info-text)}
html[data-theme] .summary-count-paid,html[data-theme] .seat-status-badge.seat-status-paid{color:var(--good-text)}
html[data-theme] .seat-status-badge.seat-status-processing{color:var(--warm-text)}
html[data-theme] .order-terminal{--terminal-ink:var(--text);--terminal-border:var(--border)}
html[data-theme] .terminal-seat-card,html[data-theme] .terminal-quick-order,html[data-theme] .terminal-quick-main .terminal-scan-panel,
html[data-theme] .terminal-unlock-card,html[data-theme] .terminal-workspace-toolbar,html[data-theme] .terminal-back{background:var(--surface);color:var(--text);border-color:var(--border)}
html[data-theme] .terminal-seat-display,html[data-theme] .terminal-unlock-form input,html[data-theme] .terminal-keypad button,
html[data-theme] .terminal-basket-total,html[data-theme] .terminal-quick-next{background:var(--surface-2);color:var(--text);border-color:var(--border)}
html[data-theme] .terminal-seat-display input{color:var(--text)}
html[data-theme] .terminal-seat-display input::placeholder{color:var(--muted)}
html[data-theme] .terminal-seat-display label,html[data-theme] .terminal-eyebrow,html[data-theme] #terminal-seat-count,
html[data-theme] .terminal-seat-hint,html[data-theme] .terminal-basket-empty,html[data-theme] .terminal-basket-total small,
html[data-theme] .terminal-undo-hint,html[data-theme] .terminal-footer,html[data-theme] .terminal-quick-links button,
html[data-theme] .terminal-unlock-intro,html[data-theme] .terminal-unlock-footnote,html[data-theme] .terminal-password-login,
html[data-theme] .terminal-open-seat-hint,html[data-theme] .terminal-open-empty,
html[data-theme] .terminal-quick-main #terminal-scan-heading,html[data-theme] .terminal-quick-main #terminal-scan-heading small,
html[data-theme] .terminal-quick-main .terminal-scan-log{color:var(--muted)}
html[data-theme] .terminal-item-quantity{color:var(--text)}
html[data-theme] .terminal-basket-item,html[data-theme] .terminal-basket-total,html[data-theme] .terminal-password-login{border-color:var(--border)}
html[data-theme] .terminal-basket-item.is-last{background:var(--good-bg)}
html[data-theme] .is-delivered{color:var(--good-text)}
html[data-theme] .has-pending{color:var(--warm-text)}
html[data-theme] .terminal-quick-main #terminal-product-barcode{background:var(--good-bg);border-color:var(--border);color:var(--text)}
html[data-theme] .terminal-quick-main #terminal-product-barcode:disabled{background:var(--surface-2);border-color:var(--border);color:var(--muted)}
html[data-theme] .terminal-quick-main .terminal-scan-feedback.is-success,html[data-theme] .terminal-delivery-badge{background:var(--good-bg);color:var(--good-text);border-color:var(--border)}
html[data-theme] .terminal-quick-main .terminal-scan-feedback.is-error,html[data-theme] .terminal-quick-undo{background:var(--bad-bg);color:var(--bad-text);border-color:var(--border)!important}
html[data-theme] .terminal-quick-main .terminal-scan-feedback.is-pending,html[data-theme] .terminal-quick-open{background:var(--info-bg);color:var(--info-text);border-color:var(--border)!important}
html[data-theme] .terminal-delivery-badge.has-pending,html[data-theme] .terminal-quick-open.has-open-orders,
html[data-theme] .terminal-open-seat-badge,html[data-theme] .terminal-open-seat-card{background:var(--warm-bg);color:var(--warm-text);border-color:var(--border)!important}
html[data-theme] .terminal-open-seat-title>span,html[data-theme] .terminal-open-seat-card>small{color:var(--warm-text);border-color:var(--border)}
html[data-theme] .terminal-open-seat-card:hover,html[data-theme] .terminal-keypad button:hover{filter:brightness(1.12)}
html[data-theme] .terminal-quick-open>strong{background:var(--surface)}
html[data-theme] .terminal-workspace,html[data-theme] .terminal-frame-wrap iframe,html[data-theme] .terminal-frame-loading{background:var(--bg);color:var(--muted)}
html[data-theme] .terminal-error,html[data-theme] .terminal-seat-error{color:var(--bad-text)}
html[data-theme] #terminal-seat-count{border-color:var(--border)}
.settings-nav{display:flex;flex-wrap:wrap;gap:8px 18px;margin:0 0 22px;padding:14px 0;border-block:1px solid var(--border)}
.settings-nav a{color:var(--accent);font-weight:700;text-decoration:none;line-height:1.5}
.settings-form{max-width:650px}.settings-section-heading{margin-top:32px;font-size:1.25rem}
.settings-nav a:hover,.topnav a:hover{text-decoration:underline}
.settings-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.settings-actions form{margin:0}
.seat-access-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}
.seat-access-card{border:1px solid var(--border);background:var(--surface-2);border-radius:14px;padding:16px;min-width:0;display:grid;align-content:start;gap:12px}
.seat-access-card h3,.seat-access-card p{margin:0}.seat-access-card input[type=checkbox],.settings-checkbox input{width:20px;min-height:20px;height:20px}
.settings-checkbox{display:flex;align-items:center;gap:10px;line-height:1.5}
.travel-access-code{display:inline-block;font-size:1.7rem;font-weight:850;letter-spacing:.13em;padding:12px 16px;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;user-select:all}
.qr-sheet{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px}
.qr-label{background:#fff;color:#111;border:1px solid #ccc;padding:16px;text-align:center;break-inside:avoid}
.qr-label h2{font-size:1.2rem;margin:0 0 10px}.qr-label svg{width:180px;height:180px;max-width:100%;display:block;margin:auto}
.qr-label p{font-size:12px;margin:10px 0 0}.qr-error{color:#9b2424}
.guest-page{max-width:800px}.guest-session-note{padding:12px;background:var(--surface-2);border-radius:10px}
.guest-page h1,.guest-farewell,.seat-access-card{overflow-wrap:anywhere}
.guest-order{padding:16px;border:1px solid var(--border);border-radius:12px;margin-top:12px;background:var(--surface-2)}
@media print{
 html[data-theme],html[data-theme] body{background:#fff!important;color:#111!important;color-scheme:light!important}
 .topbar,.footer,.settings-nav,.print-tools{display:none!important}
 .qr-sheet{grid-template-columns:repeat(3,1fr);gap:10px}.qr-label{padding:10px}.qr-label svg{width:150px;height:150px}
}
