:root { --top: #1d2430; --top-ink: #e8ecf2; --side-w: 300px; --row-h: 46px; --col-w: 30px; --name-w: 92px; }
body { background: var(--bg); font-size: 14px; }
.brand { font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: var(--top-ink); white-space: nowrap; }
.brand b { color: #f0b35a; }
.brand.big { font-size: 26px; color: var(--ink); text-align: center; margin-bottom: 10px; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; border-color: transparent; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, #1d2430, #3a2a2a); }
.auth-card { background: var(--card); padding: 28px; border-radius: 16px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.auth-card h1 { font-size: 20px; margin: 0 0 16px; text-align: center; }

/* shell */
.shell { display: grid; grid-template-rows: auto auto 1fr; height: 100vh; }
.top { background: var(--top); color: var(--top-ink); display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
.top select { background: #2b3442; color: var(--top-ink); border-color: #3b4656; min-height: 34px; padding: 4px 10px; width: auto; max-width: 200px; }
.top .btn.ghost { color: var(--top-ink); }
.top .btn.ghost:hover { background: #2b3442; }
.datenav { display: flex; align-items: center; gap: 2px; }
.datebtn { position: relative; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; min-width: 0; text-align: center; white-space: nowrap; }
.datebtn:hover { background: #2b3442; }
.datebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; padding: 0; }
.datebtn input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.tabs { display: flex; gap: 2px; background: #151b24; padding: 3px; border-radius: 10px; }
.tabs button { background: none; border: 0; color: #aab4c3; padding: 6px 12px; border-radius: 7px; font-weight: 600; }
.tabs button[aria-current=page] { background: #2f3a4b; color: #fff; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search { position: relative; }
.search input { background: #2b3442; border-color: #3b4656; color: #fff; min-height: 34px; width: 170px; padding: 4px 10px; }
.search input::placeholder { color: #8d99aa; }
.search-results { position: absolute; right: 0; top: 40px; width: 380px; max-height: 60vh; overflow: auto; background: var(--card); color: var(--ink); border-radius: 10px; box-shadow: var(--shadow); z-index: 50; }
.search-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.search-results button:hover { background: var(--hover); }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: 40px; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); z-index: 60; min-width: 200px; overflow: hidden; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none; color: var(--ink); text-decoration: none; }
.menu-list a:hover, .menu-list button:hover { background: var(--hover); }
.menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.menu-theme > span { color: var(--muted); font-size: 13px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.menu-list .seg button { width: auto; padding: 4px 9px; font-size: 13px; border-right: 1px solid var(--line); }
.menu-list .seg button:last-child { border-right: 0; }
.menu-list .seg button[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); }
.admin-only { display: none; }
body.admin .admin-only { display: revert; }

.daybar { background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 50px; }
.stat { display: flex; flex-direction: column; padding: 2px 12px; border-right: 1px solid var(--line); }
.stat b { font-size: 18px; line-height: 1.1; }
.stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat.alert b { color: var(--req-ink); }
.daynote { flex: 1; min-width: 200px; display: flex; gap: 6px; align-items: center; }
.daynote input { min-height: 34px; padding: 4px 10px; background: var(--note-bg); border-color: var(--note-line); }
.closed-banner { background: var(--bad-bg); color: var(--bad); padding: 4px 10px; border-radius: 6px; font-weight: 600; }

.body { display: grid; grid-template-columns: 1fr var(--side-w); min-height: 0; }
.main { overflow: auto; position: relative; min-height: 0; }
.side { background: var(--card); border-left: 1px solid var(--line); overflow: auto; padding: 12px; min-height: 0; }
.side h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 8px; display: flex; justify-content: space-between; align-items: center; }
.side h3:first-child { margin-top: 0; }
.side-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; display: grid; gap: 2px; background: var(--card); cursor: pointer; text-align: left; width: 100%; }
.side-item:hover { border-color: var(--line-strong); }
.side-item .row { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.side-empty { color: var(--muted); font-size: 13px; padding: 4px 0 8px; }
@media (max-width: 1100px) { .body { grid-template-columns: 1fr; } .side { display: none; } body.show-side .side { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: 320px; z-index: 40; box-shadow: var(--shadow); } }

/* diary timeline */
.tl { position: relative; min-width: max-content; user-select: none; }
.tl-head { position: sticky; top: 0; z-index: 6; display: flex; background: var(--card); border-bottom: 1px solid var(--line); height: 34px; }
.tl-corner { position: sticky; left: 0; z-index: 7; width: var(--name-w); background: var(--card); border-right: 1px solid var(--line); flex: none; display: flex; align-items: center; padding-left: 10px; font-size: 11px; color: var(--muted); }
.tl-times { position: relative; flex: none; }
.tl-time { position: absolute; top: 0; height: 34px; font-size: 11px; font-weight: 700; color: var(--muted); border-left: 1px solid var(--line); padding: 9px 0 0 4px; }
.tl-area span { position: sticky; left: 10px; }
.tl-area { display: flex; align-items: center; height: 24px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); background: var(--band); z-index: 3; }
.tl-row { display: flex; height: var(--row-h); border-bottom: 1px solid var(--row-line); }
.tl-row.unalloc { background: var(--req-bg); }
.tl-name { position: sticky; left: 0; z-index: 4; width: var(--name-w); flex: none; background: var(--card); border-right: 1px solid var(--line); padding: 4px 10px; display: flex; flex-direction: column; justify-content: center; }
.tl-name b { font-size: 14px; }
.tl-name span { font-size: 11px; color: var(--muted); }
.tl-row.drop-ok .tl-name { background: var(--ok-bg); }
.tl-row.drop-bad .tl-name { background: var(--bad-bg); }
.tl-lane { position: relative; flex: none; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(var(--col-w) * 4 - 1px), var(--grid-line) calc(var(--col-w) * 4 - 1px), var(--grid-line) calc(var(--col-w) * 4)); }
.tl-lane .closed { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--stripe-a) 0 6px, var(--stripe-b) 6px 12px); }
.tl-lane:hover .ghost-slot { display: block; }
.ghost-slot { display: none; position: absolute; top: 4px; bottom: 4px; width: var(--col-w); border: 1.5px dashed var(--faint); border-radius: 6px; pointer-events: none; }
.bk {
  position: absolute; top: 4px; height: calc(var(--row-h) - 9px); border-radius: 7px; color: #fff; padding: 3px 7px; overflow: hidden;
  font-size: 12px; line-height: 1.25; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.2); border: 1px solid rgba(0,0,0,.12); display: flex; flex-direction: column; justify-content: center;
}
.bk b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.bk small { white-space: nowrap; opacity: .9; }
.bk.dragging { opacity: .85; z-index: 20; cursor: grabbing; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.bk.st-requested, .bk.st-pending_payment { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); }
.bk.st-completed { opacity: .65; }
.bk.st-no_show { text-decoration: line-through; }
.bk.src-block { background: repeating-linear-gradient(135deg, #8d8578 0 6px, #7d7569 6px 12px) !important; }
.bk .rs { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.bk.clash { outline: 2px solid #e23b3b; outline-offset: 1px; }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #e23b3b; z-index: 5; pointer-events: none; }
.now-line::before { content: ''; position: absolute; top: 28px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e23b3b; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; padding: 8px 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* list */
.list-wrap { padding: 14px; }
table.grid { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
table.grid th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 9px 10px; background: var(--soft); border-bottom: 1px solid var(--line); }
table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.grid tr.clickable { cursor: pointer; }
table.grid tr.clickable:hover td { background: var(--soft); }
table.grid tr.dim td { opacity: .5; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }
.pill.light { background: var(--soft-2); color: var(--ink); font-weight: 600; }
.qa { display: flex; gap: 4px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.filters input, .filters select { width: auto; min-height: 34px; padding: 4px 10px; }
.service-sep td { background: var(--soft-2); font-weight: 700; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* floor */
.floor-wrap { padding: 12px 14px; }
.floor-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.floor-tools input[type=range] { width: 260px; }
.floor { position: relative; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: auto; background-image: radial-gradient(var(--grid-line) 1px, transparent 1px); background-size: 20px 20px; }
.floor.editing { outline: 2px dashed #f0b35a; }
.ft { position: absolute; display: grid; place-items: center; text-align: center; border: 2px solid var(--ft-line); background: var(--ft-bg); color: var(--ink); border-radius: 10px; cursor: pointer; font-size: 12px; line-height: 1.2; padding: 4px; overflow: hidden; }
.ft.round { border-radius: 50%; }
.ft b { font-size: 15px; display: block; }
.ft .who { font-weight: 600; font-size: 11px; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ft.free { border-color: #6fb38a; background: var(--ft-free); }
.ft.soon { border-color: #e0a94a; background: var(--ft-soon); }
.ft.booked { border-color: #2f6fb3; background: var(--ft-booked); }
.ft.arrived { border-color: #c0821f; background: var(--ft-arrived); }
.ft.seated { border-color: #2f8a57; background: #2f8a57; color: #fff; }
.ft.blocked { border-color: #7d7569; background: repeating-linear-gradient(135deg, var(--stripe-a) 0 6px, var(--stripe-b) 6px 12px); }
.ft.inactive { opacity: .4; }
.editing .ft { cursor: move; }
.ft .handle { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; background: #f0b35a; border-radius: 4px 0 8px 0; cursor: nwse-resize; display: none; }
.editing .ft .handle { display: block; }
.ft.sel { box-shadow: 0 0 0 3px #f0b35a; }
.area-tabs { display: flex; gap: 6px; }
.area-tabs button { border: 1px solid var(--line); background: var(--card); padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.area-tabs button[aria-pressed=true] { background: var(--top); color: #fff; border-color: var(--top); }

/* drawer */
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(460px, 100vw); background: var(--card); z-index: 80; box-shadow: -10px 0 40px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.drawer > header { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.drawer > header h2 { margin: 0; font-size: 18px; flex: 1; }
.drawer .x, .modal .x { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); }
.drawer .content { padding: 14px 16px; overflow: auto; flex: 1; }
.drawer > footer { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.status-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.status-bar button { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px; }
.status-bar button[aria-pressed=true] { color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (min-width: 801px) { .grid2.repeat-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.guest-card { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.guest-card .flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tagpick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tagpick button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; }
.tagpick button[aria-pressed=true] { background: var(--warn-bg); border-color: var(--warn-line); }
.tablepick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tablepick button { border: 1.5px solid var(--line); background: var(--card); border-radius: 8px; min-width: 46px; padding: 5px 8px; font-weight: 700; font-size: 13px; }
.tablepick button small { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; }
.tablepick button[aria-pressed=true] { background: var(--top); color: #fff; border-color: var(--top); }
.tablepick button[aria-pressed=true] small { color: #cfd6e0; }
.tablepick button.busy { border-style: dashed; color: var(--faint); }
.tablepick .grp { flex-basis: 100%; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.events { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.events div { padding: 3px 0; }
.slotpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 5px; margin-bottom: 14px; max-height: 190px; overflow: auto; }
.slotpick button { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 6px 0; font-weight: 700; font-size: 13px; }
.slotpick button.full { color: var(--faint); border-style: dashed; }
.slotpick button[aria-pressed=true] { background: var(--top); color: #fff; border-color: var(--top); }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(20, 24, 32, .5); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--card); border-radius: 14px; width: min(480px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { width: min(820px, 100%); }
.modal > header { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal > header h2 { margin: 0; font-size: 17px; flex: 1; }
.modal-body { padding: 16px; overflow: auto; }
.modal > footer { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast { background: #1d2430; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; font-weight: 600; }
.toast.bad { background: #b23b3b; }
.toast.out { opacity: 0; transform: translateY(10px); }
.live { position: fixed; left: 4px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #b0a89c; z-index: 30; }
.live.on { background: #2f8a57; box-shadow: 0 0 0 3px rgba(47,138,87,.2); }

/* pages (guests, reports, settings) */
.page { padding: 16px; max-width: 1200px; }
.page h1 { font-size: 20px; margin: 0 0 12px; }
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.subtabs { display: inline-flex; background: var(--soft-2); border-radius: 10px; padding: 3px; gap: 2px; }
.subtabs button { border: 0; background: none; border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.subtabs button[aria-current=true] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.guests-split { display: grid; grid-template-columns: minmax(300px, 1fr) 1.3fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .guests-split { grid-template-columns: minmax(0, 1fr); } }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; }
.voucher-mini { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
/* bars across the top of a booking */
.note-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; font-size: 13.5px; border: 1px solid var(--line); background: var(--soft); }
.note-bar > span { flex: 1 1 220px; }
.note-bar.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.note-bar.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.note-bar.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-ink); }
.note-bar.info { background: var(--info-bg); border-color: var(--info-line); color: var(--info-ink); }
.linkbtn { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; font-weight: 700; }
/* coming / running late */
.bk .arr { display: inline-block; background: rgba(255, 255, 255, .28); border-radius: 4px; padding: 0 3px; font-size: 11px; line-height: 1.35; }
.bk .arr.late { background: #f2c46d; color: #3d2600; }
.arr-pill { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px; background: var(--ok-bg); color: var(--ok-ink); border: 1px solid var(--ok-line); white-space: nowrap; vertical-align: 1px; }
.arr-pill.late { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.panel { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.panel h2 { font-size: 16px; margin: 0 0 12px; }
.panel p.help { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--card); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.kpi b { font-size: 24px; display: block; }
.kpi span { color: var(--muted); font-size: 12px; }
.kpi.kpi-date b { font-size: 17px; line-height: 1.45; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bars div { flex: 1; background: #2f6fb3; border-radius: 3px 3px 0 0; min-height: 1px; position: relative; }
.bars div:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #1d2430; color: #fff; padding: 3px 6px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 16px; align-items: start; }
.settings-nav { position: sticky; top: 16px; display: grid; gap: 2px; }
.settings-nav button { text-align: left; border: 0; background: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.settings-nav button[aria-current=true] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.hours-row { display: grid; grid-template-columns: 60px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.svc-line { display: grid; grid-template-columns: 1.2fr .8fr .8fr .8fr auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.svc-line input { min-height: 34px; padding: 4px 8px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline > * { width: auto; }
table.edit td input, table.edit td select { min-height: 32px; padding: 3px 7px; }
code.copy { display: block; background: #1d2430; color: #e8ecf2; padding: 10px 12px; border-radius: 8px; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; margin: 6px 0 12px; }
.stars-s { color: #e3a008; letter-spacing: 1px; }
@media (max-width: 800px) { .settings-layout { grid-template-columns: minmax(0, 1fr); } .settings-nav { position: static; display: flex; flex-wrap: wrap; } .grid2, .grid3 { grid-template-columns: 1fr; } .search input { width: 140px; } }
.top .btn:not(.ghost):not(.primary) { color: var(--ink); }

/* requests, payments and preorders in the booking drawer */
.request-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--req-bg); border: 1px solid var(--req-line); border-radius: 10px; padding: 8px 10px; margin: -4px 0 12px; font-size: 13px; }
.request-bar b { flex: 1; min-width: 160px; }
.pay-card > div + div { margin-top: 4px; }
.po-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.po-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 4px; }
.po-table td { padding: 3px 4px; vertical-align: middle; }
.po-table input, .po-table select { min-height: 32px; padding: 3px 6px; }

/* opening hours: per-service options */
.svc { border-bottom: 1px dashed var(--line); padding-bottom: 2px; margin-bottom: 6px; }
.svc:last-child { border-bottom: 0; }
.svc-sum { font-size: 12px; margin: -2px 0 4px; }
.svc-sum:empty { display: none; }
.svc-more { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 4px 0 10px; }
.modal h3.sub { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.modal h3.sub:first-child { border: 0; margin-top: 0; padding-top: 0; }
.help.warn { color: var(--warn-ink); font-weight: 600; }

/* diary: arrivals row and room dog badges */
.tl-pace { position: sticky; top: 34px; z-index: 6; display: flex; background: var(--soft); border-bottom: 1px solid var(--line); height: 24px; }
.tl-pace .tl-corner { font-weight: 700; background: var(--soft); }
.pace { position: absolute; top: 3px; height: 18px; border-radius: 4px; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; color: var(--faint); background: var(--soft-2); }
.pace.some { background: var(--ok-bg); color: var(--ok-ink); }
.pace.near { background: var(--warn-bg); color: var(--warn-ink); }
.pace.over { background: var(--bad-bg); color: var(--bad-ink); }
.tl-area em { font-style: normal; font-weight: 600; text-transform: none; letter-spacing: 0; margin-left: 8px; }
.tl-area em.dog-ok { color: var(--ok-ink); }
.tl-area em.dog-no { color: var(--faint); }

/* kitchen sheet */
.ks-title { font-size: 18px; margin: 0 0 10px; }
.ks-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
.ks-tot, .ks-g { border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.ks-tot td, .ks-g td, .ks-g th { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.ks-g th { background: var(--soft); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.ks-b { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; break-inside: avoid; }
.ks-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ks-h span { color: var(--muted); font-size: 13px; }
.ks-diet { color: var(--bad-ink); font-weight: 700; }
.ks-missing { color: var(--warn-ink); font-weight: 600; margin: 4px 0; }
.ks-buffet { margin: 4px 0; }

@media print {
  body { background: #fff; }
  .top, .daybar, .side, .filters, .legend, #toasts, .live, .qa, #drawer { display: none !important; }
  .shell, .body { display: block !important; height: auto !important; }
  .main { overflow: visible !important; }
  table.grid { box-shadow: none; }
  body.print-sheet > *:not(.modal-back) { display: none !important; }
  body.print-sheet .modal-back { position: static; background: none; padding: 0; display: block; }
  body.print-sheet .modal { box-shadow: none; width: auto; max-height: none; display: block; }
  body.print-sheet .modal > header, body.print-sheet .modal > footer, body.print-sheet .no-print { display: none !important; }
  body.print-sheet .modal-body { overflow: visible; padding: 0; }
}
/* rows of day / month tick boxes in settings */
.day-checks { margin: 2px 0 12px; row-gap: 6px; }
.day-checks .check { align-items: center; }
.day-checks .check input { margin: 0; }

/* ---------------------------------------------------------------- narrow screens (tablets and phones) */
.tabs svg, #searchBtn, .side-toggle, .side-close { display: none; }
body:not(.day-view) .datenav { visibility: hidden; }
.icon-btn svg { width: 20px; height: 20px; display: block; }
.stats { display: contents; }
@media (max-width: 1100px) {
  .side-toggle { display: inline-flex; gap: 6px; align-items: center; }
  body.show-side .side { width: min(360px, 100vw); z-index: 75; }
  body.show-side .side-close { display: flex; justify-content: space-between; align-items: center; position: sticky; top: -12px; background: var(--card); margin: -12px -12px 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); z-index: 1; }
}

/* phones: bottom tab bar, compact top bar, list as cards, panels full screen */
@media (max-width: 760px) {
  :root { --name-w: 60px; }
  .shell { height: 100vh; height: 100dvh; padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  input, select, textarea { font-size: 16px; } /* stops phones zooming in when a field is tapped */
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "venue search walkin menu" "date date date date"; gap: 6px; padding: max(6px, env(safe-area-inset-top)) 10px 6px; }
  .top .brand { display: none; }
  .top-actions { display: contents; }
  #venuePick { grid-area: venue; width: 100%; max-width: none; }
  #venuePick.hidden + .datenav { grid-column: 1 / -1; }
  .datenav { grid-area: date; justify-content: space-between; }
  .datebtn { flex: 1; }
  body:not(.day-view) .datenav { display: none; }
  #searchBtn { display: inline-flex; grid-area: search; }
  .search { grid-area: date; display: none; }
  body.searching .search { display: block; }
  body.searching .datenav { display: none; }
  .search input { width: 100%; }
  .search-results { position: fixed; left: 8px; right: 8px; top: auto; width: auto; margin-top: 6px; max-height: 65vh; }
  #walkinBtn { grid-area: walkin; }
  .menu { grid-area: menu; }
  #userBtn .who, #userBtn .caret { display: none; }
  #userBtn::before { content: '☰'; font-size: 19px; line-height: 1; }
  .menu-list { min-width: 250px; }
  #newBtn { position: fixed; right: 14px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 65; border-radius: 999px; padding: 12px 18px; min-height: 48px; font-size: 15px; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; border-radius: 0; gap: 0; padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); background: var(--top); border-top: 1px solid #2b3442; }
  .tabs button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0 3px; font-size: 10.5px; }
  .tabs svg { display: block; width: 23px; height: 23px; }
  .tabs button[aria-current=page] { background: none; color: #f0b35a; }
  .daybar { padding: 6px 10px; gap: 6px; min-height: 0; }
  .stats { display: flex; flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .stats::-webkit-scrollbar { display: none; }
  .stat { flex: none; padding: 0 10px; }
  .stat b { font-size: 16px; }
  .stat span { font-size: 10px; }
  .daynote { flex: 1 1 100%; min-width: 0; order: 3; }
  .side-toggle { flex: none; order: 2; }
  .daybar .closed-banner, .daybar > .pill { order: 2; }
  #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .toast { text-align: center; }
  .modal-back { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 16px 16px 0 0; }
  .modal > footer { flex-wrap: wrap; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .drawer { width: 100vw; }
  .drawer > header { padding-top: max(14px, env(safe-area-inset-top)); }
  .drawer > footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .list-wrap, .floor-wrap, .page { padding: 10px; }
  .settings-layout { padding: 10px; gap: 10px; }
  .settings-nav { gap: 4px; }
  .settings-nav button { padding: 6px 10px; background: var(--card); border: 1px solid var(--line); font-size: 13px; }
  .panel { padding: 14px 12px; }
  .filters input[type=search] { flex: 1 1 100%; }
  table.grid:not(.list-table) { display: block; overflow-x: auto; }
  .hours-row { grid-template-columns: 1fr; gap: 4px; }
  .svc-line { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .svc-line input[name=sn] { grid-column: 1 / 3; grid-row: 1; }
  .svc-line > span.inline { grid-column: 3; grid-row: 1; justify-self: end; }
  .svc-line > * { min-width: 0; }
  body.admin .tabs .admin-only { display: flex; }
  .main::after { content: ''; display: block; height: 76px; } /* room to scroll past the + Booking button */
  .vouchers-table th:nth-child(2), .vouchers-table td:nth-child(2), .vouchers-table th:nth-child(5), .vouchers-table td:nth-child(5), .vouchers-table th:nth-child(6), .vouchers-table td:nth-child(6) { display: none; }
  .vouchers-table th, .vouchers-table td { padding-left: 7px; padding-right: 7px; }
  .vouchers-table .mono { letter-spacing: 0; }
  table.grid.vouchers-table td:nth-child(4) { white-space: normal; }
  table.grid:not(.list-table) th, table.grid:not(.list-table) td { white-space: nowrap; }
  .side-toggle .st-long { display: none; }
  .floor-tools input[type=range] { width: 100%; order: 9; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slotpick { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
  .grid3 { grid-template-columns: 1fr 1fr; }
  /* the day list as cards */
  .list-table thead { display: none; }
  .list-table, .list-table tbody { display: block; }
  .list-table tr.service-sep, .list-table tr.service-sep td { display: block; }
  .list-table tr.clickable { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
  .list-table tr.clickable td { padding: 0; border: 0; max-width: none !important; }
  .list-table tr.clickable td:nth-child(1) { grid-column: 1; grid-row: 1; font-size: 16px; }
  .list-table tr.clickable td:nth-child(2) { grid-column: 1; grid-row: 2; color: var(--muted); }
  .list-table tr.clickable td:nth-child(2)::after { content: ' ppl'; font-size: 12px; font-weight: 400; }
  .list-table tr.clickable td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
  .list-table tr.clickable td:nth-child(4) { grid-column: 3; grid-row: 1; text-align: right; font-weight: 700; }
  .list-table tr.clickable td:nth-child(5) { grid-column: 3; grid-row: 2; text-align: right; }
  .list-table tr.clickable td:nth-child(6) { grid-column: 1 / -1; font-size: 13px; }
  .list-table tr.clickable td:nth-child(7) { display: none; }
  .list-table tr.clickable td:nth-child(8) { grid-column: 1 / -1; }
  .list-table tr.clickable td:nth-child(8):not(:has(button)) { display: none; }
  .list-table .qa .btn { min-height: 36px; padding: 6px 14px; }
}
.editing .ft { touch-action: none; }
/* ---------------------------------------------------------------- all pubs */
body.group-view .datenav { visibility: visible; }
.pubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pub-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; box-shadow: var(--shadow); cursor: pointer; text-align: left; color: inherit; font: inherit; }
.pub-card .week { margin-top: auto; }
body.group-view .search, body.group-view #searchBtn { display: none; }
.pub-pick { display: grid; gap: 8px; }
.pub-pick .btn { justify-content: flex-start; padding: 12px 14px; font-size: 15px; }
.pub-card:hover { border-color: var(--line-strong); }
.pub-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pub-card h2 { margin: 0; font-size: 17px; }
.pub-card .closed { color: var(--muted); font-size: 13px; }
.pub-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pub-nums div { display: grid; }
.pub-nums b { font-size: 22px; line-height: 1.1; }
.pub-nums span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pub-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 22px; }
.pub-flags .pill { white-space: nowrap; line-height: 1.5; }
.pub-flags .pill { font-size: 12px; }
.pub-note { background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 74px; }
.week .d { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 3px; text-align: center; }
.week .bar { align-self: end; background: color-mix(in srgb, var(--accent) 55%, var(--card)); border-radius: 4px 4px 2px 2px; min-height: 2px; }
.week .d.today .bar { background: var(--accent); }
.week .d small { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.week .d small b { display: block; color: var(--ink); font-size: 11px; }
.group-total { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 14px; color: var(--muted); }
.group-total b { color: var(--ink); font-size: 17px; }
@media (max-width: 760px) {
  body.group-view .datenav { display: flex; }
  .pubs { grid-template-columns: minmax(0, 1fr); }
}

