/* VPLAY GAME ZONE: black and red, from the logo. Chart colours are
   validated for colour-blind readers on this surface: red = gaming,
   blue = food. Status colours (playing/paused/time up) always come with a
   word, never colour alone; "time up" also pulses. */
:root {
    color-scheme: dark;
    --bg: #050506;
    --surface: #111114;
    --surface-2: #1a1a1f;
    --border: #2b2b32;
    --text: #f2f2f4;
    --text-2: #c2c2c9;
    --muted: #8c8c96;
    --accent: #e3262f;
    --accent-hover: #ff3b44;
    --accent-ink: #ffffff;
    --accent-soft: rgba(227, 38, 47, .14);
    --silver: #d9dbe0;
    --series-1: #e66767;
    --series-2: #3987e5;
    --gold: #e3b45e;
    --good: #2fbf71;
    --warn: #f0b429;
    --bad: #ff4d4d;
    --radius: 12px;
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; gap: 8px; }
.row.between { justify-content: space-between; gap: 8px; }
.row.center { align-items: center; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ---------- controls */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
label.inline { flex-direction: row; align-items: center; gap: 6px; }
.label { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
input, select, textarea {
    font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    padding: 9px 11px; min-width: 0; width: 100%;
}
label.inline input { width: auto; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input.invalid { border-color: var(--bad); }
.btn {
    font: inherit; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 9px; padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 40px; transition: background .12s, border-color .12s;
}
.btn:hover { border-color: #3a4250; background: #232935; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: transparent; border-color: #6a2226; color: #ff8b8b; }
.btn.danger:hover { background: #2a0d0f; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn.big { min-height: 48px; font-size: 16px; padding: 10px 18px; }
.btn.block { width: 100%; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--text); }
.chip { font: inherit; font-size: 13px; color: var(--text-2); background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip:hover { color: var(--text); border-color: #3a4250; }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.seg button { font: inherit; font-weight: 600; background: transparent; color: var(--text-2); border: 0; padding: 10px 16px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.active { background: var(--accent); color: var(--accent-ink); }

/* ---------- top bar */
.topbar {
    position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 10px 20px;
    background: rgba(5, 5, 6, .94); backdrop-filter: blur(8px); border-bottom: 1px solid #3a1215; box-shadow: 0 1px 0 rgba(227,38,47,.25); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.brand-logo { height: 46px; width: auto; display: block; mix-blend-mode: screen; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabs { display: flex; gap: 4px; }
.tabs button { font: inherit; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.badge-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.sound-btn.needs-tap { border-color: var(--warn); color: var(--warn); animation: pulse 1.6s ease-in-out infinite; }
.sound-btn.muted { color: var(--muted); }
.overtime-badge { background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; padding: 5px 10px; border-radius: 999px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.today { display: flex; gap: 18px; margin-left: auto; }
.today span { display: flex; flex-direction: column; line-height: 1.15; }
.today small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.today strong { font-size: 16px; }
.me { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.conn.on { background: var(--good); }
main { padding: 20px; max-width: 1440px; margin: 0 auto; }
@media (max-width: 760px) {
    .topbar { padding: 10px 16px; gap: 10px; }
    .today { margin-left: 0; order: 3; width: 100%; justify-content: space-between; }
    .me { margin-left: auto; }
    .tabs { order: 4; width: 100%; overflow-x: auto; }
    main { padding: 16px; }
}

/* ---------- floor */
.floor-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; }
.pill { padding: 4px 10px; border-radius: 999px; font-weight: 600; border: 1px solid var(--border); }
.pill.free { color: var(--text-2); }
.pill.running { color: var(--good); border-color: #1f5b3b; }
.pill.over { color: #fff; background: var(--accent); border-color: var(--accent); }
.pill.paused { color: var(--warn); border-color: #5e4a17; }
.console-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.console-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
    display: flex; flex-direction: column; gap: 12px; position: relative; min-height: 250px;
}
.console-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0; background: var(--border); }
.console-card.running::before { background: var(--good); }
.console-card.paused::before { background: var(--warn); }
.console-card.ending::before { background: var(--warn); }
.console-card.overtime { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 24px rgba(227,38,47,.35); animation: overglow 1.4s ease-in-out infinite; }
@keyframes overglow { 50% { box-shadow: 0 0 0 1px var(--accent), 0 0 6px rgba(227,38,47,.15); } }
.console-card.overtime::before { background: var(--bad); }
.console-card.private { background: linear-gradient(180deg, #24090b 0%, var(--surface) 60%); border-color: #4a1519; }
@media (max-width: 640px) { .console-card.free { min-height: 0; } .console-card.free .idle { flex: 0; } }
.console-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.console-card h3 { font-size: 18px; }
.rate { color: var(--muted); font-size: 13px; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-2); }
.badge.ps5 { color: var(--silver); border-color: #44444d; }
.badge.ps4 { color: #b4bccb; }
.badge.gold { color: #fff; background: var(--accent); border-color: var(--accent); }
.badge.tiny { font-size: 10px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }
.idle { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; flex: 1; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.who { font-size: 14px; }
.timer-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.timer { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.state { font-size: 13px; font-weight: 600; color: var(--good); }
.paused .state { color: var(--warn); }
.ending .state { color: var(--warn); }
.overtime .state { color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 6px; }
.progress { height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--good); }
.ending .progress span { background: var(--warn); }
.overtime .progress span { background: var(--bad); }
.charges { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; margin: 0; }
.charges div { background: var(--surface-2); border-radius: 8px; padding: 7px 10px; }
.charges dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.charges dd { margin: 0; font-weight: 650; font-size: 15px; }
.charges .total dd { font-size: 17px; }
.food-line { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: auto; }
.actions .btn { padding: 8px 6px; }

/* ---------- dialogs */
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; padding: 22px; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.modal-head p { margin-top: 4px; font-size: 14px; }
.food-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
@media (max-width: 640px) { .food-layout { grid-template-columns: 1fr; } }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 50vh; overflow: auto; }
.menu-item { font: inherit; text-align: left; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 64px; }
.menu-item:hover { border-color: var(--accent); }
.menu-item { position: relative; }
.menu-item.in-cart { border-color: var(--accent); background: var(--accent-soft); }
.qty-pill { position: absolute; top: 6px; right: 8px; font-style: normal; font-weight: 700; font-size: 12px; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 7px; }
.order-list li.off { color: var(--muted); }
.sent-head { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.ft-icon { display: inline-block; width: 1.2em; text-align: center; }
.ft-icon.declined, .ft-icon.cancelled { color: var(--bad); }
.ft-icon.served { color: var(--good); }
.bill-lines tr.sub-head td { color: var(--muted); font-size: 13px; border-bottom: 0; padding-bottom: 0; }
.menu-item strong { color: var(--text-2); font-size: 14px; }
.order-list { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.order-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.order-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.order-total { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; font-size: 16px; }
.bill-lines { width: 100%; border-collapse: collapse; }
.bill-lines td { padding: 8px 0; border-bottom: 1px solid var(--border); }
.bill-lines td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.bill-lines tr.food td { color: var(--text-2); }
.bill-lines tr.sub td { border-bottom: 0; font-weight: 700; }
.grand { font-size: 30px; }

/* ---------- receipt (screen and print) */
.receipt { background: #fff; color: #111; border-radius: 8px; padding: 18px; font-size: 13px; max-width: 340px; margin: 0 auto 16px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.receipt-logo { display: block; width: 150px; margin: 0 auto 8px; border-radius: 8px; }
.receipt h2 { text-align: center; font-size: 17px; margin-bottom: 4px; font-family: var(--font); }
.receipt > p { text-align: center; }
.receipt p.row { display: flex; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 10px 0; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 3px 0; vertical-align: top; }
.receipt td:last-child { text-align: right; white-space: nowrap; padding-left: 8px; }
.receipt tr.sub td { border-top: 1px dashed #999; padding-top: 6px; }
.receipt tr.grand td { font-size: 16px; font-weight: 700; border-top: 1px solid #111; padding-top: 6px; }
.receipt .void { color: #b00; font-weight: 700; }
#print-area { display: none; }
@media print {
    body > *:not(#print-area) { display: none !important; }
    #print-area { display: block; }
    #print-area .receipt { max-width: 72mm; padding: 0; margin: 0; }
    #print-area .receipt-logo { display: none; }
    @page { margin: 4mm; }
}

/* ---------- toast & tooltip */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 12px 18px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { border-color: #1f5b3b; }
.toast.warn { border-color: #6b5417; background: #2a2414; }
.toast.bad { border-color: var(--accent); background: #2a0d0f; }
.tooltip { position: fixed; z-index: 60; background: #0b0d11; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.tooltip i, .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }

/* ---------- toolbar, tables, kpis */
.toolbar input { width: auto; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
.table-wrap.tall { max-height: 60vh; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid #20252e; white-space: nowrap; }
.table.compact td { padding: 7px 8px; }
.table .num { text-align: right; }
.table .strong { font-weight: 650; }
#bills-table tbody tr { cursor: pointer; }
#bills-table tbody tr:hover { background: var(--surface-2); }
.table tr.void td { color: var(--muted); text-decoration: line-through; }
.table tr.off td { opacity: .55; }
.form-table td { padding: 6px 6px; }
.form-table input:not([type=checkbox]), .form-table select { padding: 7px 9px; }
.w-num { width: 90px !important; }
.w-cat { width: 130px !important; }
.rupee { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpis.small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.kpi strong { font-size: 22px; font-weight: 700; }
.kpi.hero strong { font-size: 28px; }
.kpi .sub { color: var(--text-2); font-size: 13px; }
.empty { color: var(--muted); padding: 30px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- charts */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .charts { grid-template-columns: minmax(0, 1fr); } }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chart-card.wide { grid-column: 1 / -1; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #232833; stroke-width: 1; }
.chart .axis { stroke: #3a4250; stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .s1, .s1 { fill: var(--series-1); background: var(--series-1); }
.chart .s2, .s2 { fill: var(--series-2); background: var(--series-2); }
.chart .hit:hover rect[fill=transparent] { fill: rgba(255,255,255,.04); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.split { display: flex; gap: 2px; height: 44px; border-radius: 6px; overflow: hidden; margin-top: 6px; }
.split span { display: flex; align-items: center; padding: 0 12px; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; min-width: 0; }
.barcell { width: 26%; min-width: 80px; }
.hbar { display: block; height: 10px; border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar[style*="width:0%"] { min-width: 0; }
.meter { display: inline-block; width: 60px; height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.meter span { display: block; height: 100%; background: var(--series-1); }
.hours { display: flex; gap: 4px; align-items: flex-end; height: 170px; overflow-x: auto; }
.hour { flex: 1; min-width: 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; cursor: default; }
.hour .hbox { flex: 1; width: 100%; display: flex; align-items: flex-end; border-radius: 4px; }
.hour:hover .hbox { background: rgba(255,255,255,.04); }
.hour .hbox span { display: block; width: 100%; border-radius: 4px 4px 0 0; min-height: 1px; }
.hour small { color: var(--muted); font-size: 10px; }
.heat { border-collapse: separate; border-spacing: 2px; font-size: 11px; width: 100%; }
.heat th { color: var(--muted); font-weight: 500; padding: 2px 4px; }
.heat td { height: 24px; min-width: 22px; border-radius: 3px; background: color-mix(in oklab, var(--series-1) calc(var(--v) * 100%), var(--surface-2)); }
.heat caption { caption-side: bottom; text-align: right; color: var(--muted); padding-top: 6px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.bar-row .label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { display: block; }
.bar-row .num { font-weight: 600; white-space: nowrap; }

/* ---------- bookings */
.tag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--silver); border: 1px solid #44444d; border-radius: 6px; padding: 1px 6px; }
.mode-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mode-tag { font-size: 12px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--silver); }
.mode-tag.option { background: var(--accent-soft); border-color: var(--accent); color: #fff; }
.food-tickets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--text-2); }
.food-tickets li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.food-tickets li.pending { color: var(--warn); }
.food-tickets li.declined, .food-tickets li.cancelled { color: var(--muted); text-decoration: line-through; }
.food-tickets small { color: var(--muted); }
.big-seg button { padding: 12px 16px; }
.booking-line { font: inherit; font-size: 13px; text-align: left; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.booking-line strong { color: var(--silver); }
.booking-line.urgent { border-color: #6b5417; background: #2a2414; }
.booking-line.urgent strong { color: var(--warn); }
.booking-line.late { border-color: #6b2b2b; background: #2a1616; }
.booking-line.late strong { color: var(--bad); }
.warn-note { color: var(--warn); font-size: 13px; }
.advance-row { flex-wrap: wrap; color: var(--text-2); border-top: 1px dashed var(--border); padding-top: 10px; }
fieldset.advance-box { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
fieldset.advance-box legend { font-size: 13px; color: var(--text-2); padding: 0 6px; }
.seg button:disabled { opacity: .5; cursor: default; }
input:disabled, select:disabled { opacity: .65; }
.status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); }
.status.booked { color: var(--silver); border-color: #44444d; }
.status.arrived { color: var(--good); border-color: #1f5b3b; }
.status.late { color: var(--bad); border-color: #6b2b2b; }
.status.cancelled, .status.no_show { color: var(--muted); }
#bk-timeline-card { margin-bottom: 16px; }
.timeline { min-width: 720px; display: flex; flex-direction: column; gap: 6px; }
.tl-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: stretch; }
.tl-label { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; justify-content: center; }
.tl-label small { color: var(--muted); font-weight: 400; font-size: 12px; }
.tl-track { position: relative; height: 46px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; cursor: copy; overflow: hidden; }
.tl-head .tl-track { height: 18px; background: none; border: 0; cursor: default; overflow: visible; }
.tl-hour { position: absolute; top: 0; font-size: 11px; color: var(--muted); transform: translateX(-2px); }
.tl-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: #1c2129; }
.tl-session { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(217,219,224,.10) 0 6px, transparent 6px 12px); border-left: 1px solid rgba(217,219,224,.25); }
.tl-booking { position: absolute; top: 4px; bottom: 4px; font: inherit; text-align: left; color: #fff; background: #4a1216; border: 1px solid var(--accent); border-radius: 6px; padding: 3px 7px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.tl-booking strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-booking span { font-size: 11px; color: #f0c4c6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-booking.arrived { background: #173b2a; border-color: #2a7a52; }
.tl-booking.late { background: #3d1c1c; border-color: #8a3434; }
.tl-booking.no_show { background: var(--surface-2); border-color: var(--border); color: var(--muted); text-decoration: line-through; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; }

/* ---------- settings */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .settings { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel.wide { grid-column: 1 / -1; }

/* ---------- login */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at top, #2a070a 0%, var(--bg) 62%); }
.login-logo { display: block; width: min(320px, 80%); height: auto; margin: -6px auto 0; mix-blend-mode: screen; }
.login-card { width: min(440px, 100%); background: rgba(17,17,20,.92); box-shadow: 0 0 0 1px #3a1215, 0 20px 60px rgba(227,38,47,.12); border: 1px solid var(--border); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card section { display: flex; flex-direction: column; gap: 14px; }
.staff-list { display: flex; flex-direction: column; gap: 8px; }
.staff-pick { font: inherit; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.staff-pick:hover { border-color: var(--accent); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: #fff; border: 1px solid var(--accent); font-weight: 700; }
.role-kitchen .avatar { background: #1a1a1f; border-color: #55555f; }
.who small { display: block; color: var(--muted); }
.pin-input { font-size: 28px; letter-spacing: .4em; text-align: center; padding: 12px; }
.error { color: #ff8b8b; min-height: 1.2em; font-size: 14px; }

/* ---------- kitchen screen */
.kitchen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: none; align-items: start; }
@media (max-width: 1000px) { .kitchen { grid-template-columns: minmax(0, 1fr); } }
.k-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 60vh; }
.k-col h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.k-col .count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 10px; font-size: 15px; min-width: 28px; text-align: center; }
.k-col .count:empty { display: none; }
.k-dot { width: 10px; height: 10px; border-radius: 50%; }
.k-dot.pending { background: var(--accent); }
.k-dot.accepted { background: var(--warn); }
.k-dot.done { background: var(--good); }
.k-list { display: flex; flex-direction: column; gap: 10px; }
.k-empty { color: var(--muted); text-align: center; padding: 30px 0; }
.k-ticket { background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.k-ticket.pending { border-left-color: var(--accent); }
.k-ticket.pending.late { box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(227,38,47,.3); }
.k-ticket.accepted { border-left-color: var(--warn); }
.k-ticket.served { border-left-color: var(--good); opacity: .75; }
.k-ticket.declined, .k-ticket.cancelled { opacity: .55; }
.k-ticket header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.k-no { font-size: 20px; }
.k-console { font-size: 17px; font-weight: 700; }
.k-age { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.k-ticket.pending.late .k-age { color: var(--bad); }
.k-meta { color: var(--muted); font-size: 13px; }
.k-lines { list-style: none; margin: 0; padding: 0; font-size: 18px; display: flex; flex-direction: column; gap: 4px; }
.k-note { color: var(--warn); font-size: 14px; }
.k-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.sound-banner { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; background: #2a0d0f; border-bottom: 1px solid var(--accent); text-align: center; }
body.flash { animation: flash .9s ease-out 2; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 0 rgba(227,38,47,0); } 30% { box-shadow: inset 0 0 0 8px rgba(227,38,47,.9); } 100% { box-shadow: inset 0 0 0 0 rgba(227,38,47,0); } }

.online-box { background: var(--surface-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--silver); }
.online-box.warn { border-left-color: var(--warn); }
.tl-booking.pending_email { background: #2a2a30; border-style: dashed; }
.status.pending_email { color: var(--warn); }
.status.expired { color: var(--muted); }
