/* Sausage Tree back office. Design: design/staff-ui-C/SPEC.md (option C "高效·前台"). No shadows. */
:root {
  --bg: #EEF1F5; --card: #FFFFFF; --line: #D9DFE7; --rule: #EEF1F5; --input: #C9D2DE; --subtle: #F7F9FB;
  --ink: #101828; --ink-2: #5B6878; --ink-3: #3B4757; --sep: #8A96A8;
  --primary: #2457C5; --link: #1D4FB8; --hover: #163C8C; --primary-50: #E8EEFB; --primary-25: #F5F8FE;
  --side: #0F1B2D; --side-active: #1E2F4A; --side-ink: #C9D3E1; --side-muted: #8FA0B8;
  --bad: #B42318; --bad-bg: #FDECEA; --bad-line: #F0C3BE;
  --warn: #9A3B06; --warn-bg: #FFF4E6; --warn-line: #F7D7B0;
  --ok: #1E6B3A; --ok-bg: #E7F4EC; --alert: #E8590C;
  --sans: 'IBM Plex Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: 'IBM Plex Mono', 'Noto Sans SC', ui-monospace, Consolas, monospace;
  --side-w: 208px;
  font-family: var(--sans); color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 13px; line-height: 1.45; }
a { color: var(--link); }
a:hover { color: var(--hover); }
h1, h2, h3 { margin: 0; line-height: 1.3; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-weight: 500; }
.num { text-align: right; }
.red { color: var(--bad); }
.strong-red { color: var(--bad); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; }

