:root {
  /* Sharkeys Sports Bar palette: brand blue #247EB2, button blue #4399CB, light blue #47B1EB, black and white. */
  --brand: #247eb2; --brand-ink: #ffffff; --brand-hi: #47b1eb;
  --bg: #eef4f8; --surface: #ffffff; --surface2: #e6eef4; --line: #cfdce6; --ink: #050505; --ink2: #3f4d57; --ink3: #66747e;
  --accent: #1b6a99; --accent-ink: #ffffff; --accent-soft: #dbeefa;
  --free: #157347; --free-bg: #e0f3e8; --use: #1b6a99; --use-bg: #dbeefa; --held: #8a5a00; --held-bg: #fbeed0;
  --event: #6a3fb5; --event-bg: #ece5f8; --shut: #55606a; --shut-bg: #e3e8ec; --danger: #b3261e; --danger-bg: #fbe4e2;
  --warn-bg: #fff1c2; --warn-ink: #6b4a00; --plan: #e3ecf2; --grid: #d3dfe8; --shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.10);
  --bar: #247eb2;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --surface: #101214; --surface2: #181b1e; --line: #2c3338; --ink: #f4f8fb; --ink2: #c2ccd3; --ink3: #8d9aa3;
  --accent: #47b1eb; --accent-ink: #000000; --accent-soft: #0f2a3a;
  --free: #5fcf98; --free-bg: #0f2a1a; --use: #47b1eb; --use-bg: #0f2a3a; --held: #efb955; --held-bg: #33270d;
  --event: #b7a0ee; --event-bg: #251d3f; --shut: #aab5bd; --shut-bg: #1c2024; --danger: #f2887f; --danger-bg: #391a18;
  --warn-bg: #3d3210; --warn-ink: #f2d27a; --plan: #0a0c0e; --grid: #1c2226; --shadow: 0 1px 2px rgba(0,0,0,.6), 0 6px 20px rgba(0,0,0,.6);
  --bar: #47b1eb; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #000000; --surface: #101214; --surface2: #181b1e; --line: #2c3338; --ink: #f4f8fb; --ink2: #c2ccd3; --ink3: #8d9aa3;
  --accent: #47b1eb; --accent-ink: #000000; --accent-soft: #0f2a3a;
  --free: #5fcf98; --free-bg: #0f2a1a; --use: #47b1eb; --use-bg: #0f2a3a; --held: #efb955; --held-bg: #33270d;
  --event: #b7a0ee; --event-bg: #251d3f; --shut: #aab5bd; --shut-bg: #1c2024; --danger: #f2887f; --danger-bg: #391a18;
  --warn-bg: #3d3210; --warn-ink: #f2d27a; --plan: #0a0c0e; --grid: #1c2226; --shadow: 0 1px 2px rgba(0,0,0,.6), 0 6px 20px rgba(0,0,0,.6);
  --bar: #47b1eb; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.4 "Maven Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-family: "Bebas Neue", Impact, "Arial Narrow", sans-serif; font-weight: 400; letter-spacing: .03em; text-transform: uppercase; }
h2 { font-size: 28px; } h3 { font-size: 21px; }
.muted { color: var(--ink2); } .small { font-size: 13px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--brand); color: var(--brand-ink); border-bottom: 3px solid var(--brand-hi); position: sticky; top: 0; z-index: 30; flex-wrap: wrap; }
.brand { font-family: "Bebas Neue", Impact, sans-serif; font-size: 28px; letter-spacing: .05em; text-transform: uppercase; margin-right: 6px; line-height: 1; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav button { border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: rgba(255,255,255,.97); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 13px; }
.nav button:hover { background: rgba(255,255,255,.16); }
.nav button[aria-current="page"] { background: #fff; color: var(--brand); }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.97); }
.topbar .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.topbar .btn:hover { background: rgba(255,255,255,.16); }
.topbar .btn:focus-visible, .nav button:focus-visible { outline-color: #fff; }
.topbar b { color: #fff; }
select.venuesel { padding: 7px 10px; border-radius: 8px; border: 1px solid #fff; background: #fff; color: #050505; font-weight: 700; }
main { padding: 16px; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h2 { margin-right: auto; }

/* ---------- controls ---------- */
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 13px; min-height: 38px; }
.btn:hover { background: var(--surface2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.primary { box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, .chip:focus-visible, .nav button:focus-visible, .tile:focus-visible, .linkbtn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.linkbtn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 2px 4px; font-size: 13px; }
input, select, textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); width: 100%; min-height: 38px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
textarea { min-height: 64px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field[hidden] { display: none; }   /* a field hidden by the page stays hidden (e.g. "Guests the room holds" for anything but a VIP room) */
.field .lbl { font-size: 13px; font-weight: 600; color: var(--ink2); }
.hint { font-size: 12px; color: var(--ink3); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; } .row > * { flex: 1; min-width: 110px; }
.row.tight > * { flex: 0 0 auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; font-weight: 600; color: var(--ink2); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 5px 11px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; }
.pickgroup { margin-bottom: 10px; } .pickhead { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
table.t { border-collapse: collapse; width: 100%; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--ink2); text-transform: uppercase; letter-spacing: .04em; padding: 8px; border-bottom: 1px solid var(--line); }
table.t td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.scroll-x { overflow-x: auto; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface2); color: var(--ink2); }
.pill.free { background: var(--free-bg); color: var(--free); } .pill.use { background: var(--use-bg); color: var(--use); }
.pill.held { background: var(--held-bg); color: var(--held); } .pill.event { background: var(--event-bg); color: var(--event); }
.pill.bad { background: var(--danger-bg); color: var(--danger); }
.banner { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); margin-bottom: 12px; font-weight: 600; }

/* ---------- dialogs ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; z-index: 100; }
.dialog { background: var(--surface); border-radius: 14px; padding: 20px; width: 100%; max-width: 480px; box-shadow: var(--shadow); }
.dialog.wide { max-width: 760px; } .dialog h2 { margin-bottom: 12px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.dlg-err { display: none; margin-top: 10px; padding: 9px 12px; border-radius: 8px; background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.toasts, #toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; width: min(92vw, 460px); }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; }
.toast.err { background: var(--danger); color: #fff; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 8px 0; } .kv dt { color: var(--ink2); } .kv dd { margin: 0; font-weight: 600; }
.paybox { text-align: center; padding: 10px; background: var(--surface2); border-radius: 10px; margin: 8px 0; }
.paybox .big { font-size: 34px; font-weight: 800; }

/* ---------- login ---------- */
.login { max-width: 380px; margin: 12vh auto; padding: 0 16px; }
.login .card { padding: 24px; } .login h1 { font-size: 24px; margin-bottom: 4px; }

/* ---------- alert bar ---------- */
.alertbar { display: none; gap: 8px; flex-wrap: wrap; padding: 8px 16px; background: #b3261e; color: #fff; font-weight: 700; }
.alertbar.show { display: flex; }
.alertbar .a { background: rgba(255,255,255,.18); border-radius: 8px; padding: 4px 10px; }
.alertbar.flash { animation: flashbar 1s steps(1) infinite; }
@keyframes flashbar { 0% { background: #b3261e; } 50% { background: #7a1712; } }
@keyframes flashtile { 0% { box-shadow: 0 0 0 4px var(--danger); background: var(--danger-bg); } 50% { box-shadow: 0 0 0 4px transparent; } }

/* ---------- tables page ---------- */
.summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.floor { margin-bottom: 22px; }
.floor-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.plan-wrap { overflow-x: auto; border-radius: 12px; }
.plan { position: relative; width: 100%; min-width: 760px; aspect-ratio: 24 / 14; background: var(--plan); border: 1px solid var(--line); border-radius: 12px;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: calc(100% / 24) calc(100% / 14); }
.plan.closed { opacity: .75; }
.tile { position: absolute; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); padding: 3px 5px; cursor: pointer; overflow: hidden; text-align: left; display: flex; flex-direction: column; justify-content: space-between; line-height: 1.15; font-size: 11.5px; user-select: none; touch-action: none; }
.tile .nm { font-weight: 800; font-size: 12.5px; display: flex; justify-content: space-between; gap: 4px; }
.tile .st { font-weight: 700; } .tile .sub { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.free { border-color: var(--free); background: var(--free-bg); } .tile.free .st { color: var(--free); }
.tile.use { border-color: var(--use); background: var(--use-bg); } .tile.use .st { color: var(--use); font-size: 14px; }
.tile.held { border-color: var(--held); background: var(--held-bg); } .tile.held .st { color: var(--held); }
.tile.event { border-color: var(--event); background: var(--event-bg); } .tile.event .st { color: var(--event); }
.tile.shut, .tile.out { border-color: var(--shut); background: var(--shut-bg); } .tile.shut .st, .tile.out .st { color: var(--shut); }
.tile.floorclosed { border-style: dashed; border-color: var(--shut); background: repeating-linear-gradient(45deg, var(--shut-bg), var(--shut-bg) 6px, transparent 6px, transparent 12px); } .tile.floorclosed .st { color: var(--shut); }
.tile.seat { border-radius: 14px; }
.tile.alert-warn { border-color: var(--held); box-shadow: 0 0 0 3px var(--held); }
.tile.alert-over { border-color: var(--danger); animation: flashtile 1s steps(1) infinite; }
.tile .ppflag { font-weight: 800; color: var(--danger); }
.tile.alert-warn .ppflag { color: var(--held); }
.tile.dragging-src { opacity: .4; } .tile.droptarget, .row-drop { outline: 3px solid var(--accent); outline-offset: 1px; }
.ghost { position: fixed; z-index: 500; pointer-events: none; background: var(--accent); color: var(--accent-ink); padding: 6px 10px; border-radius: 8px; font-weight: 700; box-shadow: var(--shadow); font-size: 13px; }

/* ---------- timeline ---------- */
.tl { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow-x: auto; margin-bottom: 18px; }
.tl-inner { position: relative; min-width: 900px; }
.tl-hours, .tl-row { display: grid; grid-template-columns: 120px 1fr; }
.tl-hours { border-bottom: 1px solid var(--line); background: var(--surface2); position: sticky; top: 0; }
.tl-hours .scale { position: relative; height: 26px; }
.tl-hours .hr { position: absolute; top: 5px; font-size: 12px; color: var(--ink2); transform: translateX(-50%); }
.tl-name { padding: 8px; font-weight: 700; font-size: 13px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; background: var(--surface); position: sticky; left: 0; z-index: 3; }
.tl-cells { position: relative; height: 44px; border-bottom: 1px solid var(--line); background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); }
.tl-row.closedfloor .tl-cells { background-color: var(--shut-bg); }
.blk { position: absolute; top: 4px; bottom: 4px; border-radius: 7px; padding: 2px 7px; font-size: 12px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: grab; border: 1px solid; touch-action: none; user-select: none; }
.blk.booked { background: var(--held-bg); color: var(--held); border-color: var(--held); }
.blk.arrived { background: var(--use-bg); color: var(--use); border-color: var(--use); }
.blk.done { background: var(--shut-bg); color: var(--shut); border-color: var(--shut); cursor: pointer; opacity: .7; }
.blk.noshow, .blk.cancelled { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); text-decoration: line-through; opacity: .7; }
.blk.event { background: var(--event-bg); color: var(--event); border-color: var(--event); cursor: pointer; }
.blk.shut { background: repeating-linear-gradient(45deg, var(--shut-bg), var(--shut-bg) 5px, transparent 5px, transparent 10px); color: var(--shut); border-color: var(--shut); cursor: pointer; }
.blk.live { background: var(--use-bg); color: var(--use); border-color: var(--use); border-style: dashed; cursor: pointer; }
.blk.moving { opacity: .75; box-shadow: var(--shadow); z-index: 20; }
.nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 4; pointer-events: none; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); margin-bottom: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid; margin-right: 4px; vertical-align: -2px; }

/* ---------- stats ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; } .kpi .l { font-size: 12px; color: var(--ink2); }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink2); font-size: 11px; } .chart .bar { fill: var(--bar); } .chart .axis { stroke: var(--line); } .chart .grid { stroke: var(--grid); stroke-dasharray: 2 3; }
.chart .bar:hover { filter: brightness(1.15); }
.tip { position: fixed; z-index: 400; pointer-events: none; background: var(--ink); color: var(--bg); padding: 5px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.charthead { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; } .charthead h3 { margin-right: auto; }

/* ---------- events / admin ---------- */
.evrow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.evrow .when { min-width: 150px; font-weight: 700; } .evrow .what { flex: 1; min-width: 200px; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 9px 14px; cursor: pointer; font-weight: 600; color: var(--ink2); border-bottom: 3px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.ov-card h3 { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 8px; }
.ov-line { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 0; }
.ov-alert { background: var(--danger-bg); color: var(--danger); font-weight: 700; padding: 5px 8px; border-radius: 8px; margin: 4px 0; font-size: 13px; }
.ov-alert.warn { background: var(--warn-bg); color: var(--warn-ink); }
.ov-alert.flash { animation: flashtile 1s steps(1) infinite; }
.empty { padding: 30px; text-align: center; color: var(--ink2); }

@media (prefers-reduced-motion: reduce) {
  .tile.alert-over, .alertbar.flash, .ov-alert.flash { animation: none; }
  .tile.alert-over { box-shadow: 0 0 0 5px var(--danger); background: var(--danger-bg); }
  .alertbar.flash { background: #b3261e; }
}
@media (max-width: 640px) { main { padding: 10px; } .topbar { padding: 8px 10px; } .tl-hours, .tl-row { grid-template-columns: 90px 1fr; } }
@media print { .topbar, .alertbar, #toasts, .btn { display: none !important; } }
select.venuesel { width: auto; }
.tile { min-width: 0; }
@media (max-width: 640px) {
  .nav { flex-wrap: nowrap; overflow-x: auto; order: 5; width: 100%; flex: 1 0 100%; }
  .nav button { white-space: nowrap; }
  .who { margin-left: auto; }
}

/* ---------- fonts ---------- */
.kpi .v, .paybox .big, .login h1 { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; letter-spacing: .02em; }
.kpi .v { font-size: 34px; } .paybox .big { font-size: 44px; }
.dialog h2 { font-size: 26px; }
.tile .nm { letter-spacing: .02em; }
table.t th { font-family: "Maven Pro", system-ui, sans-serif; }

/* ---------- event seat types and the seat sheet ---------- */
.evbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.seatsum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.dialog.wide:has(.sheet) { max-width: min(1180px, 100%); }

/* ---------- summary chips, opening hours, seat sheet additions ---------- */
/* hovering a table-type box */
.pill.kind { font-size: 11px; } .pill.kind.k-main { background: var(--event-bg); color: var(--event); } .pill.kind.k-party { background: var(--held-bg); color: var(--held); } .pill.kind.k-corporate { background: var(--use-bg); color: var(--use); } .pill.kind.k-league { background: var(--free-bg); color: var(--free); }
.tplrow { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.pvbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface2); }
.pvsubject { font-weight: 700; margin-bottom: 8px; word-break: break-word; }
.pvtext { white-space: pre-wrap; word-break: break-word; margin: 0; font: 14px/1.45 system-ui, sans-serif; max-height: 260px; overflow: auto; }
.pvframe { width: 100%; height: 320px; border: 0; background: #fff; border-radius: 6px; }
.confbox { margin-top: 10px; }
.fdbox { margin: 8px 0 12px; background: var(--surface2); }
.paylines { margin: 6px 0 4px; text-align: left; }
.themebtn { position: absolute; top: 10px; right: 14px; z-index: 6; min-width: 36px; font-size: 14px; }
.themebtn .ico { font-size: 16px; line-height: 1; }
@media (min-width: 641px) { .topbar { padding-right: 60px; } }
@media (min-width: 1401px) { .topbar { padding-right: 110px; } }
@media (max-width: 640px) { .themebtn { top: 6px; right: 8px; } .topbar { padding-right: 52px; } }
table.hours { max-width: 440px; }
table.hours td { padding: 4px 8px; } table.hours td.center { text-align: center; width: 70px; }
table.hours input[type=time] { min-height: 34px; }
table.hours tr.dayoff td:not(:nth-child(2)) { opacity: .5; }

/* Tiles: table name, customer, time, price so far — one size and weight, in that order */
.tile .trio { display: flex; flex-direction: column; gap: .1em; min-height: 0; }
.tile .trio > div { font-weight: 800; font-size: 1em; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--use); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; justify-content: space-between; gap: .3em; }
.tile .trio .tr-name { color: var(--ink); text-transform: none; }
.tile .t-pp { font-size: .7em; align-self: center; font-weight: 700; }
.tile.use { cursor: grab; }
/* Floor plan: type scales with the tile so it can be read from a distance */
.plan { container-type: inline-size; min-width: 1000px; }
.plan .tile { padding: .2em .35em; }
.plan .tile .nm, .plan .tile .st { font-size: 1em; }
.plan .tile .sub { font-size: .85em; }
.plan .tile.use .st { font-size: 1em; }

.checkline { display: flex; gap: 8px; align-items: center; margin: 4px 0 10px; font-weight: 700; cursor: pointer; }
.checkline input { width: auto; min-height: 0; }
.loy { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .62em; font-weight: 800; letter-spacing: .05em; vertical-align: middle; }
.tile .trio .tr-cust { justify-content: flex-start; align-items: center; }

/* ---------- usability pass ---------- */
.stickytop { position: sticky; top: 0; z-index: 30; }
.stickytop .topbar { position: static; }
.legend i.k-free { background: var(--free-bg); border-color: var(--free); } .legend i.k-use { background: var(--use-bg); border-color: var(--use); }
.legend i.k-held { background: var(--held-bg); border-color: var(--held); } .legend i.k-event { background: var(--event-bg); border-color: var(--event); }
.legend i.k-shut { background: var(--shut-bg); border-color: var(--shut); }
.legend .hint { margin-left: auto; }
.actstack { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.btn.big { min-height: 52px; font-size: 16px; width: 100%; }
.morerow { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.chip { min-height: 38px; padding: 6px 14px; }
.chip[aria-pressed="true"], .chip:active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (pointer: coarse) { .btn { min-height: 44px; } .btn.sm { min-height: 40px; } .nav button { padding: 11px 14px; } .seg button { padding: 10px 14px; } }
@media (max-width: 640px) {
  .backdrop { align-items: flex-end; padding: 0; }
  .dialog { max-width: none; border-radius: 16px 16px 0 0; max-height: 92vh; overflow-y: auto; padding-bottom: 24px; }
  .dlg-actions .btn { flex: 1; min-height: 48px; }
  .legend .hint { display: none; }
  .page-head { gap: 8px; }
}

/* ---------- design pass: running tables are the loud thing; everything else stays quiet ---------- */
:root { --tu-bg: #1b6a99; --tu-ink: #ffffff; --tu-dim: rgba(255,255,255,.82); --ta-bg: #b3261e; --ta-bg2: #7a1712; --ta-ink: #ffffff; --loy-bg: #ffffff; --loy-ink: #1b6a99; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tu-bg: #0f2a3a; --tu-ink: #47b1eb; --tu-dim: #8fcdf2; --ta-bg: #391a18; --ta-bg2: #5a2420; --ta-ink: #f2887f; --loy-bg: #47b1eb; --loy-ink: #000; } }
:root[data-theme="dark"] { --tu-bg: #0f2a3a; --tu-ink: #47b1eb; --tu-dim: #8fcdf2; --ta-bg: #391a18; --ta-bg2: #5a2420; --ta-ink: #f2887f; --loy-bg: #47b1eb; --loy-ink: #000; }
@keyframes flashfill { 0% { background: var(--ta-bg); } 50% { background: var(--ta-bg2); } }

.tile.use { background: var(--tu-bg); border-color: var(--tu-bg); color: var(--tu-ink); }
.tile.use .trio > div, .tile.use .trio .tr-name { color: var(--tu-ink); }
.tile.use .trio .tr-cust { color: var(--tu-dim); font-weight: 700; }
.tile.use .t-pp { color: var(--tu-dim); }
.tile.use .loy { background: var(--loy-bg); color: var(--loy-ink); }
.tile.use .ppflag { color: var(--tu-ink); }
/* the clock: scoreboard numerals */
.tile.use .trio .tr-time { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 1.7em; line-height: 1; letter-spacing: .03em; }
.tile.alert-warn { border-color: var(--held); box-shadow: 0 0 0 4px var(--held); }
.tile.alert-over { background: var(--ta-bg); border-color: var(--ta-bg); color: var(--ta-ink); animation: flashfill 1s steps(1) infinite; box-shadow: none; }
.tile.alert-over .trio > div, .tile.alert-over .trio .tr-name, .tile.alert-over .trio .tr-cust, .tile.alert-over .t-pp, .tile.alert-over .ppflag { color: var(--ta-ink); }
@media (prefers-reduced-motion: reduce) { .tile.alert-over { animation: none; background: var(--ta-bg); box-shadow: 0 0 0 5px var(--ta-bg2); } }
/* free tables recede */
.tile.free { background: var(--surface); }
.tile.free .st { font-weight: 600; }

/* ---------- other pages ---------- */
.datenav { display: inline-flex; gap: 6px; align-items: center; }
.datenav input[type=date] { min-width: 150px; }
.datenav .btn { min-width: 40px; }
.empty p { margin: 0 0 12px; }
.empty .btn { margin: 0 auto; }
/* timeline: banded rows, clear table names */
.tl-row:nth-child(even) .tl-cells { background-color: color-mix(in srgb, var(--surface2) 55%, transparent); }
.tl-name { font-size: 14px; }
.tl-name .hint { font-weight: 600; font-size: 12px; }
.tl-hours .hr { font-weight: 600; }
/* statistics numbers read at a glance */
.kpi { padding: 14px; } .kpi .l { margin-top: 2px; font-size: 13px; }
/* admin: opening hours in a compact two-column block */
table.hours td { padding: 2px 6px; } table.hours td input[type=time] { min-height: 32px; padding: 3px 6px; width: 118px; }
table.hours { max-width: 400px; }
table.hours input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.tabs button { padding: 11px 16px; font-size: 15px; }
@media (max-width: 640px) {
  .brand { font-size: 22px; margin-right: 0; }
  .topbar { gap: 6px 10px; padding: 8px 10px; }
  .who span { display: none; }
  .who .btn { padding: 2px 8px; min-height: 30px; font-size: 12px; }
  .alertbar { flex-wrap: nowrap; overflow-x: auto; padding: 6px 10px; gap: 6px; }
  .alertbar .a { white-space: nowrap; flex: 0 0 auto; }
  .nav { mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .page-head h2 { flex: 1 0 100%; margin-right: 0; font-size: 26px; }
  .datenav { width: 100%; } .datenav input[type=date] { flex: 1; }
  .page-head > .btn { flex: 1; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .g2 { grid-template-columns: 1fr; }
  table.hours { max-width: none; }
}
.grid > * { min-width: 0; }
@media (max-width: 640px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs button { white-space: nowrap; padding: 10px 12px; font-size: 14px; }
  table.hours td input[type=time] { width: 100px; }
  .dialog, .card { min-width: 0; }
}
@media (max-width: 640px) { table.hours input[type=time]::-webkit-calendar-picker-indicator { display: none; } table.hours td input[type=time] { width: 96px; font-size: 14px; } }
table.t th.right, table.t td.right { text-align: right; }

/* the running clock never grows wider than its tile (rotated tables are narrow) */
.plan .tile.use .trio .tr-time { font-size: 1.3em; white-space: nowrap; overflow: hidden; }

/* ---------- menu icons ---------- */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.nav button { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 640px) { .nav button { flex-direction: column; gap: 2px; padding: 6px 12px; font-size: 11px; } .ico { width: 22px; height: 22px; } }
@media (min-width: 641px) and (max-width: 900px) { .nav button { padding: 8px 9px; } }

/* floor plan editor: resize grip */
@media (min-width: 641px) { .nav { flex-wrap: nowrap; } .nav button { padding: 8px 10px; gap: 6px; white-space: nowrap; } }
@media (min-width: 641px) and (max-width: 1400px) { .who > span { display: none; } }

/* ---------- booking emails ---------- */
.mailstrip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.mailstrip.err { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.mailstrip .grow { flex: 1; min-width: 180px; }
.mailrow { padding: 10px 0; border-bottom: 1px solid var(--line); }
.mailtop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mailtop .muted { margin-left: auto; }
pre.code { background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: 13px; margin: 6px 0; }

/* ---------- customers: badges, page ---------- */
.cb { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: .64em; font-weight: 800; letter-spacing: .05em; line-height: 1.5; vertical-align: middle; white-space: nowrap; color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.45); }
.cb.new { background: #1f8f55; }
.cb.returning { background: #0f7f86; }
.cb.regular { background: #7446b5; }
.cb.top { background: #f2b300; color: #3a2a00; }
.cb.bl { background: #c62828; }
.cb.vip { background: #111; color: #f2c230; box-shadow: 0 0 0 1px #f2c230; }
.blk .cb, .tile .cb { font-size: .7em; padding: 0 5px; margin: 0 4px 0 0; }
.tile .tr-cust .cb, .tile .sub .cb { margin-left: 5px; }
.badgekey { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12px; color: var(--muted); margin-left: 8px; }
.badgekey .cb { margin-left: 0; font-size: 11px; box-shadow: none; }
.banner.bl { background: #fde4e1; color: #7f1710; border: 1px solid #e8a39b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner.bl { background: #3b1613; color: #ffb4ab; border-color: #7a2c26; } }
:root[data-theme="dark"] .banner.bl { background: #3b1613; color: #ffb4ab; border-color: #7a2c26; }
.headtools { display: flex; flex-wrap: wrap; gap: 8px; }
.headtools .search { min-width: 240px; }
@media (max-width: 640px) { .headtools { width: 100%; } .headtools .search { flex: 1; min-width: 0; } }
.custchips { margin: 4px 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.custchips .chip b { margin-left: 4px; }
/* data requests */
.pvform { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 14px; align-items: end; }
.pvbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pvbar .spacer { flex: 1; }
.pvrow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; border-top: 1px solid var(--line); cursor: pointer; }
.pvrow input { width: 22px; height: 22px; margin-top: 2px; }
.blbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.blbox input { width: 22px; height: 22px; accent-color: #c62828; }
@media (min-width: 641px) and (max-width: 1500px) and (pointer: fine) { .nav { gap: 2px; } .nav button { padding: 8px 8px; font-size: 12.5px; letter-spacing: .02em; } .nav .ico { margin-right: 4px; } .topbar { gap: 8px; } }
@media (min-width: 641px) and (max-width: 1400px) and (pointer: fine) { .brand { font-size: 26px; } .nav button { padding: 8px 6px; font-size: 12px; } .nav .ico { width: 16px; height: 16px; margin-right: 3px; } .who .btn.sm { padding: 6px 9px; font-size: 11px; } .who { gap: 6px; } }

/* ---------- customers: picker in the booking form ---------- */
.custpick { position: relative; }
.custpick-res { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.custpick-res:empty { display: none; }
.custpick-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; min-height: 44px; cursor: pointer; }
.custpick-row:hover, .custpick-row:focus-visible { background: var(--accent-soft); border-color: var(--accent); outline: none; }
.custpick-row .cb { margin-left: 0; }
.custmatch { margin: -2px 0 10px; font-size: 13px; color: var(--ink2); }

/* ---------- dialogs with their own header (bare) ---------- */
.dialog.bare { padding: 0; }
.dialog.bare .dlg-err { margin: 10px 24px 0; }
.dlg-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--line); margin-top: 6px; }
.dlg-foot .dlg-actions { margin: 0 0 0 auto; }
.dlg-note { font-size: 13px; color: var(--ink3); }

/* ---------- customer profile (design B) ---------- */
.cp-head { background: var(--surface2); padding: 22px 24px 0; border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); }
.cp-top { display: flex; align-items: center; gap: 16px; }
.cp-avatar { flex: none; width: 60px; height: 60px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-family: "Bebas Neue", Impact, sans-serif; font-size: 28px; letter-spacing: .04em; }
.cp-id { flex: 1; min-width: 0; }
.cp-namerow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 4px; }
.dialog h2.cp-name { margin: 0 6px 0 0; font-size: 32px; line-height: 1; overflow-wrap: anywhere; }
.cp-badges .cb { margin: 0 6px 0 0; font-size: 11px; }
.cp-badges .loy { margin-left: 0; font-size: 11px; padding: 1px 8px; }
.cp-contact { margin-top: 6px; color: var(--ink2); font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.cp-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cp-edit { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cp-edit .field { margin: 0; }
.cp-editbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cp-editbar .hint { flex: 1; min-width: 180px; }
.cp-editwrap .banner { margin: 12px 0 0; }
.cp-tabs { display: flex; gap: 22px; margin-top: 16px; }
.cp-tab { border: 0; background: none; padding: 10px 2px; min-height: 44px; font-weight: 700; font-size: 14px; color: var(--ink3); border-bottom: 3px solid transparent; cursor: pointer; }
.cp-tab:hover { color: var(--ink); }
.cp-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.cp-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.cp-panel { padding: 20px 24px 8px; min-height: 340px; }
.cp-panel-in { display: flex; flex-direction: column; gap: 22px; }
.cp-h { font-size: 20px; margin: 0 0 10px; }
.cp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cp-stat { background: var(--surface); padding: 12px 14px; min-width: 0; }
.cp-stat-l { font-size: 12px; color: var(--ink3); }
.cp-stat-v { font-size: 20px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-togs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cp-tog { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); font-weight: 700; font-size: 14px; cursor: pointer; text-align: left; }
.cp-tog:hover { border-color: var(--ink3); }
.cp-tog:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cp-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink3); box-sizing: border-box; }
.cp-tog[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.cp-tog[aria-pressed="true"] .cp-dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-soft); }
.cp-tog.gold[aria-pressed="true"] { border-color: var(--held); background: var(--held-bg); }
.cp-tog.gold[aria-pressed="true"] .cp-dot { border-color: var(--held); background: var(--held); box-shadow: inset 0 0 0 3px var(--held-bg); }
.cp-tog.red[aria-pressed="true"] { border-color: var(--danger); background: var(--danger-bg); }
.cp-tog.red[aria-pressed="true"] .cp-dot { border-color: var(--danger); background: var(--danger); box-shadow: inset 0 0 0 3px var(--danger-bg); }
.cp-toghint { margin: 8px 0 0; }
.cp-lno { max-width: 340px; margin-top: 12px; }
.cp-cards { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.cp-cards .linkbtn { align-self: flex-start; }
.cp-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; color: inherit; font: inherit; width: 100%; }
button.cp-card { cursor: pointer; } button.cp-card:hover { border-color: var(--accent); }
button.cp-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cp-date { flex: none; width: 46px; text-align: center; display: flex; flex-direction: column; }
.cp-date span { font-size: 11px; font-weight: 800; color: var(--accent); letter-spacing: .05em; }
.cp-date b { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 30px; line-height: 1; }
.cp-when { flex: 1; min-width: 0; }
.cp-empty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; }
.cp-hist td { vertical-align: middle; }
.cp-notelbl { display: block; margin-bottom: 6px; }
textarea.cp-note { min-height: 140px; }
.cp-notefoot { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }
@media (max-width: 640px) {
  .cp-head { padding: 18px 16px 0; border-radius: 16px 16px 0 0; }
  .cp-top { flex-wrap: wrap; }
  .cp-avatar { width: 48px; height: 48px; font-size: 22px; }
  .cp-acts { width: 100%; justify-content: stretch; } .cp-acts .btn { flex: 1; }
  .cp-edit { grid-template-columns: 1fr; flex-basis: 100%; }
  .cp-panel { padding: 16px; }
  .cp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-togs { grid-template-columns: 1fr; }
  .dlg-foot { padding: 12px 16px; } .dlg-foot .dlg-actions { margin: 0; width: 100%; }
}

/* ---------- booking pop-ups (design 3): summary rail + form ---------- */
.dialog.xwide { max-width: 1100px; }
.bk-split { display: flex; align-items: stretch; }
.bk-rail { width: 340px; flex: none; box-sizing: border-box; padding: 22px; background: var(--surface2); border-right: 1px solid var(--line); border-radius: 14px 0 0 0; display: flex; flex-direction: column; gap: 18px; }
.bk-main { flex: 1; min-width: 0; padding: 22px 26px 8px; display: flex; flex-direction: column; gap: 20px; }
.bk-title { font-size: 28px; margin: 0; }
.bk-sec { display: flex; flex-direction: column; gap: 8px; }
.bk-sec .field { margin-bottom: 0; }
.bk-sec .row { margin-bottom: 0; }
.bk-h { font-size: 21px; margin: 0; }
.bk-sub { margin: -4px 0 0; }
.bk-cap { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink3); }
.bk-rail .bk-sec { border-top: 1px solid var(--line); padding-top: 16px; gap: 10px; }
.bk-when { display: flex; align-items: center; gap: 14px; }
.bk-date { flex: none; width: 64px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 7px 0 6px; display: flex; flex-direction: column; line-height: 1.1; }
.bk-date span { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--accent); }
.bk-date b { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 34px; line-height: 1; }
.bk-date small { font-size: 11px; font-weight: 700; color: var(--ink3); }
.bk-time { font-family: "Bebas Neue", Impact, sans-serif; font-size: 30px; letter-spacing: .03em; line-height: 1; }
.bk-pills { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bk-pills .cb { margin-left: 0; font-size: 11px; }
.bk-acts { display: flex; flex-direction: column; gap: 8px; }
.bk-acts2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bk-acts .btn { justify-content: center; min-height: 44px; }
.bk-wide { width: 100%; }
.bk-note { margin: 0; font-size: 13px; color: var(--ink2); }
.bk-cust { display: flex; flex-direction: column; gap: 10px; }
.bk-cust-top { display: flex; align-items: center; gap: 12px; }
.bk-av { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-family: "Bebas Neue", Impact, sans-serif; font-size: 20px; letter-spacing: .04em; }
.bk-cust-name { font-size: 16px; overflow-wrap: anywhere; }
.bk-cust-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.bk-cust-badges .cb, .bk-cust-badges .loy { margin: 0; font-size: 10px; }
.bk-cust-badges .loy { padding: 1px 7px; }
.bk-cust-contact { font-size: 14px; color: var(--ink2); display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.bk-cust-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.bk-rail .custmatch { margin: 0; }
.bk-rail .banner { margin: 0; font-size: 13px; }
.bk-detail-link { align-self: flex-start; padding: 2px 0; text-align: left; }
.bk-details { display: flex; flex-direction: column; gap: 8px; }
.bk-details[hidden], .bk-detail-link[hidden] { display: none; }
.bk-mail .field { margin: 0; } .bk-mail .field > .lbl { display: none; }
.bk-ok { font-size: 13px; color: var(--free); font-weight: 600; }
.bk-log { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.bk-log .kv { margin: 0; }
.bk-head { display: flex; align-items: center; gap: 14px; background: var(--surface2); padding: 20px 22px; border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); }
.bk-head-id { min-width: 0; }
.dialog h2.bk-head-name { margin: 2px 0 4px; font-size: 28px; line-height: 1; overflow-wrap: anywhere; }
.bk-head-name .cb { font-size: 11px; vertical-align: middle; }
.bk-body { padding: 18px 22px 4px; }
@media (max-width: 820px) {
  .bk-split { flex-direction: column; }
  .bk-rail { width: auto; border-right: 0; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 18px 16px; }
  .bk-main { padding: 18px 16px 8px; }
  .bk-head { border-radius: 16px 16px 0 0; padding: 18px 16px; } .bk-body { padding: 16px 16px 4px; }
}
.bk-mail:has(.confbox:empty) { display: none; }
.bk-rail .pill:not(.held):not(.use):not(.bad) { background: var(--surface); border: 1px solid var(--line); }


/* ---------- customer list (design 1): one row per customer, the whole row opens the profile ---------- */
.cl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 4px; }
.cl-title h1 { margin: 0; }
.cl-title .small { margin-top: 4px; }
.cl { padding: 0; overflow: hidden; }
.cl-row { display: grid; grid-template-columns: minmax(0, 3fr) 90px 120px 130px 100px minmax(0, 1.4fr) 20px; gap: 12px; align-items: center; padding: 10px 18px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; width: 100%; }
button.cl-row { cursor: pointer; min-height: 60px; }
button.cl-row:hover { background: var(--surface2); }
button.cl-row:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.cl-row.isbl { background: var(--danger-bg); }
.cl-row:last-of-type { border-bottom: 0; }
.cl-th { background: var(--surface2); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); min-height: 0; padding-top: 11px; padding-bottom: 11px; }
.cl-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cl-av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: "Bebas Neue", Impact, sans-serif; font-size: 17px; letter-spacing: .04em; }
.cl-av.bl { background: var(--danger); color: #fff; }
.cl-id { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-namerow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.cl-namerow .cb { margin: 0; font-size: 10px; }
.cb.loy { background: var(--accent); color: var(--accent-ink); }
.cl-contact, .cl-note { font-size: 13px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-ns { display: block; font-size: 12px; color: var(--danger); }
.cl-go { font-size: 20px; color: var(--ink3); text-align: right; }
.cl-foot { padding: 12px 18px; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .cl-row { grid-template-columns: minmax(0, 1fr) 70px 80px 16px; }
  .cl-opt { display: none; }
}
.cl-head .headtools { align-items: center; }
.cl-head .headtools .search { width: 300px; }
.cl-head .headtools select { width: auto; }
.cl-head { margin-bottom: 12px; }
@media (max-width: 640px) { .cl-head .headtools .search { flex: 1 1 100%; width: auto; } .cl-head .headtools select { flex: 1; } .cl-av { display: none; } .cl-row { padding-left: 14px; padding-right: 12px; } }
.cb.whale { background: #0b2f4a; color: #7fd3ff; box-shadow: 0 0 0 1px #2f8fce; }


/* ---------- Tables page: head, floor plan with side panel (plan view), board (cards view) ---------- */
.tb-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.tb-head h2 { margin-right: 4px; }
.tb-pills { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.tb-pill { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink2); }
.tb-pill b { color: var(--ink); }
.tb-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.tb-dot.k-use { background: var(--use); } .tb-dot.k-free { background: var(--free); } .tb-dot.k-held { background: var(--held); } .tb-dot.k-event { background: var(--event); } .tb-dot.k-closed { background: var(--shut); }
.tb-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tb-hours { white-space: nowrap; }
.tb-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.tb-plans { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tb-floor { margin: 0; padding: 12px 14px 14px; }
.tb-floor .floor-head h3 { margin: 0; }
.tb-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.tb-rail { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 92px); overflow-y: auto; }
.tb-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.tb-cap { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tb-h { font-size: 21px; margin: 0; }
.tb-sub { margin: 4px 0 0; font-size: 13px; color: var(--ink2); }
.tb-attn { border-color: var(--held); background: var(--held-bg); } .tb-attn .tb-cap { color: var(--held); }
.tb-attn.over { border-color: var(--danger); background: var(--danger-bg); } .tb-attn.over .tb-cap { color: var(--danger); }
.tb-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-acts .btn { flex: 1 1 auto; }
.tb-none { border-style: dashed; color: var(--ink2); }
.tb-sel { padding: 0; overflow: auto; gap: 0; }   /* auto, not hidden: on small screens the buttons at the bottom could be cut off */
.tb-sel-head { position: relative; background: var(--surface2); padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tb-sel-name { font-size: 28px; margin: 4px 0 2px; }
.tb-x { position: absolute; top: 10px; right: 10px; font-size: 16px; min-width: 32px; min-height: 32px; }
.tb-sel .tb-detail { padding: 14px 16px; }
.st-use { color: var(--use); } .st-free { color: var(--free); } .st-held { color: var(--held); } .st-event { color: var(--event); } .st-shut, .st-out, .st-floorclosed { color: var(--shut); }
.tb-detail { display: flex; flex-direction: column; gap: 10px; }
.tb-detail p { margin: 0; }
.tb-who { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.tb-who .cb, .tb-who .loy { margin: 0; font-size: 10px; }
.tb-live { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.tb-clock { font-family: "Bebas Neue", Impact, sans-serif; font-size: 42px; line-height: 1; letter-spacing: .03em; color: var(--use); }
.tb-cost b { font-size: 20px; }
.tb-pp { display: flex; flex-direction: column; gap: 4px; }
.tb-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tb-bar b { display: block; height: 100%; width: 0; background: var(--use); }
.tb-detail .morerow, .tb-play .morerow { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.warn { background: var(--danger); border-color: var(--danger); color: #fff; }
.tb-leg { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit; padding: 8px 10px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: grab; touch-action: none; }
.tb-leg.held { border-color: var(--held); background: var(--held-bg); }
.tb-leg-who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-leg .cb { margin: 0; font-size: 10px; }
.tile.sel { outline: 3px solid var(--ink); outline-offset: 2px; z-index: 4; }
.plan .tile .trio > div, .plan .tile .nm, .plan .tile .st, .plan .tile .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan .tile .trio .tr-cust > span:first-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* board */
.tb-boardwrap { display: flex; flex-direction: column; gap: 14px; }
.tb-floors { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.tb-floorchip { display: inline-flex; align-items: center; gap: 6px; }
.tb-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--held); background: var(--held-bg); }
.tb-banner .tb-cap { color: var(--held); } .tb-banner.over { border-color: var(--danger); background: var(--danger-bg); } .tb-banner.over .tb-cap { color: var(--danger); }
.tb-banner-who { flex: 1; min-width: 200px; }
.tb-board { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tb-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tb-colhead { display: flex; align-items: center; gap: 8px; font-size: 22px; margin: 0; }
.tb-play, .tb-due { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tb-play { border-color: var(--use); cursor: grab; touch-action: none; }
.tb-play.alert-warn { border-color: var(--held); box-shadow: 0 0 0 3px var(--held); }
.tb-play.alert-over { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger); }
.tb-play.dragging-src { opacity: .4; }
.tb-play-top { display: flex; align-items: center; gap: 8px; }
.tb-play-name { font-size: 18px; flex: 1; }
.tb-play-top .ppflag { color: var(--danger); font-weight: 800; }
.tb-play-mid { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-play-mid .tb-clock { font-size: 38px; }
.tb-play-cost { font-size: 18px; flex: 1; }
.tb-due.held { border-color: var(--held); background: var(--held-bg); }
.tb-due[class] { touch-action: none; }
.tb-due-top { display: flex; align-items: baseline; gap: 10px; }
.tb-due-time { font-family: "Bebas Neue", Impact, sans-serif; font-size: 30px; line-height: 1; }
.tb-due.held .tb-due-time { color: var(--held); }
.tb-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tb-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.tb-row:last-child { border-bottom: 0; }
.tb-row.droptarget { outline: 3px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.tb-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 0; background: none; color: inherit; font: inherit; padding: 6px 4px; min-height: 44px; cursor: pointer; }
.tb-row-main .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tb-empty { padding: 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink3); text-align: center; }
@media (max-width: 1100px) { .tb-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tb-board > :first-child { grid-column: 1 / -1; } }
@media (max-width: 899px) { .tb-split { grid-template-columns: minmax(0, 1fr); } .tb-rail { position: static; max-height: none; } .tb-rail .tb-none { display: none; } }
@media (max-width: 700px) { .tb-board { grid-template-columns: minmax(0, 1fr); } .tb-pills { flex-basis: 100%; order: 3; } }
/* Cards view: floor sections with table cards in rows and columns, "Coming up today" alongside */
.tb-cards { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.tb-floorsecs { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tb-fsec { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.tb-fhead { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface2); }
.tb-fname { margin: 0; font-size: 24px; }
.tb-fcounts { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--ink2); }
.tb-fcounts span { display: inline-flex; align-items: center; gap: 5px; }
.tb-fcounts .tb-dot { width: 9px; height: 9px; }
.tb-fhead > .btn { margin-left: auto; }
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 14px; }
.tb-tile { border: 1px solid var(--line); border-top: 5px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 150px; background: var(--surface); min-width: 0; }
.tb-tile.k-use { border-top-color: var(--use); background: color-mix(in srgb, var(--use-bg) 45%, var(--surface)); cursor: grab; touch-action: none; }
.tb-tile.k-free { border-top-color: var(--free); }
.tb-tile.k-held { border-top-color: var(--held); background: color-mix(in srgb, var(--held-bg) 45%, var(--surface)); }
.tb-tile.k-closed { border-top-color: var(--shut); opacity: .75; }
.tb-tile.alert-warn { box-shadow: 0 0 0 3px var(--held); } .tb-tile.alert-over { box-shadow: 0 0 0 3px var(--danger); }
.tb-tile.droptarget { outline: 3px solid var(--accent); outline-offset: 2px; }
.tb-tile.dragging-src { opacity: .4; }
.tb-tile-top { display: flex; align-items: baseline; gap: 6px; }
.tb-tile-name { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 18px; font-weight: 800; color: inherit; cursor: pointer; }
.tb-tile-name:hover { text-decoration: underline; }
.tb-tile-top .ppflag { color: var(--danger); font-weight: 800; }
.tb-tile-st { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.k-use .tb-tile-st { color: var(--use); } .k-free .tb-tile-st { color: var(--free); } .k-held .tb-tile-st { color: var(--held); } .k-closed .tb-tile-st { color: var(--shut); }
.tb-tile-live { display: flex; align-items: baseline; gap: 10px; }
.tb-tile-live .tb-clock { font-size: 38px; }
.tb-tile .pp-chip { align-self: flex-start; }
.tb-tile-acts { margin-top: auto; padding-top: 4px; }
.tb-uprail { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 92px); overflow-y: auto; }
@media (max-width: 1100px) { .tb-cards { grid-template-columns: minmax(0, 1fr); } .tb-uprail { position: static; max-height: none; } }
@media (max-width: 520px) { .tb-grid { grid-template-columns: minmax(0, 1fr); padding: 10px; } .tb-tile { min-height: 0; } .tb-fhead > .btn { margin-left: 0; } }
/* plan tiles show name, customer and clock only (badges are in the side panel); next to the panel the plan may be narrower */
.plan .tile .tr-cust .cb, .plan .tile .tr-cust .loy, .plan .tile .sub .cb { display: none; }
.tb-split .plan { min-width: 620px; }
.tb-leg { flex-wrap: wrap; row-gap: 4px; }
.tb-leg-who { flex: 1 1 60%; }

/* ---------- Start timer: Quick start ---------- */
.qs-head { background: var(--surface2); padding: 18px 22px; border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); }
.dialog h2.qs-title { font-size: 30px; margin: 2px 0; }
.qs-body { padding: 18px 22px 6px; display: flex; flex-direction: column; gap: 16px; }
.qs-sec { display: flex; flex-direction: column; gap: 10px; }
.qs-who { display: flex; flex-direction: column; gap: 6px; }
.qs-search { min-height: 52px; font-size: 17px; }
.qs-card { padding: 12px 14px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 10px; }
.qs-card .bk-cust-top > div:not(.bk-av) { flex: 1; min-width: 0; }
.qs-named { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.qs-named b { flex: 1; }
.qs-asname { color: var(--ink2); }
.qs-loy { width: 100%; }
.qs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qs-quick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 76px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; padding: 6px; }
.qs-quick b { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 26px; letter-spacing: .03em; line-height: 1; }
.qs-quick span { font-size: 12px; color: var(--ink3); }
.qs-quick:hover { border-color: var(--accent); }
.qs-quick:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.qs-quick.main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.qs-quick.main span { color: var(--accent-ink); opacity: .8; }
.qs-other { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.qs-other[hidden] { display: none; }
@media (max-width: 640px) { .qs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qs-head { border-radius: 16px 16px 0 0; padding: 16px; } .qs-body { padding: 16px 16px 6px; } }

/* ---------- New event / event window: design "Event 2 · Summary rail + form" ---------- */
.ev-title { font-size: 30px; margin: 4px 0 0; overflow-wrap: anywhere; }
.ev-kinds { display: flex; flex-direction: column; gap: 8px; }
.ev-kind { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; min-height: 56px; }
.ev-kind b { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 22px; letter-spacing: .03em; line-height: 1; }
.ev-kind span { font-size: 12px; color: var(--ink3); }
.ev-kind:hover { border-color: var(--event); }
.ev-kind[aria-pressed="true"] { border-color: var(--event); background: var(--event-bg); }
.ev-kind[aria-pressed="true"] b { color: var(--event); }
.ev-kind:focus-visible, .ev-floor:focus-visible, .ev-pk:focus-visible, .ev-box:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ev-line { font-size: 14px; overflow-wrap: anywhere; }
.ev-floors { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ev-floor { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; min-height: 72px; }
.ev-floor > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev-floor b { font-size: 16px; }
.ev-floor[aria-pressed="true"] { border-color: var(--event); background: var(--event-bg); }
.ev-floor.some { border-style: dashed; border-color: var(--event); }
.ev-box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--ink3); box-sizing: border-box; background: none; cursor: pointer; padding: 0; position: relative; }
.ev-floor[aria-pressed="true"] .ev-box, .ev-seat.on .ev-box { background: var(--event); border-color: var(--event); }
.ev-floor[aria-pressed="true"] .ev-box::after, .ev-seat.on .ev-box::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--surface); font-size: 13px; font-weight: 800; }
.ev-floor.some .ev-box { background: linear-gradient(var(--event), var(--event)) center / 10px 2px no-repeat; border-color: var(--event); }
.ev-seats { display: flex; flex-direction: column; gap: 8px; }
.ev-seat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.ev-seat.on { border-color: var(--event); }
.ev-seats .ev-seat.on { background: var(--event-bg); }
.ev-seat-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ev-step { flex: none; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 18px; cursor: pointer; }
.ev-step:disabled { opacity: .4; cursor: default; }
.ev-num { width: 64px; text-align: center; min-height: 38px; }
.ev-count { width: 34px; text-align: center; font-size: 16px; }
.ev-seat-total { margin: 0; }
.ev-pkgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ev-pk { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.ev-pk b { font-size: 14px; } .ev-pk span { font-size: 12px; color: var(--ink3); }
.ev-pk[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ev-kitchen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ev-kitchen .ev-seat.on { border-color: var(--line); }
.chip.ev-add { border-style: dashed; }
.bk-main section[hidden] { display: none; }
@media (max-width: 760px) { .ev-pkgs, .ev-kitchen { grid-template-columns: 1fr; } }

/* ---------- seat sheet and seating template: design "Seat sheet 2 · Map + side panel" ---------- */
.ss-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 20px 24px 16px; background: var(--surface2); border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.ss-head > div:first-child { flex: 1; min-width: 220px; }
.ss-name { font-size: 30px; margin: 4px 0 2px; overflow-wrap: anywhere; }
.ss-totals { display: flex; flex-wrap: wrap; gap: 6px; }
.ss-split { display: flex; align-items: stretch; }
.ss-left { flex: 1; min-width: 0; padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.ss-left .bk-cap { margin-top: 8px; } .ss-left .bk-cap:first-child { margin-top: 0; }
.ss-left .hint { margin: 0; }
.ss-panel { width: 380px; flex: none; box-sizing: border-box; padding: 20px 22px; background: var(--surface2); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.ss-title { font-size: 28px; margin: 8px 0 2px; }
.pill.ss-rowpill, .pill.ss-p-row { background: var(--event-bg); color: var(--event); }
.pill.ss-p-table { background: var(--free-bg); color: var(--free); }
.pill.ss-p-room { background: var(--held-bg); color: var(--held); }
.ss-rowpill { flex: none; min-width: 52px; justify-content: center; text-align: center; }
.ss-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; width: 100%; box-sizing: border-box; }
button.ss-row { cursor: pointer; } button.ss-row:hover { border-color: var(--event); }
.ss-row.sel { border-color: var(--event); background: var(--event-bg); }
.ss-row-name { width: 120px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.ss-dots { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; }
.ss-dots i { width: 18px; height: 18px; border-radius: 6px 6px 3px 3px; border: 2px solid var(--event); opacity: .45; box-sizing: border-box; }
.ss-dots i.on { background: var(--event); opacity: 1; }
.ss-dots i.gap { margin-left: 10px; }   /* where one sofa or block of a joined row ends and the next begins */
.ss-meter { flex: 1; }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--event); }
.meter.k-table i { background: var(--free); } .meter.k-room i { background: var(--held); }
.ss-meter-line { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.ss-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ss-tiles.rooms { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ss-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 12px; border: 1px solid var(--free); background: var(--free-bg); color: var(--ink); font: inherit; text-align: left; min-height: 78px; box-sizing: border-box; }
button.ss-tile { cursor: pointer; }
.ss-tile.room { border-color: var(--held); background: var(--held-bg); }
.ss-tile.taken { background: var(--surface); }
.ss-tile.taken b { color: var(--ink2); }
.ss-tile.sel { outline: 3px solid var(--accent); outline-offset: 2px; }
.ss-row:focus-visible, .ss-tile:focus-visible, .ss-group-main:focus-visible, .ss-tog:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ss-groups { display: flex; flex-direction: column; gap: 8px; }
.ss-group { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ss-group.editing { border-color: var(--accent); }
.ss-group-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.ss-group-main:hover { background: var(--surface2); }
.ss-group .dep { font-size: 11px; font-weight: 800; color: var(--free); white-space: nowrap; }
.x { background: none; border: 0; color: var(--ink3); cursor: pointer; font-size: 18px; width: 32px; height: 32px; border-radius: 8px; flex: none; }
.x:hover { background: var(--danger-bg); color: var(--danger); }
.ss-form { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.ss-form .field, .ss-form .row { margin-bottom: 0; }
.ss-form .field[hidden] { display: none; }
.ss-guests { display: flex; align-items: center; gap: 10px; }
.ss-guests > span { flex: 1; display: flex; flex-direction: column; }
.ss-tog { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; padding: 4px 0; align-self: flex-start; }
.ss-tog i { width: 38px; height: 22px; border-radius: 11px; background: var(--line); position: relative; flex: none; }
.ss-tog i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink3); transition: left .15s; }
.ss-tog.on i { background: var(--free); } .ss-tog.on i::after { left: 19px; background: var(--surface); }
.ss-err { color: var(--danger); font-size: 13px; font-weight: 600; } .ss-err:empty { display: none; }
.ss-admin { padding: 0; overflow: hidden; }
.ss-ed-rows { display: flex; flex-direction: column; gap: 8px; }
.ss-ed { display: flex; align-items: center; gap: 6px; }
.ss-ed input:not(.ev-num) { flex: 1; min-width: 0; }
.ss-note { border-top: 1px solid var(--line); padding-top: 12px; }
.ss-note .hint { margin: 4px 0 0; }
@media (max-width: 860px) { .ss-split { flex-direction: column; } .ss-panel { width: auto; border-left: 0; border-top: 1px solid var(--line); } .ss-row-name { width: 96px; } }
.ss-admin .ss-panel { width: 470px; }
.ss-ed .ev-num { width: 58px; }
@media (max-width: 860px) { .ss-admin .ss-panel { width: auto; } }

/* Cards view: free / closed tables grouped by floor */
.tb-fgroups { display: flex; flex-direction: column; gap: 14px; }
.tb-fgroup { display: flex; flex-direction: column; gap: 6px; }
.tb-fhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px 4px; border-bottom: 1px solid var(--line); }
.tb-fhead b { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink2); }
.tb-fcount { font-size: 12px; color: var(--ink3); white-space: nowrap; }

/* ---------- walk-outs ---------- */
.cb.wo { background: #7a1712; color: #fff; box-shadow: 0 0 0 1px #e0574d; }
.wo-owed { color: var(--danger); font-weight: 700; }
tr.wo-row td { background: var(--danger-bg); }
.kpi.kpi-bad { border-color: var(--danger); background: var(--danger-bg); }
.kpi.kpi-bad .v { color: var(--danger); }
.cp-walkout { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--danger); background: var(--danger-bg); color: var(--danger); margin-top: 12px; }
.cp-walkout span { color: var(--ink2); font-size: 13px; }
.wo-sum { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--danger); background: var(--danger-bg); margin-bottom: 14px; }
.wo-amt { font-family: "Bebas Neue", Impact, sans-serif; font-size: 40px; line-height: 1; color: var(--danger); }
.wo-new { margin-top: 10px; }

/* ---------- logo ---------- */
.brand.has-logo { display: flex; align-items: center; }
.brand-logo { display: block; height: 36px; width: auto; max-width: 220px; object-fit: contain; }
@media (max-width: 640px) { .brand-logo { height: 28px; max-width: 150px; } }
.lg-previews { margin: 12px 0; max-width: 640px; }
.lg-sample { display: flex; flex-direction: column; gap: 6px; }
.lg-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 10px; min-height: 60px; box-sizing: border-box; }
.lg-bar { background: var(--brand); color: var(--brand-ink); border-bottom: 3px solid var(--brand-hi); }
.lg-text { font-family: "Bebas Neue", Impact, sans-serif; font-size: 28px; letter-spacing: .05em; text-transform: uppercase; }
.lg-nav { font-size: 12px; font-weight: 700; opacity: .8; text-transform: uppercase; letter-spacing: .04em; }
.lg-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lg-actions input[type=file] { max-width: 100%; }

/* ---------- prepaid tables: teal hourglass, a teal edge, and a countdown pill under the time played ---------- */
:root { --pp: #0b7f78; --pp-bg: #d9f3f0; --pp-edge: #19c2b2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pp: #2dd4bf; --pp-bg: #0d2b29; --pp-edge: #2dd4bf; } }
:root[data-theme="dark"] { --pp: #2dd4bf; --pp-bg: #0d2b29; --pp-edge: #2dd4bf; }
.pp-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; background: var(--pp-bg); color: var(--pp); border: 1px solid var(--pp); white-space: nowrap; }
/* the countdown: a solid pill, readable on a blue playing tile, a card or the side panel */
.t-cd:empty { display: none; }
.tile .trio .tr-cd, .tb-cd { align-self: flex-start; display: inline-flex; padding: .08em .5em; border-radius: 999px; background: var(--pp); color: var(--surface); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile .trio .tr-cd { font-size: .72em; line-height: 1.25; justify-content: flex-start; margin-top: .1em; }
.tile.use .trio .tr-cd { color: var(--surface); }
.tile .trio .tr-cd.cd-warn, .tb-cd.cd-warn { background: var(--held); color: var(--surface); }
.tile .trio .tr-cd.cd-over, .tb-cd.cd-over, .tile.alert-over .trio .tr-cd { background: var(--danger); color: var(--surface); }
.tile.alert-over .trio .tr-cd { background: var(--ta-ink); color: var(--ta-bg); }
.tb-cd { font-size: 15px; letter-spacing: .02em; padding: 2px 10px; }
/* a teal edge marks a prepaid table (the amber / red alert outlines take over when time is nearly or fully up) */
.tile.pp:not(.alert-warn):not(.alert-over) { border-color: var(--pp-edge); box-shadow: inset 6px 0 0 var(--pp-edge); }
.tb-play.pp:not(.alert-warn):not(.alert-over) { border-color: var(--pp-edge); box-shadow: inset 6px 0 0 var(--pp-edge); }
.tile.pp .pp-ico { margin-left: .3em; font-size: .9em; }
.plan .tile.use.pp .trio .tr-time { font-size: min(1.4em, max(var(--clk, 1.4em), 9px)); }
.tb-clockcol { display: flex; flex-direction: column; gap: 4px; }
.tb-pp .t-bar { background: var(--pp); }
.tb-play-top .pp-chip, .tb-who .pp-chip { margin-left: 2px; }
.badgekey .pp-chip { margin-right: 2px; }
.tb-play-name { white-space: nowrap; }
@media (max-width: 640px) { .tb-play-top .pp-chip { font-size: 9px; padding: 1px 6px; } }

/* ---------- No table yet (bookings waiting for a table) ---------- */
.tl { --tl-name: 120px; }
@media (max-width: 640px) { .tl { --tl-name: 90px; } }
.tl.lb { border: 2px dashed var(--held); background: repeating-linear-gradient(135deg, var(--held-bg) 0 12px, color-mix(in srgb, var(--held-bg) 55%, var(--surface)) 12px 24px); }
.tl.lb .tl-hours { background: color-mix(in srgb, var(--held-bg) 80%, var(--surface)); }
.tl.lb .tl-hours .tl-name, .tl.lb .tl-row .tl-name { background: color-mix(in srgb, var(--held-bg) 70%, var(--surface)); color: var(--held); }
.tl.lb .tl-cells { background-color: transparent !important; }
.tl.lb.row-drop { outline: 3px solid var(--held); outline-offset: 2px; }
.lb-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--held) 40%, transparent); background: color-mix(in srgb, var(--held-bg) 85%, var(--surface)); position: sticky; left: 0; }
.lb-title { color: var(--held); font-size: 15px; letter-spacing: .02em; }
.lb-sub { font-weight: 700; color: var(--ink2); font-size: 13px; }
.lb-warn { font-weight: 800; font-size: 13px; color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger); border-radius: 999px; padding: 1px 10px; }
.lb-help { margin-left: auto; }
.lb-row .tl-cells { height: 46px; }
.lb-row .tl-name .lb-bump { color: var(--danger); font-weight: 800; text-transform: uppercase; font-size: 11px; }
.lb-row .tl-name .lb-none { color: var(--danger); font-weight: 800; }
.lb-empty { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 14px; font-size: 13px; color: var(--ink2); font-weight: 600; }
.blk.limbo { background: var(--held-bg); color: var(--held); border: 2px dashed var(--held); cursor: pointer; display: flex; align-items: center; gap: 4px; }
.blk.limbo .lb-tm { font-weight: 600; opacity: .85; overflow: hidden; text-overflow: ellipsis; }
.blk.limbo.bump { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.blk.limbo.sel, .blk.slot:hover { box-shadow: 0 0 0 3px var(--accent); }
.blk.slot { background: transparent; border: 2px dashed var(--ink2); color: var(--ink); cursor: pointer; text-align: center; z-index: 5; }
.blk.slot:hover { background: var(--accent-soft); border-color: var(--accent); }
.lb-say { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -8px 0 14px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--held); background: var(--held-bg); color: var(--ink); }
.lb-say > span { flex: 1 1 260px; }
.nt-tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; border: 1.5px dashed var(--held); color: var(--held); background: var(--held-bg); margin-right: 6px; vertical-align: 1px; white-space: nowrap; }
.tb-due.limbo { border: 2px dashed var(--held); }
.tb-leg.limbo { border: 2px dashed var(--held); background: var(--held-bg); }
.tb-leg.limbo .nt-tag { margin: 0 0 0 auto; }
.bk-later { width: 100%; margin-bottom: 10px; min-height: 44px; }
.bk-later .hint { font-weight: 600; }
.picker.bk-dim { opacity: .45; }
.bk-limbo { margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 2px dashed var(--held); background: var(--held-bg); color: var(--ink); font-size: 13px; }
.bk-limbo-note { color: var(--held); font-weight: 700; }
.ci-pick { margin-bottom: 14px; }
.ci-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ci-table { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.ci-table[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.qs-bump { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; font-size: 13px; }
.toast.warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--held); }
.lb-lab { position: absolute; top: 50%; transform: translateY(-50%); margin: 0 8px; font-size: 12px; color: var(--ink2); white-space: nowrap; pointer-events: none; }
.lb-lab b { color: var(--held); }
.blk.slot { font-size: 11px; padding: 2px 4px; text-overflow: clip; }
.qs-bump { margin: 12px 22px 0; }

/* ---------- dragging: silhouette and landing outline ---------- */
.drag-sil { position: fixed !important; z-index: 450; pointer-events: none; margin: 0 !important; opacity: .8; box-shadow: 0 10px 28px rgba(0,0,0,.35); outline: 2px solid var(--accent); outline-offset: 1px; cursor: grabbing; }
.drag-sil.blk { bottom: auto; right: auto; }
.blk.landing { z-index: 7; pointer-events: none; border: 2px dashed var(--accent); background: var(--accent-soft); color: var(--ink); cursor: grabbing; }
.blk.landing.bad { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.dragging-src { opacity: .35; }

/* ---------- table wanted (UK / US…) ---------- */
.want-chip { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 1px 6px; border-radius: 5px; border: 1.5px solid var(--use); color: var(--use); background: var(--use-bg); margin: 0 4px; vertical-align: 1px; white-space: nowrap; }
.want-chip.off { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.blk .want-chip { font-size: .7em; padding: 0 5px; margin: 0 4px 0 0; }
.bk-want { margin: 4px 0 12px; }
.bk-wantwarn { margin-top: 8px; }
.blk.slot.other { opacity: .5; border-style: dotted; }
.blk.slot.other:hover { opacity: 1; }
.ghost.bad { background: var(--danger); color: #fff; }
.drag-sil.blk { opacity: .7; }
body.is-dragging, body.is-dragging * { user-select: none !important; -webkit-user-select: none !important; cursor: grabbing !important; }

/* ---------- waitlist ---------- */
.wl-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.wl-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; background: var(--surface); }
.wl-row.late { border-left-color: var(--danger); }
.wl-row.done { border-left-color: var(--line); opacity: .85; }
.wl-pos { font-family: 'Bebas Neue', system-ui, sans-serif; font-size: 34px; line-height: 1; color: var(--accent); text-align: center; }
.wl-row.done .wl-pos { color: var(--ink3); font-size: 26px; }
.wl-name { font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.wl-note { font-size: 13px; color: var(--ink2); margin-top: 3px; font-style: italic; }
.wl-free { font-size: 13px; font-weight: 700; margin-top: 4px; }
.wl-free.ok { color: var(--free); } .wl-free.some { color: var(--held); } .wl-free.none { color: var(--danger); }
.wl-called { font-size: 11px; font-weight: 800; color: var(--free); background: var(--free-bg); border-radius: 5px; padding: 1px 6px; margin-left: 4px; }
.wl-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 480px; }
.wl-donebtn { margin: 4px 0 10px; }
@media (max-width: 760px) { .wl-row { grid-template-columns: 40px minmax(0, 1fr); } .wl-acts { grid-column: 1 / -1; justify-content: flex-start; max-width: none; } .wl-pos { font-size: 26px; } }
.wl-form .row { display: flex; gap: 10px; flex-wrap: wrap; } .wl-form .row > * { flex: 1 1 140px; }
/* waitlist parties on the timeline (under No table yet) */
.blk.wait { background: var(--surface); color: var(--accent); border: 2px dotted var(--accent); cursor: pointer; display: flex; align-items: center; gap: 4px; }
.blk.wait.sel { box-shadow: 0 0 0 3px var(--accent); }
.wl-tag { font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 0 5px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); }
.wl-win { position: absolute; top: 8px; bottom: 8px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); pointer-events: none; }
.tl.lb .wl-row-tl .tl-name { color: var(--accent); }
.wl-lab b { color: var(--accent); }
.lb-say.wl-say { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 640px) { .topbar { padding-right: 52px; } }   /* room for the light/dark button on phones */

/* ---------- Cancelled section (bottom of the Bookings timeline) ---------- */
.tl.cx { border: 1px dashed var(--danger); background: color-mix(in srgb, var(--danger-bg) 35%, var(--surface)); }
.tl.cx .tl-hours, .tl.cx .tl-row .tl-name { background: color-mix(in srgb, var(--danger-bg) 55%, var(--surface)); }
.tl.cx .tl-cells { background-color: transparent !important; }
.cx-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); position: sticky; left: 0; }
.cx-title { color: var(--danger); font-size: 15px; letter-spacing: .02em; }
.tl.cx .tl-name > span:first-child { color: var(--danger); font-size: 13px; }
.tl.cx .blk.cancelled { cursor: pointer; }
.cx-lab b { color: var(--danger); }

/* ---------- timeline click menu: booking or walk-in ---------- */
.tl-menu { position: fixed; z-index: 400; min-width: 240px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.tl-menu-head { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); padding: 4px 10px 6px; }
.tl-menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tl-menu-item b { font-size: 14px; }
.tl-menu-item:hover:not(:disabled), .tl-menu-item:focus-visible { background: var(--accent-soft); outline: none; }
.tl-menu-item:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- quick "Add to the waitlist" window ---------- */
.wq { display: flex; flex-direction: column; gap: 18px; min-width: min(460px, 82vw); }
.wq-field { display: flex; flex-direction: column; gap: 8px; }
.wq-lbl { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
.wq-name { font-size: 18px; padding: 12px 14px; }
.wq-match { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 0; }
.wq-cust { border: 1px solid var(--line); background: var(--surface2); color: var(--ink); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.wq-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.wq-kind { padding: 12px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.wq-kind[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.wq-stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 12px; width: max-content; overflow: hidden; }
.wq-step { width: 52px; height: 48px; border: 0; background: var(--surface2); color: var(--ink); font-size: 24px; cursor: pointer; }
.wq-step:disabled { opacity: .35; cursor: default; }
.wq-count { min-width: 64px; text-align: center; font-size: 22px; }
.wq-sum { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; border-radius: 10px; background: var(--surface2); font-size: 13px; }
.wq-free { font-weight: 700; color: var(--danger); } .wq-free.ok { color: var(--free); }
.wq-more { align-self: flex-start; font-size: 13px; }
.blk.live, .blk.arrived { cursor: grab; }

/* A floor closed for the day: one bar instead of its tables */
.fl-bar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 16px; min-height: 56px; border: 1px dashed var(--line); border-left: 5px solid var(--shut); border-radius: 12px; background: var(--surface2); }
.fl-bar-ico { color: var(--shut); font-size: 14px; }
.fl-bar-name { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 24px; text-transform: uppercase; letter-spacing: .03em; line-height: 1; }
.fl-bar-warn { font-size: 13px; font-weight: 700; color: var(--danger); background: var(--danger-bg); border-radius: 999px; padding: 3px 10px; }
.fl-bar-gap { flex: 1; }
.fl-bar { margin: 12px 0; }
.tb-floorsecs .fl-bar, .tb-plans .fl-bar { margin: 0; }

/* ---------- Floor plans (floorplan.js): pale table colours, pockets, labels, immovable objects, sofas, stadium seating ---------- */
.felt-mint { --felt: #ecf8f1; } .felt-sky { --felt: #eef5fd; } .felt-blush { --felt: #fdf0f2; } .felt-lemon { --felt: #fdf9e4; }
.felt-lilac { --felt: #f5f1fc; } .felt-peach { --felt: #fef2e9; } .felt-sage { --felt: #f1f5ec; } .felt-cloud { --felt: #f6f7f9; }
/* pockets: the box covers the table and its rail and hides anything past the edge (quarter circles in the corners, half circles on the sides) */
.pkbox { position: absolute; inset: -2px; overflow: hidden; border-radius: 8px; pointer-events: none; z-index: 1; }
.pk { position: absolute; width: clamp(10px, 1.35cqw, 18px); height: clamp(10px, 1.35cqw, 18px); border-radius: 50%; background: #8f969e; transform: translate(-50%, -50%); }
.pk.c { width: clamp(16px, 2.1cqw, 26px); height: clamp(16px, 2.1cqw, 26px); }
.tile.pooltbl { overflow: visible; padding: clamp(5px, 1.05cqw, 12px) clamp(10px, 1.75cqw, 18px); }   /* keeps the name and clock clear of the pockets */
.tile.pooltbl > :not(.pkbox) { position: relative; z-index: 2; max-width: 100%; overflow: hidden; }
.tile.free.pooltbl[class*="felt-"] { background: var(--felt); color: #1d232b; }
.tile.free.pooltbl[class*="felt-"] .st { color: #17663a; } .tile.free.pooltbl[class*="felt-"] .sub { color: #3f4954; }
.fplan { position: relative; width: 100%; min-width: 760px; aspect-ratio: 24 / 14; background-color: var(--plan); border: 1px solid var(--line); border-radius: 12px; container-type: inline-size;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / 24) calc(100% / 14); }
.fpt, .fpc { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.15; font-size: max(9px, 1.2cqw); color: #1d232b; user-select: none; }
.fpt { border-radius: 8px; padding: 2px 4px; }
.fpt.pool { padding: clamp(6px, 1.1cqw, 12px) clamp(12px, 2cqw, 20px); }
.fpt .n { font-weight: 800; font-size: max(10px, 1.45cqw); position: relative; z-index: 2; }
.fpt.pool { border: 3px solid #8a7458; background: var(--felt, #f3f5f7); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.fpt.pool .pkbox { inset: -3px; }
.fpt.room { border: 2px solid #7d6aa8; background: #f4effc; border-radius: 12px; }
.fpt.plain { border: 2px solid #9aa5b1; background: #fff; }
.fpt.dim { opacity: .35; filter: grayscale(1); }
.fp-type { font-size: max(9px, .95cqw); color: #6b7682; }
.fp-who { position: relative; z-index: 2; font-size: max(9px, 1.05cqw); font-weight: 600; max-width: 96%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.fp-who.free { color: #5b6672; font-weight: 500; }
.fpc.k-label { border: 2px dashed var(--ink3); border-radius: 6px; color: var(--ink2); font-weight: 700; padding: 2px; background: color-mix(in srgb, var(--surface) 55%, transparent); overflow: hidden; }
.fpc.k-object { border-radius: 6px; color: #fff; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: max(9px, 1.1cqw); overflow: hidden; }
.fpc.k-object span { padding: 1px 6px; border-radius: 4px; }
.o-bar { background: #6b4f3a; border: 3px solid #4a3627; box-shadow: inset 0 0 0 4px #8a6a4f; }
.o-pillar { background: repeating-linear-gradient(45deg, #4b5563, #4b5563 4px, #6b7280 4px, #6b7280 8px); border-radius: 50% !important; }
.o-stage { background: #334155; border: 3px solid #1e293b; }
.o-stairs { background: repeating-linear-gradient(0deg, #64748b, #64748b 6px, #94a3b8 6px, #94a3b8 12px); border: 2px solid #475569; }
.o-stairs span, .o-toilets span, .o-other span { background: rgba(30,41,59,.85); }
.o-toilets { background: #64748b; border: 2px solid #475569; }
.o-wall { background: #1f2937; }
.o-other { background: repeating-linear-gradient(45deg, #6b7280, #6b7280 5px, #7c8592 5px, #7c8592 10px); border: 2px solid #4b5563; }
.fpc.k-sofa { color: #4b3a2a; }
.fpc.k-sofa svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fpc.k-sofa .cap, .fpc.k-sofa .fp-who { position: relative; font-weight: 800; }
.fpc.k-sofa .cap { margin-top: 14%; } .fpc.k-sofa .fp-who { font-weight: 600; }
.fpc.k-stadium { align-items: stretch; justify-content: flex-start; padding: 3px 6px; border: 2px solid #5b6b80; background: #eef2f7; border-radius: 6px; color: #22303f; overflow: hidden; }
.fpc.k-stadium .cap { display: flex; justify-content: space-between; gap: 6px; font-weight: 800; font-size: max(9px, 1.05cqw); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.fpc.k-stadium .cap span { overflow: hidden; text-overflow: ellipsis; }
.fp-seats { display: grid; gap: 2px; flex: 1; margin-top: 3px; min-height: 0; }
.fp-seats i { background: #c7d2e0; border-radius: 3px 3px 6px 6px; border-top: 3px solid #5b6b80; min-width: 0; min-height: 0; }
.fp-seats i.on { background: #7aa7d9; }
.fp-seats.tight { gap: 1px; } .fp-seats.tight i { border-top-width: 2px; }
.fpc.k-stadium .fp-who { text-align: left; max-width: 100%; }
/* the designer */
.fpd-copy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 14px; }
.fpd-copy > div { flex: 1; min-width: 240px; } .fpd-copy p { margin: 4px 0 0; }
.fpd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fpd-tip { flex: 1; text-align: right; }
.fpd-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.fpd-canvas { min-width: 0; }
.fpd-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.fpd-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 76px; }
.fpd-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.fpd-card .hint { margin: 0; }
.fpd-none { border-style: dashed; }
.fpd-name { margin: 0; }
.fpd-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fpd-add button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; min-height: 72px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; }
.fpd-add button:hover { border-color: var(--accent); }
.fpd-add svg { width: 46px; height: 26px; }
.fpd-sw { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.fpd-sw button { display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit; font-size: 11px; font-weight: 700; color: var(--ink2); background: none; border: 0; cursor: pointer; padding: 0; }
.fpd-sw i { width: 100%; height: 28px; border-radius: 8px; border: 2px solid rgba(0,0,0,.14); background: var(--felt); }
.fpd-sw i.none { background: repeating-linear-gradient(45deg, #fff, #fff 4px, #e6e9ed 4px, #e6e9ed 8px); }
.fpd-sw button[aria-pressed="true"] i { outline: 3px solid var(--accent); outline-offset: 2px; }
.fpd-card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fpd-acts { display: flex; gap: 8px; } .fpd-acts .btn { flex: 1; }
.fpd-it { cursor: grab; touch-action: none; }
.fpd-it.sel { outline: 3px solid var(--accent); outline-offset: 3px; z-index: 5; }
.fpd-it.blocked { outline: 3px solid var(--danger); outline-offset: 3px; }
.fpd-it.dragging-src { opacity: .85; z-index: 6; }
.fp-grip { position: absolute; right: -7px; bottom: -7px; width: 16px; height: 16px; border-radius: 4px; background: var(--accent); border: 2px solid var(--surface); cursor: nwse-resize; z-index: 7; touch-action: none; }
@media (pointer: coarse) { .fp-grip { width: 26px; height: 26px; right: -11px; bottom: -11px; } }
.fpd-copylist ul { margin: 4px 0 12px; padding-left: 20px; }
.fpd-check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
@media (max-width: 1000px) { .fpd-wrap { grid-template-columns: minmax(0, 1fr); } .fpd-side { position: static; } .fpd-tip { text-align: left; flex-basis: 100%; order: 3; } }
/* Main Event: printouts and deposit */
.ev-prints { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ss-depwrap { display: flex; flex-direction: column; gap: 6px; }
.ss-dep button { flex: 1; }
.pv-back { position: fixed; inset: 0; z-index: 300; background: #5d6670; overflow: auto; padding: 72px 16px 40px; }
.pv-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 301; display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: #2b333c; color: #fff; }
.pv-bar b { flex: 1; font-size: 15px; }
.pv-bar .pv-close { background: #fff; color: #222; border-color: #fff; }
.pv-page { --ink: #111; --ink2: #444; --ink3: #777; --plan: #fff; --line: #d5dbe1; --surface: #fff; background: #fff; color: #111; width: 742px; max-width: 100%; min-height: 1050px; margin: 0 auto 24px; padding: 34px 40px; box-shadow: 0 6px 24px rgba(0,0,0,.35); font-size: 13px; }
.pv-page.land { width: 1050px; min-height: 742px; }
.pv-page h1 { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 34px; margin: 0; letter-spacing: .02em; color: #111; }
.pv-page h2 { font-size: 15px; margin: 0 0 14px; color: #444; font-weight: 600; }
.pv-page .fplan { min-width: 0; border-color: #999; }
.pv-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #a33; border: 2px solid #a33; border-radius: 6px; padding: 2px 8px; margin-bottom: 6px; }
.pv-page table { width: 100%; border-collapse: collapse; }
.pv-page th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #555; border-bottom: 2px solid #222; padding: 6px 8px; }
.pv-page td { border-bottom: 1px solid #ccc; padding: 7px 8px; vertical-align: top; color: #111; }
.pv-page tr:nth-child(even) td { background: #f6f6f6; }
.pv-page .tick { display: inline-block; width: 14px; height: 14px; border: 1.5px solid #333; border-radius: 3px; vertical-align: middle; }
.pv-dep { font-weight: 700; } .pv-dep.no { color: #a33; } .pv-dep.na { color: #777; font-weight: 500; }
.pv-list { columns: 2; column-gap: 28px; margin-top: 12px; font-size: 12px; }
.pv-list div { break-inside: avoid; padding: 3px 0; border-bottom: 1px dotted #bbb; }
.pv-note { font-size: 12px; color: #555; margin-top: 12px; }
.pv-foot { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12px; color: #555; }
@media print {
  body.pv-printing > *:not(.pv-back), body:has(.pv-back) > *:not(.pv-back) { display: none !important; }
  .pv-back { position: static; padding: 0; background: none; overflow: visible; }
  .pv-bar { display: none !important; }
  .pv-page, .pv-page.land { box-shadow: none; margin: 0; padding: 0; width: auto; min-height: 0; break-after: page; }
  .pv-page:last-child { break-after: auto; }
  html, body { background: #fff !important; }
  .pv-page.land .fplan { width: 200mm; max-width: 100%; margin: 0 auto; }   /* leaves room on a landscape A4 page for the heading and the who's-where list */
  .pv-page.land { break-inside: avoid; }
  .pv-page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Admin → Floors & tables: one section per floor */
.ft-floor { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.ft-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface2); border-bottom: 1px solid var(--line); }
.ft-title { display: flex; flex-direction: column; gap: 2px; }
.ft-title h3 { margin: 0; }
.ft-gap { flex: 1; }
.ft-table { margin: 0; }
.ft-table th:first-child, .ft-table td:first-child { padding-left: 16px; width: 130px; }
.ft-empty { padding: 18px 16px; color: var(--ink2); }
@media (max-width: 640px) { .ft-gap { display: none; } }
.ft-table { table-layout: fixed; width: 100%; min-width: 620px; }
.ft-table th:nth-child(2) { width: 26%; } .ft-table th:nth-child(3) { width: 20%; } .ft-table th:nth-child(5) { width: 90px; }
/* Floors, Tables and Seating: each floor's sofas and stadium seating */
.ft-seating { border-top: 1px solid var(--line); }
.ft-subhead { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 10px 16px; background: color-mix(in srgb, var(--surface2) 50%, var(--surface)); }
.ft-subhead > div { flex: 1 1 320px; }
.ft-icon svg { width: 38px; height: 22px; display: block; }
.ev-seat .ft-icon { margin-right: 4px; }
.cv { display: flex; flex-direction: column; gap: 10px; }
.cv-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.cv-row.skip { opacity: .55; } .cv-row.skip select, .cv-row.skip input { pointer-events: none; }
.cv-name { display: flex; align-items: center; gap: 8px; }
.cv-seats { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.cv-drawn { line-height: 1.3; }
@media (max-width: 700px) { .cv-row { grid-template-columns: 1fr; } }
.ft-rowcell { display: flex; align-items: center; gap: 8px; }

/* Floor plan text: one size on every table whatever its size or turn, growing with the plan but never below 12.5px.
   It is sized to fit the narrowest table (a turned UK table, 2 squares wide). */
.plan { --tile-font: max(12.5px, 1.32cqw); }
.plan .tile { font-size: var(--tile-font); justify-content: flex-start; gap: .25em; }
.plan .tile .nm { font-size: 1.05em; }
.tile.pooltbl.upright { padding: clamp(11px, 1.4cqw, 15px) 5px 5px; }   /* turned: side pockets are on the long sides, so only clear the top corners */
/* Booking / Walk-in on a playing table, in the same style as the VIP / returning badges */
.cb.bkg { background: #b7791f; color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.55); }
.cb.wlk { background: #fff; color: #1d4f7a; box-shadow: 0 0 0 1px #9cc3e6; }
.tile .tr-kind { display: flex; }
.tile .tr-kind .cb { margin: 1px 0 1px 1px; font-size: .7em; padding: 1px 5px; letter-spacing: .02em; }

/* Undo end: the card on a just-ended table, the undo window, and toasts with a button */
.ue-card { border: 1px solid var(--held); background: var(--held-bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ue-card .tb-cap { color: var(--held); }
.ue-opts { display: grid; gap: 10px; }
.ue-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.ue-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.ue-opt:disabled { opacity: .6; cursor: not-allowed; }
.ue-opt i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink3); flex: none; margin-top: 2px; }
.ue-opt[aria-pressed="true"] i { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, transparent 50%); }
.ue-opt b { display: block; font-size: 16px; }
.ue-opt span { font-size: 13px; color: var(--ink2); }
.ue-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ue-sum { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; margin: 0; }
.ue-sum dt { color: var(--ink2); } .ue-sum dd { margin: 0; font-weight: 600; }
.ue-diff { font-weight: 800; } .ue-diff.less { color: #17663a; } .ue-diff.more, .ue-bad { color: var(--danger); }
.ue-head { background: var(--surface2); padding: 16px 20px; border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.ue-head h2 { margin: 2px 0; font-size: 28px; }
.ue-body { padding: 16px 20px 6px; display: flex; flex-direction: column; gap: 14px; }
.toast.withbtn { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toast .toast-btn { background: #fff; color: #111; border: 0; border-radius: 999px; padding: 4px 12px; font: inherit; font-weight: 800; cursor: pointer; flex: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ue-diff.less { color: #6fd29a; } }
:root[data-theme="dark"] .ue-diff.less { color: #6fd29a; }

/* Admin: three sections, each with pill tabs */
.ad-groups button { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.ad-ic { font-size: 15px; opacity: .8; }
.ad-sub { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 16px; }
.ad-sub button { border: 1px solid var(--line); background: var(--surface); color: var(--ink2); border-radius: 999px; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.ad-sub button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ad-view { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.bx { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.bx-keep { display: flex; gap: 10px; align-items: flex-start; }
.bx-warn { margin: 0; }

/* BilliardFlow login page */
.login-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 10px; }

/* BilliardFlow platform console (platform/index.html) */
.pf-tag { display: inline-block; background: #f5b942; color: #1d2733; border-radius: 6px; padding: 2px 8px; font: 800 12px/1.4 "Maven Pro", system-ui, sans-serif; letter-spacing: .05em; margin-left: 10px; vertical-align: middle; }
.pf-top { background: #1d2733; border-bottom-color: #3fae7f; }
.pf-main { max-width: 1240px; margin: 0 auto; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.pf-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .pf-row2 { grid-template-columns: 1fr; } }
.pf-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pf-note { background: var(--surface2); border-radius: 10px; padding: 10px 12px; margin: 8px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pf-co b { display: block; } .pf-co span { font-size: 12px; color: var(--ink2); }
.pill.trial { background: #ece6fb; color: #5a3fb0; } .pill.due { background: var(--warn-bg); color: var(--warn-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.trial { background: #2a2147; color: #c9b8f2; } }
:root[data-theme="dark"] .pill.trial { background: #2a2147; color: #c9b8f2; }

/* BilliardFlow in the app: the bar under the menu, Billing, forgot password */
.bf-bar { display: none; flex-direction: column; }
.bf-bar.show { display: flex; }
.bf-msg { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 16px; font-size: 14px; }
.bf-msg .btn { padding: 4px 10px; min-height: 0; }
.bf-msg.trial { background: #f4effe; color: #3d2a80; border-bottom: 1px solid #c9b8f2; }
.bf-msg.due { background: var(--warn-bg); color: var(--warn-ink); border-bottom: 1px solid var(--held); }
.bf-msg.locked { background: #fde4e1; color: #7f1710; border-bottom: 1px solid #e8a39b; }
.bf-msg.support { background: #e2f5ec; color: #14532d; border-bottom: 1px solid #9fd8bb; }
.bf-msg.block { border: 1px solid currentColor; border-radius: 12px; margin-bottom: 14px; padding: 12px 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bf-msg.trial { background: #231b3d; color: #d9ccff; } :root:not([data-theme="light"]) .bf-msg.locked { background: #3a1513; color: #ffc9c2; } :root:not([data-theme="light"]) .bf-msg.support { background: #10291d; color: #b8ecd0; } }
:root[data-theme="dark"] .bf-msg.trial { background: #231b3d; color: #d9ccff; } :root[data-theme="dark"] .bf-msg.locked { background: #3a1513; color: #ffc9c2; } :root[data-theme="dark"] .bf-msg.support { background: #10291d; color: #b8ecd0; }
.bf-bill { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 760px) { .bf-bill { grid-template-columns: 1fr; } }
.bf-plan { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bf-price { font-family: "Bebas Neue", Impact, sans-serif; font-size: 44px; line-height: 1; margin: 8px 0 2px; } .bf-price span { font: 500 15px "Maven Pro", system-ui, sans-serif; color: var(--ink2); }
.bf-tiers { max-width: 360px; margin: 6px 0; } .bf-tiers td { padding: 5px 8px; }
.bf-col { display: grid; gap: 8px; }
.bf-forgot { margin-top: 12px; text-align: center; font-size: 14px; }
.login .pf-tag { margin-left: 0; }
