:root {
  /* BHMP: harbour navy + brass, on warm paper. Shared component CSS with BPMP. */
  --gold: #b8892f;
  --gold-soft: #f6eedb;
  --bg: #f5f3ee;
  --surface: #fffdf9;
  --surface-2: #f9f6f0;
  --border: #e4e0d6;
  --border-strong: #cbc4b3;
  --text: #1d2836;
  --text-2: #4d5a6a;
  --muted: #6c7685;
  --brand: #1f3a5f;
  --brand-2: #152a46;
  --brand-soft: #e6ecf4;
  --side: #142235;
  --side-2: #1f3350;
  --side-text: #c8d3e2;
  --danger: #c0392b;
  --danger-soft: #fdecea;
  --warn: #b7791f;
  --warn-soft: #fdf4e3;
  --info: #2563a8;
  --info-soft: #e8f0fa;
  --ok: #1e8a52;
  --ok-soft: #e6f5ec;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 29, 43, .06), 0 1px 3px rgba(15, 29, 43, .05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.5px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
.icon { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.pre { white-space: pre-wrap; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex: none; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40;
}
.brand { display: flex; gap: .7rem; align-items: center; padding: 1.1rem 1rem 1rem; color: #fff; text-decoration: none !important; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #2f8a78, var(--brand)); display: grid; place-items: center; color: #fff; flex: none; }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-mark.big { width: 56px; height: 56px; border-radius: 14px; }
.brand-mark.big .icon { width: 32px; height: 32px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: #9bb5ab; font-size: .76rem; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: .4rem .6rem; overflow-y: auto; flex: 1; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 8px; color: var(--side-text); font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.active { background: #234e47; color: #fff; }
.nav a.active .icon { color: #6fd4b8; }
.nav-badge { margin-left: auto; font-style: normal; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 0 .45rem; border-radius: 99px; line-height: 1.5; }
.sidebar-foot { display: flex; align-items: center; gap: .4rem; padding: .75rem; border-top: 1px solid var(--side-2); }
.sidebar-foot form { margin: 0; }
.me { display: flex; gap: .6rem; align-items: center; flex: 1; min-width: 0; color: var(--side-text); text-decoration: none !important; padding: .3rem; border-radius: 8px; }
.me:hover, .me.active { background: var(--side-2); }
.me-text { display: flex; flex-direction: column; min-width: 0; }
.me-text strong { color: #fff; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { font-size: .74rem; color: #9bb5ab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: .7rem; }
.sidebar .icon-btn { color: var(--side-text); }
.sidebar .icon-btn:hover { background: var(--side-2); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 1.75rem 2rem 3rem; max-width: 1240px; width: 100%; margin: 0 auto; }
.content-wide { max-width: none; padding: 1.25rem 1.5rem 1.5rem; }
.scrim { display: none; }

@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
  .topbar { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
  .topbar-title { font-weight: 650; }
  .content { padding: 1.1rem 1rem 2.5rem; }
  .content-wide { padding: 1rem; }
}

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head p { margin: .15rem 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .88rem; margin-bottom: .5rem; }
.back .icon { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .5rem .95rem;
  border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 550; cursor: pointer; text-decoration: none !important; white-space: nowrap; line-height: 1.3;
}
.btn:hover { background: var(--surface-2); border-color: #b5b9a7; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: #f0b8b1; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,.04); border-color: transparent; }
.btn-sm { padding: .3rem .6rem; font-size: .85rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: rgba(0,0,0,.05); }
.inline-form { display: inline; margin: 0; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 1.15rem 1.25rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.card-head h2 .icon { color: var(--brand); }
.card-head a { font-size: .85rem; }
.card-body { padding: 1rem 1.25rem; }
.card + .card { margin-top: 1rem; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .grid-2, .grid-3, .split { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr 1fr; } }

.stat { padding: 1rem 1.15rem; display: flex; gap: .85rem; align-items: center; color: inherit; text-decoration: none !important; }
.stat:hover { border-color: var(--border-strong); }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.stat-icon .icon { width: 22px; height: 22px; }
.stat strong { display: block; font-size: 1.45rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: .8rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; gap: .75rem; align-items: flex-start; }
.list > li:last-child { border-bottom: 0; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; color: var(--text); display: block; }
a.list-title:hover { color: var(--brand); text-decoration: none; }
.list-meta { color: var(--muted); font-size: .83rem; margin-top: .1rem; }
.list-side { flex: none; text-align: right; }
.empty { padding: 1.5rem 1.25rem; color: var(--muted); text-align: center; }
.empty-page { text-align: center; padding: 4rem 1rem; }
.empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); display: grid; place-items: center; margin: 0 auto 1rem; }
.empty-icon .icon { width: 28px; height: 28px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: 99px; font-size: .74rem; font-weight: 650; background: #ece8dc; color: var(--text-2); white-space: nowrap; text-transform: capitalize; }
.badge .icon { width: 12px; height: 12px; }
.badge-ok, .badge-approved, .badge-closed, .badge-done, .badge-departed { background: var(--ok-soft); color: var(--ok); }
.badge-warn, .badge-pending, .badge-on_hold, .badge-important, .badge-high, .badge-expected, .badge-processing { background: var(--warn-soft); color: var(--warn); }
.badge-danger, .badge-urgent, .badge-emergency, .badge-error, .badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-info, .badge-open, .badge-in_progress, .badge-arrived { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-low, .badge-cancelled, .badge-disabled { background: #ece8dc; color: var(--muted); }

/* ---------- Flash ---------- */
.flash { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash span { flex: 1; }
.flash-success { background: var(--ok-soft); border-color: #bfe3cd; color: #145c37; }
.flash-error { background: var(--danger-soft); border-color: #f2c2bc; color: #8c2a1f; }
.flash-info { background: var(--info-soft); border-color: #c6d8ef; color: #1d4f86; }
.flash-x { background: none; border: 0; color: inherit; cursor: pointer; opacity: .6; padding: 0; display: grid; }
.flash-x:hover { opacity: 1; }

/* ---------- Forms ---------- */
.form { max-width: 720px; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .95rem; }
.field > span { font-weight: 600; font-size: .88rem; color: var(--text-2); }
.field small { color: var(--muted); font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], input[type=tel], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: .5rem .7rem; width: 100%; min-width: 0;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(31,111,168,.25); border-color: var(--brand); }
.check { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 1rem; }
.form-actions { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }

.toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0; }
.search { position: relative; }
.search .icon { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { padding-left: 2rem; width: 240px; }
.tabs { display: inline-flex; background: #ece7db; border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs a { padding: .35rem .8rem; border-radius: 7px; color: var(--text-2); font-weight: 550; font-size: .88rem; text-decoration: none; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #faf8f2; }
.table .num { text-align: right; }
.table td.actions { text-align: right; white-space: nowrap; }

/* ---------- Auth ---------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 20% 10%, #2a4a74 0, var(--side) 55%); }
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; max-width: 900px; width: 100%; background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.auth-side { background: linear-gradient(160deg, var(--brand), var(--brand-2)); color: #e6edf6; padding: 2.5rem; display: flex; flex-direction: column; gap: .9rem; }
.auth-side h2 { color: #fff; font-size: 1.5rem; margin: .5rem 0 0; }
.auth-side p { color: #c3d0e2; }
.auth-points { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-direction: column; gap: .7rem; }
.auth-points li { display: flex; gap: .6rem; align-items: center; }
.auth-points .icon { color: #e0b65a; }
.auth-card { padding: 2.5rem; background: var(--surface); }
.auth-body > .auth-card { border-radius: 14px; max-width: 420px; }
.auth-card h1 { margin-bottom: .25rem; }
.auth-card .btn-block { margin: .5rem 0 1rem; padding: .65rem; }
@media (max-width: 760px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { padding: 1.75rem; } .auth-points { display: none; } .auth-card { padding: 1.75rem; } }

/* ---------- Upload ---------- */
.dropzone { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 2rem 1rem; text-align: center; background: var(--surface-2); cursor: pointer; transition: .15s; display: block; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .icon { width: 36px; height: 36px; color: var(--brand); }
.dropzone input { display: none; }
.dropzone strong { display: block; margin-top: .5rem; }
.file-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.file-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .6rem; border-bottom: 1px solid var(--border); font-size: .9rem; }

/* ---------- Requests ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: .75rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
.timeline li.internal { background: #fffaf0; }
.timeline li.system { color: var(--muted); font-size: .88rem; padding: .55rem 1.25rem; }
.timeline .bubble { flex: 1; min-width: 0; }
.timeline .who { font-weight: 600; }
.desc { white-space: pre-wrap; color: var(--text-2); }
.props { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; font-size: .9rem; margin: 0; }
.props dt { color: var(--muted); }
.props dd { margin: 0; font-weight: 500; }

/* ---------- Misc ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; font-size: .9rem; }
.contact-list li { display: flex; gap: .55rem; align-items: center; }
.contact-list .icon { color: var(--brand); width: 16px; height: 16px; }
details.collapse summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .4rem; }
details.collapse summary::-webkit-details-marker { display: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ---------- BPMP ---------- */
.badge-muted { background: #ece8dc; color: var(--muted); }
.flash-warn { background: var(--warn-soft); border-color: #f0d9a8; color: #7a4f0e; }
.btn-warn { color: var(--warn); }
.tag-ai { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 650; color: #6b46c1; background: #f1ebfd; padding: .05rem .45rem; border-radius: 99px; white-space: nowrap; }
.tag-ai .icon { width: 12px; height: 12px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: .05rem .35rem; border-radius: 5px; word-break: break-all; }
pre.code { background: var(--side); color: #d8e4ef; padding: 1rem; border-radius: 8px; overflow: auto; max-height: 420px; white-space: pre; margin: 0; }
.copy-row { display: flex; gap: .5rem; align-items: center; }
.copy-row input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.secret-box { background: var(--warn-soft); border: 1px solid #f0d9a8; border-radius: 8px; padding: .85rem 1rem; margin-bottom: 1rem; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: .6rem; align-items: center; padding: .55rem 1.25rem; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist .done .icon { color: var(--ok); }
.checklist .todo .icon { color: var(--muted); }
.checklist .todo a { font-weight: 600; }
.section-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; margin: 0 0 .6rem; }
.hours-row { display: grid; grid-template-columns: 130px 120px 120px minmax(0, 1fr) 40px; gap: .5rem; align-items: center; margin-bottom: .45rem; }
@media (max-width: 700px) { .hours-row { grid-template-columns: 1fr 1fr; } }
.offer-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 120px; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px dashed var(--border); }
.offer-row .check { margin: 0; }
.muted-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: .75rem .9rem; font-size: .9rem; color: var(--text-2); }
.voice-dictate { margin-top: .4rem; }
.voice-controls { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.voice-lang-label { display: inline-flex; align-items: center; gap: .35rem; }
.voice-lang-label select { font: inherit; padding: .2rem .4rem; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); max-width: 160px; }
.voice-record-btn.voice-recording { color: #b42318; border-color: #b42318; }
.voice-preview { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; margin-top: .5rem; }
.voice-preview .voice-transcript { white-space: pre-wrap; margin: 0 0 .5rem; }
.steps { margin: 0; padding-left: 1.2rem; }
.steps li { margin-bottom: .55rem; }

/* Day schedule: one column per practitioner. 1 minute = var(--ppm) px. */
.sched-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.sched-bar h1 { margin: 0 .5rem 0 0; font-size: 1.25rem; }
.sched-bar input[type=date] { width: auto; }
.sched-filter { display: flex; flex-wrap: wrap; gap: .35rem; }
.sched-filter label { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; padding: .2rem .55rem; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); cursor: pointer; }
.sched { --ppm: 1.4px; display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 150px); }
.sched-head { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--border); padding: .55rem .6rem; font-weight: 650; font-size: .88rem; display: flex; gap: .45rem; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-head.corner { left: 0; z-index: 6; }
.sched-times, .sched-col { position: relative; height: calc(var(--span) * var(--ppm)); }
.sched-times { position: sticky; left: 0; z-index: 4; background: var(--surface-2); border-right: 1px solid var(--border); }
.sched-time { position: absolute; left: 0; right: 0; font-size: .72rem; color: var(--muted); padding: 0 .4rem; transform: translateY(-50%); text-align: right; }
.sched-col { border-right: 1px solid var(--border); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(60 * var(--ppm) - 1px), var(--border) calc(60 * var(--ppm) - 1px), var(--border) calc(60 * var(--ppm))), #ece8dc; }
.sched-col:last-child { border-right: 0; }
.sched-work { position: absolute; left: 0; right: 0; background: var(--surface); }
.sched-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #f3e8e6, #f3e8e6 6px, #faf3f2 6px, #faf3f2 12px); color: var(--danger); font-size: .74rem; padding: .2rem .4rem; z-index: 1; overflow: hidden; }
.sched-slot { position: absolute; left: 0; right: 0; display: block; z-index: 1; }
.sched-slot:hover { background: var(--brand-soft); }
.sched-slot:hover::after { content: "+ Book " attr(data-time); font-size: .72rem; color: var(--brand); padding: 0 .4rem; }
.sched-appt { position: absolute; left: 3px; right: 3px; z-index: 2; border-radius: 6px; padding: .2rem .4rem; font-size: .76rem; line-height: 1.25; overflow: hidden; color: var(--text); background: var(--brand-soft); border-left: 4px solid var(--c, var(--brand)); text-decoration: none !important; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.sched-appt:hover { filter: brightness(.97); z-index: 3; }
.sched-appt strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-appt span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sched-appt.s-confirmed { background: #e3f4ea; }
.sched-appt.s-arrived { background: #fff3d6; }
.sched-appt.s-completed { background: #ece8dc; color: var(--muted); }
.sched-appt.s-no_show { background: var(--danger-soft); }
.sched-appt.s-cancelled { background: repeating-linear-gradient(45deg, #f6f7f8, #f6f7f8 5px, #fff 5px, #fff 10px); color: var(--muted); text-decoration: line-through !important; opacity: .75; z-index: 1; left: 55%; }
.sched-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 4; pointer-events: none; }

/* Slot pickers */
.slot-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.slot-btn { display: inline-block; padding: .4rem .7rem; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; text-decoration: none !important; }
.slot-btn:hover, .slot-btn.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-2); }
.slot-day { margin-bottom: 1rem; }
.slot-day h3 { font-size: .9rem; margin-bottom: .45rem; }

/* Picker dropdown (patient search) */
.picker { position: relative; }
.picker-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 280px; overflow: auto; margin-top: 2px; }
.picker-results button { display: block; width: 100%; text-align: left; padding: .5rem .75rem; border: 0; background: none; font: inherit; cursor: pointer; border-bottom: 1px solid var(--border); }
.picker-results button:hover { background: var(--brand-soft); }
.picked { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border: 1px solid var(--brand); background: var(--brand-soft); border-radius: 8px; }
.picked strong { flex: 1; }

/* Text conversations */
.thread { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.25rem; max-height: 60vh; overflow-y: auto; }
.bubble-msg { max-width: 75%; padding: .55rem .8rem; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.bubble-msg.in { align-self: flex-start; background: #ece8dc; border-bottom-left-radius: 4px; }
.bubble-msg.out { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.bubble-msg.failed { background: var(--danger-soft); color: var(--danger); }
.bubble-meta { font-size: .72rem; opacity: .75; margin-top: .2rem; }
.compose { display: flex; gap: .5rem; padding: .85rem 1.25rem; border-top: 1px solid var(--border); }
.compose textarea { min-height: 44px; height: 44px; }
.compose .quick-reply-select { flex: 0 0 auto; max-width: 160px; align-self: center; }

.fax-frame { width: 100%; height: 75vh; border: 1px solid var(--border); border-radius: var(--radius); background: #525659; }

/* Public clinic pages */
.public-body { background: var(--bg); }
.public-top { background: var(--side); color: #fff; }
.public-top .inner { max-width: 960px; margin: 0 auto; padding: 1.25rem 1rem; display: flex; align-items: center; gap: .9rem; }
.public-top h1 { color: #fff; margin: 0; font-size: 1.35rem; }
.public-top a { color: #fff; }
.public-top small { color: var(--side-text); }
.public-main { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.service-list li { align-items: center; }
.practitioner-card { display: flex; gap: .85rem; align-items: flex-start; }
.public-foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 1rem; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #7fa092; padding: .9rem .7rem .3rem; font-weight: 700; }
.platform-leave { padding: 0 .75rem .5rem; }
.platform-leave .btn { background: var(--side-2); color: #fff; border-color: var(--side-2); }
.grid > .card + .card, .split > .card + .card { margin-top: 0; }

.sched-appt.is-class { background: #efe7fb; }
.field-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: .5rem; padding: .7rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .5rem; background: var(--surface-2); }
.field-row .opts { grid-column: 2 / 3; }
.field-row .row-tools { display: flex; gap: .2rem; align-items: center; }
@media (max-width: 700px) { .field-row { grid-template-columns: 1fr; } .field-row .opts { grid-column: auto; } }
.consent-text { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: .9rem 1rem; margin: 1rem 0; font-size: .92rem; max-height: 320px; overflow: auto; }
.consent-text p:last-child { margin: 0; }
.sig-pad { position: relative; border: 2px dashed var(--border-strong); border-radius: 8px; background: var(--surface); }
.sig-pad canvas { display: block; width: 100%; height: 160px; touch-action: none; cursor: crosshair; }
.sig-pad .sig-clear { position: absolute; right: .3rem; top: .3rem; }
.sig-pad.sig-missing { border-color: var(--danger); }
.sig-img { max-width: 360px; width: 100%; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
fieldset.choice { border: 0; padding: 0; margin: 0 0 .95rem; }
fieldset.choice .check { margin-bottom: .35rem; }
.answer-list dt { font-weight: 600; color: var(--text-2); margin-top: .7rem; }
.answer-list dd { margin: .15rem 0 0; white-space: pre-wrap; }

.body-chart { margin-top: .4rem; }
.bc-legend-caption { margin: 0 0 .35rem; font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.bc-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-bottom: .5rem; }
.bc-type { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; color: var(--text-2); }
.bc-type.active { border-color: var(--brand); background: var(--brand-soft); color: var(--text); font-weight: 600; }
/* Read-only legend: a reference key, not a disabled control -- override the global button:disabled fade so it stays fully legible. */
.bc-type.bc-static { cursor: default; border-color: transparent; background: transparent; padding: .1rem 0; opacity: 1; color: var(--text-2); font-weight: 500; }
.bc-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.bc-hint { margin: 0 0 .5rem; }
.bc-views { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)); gap: .6rem; }
.bc-view { text-align: center; }
.bc-svg { width: 100%; height: auto; max-height: 240px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; cursor: crosshair; touch-action: manipulation; }
.bc-outline { fill: none; stroke: var(--text-2); stroke-width: 10; stroke-linejoin: round; stroke-linecap: round; }
.bc-mark { stroke: #fff; stroke-width: 6; cursor: pointer; }
.bc-view-label { margin: .3rem 0 0; font-size: .78rem; color: var(--muted); }
@media (max-width: 640px) { .bc-views { grid-template-columns: repeat(2, 1fr); } }
@media print { .bc-svg { cursor: default; } }

@media print { .sidebar, .topbar, .no-print, .flash { display: none !important; } .content { padding: 0; } .card { box-shadow: none; border: 0; } body { background: var(--surface); } }
/* Report bar lists: one hue (brand), 10px bars with a 4px rounded data end, values in text ink. */
.barlist { list-style: none; margin: 0; padding: .4rem 1.25rem 1rem; }
.barlist li { display: grid; grid-template-columns: minmax(110px, 46%) minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .35rem 0; }
.barlist li:hover .barlist-bar { background: var(--brand-2); }
.barlist-label { font-size: .86rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist-track { height: 10px; }
.barlist-bar { display: block; height: 10px; background: var(--brand); border-radius: 0 4px 4px 0; }
.barlist-value { font-size: .86rem; font-variant-numeric: tabular-nums; color: var(--text); min-width: 64px; text-align: right; }
.stat-sub { display: block; color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.theme-option { border: 2px solid var(--border); border-radius: 12px; padding: .7rem; cursor: pointer; display: flex; flex-direction: column; gap: .3rem; }
.theme-option input { position: absolute; opacity: 0; }
.theme-option.active, .theme-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.theme-option small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.theme-swatch { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 34px 14px; gap: 4px; border-radius: 8px; padding: 6px; height: 64px; }
.theme-swatch i { grid-column: 1 / -1; border-radius: 4px; background: var(--a); }
.theme-swatch b { border-radius: 3px; background: rgba(0,0,0,.08); }
.theme-clinical { background: var(--surface); border: 1px solid #e3e7ec; }
.theme-wellness { background: #f3ede3; }
.theme-modern { background: #0f1115; } .theme-modern b { background: rgba(255,255,255,.2); }
.theme-classic { background: #1d2433; } .theme-classic b { background: #f5f0e4; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; }
.media-grid figure { margin: 0; }
.media-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.media-grid figcaption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.section-title.mt { margin-top: 1.4rem; }

/* ---------- Interactive calendar ---------- */
.cal-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.cal-nav, .cal-tools { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.cal-tools select { width: auto; padding: .3rem .5rem; font-size: .88rem; }
.cal-title { background: none; border: 0; font: 650 1.15rem var(--font); color: var(--text); cursor: pointer; padding: .3rem .5rem; border-radius: 8px; }
.cal-title:hover { background: var(--surface-2); }
.cal-views a { cursor: pointer; }
.cal-filter { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.cal-filter label { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; padding: .2rem .55rem; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); cursor: pointer; }
.cal-live { position: absolute; left: -9999px; }
.cal-grid { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 190px); min-height: 300px; position: relative; }
.cal-help { margin-top: .4rem; }
.cal-cols { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(140px, 1fr)); position: relative; }
.cal-head { position: sticky; top: 0; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--border); padding: .5rem .6rem; font-weight: 650; font-size: .86rem; display: flex; gap: .4rem; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-head.today { color: var(--brand); }
.cal-head.corner { left: 0; z-index: 7; }
.cal-times, .cal-col { position: relative; height: calc(var(--span) * var(--ppm)); }
.cal-times { position: sticky; left: 0; z-index: 5; background: var(--surface-2); border-right: 1px solid var(--border); }
.cal-time { position: absolute; left: 0; right: 0; font-size: .7rem; color: var(--muted); padding: 0 .35rem; transform: translateY(-50%); text-align: right; }
.cal-col { border-right: 1px solid var(--border); cursor: cell; background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(60 * var(--ppm) - 1px), var(--border) calc(60 * var(--ppm) - 1px), var(--border) calc(60 * var(--ppm))), #ece8dc; }
.cal-col.all-open { background-color: var(--surface); }
.cal-col:last-child { border-right: 0; }
.cal-work { position: absolute; left: 0; right: 0; background: var(--surface); }
.cal-off { position: absolute; left: 0; right: 0; z-index: 1; background: repeating-linear-gradient(45deg, #f3e8e6, #f3e8e6 6px, #faf3f2 6px, #faf3f2 12px); color: var(--danger); font-size: .72rem; padding: .2rem .4rem; overflow: hidden; cursor: pointer; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 4; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.cal-appt { position: absolute; z-index: 2; border-radius: 6px; padding: .18rem .4rem; font-size: .74rem; line-height: 1.25; overflow: hidden; color: var(--text); background: color-mix(in srgb, var(--c) 14%, #fff); border-left: 4px solid var(--c); box-shadow: 0 1px 2px rgba(0,0,0,.08); cursor: grab; user-select: none; touch-action: none; }
.cal-appt:hover { z-index: 3; box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.cal-appt:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.cal-appt strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-appt span { display: block; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-appt .cal-icons { position: absolute; right: .3rem; top: .15rem; font-style: normal; font-size: .7rem; background: rgba(255,255,255,.85); border-radius: 4px; padding: 0 .2rem; }
.cal-appt .cal-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.cal-appt .cal-resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px; background: rgba(0,0,0,.25); }
.cal-appt.by-status.s-booked { --c: #2a7ab0; } .cal-appt.by-status.s-confirmed { --c: #2e9e6a; } .cal-appt.by-status.s-arrived { --c: #e09f3e; }
.cal-appt.by-status.s-completed { --c: #8a94a0; } .cal-appt.by-status.s-no_show { --c: #d1495b; }
.cal-appt.s-completed { opacity: .75; }
.cal-appt.s-cancelled { background: repeating-linear-gradient(45deg, #f6f7f8, #f6f7f8 5px, #fff 5px, #fff 10px); color: var(--muted); text-decoration: line-through; opacity: .8; }
.cal-appt.s-no_show { background: var(--danger-soft); }
.cal-appt.is-class { --c: #7b5ea7; background: #efe7fb; cursor: pointer; }
.cal-appt.dragging { opacity: .35; }
.cal-appt.ghost { opacity: .9; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 8; pointer-events: none; }
.cal-appt.flash { animation: calFlash 1.6s ease 2; }
@keyframes calFlash { 50% { box-shadow: 0 0 0 4px rgba(31,111,168,.45); } }
@media (prefers-reduced-motion: reduce) { .cal-appt.flash { animation: none; outline: 3px solid var(--brand); } }
.cal-agenda-day { padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.cal-agenda-day h3 { font-size: .95rem; margin-bottom: .5rem; }
.cal-agenda-row { display: flex; gap: .8rem; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--c); background: var(--surface-2); border-radius: 8px; padding: .55rem .7rem; margin-bottom: .4rem; font: inherit; cursor: pointer; }
.cal-agenda-row .when { font-weight: 650; min-width: 120px; font-size: .88rem; }
.cal-agenda-row .what { display: flex; flex-direction: column; }
.cal-agenda-row.s-cancelled { opacity: .55; text-decoration: line-through; }
.cal-pop { position: fixed; z-index: 90; width: min(380px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.22); }
.pop-body { padding: .9rem 1rem; display: flex; flex-direction: column; gap: .55rem; }
.pop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.pop-head strong { font-size: 1rem; }
.pop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.pop-row { display: flex; gap: .45rem; align-items: center; }
.pop-row select { flex: 1; }
.pop-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.pop-links { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .88rem; border-top: 1px solid var(--border); padding-top: .55rem; }
.pop-flags { margin: 0; padding-left: 1.1rem; font-size: .85rem; color: var(--text-2); }
.pop-cancel summary { cursor: pointer; font-size: .85rem; color: var(--danger); }
.pop-cancel[open] { display: flex; flex-direction: column; gap: .4rem; }
.pop-new summary { cursor: pointer; font-size: .88rem; font-weight: 600; }
.pop-new[open] { display: flex; flex-direction: column; gap: .4rem; }
.pop-body input, .pop-body select { padding: .4rem .55rem; font-size: .9rem; }
.cal-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-month-grid .dow { font-size: .72rem; color: var(--muted); padding: .2rem 0; }
.cal-month-grid button { border: 0; background: none; padding: .45rem 0; border-radius: 8px; font: inherit; cursor: pointer; }
.cal-month-grid button:hover { background: var(--brand-soft); }
.cal-month-grid button.today { font-weight: 700; color: var(--brand); }
.cal-month-grid button.sel { background: var(--brand); color: #fff; }
.cal-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 95; display: flex; flex-direction: column; gap: .4rem; max-width: min(420px, calc(100vw - 32px)); }
.cal-toast { background: var(--text); color: #fff; padding: .65rem .9rem; border-radius: 10px; font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: opacity .4s; }
.cal-toast.ok { background: #145c37; } .cal-toast.error { background: #8c2a1f; } .cal-toast.live { background: #4b2d8a; }
.cal-toast.out { opacity: 0; }
@media (max-width: 760px) { .cal-grid { max-height: none; } .cal-cols { grid-template-columns: 46px repeat(var(--cols), minmax(150px, 1fr)); } }
@media print { .cal-bar, .cal-filter, .cal-help { display: none; } }

.support-chat { position: fixed; right: 16px; bottom: 16px; z-index: 80; }
.support-chat-toggle { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.support-chat-toggle svg { width: 22px; height: 22px; }
.support-chat-panel { display: none; position: absolute; right: 0; bottom: 64px; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 96px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.22); padding: .9rem; }
.support-chat.open .support-chat-panel { display: block; }
.support-chat.open .support-chat-toggle { display: none; }
.support-chat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.support-chat-panel .field { margin-bottom: .5rem; }
.support-chat-panel textarea { width: 100%; padding: .5rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; resize: vertical; box-sizing: border-box; }
@media print { .support-chat { display: none; } }

/* Muscle chart popup (public/js/muscle-chart.js) */
.muscle-chart-btn { margin-top: .4rem; }
#muscle-chart-dialog { width: min(92vw, 900px); max-width: 900px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
#muscle-chart-dialog::backdrop { background: rgb(15 23 42 / 0.5); }
.muscle-chart-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
.muscle-chart-head h2 { margin: 0; }
.muscle-chart-layout { display: flex; gap: 1rem; padding: 1.15rem 1.25rem; flex-wrap: wrap; max-height: 75vh; overflow-y: auto; }
/* Warm, skin-toned retint of the library's own cool slate-grey defaults -- a client said the
   default read as "robotic". --bm-region-stroke covers the outline between regions; the actual
   region FILL isn't a CSS variable (it's painted by the library's intensityColor resolver, set in
   public/js/muscle-chart.js to match the same warm tan used here). Keyboard focus
   (--bm-region-stroke-focus) is left at the library's default blue, since that's an accessibility
   signal, not a cosmetic one. */
.muscle-chart-widget {
  flex: 1 1 360px; --bm-max-width-both: 420px; --bm-max-height: 60vh;
  --bm-region-stroke: #8a5a35;
  --bm-region-inactive-opacity: 0.8;
  --bm-tooltip-bg: rgba(74, 46, 23, 0.92);
}
.muscle-chart-panel { flex: 1 1 260px; min-width: 220px; }
.muscle-chart-tag { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .75rem; margin-bottom: .6rem; }
.muscle-chart-tag p { margin: .25rem 0 .5rem; white-space: pre-wrap; }

/* Marketing landing page (views/landing.ejs) */
.btn-lg { padding: .75rem 1.5rem; font-size: 1.05rem; border-radius: 10px; }
.landing-body { background: var(--surface); color: var(--text); }
.landing-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none !important; color: var(--text); font-size: 1.1rem; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto; padding: 1.1rem 1.5rem; }
.landing-nav-links { display: flex; align-items: center; gap: 1.25rem; }
.landing-nav-links > a:first-child { color: var(--text-2); text-decoration: none; }
.landing-nav-links > a:first-child:hover { color: var(--text); }
.landing-hero { text-align: center; max-width: 760px; margin: 2.5rem auto 3.5rem; padding: 0 1.5rem; }
.landing-hero h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); line-height: 1.15; margin: 0 0 1rem; }
.landing-hero p { font-size: 1.15rem; color: var(--text-2); margin: 0 0 1.75rem; }
.landing-hero-actions { display: flex; gap: .85rem; justify-content: center; flex-wrap: wrap; }
.landing-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.landing-feature { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.landing-feature-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); margin-bottom: .9rem; }
.landing-feature-icon .icon { width: 22px; height: 22px; }
.landing-feature h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.landing-feature p { margin: 0; color: var(--text-2); font-size: .92rem; line-height: 1.5; }
.landing-band, .landing-trust, .landing-pricing { text-align: center; max-width: 700px; margin: 0 auto; padding: 3rem 1.5rem; }
.landing-band h2, .landing-trust h2, .landing-pricing h2 { font-size: 1.5rem; margin: .5rem 0 .75rem; }
.landing-band p, .landing-trust p, .landing-pricing p { color: var(--text-2); line-height: 1.6; }
.landing-trust, .landing-pricing { background: var(--surface-2); border-radius: var(--radius); }
.landing-pricing-amount { font-size: 1.3rem; color: var(--text); font-weight: 600; }
.landing-pricing-amount span { font-size: .85rem; font-weight: 400; color: var(--text-2); }
.landing-cta { text-align: center; padding: 3.5rem 1.5rem; background: linear-gradient(160deg, var(--brand), var(--brand-2)); color: #fff; }
.landing-cta h2 { margin: 0 0 .5rem; font-size: 1.6rem; }
.landing-cta p { margin: 0 0 1.5rem; color: #c3d0e2; }
.landing-footer { display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: 1.5rem; flex-wrap: wrap; color: var(--text-2); font-size: .9rem; }
.landing-footer a { color: var(--text-2); }
@media (max-width: 640px) {
  .landing-nav { flex-direction: column; gap: .75rem; }
  .landing-nav-links { gap: .75rem; }
}

/* ================= BHMP additions ================= */
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .85rem; }
.kv dd { margin: 0; }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.total-row td { font-weight: 700; border-top: 2px solid var(--border-strong); }
.reversed td { color: var(--muted); text-decoration: line-through; }
.pill-list { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: .4rem 0 0; }
.pill-list li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .1rem .6rem; font-size: .8rem; color: var(--text-2); }
.actions-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions-row form { margin: 0; }
details.card > summary { cursor: pointer; padding: .9rem 1.25rem; font-weight: 650; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { border-bottom: 1px solid var(--border); }
.code-box { white-space: pre-wrap; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: .8rem 1rem; max-height: 340px; overflow: auto; margin: 0; }
.notice { border-left: 4px solid var(--gold); background: var(--gold-soft); padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.test-banner { background: repeating-linear-gradient(45deg, #fff1c2, #fff1c2 12px, #ffe69a 12px, #ffe69a 24px); color: #6b4e00; text-align: center; font-weight: 700; padding: .45rem; font-size: .85rem; }

/* Tape chart */
.chart-wrap { overflow-x: auto; }
.chart { border-collapse: collapse; width: 100%; min-width: 900px; table-layout: fixed; font-size: .8rem; }
.chart th, .chart td { border: 1px solid var(--border); height: 34px; padding: 0; }
.chart thead th { background: var(--surface-2); font-weight: 600; color: var(--text-2); padding: .3rem; }
.chart thead th.today { background: var(--brand-soft); color: var(--brand); }
.chart th.room { width: 130px; text-align: left; padding: 0 .5rem; background: var(--surface-2); }
.chart th.room small { display: block; color: var(--muted); font-weight: 400; }
.chart td a.free { display: block; height: 100%; }
.chart td a.free:hover { background: var(--brand-soft); }
.chart .bar { display: block; height: 26px; margin: 3px 2px; border-radius: 6px; padding: 0 .4rem; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; font-weight: 600; text-decoration: none; }
.bar-hold { background: var(--warn); } .bar-confirmed { background: var(--info); } .bar-checked_in { background: var(--ok); } .bar-checked_out { background: #9aa3ae; }

/* Housekeeping */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.room-tile { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .7rem; background: var(--surface); border-top: 4px solid var(--muted); }
.room-tile.clean { border-top-color: var(--ok); } .room-tile.dirty { border-top-color: var(--warn); } .room-tile.inspected { border-top-color: var(--brand); } .room-tile.out_of_order { border-top-color: var(--danger); }
.room-tile strong { font-size: 1.1rem; }
.room-tile select { width: 100%; margin-top: .4rem; font-size: .8rem; padding: .2rem; }

/* Kitchen */
.ticket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.ticket { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: .8rem 1rem; }
.ticket.late { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
.ticket ul { margin: .4rem 0; padding-left: 1.1rem; }

/* QR cards */
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.qr-card { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 1rem; text-align: center; background: #fff; break-inside: avoid; }
.qr-card svg { width: 170px; height: 170px; }
.qr-card h3 { margin: .25rem 0; }
.qr-card p { margin: .2rem 0; font-size: .8rem; color: var(--text-2); }

/* Public site + guest portal */
.public-top { background: linear-gradient(135deg, var(--side), var(--brand)); }
.hero { background: linear-gradient(135deg, var(--side) 0%, var(--brand) 70%, #2d4f7c 100%); color: #fff; padding: 2.5rem 1rem 4.5rem; }
.hero .inner { max-width: 960px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: 2rem; margin: 0 0 .3rem; }
.hero p { color: #d3dcea; margin: 0; max-width: 640px; }
.hero .brass { color: #e5c071; text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; }
.search-card { max-width: 960px; margin: -3rem auto 1.5rem; padding: 1rem 1.25rem; }
.search-card form { display: grid; grid-template-columns: 1fr 1fr 110px auto; gap: .8rem; align-items: end; }
.search-card .field { margin: 0; }
@media (max-width: 700px) { .search-card form { grid-template-columns: 1fr 1fr; } }
.room-card { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1.1rem 1.25rem; margin-bottom: .8rem; }
.room-card .price { text-align: right; }
.room-card .price strong { font-size: 1.35rem; display: block; }
@media (max-width: 600px) { .room-card { grid-template-columns: 1fr; } .room-card .price { text-align: left; } }
.portal-body { background: var(--bg); min-height: 100vh; }
.portal-top { background: linear-gradient(135deg, var(--side), var(--brand)); color: #fff; padding: 1.1rem 1rem; }
.portal-top .inner, .portal-main { max-width: 560px; margin: 0 auto; }
.portal-top h1 { color: #fff; font-size: 1.2rem; margin: 0; }
.portal-top small { color: #c8d3e2; }
.portal-top form { margin: 0; }
.portal-top .inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.portal-main { padding: 1rem 1rem 3rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem; }
.tile { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; padding: 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none !important; font-weight: 650; box-shadow: var(--shadow); width: 100%; font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.tile .icon { width: 26px; height: 26px; color: var(--gold); }
.tile small { font-weight: 400; color: var(--muted); }
.tile-form { margin: 0; display: flex; }
.menu-item { display: grid; grid-template-columns: 1fr 70px; gap: .6rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.menu-item:last-child { border-bottom: 0; }
.menu-item input { width: 70px; text-align: center; }
.big-input { font-size: 1.15rem !important; padding: .7rem !important; }
@media print { .qr-card { border: 1px solid #999; } .print-page .page-head .actions { display: none; } }
