/* ==========================================================================
   d dentistry — design system v1
   Brand #5360A9 sampled from the logo mark. One accent, hairlines, air.
   Sections: tokens · reset · type · layout · components · public · auth · console
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root {
    /* brand */
    --brand: #5360A9;
    --brand-deep: #414C8C;
    --brand-soft: #EEF0F8;
    --brand-ink: #1B2145;

    /* neutrals */
    --ink: #0F172A;
    --body: #334155;
    --muted: #64748B;
    --faint: #94A3B8;
    --line: #E2E8F0;
    --line-soft: #EEF2F7;
    --surface: #FFFFFF;
    --page: #F4F7FE;
    --page-warm: #FAFBFD;

    /* semantic */
    --success: #047857; --success-soft: #ECFDF5; --success-line: #A7F3D0;
    --warning: #B45309; --warning-soft: #FFFBEB; --warning-line: #FDE68A;
    --danger: #B91C1C;  --danger-soft: #FEF2F2;  --danger-line: #FECACA;
    --accent: #6D28D9;  --accent-soft: #F5F3FF;

    /* shape */
    --r-card: 18px;
    --r-control: 12px;
    --r-small: 9px;
    --r-pill: 999px;

    /* elevation — one shadow, for floating things only */
    --shadow-float: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --shadow-modal: 0 24px 60px -20px rgba(15, 23, 42, .35);

    /* rhythm */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
    --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

    --sidebar: 256px;
    --rail: 64px;
    --header: 64px;
}

/* ------------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: Inter, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px; line-height: 1.55;
    color: var(--body);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 { margin: 0; color: var(--ink); letter-spacing: -.02em; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 var(--s-2); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* -------------------------------------------------------------- typography */
.t-display { font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -.035em; color: var(--ink); }
.t-h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.t-h2 { font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--ink); }
.t-h3 { font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--ink); }
.t-body { font-size: 14px; line-height: 1.55; color: var(--body); }
.t-small { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.t-micro {
    font-size: 10.5px; line-height: 1.3; font-weight: 700;
    letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.t-metric { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.t-mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.t-muted { color: var(--muted); }
.t-strong { font-weight: 600; color: var(--ink); }
.t-num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ layout */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; background: var(--page); }
.shell--rail { grid-template-columns: var(--rail) 1fr; }

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    padding: var(--s-4) var(--s-3);
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px var(--s-4); }
.sidebar__brand img, .sidebar__brand svg { border-radius: 11px; flex: 0 0 auto; }
.sidebar__brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.sidebar__brand-text strong { font-size: 14.5px; letter-spacing: -.02em; color: var(--ink); }
.sidebar__brand-text em { font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar__nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-bottom: var(--s-4); }
.nav-group {
    font-size: 9.5px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
    color: var(--faint); padding: var(--s-4) 10px 6px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: var(--r-small);
    color: var(--body); font-size: 13px; font-weight: 500;
    text-decoration: none; position: relative;
}
.nav-item:hover { background: var(--page-warm); color: var(--ink); text-decoration: none; }
.nav-item svg { width: 18px; height: 18px; color: var(--faint); flex: 0 0 auto; }
.nav-item.is-active { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.nav-item.is-active svg { color: var(--brand); }
.nav-item.is-active::before {
    content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav-item__count {
    margin-left: auto; font-size: 11px; font-weight: 700;
    background: var(--brand); color: #fff; border-radius: var(--r-pill);
    padding: 1px 7px; font-variant-numeric: tabular-nums;
}
.sidebar__foot { border-top: 1px solid var(--line); padding-top: var(--s-3); display: grid; gap: 6px; }

.content { padding: var(--s-6); min-width: 0; }
.content__inner { max-width: 1400px; }

/* page header */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.page-head__title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-head__actions { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.breadcrumb { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span.sep { color: var(--faint); }

/* grid helpers */
.grid { display: grid; gap: var(--s-4); }
.grid--kpi { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* -------------------------------------------------------------------- card */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: var(--s-5);
}
.card--flush { padding: 0; overflow: hidden; }
.card__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
    padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line);
}
.card__body { padding: var(--s-5); }
.card__foot { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line); background: var(--page-warm); }

/* ----------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 40px; padding: 0 16px;
    border-radius: var(--r-control); border: 1px solid transparent;
    font-size: 13px; font-weight: 600; line-height: 1;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .15s ease-out, border-color .15s ease-out, color .15s ease-out, box-shadow .15s ease-out;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--brand-deep); color: #fff; }
.btn--secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--secondary:hover:not(:disabled) { border-color: #CBD5E1; background: var(--page-warm); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--body); }
.btn--ghost:hover:not(:disabled) { background: var(--page); color: var(--ink); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover:not(:disabled) { background: #991B1B; color: #fff; }
.btn--danger-soft { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.btn--icon { width: 40px; padding: 0; }
.btn--sm { min-height: 32px; padding: 0 11px; font-size: 12px; border-radius: var(--r-small); }
.btn--lg { min-height: 46px; padding: 0 22px; font-size: 14px; }
.btn--block { width: 100%; }
.btn.is-loading { color: transparent; position: relative; }
.btn.is-loading::after {
    content: ""; position: absolute; width: 15px; height: 15px;
    border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
    border-radius: 50%; animation: spin .6s linear infinite;
}
.btn--secondary.is-loading::after { border-color: rgba(15,23,42,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ inputs */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field__label { font-size: 11.5px; font-weight: 700; color: var(--body); letter-spacing: .01em; }
.field__label .req { color: var(--danger); font-weight: 700; }
.field__help { font-size: 11.5px; color: var(--muted); }
.field__error { font-size: 11.5px; color: var(--danger); font-weight: 500; }

.input, .select, .textarea {
    width: 100%; min-height: 42px; padding: 9px 12px;
    background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r-control);
    font-size: 13.5px; color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: #CBD5E1; }
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(83, 96, 169, .14);
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center;
}
.input:disabled, .select:disabled, .textarea:disabled { background: var(--page-warm); color: var(--muted); cursor: not-allowed; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field.has-error .input:focus { box-shadow: 0 0 0 3px rgba(185, 28, 28, .12); }

.search { position: relative; }
.search .input { padding-left: 36px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }

.checkbox, .radio { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--body); cursor: pointer; }
.checkbox input, .radio input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 38px; height: 22px; border-radius: var(--r-pill); background: #CBD5E1; position: relative; transition: background .18s; flex: 0 0 auto; }
.switch__track::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
    border-radius: 50%; background: #fff; transition: transform .18s;
    box-shadow: 0 1px 2px rgba(15,23,42,.2);
}
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }

