:root {
  --ink: #161A3A; --ink-2: #262B5E; --ink-soft: #5A6078;
  --bg: #F5F6F2; --card: #FFFFFF; --line: #E3E6DF; --line-2: #EEF0EA;
  --teal: #0E6B62; --teal-2: #14B8A6; --teal-bg: #E3F4F1;
  --sun: #E8A33D; --sun-bg: #FDF3E1;
  --red: #C23B32; --red-bg: #FBE9E7;
  --blue: #2E5AAC; --blue-bg: #E8EEFA;
  --grey-bg: #EEF0EA;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22,26,58,.06), 0 4px 16px rgba(22,26,58,.05);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 600; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
a { color: var(--teal); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
[hidden] { display: none !important; }

/* boot */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ink-soft); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* layout */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #DADCEB; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 18px; }
.brand b { font-family: var(--head); color: #fff; font-size: 17px; display: block; line-height: 1.1; }
.brand span { font-size: 12px; color: #9EA3C0; }
.nav a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: #C9CCE0; text-decoration: none; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(45,212,191,.14); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.side .foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.side .foot b { color: #fff; display: block; }
.side .foot button { background: none; border: 0; color: #9EA3C0; padding: 0; cursor: pointer; text-decoration: underline; font-size: 13px; }
.main { padding: 28px 32px 48px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; }
.topbar { display: none; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card > h2, .card > .row > h2 { margin-bottom: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 16px 20px 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .v { font-family: var(--head); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 13px; color: var(--ink-soft); }
.kpi.alert .v { color: var(--red); }
.empty { padding: 24px; text-align: center; color: var(--ink-soft); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 9px; padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 38px; }
.btn:hover { border-color: #C9CEC3; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: #0B5A52; }
.btn.danger { color: var(--red); border-color: #EBC5C1; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--teal); padding-inline: 8px; }
.btn.sm { padding: 5px 10px; min-height: 30px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--teal-2); outline-offset: 2px; }

/* forms */
.form { display: grid; gap: 14px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 14px; }
label.f { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
input, select, textarea { width: 100%; border: 1px solid #D5D9CF; background: #fff; border-radius: 8px; padding: 8px 10px; min-height: 38px; font-size: 15px; font-weight: 400; color: var(--ink); }
textarea { min-height: 70px; resize: vertical; }
.err { color: var(--red); font-size: 12px; font-weight: 500; }
input.bad, select.bad { border-color: var(--red); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); }
.check input { width: auto; min-height: 0; }
.searchbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.searchbar input { max-width: 320px; }
.searchbar select { max-width: 180px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.link { cursor: pointer; }
.t tr.link:hover td { background: #FAFBF8; }
.t tfoot td { font-weight: 600; border-top: 1px solid var(--line); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--grey-bg); color: var(--ink-soft); }
.pill.confirmed { background: var(--blue-bg); color: var(--blue); }
.pill.checked_in { background: var(--teal-bg); color: var(--teal); }
.pill.checked_out { background: var(--grey-bg); color: var(--ink-soft); }
.pill.cancelled, .pill.no_show { background: var(--red-bg); color: var(--red); }
.pill.clean { background: var(--teal-bg); color: var(--teal); }
.pill.dirty { background: var(--sun-bg); color: #9A6312; }
.pill.inspect { background: var(--blue-bg); color: var(--blue); }
.pill.out_of_order { background: var(--red-bg); color: var(--red); }
.pill.ok { background: var(--teal-bg); color: var(--teal); }
.pill.failed { background: var(--red-bg); color: var(--red); }
.src { font-size: 12px; color: var(--ink-soft); }
.mob { display: none; color: var(--ink-soft); }
@media (max-width: 640px) { .mob { display: block; } .today-t td:nth-child(2), .today-t td:nth-child(3) { display: none; } }

/* calendar */
.cal-wrap { overflow-x: auto; }
table.cal { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.cal th, .cal td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 0; height: 40px; min-width: 64px; text-align: center; }
.cal thead th { position: sticky; top: 0; background: #FAFBF8; font-weight: 600; font-size: 12px; padding: 6px 4px; height: auto; }
.cal thead th.today { background: var(--teal-bg); color: var(--teal); }
.cal thead th.wk { color: #9A6312; }
.cal .rl { position: sticky; left: 0; background: #fff; z-index: 2; text-align: left; padding: 0 12px; min-width: 120px; font-weight: 600; white-space: nowrap; }
.cal tr.type td { background: #FAFBF8; font-size: 12px; color: var(--ink-soft); height: 30px; }
.cal tr.type td.rl { background: #F3F5F0; color: var(--ink); }
.cal td.free { color: var(--teal); font-weight: 600; }
.cal td.sold { color: var(--red); font-weight: 700; background: var(--red-bg); }
.cal td.cell { cursor: pointer; }
.cal td.cell:hover { background: var(--teal-bg); }
.cal td.bk { cursor: pointer; padding: 3px 2px; }
.bar { display: block; height: 32px; line-height: 32px; border-radius: 6px; padding: 0 8px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 12px; color: #fff; background: var(--blue); }
.bar.checked_in { background: var(--teal); }
.bar.checked_out { background: #9AA0A6; }
.bar.ota { box-shadow: inset 3px 0 0 var(--sun); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); margin-top: 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }

/* housekeeping */
.rooms-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.room-tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; display: grid; gap: 8px; }
.room-tile .no { font-family: var(--head); font-size: 22px; font-weight: 600; }
.room-tile.dirty { border-color: #F0D5A8; background: #FFFCF5; }
.room-tile.out_of_order { border-color: #EBC5C1; background: #FFF8F7; }
.room-tile.occ { box-shadow: inset 0 3px 0 var(--teal); }
.room-tile select { min-height: 32px; padding: 4px 8px; font-size: 13px; }

/* booking detail */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.dl dt { color: var(--ink-soft); font-size: 13px; }
.dl dd { margin: 0; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.totals { display: grid; gap: 4px; justify-items: end; margin-top: 10px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; gap: 24px; justify-content: space-between; min-width: 240px; }
.totals .big { font-size: 18px; font-weight: 700; }
.totals .due { color: var(--red); }
.notice { padding: 10px 14px; border-radius: 9px; background: var(--sun-bg); color: #7A4E0E; font-size: 14px; }
.notice.ok { background: var(--teal-bg); color: var(--teal); }
.notice.bad { background: var(--red-bg); color: var(--red); }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth .hero { background: var(--ink); color: #DADCEB; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth .hero h1 { color: #fff; font-size: 40px; line-height: 1.1; max-width: 14ch; }
.auth .hero ul { padding-left: 18px; margin: 0; display: grid; gap: 8px; }
.auth .panel { display: grid; place-items: center; padding: 32px 20px; }
.auth .box { width: 100%; max-width: 380px; display: grid; gap: 18px; }
.tabs { display: flex; gap: 4px; background: var(--grey-bg); padding: 4px; border-radius: 10px; }
.tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 7px; font-weight: 600; cursor: pointer; color: var(--ink-soft); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* toast + modal */
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.bad { background: var(--red); }
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(22,26,58,.45); }
dialog form { padding: 22px; display: grid; gap: 16px; }

/* invoice */
.invoice { background: #fff; max-width: 820px; margin: 0 auto; padding: 40px; border: 1px solid var(--line); border-radius: 8px; }
.invoice h1 { font-size: 22px; }
.invoice .ihead { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid var(--ink); padding-bottom: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.invoice .t td, .invoice .t th { padding: 7px 8px; }
.invoice .by { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); }

@media print {
  .side, .topbar, .page-head .btn, .no-print { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .invoice { border: 0; padding: 0; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; padding-top: calc(20px + env(safe-area-inset-top, 0px)); }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .topbar { display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); padding-top: calc(10px + env(safe-area-inset-top, 0px)); position: sticky; top: 0; z-index: 40; }
  .topbar button { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
  .topbar b { font-family: var(--head); }
  .main { padding: 20px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
  .auth { grid-template-columns: 1fr; }
  .auth .hero { padding: 32px 20px; }
  .auth .hero h1 { font-size: 28px; }
  .auth .hero ul { display: none; }
  h1 { font-size: 22px; }
  .invoice { padding: 20px; }
}

/* owner app */
.own { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.own-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.own-day { display: flex; align-items: center; gap: 8px; }
.own-day > span { text-align: center; min-width: 120px; }
.own-hero { background: var(--ink); color: #fff; border-radius: 16px; padding: 20px; display: grid; gap: 18px; }
.own-occ { display: grid; gap: 10px; }
.own-big { font-family: var(--head); font-size: 48px; font-weight: 700; line-height: 1; margin-right: 10px; font-variant-numeric: tabular-nums; }
.own-sub { color: #B9BDD6; font-size: 14px; }
.own-meter { height: 10px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.own-meter i { display: block; height: 100%; background: var(--teal-2); border-radius: 99px; }
.own-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; }
.own-stats span { display: block; font-family: var(--head); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.own-stats small { color: #B9BDD6; font-size: 12px; }
.own-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.own-money { font-family: var(--head); font-size: 26px; font-weight: 600; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.own-money.due { color: var(--red); }
.own-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.own-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.own-three a { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; text-decoration: none; color: var(--ink); }
.own-three b { display: block; font-family: var(--head); font-size: 24px; }
.own-three span { font-size: 13px; color: var(--ink-soft); }
.own-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.own-alerts li a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; font-weight: 500; }
.own-alerts li.bad a { background: var(--red-bg); color: var(--red); }
.own-alerts li.warn a { background: var(--sun-bg); color: #7A4E0E; }
.own-alerts li a::after { content: ' ›'; }
.own-bars { display: grid; gap: 8px; }
.own-bar { display: grid; grid-template-columns: 92px 1fr 72px 44px; gap: 10px; align-items: center; font-size: 13px; }
.own-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.own-bar small { color: var(--ink-soft); text-align: right; }
.own-track { height: 10px; background: var(--grey-bg); border-radius: 99px; overflow: hidden; }
.own-track i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.own-cols { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 150px; align-items: end; }
.own-col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; gap: 4px; min-width: 0; }
.own-col small { font-size: 10px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.own-col i { display: block; width: 100%; background: var(--teal); border-radius: 5px 5px 2px 2px; }
.own-col span { font-size: 12px; color: var(--ink-soft); }
.own-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.own-actions .btn { flex: 1; }
.own-foot { text-align: center; margin: 0 0 8px; }
@media (max-width: 520px) {
  .own-big { font-size: 40px; }
  .own-stats span { font-size: 16px; }
  .own-money { font-size: 21px; }
  .own-bar { grid-template-columns: 70px 1fr 64px; }
  .own-bar small { display: none; }
  .own-col small { display: none; }
}

/* ─── Restaurant ─────────────────────────────────────────────────── */
.grow { flex: 1; }
.t th.right { text-align: right; }
.rtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 18px; overflow-x: auto; }
.rtabs a { padding: 9px 14px; border-bottom: 3px solid transparent; color: var(--ink-soft); font-weight: 600; text-decoration: none; white-space: nowrap; }
.rtabs a.on { color: var(--ink); border-bottom-color: var(--teal); }
.pill.rs-new { background: var(--sun-bg); color: #9A6312; }
.pill.rs-accepted, .pill.rs-preparing { background: var(--blue-bg); color: var(--blue); }
.pill.rs-ready, .pill.rs-out_for_delivery { background: var(--teal-bg); color: var(--teal); }
.pill.rs-delivered { background: var(--grey-bg); color: var(--ink-soft); }
.pill.rs-cancelled, .pill.rp-void { background: var(--red-bg); color: var(--red); }
.pill.rp-unpaid { background: var(--sun-bg); color: #9A6312; }
.pill.rp-paid, .pill.rp-room_bill { background: var(--teal-bg); color: var(--teal); }
.oboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ocol { background: #EDEFE9; border-radius: var(--radius); padding: 12px; min-height: 160px; display: grid; gap: 10px; align-content: start; }
.ocol > h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ocol .count { background: var(--card); border-radius: 999px; padding: 0 9px; font-size: 13px; }
.c-new > h2 { color: #9A6312; }
.ocard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.ocard.new { border-left: 4px solid var(--sun); }
.ocard.late { box-shadow: 0 0 0 2px var(--red-bg), var(--shadow); }
.ocard.fresh { animation: pop 1.6s ease-out 2; }
@keyframes pop { 0% { box-shadow: 0 0 0 0 rgba(232,163,61,.7); } 100% { box-shadow: 0 0 0 14px rgba(232,163,61,0); } }
.ocard header { display: flex; gap: 12px; align-items: center; }
.oroom { background: var(--ink); color: #fff; border-radius: 10px; padding: 4px 10px; text-align: center; min-width: 58px; }
.oroom span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #B9BDD6; }
.oroom b { font-family: var(--head); font-size: 22px; line-height: 1.1; }
.ometa { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.olines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.olines .q { font-weight: 700; display: inline-block; min-width: 26px; }
.inote { margin: 2px 0 0 26px; font-size: 12.5px; color: #9A6312; font-weight: 600; }
.onote { margin: 0; font-size: 13px; background: var(--sun-bg); border-radius: 8px; padding: 6px 8px; }
.onote.bad { background: var(--red-bg); }
.ocard footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 8px; }
.btn.ghost.danger { color: var(--red); }
.vm { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1.5px solid; border-radius: 3px; vertical-align: -2px; background: #fff; }
.vm i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vm.veg { color: #1E8E3E; } .vm.nonveg { color: #8D3B1F; }
.vm.nonveg i { border-radius: 0; width: 0; height: 0; background: none; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid currentColor; }
.cats { display: grid; padding: 8px 12px 12px; }
.catrow { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--line-2); }
.catrow:last-child { border-bottom: 0; }
.catrow.off { opacity: .6; }
.mi { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.mi img, .mi .noimg { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--grey-bg); flex: none; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 320px; }
.switch { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; cursor: pointer; }
.switch input { width: 34px; height: 20px; appearance: none; -webkit-appearance: none; background: #CDD2C7; border-radius: 999px; position: relative; padding: 0; min-height: 0; border: 0; cursor: pointer; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch input:checked { background: var(--teal); }
.switch input:checked::after { left: 16px; }
fieldset.icons { border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; margin: 0; }
fieldset.icons legend { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
fieldset.icons label { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--ink-soft); }
fieldset.icons input { position: absolute; opacity: 0; pointer-events: none; }
fieldset.icons label:has(input:checked) { border-color: var(--teal); color: var(--teal); background: var(--teal-bg); }
.logo-prev { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.qrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.qrcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.qrcard.off { opacity: .75; }
.qrimg { width: 100%; max-width: 180px; aspect-ratio: 1; margin: 0 auto; }
.qrimg svg { width: 100%; height: 100%; display: block; }
.qroff { width: 100%; height: 100%; display: grid; place-items: center; background: var(--grey-bg); border-radius: 8px; color: var(--ink-soft); font-weight: 600; }
.print-sheet { display: none; }
.bars { display: grid; gap: 6px; max-height: 360px; overflow: auto; }
.barrow { display: grid; grid-template-columns: 56px 1fr 92px; gap: 8px; align-items: center; font-size: 13px; }
.barrow i { display: block; height: 12px; border-radius: 3px; background: var(--teal-2); min-width: 2px; }
.barrow b { text-align: right; font-weight: 600; }
.billdoc { max-width: 820px; }
.bhead { display: flex; gap: 14px; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.bhead > div:nth-child(2), .bhead > div:first-child:not(.bno) { flex: 1; min-width: 200px; }
.blogo { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.bno { text-align: right; }
.bmeta { margin-bottom: 14px; }
.totals .grand { font-family: var(--head); font-size: 18px; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
@media (max-width: 1000px) { .oboard { grid-template-columns: 1fr; } }
@media print {
  body.printing-qr .shell, body.printing-qr .topbar, body.printing-qr #toast { display: none !important; }
  body.printing-qr .print-sheet { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0; }
  .pcard { break-inside: avoid; border: 1px dashed #999; padding: 18mm 10mm; text-align: center; font-family: var(--font); height: 138mm; display: grid; align-content: center; gap: 4mm; }
  .pbrand { font-family: var(--head); font-size: 16pt; font-weight: 600; }
  .proom { font-family: var(--head); font-size: 26pt; font-weight: 700; }
  .pqr svg { width: 62mm; height: 62mm; }
  .phint { font-size: 11pt; }
  .pfoot { font-size: 8pt; color: #777; }
  .billdoc { border: 0; box-shadow: none; padding: 0; }
}
/* Roles table in Settings */
.role-matrix th.c, .role-matrix td.c { text-align: center; white-space: nowrap; }
.role-matrix td:first-child { min-width: 220px; }
.role-matrix .yes { color: var(--teal); font-weight: 700; }
.role-matrix .no { color: var(--ink-soft); }
/* Sign-up: owner or staff */
.intent { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.intent legend { font-weight: 600; color: var(--ink); padding: 0; margin-bottom: 8px; font-size: 14px; }
.intent-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card); }
.intent-opt:has(input:checked) { border-color: var(--teal); background: var(--teal-bg); }
.intent-opt input { width: auto; min-height: 0; margin-top: 3px; }
.intent-opt span { display: grid; gap: 2px; }
.intent-opt b { color: var(--ink); font-size: 14px; }
.intent-opt small { color: var(--ink-soft); font-size: 13px; line-height: 1.35; }
/* Signed in, no hotel yet */
.choose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.choose-opt { text-align: left; display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; font: inherit; color: var(--ink-2); }
.choose-opt:hover, .choose-opt:focus-visible { border-color: var(--teal); background: var(--teal-bg); outline: none; }
.choose-opt b { font-size: 17px; color: var(--ink); }
.steps { margin: 12px 0 8px; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.copy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 16px; }
.copy-row code { font-size: 15px; padding: 8px 12px; background: var(--grey-bg); border-radius: 8px; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
button.link { border: 0; background: none; padding: 0; color: var(--teal); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
/* Sidebar: the menu scrolls on short screens; hotel name and Sign out always stay in view */
.side .nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; margin: 0 -6px; padding: 0 6px; }
.side .brand, .side .foot { flex: none; }
.side .foot .signout { margin-top: 10px; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: #DADCEB; text-decoration: none; font-size: 13px; font-weight: 600; }
.side .foot .signout:hover, .side .foot .signout:focus-visible { background: rgba(255,255,255,.06); color: #fff; outline: none; }
.side .foot .signout svg { width: 16px; height: 16px; flex: none; }
@media (max-height: 640px) { .side { padding-top: 14px; padding-bottom: 14px; } .side .brand { padding-bottom: 10px; } .nav a { padding-block: 7px; } }
