:root {
  /* Practicewizz – The Physio Crew palette: charcoal, cyan-blue, white */
  --charcoal: #141514;
  --charcoal-2: #232625;
  --accent: #2c9ec2;          /* brand cyan (decorative, on dark) */
  --brand: #1a6f8c;           /* darker cyan for text/buttons on white (WCAG AA) */
  --brand-2: #1f7ea1;
  --brand-soft: #e7f4f9;
  --ink: #1d2726;
  --ink-2: #4c5a58;
  --ink-3: #7c8987;
  --line: #dfe5e3;
  --bg: #f5f7f6;
  --card: #ffffff;
  --warn: #a15c00;
  --warn-soft: #fff4e0;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #1e7b3a;
  --ok-soft: #e7f5ea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 36, .06), 0 2px 8px rgba(16, 40, 36, .05);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0 0 4px; font-weight: 700; letter-spacing: -.01em; }
h1 .accent { color: var(--brand-2); }
h2 { font-size: 17px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 15px; margin: 0 0 8px; font-weight: 650; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.boot { padding: 40px; color: var(--ink-3); }

/* layout */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--charcoal); color: #fff; padding: 18px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { font-weight: 800; font-size: 19px; padding: 2px 12px 18px; line-height: 1.2; letter-spacing: .01em; }
.side .logo b { color: var(--accent); }
.side .logo span { display: block; font-weight: 500; font-size: 12px; color: #a9b4b3; margin-top: 4px; text-transform: none; }
.side a { color: #e3ecee; padding: 9px 12px; border-radius: 8px; display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 15px; border-left: 3px solid transparent; }
.side a svg { width: 20px; height: 20px; flex: none; stroke: #9fc9d8; }
.side a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.side a.on { background: var(--charcoal-2); color: #fff; border-left-color: var(--accent); }
.side a.on svg { stroke: var(--accent); }
.side .badge { margin-left: auto; background: #d9534f; color: #fff; font-size: 11px; border-radius: 99px; padding: 1px 7px; }
.side .tag { padding: 14px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7f8b8a; }
.side .spacer { flex: 1; }
.side .me { font-size: 13px; padding: 10px 12px; opacity: .85; border-top: 1px solid rgba(255,255,255,.15); }
.main { padding: 24px 28px 60px; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }

.stat .v { font-size: 26px; font-weight: 700; margin-top: 4px; }
.stat .l { color: var(--ink-3); font-size: 13px; }

/* forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field { margin-bottom: 12px; }
input, select, textarea {
  width: 100%; font: inherit; color: inherit; padding: 8px 10px; border: 1px solid #c9d3d1; border-radius: 8px; background: #fff;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: transparent; }
input[type=checkbox] { width: auto; margin: 0 8px 0 0; vertical-align: middle; }
.check { display: flex; align-items: center; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.btn {
  font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #f0f4f3; }
.btn.primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.primary:hover { background: var(--brand); }
.btn.danger { color: var(--danger); border-color: #f0c5c0; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f7faf9; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eef1f0; color: var(--ink-2); }
.pill.booked, .pill.confirmed, .pill.sent { background: #e8f0fb; color: #2b5797; }
.pill.arrived { background: var(--warn-soft); color: var(--warn); }
.pill.completed, .pill.paid { background: var(--ok-soft); color: var(--ok); }
.pill.dna, .pill.failed, .pill.void { background: var(--danger-soft); color: var(--danger); }
.pill.cancelled, .pill.skipped, .pill.draft { background: #eef1f0; color: var(--ink-3); }
.pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.done { background: var(--ok-soft); color: var(--ok); }

.alert { padding: 10px 14px; border-radius: 8px; background: var(--warn-soft); color: #6b3d00; border: 1px solid #f3d9a8; font-size: 14px; }
.alert.danger { background: var(--danger-soft); color: #7a1a12; border-color: #f2c4bf; }
.alert.info { background: var(--brand-soft); color: #18473f; border-color: #c6e0d9; }

.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { font: inherit; font-weight: 600; background: none; border: 0; padding: 10px 14px; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand-2); }

/* auth screens */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 80% 10%, #23333a 0, var(--charcoal) 55%); }
.auth .brandline { color: #a9b4b3; text-align: center; margin-top: 14px; font-size: 13px; letter-spacing: .04em; }
.auth .wordmark { color: #fff; font-weight: 800; font-size: 28px; text-align: center; margin-bottom: 16px; }
.auth .wordmark b { color: var(--accent); }
.qr { display: block; margin: 8px auto; width: 180px; height: 180px; background: #fff; padding: 6px; border-radius: 8px; }
.auth .card { width: 100%; max-width: 400px; padding: 28px; }
.auth h1 { margin-bottom: 18px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .12em; background: #f2f5f4; padding: 10px; border-radius: 8px; word-break: break-all; text-align: center; }

/* calendar */
.cal-wrap { overflow-x: auto; }
.cal { display: grid; min-width: 760px; position: relative; }
.cal .colhead { position: sticky; top: 0; background: var(--card); z-index: 2; text-align: center; padding: 8px 4px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.cal .colhead.today { color: var(--brand-2); }
.cal .times { position: relative; }
.cal .times div { position: absolute; right: 6px; font-size: 11px; color: var(--ink-3); transform: translateY(-6px); }
.cal .times div:first-child { transform: none; }
.cal .day { position: relative; border-left: 1px solid var(--line); cursor: crosshair; }
.cal .day .hr { position: absolute; left: 0; right: 0; border-top: 1px solid #edf1f0; }
.cal .day .hr.half { border-top-style: dashed; border-color: #f3f6f5; }
.cal .now { position: absolute; left: 0; right: 0; border-top: 2px solid #d9534f; z-index: 1; }
.appt { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 6px; font-size: 12px; color: #fff; overflow: hidden; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.15); line-height: 1.25; z-index: 1; }
.appt b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.dna { opacity: .55; text-decoration: line-through; }
.appt.completed { opacity: .8; }
.appt.arrived { outline: 2px solid #ffcf70; }

/* modal */
.backdrop { position: fixed; inset: 0; background: rgba(15, 30, 28, .45); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 820px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.typeahead { position: relative; }
.typeahead .opts { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); z-index: 5; max-height: 220px; overflow: auto; }
.typeahead .opts div { padding: 8px 10px; cursor: pointer; }
.typeahead .opts div:hover { background: var(--brand-soft); }

.note { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; }
.note dl { margin: 8px 0 0; display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; }
.note dt { font-weight: 600; color: var(--ink-2); font-size: 13px; }
.note dd { margin: 0; white-space: pre-wrap; }
.note .amend { margin-top: 10px; padding: 8px 10px; background: var(--warn-soft); border-radius: 6px; font-size: 14px; white-space: pre-wrap; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1d2726; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100; max-width: 90vw; }
#toast.show { opacity: 1; }
#toast.err { background: var(--danger); }

.invoice-sheet { max-width: 760px; }
.invoice-sheet .tot { text-align: right; font-size: 18px; font-weight: 700; margin-top: 10px; }


@media print {
  .side, .head .btn, .noprint { display: none !important; }
  .shell { display: block; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; }
}

/* Practicewizz additions */
.lock { position: fixed; inset: 0; background: rgba(20, 21, 20, .82); z-index: 60; display: grid; place-items: center; padding: 20px; }
.lock .modal { max-width: 620px; }
.section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.section > h3 { color: var(--brand); }
.consents .check { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; justify-content: space-between; }
.consents .check small { color: var(--ink-3); font-weight: 400; margin-left: 8px; }
.form-builder .fld { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; background: #fbfcfc; }
.form-builder .fld .row > * { flex: 1; }
.sig { border: 1px dashed #9aa8a7; border-radius: 8px; background: #fff; width: 100%; height: 160px; touch-action: none; display: block; }
.public { min-height: 100vh; background: var(--bg); }
.public header { background: var(--charcoal); color: #fff; padding: 18px 20px; }
.public header b { color: var(--accent); }
.public main { max-width: 720px; margin: 0 auto; padding: 20px; }
.public .fldwrap { margin-bottom: 16px; }
.public .opt { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-weight: 500; }
.dnsrec code { word-break: break-all; font-size: 13px; background: #f2f5f4; padding: 2px 4px; border-radius: 4px; }
.status-ok { color: var(--ok); font-weight: 700; } .status-missing { color: var(--warn); font-weight: 700; } .status-wrong { color: var(--danger); font-weight: 700; }
.kpi-good { color: var(--ok); } .kpi-bad { color: var(--danger); }
.help h2 { margin-top: 18px; }
.steps li { margin-bottom: 8px; }
.pill.restricted { background: var(--danger-soft); color: var(--danger); }
.pill.trialing { background: var(--warn-soft); color: var(--warn); } .pill.active { background: var(--ok-soft); color: var(--ok); }
.pill.past_due, .pill.suspended { background: var(--danger-soft); color: var(--danger); } .pill.queued, .pill.sent { background: #e8f0fb; color: #2b5797; }

/* calendar (Cliniko-style) */
.cal-toolbar { margin-bottom: 12px; }
.cal-toolbar .btn svg { width: 18px; height: 18px; stroke: var(--ink-2); vertical-align: middle; }
.cal-title { margin-left: 8px; }
.btn-group { display: inline-flex; } .btn-group .btn { border-radius: 0; margin-left: -1px; } .btn-group .btn:first-child { border-radius: 8px 0 0 8px; } .btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.muted-btn { color: var(--ink-3); }
.cal-layout { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.cal-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.cal-h { margin: 16px 0 8px; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); }
.mm { margin-top: 10px; } .mm-t { text-align: center; font-weight: 700; margin-bottom: 4px; }
.mm-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.mm-h { color: var(--ink-3); font-size: 12px; }
.mm-d { border: 0; background: none; padding: 5px 0; border-radius: 99px; cursor: pointer; font: inherit; color: var(--ink); }
.mm-d:hover { background: var(--brand-soft); } .mm-d.today { outline: 2px solid var(--accent); } .mm-d.sel { background: var(--brand-2); color: #fff; }
.waitbtn { width: 100%; display: flex; justify-content: space-between; margin-top: 12px; }
.badge-red { background: #c0392b; color: #fff; border-radius: 6px; padding: 0 8px; font-size: 13px; }
.pcheck { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfb; margin-bottom: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 99px; margin: 0 8px 0 2px; vertical-align: middle; }
.matrix th { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; height: 120px; text-transform: none; }
.check > span { display: inline-flex; align-items: center; gap: 4px; }
.btn.disabled { opacity: .45; pointer-events: none; }
details summary { cursor: pointer; color: var(--brand-2); }
@media (max-width: 1000px) { .cal-layout { grid-template-columns: 1fr; } .cal-side { position: static; max-height: none; } }

.invline { display: grid; grid-template-columns: minmax(0,3fr) 80px 130px auto; gap: 12px; align-items: end; margin-bottom: 10px; }
.invline > button { margin-bottom: 6px; }
.public .tot { text-align: right; font-weight: 700; margin: 8px 0 14px; }

/* ---------------------------------------------------------------- online booking (patient page) – brand: #0097b2 / #38b6ff on #3d3b3a */
.bk { --bk: #0097b2; --bk-2: #38b6ff; --bk-soft: #e6f6fa; --bk-ink: #3d3b3a; background: #fafbfc; color: var(--bk-ink); }
.bk header { background: #fff; color: var(--bk-ink); border-bottom: 1px solid var(--line); padding: 18px 32px; }
.bk .bk-head { display: flex; justify-content: space-between; align-items: center; max-width: 1280px; margin: 0 auto; }
.bk .bk-head strong { font-size: 22px; }
.bk .bk-head a { color: var(--bk); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.bk main { max-width: 1280px; padding: 28px 32px 60px; }
.bk h1 { font-size: 24px; font-weight: 600; margin: 4px 0 18px; text-transform: none; letter-spacing: 0; }
.bk .btn.primary { background: var(--bk); border-color: var(--bk); }
.bk .btn.primary:hover { background: #007f96; }
.bk svg, .bk-cat svg { width: 18px; height: 18px; flex: none; stroke: currentColor; }
.bk-sum-label svg { stroke: var(--ink-3); }
.bk-intro { color: var(--ink-2); margin: 0 0 8px; }
.bk-back { display: inline-flex; align-items: center; gap: 6px; color: var(--bk); text-decoration: none; font-weight: 500; margin-right: 10px; }
.bk-titlebar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.bk-titlebar h1 { margin: 0; }
.bk-tools { display: flex; gap: 12px; align-items: center; }
.bk-toggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.bk-toggle button { border: 0; background: #fff; padding: 8px 12px; cursor: pointer; color: var(--ink-3); }
.bk-toggle button.on { background: var(--bk-soft); color: var(--bk); }
.bk-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 12px; min-width: 260px; color: var(--ink-3); }
.bk-search input { border: 0; outline: 0; padding: 10px 0; font: inherit; width: 100%; background: transparent; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.bk-list { display: flex; flex-direction: column; gap: 12px; }
.bk-loc, .bk-cat { position: relative; text-align: left; border: 0; border-radius: 16px; color: #fff; cursor: pointer; overflow: hidden; font: inherit; box-shadow: 0 6px 18px rgba(20, 30, 40, .12); transition: transform .12s, box-shadow .12s; }
.bk-loc:hover, .bk-cat:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 30, 40, .18); }
.bk-loc:focus-visible, .bk-cat:focus-visible { outline: 3px solid var(--bk-2); outline-offset: 2px; }
.bk-loc.grid { min-height: 260px; display: flex; align-items: flex-end; padding: 24px 56px 24px 24px; }
.bk-loc.list, .bk-cat.list { min-height: 0; padding: 18px 56px 18px 20px; display: flex; align-items: center; }
.bk-loc h3, .bk-cat h3 { font-size: 20px; font-weight: 600; margin: 0 0 10px; color: #fff; }
.bk-line { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: 15px; line-height: 1.4; }
.bk-loc .bk-line { color: rgba(255, 255, 255, .95); }
.bk-arrow { position: absolute; right: 18px; bottom: 22px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; }
.bk-cat .bk-arrow { position: static; }
.bk-cat.grid { min-height: 300px; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; }
.bk-cat.sm { min-height: 200px; cursor: default; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; }
.bk-cat .bk-img { position: absolute; inset: 0; z-index: 0; }
.bk-cat .bk-img img { width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.bk-cat > * { position: relative; z-index: 1; }
.bk-initial { width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center; font-size: 30px; color: rgba(255, 255, 255, .9); }
.bk-cat.list .bk-initial { width: 44px; height: 44px; font-size: 20px; margin-right: 16px; flex: none; }
.bk-cat p { margin: 0 0 14px; color: rgba(255, 255, 255, .92); line-height: 1.45; }
.bk-cat .faint { opacity: .7; font-style: italic; }
.bk-chip { background: rgba(0, 0, 0, .35); padding: 5px 12px; border-radius: 999px; font-size: 14px; }
.bk-dirs { margin-top: 14px; gap: 18px; flex-wrap: wrap; }
.bk-dirs a { color: var(--bk); }
/* services */
.bk-svc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.bk-side h3 { font-size: 17px; margin: 0 0 10px; }
.bk-side h3 + button, .bk-side button + h3 { margin-top: 0; }
.bk-side button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 0; font: inherit; color: var(--ink-2); cursor: pointer; }
.bk-side button.on { color: var(--bk); font-weight: 600; }
.bk-side h3:not(:first-child) { margin-top: 24px; }
.bk-svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.bk-svc { padding: 0; overflow: hidden; display: flex; flex-direction: column; border-radius: 14px; }
.bk-svc .bk-img, .bk-svc .bk-img-fallback { height: 190px; }
.bk-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-img-fallback { display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .85); font-size: 48px; font-weight: 600; height: 100%; }
.bk-svc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.bk-svc-body h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.35; }
.bk-desc { color: var(--ink-2); margin: 0 0 4px; line-height: 1.5; }
.bk-desc.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bk-svc-body a { color: var(--bk); }
.bk-svc-body .bk-line { color: var(--ink); margin-top: 10px; }
.bk-svc-foot { margin-top: auto; padding-top: 14px; }
.bk-price { font-size: 22px; }
/* two-column steps */
.bk-2col { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; }
.bk-left h1 { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.bk-summary h2 { font-size: 22px; font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 8px; }
.bk-sum-label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.bk-sum-block { padding: 12px 0; border-bottom: 1px solid var(--line); }
.bk-sum-svc { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; margin-top: 10px; align-items: start; }
.bk-sum-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 8px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.bk-sum-row > span:nth-child(2) { text-align: right; }
.bk-sum-total { padding: 14px 0 4px; }
.bk-sum-total .row { margin-top: 12px; font-size: 18px; }
.bk-edit, .bk-icon-btn { background: none; border: 0; color: var(--bk); cursor: pointer; padding: 4px; display: inline-flex; }
.bk-icon-btn { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; color: var(--ink); }
.btn.bk-next { width: 100%; justify-content: center; margin-top: 16px; padding: 14px; font-size: 17px; }
.bk-review { padding: 22px; }
.bk-review .bk-img, .bk-review .bk-img-fallback { width: 120px; height: 90px; border-radius: 10px; overflow: hidden; flex: none; font-size: 32px; }
.bk-review h3 { margin: 0; font-size: 19px; }
/* date & time */
.bk-dt { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; }
.bk-cal-head { display: flex; align-items: center; justify-content: center; gap: 30px; margin: 10px 0 20px; font-size: 19px; }
.bk-round { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--bk-soft); color: var(--bk); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bk-round:disabled { opacity: .35; cursor: default; }
.bk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px 4px; text-align: center; }
.bk-dow { font-weight: 500; padding-bottom: 8px; }
.bk-day { width: 48px; height: 48px; margin: 0 auto; border-radius: 50%; border: 0; background: none; font: inherit; font-size: 17px; color: var(--ink-3); position: relative; }
.bk-day.has { background: var(--bk-soft); color: var(--bk); cursor: pointer; font-weight: 500; }
.bk-day.has:hover { background: #cdeef5; }
.bk-day.sel { background: var(--bk-2); color: #fff; }
.bk-day.today::after { content: ''; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.bk-times { padding-top: 8px; }
.bk-times-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 470px; overflow-y: auto; padding: 2px 4px 2px 0; margin-top: 10px; }
.bk-time { border: 1.5px solid var(--bk-2); color: var(--bk); background: #fff; border-radius: 6px; padding: 12px 8px; font: inherit; font-size: 17px; cursor: pointer; }
.bk-time:hover { background: var(--bk-soft); }
.bk-time.sel { background: var(--bk-2); color: #fff; }
.bk-tz { margin-top: 32px; max-width: 420px; }
.bk-tz-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #f1f3f4; border-radius: 6px; padding: 12px 14px; margin-top: 6px; color: var(--ink-2); }
.bk-staff { margin-top: 16px; }
.bk-staff select { width: 100%; margin: 10px 0; }
.bk-prac, .bk-prac-banner { display: flex; gap: 14px; align-items: flex-start; }
.bk-prac .bk-img, .bk-prac-banner .bk-img { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--bk-soft); color: var(--bk); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; flex: none; }
.bk-prac-banner { margin-bottom: 18px; padding: 14px 18px; align-items: center; }
.bk-done { text-align: center; max-width: 560px; margin: 20px auto; padding: 36px; }
.bk-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--bk); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.bk-when { font-size: 20px; font-weight: 600; }
/* staff-side photo field */
.photo-prev { width: 96px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.photo-prev.round { width: 64px; border-radius: 50%; }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) {
  .bk-2col, .bk-dt, .bk-svc-layout { grid-template-columns: 1fr; }
  .bk main { padding: 18px 14px 40px; }
  .bk-search { min-width: 0; flex: 1; }
  .bk-side { display: flex; flex-wrap: wrap; gap: 6px 14px; }
  .bk-side h3 { width: 100%; margin-top: 8px !important; }
  .bk-side button { width: auto; }
}
.bk h2, .bk h3, .bk-cat h3 { text-transform: none; letter-spacing: 0; font-family: inherit; }

/* ---------------------------------------------------------------- planner, goals, KPIs (hub style: navy cards) */
.plan-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.plan-date { font-size: 18px; margin-left: 6px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 14px; }
.wk { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: inherit; color: var(--ink); }
.wk.on { border-color: #38b6ff; box-shadow: 0 0 0 2px #38b6ff33; }
.wk.today .wk-n { color: #0097b2; }
.wk-d { font-size: 12px; color: var(--ink-3); text-transform: uppercase; }
.wk-n { font-size: 20px; font-weight: 700; }
.wk-bar { width: 80%; height: 5px; border-radius: 3px; background: #e3e8ec; overflow: hidden; }
.wk-bar i { display: block; height: 100%; background: #2fbf71; }
.wk-c { font-size: 12px; color: var(--ink-3); }
.plan-sum { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #1f2a3a; color: #fff; border-radius: 16px; padding: 16px 20px; margin-bottom: 16px; }
.plan-sum .small.muted { color: #b9c6d3; }
.ring { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ring span { width: 48px; height: 48px; border-radius: 50%; background: #1f2a3a; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.sum-chip { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 14px; }
.sum-chip b { font-size: 18px; }
.sum-chip.red b { color: #ff7b7b; } .sum-chip.amber b { color: #ffc15e; } .sum-chip.green b { color: #5fe3a1; }
.plan-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.plan-col h3 { margin: 0 0 8px; }
.task { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-left: 5px solid #e5484d; border-radius: 10px; margin-top: 8px; background: #fff; }
.task.amber { border-left-color: #f5a524; } .task.green { border-left-color: #2fbf71; background: #f4fbf7; }
.task.green .task-title { text-decoration: line-through; color: var(--ink-3); }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 600; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.task-meta .late, .goal-meta .late { color: #c4320a; font-weight: 600; }
.goal-tag { border: 1px solid; border-radius: 999px; padding: 0 8px; font-weight: 600; }
.rag { display: flex; gap: 5px; background: #1f2a3a; padding: 5px 7px; border-radius: 999px; flex: none; }
.rag-b { width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer; opacity: .28; padding: 0; transition: opacity .1s, transform .1s; }
.rag-b.red { background: #ff5c5c; } .rag-b.amber { background: #ffb020; } .rag-b.green { background: #34d17f; }
.rag-b.on { opacity: 1; box-shadow: 0 0 8px currentColor; transform: scale(1.1); }
.rag-b.red.on { color: #ff5c5c; } .rag-b.amber.on { color: #ffb020; } .rag-b.green.on { color: #34d17f; }
.rag-b:hover:not(:disabled) { opacity: .7; }
.rag-b:disabled { cursor: default; }
.rag-b:focus-visible { outline: 2px solid #38b6ff; outline-offset: 2px; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--ink-3); padding: 6px; border-radius: 8px; display: inline-flex; }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; }
.icon-btn:hover { background: var(--bg); }
.icon-btn.light { color: #b9c6d3; } .icon-btn.light:hover { background: rgba(255, 255, 255, .1); }
.empty-plan { text-align: center; padding: 40px; }
.goals-hero { display: flex; justify-content: space-between; align-items: center; background: #1f2a3a; color: #fff; border-radius: 18px; padding: 24px 28px; margin-bottom: 18px; border-bottom: 4px solid #38b6ff; }
.goals-hero h2 { color: #fff; font-size: 26px; letter-spacing: .5px; margin: 0 0 4px; }
.goals-hero p { margin: 0; color: #9fd8f5; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; }
.goal-card { background: #1f2a3a; color: #fff; border-radius: 18px; padding: 22px; border-bottom: 4px solid var(--gc, #38b6ff); }
.goal-card.achieved { opacity: .85; }
.goal-head { display: flex; gap: 14px; align-items: flex-start; }
.goal-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gc, #38b6ff); color: #1f2a3a; display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.goal-card h3 { color: #fff; margin: 0 0 4px; font-size: 18px; text-transform: none; letter-spacing: 0; }
.goal-card p { margin: 0; color: #b9c6d3; font-size: 14px; line-height: 1.45; }
.goal-progress { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; }
.gp-bar { flex: 1; height: 12px; background: rgba(255, 255, 255, .12); border-radius: 6px; overflow: hidden; }
.gp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gc, #38b6ff), #34d17f); border-radius: 6px; transition: width .4s; }
.goal-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: #b9c6d3; }
.goal-meta .late { color: #ff9b7b; }
.goal-toggle { margin-top: 12px; background: rgba(255, 255, 255, .08); color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.goal-tasks { margin-top: 12px; color: var(--ink); }
.kpi-targets { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.kpi-t { background: #1f2a3a; color: #fff; border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 180px; }
.kpi-t strong { font-size: 20px; color: #38b6ff; }
.kpi-t .muted { color: #9fb0c0 !important; }
.kpi-cell { min-width: 84px; padding: 8px 12px; border-radius: 10px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.kpi-cell:disabled { cursor: default; }
.kpi-cell.green { background: #dcf7e8; color: #126b3c; } .kpi-cell.amber { background: #fff1d6; color: #8a5300; } .kpi-cell.red { background: #ffe1e1; color: #a1191d; } .kpi-cell.none { background: var(--bg); color: var(--ink-3); }
@media (max-width: 700px) { .week-strip { grid-template-columns: repeat(7, minmax(40px, 1fr)); } .goal-grid, .plan-cols { grid-template-columns: 1fr; } }
.task-meta .goal-tag { white-space: nowrap; font-size: 12px; line-height: 18px; }
.task .rag { align-self: center; }

/* ---------------------------------------------------------------- reports home */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 28px; }
.rcard { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.rchart-wrap { background: #e3edf3; padding: 18px 18px 10px; border-bottom: 1px solid var(--line); }
.rchart { width: 100%; height: auto; display: block; }
.rlbl { font-size: 10px; fill: #7c8f9b; }
.rcap { text-align: right; font-style: italic; color: #6b7d88; margin-top: 4px; }
.rbody { padding: 20px 28px 22px; }
.rbody h2 { font-size: 24px; font-weight: 500; text-transform: none; letter-spacing: 0; margin: 0 0 8px; }
.rbody ul { list-style: circle; margin: 0; padding-left: 22px; line-height: 2; }
.rbody a { color: #c0294b; text-decoration: none; font-size: 16px; }
.rbody a:hover { text-decoration: underline; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.cal .day.shaded { background: repeating-linear-gradient(0deg, #e9eceb, #e9eceb 1px, #eef1f0 1px, #eef1f0 2px); }
.cal .day .work { position: absolute; left: 0; right: 0; background: #fff; z-index: 0; }
.cal .day .hr { z-index: 1; pointer-events: none; }
.cal .day .exc { position: absolute; left: 0; right: 0; z-index: 0; font-size: 11px; padding: 2px 4px; overflow: hidden; cursor: pointer; }
.cal .day .exc.block { background: repeating-linear-gradient(135deg, #cfd6d4, #cfd6d4 6px, #dde2e0 6px, #dde2e0 12px); color: #3f4a48; border-top: 2px solid #8b9795; }
.cal .day .exc.extra { background: rgba(52, 209, 127, .14); border-left: 3px solid #34d17f; color: #126b3c; }
.cal .day .exc span { background: rgba(255, 255, 255, .8); border-radius: 4px; padding: 0 4px; }
.selall { margin: 8px 0 4px; }
.selall a { color: #c0294b; }
.side-btn { display: block; width: 100%; text-align: left; margin-top: 6px; }

/* ---------------------------------------------------------------- growth numbers */
.ghero { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.gtile { background: #1f2a3a; color: #fff; border-radius: 16px; padding: 18px; border-bottom: 4px solid #38b6ff; }
.gtile.green { border-bottom-color: #34d17f; } .gtile.amber { border-bottom-color: #ffb020; } .gtile.red { border-bottom-color: #ff5c5c; }
.gtile.green .gv { color: #5fe3a1; } .gtile.amber .gv { color: #ffc15e; } .gtile.red .gv { color: #ff8b8b; }
.gtile .gl { font-size: 13px; color: #b9c6d3; }
.gtile .gv { font-size: 30px; font-weight: 700; margin: 6px 0 4px; color: #38b6ff; }
.gtile .gs { font-size: 12px; color: #9fb0c0; }
.gtile .gh { font-size: 12px; color: #dce6ee; margin-top: 10px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 8px; }
.gfunnel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.gstep { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.gstep .gl { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .3px; }
.gstep .gv { font-size: 24px; font-weight: 700; color: #0097b2; }
.gstep .gs { font-size: 12px; color: var(--ink-3); }
.garrow { position: absolute; right: -12px; top: 50%; transform: translateY(-50%); font-size: 22px; color: #38b6ff; z-index: 1; }
.ghelp { line-height: 1.6; padding-left: 18px; margin-top: 12px; }
@media (max-width: 1100px) { .ghero { grid-template-columns: repeat(2, 1fr); } .gfunnel { grid-template-columns: repeat(3, 1fr); } .garrow { display: none; } }

/* ---------------------------------------------------------------- sidebar sections */
.side .nav-divider { height: 1px; background: rgba(255,255,255,.1); margin: 10px 12px; }
.side .nav-group { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #c9d4d6; font-weight: 600; font-size: 14px; cursor: pointer; }
.side .nav-group svg { width: 20px; height: 20px; flex: none; stroke: #9fc9d8; }
.side .nav-group:hover { background: rgba(255,255,255,.07); }
.side .nav-group:focus-visible, .side .me:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.side .nav-group.active { color: #fff; }
.side .nav-group.active svg { stroke: var(--accent); }
.side .chev { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #7f8b8a; border-bottom: 2px solid #7f8b8a; transform: rotate(-45deg); transition: transform .15s; }
.side .nav-group[aria-expanded="true"] .chev { transform: rotate(45deg); }
.side .chev.up { transform: rotate(-135deg); }
.side .nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 22px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.12); }
.side .nav-sub a { font-size: 14px; padding: 7px 10px; color: #c9d4d6; }
.side .nav-sub a.on { color: #fff; background: var(--charcoal-2); border-left-color: var(--accent); }
.side .me-wrap { position: relative; border-top: 1px solid rgba(255,255,255,.15); margin-top: 8px; padding-top: 8px; }
.side .me { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1.25; color: #fff; border-top: 0; opacity: 1; }
.side .me:hover { background: rgba(255,255,255,.07); }
.side .me small { color: #a9b4b3; }
.side .me-av { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #141514; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.side .me-menu { position: absolute; bottom: 100%; left: 0; right: 0; background: #232625; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 6px; box-shadow: 0 -8px 24px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.side .me-menu[hidden] { display: none; }
.side .me-menu a { font-size: 14px; padding: 8px 10px; }
.side .nav-sub[hidden] { display: none; }

/* ---------------------------------------------------------------- calm, minimal layer */
.card { box-shadow: none; border-color: #e6ebe9; border-radius: 14px; }
.head { margin-bottom: 22px; }
.stat .v { font-size: 28px; }
.stat .l { font-size: 13px; }
table.clean td { border-bottom: 1px solid #f0f3f2; padding: 10px 8px; vertical-align: top; }
table.clean tr:last-child td { border-bottom: 0; }
td.right { text-align: right; } td.nowrap { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dash-stats { margin-bottom: 16px; }
.dash-main { align-items: start; margin-bottom: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.folds { display: flex; flex-direction: column; gap: 10px; }
details.fold { background: #fff; border: 1px solid #e6ebe9; border-radius: 12px; margin-bottom: 10px; }
.folds details.fold { margin-bottom: 0; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 16px; font-weight: 600; color: var(--ink); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(45deg); }
details.fold > summary:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: 12px; }
.fold-count { background: var(--bg); color: var(--ink-2); border-radius: 999px; padding: 1px 9px; font-size: 13px; font-weight: 600; }
.fold-body { padding: 0 16px 14px; }
details.fold.warn { border-color: #f3d9a8; background: #fffaf0; }
details.fold.warn .fold-count { background: #ffe9c2; color: #6b3d00; }
.cal-side details.fold { border: 0; background: none; margin: 4px 0 0; }
.cal-side details.fold > summary { padding: 10px 2px; font-size: 14px; }
.cal-side .fold-body { padding: 0 2px 8px; }
.more { position: relative; }
.more-list { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; min-width: 220px; z-index: 30; display: flex; flex-direction: column; gap: 2px; }
.more-list[hidden] { display: none; }
.more-list .btn, .more-list a { border: 0; background: none; justify-content: flex-start; text-align: left; width: 100%; box-shadow: none; }
.more-list .btn:hover, .more-list a:hover { background: var(--bg); }
.set-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 22px; max-width: 1100px; }
.set-group h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 8px 4px; font-weight: 600; }
.set-list { background: #fff; border: 1px solid #e6ebe9; border-radius: 14px; overflow: hidden; }
.set-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #f0f3f2; color: var(--ink); text-decoration: none; }
.set-item:last-child { border-bottom: 0; }
.set-item:hover { background: #f8faf9; text-decoration: none; }
.set-item strong { display: block; font-weight: 600; }
.set-item small { color: var(--ink-3); font-size: 13px; }
.set-chev { margin-left: auto; color: var(--ink-3); font-style: normal; font-size: 22px; line-height: 1; }
.crumb { color: var(--ink-3); font-weight: 500; text-decoration: none; }
.crumb:hover { color: var(--brand); }
.crumb-sep { color: #c5cdcb; font-weight: 400; }

/* custom fields */
.pform details.fold { margin-bottom: 10px; }
.fgroup .flist { margin-top: 12px; border-top: 1px solid #f0f3f2; }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f3f2; }
.frow:last-child { border-bottom: 0; }
.fmain strong { font-weight: 600; }
.freq { margin-left: 8px; font-size: 11px; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 1px 8px; }
.fbadge { margin-left: 10px; font-size: 12px; font-weight: 500; color: var(--ink-3); }

/* network diary */
.ncal .day .work.free { cursor: copy; z-index: 0; }
.ncal .day .work.free:hover { background: #effaf6; }
.ncal .nbusy { position: absolute; left: 3px; right: 3px; background: #b8c2c0; color: #26302e; border-radius: 6px; font-size: 12px; padding: 2px 6px; z-index: 2; overflow: hidden; }
.ncal .nbusy.mine { background: #38b6ff; color: #fff; }
/* picture tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ptile { display: flex; flex-direction: column; background: #fff; border: 1px solid #e6ebe9; border-radius: 16px; overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.ptile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,30,40,.08); text-decoration: none; }
.ptile:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.ptile-art { height: 96px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 22%, white), color-mix(in srgb, var(--tc) 8%, white)); }
.ptile-art svg { width: 44px; height: 44px; stroke: var(--tc); stroke-width: 1.4; }
.ptile-body { padding: 14px 16px 16px; }
.ptile-body strong { display: block; font-size: 16px; font-weight: 650; }
.ptile-body small { color: var(--ink-3); font-size: 13px; line-height: 1.4; display: block; margin-top: 3px; }

.set-groups.tiles { display: block; max-width: none; }
.set-groups.tiles .set-group { margin-bottom: 26px; }
.profile-card { display: grid; grid-template-columns: 140px 1fr 260px; gap: 28px; background: #fff; border: 1px solid #e6ebe9; border-radius: 18px; padding: 28px; align-items: start; max-width: 1100px; }
.pc-photo { width: 140px; height: 140px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #d9eef6, #eef7fb); display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 700; color: var(--brand); }
.pc-photo img { width: 100%; height: 100%; object-fit: cover; }
.pc-main h2 { font-size: 24px; margin: 0; }
.pc-title { color: var(--ink-2); margin-top: 2px; }
.pc-reg { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.pc-reg span { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600; }
.pc-todo { background: #fffaf0; border: 1px solid #f3d9a8; border-radius: 12px; padding: 14px 16px; font-size: 14px; }
.pc-todo ul { margin: 6px 0 0; padding-left: 18px; }
@media (max-width: 1000px) { .profile-card { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- professional invoice (A4) */
.inv { background: #fff; border: 1px solid #e6ebe9; border-radius: 14px; max-width: 860px; padding: 48px 52px; color: #1d2726; font-size: 14px; line-height: 1.5; }
.inv-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 3px solid #0097b2; }
.inv-brand img { max-height: 64px; max-width: 240px; display: block; margin-bottom: 10px; }
.inv-word { font-size: 24px; font-weight: 800; color: #0097b2; margin-bottom: 8px; letter-spacing: -.01em; }
.inv-from { color: #4c5a58; font-size: 13px; }
.inv-meta { text-align: right; position: relative; }
.inv-title { font-size: 30px; font-weight: 300; letter-spacing: .12em; text-transform: uppercase; color: #3d3b3a; margin-bottom: 8px; }
.inv-meta table { margin-left: auto; font-size: 13px; }
.inv-meta td { padding: 1px 0 1px 16px; border: 0; }
.inv-meta td:first-child { color: #7c8987; }
.inv-meta td:last-child { font-weight: 600; text-align: right; }
.inv-stamp { display: inline-block; margin-top: 10px; border: 2px solid; border-radius: 6px; padding: 2px 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; transform: rotate(-4deg); }
.inv-stamp.paid { color: #1f8a57; } .inv-stamp.void { color: #7c8987; } .inv-stamp.due { color: #c4320a; }
.inv-parties, .inv-appt { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid #edf1f0; }
.inv-appt { background: #f6fbfd; margin: 0 -52px; padding: 20px 52px; border-bottom: 0; }
.inv-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7c8987; font-weight: 600; margin-bottom: 4px; }
.inv-regs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.inv-regs span { border: 1px solid #b9dde8; color: #0b6f86; background: #fff; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; }
.inv-items { width: 100%; margin-top: 22px; border-collapse: collapse; }
.inv-items th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7c8987; border-bottom: 2px solid #1d2726; padding: 8px 6px; }
.inv-items td { padding: 12px 6px; border-bottom: 1px solid #edf1f0; }
.inv-items .num, .inv-pays .num { text-align: right; }
.inv-totals { margin: 14px 0 0 auto; width: 300px; }
.inv-totals > div { display: flex; justify-content: space-between; padding: 4px 6px; }
.inv-due { background: #1d2726; color: #fff; border-radius: 8px; padding: 10px 12px !important; margin-top: 6px; font-weight: 700; font-size: 17px; }
.inv-pays { margin-top: 20px; } .inv-pays table { width: 100%; font-size: 13px; } .inv-pays td { padding: 4px 6px; border-bottom: 1px solid #f3f5f4; }
.inv-notes { margin-top: 18px; color: #4c5a58; }
.inv-foot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; margin-top: 32px; padding-top: 18px; border-top: 1px solid #edf1f0; font-size: 12px; color: #4c5a58; }
.inv-legal { text-align: right; }
.inv-thanks { margin-top: 8px; color: #0097b2; font-weight: 600; font-size: 13px; }
@media print {
  .side, .head .row, .noprint, .alert { display: none !important; }
  .main { padding: 0 !important; } .head { margin: 0 0 8px; } .head h1 { display: none; }
  .inv { border: 0; padding: 0; max-width: none; } .inv-appt { margin: 0; padding: 16px 0; background: none; }
  @page { size: A4; margin: 16mm; }
}

/* availability email */
.ae { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.ae-side { display: flex; flex-direction: column; gap: 12px; }
.ae-side details.fold { margin: 0; }
.ae-preview textarea { font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; background: #fbfcfc; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; background: #fff; }
.chip.on { border-color: #0097b2; background: #e6f6fa; color: #075e70; font-weight: 600; }
.chip input { accent-color: #0097b2; }
@media (max-width: 1100px) { .ae { grid-template-columns: 1fr; } }
/* birthdays */
.seg { display: inline-flex; background: #eef2f1; border-radius: 10px; padding: 3px; }
.seg a { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.seg a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.bday-month { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 4px 0 10px; }
.bday-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.bday { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid #e6ebe9; border-radius: 14px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.bday:hover { border-color: #b9dde8; text-decoration: none; }
.bday.today { border-color: #e61f93; box-shadow: 0 0 0 2px #e61f9322; }
.bday-date { width: 54px; flex: none; text-align: center; border-radius: 10px; background: #f6f8f7; padding: 6px 0; display: flex; flex-direction: column; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.bday-date strong { font-size: 22px; color: var(--ink); line-height: 1.1; letter-spacing: 0; }
.bday-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bday-body small { color: var(--ink-3); }
.bday-tag { align-self: flex-start; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #f1f3f2; color: var(--ink-3); margin-top: 3px; }
.bday-tag.ok { background: #e3f6ec; color: #1f8a57; }
/* unsubscribe */
.unsub main { max-width: 560px; padding-top: 60px; }
.unsub-card { padding: 32px; }
.unsub-card h1 { margin-bottom: 8px; }
.unsub-reasons { border: 0; padding: 0; margin: 16px 0; }
.unsub-reasons legend { font-weight: 600; margin-bottom: 6px; }

/* dashboard lines */
.lines { display: flex; flex-direction: column; }
.line { display: flex; align-items: center; gap: 14px; padding: 10px 2px; border-bottom: 1px solid #f0f3f2; color: var(--ink); text-decoration: none; }
.line:last-child { border-bottom: 0; }
.line.click, a.line { cursor: pointer; } .line.click:hover, a.line:hover { background: #fafbfb; text-decoration: none; }
.line-time { width: 56px; flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.line-main { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.line-main strong { font-weight: 600; }
.line-flag { color: #a15c00; }
.sel-row td { background: #e6f6fa; }
/* slim task status */
.task { border: 1px solid #edf1f0; border-left: 1px solid #edf1f0; border-radius: 12px; background: #fff; }
.task.amber, .task.green { border-left-color: #edf1f0; }
.task.green { background: #fff; }
.task.green .task-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: #c5cdcb; }
.goal-tag { border: 0 !important; background: #f2f5f4; color: var(--ink-2) !important; font-weight: 500; }
.stat-dot { all: unset; box-sizing: border-box; width: 22px; height: 22px; border-radius: 50%; flex: none; cursor: pointer; position: relative; border: 1.5px solid #b8c2c0; transition: border-color .15s, background .15s; }
.stat-dot:hover:not(:disabled) { border-color: #0097b2; }
.stat-dot:focus-visible { outline: 2px solid #38b6ff; outline-offset: 2px; }
.stat-dot:disabled { cursor: default; opacity: .7; }
.stat-dot.amber { border-color: #0097b2; background: linear-gradient(90deg, #0097b2 50%, transparent 50%); }
.stat-dot.green { border-color: #1d2726; background: #1d2726; }
.stat-dot.green::after { content: ''; position: absolute; left: 6.5px; top: 3.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.stat-dot.mini { width: 12px; height: 12px; border-width: 1.5px; cursor: default; display: inline-block; }
.stat-dot.mini.green::after { display: none; }
.sum-chip .stat-dot.mini.red { border-color: #9fb0c0; }
.sum-chip .stat-dot.mini.green { border-color: #fff; background: #fff; }
.sum-chip b { color: #fff !important; }
.plan-sum { background: #fff; color: var(--ink); border: 1px solid #e6ebe9; }
.plan-sum .small.muted { color: var(--ink-3); }
.plan-sum .ring span { background: #fff; }
.sum-chip { background: #f4f6f5; } .sum-chip b { color: var(--ink) !important; }
.sum-chip .stat-dot.mini.green { border-color: #1d2726; background: #1d2726; }

/* postcode finder */
.pf { margin-bottom: 12px; position: relative; }
.pf-row { display: flex; gap: 8px; }
.pf-input { max-width: 220px; text-transform: uppercase; }
.pf-results { position: absolute; z-index: 40; left: 0; top: 100%; margin-top: 4px; width: min(560px, 100%); max-height: 320px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 6px; }
.pf-results[hidden] { display: none; }
.pf-item { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.pf-item:hover, .pf-item:focus-visible { background: #f2f8fa; }
.pf-item small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.pf-msg { padding: 8px 10px; }

/* permissions */
.perm-grid { display: grid; grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(110px, 1fr)); align-items: center; }
.perm-grid > div { padding: 12px 8px; border-bottom: 1px solid #f0f3f2; }
.perm-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; text-align: center; }
.perm-h:first-child { text-align: left; }
.perm-name strong { display: block; font-weight: 600; } .perm-name small { color: var(--ink-3); }
.perm-cell { text-align: center; }
.perm-always { font-size: 13px; color: var(--ink-3); }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #d5dcda; border-radius: 999px; transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: #0097b2; }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid #38b6ff; outline-offset: 2px; }
.switch.locked { cursor: not-allowed; opacity: .45; }
.perm-person { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f3f2; flex-wrap: wrap; }
.perm-person .perm-name { width: 200px; }
.perm-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pchip { all: unset; cursor: pointer; padding: 5px 11px; border-radius: 999px; font-size: 13px; background: #f1f3f2; color: var(--ink-3); border: 1px solid transparent; }
.pchip.on { background: #e6f6fa; color: #075e70; }
.pchip.custom { border-color: #0097b2; }
.pchip:focus-visible { outline: 2px solid #38b6ff; }

/* reports – Practicewizz style: navy cards, cyan trends, links on click */
.rpt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.rpt { background: #fff; border: 1px solid #e6ebe9; border-radius: 18px; overflow: hidden; }
.rpt-top { background: #1f2a3a; color: #fff; padding: 20px 22px 0; }
.rpt-title { display: flex; align-items: center; gap: 10px; }
.rpt-title h2 { color: #fff; margin: 0; font-size: 16px; font-weight: 600; letter-spacing: .01em; text-transform: none; }
.rpt-ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(56,182,255,.16); display: flex; align-items: center; justify-content: center; }
.rpt-ic svg { width: 17px; height: 17px; stroke: #38b6ff; }
.rpt-num { font-size: 32px; font-weight: 700; margin-top: 14px; display: flex; align-items: baseline; gap: 10px; }
.rpt-delta { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.rpt-delta.up { background: rgba(52,209,127,.16); color: #5fe3a1; } .rpt-delta.down { background: rgba(255,92,92,.16); color: #ff8b8b; }
.rpt-sub { color: #9fb0c0; font-size: 13px; }
.rpt-chart { margin: 8px -22px 0; }
.rpt-chart .rchart { display: block; }
.rpt-chart .rlbl { fill: #6f8294; }
.rpt-chart line { stroke: #34465a; }
.rpt details.fold { border: 0; border-radius: 0; margin: 0; }
.rpt details.fold > summary { padding: 14px 22px; font-size: 14px; }
.rpt-links { display: flex; flex-direction: column; }
.rpt-links a { display: flex; justify-content: space-between; padding: 10px 2px; border-top: 1px solid #f0f3f2; color: var(--ink); text-decoration: none; font-size: 14px; }
.rpt-links a:hover { color: #0097b2; }
.rpt-links i { font-style: normal; color: var(--ink-3); }

.rpt-toggle { margin-left: auto; display: flex; background: rgba(255,255,255,.08); border-radius: 8px; padding: 2px; }
.rpt-toggle button { all: unset; cursor: pointer; font-size: 12px; padding: 3px 9px; border-radius: 6px; color: #9fb0c0; }
.rpt-toggle button.on { background: rgba(56,182,255,.2); color: #fff; }
.rpt-chart rect { opacity: .9; }
.view-seg { margin: 14px 0 4px; }
.rpt-view { margin-top: 12px; }
.rchart.big { width: 100%; height: auto; margin-top: 10px; }
.line-wrap .rchart { width: 100%; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.donut-wrap { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.donut { width: 240px; height: 240px; }
.donut-total { font-size: 20px; font-weight: 700; fill: var(--ink); }
.donut-legend { display: flex; flex-direction: column; gap: 6px; min-width: 260px; }
.donut-legend div { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend b { margin-left: auto; font-weight: 600; }

/* appointment form */
.af { display: flex; flex-direction: column; }
.af-row { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: start; padding: 9px 0; }
.af-label { font-weight: 600; color: var(--ink-2); padding-top: 10px; font-size: 14px; }
.af-field select, .af-field input:not([type=checkbox]):not([type=radio]), .af-field textarea { width: 100%; }
.af-static { padding-top: 10px; font-weight: 600; }
.af-help { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.af-help a { color: #0097b2; }
.af-when { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.af-when input[type=date] { width: 170px !important; } .af-when input[type=time] { width: 120px !important; }
.af-when select { width: auto !important; }
.af-end { color: var(--ink-3); font-size: 14px; }
.af-inline { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); }
.af-inline[hidden] { display: none; }
.af-checks { display: flex; flex-direction: column; gap: 6px; }
.af-note { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.af-note .af-ic { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.af-note.ok { background: #effaf4; color: #1f6d47; } .af-note.ok .af-ic { background: #2f9e6b; color: #fff; }
.af-note.warn { background: #fff7e8; color: #7a4a00; } .af-note.warn .af-ic { background: #f0b84a; color: #fff; }
.af-note.bad { background: #fdeeee; color: #8a1f1a; } .af-note.bad .af-ic { background: #d14b45; color: #fff; }
.af-actions { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f0f3f2; margin-top: 10px; padding-top: 14px; }
.af-actions a { color: #0097b2; }
@media (max-width: 640px) { .af-row { grid-template-columns: 1fr; gap: 4px; } .af-label { padding-top: 0; } }

/* availability */
.av { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.av-people { display: flex; flex-direction: column; gap: 6px; }
.av-person { all: unset; box-sizing: border-box; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; background: #fff; border: 1px solid #e6ebe9; }
.av-person.on { border-color: #0097b2; box-shadow: 0 0 0 2px #0097b222; }
.av-person strong { display: block; font-weight: 600; font-size: 14px; } .av-person small { color: var(--ink-3); font-size: 12px; }
.av-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.av-main { display: flex; flex-direction: column; gap: 14px; }
.av-week { margin-top: 10px; }
.av-day { display: grid; grid-template-columns: 120px 1fr 36px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f3f2; }
.av-day:last-child { border-bottom: 0; }
.av-dn { font-weight: 600; } .av-day.off .av-dn { color: var(--ink-3); font-weight: 500; }
.av-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.av-slot { display: inline-flex; align-items: center; gap: 8px; background: #e6f6fa; color: #075e70; border-radius: 999px; padding: 5px 6px 5px 12px; font-weight: 600; font-size: 14px; }
.av-slot small { color: #3f8798; font-weight: 500; }
.av-x { all: unset; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; text-align: center; line-height: 20px; color: #3f8798; }
.av-x:hover { background: #cdeef5; }
.av-add { all: unset; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; border: 1px dashed #b8c2c0; text-align: center; line-height: 28px; color: var(--ink-3); }
.av-add:hover { border-color: #0097b2; color: #0097b2; }
.av-kind { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.av-kind.extra { background: #e3f6ec; color: #1f8a57; } .av-kind.block { background: #f1f3f2; color: var(--ink-2); }
@media (max-width: 900px) { .av { grid-template-columns: 1fr; } }

/* ---------- cases, account credit, insurers, invoice run, templates ---------- */
.case-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 12px; }
.case-card.closed { opacity: .7; }
.case-card .chip { cursor: default; padding: 3px 10px; font-size: 12px; }
.chip.open { border-color: #b9e3ec; background: #eef9fc; color: #075e70; }
.chip.warn { border-color: #f1d3a3; background: var(--warn-soft); color: var(--warn); }
.case-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.case-facts small { display: block; color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.case-facts b { font-weight: 600; font-size: 14px; }
.case-bar { height: 4px; background: #edf1f0; border-radius: 4px; overflow: hidden; }
.case-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0097b2, #38b6ff); }
.empty-soft { text-align: center; padding: 28px; }
.acct-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: #1f2a3a; color: #fff; border-radius: 16px; padding: 20px 24px; margin-bottom: 14px; }
.acct-hero small { color: #9fb3c8; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.acct-hero .muted, .acct-hero .small { color: #c9d6e2; }
.acct-num { font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
td.num, th.num { text-align: right; }
td.bad, small.bad, .bad { color: var(--danger); }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.ins-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.ins-card:hover { box-shadow: 0 6px 18px rgba(16, 40, 36, .08); transform: translateY(-1px); }
.ins-card.off { opacity: .55; }
.ins-mono { width: 44px; height: 44px; border-radius: 12px; background: #e6f6fa; color: #075e70; display: grid; place-items: center; font-weight: 700; }
.ins-body small, .ins-num small { display: block; color: var(--ink-3); font-size: 12px; }
.ins-num { text-align: right; }
.run-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 12px; }
.run-stats > div { background: var(--bg); border-radius: 12px; padding: 12px; }
.run-stats b { display: block; font-size: 22px; }
.run-stats small { color: var(--ink-3); }
.tpl-card { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tpl-ic { width: 40px; height: 40px; border-radius: 10px; background: #e9f3f3; color: #2e6f73; display: grid; place-items: center; }
.tpl-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.tpl-body small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.tpl-card .chip { cursor: default; padding: 3px 10px; font-size: 12px; }
.tpl-heads { margin-bottom: 8px; }
/* manage my appointment (public) */
.manage-sum { background: var(--bg); border-radius: 14px; padding: 16px 18px; margin: 10px 0 16px; display: grid; gap: 4px; }
.manage-when { font-size: 20px; font-weight: 700; color: #075e70; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.manage-day h3 { font-size: 14px; margin: 14px 0 6px; text-transform: none; }
.manage-slots { max-height: 60vh; overflow: auto; margin-bottom: 12px; }
.manage .bk-times { display: flex; flex-wrap: wrap; gap: 8px; }
.manage .bk-time { border: 1px solid #b9e3ec; background: #fff; border-radius: 10px; padding: 8px 14px; font: inherit; cursor: pointer; }
.manage .bk-time:hover { background: #e6f6fa; }

/* ---------- help assistant ---------- */
.help-fab { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 16px 10px 10px; background: #1f2a3a; color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(16, 30, 50, .25); }
.help-fab span { width: 26px; height: 26px; border-radius: 50%; background: #38b6ff; display: grid; place-items: center; font-weight: 800; }
.help-panel { position: fixed; right: 20px; bottom: 76px; z-index: 901; width: min(400px, calc(100vw - 24px)); height: min(560px, calc(100vh - 110px)); display: flex; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: 0 18px 48px rgba(16, 30, 50, .28); overflow: hidden; }
.help-panel[hidden] { display: none; }
.help-panel header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #1f2a3a; color: #fff; }
.help-panel header small { display: block; color: #9fb3c8; font-size: 12px; }
.help-hub { color: #8fd3ff; font-size: 13px; }
.help-x { background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.help-log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f7f9fb; }
.help-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.help-msg p { margin: 0 0 6px; } .help-msg p:last-child { margin: 0; }
.help-msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.help-msg.me { background: #0097b2; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.help-msg.err { color: var(--danger); }
.help-note { align-self: flex-end; font-size: 11px; color: var(--ink-3); }
.help-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.help-suggest button { border: 1px solid #b9e3ec; background: #fff; color: #075e70; border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.help-panel footer { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); }
.help-panel footer textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; font: inherit; }
.typing { display: flex; gap: 4px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: #9fb3c8; animation: hdot 1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes hdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 640px) { .help-fab b { display: none; } .help-fab { padding: 10px; } .help-panel { right: 12px; bottom: 70px; } .run-stats { grid-template-columns: 1fr; } }
@media print { .help-fab, .help-panel { display: none !important; } }
[hidden] { display: none !important; }
.set-group + .set-group { margin-top: 26px; }

/* ---------- pipeline board ---------- */
.pl-stats, .cmp-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.cmp-hero { grid-template-columns: repeat(6, 1fr); }
.pl-stats > div, .cmp-hero > div { background: #1f2a3a; color: #fff; border-radius: 14px; padding: 14px 16px; }
.pl-stats b, .cmp-hero b { display: block; font-size: 22px; letter-spacing: -.01em; }
.pl-stats small, .cmp-hero small { color: #9fb3c8; font-size: 12px; }
.pl-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.pl-col { background: #eef2f1; border-radius: 14px; padding: 10px; min-height: 260px; scroll-snap-align: start; border-top: 3px solid var(--sc); transition: background .15s; }
.pl-col.over { background: #e1f3f8; }
.pl-col.won, .pl-col.lost { background: #f3f5f4; }
.pl-col header { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; font-size: 14px; }
.pl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.pl-count { margin-left: auto; background: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; color: var(--ink-2); }
.pl-sum { font-size: 12px; color: var(--ink-3); padding: 0 4px 8px; }
.pl-cards { display: grid; gap: 8px; }
.pl-card { background: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(16, 40, 36, .08); cursor: grab; display: grid; gap: 4px; }
.pl-card:hover { box-shadow: 0 4px 12px rgba(16, 40, 36, .12); }
.pl-card.drag { opacity: .5; }
.pl-name { font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.pl-lead { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; background: #fff4e0; color: var(--warn); border-radius: 4px; padding: 1px 5px; }
.pl-meta { font-size: 12px; color: var(--ink-3); }
.pl-foot { display: flex; justify-content: space-between; font-size: 12px; }
.pl-age { color: var(--ink-3); } .pl-age.old { color: var(--warn); font-weight: 600; }
.pl-move small { display: block; color: var(--ink-3); margin: 10px 0 6px; }
.seg.wrap { flex-wrap: wrap; }
/* ---------- campaigns ---------- */
.cmp-list { display: grid; gap: 10px; }
.cmp-card { display: grid; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; color: inherit; text-decoration: none; }
.cmp-card:hover { box-shadow: 0 6px 18px rgba(16, 40, 36, .08); }
.cmp-card.ended { opacity: .65; }
.cmp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cmp-top small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.cmp-card .chip { cursor: default; padding: 3px 10px; font-size: 12px; text-transform: capitalize; }
.chip.live { border-color: #b9e3c6; background: var(--ok-soft); color: var(--ok); }
.cmp-nums { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cmp-nums small { display: block; color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.cmp-nums b { font-size: 15px; } .cmp-nums b.good { color: var(--ok); } .cmp-nums b.bad { color: var(--danger); }
.cmp-funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.cmp-funnel > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; position: relative; }
.cmp-funnel small { color: var(--ink-3); font-size: 12px; display: block; }
.cmp-funnel b { font-size: 22px; display: block; }
.cmp-funnel em { font-style: normal; font-size: 12px; color: #075e70; }
/* ---------- calls ---------- */
.call-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.call-row.fu { border-left: 3px solid var(--warn); }
.call-row .chip { cursor: default; padding: 3px 10px; font-size: 12px; }
.call-ic { width: 40px; height: 40px; border-radius: 10px; background: #e6f8fb; color: #0097b2; display: grid; place-items: center; }
.call-ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.call-sum { font-size: 14px; color: var(--ink-2); white-space: pre-line; margin-top: 2px; }
.call-tx { white-space: pre-wrap; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); border-radius: 10px; padding: 12px; max-height: 50vh; overflow: auto; }
/* ---------- AI scribe ---------- */
.scribe { display: grid; gap: 12px; }
.sc-consent { background: #eef9fc; border-radius: 12px; padding: 10px 12px; }
.sc-capture { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.sc-recbox { display: grid; justify-items: center; gap: 8px; text-align: center; background: #1f2a3a; color: #fff; border-radius: 16px; padding: 22px 14px; }
.sc-recbox .muted { color: #9fb3c8 !important; }
.sc-rec { width: 84px; height: 84px; border-radius: 50%; border: 0; background: #e61f93; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 6px rgba(230, 31, 147, .18); transition: transform .15s; }
.sc-rec svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.sc-rec.on { animation: scpulse 1.4s infinite; background: #c4127a; }
@keyframes scpulse { 0% { box-shadow: 0 0 0 0 rgba(230, 31, 147, .45); } 100% { box-shadow: 0 0 0 18px rgba(230, 31, 147, 0); } }
.sc-clock { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-or { display: grid; gap: 8px; }
.sc-wait { display: grid; justify-items: center; gap: 10px; padding: 40px 0; color: var(--ink-2); }
.sc-draft { display: grid; gap: 4px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.sc-ask { display: flex; gap: 8px; align-items: center; background: #f4f0fa; border-radius: 12px; padding: 8px 10px; }
.sc-ask svg { width: 18px; height: 18px; stroke: #7b74b0; fill: none; stroke-width: 1.6; flex: none; }
.sc-ask input { flex: 1; }
.btn .row { gap: 6px; } .btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* =====================================================================
   Responsive: phones (≤640), tablets (≤1024). Desktop is unchanged.
   ===================================================================== */
.mbar, .scrim { display: none; }
img, svg, video { max-width: 100%; }
.card, .main { min-width: 0; }
@media (max-width: 1024px) {
  .main { padding: 18px 16px 90px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmp-hero { grid-template-columns: repeat(3, 1fr); }
  .cmp-nums { grid-template-columns: repeat(4, 1fr); }
  .ins-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .cal-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 22px; }
  .g2, .g3, .g4, .grid.g2, .grid.g3 { grid-template-columns: 1fr !important; }
  .row.between { flex-wrap: wrap; gap: 8px; }
  /* tables scroll sideways instead of squashing */
  .card > table, .card table, .stack > table, .fold-body > table, .main table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .inv table, .inv-items { white-space: normal; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .seg { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .seg a { white-space: nowrap; }
  /* modals become full-height sheets */
  .backdrop { padding: 0; align-items: end; }
  .modal, .modal.wide { max-width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .modal .foot { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); background: #fff; padding: 10px 0 4px; margin-bottom: -4px; }
  /* touch targets */
  input, select, textarea { font-size: 16px !important; }   /* stops iOS zooming into fields */
  /* dashboards & cards */
  .pl-stats, .run-stats { grid-template-columns: repeat(2, 1fr); }
  .cmp-hero { grid-template-columns: repeat(2, 1fr); }
  .cmp-nums { grid-template-columns: repeat(3, 1fr); }
  .cmp-funnel { grid-template-columns: repeat(2, 1fr); }
  .pl-board { grid-auto-columns: 82vw; }
  .acct-hero { padding: 16px; } .acct-num { font-size: 26px; }
  .case-facts { gap: 8px 18px; }
  .sc-capture { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: 1fr !important; }
  .ins-card { grid-template-columns: 40px 1fr auto; }
  .tpl-card { grid-template-columns: 36px 1fr; } .tpl-card > :last-child { grid-column: 1 / -1; justify-self: end; }
  .call-row { grid-template-columns: 36px 1fr; } .call-row .chip { grid-column: 2; justify-self: start; }
  .help-fab { bottom: calc(14px + env(safe-area-inset-bottom)); right: 14px; }
  .inv { padding: 18px !important; }
  .inv-head, .inv-parties, .inv-appt { grid-template-columns: 1fr !important; display: grid; gap: 14px; }
}
@media (max-width: 380px) { .pl-stats, .run-stats, .cmp-hero, .cmp-funnel { grid-template-columns: 1fr; } }
@media (max-width: 1024px) {
  .cal-side { order: 2; position: static !important; max-height: none !important; }
  .ptile-art { height: 72px; }
}
@media (max-width: 640px) {
  .tile-grid .ptile { flex-direction: row; align-items: stretch; }
  .tile-grid .ptile-art { width: 76px; height: auto; flex: none; }
  .tile-grid .ptile-art svg { width: 30px; height: 30px; }
  .tile-grid .ptile-body { padding: 12px 14px; }
}

/* ---------- grouped appointment-type picker (profile) & hours summary ---------- */
.tp { display: grid; gap: 8px; }
.tp-group { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tp-group > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; font-weight: 600; }
.tp-group > summary::-webkit-details-marker { display: none; }
.tp-group .chev { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #9aa5a3; border-bottom: 2px solid #9aa5a3; transform: rotate(-45deg); transition: transform .15s; }
.tp-group[open] .chev { transform: rotate(45deg); }
.tp-count { font-size: 12px; font-weight: 600; background: var(--bg); color: var(--ink-3); border-radius: 999px; padding: 2px 9px; }
.tp-count.on { background: #e6f6fa; color: #075e70; }
.tp-group[open] { padding-bottom: 8px; }
.tp-all { padding: 0 14px 6px; color: var(--ink-3); font-size: 13px; }
.tp-fam { padding: 8px 14px; border-top: 1px solid #f0f3f2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.tp-famhead { min-width: 200px; margin: 0; }
.tp-durs { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-dur { position: relative; }
.tp-dur input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tp-dur span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; background: #fff; }
.tp-dur input:checked + span { border-color: #0097b2; background: #e6f6fa; color: #075e70; font-weight: 600; }
.tp-dur input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.hrs-sum { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.hrs-sum > div { background: #eef9fc; border-radius: 10px; padding: 8px; font-size: 12px; display: grid; gap: 2px; }
.hrs-sum > div.off { background: var(--bg); color: var(--ink-3); }
.hrs-sum b { font-size: 12px; }
.section-title { margin: 26px 0 10px; }
.profile-hours .av { grid-template-columns: 1fr !important; }
@media (max-width: 640px) { .hrs-sum { grid-template-columns: repeat(4, 1fr); } .tp-famhead { min-width: 0; width: 100%; } }

/* ---------- slim traffic light (planner status) ---------- */
.rag { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 999px; background: #f1f4f3; border: 1px solid #e3e8e6; cursor: pointer; flex: none; transition: border-color .15s, background .15s; }
.rag:hover:not(:disabled) { border-color: #c9d3d0; background: #fff; }
.rag:focus-visible { outline: 2px solid #38b6ff; outline-offset: 2px; }
.rag:disabled { cursor: default; opacity: .75; }
.rag i { width: 8px; height: 8px; border-radius: 50%; background: #d5dcda; transition: background .2s, box-shadow .2s; }
.rag.red i.r { background: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, .16); }
.rag.amber i.a { background: #f5a524; box-shadow: 0 0 0 3px rgba(245, 165, 36, .18); }
.rag.green i.g { background: #30a46c; box-shadow: 0 0 0 3px rgba(48, 164, 108, .16); }
.stat-dot.mini, .sum-chip .stat-dot.mini { width: 8px !important; height: 8px !important; border: 0 !important; display: inline-block; }
.stat-dot.mini.red { background: #e5484d !important; } .stat-dot.mini.amber { background: #f5a524 !important; } .stat-dot.mini.green { background: #30a46c !important; }
.stat-dot.mini::after { display: none !important; }

/* ---------- side menu: always visible, collapsible to icons ---------- */
.shell { grid-template-columns: 220px 1fr; transition: grid-template-columns .2s ease; }
.shell.collapsed { grid-template-columns: 64px 1fr !important; }
.side { position: sticky !important; top: 0; height: 100vh !important; overflow-x: hidden; }
.side .logo { display: flex; align-items: flex-start; justify-content: space-between; }
.side .logo-mark { display: none; font-weight: 800; font-size: 18px; }
.side .logo-mark b { color: var(--accent); }
.nav-collapse { all: unset; position: absolute; top: 22px; right: 10px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: #9fb3c8; }
.nav-collapse:hover { background: rgba(255,255,255,.08); }
.nav-collapse:focus-visible { outline: 2px solid var(--accent); }
.nav-collapse i { width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateX(2px) rotate(45deg); }
.side { padding-top: 18px; }
.nav-sub-title { display: none; }
/* collapsed: icons only, names as tooltips, groups open as a flyout */
.collapsed .side { padding: 14px 8px; overflow: visible; }
.collapsed .side .t, .collapsed .side .chev, .collapsed .side .logo-full, .collapsed .side .nav-divider { display: none !important; }
.collapsed .side .logo { justify-content: center; padding: 2px 0 34px; }
.collapsed .side .logo-mark { display: block; }
.collapsed .nav-collapse { top: 48px; right: 50%; transform: translateX(50%); }
.collapsed .nav-collapse i { transform: translateX(-2px) rotate(-135deg); }
.collapsed .side > a, .collapsed .side .nav-group { justify-content: center; padding: 10px 0; gap: 0; border-left-width: 0; }
.collapsed .side > a.on, .collapsed .side .nav-group.active { background: var(--charcoal-2); }
.collapsed .side .nav-sec { position: relative; }
.collapsed .side .nav-sub { position: absolute; left: calc(100% + 10px); top: -4px; min-width: 210px; background: #232625; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 6px; z-index: 80; box-shadow: 8px 8px 28px rgba(0,0,0,.35); margin: 0 !important; }
.collapsed .side .nav-sub a { padding: 8px 10px; border-left: 0; }
.collapsed .side .nav-sub-title { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7f8b8a; padding: 6px 10px 4px; }
.collapsed .side .me { justify-content: center; padding: 8px 0; }
.collapsed .side .me-menu { left: 0; right: auto; min-width: 200px; }
.collapsed .side .nav-sec + .nav-sec { margin-top: 2px; }
/* small screens: the icon rail stays; expanding it overlays the page */
@media (max-width: 640px) {
  .shell, .shell.collapsed { grid-template-columns: 56px 1fr !important; }
  .shell:not(.collapsed) .side { position: fixed !important; left: 0; top: 0; bottom: 0; width: 250px; z-index: 70; box-shadow: 8px 0 30px rgba(0,0,0,.3); }
  .shell:not(.collapsed) .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(10, 20, 30, .4); }
  .collapsed .side { padding: 12px 6px; }
  .main { padding: 16px 12px 90px !important; }
}
.side .logo { padding-right: 34px; } .collapsed .side .logo { padding-right: 0; }
.side { z-index: 50; }
.side .logo .logo-full { display: block; font-weight: 800; font-size: 19px; color: #fff; margin: 0; letter-spacing: .01em; }
.side .logo .logo-full b { color: var(--accent); }
.side .logo .logo-mark { display: none; margin: 0; }
.collapsed .side .logo .logo-mark { display: block; font-size: 18px; font-weight: 800; color: #fff; }
.cmp-card:hover, .cmp-card:hover * { text-decoration: none; }

/* ---------- side bar: find + new ---------- */
.side-tools { display: flex; gap: 6px; padding: 0 2px 12px; }
.side-find, .side-new { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; height: 36px; border-radius: 9px; cursor: pointer; font-size: 14px; color: #c9d4d6; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.side-find { flex: 1; padding: 0 10px; min-width: 0; }
.side-find svg { width: 16px; height: 16px; stroke: #9fc9d8; fill: none; stroke-width: 2; flex: none; }
.side-find kbd { margin-left: auto; font: 600 10px/1 system-ui, sans-serif; color: #7f8b8a; border: 1px solid rgba(255,255,255,.14); border-radius: 5px; padding: 3px 5px; }
.side-new { padding: 0 12px; background: var(--accent); color: #0f1a1c; font-weight: 700; border-color: transparent; }
.side-new b { font-size: 18px; line-height: 1; }
.side-find:hover { background: rgba(255,255,255,.1); } .side-new:hover { filter: brightness(1.08); }
.side-find:focus-visible, .side-new:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.collapsed .side-tools { flex-direction: column; align-items: center; padding: 0 0 10px; }
.collapsed .side-find, .collapsed .side-new { width: 40px; flex: none; justify-content: center; padding: 0; }
.new-menu { position: fixed; z-index: 120; min-width: 220px; background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(16, 30, 50, .22); border: 1px solid var(--line); display: grid; }
.new-menu button { all: unset; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.new-menu button:hover, .new-menu button:focus-visible { background: #eef9fc; }
.new-menu svg { width: 18px; height: 18px; stroke: #0097b2; fill: none; stroke-width: 1.8; }
/* finder */
.cmd-bd { position: fixed; inset: 0; z-index: 200; background: rgba(15, 25, 35, .42); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.cmd { width: min(620px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 24px 70px rgba(10, 20, 40, .35); overflow: hidden; display: flex; flex-direction: column; max-height: 72vh; }
.cmd-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cmd-top svg { width: 20px; height: 20px; stroke: var(--ink-3); fill: none; stroke-width: 2; flex: none; }
.cmd-top input { all: unset; flex: 1; font-size: 17px; }
.cmd kbd { font: 600 11px/1 system-ui, sans-serif; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; background: #f7f9f8; }
.cmd-list { overflow: auto; padding: 6px; }
.cmd-gt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 10px 10px 4px; }
.cmd-group:empty { display: none; }
.cmd-item { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.cmd-item.on { background: #eef9fc; }
.cmd-ic { width: 32px; height: 32px; border-radius: 8px; background: #f1f4f3; display: grid; place-items: center; flex: none; }
.cmd-item.on .cmd-ic { background: #fff; }
.cmd-ic svg { width: 17px; height: 17px; stroke: #0097b2; fill: none; stroke-width: 1.8; }
.cmd-t { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.cmd-t small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
.cmd-k { font-size: 11px; color: var(--ink-3); }
.cmd-empty { padding: 22px; text-align: center; color: var(--ink-3); font-size: 14px; }
.cmd-foot { display: flex; gap: 16px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); background: #fafbfb; }
.cmd-foot kbd { margin-right: 2px; }
@media (max-width: 640px) { .cmd-bd { padding-top: 12px; } .cmd-foot { display: none; } }
.side-find kbd, .cmd kbd { white-space: nowrap; } .side-find .t:not(kbd) { white-space: nowrap; overflow: hidden; }
.fold summary .fold-act { margin-left: auto; margin-right: 10px; min-height: 0; padding: 5px 12px; font-size: 13px; }
.fold summary .fold-act + * { margin-left: 0; }
details.fold > summary:has(.fold-act)::after { margin-left: 0; }

/* ---------- availability email v2 ---------- */
.ae-main { display: grid; gap: 14px; min-width: 0; }
.ae-whens { display: grid; gap: 8px; margin-top: 4px; }
.ae-when { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; }
.ae-when.on { border-color: #0097b2; background: #f0fafc; }
.ae-when > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; }
.ae-at { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; }
.ae-at input, .ae-at select { width: auto; padding: 5px 8px; min-height: 0; }
.ae-sched { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; background: #f0fafc; border-radius: 10px; padding: 8px 10px; }
.ae-sched .chip, .ae-line .chip { cursor: default; padding: 3px 10px; font-size: 12px; }
.ae-sched .btn { margin-left: auto; }
.ae-saved h2 { font-size: 16px; }
.ae-line { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.ae-line .line-main { display: grid; gap: 2px; }
.ae-line > .row { grid-column: 1 / -1; flex-wrap: wrap; gap: 6px; }
@media (max-width: 1100px) { .ae { grid-template-columns: 1fr; } }
.ae-when > input[type=radio] { width: 18px !important; height: 18px; flex: none; margin: 0; accent-color: #0097b2; }
.ae-when > span { justify-content: flex-start; text-align: left; }
.ae-at input[type=date], .ae-at input[type=time], .ae-at select { width: auto !important; flex: none; }

/* =====================================================================
   Neat & compact: smaller buttons, tidy diary toolbar, diary that behaves at any width
   ===================================================================== */
.btn { padding: 6px 12px; font-size: 14px; line-height: 20px; border-radius: 8px; }
.btn.sm { padding: 4px 10px; font-size: 13px; line-height: 18px; }
.btn svg { width: 16px; height: 16px; vertical-align: -3px; }
.head { align-items: center; margin-bottom: 14px; }
.head h1 { margin: 0; }
.head .row { gap: 8px; }
input, select, textarea { padding: 7px 10px; }
.seg a { padding: 5px 11px; font-size: 13px; }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.cal-nav, .cal-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-title { font-size: 15px; margin-left: 4px; white-space: nowrap; }
.icon-btn.on { background: #eef9fc; border-color: #b9e3ec; color: #075e70; }
.cal-filters { display: none; }
.cal-filters svg { margin-right: 4px; }
.muted-btn { color: var(--ink-3); }
.cal-side select { width: 100%; }
.cal-side optgroup { font-style: normal; color: var(--ink-3); }
.waitbtn { width: 100%; justify-content: center; }
@media (max-width: 1100px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-side { display: none; order: 0; }
  .cal-layout.show-side .cal-side { display: block; }
  .cal-filters { display: inline-flex; align-items: center; }
}
@media (max-width: 640px) {
  .cal-toolbar { gap: 8px; }
  .cal-title { font-size: 14px; }
  .head h1 { font-size: 20px; }
  .modal .foot { justify-content: flex-end; }
}
@media (max-width: 1100px) {
  .cal-layout { position: relative; }
  .cal-layout.show-side .cal-side { position: absolute !important; top: 0; left: 0; width: 290px; max-height: 80vh !important; overflow: auto; z-index: 20; box-shadow: 0 16px 40px rgba(16, 30, 50, .2); }
}
.chip { padding: 4px 11px; font-size: 13px; gap: 6px; }

/* ---------- birthday call list ---------- */
.bc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.bc-progress { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.bc-progress i { width: 140px; height: 6px; background: #e8eeec; border-radius: 4px; overflow: hidden; display: block; }
.bc-progress b { display: block; height: 100%; background: #30a46c; }
.bc-list { padding: 0; overflow: hidden; }
.bc-row { display: grid; grid-template-columns: 54px minmax(180px, 1.4fr) minmax(190px, 1fr) 100px 110px minmax(240px, 1.6fr); gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid #f0f3f2; }
.bc-row.bc-head { border-top: 0; background: #fafbfb; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 8px 16px; }
.bc-row.done { background: #f6fbf8; }
.bc-row.done .bc-who a { color: var(--ink-2); }
.bc-day { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: #f4f6f5; font-weight: 700; font-size: 13px; border-top: 1px solid #e8eeec; }
.bc-day span { font-weight: 600; font-size: 12px; background: #fff; border-radius: 999px; padding: 0 8px; color: var(--ink-3); }
.bc-date { text-align: center; line-height: 1.1; }
.bc-date strong { display: block; font-size: 18px; }
.bc-date span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; }
.bc-row.today .bc-date strong { color: #e61f93; }
.bc-who a { font-weight: 600; color: var(--ink); }
.bc-who small { display: block; color: var(--ink-3); font-size: 12px; }
.bc-phone { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.bc-call { display: inline-flex; align-items: center; gap: 4px; background: #e9f7ef; border-color: #bfe6cf; color: #1e7b3a; text-decoration: none; }
.bc-call:hover { background: #d8f0e2; text-decoration: none; }
.bc-pc { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .02em; }
.bc-ok { display: flex; gap: 4px; }
.bc-ok span { font-size: 11px; border-radius: 6px; padding: 2px 6px; }
.bc-ok .yes { background: #e6f6fa; color: #075e70; } .bc-ok .no { background: #f2f4f3; color: #a3adab; text-decoration: line-through; }
.bc-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bc-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; border-radius: 999px; padding: 3px 4px 3px 10px; background: #e9f7ef; color: #1e7b3a; font-weight: 600; }
.bc-chip.sms, .bc-chip.email { background: #eef3fb; color: #3557a0; }
.bc-chip.miss { background: #fff4e0; color: var(--warn); }
.bc-chip b { background: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; }
.bc-chip span { font-weight: 400; } .bc-chip em { font-style: normal; font-weight: 400; }
.bc-chip:not(:has(.bc-undo)) { padding-right: 10px; }
.bc-undo { all: unset; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: inherit; opacity: .6; }
.bc-undo:hover { opacity: 1; background: rgba(0,0,0,.06); }
.bc-cb { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; border: 1px dashed #c9d3d0; border-radius: 999px; padding: 3px 10px; }
.bc-cb input { width: 16px !important; height: 16px; margin: 0; accent-color: #30a46c; }
.bc-out { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
@media (max-width: 1100px) {
  .bc-row { grid-template-columns: 48px 1fr auto; grid-template-areas: "d who phone" "d pc ok" "d st st"; gap: 6px 12px; }
  .bc-row.bc-head { display: none; }
  .bc-date { grid-area: d; } .bc-who { grid-area: who; } .bc-phone { grid-area: phone; justify-content: flex-end; } .bc-pc { grid-area: pc; } .bc-ok { grid-area: ok; justify-content: flex-end; } .bc-status { grid-area: st; }
  .bc-progress { margin-left: 0; }
}
.bc-phone span, .bc-pc, .bc-chip span { white-space: nowrap; }
.bc-call svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
@media (max-width: 640px) {
  .bc-row { grid-template-columns: 38px 1fr auto; grid-template-areas: "d who who" "d phone phone" "d pc ok" "d st st"; padding: 10px 12px; }
  .bc-phone { justify-content: space-between; }
  .bc-who a { font-size: 15px; }
  .bc-date strong { font-size: 16px; }
  .bc-progress i { width: 90px; }
}
.bc-chip { white-space: nowrap; }

/* ---------- diary status marks ---------- */
.appt .ai { float: right; display: inline-flex; gap: 2px; margin: 0 0 2px 4px; }
.appt .ai i { font-style: normal; font-size: 10px; font-weight: 800; line-height: 1; min-width: 14px; height: 14px; padding: 0 2px; border-radius: 4px; display: inline-grid; place-items: center; background: #fff; }
.appt .ai i.ok { color: #1e7b3a; }
.appt .ai i.bad { background: #e5484d; color: #fff; }
.appt .ai i.bad.hollow { background: #fff; color: #d0242a; box-shadow: inset 0 0 0 1.5px #e5484d; }
.appt .ai i.warn { background: #f5a524; color: #fff; }
.appt.dna { opacity: .7; }
.cal-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.cal-key span { display: inline-flex; align-items: center; gap: 5px; }
.cal-key .ai i { position: static; }
/* appointment window */
.ap-status { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 8px; }
.ap-big { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 700; }
.ap-big span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.ap-big.ok span { background: #e9f7ef; color: #1e7b3a; } .ap-big.bad span { background: #fdecec; color: #d0242a; }
.ap-big.ok:hover, .ap-big.ok.on { border-color: #30a46c; background: #f2fbf6; } .ap-big.bad:hover, .ap-big.bad.on { border-color: #e5484d; background: #fff6f6; }
.ap-big.on span { color: #fff; } .ap-big.ok.on span { background: #30a46c; } .ap-big.bad.on span { background: #e5484d; }
.ap-big:focus-visible { outline: 2px solid var(--brand-2); }
.ap-more { gap: 6px; }
.ap-checks { display: grid; gap: 6px; margin-top: 12px; }
.ap-check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.ap-check b { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; background: #fff; }
.ap-check.ok b { color: #1e7b3a; } .ap-check.bad b { background: #e5484d; color: #fff; } .ap-check.warn b { background: #f5a524; color: #fff; }
.ap-check > span { flex: 1; } .ap-check.bad { background: #fff6f6; }
/* follow-up list */
.fu-list { display: grid; }
.fu-row { display: grid; grid-template-columns: minmax(160px, 1fr) 90px 130px auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #f0f3f2; }
.fu-name { color: var(--ink); } .fu-name small { display: block; color: var(--ink-3); }
.fu-pc { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; } .fu-ph { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) { .fu-row { grid-template-columns: 1fr auto; } .fu-pc { grid-column: 1; } .fu-ph { display: none; } }
.appt-key.ai { display: inline-flex; }
.appt-key.ai i { font-style: normal; font-size: 10px; font-weight: 800; min-width: 14px; height: 14px; padding: 0 2px; border-radius: 4px; display: inline-grid; place-items: center; background: #fff; border: 1px solid var(--line); }
.appt-key.ai i.ok { color: #1e7b3a; } .appt-key.ai i.bad { background: #e5484d; color: #fff; border-color: #e5484d; } .appt-key.ai i.bad.hollow { background: #fff; color: #d0242a; border-color: #e5484d; } .appt-key.ai i.warn { background: #f5a524; color: #fff; border-color: #f5a524; }
.os-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.os-box { display: grid; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: inherit; text-decoration: none; }
a.os-box:hover { border-color: #b9e3ec; text-decoration: none; }
.os-box small { color: var(--ink-3); font-size: 12px; } .os-box b { font-size: 22px; } .os-box span { font-size: 12px; color: var(--ink-3); }
.os-box.bad b { color: var(--danger); }
@media (max-width: 800px) { .os-strip { grid-template-columns: repeat(2, 1fr); } }

/* ---------- patient portal ---------- */
.portal { min-height: 100vh; background: #f4f7f8; }
.pt-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.pt-top img { max-height: 40px; }
.portal main { max-width: 760px; margin: 0 auto; padding: 22px 16px 60px; display: grid; gap: 14px; }
.pt-card { max-width: 460px; margin: 30px auto; width: 100%; }
.pt-hi { margin: 0; }
.pt-list { display: grid; gap: 8px; }
.pt-appt { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.pt-when { background: #e6f6fa; color: #075e70; border-radius: 10px; text-align: center; padding: 6px 0; line-height: 1.1; }
.pt-when b { display: block; font-size: 20px; } .pt-when span { font-size: 12px; text-transform: uppercase; }
.pt-what { display: grid; gap: 2px; } .pt-what span { font-size: 14px; } .pt-what small { color: var(--ink-3); }
.pt-inv td, .pt-inv th { padding: 8px 6px; }
.pt-inv .chip { cursor: default; padding: 3px 10px; font-size: 12px; }
.pt-act { display: flex; gap: 6px; justify-content: flex-end; }
.pt-foot { text-align: center; }
@media (max-width: 640px) { .pt-appt { grid-template-columns: 46px 1fr; } .pt-appt .btn { grid-column: 2; justify-self: start; } .pt-inv { display: block; overflow-x: auto; white-space: nowrap; } }
@media print { body.printing-receipt #app { display: none; } body.printing-receipt .backdrop { position: static; background: none; padding: 0; } body.printing-receipt .modal { box-shadow: none; max-height: none; } body.printing-receipt .modal .foot, body.printing-receipt .modal > h2 { display: none; } }
/* text message inbox */
.sms-list { display: grid; gap: 8px; }
.sms-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; display: grid; gap: 6px; }
.sms-item.unread { border-left: 3px solid #0097b2; background: #f6fcfd; }
.sms-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sms-head .chip { cursor: default; padding: 2px 8px; font-size: 11px; }
.sms-at { margin-left: auto; }
.sms-text { white-space: pre-wrap; font-size: 14px; background: #eef3f6; border-radius: 12px 12px 12px 4px; padding: 8px 12px; justify-self: start; max-width: 90%; }
.sms-acts { gap: 6px; } .sms-reply { display: grid; gap: 6px; }

/* ---------- task board (planner) ---------- */
.tb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.tb-bar select { width: auto; }
.tb-score { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.tb-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tb-chip { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.tb-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--cc, #9aa5a3); }
.tb-chip small { background: #f1f4f3; border-radius: 999px; padding: 0 6px; font-size: 11px; color: var(--ink-3); }
.tb-chip.on { border-color: var(--cc, #0097b2); background: color-mix(in srgb, var(--cc, #0097b2) 10%, white); font-weight: 600; }
.tb-chip.ghost { border-style: dashed; color: var(--ink-3); }
.tb-chip:focus-visible { outline: 2px solid var(--brand-2); }
.tb-board { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.tb-col { background: #eef2f1; border-radius: 14px; padding: 10px; min-height: 300px; border-top: 3px solid var(--sc); }
.tb-col.red { --sc: #e5484d; } .tb-col.amber { --sc: #f5a524; } .tb-col.green { --sc: #30a46c; }
.tb-col.over { background: #e1f3f8; }
.tb-col header { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-size: 14px; }
.tb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sc); }
.tb-add { all: unset; cursor: pointer; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-weight: 700; background: #fff; color: var(--ink-2); }
.tb-add:hover { background: #e6f6fa; }
.tb-cards { display: grid; gap: 8px; }
.tb-empty { font-size: 13px; color: var(--ink-3); text-align: center; padding: 18px 6px; border: 1px dashed #d5dcda; border-radius: 10px; }
.tb-card { background: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(16, 40, 36, .08); display: grid; gap: 6px; cursor: pointer; border-left: 3px solid var(--cc, transparent); }
.tb-card:hover { box-shadow: 0 4px 12px rgba(16, 40, 36, .12); }
.tb-card.drag { opacity: .5; } .tb-card[draggable="true"] { cursor: grab; }
.tb-card.high { box-shadow: 0 0 0 1.5px #e5484d33, 0 1px 2px rgba(16, 40, 36, .08); }
.tb-cat { justify-self: start; font-size: 11px; font-weight: 700; color: var(--cc, var(--ink-3)); text-transform: uppercase; letter-spacing: .05em; }
.tb-title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.tb-flag { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: #e5484d; color: #fff; font-size: 11px; margin-right: 6px; vertical-align: 1px; }
.tb-list { display: grid; gap: 3px; }
.tb-item { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; cursor: pointer; }
.tb-item input { width: 14px !important; height: 14px; margin: 2px 0 0; flex: none; accent-color: #30a46c; }
.tb-item.d span { text-decoration: line-through; color: var(--ink-3); }
.tb-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.tb-due.late { color: var(--danger); font-weight: 600; }
.tb-prog { display: inline-flex; align-items: center; gap: 5px; }
.tb-prog i { width: 36px; height: 4px; background: #e8eeec; border-radius: 3px; overflow: hidden; display: block; }
.tb-prog b { display: block; height: 100%; background: #30a46c; }
.tb-av { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: #1f2a3a; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.tb-col.green .tb-card { opacity: .8; } .tb-col.green .tb-title { text-decoration: line-through; color: var(--ink-3); }
.cl-edit { display: grid; gap: 6px; margin-bottom: 6px; }
.cl-row { display: flex; align-items: center; gap: 8px; }
.cl-row input[type=checkbox] { width: 16px !important; height: 16px; flex: none; accent-color: #30a46c; }
.cl-row input[type=text] { flex: 1; }
@media (max-width: 900px) { .tb-board { grid-template-columns: repeat(3, 80vw); scroll-snap-type: x mandatory; } .tb-col { scroll-snap-align: start; } .tb-score { margin-left: 0; } }

/* ---------- AI scribe governance ---------- */
.ai-tag { margin-left: 8px; font-size: 11px; font-weight: 700; color: #6a4fb3; background: #f1edfb; border-radius: 6px; padding: 2px 7px; vertical-align: 1px; }
.sc-train ol { padding-left: 20px; display: grid; gap: 8px; }
.gv-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 14px; background: #fff4e0; border: 1px solid #f1d3a3; margin-bottom: 14px; }
.gv-hero.on { background: #e9f7ef; border-color: #bfe6cf; }
.gv-hero p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.gv-step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid #f0f3f2; }
.gv-step:first-of-type { border-top: 0; }
.gv-step p { margin: 2px 0 6px; }
.gv-tick { position: relative; width: 24px; height: 24px; margin-top: 2px; }
.gv-tick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; width: 24px !important; }
.gv-tick span { display: block; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c9d3d0; }
.gv-step.done .gv-tick span { background: #30a46c; border-color: #30a46c; }
.gv-step.done .gv-tick span::after { content: '✓'; color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; height: 100%; }
.gv-date { color: #1e7b3a; font-weight: 600; }
.gv-pre { white-space: pre-wrap; font: 13px/1.5 system-ui, sans-serif; background: var(--bg); border-radius: 10px; padding: 12px; margin: 6px 0; }
.gv-signed { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #e9f7ef; color: #1e7b3a; font-weight: 600; }
.gv-signed .btn { margin-left: auto; }
.gv-sign { margin-top: 10px; align-items: end; }
.gv-quarter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.gv-quarter > div { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.gv-quarter > div.ok { background: #e9f7ef; }
.gv-quarter b { font-size: 20px; } .gv-quarter small, .gv-quarter span { font-size: 12px; color: var(--ink-3); } .gv-quarter .bad { color: var(--danger); }
.gv-audit { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-height: 45vh; overflow: auto; }
.gv-audit dl { font-size: 13px; } .gv-audit .call-tx { max-height: 40vh; }
@media (max-width: 800px) { .gv-audit, .gv-quarter { grid-template-columns: 1fr; } }
/* memberships */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-row .stat { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat-row .stat small { color: var(--ink-3); font-size: 12px; display: block; }
.stat-row .stat b { font-size: 22px; }
.stat-row .stat.bad b { color: var(--bad, #d0453a); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.plan-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; background: var(--card, #fff); }
.plan-card.off { opacity: .55; }
.plan-name { font-weight: 600; }
.plan-price b { font-size: 24px; }
.member-card { margin-bottom: 14px; }
.member-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