/* ---- Shell: sidebar ---------------------------------------------------------------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); color: var(--side-ink); padding: 16px 10px; display: flex; flex-direction: column; gap: 18px; z-index: 30; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; text-decoration: none; color: var(--side-ink); }
.brand:hover { color: var(--side-ink); }
.brand .mark { width: 30px; height: 30px; border-radius: 6px; background: var(--primary); color: #FFFFFF; display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.brand-t { display: flex; flex-direction: column; }
.brand-t strong { color: #FFFFFF; font-weight: 600; }
.brand-t small { font-size: 11px; color: var(--side-muted); }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--side-ink); text-decoration: none; }
.side nav a svg { width: 16px; height: 16px; flex: none; }
.side nav a:hover { color: #FFFFFF; background: rgba(30, 47, 74, .6); }
.side nav a[aria-current="page"] { background: var(--side-active); color: #FFFFFF; }
.side nav .kbd { margin-left: auto; font-size: 11px; color: var(--side-muted); }
.side nav .count { margin-left: auto; font-size: 11px; background: var(--alert); color: #FFFFFF; border-radius: 4px; padding: 0 6px; }
.scrim { position: fixed; inset: 0; background: rgba(15, 27, 45, .45); z-index: 25; }

/* ---- Shell: top bar + content ----------------------------------------------------------- */
.shell { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 57px; }
.top-l { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.top-r { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.top-r:empty { display: none; }
.page-title { font-size: 16px; font-weight: 600; }
.page-ref { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.crumb { text-decoration: none; font-size: 12px; }
.crumb-sep { color: var(--sep); }
.top-sub { font-size: 12px; color: var(--ink-2); }
.menu-btn { display: none; width: 36px; height: 36px; padding: 0; justify-content: center; }
.me { display: flex; align-items: center; gap: 10px; }
.me .who { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.me .lang { height: 36px; padding: 0 10px; font-size: 12px; }
.top-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--input); border-radius: 6px; padding: 0 10px; height: 36px; flex: 0 1 320px; background: var(--subtle); min-width: 160px; }
.top-search input { border: 0; outline: 0; background: transparent; font: inherit; flex: 1; min-width: 0; height: 34px; padding: 0; }
.top-search:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }
.keycap { font-family: var(--mono); font-size: 11px; color: var(--ink-2); border: 1px solid var(--input); border-radius: 4px; padding: 0 4px; }
main { padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 14px; outline: none; min-width: 0; flex: 1; }

/* ---- Controls ----------------------------------------------------------------------- */
button, .btn { font: inherit; height: 36px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--input); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover { color: var(--ink); }
button:hover, .btn:hover { border-color: #A9B6C6; }
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: #FFFFFF; font-weight: 500; padding: 0 14px; }
button.primary:hover, .btn.primary:hover { background: var(--hover); border-color: var(--hover); color: #FFFFFF; }
button.danger, .btn.danger { border-color: var(--bad-line); color: var(--bad); }
button.danger:hover { border-color: var(--bad); }
button.sm, .btn.sm { height: 32px; padding: 0 10px; }
button.link { border: 0; background: transparent; color: var(--link); height: auto; padding: 0; }
button.link:hover { color: var(--hover); }
button:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--input); border-radius: 6px; min-width: 0; }
input, select { height: 34px; padding: 0 10px; }
select, input[type="date"], input[type="time"], input[type="number"], input[type="datetime-local"] { padding: 0 8px; }
input[type="checkbox"], input[type="radio"] { height: auto; width: auto; margin: 0; accent-color: var(--primary); }
textarea { padding: 6px 10px; resize: vertical; min-height: 56px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
label { display: flex; flex-direction: column; gap: 4px; }
label > .lbl, .lbl { font-size: 11px; color: var(--ink-3); }
.filters label > .lbl { color: var(--ink-2); }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.form .wide { grid-column: 1 / -1; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { flex-direction: row; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--input); border-radius: 6px; cursor: pointer; background: var(--card); }
.chip:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.chip:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

/* Segmented control (buttons or radio labels) */
.seg { display: inline-flex; gap: 2px; border: 1px solid var(--input); border-radius: 6px; padding: 2px; background: var(--card); }
.seg > button, .seg > label { border: 0; background: transparent; font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 4px; height: auto; cursor: pointer; color: var(--ink); flex-direction: row; align-items: center; justify-content: center; }
.seg > .on, .seg > label:has(input:checked) { background: var(--primary); color: #FFFFFF; }
.seg > label:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }
.seg.tall { height: 34px; display: flex; }
.seg.tall > label { flex: 1; }
.seg.mid > button { padding: 5px 10px; }

/* ---- Cards ---------------------------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-h h2 { font-size: 14px; font-weight: 600; flex: 1; }
.card-h h2 .cnt { font-weight: 400; color: var(--ink-2); }
.card-b { padding: 12px 16px; }
.card.pad { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.card.pad > h2 { font-size: 14px; font-weight: 600; }
.card p { margin: 0; }
.card-foot { margin: 0; padding: 8px 16px 12px; color: var(--ink-2); }
.card.tight .card-h { padding: 10px 14px; }
.card.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.cols { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.col-320 { flex: 1 1 320px; }
.pair { display: flex; flex-wrap: wrap; gap: 14px; }
.pair > * { flex: 1 1 300px; }
.note { font-size: 12px; color: var(--ink-2); margin: 0; }
.note-warn { font-size: 12px; color: var(--warn); margin: 0; }
.note-box { background: var(--subtle); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 12px; color: var(--ink-3); margin: 0; }

/* Banner under the top bar */
.banner { margin: -16px -20px 0; padding: 10px 20px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; border-bottom: 1px solid; }
.banner b { font-weight: 600; }
.banner.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.banner.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.banner + .banner { margin-top: -14px; }
.banner button { height: 30px; margin-left: auto; }

/* Definition lists */
dl { margin: 0; }
dd { margin: 0; overflow-wrap: anywhere; }
dl.kv { padding: 10px 16px 14px; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 6px 12px; }
dl.kv dt { color: var(--ink-2); }
dl.kv + dl.kv { border-top: 1px solid var(--rule); }
dl.sum4 { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); grid-auto-flow: column; grid-template-rows: auto auto; gap: 2px 28px; }
dl.sum4 dt { font-size: 11px; color: var(--ink-2); }
dl.sum4 dd { font-weight: 500; }
dl.money { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
dl.money dt { color: var(--ink-2); }
dl.money dt.b { color: var(--ink); font-weight: 600; }
dl.money dd { font-family: var(--mono); font-weight: 500; text-align: right; }
dl.money dd.plain { font-family: var(--sans); font-weight: 400; }

/* ---- Badges ----------------------------------------------------------------------------- */
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; white-space: nowrap; background: #F1F3F6; color: var(--ink-3); line-height: 1.45; }
.badge.lg { padding: 2px 8px; }
.s-INQUIRY { background: #F1F3F6; color: #3B4757; }
.badge.s-INQUIRY { outline: 1px dashed #7A8798; outline-offset: -1px; }
.s-TENTATIVE_HOLD { background: #FFF0DC; color: #9A3B06; }
.s-DEPOSIT_PAID { background: #E8EEFB; color: #163C8C; }
.s-CONFIRMED { background: #2457C5; color: #FFFFFF; }
.s-FULLY_PAID { background: #13285A; color: #FFFFFF; }
.s-CANCELLED { background: #FDECEA; color: #B42318; }
.pill { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #F1F3F6; color: var(--ink-3); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill-select { font-size: 11px; height: 24px; padding: 0 4px; border-radius: 4px; background: #F1F3F6; border-color: transparent; color: var(--ink-3); }
.pill-select.ok { background: var(--ok-bg); color: var(--ok); }
.pill-select.bad { background: var(--bad-bg); color: var(--bad); }

/* ---- Tables --------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 11px; font-weight: 500; color: var(--ink-2); padding: 7px 8px; white-space: nowrap; }
td { padding: 9px 8px; vertical-align: top; }
tbody tr { border-top: 1px solid var(--rule); }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
th.num, td.num { text-align: right; }
td.money, th.money { text-align: right; font-family: var(--mono); font-weight: 500; white-space: nowrap; }
td .sub { font-size: 11px; color: var(--ink-2); }
td .sub.red { color: var(--bad); }
.tbl-list { min-width: 980px; }
.tbl-list thead tr { background: var(--subtle); }
.tbl-list th { padding: 8px; }
.tbl-list th:first-child, .tbl-list td:first-child { padding-left: 14px; }
.tbl-list th:last-child, .tbl-list td:last-child { padding-right: 14px; }
.tbl-list tbody tr:hover { background: var(--primary-25); }
.ref { font-family: var(--mono); font-weight: 500; text-decoration: none; white-space: nowrap; }
.tbl-mini { font-size: 12px; }
.tbl-mini th { padding: 6px 6px; }
.tbl-mini td { padding: 7px 6px; }
.tbl-mini th:first-child, .tbl-mini td:first-child { padding-left: 14px; }
.tbl-mini th:last-child, .tbl-mini td:last-child { padding-right: 14px; }
.tbl-mini thead tr { border: 0; }
.tbl-sum { font-size: 13px; }
.tbl-sum td { padding: 6px 16px; }
.tbl-sum tbody tr { border: 0; }
.tbl-sum tr.total { border-top: 1px solid var(--ink); }
.tbl-sum tr.total td { padding: 9px 16px; font-weight: 600; }
.empty { color: var(--ink-2); }

/* ---- KPI strip ------------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.kpi { background: var(--card); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.kpi:hover { background: var(--subtle); color: var(--ink); }
.kpi .l { font-size: 11px; color: var(--ink-2); }
.kpi .v { font-size: 22px; font-weight: 600; line-height: 1.3; }
.kpi .v.sm { font-size: 16px; line-height: 1.9; }
.kpi.warn { background: var(--warn-bg); }
.kpi.warn .l, .kpi.warn .v { color: var(--warn); }
.kpi.bad { background: var(--bad-bg); }
.kpi.bad .l, .kpi.bad .v { color: var(--bad); }

/* ---- To-do list ----------------------------------------------------------------------- */
.todo { display: flex; flex-direction: column; }
.todo a { display: flex; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.todo a:last-child { border-bottom: 0; }
.todo a:hover { background: var(--subtle); color: var(--ink); }
.todo .mk { width: 4px; align-self: stretch; flex: none; }
.todo .tx { flex: 1; min-width: 0; }
.todo .tx b { font-weight: 500; }
.todo .tx .sub { color: var(--ink-2); }
.todo .go { color: var(--link); white-space: nowrap; }
.mk-hold { background: #F59F3A; } .mk-dep { background: #2457C5; } .mk-bad { background: #B42318; }
.mk-inq { background: #F1F3F6; outline: 1px dashed #7A8798; outline-offset: -1px; } .mk-bal { background: #13285A; }
.todo-row { display: flex; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--rule); align-items: stretch; }
.todo-row:last-child { border-bottom: 0; }
.todo-row .tx { flex: 1; min-width: 0; }
.todo-row .tx b { font-weight: 500; }
.todo-row .tx .sub { color: var(--ink-2); }
.todo-row .mk { width: 4px; flex: none; }
.todo-row button { align-self: center; }

/* ---- Booking list tabs + filters ----------------------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; text-decoration: none; color: var(--ink-2); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--primary); margin-bottom: -1px; }
.tabs .n { font-size: 11px; padding: 0 6px; border-radius: 4px; background: #E3E8EF; color: var(--ink-3); font-weight: 400; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.filters label { gap: 3px; }
.filters .q { flex: 1 1 260px; }
.filters button { height: 34px; }
.pager { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.pager button { height: 32px; padding: 0 10px; }

/* ---- Booking detail ---------------------------------------------------------------------- */
.guest-sum { padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 14px 32px; }
.guest-sum .who { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; }
.guest-sum .who .nm { font-size: 18px; font-weight: 600; }
.guest-sum .who .meta { color: var(--ink-2); }
.guest-sum .contact { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; align-items: center; }
.guest-sum .contact .btn { height: 32px; padding: 0 10px; color: var(--link); }
.guest-sum .contact .btn.plain { color: var(--ink); }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; font-size: 11px; text-align: center; }
.stepper li { display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.stepper li > span { height: 4px; border-radius: 2px; background: var(--line); }
.stepper li.done { color: var(--ink); }
.stepper li.done > span, .stepper li.cur > span { background: var(--primary); }
.stepper li.cur { font-weight: 600; color: var(--hover); }
.stepper.cancelled li > span { background: var(--line); }
.progress { height: 8px; border-radius: 4px; background: var(--rule); overflow: hidden; display: flex; }
.progress > span { background: var(--primary); }
.pay-row { border-top: 1px solid var(--rule); padding-top: 8px; display: flex; justify-content: space-between; gap: 8px; color: var(--ink-3); }
.pay-row + .pay-row { border-top: 0; padding-top: 0; }
.pay-row .mono { white-space: nowrap; }
.pay-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-btns > button { flex: 1 1 120px; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.log b { font-weight: 500; }
.log .at { color: var(--ink-2); }
.note-form { display: flex; flex-direction: column; gap: 6px; }
.note-form .actions { justify-content: flex-end; }
.transfer + .transfer { border-top: 1px solid var(--rule); }

/* ---- Tape chart --------------------------------------------------------------------------- */
.tc-wrap { overflow-x: auto; }
.tc { display: flex; flex-direction: column; }
.tc-head { display: grid; font-size: 11px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.tc-head > span { text-align: center; padding: 6px 0; border-left: 1px solid var(--rule); line-height: 1.35; }
.tc-head > span.tc-corner { text-align: left; padding: 6px 10px; border-left: 0; }
.tc-head > span.we { color: var(--warn); }
.tc-head > span.today { background: var(--primary-50); color: var(--hover); font-weight: 600; }
.tc-row { display: grid; border-bottom: 1px solid var(--rule); }
.tc-name { padding: 6px 10px; display: flex; flex-direction: column; justify-content: center; }
.tc-name b { font-weight: 500; }
.tc-name small { font-size: 11px; color: var(--ink-2); }
.tc-lanes { position: relative; }
.tc-left { display: grid; font-size: 11px; background: var(--subtle); border-bottom: 1px solid var(--line); }
.tc-left > span { text-align: center; padding: 3px 0; font-family: var(--mono); font-weight: 500; color: var(--ink-3); }
.tc-left > span.tc-lbl { text-align: left; padding: 3px 10px; color: var(--ink-2); font-family: var(--sans); font-weight: 400; }
.tc-left > span.low { color: var(--warn); font-weight: 600; }
.tc-left > span.full { color: var(--bad); font-weight: 600; background: var(--bad-bg); }
.tbar { position: absolute; height: 20px; border-radius: 3px; display: flex; align-items: center; padding: 0 6px; font-size: 11px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbar:hover { filter: brightness(1.08); z-index: 1; }
.tbar:focus-visible { z-index: 2; }
.tb-INQUIRY { background: #F1F3F6; color: #3B4757; border: 1px dashed #7A8798; }
.tb-INQUIRY:hover { color: #3B4757; }
.tb-TENTATIVE_HOLD, .tb-TENTATIVE_HOLD:hover { background: #F59F3A; color: #2B1400; }
.tb-DEPOSIT_PAID, .tb-DEPOSIT_PAID:hover { background: #A9C2F2; color: #0F1B2D; }
.tb-CONFIRMED, .tb-CONFIRMED:hover { background: #2457C5; color: #FFFFFF; }
.tb-FULLY_PAID, .tb-FULLY_PAID:hover { background: #13285A; color: #FFFFFF; }
.tb-CLOSED { background: repeating-linear-gradient(45deg, #C9D2DE, #C9D2DE 4px, #EEF1F5 4px, #EEF1F5 8px); color: #3B4757; }
.tbar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tbar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tc.full .tc-head { background: var(--subtle); }
.tc.full .tc-head > span.tc-corner { padding: 8px 12px; }
.tc.full .tc-name { padding: 8px 12px; gap: 1px; border-right: 1px solid var(--rule); }
.tc.full .tc-name b { font-weight: 600; }
.tc.full .tc-left > span { padding: 4px 0; border-left: 1px solid var(--rule); }
.tc.full .tc-left > span.tc-lbl { padding: 4px 12px; border-left: 0; border-right: 1px solid var(--rule); }
.tc.full .tbar { height: 22px; padding: 0 7px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--ink-3); }
.legend > span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; display: inline-block; }
.legend.lg { gap: 14px; }
.legend.lg i { width: 12px; height: 12px; }
.legend i.tb-CLOSED { background: repeating-linear-gradient(45deg, #C9D2DE, #C9D2DE 3px, #EEF1F5 3px, #EEF1F5 6px); }
.chart-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chart-h h2 { font-size: 14px; font-weight: 600; }
.nav3 { display: flex; gap: 4px; }
.nav3 button.sq { width: 36px; padding: 0; }
.inline-check { flex-direction: row; align-items: center; gap: 6px; cursor: pointer; }
.range { font-weight: 500; }
.jump { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.jump input { height: 36px; }

/* ---- New booking ------------------------------------------------------------------------- */
.sec { border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.sec > h2 { padding: 10px 16px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line); }
.sec > .body { padding: 14px 16px; }
.sec .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.sec .grid.narrow { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.sec .foot { margin: 0; padding: 0 16px 12px; color: var(--ink-2); font-size: 12px; }
.rooms-grid { padding: 12px 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.room-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.room-card.pick { border: 2px solid var(--primary); background: var(--primary-25); padding: 9px 11px; }
.room-card.full { background: var(--subtle); opacity: .7; }
.room-card .top { display: flex; justify-content: space-between; gap: 8px; }
.room-card .top b { font-weight: 600; }
.room-card .left { font-size: 12px; color: var(--ok); white-space: nowrap; }
.room-card .left.low { color: var(--warn); font-weight: 600; }
.room-card .left.none { color: var(--bad); font-weight: 600; }
.room-card .left.unk { color: var(--ink-2); }
.stepr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stepr button { width: 32px; height: 32px; padding: 0; }
.stepr .q { min-width: 24px; text-align: center; font-family: var(--mono); font-weight: 500; font-size: 15px; }
.stepr select { height: 32px; font-size: 12px; margin-left: auto; }
.err { color: var(--bad); margin: 0; }
.err:empty { display: none; }

/* ---- Dialogs + toast ------------------------------------------------------------------- */
dialog { border: 1px solid var(--line); border-radius: 8px; padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); color: var(--ink); font-size: 13px; }
dialog::backdrop { background: rgba(15, 27, 45, .45); }
dialog form.dlg { display: flex; flex-direction: column; }
dialog form.dlg > h2 { font-size: 14px; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); }
dialog .dlg-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--subtle); }
dialog .err { padding: 0 16px 10px; }
.room-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.paylink { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; background: var(--subtle); border: 1px solid var(--line); padding: 6px 8px; border-radius: 6px; }
.link-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--side); color: #FFFFFF; padding: 10px 14px; border-radius: 6px; max-width: calc(100vw - 32px); z-index: 40; }
#toast.bad { background: var(--bad); }

/* ---- Responsive: sidebar becomes a drawer below 900px -------------------------------------- */
@media (max-width: 1100px) {
  .me .who { display: none; }
}
@media (max-width: 900px) {
  .side { transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; }
  .side.open { transform: none; visibility: visible; }
  .shell { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  main { padding: 16px 16px 32px; }
  .banner { margin: -16px -16px 0; padding: 10px 16px; }
  .top-search { flex: 1 1 100%; order: 5; }
}
@media (max-width: 560px) {
  dl.sum4 { grid-template-columns: repeat(2, minmax(0, auto)); grid-auto-flow: row; grid-template-rows: none; }
  dl.sum4 dt, dl.sum4 dd { grid-column: auto; }
  .top-sub { display: none; }
}

/* ---- Print (booking detail, arrivals) -------------------------------------------------------- */
@media print {
  .side, .scrim, .menu-btn, .me, .top-r, button, #toast, .no-print, .top-search { display: none !important; }
  body, main { background: #FFFFFF; }
  .shell { margin: 0; }
  .topbar { position: static; padding: 0 0 8px; border-bottom: 1px solid #999; min-height: 0; }
  main { padding: 10px 0 0; }
  .banner { margin: 0; border: 1px solid #999; }
  .card, .sec { border-color: #999; break-inside: avoid; }
  .cols { display: block; }
  .cols > * + * { margin-top: 14px; }
  .col-main, .col-side { gap: 10px; }
  select { border: 0; appearance: none; padding: 0; background: transparent; }
  a { color: inherit; text-decoration: none; }
}