/* form layout */
/* Q25 A6 (owner 2026-12-02: "small size shall be extended in width as others … not like in small square"): forms use
   the full content width like the list pages; the 12-column grid spreads the fields. */
.form { max-width: none; }
.form__section { padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.form__section:last-of-type { border-bottom: none; }
.form__legend { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-4); }
.form__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-4); }
.form__grid > .field { grid-column: span 12; }
.form__grid > .col-3 { grid-column: span 3; }
.form__grid > .col-4 { grid-column: span 4; }
.form__grid > .col-6 { grid-column: span 6; }
.form__grid > .col-8 { grid-column: span 8; }
.form__grid > .col-9 { grid-column: span 9; }
.form__grid > .col-12 { grid-column: span 12; }
.form__actions {
    display: flex; gap: var(--s-2); align-items: center; justify-content: flex-end;
    padding: var(--s-4) var(--s-5); margin: var(--s-5) calc(var(--s-5) * -1) calc(var(--s-5) * -1);
    border-top: 1px solid var(--line); background: var(--page-warm);
    border-radius: 0 0 var(--r-card) var(--r-card);
}

/* ------------------------------------------------------------------ badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: var(--r-pill);
    font-size: 11px; font-weight: 700; letter-spacing: .01em;
    background: var(--page); color: var(--body); white-space: nowrap;
}
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger  { background: var(--danger-soft);  color: var(--danger); }
.badge--brand   { background: var(--brand-soft);   color: var(--brand-deep); }
.badge--accent  { background: var(--accent-soft);  color: var(--accent); }
.badge--outline { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: var(--r-pill);
    border: 1px solid var(--line); background: var(--surface);
    font-size: 12px; font-weight: 600; color: var(--body);
}
.chip--on { background: var(--brand-soft); border-color: #C9CFE8; color: var(--brand-deep); }

/* --------------------------------------------------------------- kpi cards */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); display: flex; flex-direction: column; gap: 6px; }
.kpi__label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.kpi__value { font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kpi__delta { font-weight: 700; }
.kpi__delta--up { color: var(--success); }
.kpi__delta--down { color: var(--danger); }
.kpi--hero { background: linear-gradient(180deg, var(--brand-soft), var(--surface) 70%); border-color: #C9CFE8; }
.kpi--hero .kpi__value { font-size: 36px; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; border-radius: var(--r-card); }
.table { width: 100%; font-size: 13px; }
.table thead th {
    position: sticky; top: 0; z-index: 1;
    background: var(--page-warm); text-align: left;
    padding: 11px var(--s-4);
    font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: var(--faint); white-space: nowrap;
    border-bottom: 1px solid var(--line);
}
.table tbody td { padding: 13px var(--s-4); border-bottom: 1px solid var(--line-soft); color: var(--body); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #FBFCFF; }
.table .cell-strong { font-weight: 600; color: var(--ink); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .right { text-align: right; }
.table td .sub { display: block; font-size: 11.5px; color: var(--muted); }
/* Always visible (audit 2026-12-01): hover-only buttons looked like a missing Actions column and are unreachable by touch. */
.table .row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pager__links { display: flex; gap: 4px; }
.pager__link { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-small); border: 1px solid var(--line); background: var(--surface); color: var(--body); font-size: 12px; font-weight: 600; }
.pager__link:hover { background: var(--page-warm); text-decoration: none; }
.pager__link.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager__link.is-disabled { opacity: .4; pointer-events: none; }

/* filter bar */
.filters { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; margin-bottom: var(--s-4); }
.filters .search { flex: 1; min-width: 200px; max-width: 340px; }
.filters__spacer { flex: 1; }

/* ------------------------------------------------------------------- tabs */
.tabs { display: flex; gap: var(--s-5); border-bottom: 1px solid var(--line); margin-bottom: var(--s-5); }
.tab { padding: 10px 0; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { color: var(--brand-deep); border-bottom-color: var(--brand); }

/* ------------------------------------------------------------------ states */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-3); padding: var(--s-8) var(--s-5); }
.empty svg { width: 48px; height: 48px; color: var(--faint); opacity: .5; }
.empty__title { font-size: 15px; font-weight: 600; color: var(--ink); }
.empty__text { font-size: 13px; color: var(--muted); max-width: 40ch; }

.skeleton { background: linear-gradient(90deg, var(--line-soft) 25%, #F6F8FC 50%, var(--line-soft) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton--line { height: 12px; }
.skeleton--row { height: 44px; border-radius: 8px; }

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-control); border: 1px solid var(--line); background: var(--page-warm); font-size: 13px; }
.alert svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.alert--success { background: var(--success-soft); border-color: var(--success-line); color: var(--success); }
.alert--warning { background: var(--warning-soft); border-color: var(--warning-line); color: var(--warning); }
.alert--danger  { background: var(--danger-soft);  border-color: var(--danger-line);  color: var(--danger); }
.alert--info    { background: var(--brand-soft);   border-color: #C9CFE8; color: var(--brand-deep); }

/* ------------------------------------------------------------------ overlay */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; padding: var(--s-5); z-index: 100; }
.modal { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-modal); width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: var(--s-5); border-bottom: 1px solid var(--line); }
.modal__body { padding: var(--s-5); overflow-y: auto; }
.modal__foot { display: flex; gap: var(--s-2); justify-content: flex-end; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); background: var(--page-warm); border-radius: 0 0 var(--r-card) var(--r-card); }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-modal); display: flex; flex-direction: column; z-index: 100; }
.drawer__head { padding: var(--s-5); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); }
.drawer__body { padding: var(--s-5); overflow-y: auto; flex: 1; }

