/* Azeli PMS */
:root {
  --ink: #0f2a2e; --ink-2: #163b40; --gold: #c9a45c; --gold-d: #a8853f;
  --bg: #f6f3ee; --card: #fff; --line: #e6dfd3; --text: #1d2a2c; --muted: #637173;
  --ok: #2f7a52; --warn: #b7791f; --bad: #b83a2e; --info: #1a4fa3;
  --r: 12px; --sh: 0 6px 20px rgba(15,42,46,.07);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--info); }

.demo-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 18px; background: var(--gold); color: var(--ink); font-size: .85rem; }
.demo-banner button { background: var(--ink); color: #fff; border: 0; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: .8rem; }
.demo-banner a { margin-left: auto; color: var(--ink); font-weight: 600; text-decoration: none; }

.app { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: rgba(255,255,255,.8); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: #fff; }
.brand em { color: var(--gold); font-style: normal; }
.mark { width: 32px; height: 32px; border-radius: 8px; display: block; flex: none; }
#side-nav .grp { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.42); margin: 14px 10px 4px; }
#side-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: rgba(255,255,255,.82); text-decoration: none; font-size: .88rem; }
#side-nav a:hover { background: rgba(255,255,255,.07); }
#side-nav a.on { background: var(--gold); color: var(--ink); font-weight: 600; }
#side-nav .badge { margin-left: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: .68rem; padding: 0 7px; font-weight: 700; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.prop b { display: block; font-size: 1rem; }
.prop span { font-size: .8rem; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user { font-size: .8rem; color: var(--muted); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
#view { padding: 24px; outline: none; }

h1.page { font-family: var(--serif); font-size: 2rem; margin: 0 0 4px; color: var(--ink); }
.sub { color: var(--muted); margin: 0 0 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { margin: 0; }
h2.sec { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-d); margin: 0 0 10px; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: .85rem; background: var(--ink); color: #fff; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ok { background: var(--ok); } .btn-bad { background: var(--bad); }
.btn-sm { padding: 4px 10px; font-size: .78rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); min-width: 0; }
.kpi span { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi b { font-family: var(--serif); font-size: 2rem; color: var(--ink); line-height: 1.2; }
.kpi small { display: block; color: var(--muted); font-size: .78rem; }
.mt { margin-top: 16px; }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.empty { color: var(--muted); padding: 16px 0; text-align: center; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: #eef0ef; color: var(--muted); white-space: nowrap; }
.pill.ok { background: #e2f1e8; color: var(--ok); } .pill.warn { background: #fbefd9; color: var(--warn); }
.pill.bad { background: #f8e1de; color: var(--bad); } .pill.info { background: #e3ebf8; color: var(--info); }
.pill.ink { background: var(--ink); color: #fff; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 500; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Room rack */
.rack { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.room { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 86px; cursor: pointer; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.room:hover { box-shadow: var(--sh); transform: translateY(-1px); }
.room b { font-size: 1.05rem; }
.room small { font-size: .7rem; color: var(--muted); }
.room .g { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room.occ { background: var(--ink); border-color: var(--ink); color: #fff; } .room.occ small { color: rgba(255,255,255,.65); }
.room.dep { background: #f6d2c2; } .room.arr { background: #d6e4f5; }
.room.vc { background: #e1f0e7; } .room.dirty { background: #f5e6b9; } .room.ooo { background: #dcdcdc; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); margin: 0 0 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.1); }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; min-height: 84px; }
.item:hover { border-color: var(--gold); box-shadow: var(--sh); }
.item b { display: block; font-size: .9rem; } .item span { color: var(--gold-d); font-weight: 700; font-size: .85rem; }
.cart { position: sticky; top: 80px; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 700; margin: 12px 0; }
.pay-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Bars */
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-size: .82rem; }
.bar .track { background: #f0ebe2; border-radius: 6px; height: 12px; overflow: hidden; }
.bar .fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-d)); border-radius: 6px; }

/* Forms / modal */
.modal-wrap { position: fixed; inset: 0; background: rgba(15,42,46,.5); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal-wrap[hidden] { display: none; }
.modal { background: #fff; border-radius: 14px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.modal-head h2 { margin: 0; font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.x { border: 0; background: none; font-size: 1.6rem; cursor: pointer; line-height: 1; color: var(--muted); }
.modal-body { padding: 18px 20px 22px; }
.form { display: grid; gap: 12px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--ink); }
.form input, .form select, .form textarea { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 400; font-size: .9rem; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.form .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }
.note { font-size: .8rem; color: var(--muted); background: #f8f5ef; border-radius: 8px; padding: 8px 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 14px; font-size: .88rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }

.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--sh); max-width: 340px; font-size: .86rem; animation: tin .25s ease; }
.toast b { color: var(--gold); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* Booking engine (guest-facing look) */
.be { max-width: 860px; margin: 0 auto; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--sh); border: 1px solid var(--line); }
.be-hero { padding: 36px 28px; color: #fff; background: radial-gradient(circle at 80% 10%, rgba(201,164,92,.5), transparent 45%), linear-gradient(160deg, #2b5a5f, var(--ink)); }
.be-hero h2 { font-family: var(--serif); font-size: 2rem; margin: 0 0 4px; }
.be-search { display: grid; grid-template-columns: 1fr 1fr .6fr auto; gap: 10px; align-items: end; padding: 16px 20px; background: #fbf8f2; border-bottom: 1px solid var(--line); }
.be-room { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.be-thumb { height: 96px; border-radius: 10px; background: linear-gradient(135deg, #2b5a5f, #c9a45c); }
.be-room h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.4rem; color: var(--ink); }
.be-price { text-align: right; } .be-price b { display: block; font-size: 1.1rem; }

@media print {
  .demo-banner, .side, .topbar, .no-print, .toasts { display: none !important; }
  .app { display: block; } #view { padding: 0; } .card { box-shadow: none; }
  .modal-wrap { position: static; background: none; display: block; padding: 0; }
  .modal { box-shadow: none; max-height: none; width: 100%; }
  body.printing-modal #view { display: none; }
}

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: 1fr; }
  .cart { position: static; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 40; transform: translateX(-100%); transition: transform .25s; height: 100vh; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(15,42,46,.45); }
  .menu-btn { display: inline-block; }
  .g3, .g2 { grid-template-columns: 1fr; }
  #view { padding: 16px; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .user { display: none; }
  .be-search { grid-template-columns: 1fr 1fr; }
  .be-room { grid-template-columns: 1fr; }
  .be-price { text-align: left; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi b { font-size: 1.5rem; }
  .form .two { grid-template-columns: 1fr; }
  .demo-banner a { margin-left: 0; }
  .bar { grid-template-columns: 90px 1fr auto; }
}

/* ---------- app additions ---------- */
.muted { color: var(--muted); } .small { font-size: .8rem; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
.stack { display: grid; gap: 12px; } .mt0 { margin-top: 0; } .mb { margin-bottom: 16px; }
.search { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 220px; background: #fff; }
.link { background: none; border: 0; padding: 0; color: var(--info); cursor: pointer; font: inherit; text-decoration: underline; }
.void td { text-decoration: line-through; color: var(--muted); }
.void td:last-child { text-decoration: none; }
.err { color: var(--bad); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 80% 10%, rgba(201,164,92,.35), transparent 45%), var(--ink); }
.login { width: min(400px, 100%); background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.login .brand { color: var(--ink); padding: 0 0 18px; }
.login h1 { font-family: var(--serif); font-size: 1.8rem; margin: 0 0 4px; color: var(--ink); }
.user-menu { display: flex; align-items: center; gap: 10px; }
.avail td.free0 { background: #f8e1de; color: var(--bad); font-weight: 700; }
.avail td.free1 { background: #fbefd9; }
.avail th, .avail td { text-align: center; }
.avail td:first-child, .avail th:first-child { text-align: left; }
.inv-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.inv-head h2 { font-family: var(--serif); font-size: 1.6rem; margin: 0; color: var(--ink); }
.only-print { display: none; }
@media print { .only-print { display: block; } }
.legend i.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.1); }
.legend i.occ { background: var(--ink); } .legend i.dep { background: #f6d2c2; } .legend i.vc { background: #e1f0e7; } .legend i.dirty { background: #f5e6b9; } .legend i.ooo { background: #dcdcdc; }
.toast.toast-bad { background: var(--bad); }
.form label.row { display: flex; font-weight: 500; }
.form label.row input { width: auto; }
/* ---------- food & beverage ---------- */
a.room { text-decoration: none; color: inherit; }
.void-line, .void-line b { text-decoration: line-through; color: var(--muted); }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ticket { border-top: 5px solid var(--gold); }
.ticket.t-ready { border-top-color: var(--ok); } .ticket.t-served { opacity: .55; border-top-color: var(--line); }
.ticket-items { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 6px; font-size: 1rem; }
.ticket-items em { color: var(--bad); font-size: .85rem; }
.tender { align-items: end; }
/* ---------- stores & purchasing ---------- */
.form .three { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.form .line-row { margin-top: -4px; }
.form .line-row label { font-weight: 500; }
.count-input { width: 120px; min-width: 0; }
.modal:has(form[data-form=req-act]), .modal:has(form[data-form=po-act]), .modal:has(form[data-form=new-po]), .modal:has(form[data-form=receive]), .modal:has(form[data-form=new-req]) { width: min(820px, 100%); }
@media (max-width: 520px) { .form .three { grid-template-columns: 1fr 1fr; } .form .three label:first-child { grid-column: span 2; } }
/* ---------- distribution ---------- */
.rates-grid td.rc { text-align: center; font-size: .8rem; min-width: 74px; }
.rates-grid td.rc b { display: block; font-size: .85rem; }
.rates-grid td.rc b.custom { color: var(--gold-d); }
.rates-grid td.rc span { display: block; color: var(--muted); font-size: .72rem; }
.rates-grid td.rc.full { background: #fbefd9; } .rates-grid td.rc.closed { background: #f8e1de; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: #f3efe8; padding: 2px 6px; border-radius: 6px; word-break: break-all; }
fieldset { border: 0; padding: 0; margin: 0; }
/* ---------- people ---------- */
.roster select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: .78rem; max-width: 100px; }
.roster td, .roster th { text-align: center; } .roster td:first-child, .roster th:first-child { text-align: left; }
.net-pay { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; border-radius: 10px; padding: 14px 18px; margin: 14px 0 8px; }
.net-pay b { font-family: var(--serif); font-size: 1.6rem; color: var(--gold); }

/* events: banquet event order */
.beo h2 { margin: 0; font-family: var(--serif); }
.beo-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; margin: 16px 0; }
.beo-facts dt { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.beo-facts dd { margin: 2px 0 0; font-weight: 600; }
.beo-depts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.beo-depts section { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 10px 12px; break-inside: avoid; }
.beo-depts h3 { margin: 0 0 4px; font-size: .95rem; }
.beo-depts p { margin: 0; white-space: pre-line; }
@media (max-width: 520px) { .beo-facts, .beo-depts { grid-template-columns: 1fr 1fr; } .beo-depts { grid-template-columns: 1fr; } }
.login-brand .mark { width: 48px; height: 48px; border-radius: 11px; }
.login-brand span { font-size: 2rem; line-height: 1; }
.login-brand small { display: block; margin-top: 5px; font-family: var(--sans, Inter, sans-serif); font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark, #a8853f); }
.mail-text { white-space: pre-wrap; font-size: .82rem; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 60vh; overflow: auto; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
/* ---------- Phase 10: charts ---------- */
.viz-wrap { width: 100%; overflow: hidden; }
svg.viz { width: 100%; height: auto; display: block; font-family: var(--sans, Inter, sans-serif); }
svg.viz .grid { stroke: #ece6db; stroke-width: 1; }
svg.viz .ax { fill: var(--muted); font-size: 11px; }
svg.viz .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.viz .ring { stroke: #fff; stroke-width: 2; }
svg.viz .lbl, svg.viz .val { fill: var(--text); font-size: 12px; font-weight: 600; }
svg.viz .cat { fill: var(--text); font-size: 12.5px; }
svg.viz .track { fill: #f3efe8; }
svg.viz .xh { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
svg.viz rect.hit { cursor: crosshair; }
.viz-legend { display: flex; gap: 16px; font-size: .8rem; color: var(--text); margin: 0 0 6px; }
.viz-legend span, .viz-tip div { display: inline-flex; align-items: center; gap: 6px; }
i.sw { display: inline-block; width: 12px; height: 3px; border-radius: 2px; }
.viz-tip { position: fixed; z-index: 70; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(15,42,46,.15); padding: 8px 10px; font-size: .8rem; pointer-events: none; display: grid; gap: 3px; }
.viz-tip[hidden] { display: none; }
.sub3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
.mt0 { margin-top: 0; }
.grid.mini { gap: 8px; }
.grid.mini > div { background: #f8f5ef; border-radius: 10px; padding: 10px; display: grid; }
.grid.mini b { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); line-height: 1.1; }
.grid.mini span { font-size: .75rem; color: var(--muted); }
/* rooms: one hue, light (quiet) to dark (busy) */
.room-heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.rh { border-radius: 8px; padding: 8px; display: grid; gap: 2px; }
.rh b { font-size: .95rem; } .rh span { font-size: .75rem; }
.rh.l0 { background: #eaf2fc; color: #1d2a2c; } .rh.l1 { background: #c3daf5; color: #1d2a2c; } .rh.l2 { background: #86b5ea; color: #10233a; }
.rh.l3 { background: #3c84d8; color: #fff; } .rh.l4 { background: #1c5aa3; color: #fff; }
.heat-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.heat-legend .rh { width: 14px; height: 14px; padding: 0; border-radius: 4px; display: inline-block; margin-left: 8px; }
details summary { cursor: pointer; color: var(--info); margin: 8px 0; }
/* ---------- letterhead, invoices, registration card ---------- */
.letterhead { display: none; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 16px; }
.lh-left { display: flex; gap: 14px; align-items: flex-start; }
.lh-logo { max-height: 72px; max-width: 180px; object-fit: contain; }
.lh-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.lh-legal { font-weight: 600; font-size: .85rem; }
.lh-addr { font-size: .78rem; color: #444; white-space: pre-line; }
.lh-right { text-align: right; font-size: .8rem; }
.lh-right .lh-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .04em; }
.lh-right span { color: var(--muted); }
.inv-footer { white-space: pre-line; font-size: .82rem; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 12px; }
.sign-row { gap: 40px; margin-top: 46px; }
.sign-row div { flex: 1; border-top: 1px solid #333; padding-top: 4px; font-size: .78rem; }
.logo-preview { max-height: 64px; max-width: 200px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: #fff; }
#prop-name.has-demo::after { content: "SAMPLE DATA"; margin-left: 10px; font: 600 .62rem/1 var(--sans, Inter, sans-serif); letter-spacing: .08em; background: #fbefd9; color: var(--warn); border-radius: 999px; padding: 4px 8px; vertical-align: 3px; }
@media print {
  @page { margin: 12mm; }
  .letterhead.only-print { display: flex !important; }
  .sign-row.only-print { display: flex !important; }
  .tabs, details, .viz-tip, .page-head .row, .page-head .sub a { display: none !important; }
  .card { break-inside: avoid; border: 1px solid #ddd; }
  .grid.g4 { grid-template-columns: repeat(4, 1fr); } .grid.g2, .grid.g3 { grid-template-columns: repeat(2, 1fr); }
  .rh.l3, .rh.l4, .rh.l2, .rh.l1, .rh.l0 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  svg.viz { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #prop-name.has-demo::after { content: none; }
  /* the registration card prints on its own; the invoice prints without it */
  .no-print-unless-reg { display: none !important; }
  body.print-reg #view > *:not(.reg-card) { display: none !important; }
  body.print-reg .no-print-unless-reg { display: block !important; border: 0; }
  body.print-reg .letterhead.reg-only { display: flex !important; }
}
@media print { #view a { color: inherit; text-decoration: none; } .letterhead ~ .page-head h1.page { display: none; } }

/* ---------- two-step sign-in ---------- */
.login.form.wide { max-width: 520px; }
.qr { display: grid; place-items: center; margin: 6px 0; }
.qr svg { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 10px; }
.center { text-align: center; }
.code-input { font-size: 1.3rem !important; letter-spacing: .3em; text-align: center; }
.steps-list { padding-left: 18px; margin: 0 0 6px; font-size: .9rem; display: grid; gap: 4px; }
.recovery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.recovery code { background: #f8f5ef; border: 1px dashed var(--line); border-radius: 8px; padding: 8px; text-align: center; font-size: 1rem; letter-spacing: .08em; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- WhatsApp inbox & phone book ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pad { padding: 14px; }
#side-nav a .badge { margin-left: auto; background: #1baf7a; color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 700; padding: 1px 7px; }
.wa { display: grid; grid-template-columns: 300px minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.wa .card { padding: 0; }
.wa-list form { padding: 12px 12px 0; }
.wa-list input { width: 100%; }
.wa-filters { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.wa-filters button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: .76rem; cursor: pointer; }
.wa-filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
#wa-items { max-height: 66vh; overflow-y: auto; }
.wa-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.wa-item:hover { background: #faf8f4; }
.wa-item.on { background: #f3eee4; box-shadow: inset 3px 0 0 var(--gold); }
.wa-top, .wa-sub { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.wa-prev { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-item .badge, .wa-sub .badge { background: #1baf7a; color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 700; padding: 1px 7px; }
.wa-thread { display: flex; flex-direction: column; min-height: 60vh; }
.wa-empty { justify-content: center; }
.wa-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.wa-head > div { flex: 1; }
.wa-back { display: none; text-decoration: none; font-size: 1.2rem; color: var(--ink); }
.wa-msgs { flex: 1; overflow-y: auto; max-height: 56vh; min-height: 260px; padding: 14px 16px; background: #f4efe6; }
.wa-day { text-align: center; font-size: .72rem; color: var(--muted); margin: 10px 0; }
.wa-msg { display: flex; margin: 4px 0; }
.wa-msg.out { justify-content: flex-end; }
.wa-bubble { max-width: 78%; padding: 8px 11px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.wa-msg.out .wa-bubble { background: #dcf3e6; border-color: #c4e6d2; }
.wa-meta { display: block; text-align: right; font-size: .68rem; color: var(--muted); margin-top: 3px; }
.wa-meta .read { color: #2a78d6; font-weight: 600; } .wa-meta .err { color: var(--bad); font-weight: 600; }
.wa-err { display: block; font-size: .72rem; color: var(--bad); margin-top: 3px; }
.wa-tpl { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.wa-compose { padding: 12px 16px; border-top: 1px solid var(--line); }
.wa-compose textarea { width: 100%; resize: vertical; }
.wa-tpl-form .wa-msg { margin-bottom: 8px; }
.wa-practice { padding: 8px 16px 12px; border-top: 1px dashed var(--line); }
.wa-practice input { flex: 1; }
.wa-guest { padding: 16px !important; }
.wa-guest h2.sec { margin-top: 0; }
@media (max-width: 1100px) { .wa { grid-template-columns: 260px minmax(0, 1fr); } .wa-guest { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .wa { grid-template-columns: 1fr; }
  .wa.has-open .wa-list { display: none; }
  .wa-back { display: inline; }
  .wa-bubble { max-width: 90%; }
  #wa-items { max-height: none; }
}
@media print { .wa-compose, .wa-practice, .wa-list { display: none; } }

/* ---------- events calendar ---------- */
.m0 { margin: 0; }
.cal-nav { flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.cal-legend { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cal-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.cal { border-collapse: collapse; min-width: 100%; font-size: .74rem; }
.cal th, .cal td { border: 1px solid var(--line); padding: 3px; vertical-align: top; }
.cal thead th { background: #faf8f4; text-align: center; font-weight: 600; min-width: 64px; text-transform: none; letter-spacing: 0; }
.cal thead th span { display: block; color: var(--muted); font-weight: 400; }
.cal th.cal-room { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; min-width: 130px; font-size: .8rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
.cal th.cal-room span { display: block; }
.cal .wk { background: #fbf9f5; }
.cal .today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal td.past { background: #f4f2ee; }
.cal-cell { height: 54px; position: relative; }
.cal-cell.free:not(.past):hover { background: #f1f8f4; }
.cal-ev { display: block; border-radius: 4px; padding: 2px 4px; margin-bottom: 2px; text-decoration: none; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; font-size: .7rem; line-height: 1.3; }
.cal-legend .cal-ev { display: inline-block; }
.cal-ev.st-confirmed { background: #2a78d6; }
.cal-ev.st-tentative { background: #eda100; color: #1d2a2c; }
.cal-ev.st-enquiry { background: #fff; color: var(--ink); border: 1px dashed #8a9496; }
.cal-ev.st-completed { background: #1baf7a; }
.cal-add { position: absolute; right: 3px; bottom: 3px; border: 1px solid var(--line); background: #fff; border-radius: 4px; width: 22px; height: 22px; line-height: 1; cursor: pointer; color: var(--muted); opacity: .55; }
.cal-cell:hover .cal-add, .cal-add:focus { opacity: 1; color: var(--ink); border-color: var(--gold); }
@media print { .cal-add { display: none; } .cal-wrap { overflow: visible; } }

/* ---------- front-desk assistant ---------- */
.ai-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1000px) { .ai-grid { grid-template-columns: 1fr; } }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.todo li:last-child { border-bottom: 0; }
.todo-ic { flex: 0 0 28px; height: 28px; border-radius: 50%; background: #eef0ef; display: grid; place-items: center; font-weight: 700; color: var(--ink); }
.todo-urgent .todo-ic { background: #f8e1de; color: var(--bad); }
.todo-high .todo-ic { background: #fbefd9; color: var(--warn); }
.todo a { color: var(--ink); text-decoration: none; }
.todo a:hover b { text-decoration: underline; }
.ai-log { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 10px; }
.ai-msg { padding: 9px 12px; border-radius: 10px; font-size: .9rem; line-height: 1.5; max-width: 92%; }
.ai-msg p { margin: 0 0 6px; } .ai-msg p:last-child { margin: 0; } .ai-msg ul { margin: 4px 0 6px; padding-left: 18px; }
.ai-msg.user { align-self: flex-end; background: var(--ink); color: #fff; }
.ai-msg.assistant { align-self: flex-start; background: #f4efe6; border: 1px solid var(--line); }
.ai-draft { margin-top: 8px; background: #fff; border: 1px dashed var(--gold); border-radius: 8px; padding: 8px 10px; }
.ai-draft p { margin: 4px 0 8px; }
.ai-ask textarea { width: 100%; resize: vertical; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fc-chart { width: 100%; height: auto; color: var(--text); }

/* ==========================================================================
   Operations console theme (Phase 14). Dense, neutral, one action colour.
   Everything above stays as structure; this block sets the look.
   ========================================================================== */
:root {
  --ink: #142133; --ink-2: #1d2d44;
  --gold: #1f5fd1; --gold-d: #1f5fd1;             /* the former accent is now the action blue */
  --accent: #1f5fd1; --accent-d: #174ba8; --accent-l: #e8f0fd;
  --bg: #eef1f4; --card: #fff; --line: #d9dfe6; --line-2: #e8ecf0; --text: #18212d; --muted: #5b6878; --faint: #8794a3;
  --ok: #1d7a4d; --warn: #a3640a; --bad: #c23a2b; --info: #1f5fd1;
  --r: 6px; --sh: none;
  --serif: "IBM Plex Sans", system-ui, sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
body { font-size: 13.5px; line-height: 1.45; background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.mono, code { font-family: var(--mono); }

/* shell */
.app { grid-template-columns: 208px minmax(0, 1fr); }
.side { background: #101a28; padding: 0 0 16px; border-right: 1px solid #0a121c; }
.brand { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: .01em; padding: 0 14px; height: 48px; border-bottom: 1px solid rgba(255,255,255,.06); margin-bottom: 6px; }
.brand em { color: #8fb4ff; font-weight: 400; }
.side .mark { width: 24px; height: 24px; border-radius: 5px; }
#side-nav .grp { font-size: .64rem; letter-spacing: .1em; color: rgba(255,255,255,.38); margin: 14px 14px 3px; font-weight: 600; }
#side-nav a { border-radius: 0; padding: 5px 14px 5px 11px; border-left: 3px solid transparent; font-size: .84rem; color: rgba(255,255,255,.74); }
#side-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
#side-nav a.on { background: rgba(79,140,255,.14); color: #fff; font-weight: 600; border-left-color: #4f8cff; }
#side-nav a .badge, #side-nav .badge { background: #2e7cf6; border-radius: 3px; font-size: .68rem; padding: 0 6px; }

.topbar { height: 48px; padding: 0 16px; gap: 12px; box-shadow: none; }
.prop b { font-size: .88rem; font-weight: 600; }
.prop span { font-size: .74rem; }
.top-actions { gap: 6px; }
.user { font-size: .76rem; }
#view { padding: 16px 20px 28px; }

.gsearch { position: relative; flex: 0 1 380px; margin-left: 8px; }
.gsearch input { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 5px; padding: 0 64px 0 30px; background: #f6f8fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%235b6878' stroke-width='2'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath d='M9.5 9.5 13 13'/%3E%3C/svg%3E") no-repeat 10px center; font-size: .84rem; }
.gsearch input:focus { outline: 2px solid var(--accent); outline-offset: -1px; background-color: #fff; }
.gsearch kbd { position: absolute; right: 8px; top: 7px; font-family: var(--mono); font-size: .66rem; color: var(--faint); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; background: #fff; pointer-events: none; }
.gresults { position: absolute; top: 36px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 30px rgba(16,26,40,.16); z-index: 30; max-height: 70vh; overflow-y: auto; }
.gresults[hidden] { display: none; }
.gresults .gh { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 8px 10px 2px; font-weight: 600; }
.gresults a { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; padding: 6px 10px; text-decoration: none; color: var(--text); font-size: .84rem; align-items: center; }
.gresults a:hover, .gresults a.sel { background: var(--accent-l); }
.gresults a code { font-size: .76rem; color: var(--muted); }
.gresults .none { padding: 12px 10px; color: var(--muted); font-size: .84rem; }

/* headings */
h1.page { font-family: var(--sans); font-size: 1.22rem; font-weight: 600; letter-spacing: -.005em; margin: 0 0 2px; color: var(--text); }
.sub { font-size: .82rem; margin: 0 0 14px; }
.page-head { align-items: center; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
h2.sec { font-size: .8rem; letter-spacing: 0; text-transform: none; color: var(--text); font-weight: 600; margin: 0 0 8px; }

/* buttons */
.btn { border-radius: 5px; padding: 6px 12px; font-weight: 500; font-size: .82rem; background: var(--ink-2); line-height: 1.3; }
.btn:hover { filter: none; background: #26384f; }
.btn-gold { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-gold:hover { background: var(--accent-d); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: #f4f6f9; border-color: #c4ccd6; }
.btn-ok { background: var(--ok); } .btn-ok:hover { background: #17633e; }
.btn-bad { background: var(--bad); } .btn-bad:hover { background: #a32f22; }
.btn-sm { padding: 3px 8px; font-size: .76rem; }

/* panels and tables */
.grid { gap: 12px; }
.card { border-radius: var(--r); padding: 14px; box-shadow: none; }
.mt { margin-top: 12px; }
.kpi { padding: 10px 14px; }
.kpi span { font-size: .66rem; letter-spacing: .08em; font-weight: 600; }
.kpi b { font-family: var(--sans); font-size: 1.45rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi small { font-size: .74rem; }
th, td { padding: 5px 8px; border-bottom-color: var(--line-2); }
th { font-size: .66rem; letter-spacing: .06em; background: #f7f9fb; border-bottom: 1px solid var(--line); color: var(--muted); }
tbody tr:hover td { background: #f7faff; }
tr.total td { border-top-color: var(--text); }
td a { text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }

.pill { border-radius: 3px; padding: 1px 6px; font-size: .68rem; font-weight: 600; background: #eef1f4; color: #4c5a69; letter-spacing: .01em; }
.pill.ok { background: #e3f3ea; color: var(--ok); } .pill.warn { background: #fdf1dc; color: var(--warn); }
.pill.bad { background: #fbe6e3; color: var(--bad); } .pill.info { background: var(--accent-l); color: var(--accent-d); }
.pill.ink { background: #22344c; color: #fff; }

.tabs { gap: 0; margin-bottom: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 7px 12px; font-size: .84rem; color: var(--muted); margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: none; color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* forms */
.form { gap: 10px; }
.form .two, .form .three { gap: 10px; }
.form label { font-size: .74rem; font-weight: 500; color: var(--muted); gap: 3px; }
.form input, .form select, .form textarea { padding: 5px 8px; min-height: 32px; border: 1px solid #cdd5de; border-radius: 4px; font-size: .86rem; color: var(--text); }
.form textarea { min-height: 54px; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: #aab5c2; }
.form input:focus, .form select:focus, .form textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.form input:required + .req, .form .req { color: var(--bad); }
.form fieldset.plain legend, .sub3 { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--faint); }
.note { background: #f4f6f9; border: 1px solid var(--line-2); border-radius: 4px; color: #4c5a69; }
.note.err { background: #fdf0ee; border-color: #f3cdc7; }
.kv { font-size: .84rem; gap: 3px 14px; }
.kv dd { font-weight: 500; }

/* modal */
.modal-wrap { background: rgba(12,20,32,.45); }
.modal { border-radius: 8px; box-shadow: 0 24px 60px rgba(12,20,32,.28); }
.modal-head { padding: 10px 16px; }
.modal-head h2 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--text); }
.modal-body { padding: 14px 16px 16px; }
.modal.wide { width: min(1080px, 100%); }
.modal:has(form[data-form=booking]), .modal:has(form[data-form=company-form]), .modal:has(form[data-form=supplier-form]) { width: min(980px, 100%); }
.toast { border-radius: 5px; background: #1b2a3e; font-size: .82rem; }
.toast b { color: #9fc0ff; }

/* room board */
.room { border-radius: 4px; min-height: 72px; padding: 7px 8px; }
.room:hover { box-shadow: 0 0 0 2px var(--accent); transform: none; }
.room b { font-family: var(--mono); font-size: .95rem; }
.room.occ { background: #22344c; border-color: #22344c; }
.room.dep { background: #fde3d6; } .room.arr { background: #dbe8fd; } .room.vc { background: #e1f3e8; } .room.dirty { background: #fbefc9; } .room.ooo { background: #dfe3e8; }

/* login */
.login-wrap { background: #101a28; }
.login { border-radius: 8px; padding: 28px 26px; }
.login h1 { font-family: var(--sans); font-size: 1.3rem; font-weight: 600; }
.login-brand small { color: var(--muted); }
.brand.login-brand span { font-size: 1.5rem; }

/* misc existing pieces */
.todo li { padding: 7px 0; }
.todo-ic { flex-basis: 24px; height: 24px; border-radius: 4px; font-size: .8rem; }
.ai-msg.user { background: #22344c; }
.ai-msg.assistant { background: #f4f6f9; }
.wa-msgs { background: #eef1f4; }
.wa-msg.out .wa-bubble { background: #e3edfc; border-color: #c9dbfa; }
.wa-item.on { background: var(--accent-l); box-shadow: inset 3px 0 0 var(--accent); }
.cal-ev.st-confirmed { background: #1f5fd1; }
.demo-banner { background: #fdf1dc; color: #6b4708; border-bottom: 1px solid #f2dcb0; }
.demo-banner button { background: #6b4708; }
#prop-name.has-demo::after { border-radius: 3px; }

/* the booking form */
.bk { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); gap: 14px; align-items: start; }
.bk-sec { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.bk-sec + .bk-sec { margin-top: 10px; }
.bk-sec > h3 { margin: 0 0 8px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.bk-rooms { width: 100%; }
.bk-rooms td { padding: 4px 4px; border: 0; vertical-align: top; }
.bk-rooms th { background: none; border: 0; padding: 0 4px 2px; }
.bk-rooms select, .bk-rooms input { width: 100%; min-height: 30px; padding: 4px 6px; border: 1px solid #cdd5de; border-radius: 4px; font-size: .84rem; }
.bk-rooms .n { width: 58px; }
.bk-rooms td.price { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 9px; font-size: .84rem; }
.bk-sum { position: sticky; top: 56px; background: #f7f9fb; }
.bk-sum dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; font-size: .84rem; }
.bk-sum dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.bk-sum .tot { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; font-weight: 600; font-size: .95rem; }
.bk-avail { font-size: .76rem; color: var(--muted); }
.bk-avail b { color: var(--text); }
.guest-hits { border: 1px solid var(--line); border-radius: 4px; margin-top: 4px; max-height: 180px; overflow-y: auto; }
.guest-hits button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line-2); background: #fff; padding: 6px 8px; cursor: pointer; font-size: .82rem; }
.guest-hits button:hover { background: var(--accent-l); }
.picked { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--accent-l); border: 1px solid #c9dbfa; border-radius: 4px; padding: 6px 8px; font-size: .84rem; }
.paydet { display: contents; }
.receipt { font-family: var(--mono); font-size: .82rem; border: 1px dashed var(--line); padding: 12px; max-width: 340px; margin: 0 auto; }
.receipt h3 { font-family: var(--sans); text-align: center; margin: 0 0 6px; font-size: .95rem; }
.receipt .row2 { display: flex; justify-content: space-between; gap: 8px; }
@media (max-width: 860px) {
  .bk { grid-template-columns: minmax(0, 1fr); }
  .gsearch { order: 3; flex-basis: 100%; margin: 0 0 8px; }
  .topbar { height: auto; padding: 8px 12px; }
}
@media print { .gsearch { display: none; } }

@media print {
  body.printing-receipt * { visibility: hidden; }
  body.printing-receipt #receipt, body.printing-receipt #receipt * { visibility: visible; }
  body.printing-receipt #receipt { position: absolute; left: 0; top: 0; border: 0; max-width: 80mm; }
  body.printing-receipt .modal-wrap { position: static; background: none; }
}

.bk-rooms td:nth-child(1) { min-width: 150px; } .bk-rooms td:nth-child(2) { min-width: 130px; } .bk-rooms td:nth-child(5) { min-width: 110px; }
.bk-rooms td:nth-child(3), .bk-rooms td:nth-child(4) { width: 64px; }
.bk-rooms .tbl-scroll { overflow-x: auto; }
@media (max-width: 860px) { .bk-sum { position: static; } .bk-rooms td:nth-child(1), .bk-rooms td:nth-child(2) { min-width: 120px; } }
@media (max-width: 520px) { .bk-sec .three, .bk-sec .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .bk-sec .three > label:first-child { grid-column: span 2; } .modal-body { padding: 10px; } }
.bk > * { min-width: 0; }

/* tick-box chips (preferences, amenities, features, weekdays) */
.chipset { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex !important; align-items: center; cursor: pointer; font-size: .78rem !important; font-weight: 500; color: var(--text) !important; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { border: 1px solid #cdd5de; border-radius: 4px; padding: 3px 8px; background: #fff; user-select: none; }
.chip:hover span { border-color: #aab5c2; }
.chip input:checked + span { background: var(--accent-l); border-color: var(--accent); color: var(--accent-d); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.modal:has(form[data-form=guest-form]), .modal:has(form[data-form=rt-form]), .modal:has(form[data-form=plan-form]) { width: min(1000px, 100%); }

/* ---------- housekeeping board ---------- */
.w-0 { width: 0%; }
.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-50 { width: 50%; }
.w-55 { width: 55%; }
.w-60 { width: 60%; }
.w-65 { width: 65%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }
.w-95 { width: 95%; }
.w-100 { width: 100%; }
.hk-progress, .hk-mini { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin: -4px 0 12px; }
.hk-mini { margin: 0; width: 120px; }
.hk-progress span, .hk-mini span { display: block; height: 100%; background: var(--ok); }
.hk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.hk-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid #aab5c2; border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.hk-card.hi { border-left-color: var(--bad); }
.hk-card.st-in_progress { border-left-color: var(--accent); background: #f7faff; }
.hk-card.st-done, .hk-card.st-inspected { border-left-color: var(--ok); opacity: .82; }
.hk-card.st-skipped { border-left-color: var(--warn); }
.hk-card header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hk-no { font-family: var(--mono); font-size: 1.35rem; margin-right: 4px; }
.hk-st { margin-left: auto; }
.hk-card p { margin: 0; }
.hk-card footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.hk-card footer .btn { padding: 8px 14px; font-size: .86rem; }
.hk-card footer select { min-height: 34px; border: 1px solid #cdd5de; border-radius: 4px; padding: 4px 6px; font-size: .82rem; }
.room small.oos { color: var(--warn); font-weight: 600; }
.room.occ small.oos { color: #ffd38a; }
@media (max-width: 520px) { .hk-grid { grid-template-columns: 1fr; } .hk-card footer .btn { flex: 1; justify-content: center; padding: 11px 10px; font-size: .95rem; } .hk-no { font-size: 1.6rem; } }

/* phones: one column (the sidebar slides in from the menu button) */
@media (max-width: 860px) { .app { grid-template-columns: minmax(0, 1fr); } .side { width: 250px; } .top-actions { flex-wrap: wrap; } .topbar .user { display: none; } }

/* rights matrix */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.perm-mod { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 0; }
.perm-mod legend { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 0 4px; }
.perm-mod legend .link { text-transform: none; letter-spacing: 0; color: var(--accent); }
.form label.perm { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--text); font-size: .82rem; padding: 2px 0; }
.form label.perm input { width: auto; min-height: 0; margin-top: 3px; }
.modal:has(form[data-form=rights-form]), .modal:has(form[data-form=role-form]) { width: min(1080px, 100%); }

/* buying signals */
.intent { border: 1px solid var(--line); border-radius: 6px; padding: 10px; margin-bottom: 12px; background: #fafbfc; }
.intent.st-ready { border-color: #f3cdc7; background: #fdf6f5; }
.intent.st-buyer { border-color: #f2dcb0; background: #fffaf0; }
.intent h3 { margin: 0 0 6px; }
.meter { display: grid; grid-template-columns: 96px 1fr 38px; gap: 6px; align-items: center; font-size: .76rem; margin: 3px 0; }
.meter .hk-mini { width: auto; }
.meter b { text-align: right; font-variant-numeric: tabular-nums; }
.sig { list-style: none; padding: 0; margin: 8px 0; font-size: .8rem; }
.sig li { padding: 3px 0; border-bottom: 1px dashed var(--line-2); }
.sig li b { display: inline-block; min-width: 30px; color: var(--ok); }
.sig li.neg b { color: var(--bad); }

.demo-strip { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 6px 16px; background: #e8f0fd; border-bottom: 1px solid #c9dbfa; font-size: .82rem; }
#demo-entry .btn { width: 100%; justify-content: center; }

.snip { display: flex; gap: 8px; align-items: flex-start; } .snip textarea { flex: 1; font-size: .78rem; background: #f6f8fa; resize: vertical; min-width: 0; }
tr.row-hot td { background: #fff8e6; }
@media (max-width: 860px) { .snip { flex-direction: column; align-items: stretch; } }
.card-acts { display: flex; flex-direction: column; gap: 4px; align-items: stretch; min-width: 112px; }
.card-acts .btn { justify-content: center; }

/* ================= Phase 19: the app on phones and computers ================= */
.beta-tag { margin-left: auto; font-family: var(--mono, ui-monospace, monospace); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: #a9c3f5; border: 1px solid rgba(169,195,245,.45); border-radius: 4px; padding: 1px 5px; }
.side-account { display: none; }
.side-foot { padding: 10px 16px 16px; font-size: .7rem; color: rgba(255,255,255,.4); }
.net-strip { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 7px 16px; background: #fdecea; border-bottom: 1px solid #f3c4bf; color: #7a1d14; font-size: .84rem; }
.net-strip.update { background: #e8f0fd; border-color: #c9dbfa; color: #142133; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.kpis .kpi { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; max-width: 520px; }
.golive-bar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.golive-bar progress { flex: 1; min-width: 160px; height: 10px; accent-color: var(--accent); }
.golive-card { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 3px solid var(--accent); margin-bottom: 14px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: #eef1f5; color: var(--muted); }
.checklist li.done .tick { background: #e3f4ea; color: #1e7a46; }
.checklist li.todo .tick { background: #fdecea; color: #b3261e; }
.steps { padding-left: 1.2em; } .steps li { margin-bottom: 6px; }
.tabbar { display: none; }

@media (max-width: 860px) {
  /* bottom tab bar: the four most used places, then More (the full menu) */
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #101a28; border-top: 1px solid #22324a;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; border: 0; background: none;
    color: rgba(255,255,255,.66); font: inherit; font-size: .68rem; font-weight: 500; text-decoration: none; border-radius: 8px; cursor: pointer; }
  .tabbar span { font-size: 1.2rem; line-height: 1; }
  .tabbar a.on { color: #fff; background: rgba(255,255,255,.08); }
  .tab-badge { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 17px; height: 17px; border-radius: 9px; background: #1f5fd1; color: #fff; font-style: normal; font-size: .64rem; display: grid; place-items: center; padding: 0 4px; }
  .tab-badge[hidden] { display: none; }
  #view { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); }
  /* the full menu slides in from the left and carries the account links */
  .side { width: min(300px, 86vw); overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); }
  .side-account { display: block; border-top: 1px solid rgba(255,255,255,.1); margin-top: 8px; padding-top: 4px; }
  .side-account a[hidden] { display: none; }
  .topbar { padding-top: calc(8px + env(safe-area-inset-top)); }
  .top-actions .btn-ghost { display: none; }
  .top-actions { margin-left: auto; }
  .menu-btn { min-width: 40px; min-height: 40px; }
  /* bigger touch targets */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
  input, select, textarea { font-size: 16px; } /* stops iPhone zooming into fields */
  .modal { width: 100%; max-height: calc(100vh - 24px); }
}

/* list tables become cards on phones: each row a card, each cell "Label: value" */
@media (max-width: 640px) {
  .tbl-wrap:has(> table.list) { overflow: visible; border: 0; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list thead { display: none; }
  table.list tr { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
  table.list tr.row-hot { background: #fff8e6; }
  table.list td { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; border: 0 !important; padding: 4px 0 !important; text-align: right !important; background: none !important; min-width: 0 !important; }
  table.list td::before { content: attr(data-label); flex: 0 0 38%; text-align: left; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
  table.list td:not([data-label])::before, table.list td[data-label=""]::before { display: none; }
  table.list td:not([data-label]), table.list td[data-label=""] { justify-content: flex-end; flex-wrap: wrap; }
  table.list td.empty { justify-content: center; text-align: center !important; }
  table.list td > * { min-width: 0; }
  table.list td.card-acts { flex-direction: row; flex-wrap: wrap; }
  .pre-wrap { max-width: none; text-align: left; }
}
@media (display-mode: standalone) { .install-btn, .install-link { display: none !important; } }
.net-strip[hidden] { display: none; }
@media (max-width: 860px) {
  .topbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; }
  .topbar .prop { min-width: 0; } .topbar .prop b, .topbar .prop span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .prop span { font-size: .72rem; }
  .topbar .gsearch { grid-column: 1 / -1; order: 0; margin: 0; } .gsearch kbd { display: none; }
  .top-actions { flex-wrap: nowrap; }
}
@media (max-width: 640px) {
  table.list td:first-child { display: block; text-align: left !important; font-weight: 600; padding-bottom: 6px !important; margin-bottom: 4px; border-bottom: 1px solid var(--line) !important; }
  table.list td:first-child::before { display: none; }
  table.list td:first-child .small, table.list td:first-child .muted { font-weight: 400; }
}
@media (max-width: 860px) {
  .topbar .menu-btn { grid-column: 1; grid-row: 1; } .topbar .prop { grid-column: 2; grid-row: 1; }
  .topbar .top-actions { grid-column: 3; grid-row: 1; } .topbar .gsearch { grid-row: 2; }
}
@media (min-width: 861px) and (max-width: 1560px) { .topbar .user { display: none; } }
.kpi b .pill { display: inline-block; vertical-align: middle; }

/* ================= Phase 20 ================= */
/* bill screen */
.pos-course { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pos-course button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.pos-course button.on { background: var(--ink, #142133); color: #fff; border-color: var(--ink, #142133); }
.hold-tog { margin-left: auto; }
.item .happy { color: #1e7a46; font-weight: 600; }
.held-line { background: #fff8e6; }
.cart-sub { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); padding: 2px 0; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.opt { display: block !important; } .opt input { position: absolute; opacity: 0; }
.opt span { display: block; text-align: center; padding: 12px 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 600; }
.opt input:checked + span { border-color: var(--accent); background: var(--accent-l, #e8f0fd); color: var(--accent-d, #174ba8); }
.split-list { display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
/* kitchen screen */
.allday { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ticket .tk-who { font-size: 1.1rem; } .ticket .tk-min { font-weight: 700; font-variant-numeric: tabular-nums; }
.ticket.age-warn { border-left: 4px solid #e0a106; } .ticket.age-warn .tk-min { color: #a86d00; }
.ticket.age-late { border-left: 4px solid #b3261e; background: #fff5f4; } .ticket.age-late .tk-min { color: #b3261e; }
/* spa */
.spa-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.spa-col h3 { margin: 0 0 8px; font-size: .95rem; }
.spa-bk { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px; margin-bottom: 8px; font-size: .88rem; }
.spa-bk.st-completed { border-left-color: #1e7a46; opacity: .8; } .spa-bk.st-cancelled, .spa-bk.st-no_show { opacity: .55; border-left-color: #b3261e; }
.spa-bk.st-in_progress { border-left-color: #e0a106; background: #fffaf0; }
/* health club */
.club-door .grow { flex: 1; min-width: 220px; } .club-door form { align-items: flex-end; }
.club-res { margin-top: 10px; padding: 12px 14px; border-radius: 8px; font-size: .95rem; }
.club-res.ok { background: #e3f4ea; color: #144d2c; } .club-res.bad { background: #fdecea; color: #7a1d14; font-weight: 600; }
/* reports library */
.lib { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 14px; align-items: start; }
.lib-tree { position: sticky; top: 12px; max-height: calc(100vh - 120px); overflow: auto; padding: 10px; }
.lib-tree .search { width: 100%; margin-bottom: 8px; }
.lib-dept summary { cursor: pointer; font-weight: 600; padding: 6px 4px; font-size: .9rem; }
.lib-dept a { display: block; padding: 4px 8px 4px 16px; font-size: .84rem; color: var(--text); text-decoration: none; border-radius: 4px; }
.lib-dept a:hover { background: #f0f3f7; } .lib-dept a.on { background: var(--accent-l, #e8f0fd); color: var(--accent-d, #174ba8); font-weight: 600; }
.eyebrow-s { margin: 0; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.lib-quick { margin-left: 8px; }
.lib-table tfoot td { border-top: 2px solid var(--line); background: #f6f8fa; }
@media (max-width: 860px) { .lib { grid-template-columns: 1fr; } .lib-tree { position: static; max-height: 40vh; } }
/* 80 mm slips: KOT, bill, receipt */
#print-slip { display: none; }
@media print {
  body.printing-slip > *:not(#print-slip) { display: none !important; }
  body.printing-slip #print-slip { display: block; width: 72mm; margin: 0; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; color: #000; }
  @page { margin: 4mm; }
}
#print-slip .slip-h { text-align: center; line-height: 1.35; }
#print-slip .slip-title { text-align: center; font-weight: 700; font-size: 13px; margin: 6px 0; border-top: 1px dashed #000; border-bottom: 1px dashed #000; padding: 3px 0; }
#print-slip .slip-title.kot { font-size: 16px; }
#print-slip .kot-who { text-align: center; font-size: 22px; font-weight: 700; margin: 4px 0; }
#print-slip .slip-meta span { display: block; }
#print-slip .slip-lines { width: 100%; border-collapse: collapse; margin: 6px 0; }
#print-slip .slip-lines td { padding: 1px 0; vertical-align: top; } #print-slip .slip-lines td:first-child { width: 22px; } #print-slip .slip-lines td:last-child { text-align: right; white-space: nowrap; }
#print-slip .slip-tot div, #print-slip .slip-pay div { display: flex; justify-content: space-between; }
#print-slip .slip-tot { border-top: 1px dashed #000; padding-top: 4px; } #print-slip .slip-tot .big { font-weight: 700; font-size: 13px; }
#print-slip .slip-pay { border-top: 1px dashed #000; margin-top: 4px; padding-top: 4px; }
#print-slip .slip-note, #print-slip .slip-foot, #print-slip .slip-sign { text-align: center; margin-top: 8px; }
#print-slip .kot-course { font-weight: 700; margin-top: 6px; border-bottom: 1px solid #000; }
#print-slip .kot-items { list-style: none; padding: 0; margin: 4px 0; font-size: 14px; } #print-slip .kot-items li { margin: 3px 0; }
#print-slip .kot-items li.void { text-decoration: line-through; }
#print-slip .kot-opt { padding-left: 18px; font-weight: 700; } #print-slip .kot-note { padding-left: 18px; font-weight: 700; }
.cart-line .qty { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; }
.cart-line .qty .link { white-space: nowrap; }
.club-door label.grow { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.club-door label.grow input { font: inherit; font-size: 1.05rem; font-weight: 400; color: var(--text); padding: 10px 12px; border: 1px solid #c4ccd6; border-radius: 6px; background: #fff; }