.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-control); background: var(--ink); color: #fff; font-size: 13px; box-shadow: var(--shadow-float); max-width: 380px; }
.toast--success { background: #064E3B; }
.toast svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.feature__icon svg, .chip svg, .badge svg { width: 16px; height: 16px; }
.empty svg { width: 48px; height: 48px; }
.toast--danger { background: #7F1D1D; }

/* ---------------------------------------------------------------- progress */
.progress { height: 6px; border-radius: var(--r-pill); background: var(--line-soft); overflow: hidden; }
.progress__bar { height: 100%; background: var(--brand); border-radius: var(--r-pill); }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.avatar--sm { width: 26px; height: 26px; font-size: 10.5px; }

/* ================================================================= public */
.site-header {
    position: sticky; top: 0; z-index: 50;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-4);
    padding: 0 30px; height: var(--header);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 17px; letter-spacing: -.03em; color: var(--ink); }
.brand__text em { font-style: normal; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.site-nav { display: flex; gap: 2px; justify-self: center; }
.site-nav a { padding: 9px 13px; border-radius: var(--r-small); font-size: 13px; font-weight: 600; color: var(--body); }
.site-nav a:hover { background: var(--page); color: var(--ink); text-decoration: none; }
.site-nav a.is-active { color: var(--brand-deep); background: var(--brand-soft); }
.site-actions { display: flex; gap: var(--s-2); justify-self: end; }

.hero { max-width: 1160px; margin: 0 auto; padding: var(--s-8) var(--s-5); display: grid; grid-template-columns: 1.02fr .98fr; gap: var(--s-7); align-items: center; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin: 0 0 10px; }
.hero h1 { font-size: 42px; line-height: 1.1; letter-spacing: -.04em; margin-bottom: var(--s-4); }
.hero__lede { font-size: 16px; line-height: 1.6; color: var(--body); max-width: 52ch; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin: var(--s-5) 0 var(--s-3); }
.hero__media { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-float); background: var(--brand-soft); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }

.section { max-width: 1160px; margin: 0 auto; padding: var(--s-8) var(--s-5); }
.section--tint { background: var(--page); }
.section__head { max-width: 640px; margin-bottom: var(--s-6); }
.section__title { font-size: 28px; letter-spacing: -.03em; margin-bottom: var(--s-2); }

.feature-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-4); }
.feature { grid-column: span 2; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); }
.feature--wide { grid-column: span 3; }
.feature__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: var(--s-3); }
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--muted); margin: 0; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-4); }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.plan--featured { border-color: var(--brand); box-shadow: 0 18px 40px -30px rgba(83, 96, 169, .55); }
.plan__name { font-size: 15px; font-weight: 700; color: var(--ink); }
.plan__seats { font-size: 12.5px; color: var(--muted); }
.plan__list { list-style: none; display: grid; gap: 7px; font-size: 12.5px; color: var(--body); margin: var(--s-2) 0; }
.plan__list li { padding-left: 20px; position: relative; }
.plan__list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }

.mega-footer { background: var(--page); border-top: 1px solid var(--line); margin-top: var(--s-8); }
.mega-footer__inner { max-width: 1160px; margin: 0 auto; padding: var(--s-7) var(--s-5) 0; }
.footer-brand { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--s-7); padding-bottom: var(--s-6); }
.footer-news { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.footer-news form { display: flex; gap: var(--s-2); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); padding: var(--s-6) 0; border-top: 1px solid var(--line); }
.footer-col h4 { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: var(--s-3); }
.footer-col a { display: block; font-size: 12.5px; color: var(--body); padding: 4px 0; }
.footer-contact { display: flex; flex-wrap: wrap; gap: var(--s-4); padding: var(--s-4) 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.footer-legal { display: flex; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-4) 0 var(--s-5); border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }

/* =================================================================== auth */
.auth { display: grid; grid-template-columns: 1fr 46%; min-height: 100vh; }
.auth__form-side { display: flex; align-items: center; justify-content: center; padding: var(--s-7) var(--s-6); background: var(--surface); }
.auth__form { width: 100%; max-width: 440px; }
.auth__back { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: var(--s-6); }
.auth__panel { position: relative; background: var(--brand-ink); overflow: hidden; display: flex; align-items: flex-end; padding: var(--s-7); }
.auth__panel::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27,33,69,.35), rgba(27,33,69,.9)); }
.auth__panel-copy { position: relative; z-index: 1; color: #fff; max-width: 420px; }
.auth__panel-copy h2 { color: #fff; font-size: 24px; letter-spacing: -.03em; margin-bottom: var(--s-3); }
.auth__panel-copy p { color: #C7CEE8; font-size: 13px; }
.auth__points { list-style: none; display: grid; gap: 9px; margin-top: var(--s-5); }
.auth__points li { position: relative; padding-left: 22px; font-size: 12.5px; color: #D7DCF0; }
.auth__points li::before { content: "✓"; position: absolute; left: 0; color: #A5B0E0; font-weight: 800; }
.divider { display: flex; align-items: center; gap: 12px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); margin: var(--s-5) 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ========================================================= platform console */
.console { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; background: var(--page); }
/* Owner 2026-12-01 (final): ALL six dashboards — the five clinic dashboards and the platform console — use the
   platform's dark navy sidebar (it was the platform's alone). Only the two dashboard layouts use .shell. */
.shell .sidebar { background: var(--brand-ink); border-right-color: #2A3159; }
.shell .sidebar__brand-text strong { color: #fff; }
.shell .sidebar__brand-text em { color: #9AA3C7; }
.shell .nav-group { color: #6B74A0; }
.shell .nav-item { color: #C3C9E4; }
.shell .nav-item svg { color: #7A83AE; }
.shell .nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.shell .nav-item.is-active { background: rgba(255,255,255,.10); color: #fff; }
.shell .nav-item.is-active svg { color: #B9C1EA; }
.shell .nav-item.is-active::before { background: #8E99D6; }
.shell .nav-folder__pages { border-left-color: rgba(255, 255, 255, .12); }
.shell .nav-folder__toggle.has-current { color: #fff; }
.shell .nav-section > summary:hover { color: #C3C9E4; }
.shell .sidebar__foot { border-top-color: #2A3159; }
.shell .sidebar__foot .avatar { background: #4A5182; color: #fff; }
.shell .sidebar__foot .t-strong { color: #fff; }
.shell .sidebar__foot .t-small { color: #A9B0D0; }
.shell .sidebar__foot .btn--ghost { color: #D3D8EC; border-color: #4A5182; }
.shell .sidebar__foot .btn--ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
.console-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--brand-ink); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }

/* =============================================================== responsive */
@media (max-width: 1100px) {
    .feature-grid { grid-template-columns: repeat(4, 1fr); }
    .feature--wide { grid-column: span 4; }
}
@media (max-width: 900px) {
    .shell, .console { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .content { padding: var(--s-4); }
    .hero { grid-template-columns: 1fr; padding: var(--s-6) var(--s-4); gap: var(--s-5); }
    .hero h1 { font-size: 30px; }
    .site-header { grid-template-columns: 1fr auto; padding: 0 16px; }
    .site-nav { display: none; }
    .footer-brand { grid-template-columns: 1fr; gap: var(--s-5); }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .auth { grid-template-columns: 1fr; }
    .auth__panel { display: none; }
    .feature, .feature--wide { grid-column: span 4; }
    .form__grid > .field { grid-column: span 12 !important; }
    .page-head { flex-direction: column; align-items: stretch; }
    .table .row-actions { opacity: 1; }
}
@media (max-width: 560px) {
    .feature-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; }
    .footer-news form { flex-direction: column; }
}

/* ==================================================================== print */
@media print {
    .sidebar, .site-header, .site-nav, .no-print, .row-actions { display: none !important; }
    .shell, .console { display: block; }
    .content { padding: 0; }
    .card { border: none; padding: 0; }
    body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================================================================ public v2 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ds-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.flash-bar {
    max-width: 1160px; margin: 16px auto 0; padding: 12px 16px;
    background: var(--success-soft); border: 1px solid var(--success-line);
    color: var(--success); border-radius: var(--r-control); font-size: 13px; font-weight: 500;
}

.page-hero { max-width: 860px; margin: 0 auto; padding: var(--s-8) var(--s-5) var(--s-6); }
.page-hero h1 { font-size: 38px; line-height: 1.12; letter-spacing: -.04em; margin-bottom: var(--s-4); }
.section.narrow { max-width: 980px; }

/* hero product shot */
.hero-shot { width: 100%; height: 100%; background: #fff; display: flex; flex-direction: column; }
.hero-shot__bar { height: 26px; background: #F1F4FA; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 5px; padding: 0 10px; }
.hero-shot__bar span { width: 7px; height: 7px; border-radius: 50%; background: #D3DAEA; }
.hero-shot__body { flex: 1; display: grid; grid-template-columns: 96px 1fr; min-height: 0; }
.hero-shot__side { background: #F8FAFD; border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.hs-line { height: 7px; border-radius: 4px; background: #E4E9F2; }
.hero-shot__main { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.hs-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hs-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.hs-kpi span { height: 5px; width: 60%; border-radius: 3px; background: #E4E9F2; }
.hs-kpi strong { font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.hs-rows { display: flex; flex-direction: column; gap: 7px; }
.hs-row { display: flex; align-items: center; gap: 8px; }
.hs-row i { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); flex: 0 0 auto; }
.hs-row b { flex: 1; height: 8px; border-radius: 4px; background: #EDF1F8; }

/* proof strip */
.proof { background: var(--brand-ink); }
.proof__inner { max-width: 1160px; margin: 0 auto; padding: 30px var(--s-5); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.proof__item { display: flex; flex-direction: column; gap: 2px; color: #C7CEE8; }
.proof__item strong { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.proof__item span { font-size: 12px; }

/* role cards */
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); }
.role-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); }
.role-card h3 { font-size: 15px; margin-bottom: 6px; }
.role-card p { font-size: 13px; color: var(--muted); margin: 0; }

/* tooth chart spotlight */
.spot { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: center; }
.spot__list { list-style: none; display: grid; gap: 9px; margin-top: var(--s-4); }
.spot__list li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--body); }
.spot__list svg { width: 16px; height: 16px; color: var(--brand); flex: 0 0 auto; }
.spot__chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); }
.chart-demo__row { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; margin-bottom: 8px; }
.chart-demo__tooth {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 6px; font-size: 8.5px; font-weight: 700;
    color: var(--muted); background: #fff;
}
.chart-demo__tooth.is-caries { background: #FEF2F2; border-color: #FCA5A5; color: #B91C1C; }
.chart-demo__tooth.is-filled { background: #EFF6FF; border-color: #93C5FD; color: #1D4ED8; }
.chart-demo__tooth.is-crown  { background: #FFFBEB; border-color: #FCD34D; color: #B45309; }
.chart-demo__tooth.is-rct    { background: #F5F3FF; border-color: #C4B5FD; color: #6D28D9; }
.chart-demo__tooth.is-missing { background: #F1F5F9; color: #94A3B8; }
.chart-demo__tooth.is-implant { background: #ECFDF5; border-color: #6EE7B7; color: #047857; }
.chart-demo__legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chart-key { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); background: #fff; }
.chart-key.key-caries { background: #FEF2F2; border-color: #FCA5A5; color: #B91C1C; }
.chart-key.key-filled { background: #EFF6FF; border-color: #93C5FD; color: #1D4ED8; }
.chart-key.key-crown { background: #FFFBEB; border-color: #FCD34D; color: #B45309; }
.chart-key.key-rct { background: #F5F3FF; border-color: #C4B5FD; color: #6D28D9; }
.chart-key.key-implant { background: #ECFDF5; border-color: #6EE7B7; color: #047857; }

/* cta band */
.cta-band { background: var(--brand-ink); padding: var(--s-8) var(--s-5); }
.cta-band__inner { max-width: 720px; margin: 0 auto; text-align: center; }
.cta-band h2 { color: #fff; font-size: 30px; letter-spacing: -.035em; margin-bottom: var(--s-3); }
.cta-band p { color: #C7CEE8; font-size: 14px; margin-bottom: var(--s-5); }
.cta-band__btn { background: #fff; color: var(--brand-ink); }
.cta-band__btn:hover { background: #EEF0F8; color: var(--brand-ink); }
.cta-band__btn-ghost { border: 1px solid rgba(255,255,255,.35); color: #fff; background: transparent; }
.cta-band__btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

/* about */
.prose { max-width: 68ch; }
.prose p { font-size: 15px; line-height: 1.7; color: var(--body); margin-bottom: var(--s-4); }
.belief-grid, .team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); }
.belief { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); }
.belief h3 { font-size: 14px; margin-bottom: 6px; }
.belief p { font-size: 12.5px; color: var(--muted); margin: 0; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s-5); align-items: start; }
.contact-side { display: grid; gap: var(--s-4); }
.contact-line { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--body); padding: 7px 0; }
.contact-line svg { width: 17px; height: 17px; color: var(--brand); flex: 0 0 auto; margin-top: 2px; }
.contact-done { text-align: center; padding: var(--s-6) var(--s-4); }
.contact-done__tick {
    width: 52px; height: 52px; border-radius: 50%; background: var(--success-soft);
    color: var(--success); display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.contact-done__tick svg { width: 24px; height: 24px; }

/* booking */
.booking { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--s-5); align-items: start; }
.booking__side { display: grid; gap: var(--s-4); }
.booking__form { padding: var(--s-6); }
.step { display: block; }
.js-steps .step { display: none; }
.js-steps .step.is-visible { display: block; }
.step__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: var(--s-5); }
.step__num {
    width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep);
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 auto;
}
.step__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); }

.treatment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.treatment, .slot { position: relative; cursor: pointer; }
.treatment input, .slot input { position: absolute; opacity: 0; width: 0; height: 0; }
.treatment span, .slot span {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-control);
    font-size: 12.5px; font-weight: 600; color: var(--body); background: #fff; transition: all .15s;
}
.treatment input:checked + span, .slot input:checked + span {
    background: var(--brand-soft); border-color: var(--brand); color: var(--brand-deep);
}
.treatment input:focus-visible + span, .slot input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }

.steps-list { list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps-list li { counter-increment: s; position: relative; padding-left: 30px; font-size: 12.5px; color: var(--body); }
.steps-list li::before {
    content: counter(s); position: absolute; left: 0; top: -1px;
    width: 20px; height: 20px; border-radius: 50%; background: var(--page);
    color: var(--muted); font-size: 10.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.card--quiet { background: var(--page); border-style: dashed; }

@media (max-width: 900px) {
    .spot, .contact-grid, .booking { grid-template-columns: 1fr; gap: var(--s-5); }
    .proof__inner { grid-template-columns: 1fr 1fr; gap: var(--s-5); }
    .page-hero { padding: var(--s-6) var(--s-4); }
    .page-hero h1 { font-size: 28px; }
    .section { padding: var(--s-6) var(--s-4); }
    .cta-band h2 { font-size: 24px; }
}

/* ---------------------------------------------------------------- portal */
.portal { max-width: 720px; margin: 0 auto; padding: 0 16px 60px; }
.portal__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.portal__tabs { display: flex; gap: 4px; align-items: center; }
.portal__tabs a { font-size: 13px; font-weight: 600; color: var(--muted); padding: 7px 11px; border-radius: 9px; text-decoration: none; }
.portal__tabs a.is-on { background: var(--brand-soft); color: var(--brand-deep); }
.portal__tabs .link { background: none; border: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; padding: 7px 11px; }
.portal__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.portal__row:last-child { border-bottom: none; }
.auth-single { background: #fff; padding: 44px 20px; min-height: 100vh; display: flex; align-items: center; }
.auth-single__inner { max-width: 420px; margin: 0 auto; width: 100%; }
.auth-page { background: #fff; }

/* ---------------------------------------------------------------- about page */
.about-hero {
    max-width: 1160px; margin: 0 auto; padding: 56px 24px 40px;
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.about-hero h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.045em; margin-bottom: 16px; max-width: 20ch; }
.about-hero__media { position: relative; }
.about-hero__media img { width: 100%; height: 360px; object-fit: cover; border-radius: var(--r-card); display: block; }
.about-hero__stat {
    position: absolute; left: -18px; bottom: -18px; background: #fff; border: 1px solid var(--line);
    border-radius: 14px; padding: 12px 16px; box-shadow: 0 18px 40px -28px rgba(15,23,42,.4); max-width: 200px;
}
.about-hero__stat strong { display: block; font-size: 22px; color: var(--ink); letter-spacing: -.03em; }
.about-hero__stat span { font-size: 11px; color: var(--muted); line-height: 1.35; display: block; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split--reverse .split__media { order: -1; }
.split__media img { width: 100%; height: 320px; object-fit: cover; border-radius: var(--r-card); display: block; }
.split__copy h2 { margin-bottom: 14px; }
.split__copy p { margin-bottom: 12px; }

@media (max-width: 900px) {
    .about-hero, .split { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
    .about-hero h1 { font-size: 28px; }
    .about-hero__media img, .split__media img { height: 240px; }
    .about-hero__stat { position: static; margin-top: 12px; }
    .split--reverse .split__media { order: 0; }
}

/* booking: account choice */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice__body {
    display: block; border: 1px solid var(--line); border-radius: var(--r-control);
    padding: 12px 14px; background: #fff; transition: all .15s;
}
.choice__body strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 3px; }
.choice__body em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.choice input:checked + .choice__body { border-color: var(--brand); background: var(--brand-soft); }
.choice input:checked + .choice__body strong { color: var(--brand-deep); }
.choice input:focus-visible + .choice__body { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 640px) { .choice-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- mobile app band */
.app-band { background: var(--brand-ink); padding: 64px 24px; overflow: hidden; }
.app-band__inner {
    max-width: 1160px; margin: 0 auto; display: grid;
    grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
}
.app-band h2 { color: #fff; font-size: 30px; letter-spacing: -.035em; margin-bottom: 12px; }
.app-band p { color: #C7CEE8; font-size: 14px; max-width: 46ch; }
.app-badges { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.app-badge {
    display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px;
    border-radius: 12px; background: #fff; color: var(--brand-ink); text-decoration: none;
}
.app-badge:hover { background: #EEF0F8; text-decoration: none; }
.app-badge small { display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: .07em; opacity: .7; line-height: 1.1; }
.app-badge strong { display: block; font-size: 13px; line-height: 1.2; }

.band-phone {
    width: 208px; height: 412px; border-radius: 30px; border: 7px solid #4C5484;
    background: #F7F9FD; position: relative; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 30px 60px -30px rgba(0,0,0,.55); margin: 0 auto;
}
.band-phone__notch { height: 20px; display: flex; align-items: center; justify-content: center; }
.band-phone__notch i { width: 54px; height: 4px; border-radius: 3px; background: #D7DEEA; }
.band-phone__body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; overflow: hidden; }
.band-phone .kpi { padding: 10px 12px; }
.band-phone .kpi__value { font-size: 21px; }
.band-phone .apt-card { padding: 9px 10px; margin: 0; }
.band-phone .apt-card__name { font-size: 11.5px; }
.band-phone .apt-card__tx, .band-phone .apt-card__time { font-size: 10px; }
.band-phone__tabs { margin-top: auto; display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid var(--line); background: #fff; padding: 6px 0; }
.band-phone__tabs span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 7px; color: var(--faint); font-weight: 600; }
.band-phone__tabs svg { width: 14px; height: 14px; }
.band-phone__tabs span.on { color: var(--brand); }

@media (max-width: 900px) {
    .app-band__inner { grid-template-columns: 1fr; gap: 32px; }
}

/* booking: account mode as two buttons above the form */
.booking-mode { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.booking-mode__label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.booking-mode__options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-btn { position: relative; cursor: pointer; }
.mode-btn input { position: absolute; opacity: 0; width: 0; height: 0; }
.mode-btn > span {
    display: block; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
    background: #fff; transition: border-color .15s, background .15s; min-height: 74px;
}
.mode-btn strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 4px; }
.mode-btn em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.mode-btn input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.mode-btn input:checked + span strong { color: var(--brand-deep); }
.mode-btn input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 640px) { .booking-mode__options { grid-template-columns: 1fr; } }

/* ============================================= owner changes 2026-11-30 */
/* W4: the mobile-app banner and the closing CTA are two blocks, not one */
.app-band + .cta-band { margin-top: 56px; }

/* W13: phone menu (☰). Desktop keeps the inline menu. */
.nav-toggle { display: none; }
.site-nav__mobile { display: none; }
@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px;
        padding: 0; border: 1px solid var(--line); border-radius: var(--r-small); background: var(--surface); cursor: pointer; }
    .nav-toggle span { display: block; width: 18px; height: 2px; margin: 0 auto; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
    .site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .site-header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .site-actions { align-items: center; }
    /* justify-self: stretch — the header is a grid and .site-nav is centred on desktop; without it the dropdown shrinks to its text */
    .site-header.is-open .site-nav { display: flex; flex-direction: column; gap: 4px; position: absolute; top: 100%; left: 0; right: 0; justify-self: stretch;
        padding: 10px 16px 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 14px 28px rgba(27, 33, 69, .10); }
    .site-header.is-open .site-nav a { padding: 12px 14px; font-size: 15px; }
}
@media (max-width: 560px) {
    .site-actions .btn { display: none; }
    .site-nav__mobile { display: block; }
    .site-nav a.site-nav__cta { background: var(--brand); color: #fff; text-align: center; margin-top: 6px; }
}

/* W9: on-brand product visuals instead of one repeated photo */
.ui-mock, .ui-chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-float); min-height: 320px; }
.ui-mock { display: flex; flex-direction: column; overflow: hidden; }
.ui-mock__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--page); }
.ui-mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.ui-mock__bar b { margin-left: 8px; font-size: 12.5px; color: var(--ink); }
.ui-mock__row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ui-mock__row time { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ui-mock__row strong { display: block; font-size: 13.5px; color: var(--ink); }
.ui-mock__row small { font-size: 12px; color: var(--muted); }
.ui-mock__row em { font-style: normal; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--brand); color: #fff; }
.ui-mock__row em.is-wait { background: var(--brand-soft); color: var(--brand-deep); }
.ui-mock__row em.is-later { background: var(--page); color: var(--muted); }
.ui-mock__row.is-now { background: var(--brand-soft); }
.ui-mock__foot { margin-top: auto; display: flex; justify-content: space-between; padding: 14px 16px; font-size: 12.5px; color: var(--muted); }
.ui-mock__foot strong { font-size: 18px; color: var(--ink); }
.ui-chart { padding: 0 0 var(--s-4); overflow: hidden; }
.ui-chart .chart-demo__row, .ui-chart .chart-demo__legend { margin-left: 16px; margin-right: 16px; }
.ui-chart .ui-mock__bar { margin-bottom: 18px; }
.ui-chart__notes { margin: 18px 16px 0; border-top: 1px solid var(--line); }
.ui-chart__notes div { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--body); }
.ui-chart__notes div:last-child { border-bottom: 0; }
.ui-chart__notes b { font-size: 12px; text-align: center; padding: 3px 0; border-radius: 6px; background: var(--brand-soft); color: var(--brand-deep); }
.ui-chart__notes em { font-style: normal; font-size: 11px; color: var(--muted); }

/* Clinician "My day" quick actions (2026-11-30): there was no rule, so each icon rendered full size. */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border: 1px solid var(--line);
    border-radius: var(--r-small); background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.quick:hover { border-color: var(--brand); text-decoration: none; }
.quick svg { width: 20px; height: 20px; flex: none; color: var(--brand); }

/* Platform: a screen whose settings are stored but not read yet says so (owner Q21 "lack of wiring"). */
.field__tag { margin-left: 6px; font-size: 10.5px; font-weight: 700; color: #9a6b00; background: #fff6dc; border-radius: 999px; padding: 2px 7px; }

/* --------------------------------------------- web tooth chart (moved from app.css, Q24 Phase 1 2026-12-01) */
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--s-4); }
.chart-key.key-missing { background: #F1F5F9; border-color: #CBD5E1; color: #64748B; }
.fdi-row { display: grid; grid-template-columns: repeat(16, 1fr); gap: 5px; }
.tooth { position: relative; }
.tooth > summary {
    list-style: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 2px; border: 1px solid var(--line); border-radius: var(--r-small); background: var(--surface);
    font-size: 10.5px; font-weight: 700; color: var(--body);
}
.tooth > summary::-webkit-details-marker { display: none; }
.tooth > summary:hover, .tooth[open] > summary { border-color: var(--brand); }
.tooth__dot { width: 8px; height: 8px; border-radius: 50%; background: #CBD5E1; }
.tooth.key-caries .tooth__dot { background: #EF4444; }
.tooth.key-filled .tooth__dot { background: #3B82F6; }
.tooth.key-crown .tooth__dot { background: #F59E0B; }
.tooth.key-rct .tooth__dot { background: #8B5CF6; }
.tooth.key-missing .tooth__dot { background: #94A3B8; }
.tooth.key-implant .tooth__dot { background: #10B981; }
.tooth__form {
    position: absolute; z-index: 20; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
    width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
    padding: 10px; display: grid; gap: 6px; box-shadow: 0 18px 40px -24px rgba(15, 23, 42, .5);
}
.tooth__form .input, .tooth__form .select { min-height: 34px; padding: 5px 9px; font-size: 12px; }
@media (max-width: 780px) { .fdi-row { grid-template-columns: repeat(8, 1fr); } }

/* ------------------------------------- clinician "My day" panes (were never styled; Q24 Phase 1 2026-12-01) */
.panes { display: grid; grid-template-columns: 280px minmax(0, 1fr) 260px; gap: var(--s-4); align-items: start; }
.pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-4); min-width: 0; overflow: hidden; }
.pane--list { display: grid; gap: 8px; align-content: start; }
.pane--list > .ds-row { margin-bottom: 4px !important; }
.pane--side { background: var(--page-warm); }
.patient-strip { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); background: var(--page-warm); border-bottom: 1px solid var(--line); }
.patient-strip h2 { font-size: 17px; letter-spacing: -.02em; }
.meta-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.meta-item { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-small); background: var(--surface); }
.meta-item span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.meta-item strong { font-size: 14px; color: var(--ink); text-transform: capitalize; }
@media (max-width: 1100px) { .panes { grid-template-columns: 240px minmax(0, 1fr); } .pane--side { grid-column: 1 / -1; } }
@media (max-width: 760px) { .panes { grid-template-columns: 1fr; } .meta-row { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------ printable patient report (moved from app.css, Q24 Phase 1 2026-12-01) */
.report-page { background: var(--page); padding: 24px 16px 60px; min-height: 100vh; }
.report { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 30px 34px; }
.report-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 14px; border-bottom: 2px solid var(--line); margin-bottom: 18px; }
.report-head > div:first-child { display: flex; gap: 10px; align-items: center; }
.report-block { margin-bottom: 20px; }
.report-block h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.report-grid > div { display: flex; flex-direction: column; }
.report-note { border-left: 3px solid var(--line); padding-left: 12px; margin-bottom: 10px; font-size: 12.5px; }
.report-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.report-actions { max-width: 820px; margin: 16px auto 0; display: flex; gap: 10px; justify-content: flex-end; }
.report-picker { max-width: 820px; margin: 0 auto 16px; }
.table--compact th, .table--compact td { padding: 8px 10px; }
.t-warning { color: var(--warning, #B45309); font-weight: 600; }
@media print {
    .report-actions, .report-picker { display: none !important; }
    .report-page { background: #fff; padding: 0; }
    .report { border: none; border-radius: 0; padding: 0; max-width: none; }
}

/* ------------------------------------------------ small wrappers the templates name (Q24 Phase 1 2026-12-01) */
.portal__main { display: block; min-width: 0; }
.about-hero__copy { min-width: 0; }
.app-band__phone { display: flex; justify-content: center; min-width: 0; }

/* --------------------------------------------- sidebar groups and folders (owner 2026-12-01, Q24 Phase 2) */
.nav-section > summary, .nav-folder > summary { list-style: none; cursor: pointer; user-select: none; }
.nav-section > summary::-webkit-details-marker, .nav-folder > summary::-webkit-details-marker { display: none; }
.nav-section > summary { display: flex; align-items: center; justify-content: space-between; }
.nav-section > summary::after {
    content: ""; width: 5px; height: 5px; margin-right: 8px; opacity: .7;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); transition: transform .15s;
}
.nav-section:not([open]) > summary::after { transform: rotate(-45deg); }
.nav-section > summary:hover { color: var(--muted); }
.nav-folder__chev { margin-left: auto; width: 14px !important; height: 14px !important; transition: transform .15s; }
.nav-folder[open] > summary .nav-folder__chev { transform: rotate(90deg); }
.nav-folder__toggle.has-current { color: var(--brand-deep); font-weight: 600; }
.nav-folder__pages { display: flex; flex-direction: column; gap: 1px; margin: 1px 0 4px 19px; padding-left: 8px; border-left: 1px solid var(--line); }
.nav-item--child { padding-top: 7px; padding-bottom: 7px; font-size: 12.5px; }
.nav-item--child.is-active::before { left: -9px; }

/* --------------------------------------------- analytics consent bar (public pages only; Q24 Phase 3b, 2026-12-01) */
.consent {
    position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60;
    max-width: 720px; margin: 0 auto; display: flex; gap: 12px; align-items: center; justify-content: space-between;
    flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
    padding: 12px 16px; box-shadow: 0 18px 40px -24px rgba(15, 23, 42, .5); font-size: 13px; color: var(--body);
}
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 260px; }
.consent__actions { display: flex; gap: 8px; }

/* Q25 Phase D (owner 2026-12-02): My attendance — today's check in/out card and the month calendar (SRM-portal style). */
.att-today { display: flex; flex-direction: column; gap: 10px; padding: var(--s-5); }
.att-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: var(--s-4) var(--s-5) var(--s-5); }
.att-cal__wd { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 4px; }
.att-day { min-height: 74px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); }
.att-day--blank { border: none; background: transparent; }
.att-day__n { font-weight: 700; font-size: 13px; color: var(--ink); }
.att-day__s { font-size: 11px; font-weight: 600; }
.att-day__t { font-size: 10.5px; color: var(--muted); }
.att-day--present { background: #ECFDF5; border-color: #A7F3D0; } .att-day--present .att-day__s { color: #047857; }
.att-day--half_day { background: #FFFBEB; border-color: #FDE68A; } .att-day--half_day .att-day__s { color: #B45309; }
.att-day--leave { background: #EEF0F8; border-color: #C7CCEA; } .att-day--leave .att-day__s { color: #414C8C; }
.att-day--absent { background: #FEF2F2; border-color: #FECACA; } .att-day--absent .att-day__s { color: #B91C1C; }
.att-day--off { background: #F8FAFC; } .att-day--off .att-day__s { color: var(--muted); }
.att-day.is-today { box-shadow: 0 0 0 2px var(--brand); }
@media (max-width: 640px) { .att-day { min-height: 52px; padding: 4px; } .att-day__t { display: none; } }
/* Q25 Phase D (SRM screens): date filter row, the coloured attendance cell, and the In / Out entry row. */
.att-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.att-filter .field { min-width: 180px; }
.att-code { display: inline-block; min-width: 40px; text-align: center; font-weight: 800; font-size: 12px; padding: 5px 8px; border-radius: 6px; color: #fff; background: #94A3B8; }
.att-code--present { background: #059669; } .att-code--half_day { background: #D97706; } .att-code--leave { background: #5360A9; }
.att-code--onduty { background: #0E7490; } .att-code--absent { background: #B91C1C; } .att-code--off { background: #CBD5E1; color: #334155; }
.att-day--onduty { background: #ECFEFF; border-color: #A5F3FC; } .att-day--onduty .att-day__s { color: #0E7490; }
.att-mark { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.att-mark .input { width: 120px; min-height: 32px; padding: 4px 8px; }
/* Q25 Phase E (owner 2026-12-02): partner clinics' logos on the public website. */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s-4); }
.partner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-4); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.partner__logo { width: 100%; height: 72px; object-fit: contain; }
.partner__name { font-weight: 700; font-size: 13px; color: var(--ink); }
.partner__city { font-size: 12px; color: var(--muted); }
/* Q25 Phase F (owner 2026-12-02): the sidebar branch switcher of a dental chain. */
.branch-switch { display: flex; flex-direction: column; gap: 4px; margin: 0 0 8px; }
.branch-switch .select { min-height: 32px; padding: 4px 28px 4px 8px; font-size: 12.5px; }
/* Q25 Phase G1 (owner 2026-12-03): Smart Health History — one step per section, Yes / No / Don't know rows, alerts. */
.hf-form { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-4); }
.hf-step { border: 1px solid var(--line); padding: var(--s-5); margin: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.hf-step__title { font-size: 16px; font-weight: 800; color: var(--ink); padding: 0; display: flex; justify-content: space-between; gap: 12px; width: 100%; }
.hf-step__count { font-size: 12px; font-weight: 600; color: var(--muted); }
.hf-q { display: flex; flex-direction: column; gap: 8px; padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.hf-q__label { font-weight: 600; font-size: 14px; color: var(--ink); }
.hf-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.hf-choice__opt { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.hf-choice__opt input { accent-color: var(--brand); }
.hf-detail { max-width: 640px; }
.hf-nav { display: flex; justify-content: space-between; gap: 12px; }
.hf-step[hidden], .hf-q[hidden], .hf-nav [hidden], .hf-submit[hidden] { display: none !important; }
.hh-alerts { display: flex; flex-direction: column; gap: 10px; }
.hh-alert { border-left: 4px solid #94A3B8; background: var(--surface); border-radius: 8px; padding: 10px 14px; }
.hh-alert--high { border-left-color: #B91C1C; background: #FEF2F2; } .hh-alert--medium { border-left-color: #D97706; background: #FFFBEB; } .hh-alert--info { border-left-color: #5360A9; background: #EEF0F8; }
.hh-alert__title { font-weight: 800; color: var(--ink); }
.hh-answer--changed { background: #FFFBEB; }

/* Q25 Phase G2 (owner 2026-12-03): treatment-plan progress bar (web and the patient's plan link). */
.plan-progress { height: 10px; border-radius: 999px; background: #E2E8F0; overflow: hidden; }
.plan-progress span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

/* Q25 Phase E (owner 2026-12-03: every registered clinic shows): the initials badge until a clinic uploads its logo. */
.partner__badge { width: 72px; height: 72px; border-radius: 18px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 24px; letter-spacing: .02em; }
