/* Dental Haven — shared styles for the public site and staff app. No build step. */
[hidden] { display: none !important; }
:root {
  --brand-900: #102542;
  --brand-800: #253b53;
  --brand-700: #253b53;
  --brand-600: #3d5470;
  --brand-100: #e3e7ec;
  --brand-50: #f3f4f6;
  --ink: #15223b;
  --ink-2: #3a4250;
  --ink-3: #5a616b;
  --line: #dde3ee;
  --line-2: #eef2f8;
  --bg: #f6f8fc;
  --card: #ffffff;
  --sand: #f6f2e7;
  --amber-100: #fff4d6;
  --amber-700: #8a5a00;
  --red-100: #fde8e6;
  --red-700: #a3261b;
  --green-100: #e2f5e9;
  --green-700: #1d6b3a;
  --blue-100: #e3effc;
  --blue-700: #1f4f8a;
  --gray-100: #eef1f6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(10, 31, 68, .06), 0 4px 16px rgba(10, 31, 68, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Playfair Display", "Didot", "Bodoni 72", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 15px; }
a { color: var(--brand-700); }
a:hover { color: var(--brand-900); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #7fa6e6; outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; gap: .4em; justify-content: center; border: 1px solid transparent; border-radius: 999px; padding: .55em 1.1em; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--brand-700); color: #fff; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--brand-800); color: #fff; }
.btn-secondary { background: #fff; color: var(--brand-800); border-color: var(--line); }
.btn-secondary:hover { background: var(--brand-50); color: var(--brand-900); }
.btn-ghost { background: transparent; color: var(--brand-700); padding-left: .5em; padding-right: .5em; }
.btn-ghost:hover { background: var(--brand-50); color: var(--brand-900); }
.btn-danger { background: #fff; color: var(--red-700); border-color: #f1c4bf; }
.btn-danger:hover { background: var(--red-100); color: var(--red-700); }
.btn-sm { padding: .35em .8em; font-size: .85rem; }
.btn-lg { padding: .8em 1.5em; font-size: 1.05rem; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.inline-form { display: inline; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3em; color: var(--ink-2); }
.hint { font-weight: 400; font-size: .82rem; color: var(--ink-3); margin-top: .25em; display: block; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date],
input[type=time], input[type=datetime-local], input[type=search], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c7d1e1; border-radius: var(--radius-sm); padding: .55em .7em; min-height: 42px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-600); outline: 3px solid rgba(42, 82, 158, .18); outline-offset: 0; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand-700); vertical-align: middle; margin: 0 .4em 0 0; }
.check { display: flex; align-items: flex-start; gap: .2em; font-weight: 400; color: var(--ink); }
.check input { margin-top: .2em; flex: none; }
.branch-picks { display: grid; gap: .1em; font-size: .9em; min-width: 9em; }
.field { margin-bottom: 1rem; }
.field.error input, .field.error select, .field.error textarea { border-color: var(--red-700); }
.field-error { color: var(--red-700); font-size: .85rem; margin-top: .25em; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem .25rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 .4em; }
.hp { position: absolute; left: -5000px; }

/* ---------- Alerts / badges ---------- */
.flash { border-radius: var(--radius-sm); padding: .75em 1em; margin-bottom: 1rem; border: 1px solid; }
.flash-success { background: var(--green-100); border-color: #b9e3c8; color: var(--green-700); }
.flash-error { background: var(--red-100); border-color: #f4c3bd; color: var(--red-700); }
.flash-info { background: var(--blue-100); border-color: #c4dbf5; color: var(--blue-700); }
.flash-warning { background: var(--amber-100); border-color: #f2dc9f; color: var(--amber-700); }
.flash ul { margin: .3em 0 0; padding-left: 1.2em; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2em .6em; border-radius: 999px; background: var(--gray-100); color: var(--ink-2); white-space: nowrap; letter-spacing: .01em; }
.badge-green { background: var(--green-100); color: var(--green-700); }
.badge-amber { background: var(--amber-100); color: var(--amber-700); }
.badge-red { background: var(--red-100); color: var(--red-700); }
.badge-blue { background: var(--blue-100); color: var(--blue-700); }
.badge-teal { background: var(--brand-100); color: var(--brand-800); }
.alert-flag { display: inline-flex; gap: .4em; align-items: center; background: var(--red-100); color: var(--red-700); border: 1px solid #f4c3bd; border-radius: var(--radius-sm); padding: .35em .7em; font-weight: 600; font-size: .9rem; }
.notice { background: var(--amber-100); border: 1px dashed #e4c56d; color: var(--amber-700); padding: .6em .9em; border-radius: var(--radius-sm); font-size: .9rem; }

/* ---------- Cards / tables ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; }
a.stat:hover { border-color: var(--brand-600); }
.stat .label { font-size: .82rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.7rem; font-weight: 700; color: var(--ink); margin-top: .15em; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .82rem; color: var(--ink-3); }
.stat.warn .value { color: var(--amber-700); }
.stat.danger .value { color: var(--red-700); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6em .7em; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; border-bottom-color: var(--line); background: #fafbfe; }
tr:hover td { background: #fafbfe; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.empty { text-align: center; padding: 2rem 1rem; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink-2); margin-bottom: .25em; }
dl.kv { display: grid; grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); gap: .4em 1rem; margin: 0; }
dl.kv dt { color: var(--ink-3); font-size: .88rem; }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.toolbar .field { margin: 0; min-width: 150px; }
.toolbar .grow { flex: 1; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .6em .9em; text-decoration: none; color: var(--ink-2); border-bottom: 3px solid transparent; font-weight: 600; white-space: nowrap; }
.tabs a.active { color: var(--brand-800); border-bottom-color: var(--brand-700); }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: .55em 0; border-bottom: 1px solid var(--line-2); }
.list-plain li:last-child { border-bottom: 0; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-1 { margin-top: 1rem; }
.pre { white-space: pre-wrap; }
.template-box { background: var(--sand); border: 1px solid #eadfcd; border-radius: var(--radius-sm); padding: .8em 1em; white-space: pre-wrap; font-size: .92rem; }

/* ---------- Staff shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--brand-900); color: #cfdaf0; padding: 1rem .75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; padding: .25rem .5rem 1rem; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #4f7fd1, #1a3a7a); display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.nav-group { margin-bottom: .9rem; }
.nav-group .title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8ea6d3; padding: .2rem .6rem; }
.sidebar a.nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: #e4ebf8; text-decoration: none; padding: .45rem .6rem; border-radius: 8px; font-size: .92rem; }
.sidebar a.nav:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar a.nav.active { background: rgba(255, 255, 255, .13); color: #fff; font-weight: 600; }
.count { background: #f4c05a; color: #3a2a00; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .05em .5em; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .65rem 1.4rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar form { display: flex; align-items: center; gap: .4rem; margin: 0; }
.topbar select { min-height: 36px; padding: .3em .5em; width: auto; }
.topbar .who { font-size: .88rem; color: var(--ink-2); text-align: right; line-height: 1.2; }
.content { padding: 1.4rem; max-width: 1400px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .2rem 0 0; color: var(--ink-3); }
.menu-toggle { display: none; }
.menu-btn { display: none; }

/* Calendar */
.cal { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: auto; }
.cal-col-head { position: sticky; top: 0; background: #fafbfe; border-bottom: 1px solid var(--line); padding: .5rem; font-weight: 700; font-size: .85rem; text-align: center; z-index: 2; }
.cal-times { border-right: 1px solid var(--line); }
.cal-time { height: 60px; font-size: .75rem; color: var(--ink-3); padding: 2px 6px; border-bottom: 1px solid var(--line-2); text-align: right; }
.cal-col { position: relative; border-right: 1px solid var(--line-2); min-width: 170px; }
.cal-slot { height: 60px; border-bottom: 1px solid var(--line-2); }
.cal-appt { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 4px 7px; font-size: .78rem; line-height: 1.25; overflow: hidden; text-decoration: none; color: var(--ink); border-left: 4px solid var(--brand-600); background: var(--brand-50); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.cal-appt:hover { z-index: 3; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.cal-appt.st-requested { border-left-color: #d69e2e; background: #fff8e6; }
.cal-appt.st-checked_in { border-left-color: #2b6cb0; background: #eaf2fc; }
.cal-appt.st-completed { border-left-color: #2f855a; background: #eaf7ef; }
.cal-appt.st-cancelled, .cal-appt.st-no_show { border-left-color: #a0aec0; background: #f3f4f6; color: var(--ink-3); text-decoration: line-through; }

/* Kanban-ish queue */
.queue-col h3 { display: flex; justify-content: space-between; align-items: center; }
.item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .65rem .8rem; margin-bottom: .55rem; background: #fff; }
.item .meta { font-size: .82rem; color: var(--ink-3); }
.item.overdue { border-left: 4px solid var(--red-700); }
.item.due { border-left: 4px solid #d69e2e; }

/* Bar chart (CSS only) */
.bars { display: grid; gap: .45rem; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 110px; gap: .6rem; align-items: center; font-size: .88rem; }
.bar-track { background: var(--line-2); border-radius: 999px; height: 12px; overflow: hidden; }
.bar-fill { background: var(--brand-600); height: 100%; border-radius: 999px; }
.bar-fill.alt { background: #8fb3e8; }

/* Login */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: linear-gradient(160deg, var(--brand-50), #fff 60%); }
.auth-card { width: 100%; max-width: 420px; }

/* Print (report card) */
.print-sheet { background: #fff; max-width: 800px; margin: 1.5rem auto; padding: 2.2rem 2.4rem; border: 1px solid var(--line); border-radius: var(--radius); }
.print-sheet h1 { font-family: var(--serif); }
.watermark { border: 2px dashed var(--red-700); color: var(--red-700); padding: .5em .9em; border-radius: var(--radius-sm); font-weight: 700; text-align: center; margin-bottom: 1rem; }
@media print {
  .no-print, .sidebar, .topbar { display: none !important; }
  body { background: #fff; }
  .print-sheet { border: 0; margin: 0; padding: 0; max-width: none; }
  .shell { display: block; }
}

/* ---------- Public site ---------- */
.site-header { background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.2) blur(6px); }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.site-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--brand-900); font-weight: 800; font-size: 1.15rem; }
.site-brand small { display: block; font-weight: 500; font-size: .72rem; color: var(--ink-3); letter-spacing: .04em; }
.site-nav { display: flex; gap: .2rem; margin-left: auto; align-items: center; }
.site-nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; padding: .5em .7em; border-radius: 8px; font-size: .95rem; }
.site-nav a:hover { color: var(--brand-800); background: var(--brand-50); }
.site-nav .btn { color: #fff; margin-left: .4rem; }
.nav-toggle { display: none; }
.hero { background: radial-gradient(1200px 400px at 85% -10%, #efe3c7 0, transparent 60%), linear-gradient(180deg, var(--brand-50), #fff); padding: 4.5rem 0 3.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: center; }
.hero h1 { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 400; letter-spacing: -.01em; color: var(--brand-900); }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; box-shadow: 0 10px 40px rgba(16, 41, 90, .10); }
.hero-card h3 { margin-bottom: .75rem; }
.hero-card ul { list-style: none; padding: 0; margin: 0; }
.hero-card li { display: flex; justify-content: space-between; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line-2); }
.hero-card li:last-child { border-bottom: 0; }
.section { padding: 3.5rem 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.section.sand { background: var(--sand); }
.section-head { max-width: 680px; margin-bottom: 2rem; }
.section-head h2 { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 400; color: var(--brand-900); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 800; color: var(--brand-700); margin-bottom: .6rem; display: block; }
.svc-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .4rem; transition: border-color .15s, transform .15s; height: 100%; }
.svc-card:hover { border-color: var(--brand-600); transform: translateY(-2px); color: inherit; }
.svc-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-100); color: var(--brand-800); display: grid; place-items: center; font-weight: 800; margin-bottom: .4rem; }
.svc-card .more { margin-top: auto; color: var(--brand-700); font-weight: 700; font-size: .92rem; }
.branch-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem; }
.branch-card h3 { color: var(--brand-900); }
.placeholder { color: var(--ink-3); font-style: italic; }
.placeholder-img { aspect-ratio: 4 / 3; border-radius: 14px; background: repeating-linear-gradient(45deg, var(--brand-50), var(--brand-50) 12px, #fff 12px, #fff 24px); border: 1px dashed #b9c9e6; display: grid; place-items: center; color: var(--ink-3); font-size: .85rem; text-align: center; padding: 1rem; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem; font-family: var(--serif); font-size: 1.05rem; }
.quote footer { font-family: var(--font); font-size: .88rem; color: var(--ink-3); margin-top: .6rem; }
.cta-band { background: var(--brand-800); color: #f6f2e7; border-radius: 20px; padding: 2.2rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-family: var(--serif); font-weight: 400; margin: 0 0 .3rem; }
.cta-band .btn { background: #fff; color: var(--brand-900); }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.site-footer { background: var(--brand-900); color: #cfd3d9; padding: 2.5rem 0 1.5rem; margin-top: 0; font-size: .92rem; }
.site-footer a { color: #e4ebf8; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.site-footer h4 { color: #fff; }
.site-footer .fine { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 1.5rem; padding-top: 1rem; font-size: .82rem; }
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }
.slot-grid { display: flex; flex-wrap: wrap; gap: .45rem; }
.slot-grid label { margin: 0; }
.slot-grid input { position: absolute; opacity: 0; }
.slot-grid span { display: inline-block; border: 1px solid #c7d1e1; border-radius: 999px; padding: .4em .85em; font-weight: 600; font-size: .9rem; cursor: pointer; background: #fff; color: var(--ink-2); }
.slot-grid input:checked + span { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.slot-grid input:focus-visible + span { outline: 3px solid #7fa6e6; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 2.4rem; margin-bottom: .9rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--brand-100); color: var(--brand-800); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .menu-toggle:checked ~ .shell .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: .6rem 1rem; flex-wrap: wrap; }
  .content { padding: 1rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 90px 1fr 90px; }
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.25rem; border-bottom: 1px solid var(--line); box-shadow: 0 12px 20px rgba(0, 0, 0, .06); }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav .btn { margin: .5rem 0 0; }
  .nav-toggle-btn { display: inline-flex; margin-left: auto; }
  .hide-sm { display: none; }
}
@media (min-width: 901px) { .nav-toggle-btn { display: none; } }

/* Demo mode banner */
.demo-banner { background: #fff4d6; color: #6b4500; border-bottom: 1px solid #f2dc9f; padding: .5rem 1rem; text-align: center; font-size: .88rem; }

/* ---------- Navy theme: showcase & polish ---------- */
.hero { background: radial-gradient(1100px 420px at 88% -10%, #efe3c7 0, transparent 60%), linear-gradient(180deg, var(--brand-50), #fff); }
.hero h1 { color: var(--brand-900); }
.site-brand { font-size: 1.25rem; letter-spacing: -.01em; }
.tagline-sm { font-family: var(--serif); font-style: italic; color: #fff; font-size: 1.05rem; margin-bottom: .6rem; }
.btn-light { background: #fff; color: var(--brand-900); }
.btn-light:hover { background: var(--brand-100); color: var(--brand-900); }
.section.works { background: linear-gradient(180deg, var(--brand-900), var(--brand-800)); color: #d7e1f3; }
.section.works .section-head h2 { color: #fff; }
.section.works .eyebrow { color: #9fbbed; }
.section.works .section-head p { color: #c3d1ec; max-width: 36em; }
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; gap: 1rem; }
.work-card { position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: #1c3667; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.work-card.feature { grid-row: span 2; }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.work-card:hover img { transform: scale(1.04); }
.work-card figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem 1rem .9rem; background: linear-gradient(transparent, rgba(6, 18, 42, .88)); color: #fff; display: grid; gap: .15rem; }
.work-card figcaption span { font-size: .85rem; color: #c9d6ef; }
.work-ph { position: absolute; inset: 0; display: grid; place-items: center; color: #9fb4dc; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase;
  background: repeating-linear-gradient(135deg, #1a3366, #1a3366 14px, #1d386f 14px, #1d386f 28px); }
@media (max-width: 900px) { .works-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; } }
@media (max-width: 560px) { .works-grid { grid-template-columns: 1fr; } .work-card.feature { grid-row: span 1; } }

/* Mobile refinements */
.logo-mark { font-size: .8rem; letter-spacing: .02em; }
.menu-backdrop, .menu-close { display: none; }
@media (max-width: 900px) {
  .menu-toggle:checked ~ .menu-backdrop { display: block; position: fixed; inset: 0; background: rgba(6, 18, 42, .45); z-index: 40; }
  .menu-close { display: block; position: absolute; top: .9rem; right: .9rem; color: #fff; font-size: 1.1rem; cursor: pointer; padding: .2rem .4rem; }
  .sidebar { position: fixed; }
  .hero { padding: 2.5rem 0 2rem; }
  .section { padding: 2.5rem 0; }
  .section-head { margin-bottom: 1.4rem; }
  .cta-band { padding: 1.5rem; }
  .page-head .btn { width: 100%; }
}
@media (max-width: 560px) {
  .hero .row .btn { width: 100%; }
  .works-grid { grid-auto-rows: 200px; }
  .toolbar .field { min-width: 0; flex: 1 1 100%; }
  .topbar .btn-ghost { display: none; }
}
section[id] { scroll-margin-top: 72px; }
@media (max-width: 560px) {
  .works-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: .6rem; }
  .work-card.feature { grid-column: span 2; grid-row: span 1; }
  .work-card figcaption { padding: 1rem .7rem .6rem; }
  .work-card figcaption span { display: none; }
}
@media (max-width: 560px) { .work-ph { font-size: .7rem; letter-spacing: .04em; } }

/* Logo */
.brand-logo { height: 32px; width: auto; flex: none; }
.site-brand .brand-logo { height: 34px; }
.sidebar .brand .brand-logo { height: 28px; }
.footer-logo { height: 40px; width: auto; margin-bottom: .6rem; opacity: .95; }
@media (max-width: 560px) { .site-brand .brand-logo { height: 30px; } }

/* Branch quick links */
.branch-links { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .8rem; }
.chip { display: inline-flex; align-items: center; gap: .3em; padding: .35em .75em; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--brand-800); font-size: .82rem; font-weight: 600; text-decoration: none; }
.chip:hover { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-900); }
.branch-card { display: flex; flex-direction: column; }
.branch-card .row:last-child { margin-top: auto; }

/* Prescriptions & certificates */
.letterhead { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid var(--brand-900); padding-bottom: .8rem; margin-bottom: 1rem; }
.lh-name { font-family: var(--serif); font-size: 1.4rem; color: var(--brand-900); font-weight: 400; }
.lh-sub { font-size: .85rem; color: var(--ink-2); }
.rx-symbol { font-family: var(--serif); font-size: 3rem; color: var(--brand-900); line-height: 1; margin: 1rem 0 .4rem; }
.rx-items li { margin-bottom: .9rem; font-size: 1.05rem; }
.rx-patient { border-bottom: 1px solid var(--line); padding-bottom: .6rem; }
.signature { margin-top: 3rem; margin-left: auto; width: 280px; text-align: center; }
.sig-line { border-top: 1px solid var(--ink); margin-bottom: .3rem; }
@media print { .rx-sheet { font-size: 12pt; } }

/* Dental chart */
.dchart { position: relative; overflow-x: auto; padding: .5rem 0 1rem; }
.dchart-row { display: flex; gap: 4px; justify-content: center; min-width: max-content; }
.dchart-row.upper { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 2px dashed var(--line); }
.midline { width: 2px; background: var(--line); margin: 0 6px; align-self: stretch; }
.tooth { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--ink); width: 42px; }
.dchart-row.lower .tooth { flex-direction: column-reverse; }
.tooth-no { font-size: .72rem; color: var(--ink-3); font-weight: 700; }
.tooth-body { width: 38px; height: 46px; border: 2px solid #c7d1e1; border-radius: 12px 12px 16px 16px; background: #fff; display: grid; place-items: center;
  font-size: .72rem; font-weight: 800; }
.dchart-row.lower .tooth-body { border-radius: 16px 16px 12px 12px; }
.tooth:hover .tooth-body { border-color: var(--brand-600); }
.tooth.selected .tooth-body { outline: 3px solid var(--brand-600); outline-offset: 2px; }
.c-sound .tooth-body { background: #eaf7ef; border-color: #7cc49a; color: #1d6b3a; }
.c-caries .tooth-body { background: #fde8e6; border-color: #e0786b; color: #a3261b; }
.c-filled .tooth-body { background: #e3effc; border-color: #6d9ee0; color: #1f4f8a; }
.c-crown .tooth-body { background: #fff4d6; border-color: #d9ad3c; color: #8a5a00; }
.c-rct .tooth-body { background: #efe6fb; border-color: #9a74d6; color: #5a2f9e; }
.c-extract .tooth-body { background: #fff; border: 2px dashed #e0786b; color: #a3261b; }
.c-missing .tooth-body { background: #eef1f6; border-color: #aab4c4; color: #66738a; text-decoration: line-through; }
.c-implant .tooth-body { background: #d9f2f0; border-color: #4fb3a9; color: #11706a; }
.c-other .tooth-body { background: #f6f8fc; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: var(--ink-2); margin-top: .5rem; }
.legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.tooth.mini { width: auto; }
.tooth.mini .tooth-body { width: 24px; height: 22px; border-radius: 6px; font-size: .6rem; }

/* ---------------------------------------------------------------- Website chat assistant */
.dh-chat { position: fixed; right: 18px; bottom: 18px; z-index: 60; font-size: 15px; }
.dh-chat-launch { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.15rem .8rem .95rem; border: 0; border-radius: 999px; cursor: pointer;
  background: #102542; color: #fff; font: inherit; font-weight: 700; box-shadow: 0 14px 32px -12px rgba(11, 27, 49, .7); transition: transform .2s ease, background .2s ease; }
.dh-chat-launch svg { color: #c6a15b; }
.dh-chat-launch:hover { transform: translateY(-2px); background: #253b53; }
.dh-chat.is-open .dh-chat-launch { display: none; }
.dh-chat-panel { width: min(380px, calc(100vw - 24px)); height: min(600px, calc(100vh - 36px)); display: flex; flex-direction: column; background: #fbf9f3;
  border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(11, 27, 49, .55); border: 1px solid rgba(16, 37, 66, .08); }
.dh-chat-panel[hidden] { display: none; }
.dh-chat-head { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; background: linear-gradient(135deg, #102542, #253b53); color: #fff; }
.dh-chat-head div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.dh-chat-head span { font-size: .78rem; color: #dcc28f; }
.dh-chat-close { border: 0; background: rgba(255, 255, 255, .1); color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.dh-chat-log { flex: 1; overflow-y: auto; padding: 1rem .9rem .4rem; display: flex; flex-direction: column; gap: .55rem; }
.dh-msg { max-width: 88%; padding: .65rem .85rem; border-radius: 16px; line-height: 1.45; color: #1d2733; word-wrap: break-word; }
.dh-msg p { margin: 0 0 .45rem; } .dh-msg p:last-child { margin-bottom: 0; }
.dh-msg ul { margin: .2rem 0 .45rem; padding-left: 1.1rem; } .dh-msg li { margin: .1rem 0; }
.dh-msg a { color: #88692f; font-weight: 600; }
.dh-msg.bot { align-self: flex-start; background: #fff; border: 1px solid rgba(16, 37, 66, .08); border-bottom-left-radius: 6px; }
.dh-msg.me { align-self: flex-end; background: #102542; color: #fff; border-bottom-right-radius: 6px; }
.dh-msg-form { max-width: 100%; width: 100%; }
.dh-strong { font-weight: 700; color: #102542; }
.dh-warn { background: #fdf0ee; border-left: 3px solid #b3261e; padding: .45rem .6rem; border-radius: 6px; color: #5c1a14; font-size: .92em; }
.dh-links { display: flex; flex-wrap: wrap; gap: .35rem .8rem; }
.dh-cta { display: inline-block; margin-top: .25rem; padding: .5rem .95rem; border-radius: 999px; background: #c6a15b; color: #102542 !important; text-decoration: none; font-weight: 700; border: 0; cursor: pointer; font: inherit; }
.dh-cta:hover { background: #d4b377; }
.dh-typing { display: inline-flex; gap: 4px; padding: .8rem .9rem; }
.dh-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa3ad; animation: dhdot 1s infinite ease-in-out; }
.dh-typing span:nth-child(2) { animation-delay: .15s; } .dh-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dhdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.dh-chat-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .35rem .9rem .6rem; }
.dh-chip { border: 1px solid #c6a15b; background: #fff; color: #102542; border-radius: 999px; padding: .38rem .8rem; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.dh-chip:hover { background: #f6f2e7; }
.dh-chat-input { display: flex; gap: .4rem; padding: .6rem .7rem; border-top: 1px solid rgba(16, 37, 66, .08); background: #fff; }
.dh-chat-input input { flex: 1; min-width: 0; border: 1px solid #d8d3c6; border-radius: 999px; padding: .6rem .95rem; font: inherit; }
.dh-chat-input input:focus { outline: 2px solid #c6a15b; outline-offset: 1px; }
.dh-chat-input button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #102542; color: #c6a15b; cursor: pointer; font-size: 1rem; }
.dh-chat-fine { margin: 0; padding: .3rem .9rem .6rem; background: #fff; font-size: .72rem; color: #5a616b; }
.dh-form { display: flex; flex-direction: column; gap: .5rem; }
.dh-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; font-weight: 600; color: #253b53; }
.dh-form input:not([type=checkbox]), .dh-form select, .dh-form textarea { border: 1px solid #d8d3c6; border-radius: 10px; padding: .5rem .65rem; font: inherit; font-weight: 400; background: #fff; }
.dh-form .dh-check { flex-direction: row; align-items: flex-start; gap: .45rem; font-weight: 400; font-size: .82rem; }
.dh-form .dh-check input { margin-top: .2rem; }
.dh-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.dh-err { color: #b3261e; font-size: .85rem; margin: 0; }
.dh-err:empty { display: none; }
@media (max-width: 560px) {
  .dh-chat { right: 12px; bottom: 12px; }
  .dh-chat-launch span { display: none; }
  .dh-chat-launch { padding: .9rem; }
  .dh-chat-panel { height: calc(100vh - 24px); }
}
@media print { .dh-chat { display: none; } }
.dh-chat-head > .dh-lang { flex: none; display: flex; flex-direction: row; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 2px; }
.dh-lang button { border: 0; background: transparent; color: #dcc28f; font: inherit; font-size: .75rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; cursor: pointer; }
.dh-lang button[aria-pressed="true"] { background: #c6a15b; color: #102542; }
.dh-special { color: #88692f; font-weight: 700; }
@media (max-width: 560px) { .dh-chat-chips { max-height: 34%; overflow-y: auto; } }

/* ---------------------------------------------------------------- Patient guides */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 1.6rem); }
@media (max-width: 960px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .guide-grid { grid-template-columns: 1fr; } }
.guide-card { display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit;
  border: 1px solid rgba(16, 37, 66, .08); box-shadow: 0 18px 40px -28px rgba(16, 37, 66, .5); transition: transform .25s ease, box-shadow .25s ease; }
.guide-card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -28px rgba(16, 37, 66, .6); }
.guide-card-media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(145deg, #253b53, #0b1b31); overflow: hidden; }
.guide-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.guide-card:hover .guide-card-media img { transform: scale(1.04); }
.guide-card-media span { position: absolute; left: .8rem; top: .8rem; padding: .28rem .7rem; border-radius: 999px; background: rgba(11, 27, 49, .75); color: #dcc28f; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.guide-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.guide-card-body h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.25rem; line-height: 1.25; color: #102542; }
.guide-card-body p { margin: 0; color: #5a616b; font-size: .93rem; line-height: 1.5; flex: 1; }
.guide-card-more { color: #88692f; font-weight: 700; font-size: .9rem; }
.guide-hero { background: linear-gradient(160deg, #102542, #0b1b31); color: #fff; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.guide-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.15; margin: .4rem 0 .8rem; color: #fff; }
.guide-hero p { color: rgba(255, 255, 255, .8); font-size: 1.08rem; max-width: 44rem; margin: 0; }
.guide-eyebrow, .guide-crumbs { color: #c6a15b; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.guide-crumbs a { color: #dcc28f; text-decoration: none; } .guide-crumbs a:hover { color: #fff; }
.guide-narrow { max-width: 780px; }
.guide-photo { margin: -1.5rem 0 0; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 8; box-shadow: 0 30px 60px -30px rgba(16, 37, 66, .55); background: #253b53; }
.guide-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guide-body { padding-top: 2rem; padding-bottom: 1rem; font-size: 1.05rem; line-height: 1.75; color: #26313e; }
.guide-body h2 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; color: #102542; margin: 2rem 0 .6rem; }
.guide-body ul { padding-left: 1.2rem; } .guide-body li { margin: .35rem 0; } .guide-body li::marker { color: #c6a15b; }
.guide-note { margin-top: 2rem; padding: .9rem 1.1rem; border-radius: 12px; background: #f6f2e7; color: #5a616b; font-size: .92rem; line-height: 1.55; }
.guide-cta { margin: 2rem 0 3rem; padding: clamp(1.3rem, 3vw, 2rem); border-radius: 20px; background: linear-gradient(135deg, #102542, #253b53); color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.guide-cta h2 { font-family: var(--serif); font-weight: 400; margin: 0 0 .3rem; color: #fff; font-size: 1.6rem; }
.guide-cta p { margin: 0; color: rgba(255, 255, 255, .8); }
.guide-cta .btn { background: #c6a15b; color: #102542; border-color: #c6a15b; }
.guide-cta .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.guide-cta-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.guide-related { padding-bottom: 4rem; }
.guide-related h2, .guide-section-title { font-family: var(--serif); font-weight: 400; color: #102542; font-size: 1.7rem; margin: 0 0 1.2rem; }
.guide-list { padding-top: 2.5rem; }
.dh-sample { font-size: .8rem; color: #8a5a00; background: #fff6e0; padding: .35rem .5rem; border-radius: 8px; }
.dh-note { font-size: .8rem; color: #5a616b; }
.quote-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .quote-grid { grid-template-columns: 1fr; } }

/* Inventory */
.inv-table .inv-cat th { background: var(--line-2, #f1f3f6); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); padding-top: .8em; }
.inv-table .inv-cat .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.inv-input { width: 6.5em; text-align: right; }
.inv-date { width: 10.5em; }
.inv-row-error td { background: #fdecee; }
.inv-table td:first-child { white-space: nowrap; }
/* Lab works / notifications */
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .35rem 1rem; margin: 0; }
.dl dt { color: var(--ink-3); font-size: .88rem; }
.dl dd { margin: 0; }
.text-danger { color: var(--red-700); }
.bell { position: relative; display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.bell .count { background: var(--red-700); color: #fff; border-radius: 999px; font-size: .72rem; padding: .05em .5em; }
.notice-list li { padding: .7rem 0; border-bottom: 1px solid var(--line-2, #eee); }
.notice-list li.unread strong { color: var(--brand-800, #102542); }
.notice-list li.unread::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--red-700); margin-right: .45rem; vertical-align: middle; }
.clock-card { text-align: left; }
.clock-now { font-size: 1.15rem; font-weight: 700; margin-top: 0; }
.clock-btn { width: 100%; font-size: 1.15rem; padding: .9em; }
.clock-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.inv-comm summary { font-size: .82rem; color: var(--brand-700, #253b53); cursor: pointer; margin-top: .25rem; }
.inv-comm form { margin-top: .5rem; }

/* Sidebar accordion */
.sidebar .nav-top { margin-bottom: .6rem; }
.nav-acc { margin: 0 0 .3rem; border-radius: 10px; }
.nav-acc > summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .6rem .6rem; border-radius: 10px; cursor: pointer;
  color: #9fb3d6; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; user-select: none; }
.nav-acc > summary::-webkit-details-marker { display: none; }
.nav-acc > summary::after { content: ""; margin-left: auto; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease; opacity: .8; }
.nav-acc[open] > summary::after { transform: rotate(45deg); }
.nav-acc > summary:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.nav-acc[open] { background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .07); }
.nav-acc[open] > summary { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-acc .nav-ico { flex: none; opacity: .9; }
.nav-acc .dot { width: .45rem; height: .45rem; border-radius: 50%; background: #e0b24e; }
.nav-acc-body { padding: .25rem .3rem .4rem; display: grid; gap: .1rem; }
.nav-acc-body a.nav { padding-left: .7rem; }
.sidebar .nav-acc-body a.nav.active { background: rgba(198, 161, 91, .22); box-shadow: inset 3px 0 0 #c6a15b; }
@media (prefers-reduced-motion: reduce) { .nav-acc > summary::after { transition: none; } }

/* Patient profile: header card, info strip, pill tabs */
.pt-head { padding: 1.1rem 1.2rem; margin-top: .6rem; }
.pt-top { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.pt-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--brand-100); color: var(--brand-800); display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; flex: 0 0 auto; }
.pt-id { flex: 1 1 320px; min-width: 0; }
.pt-id h1 { margin: 0 0 .4rem; font-size: 1.5rem; }
.pt-age { color: var(--ink-3); font-weight: 500; font-size: 1.1rem; }
.pt-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { display: inline-flex; gap: .35em; align-items: baseline; border: 1px solid var(--line); background: var(--brand-50); border-radius: 999px; padding: .2em .75em; font-size: .85rem; }
.chip b { color: var(--ink-3); font-weight: 600; }
.chip-red { background: var(--red-100); border-color: #f3c3bd; color: var(--red-700); }
.chip-amber { background: var(--amber-100); border-color: #f1dca0; color: var(--amber-700); }
.pt-more { margin-top: .8rem; }
.pt-more > summary { cursor: pointer; color: var(--brand-700); font-size: .85rem; font-weight: 600; }
.pt-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: .7rem; padding-top: .8rem; border-top: 1px solid var(--line-2); }
.pt-strip h2 { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .3rem; }
.pt-strip p { margin: 0; font-size: .92rem; overflow-wrap: anywhere; }
@media (max-width: 900px) { .pt-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .pt-strip { grid-template-columns: 1fr; } }
.pills { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1rem 0; }
.pills a { padding: .45em 1em; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.pills a:hover { background: var(--brand-50); }
.pills a.active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.pill-n { background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 .45em; font-size: .78rem; }
.pills a.active .pill-n { background: rgba(255,255,255,.25); }

/* Progress notes and bills tables */
.pn-table td, .bills td { vertical-align: top; }
.pn-date { color: var(--brand-700); }
.pn-lines { list-style: none; margin: 0 0 .3rem; padding: 0; }
.pn-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .1rem 0; }
.pn-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pn-note { margin: .3rem 0; font-size: .92rem; }
.tag-paid { color: var(--green-700); font-weight: 800; letter-spacing: .04em; }
.tag-part { color: var(--amber-700); font-weight: 800; letter-spacing: .04em; }

/* Row "⋯" menu */
.kebab { position: relative; }
.kebab > summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .1em .6em; font-weight: 700; display: inline-block; background: var(--card); }
.kebab > summary::-webkit-details-marker { display: none; }
.kebab-menu { position: absolute; right: 0; top: 110%; z-index: 20; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: .4rem .7rem .6rem; }
.kebab-menu a, .kebab-menu .linkish { display: block; padding: .3rem 0; text-decoration: none; }
.kebab-h { margin: .4rem 0 0; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.kebab-h:not(:first-child) { border-top: 1px solid var(--line-2); padding-top: .4rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-700); cursor: pointer; text-align: left; }

/* Dialogs */
.dlg { border: 0; border-radius: var(--radius); padding: 1rem 1.2rem 1.2rem; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(10, 31, 68, .3); }
.dlg-wide { width: min(1000px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(16, 37, 66, .45); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--brand-100); margin-bottom: .8rem; }
.dlg-head h2 { margin: .2rem 0 .5rem; }

/* Add payment form */
.pay-top { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: .8rem; }
.pay-lbl, .pay-box legend { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.pay-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem .8rem; margin: 0 0 .8rem; }
.pay-line { display: grid; grid-template-columns: 1fr 1fr auto; gap: .6rem; align-items: end; }
.pay-line .field { margin-bottom: .4rem; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 1rem; align-items: start; }
.pay-summary { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .9rem; background: var(--brand-50); }
.pay-summary h3 { margin: 0 0 .4rem; font-size: 1rem; }
.pay-summary dl { display: grid; grid-template-columns: 1fr auto; gap: .45rem 1rem; margin: 0; }
.pay-summary dt { font-weight: 600; } .pay-summary dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.c-green { color: var(--green-700); } .c-amber { color: var(--amber-700); }
.sigpad canvas { width: 100%; height: 180px; border: 2px dashed var(--line); border-radius: var(--radius-sm); background: #fff; touch-action: none; cursor: crosshair; display: block; }
.sig-img { max-height: 60px; max-width: 220px; }
@media (max-width: 700px) { .pay-grid, .pay-top { grid-template-columns: 1fr; } .pay-line { grid-template-columns: 1fr 1fr; } }

/* New progress note form */
.pn-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem .8rem; }
.pn-top .field { margin-bottom: .2rem; }
.pn-static { padding: .55em .2em; font-weight: 600; }
@media (max-width: 800px) { .pn-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pn-lines-tbl input { min-width: 0; }
.pn-lines-tbl td { padding: .3rem .3rem; vertical-align: middle; }
.pn-lines-tbl td:first-child { min-width: 220px; }
.pn-lines-tbl td:nth-child(2) { min-width: 110px; }
.pn-lines-tbl td:nth-child(4) { min-width: 100px; }
.pn-recall { color: var(--blue-700); font-weight: 600; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .2rem; border: 2px dashed var(--line); border-radius: var(--radius-sm); padding: 1rem; cursor: pointer; text-align: center; }
.dropzone.over { border-color: var(--brand-600); background: var(--brand-50); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 3px solid rgba(42, 82, 158, .25); }
.switch { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.pay-summary dd input { text-align: right; }
.pay-summary .pn-net { font-size: 1.15rem; padding-top: .4rem; border-top: 1px solid var(--line); }

/* New progress note form */
.pn-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem .8rem; }
.pn-top .field { margin-bottom: .2rem; }
.pn-static { padding: .55em .2em; font-weight: 600; }
@media (max-width: 800px) { .pn-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pn-lines-tbl input { min-width: 0; }
.pn-lines-tbl td { padding: .3rem .3rem; vertical-align: middle; }
.pn-lines-tbl td:first-child { min-width: 220px; }
.pn-lines-tbl td:nth-child(2) { min-width: 110px; }
.pn-lines-tbl td:nth-child(4) { min-width: 100px; }
.pn-recall { color: var(--blue-700); font-weight: 600; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: .2rem; border: 2px dashed var(--line); border-radius: var(--radius-sm); padding: 1rem; cursor: pointer; text-align: center; }
.dropzone.over { border-color: var(--brand-600); background: var(--brand-50); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 3px solid rgba(42, 82, 158, .25); }
.switch { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.pay-summary dd input { text-align: right; }
.pay-summary .pn-net { font-size: 1.15rem; padding-top: .4rem; border-top: 1px solid var(--line); }

/* Staff evaluations */
.c-red { color: var(--red-700); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.eval-section h2 { margin-top: 0; }
.eval-q { border: 0; border-top: 1px solid var(--line-2); margin: 0; padding: .7rem 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; }
.eval-q legend { float: left; padding: 0; font-weight: 500; }
.eval-section h2 + .eval-q { border-top: 0; }
.eval-n { color: var(--ink-3); font-weight: 700; margin-right: .2rem; }
.eval-opts { display: flex; gap: .35rem; }
.eval-opt { position: relative; cursor: pointer; }
.eval-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.eval-opt span { display: inline-block; min-width: 3.6rem; text-align: center; padding: .45em .8em; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 700; color: var(--ink-2); background: var(--card); }
.eval-opt input:focus-visible + span { outline: 3px solid rgba(42, 82, 158, .35); outline-offset: 2px; }
.eval-yes input:checked + span { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.eval-no input:checked + span { background: var(--red-700); border-color: var(--red-700); color: #fff; }
.eval-na input:checked + span { background: var(--ink-3); border-color: var(--ink-3); color: #fff; }
.eval-q.unanswered legend { color: var(--red-700); }
@media (max-width: 640px) { .eval-q { grid-template-columns: 1fr; } }
.eval-submitbar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 1rem; }
.eval-sec-row th { background: var(--brand-50); text-align: left; }
.eval-blocked { max-width: 560px; }
.eval-staff { margin-top: .5rem; }
.eval-staff li { padding: .35rem 0; border-top: 1px solid var(--line-2); }

/* Login slips */
.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.slip h2 { font-size: 1.05rem; margin-top: 0; }
.temp-pw { font-size: 1.05rem; letter-spacing: .03em; background: var(--brand-50); padding: .1em .4em; border-radius: 6px; }
.row-error td { background: var(--red-100); }
@media print { .slip { break-inside: avoid; box-shadow: none; border: 1px dashed #999; } .sidebar, .topbar, .no-print { display: none !important; } }
.row-muted td { opacity: .6; }
.users-table td { vertical-align: top; }
.users-table td:nth-child(3) { min-width: 190px; }
.users-table td:last-child { white-space: nowrap; }

/* Fee schedule */
.fee-cats { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .8rem; }
.fee-cats a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: .25em .75em; font-size: .85rem; color: var(--ink-2); background: var(--card); }
.fee-cats a.active, .fee-cats a:hover { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
.fee-group h2 { font-size: 1.1rem; }
.fee-edit[open] { min-width: 320px; }

/* Expense report */
.pill-radio { cursor: pointer; }
.pill-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-radio span { display: inline-block; padding: .45em 1em; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; background: var(--card); }
.pill-radio input:checked + span { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
.pill-radio input:focus-visible + span { outline: 3px solid rgba(42, 82, 158, .35); }
.exp-label { margin: 1rem 0 .5rem; }
.print-only { display: none; }
@media print { .print-only { display: block; } .card { box-shadow: none; break-inside: avoid; } }
.exp-cats summary { cursor: pointer; }
.exp-cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .1rem .8rem; margin-top: .4rem; }

/* Quotation editor */
.q-plan { border-top: 2px solid var(--brand-100); padding-top: .6rem; margin-top: .6rem; }
.q-plan:first-of-type { border-top: 0; margin-top: 0; }
.q-plan-name { margin: .2rem 0 .3rem; }
.q-sec { margin: .7rem 0 .2rem; font-size: .95rem; }
.q-free { color: var(--brand-700); text-transform: uppercase; letter-spacing: .05em; }
.q-table td { vertical-align: top; }
.q-opt td:first-child { padding-left: 1.2rem; }
.q-note { color: var(--red-700); text-transform: uppercase; font-weight: 700; font-size: .72rem; }
.q-plan-total { text-align: right; margin: .3rem 0; }
.q-actions { white-space: nowrap; }
.q-actions details[open] { min-width: 520px; white-space: normal; }
.inline-form { display: inline; }

/* Printed treatment plan quotation (clinic design) */
.tpq { max-width: 780px; margin: 0 auto; padding: 24px 28px 32px; background: #fff; color: #1d1d1f; font-family: "Poppins", var(--font); font-size: 13.5px; position: relative; }
.tpq-brand { text-align: center; }
.tpq-logo { display: inline-flex; align-items: center; gap: 12px; }
.tpq-bar { width: 3px; height: 46px; background: #111; }
.tpq-word { text-align: left; font-size: 25px; line-height: 1.05; letter-spacing: .14em; font-weight: 400; color: #1d1d1f; }
.tpq-tag { font-size: 10px; letter-spacing: .2em; margin-top: 4px; color: #333; }
.tpq-title { font-family: "Anton", Impact, "Arial Narrow", sans-serif; font-weight: 400; font-size: 40px; color: #0f2747; margin: 14px 0 6px; letter-spacing: .01em; }
.tpq-title span { color: #2c4568; }
.tpq-who { display: flex; justify-content: space-between; gap: 1rem; font-size: 17px; margin: 18px 24px 8px; }
.tpq-who span { margin-right: .5rem; }
.tpq-rule { border: 0; border-top: 1px solid #555; margin: 10px 24px 22px; }
.tpq-table { width: 100%; border-collapse: collapse; }
.tpq-table thead th { background: linear-gradient(90deg, #0f2747, #3a5576); color: #fff; font-weight: 700; font-size: 12.5px; text-transform: uppercase; padding: 9px 10px; text-align: center; line-height: 1.15; }
.tpq-table thead th.c-desc { text-align: left; padding-left: 20px; }
.tpq-table td { padding: 3px 10px; border: 0; vertical-align: top; }
.tpq-table td.c-desc { padding-left: 34px; }
.tpq-table td.c-tooth, .tpq-table td.c-units { text-align: center; }
.tpq-table .num { text-align: right; }
.tpq-plan td { font-weight: 700; font-size: 14.5px; padding-top: 14px; padding-left: 14px; }
.tpq-sec td { font-weight: 600; font-size: 14.5px; padding-top: 12px; padding-left: 14px; }
.tpq-disc-h { color: #e53935; font-weight: 700 !important; font-size: 12px !important; text-transform: uppercase; }
.tpq-opt td.c-desc { padding-left: 34px; }
.tpq-note { color: #e53935; font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.tpq-note-row td { padding-top: 0; padding-left: 34px; }
.tpq-free-h td { color: #1f3a66; font-weight: 700; font-size: 14px; padding-top: 14px; padding-left: 14px; }
.tpq-free td { font-size: 12.5px; padding-top: 1px; padding-bottom: 1px; }
.tpq-free-total td, .tpq-plan-total td { text-align: right; font-weight: 700; padding-top: 6px; }
.tpq-plan-total td { font-weight: 600; color: #0f2747; border-bottom: 1px solid #555; padding-bottom: 8px; }
.tpq-overall, .tpq-notes { text-align: right; margin: 10px 10px 0; }
.tpq-notes { text-align: left; white-space: pre-wrap; }
.tpq-foot { margin-top: 48px; }
.tpq-prepared { text-align: right; font-size: 15px; }
.tpq-fine { font-size: 9.5px; color: #777; margin-top: 18px; }
@media print { body { background: #fff; } .tpq { padding: 0; } @page { size: A4; margin: 12mm; } .tpq-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* quotation print refinements */
.tpq-table { table-layout: fixed; }
.tpq-table thead tr { background: linear-gradient(90deg, #0f2747 0%, #1f3a5f 55%, #3a5576 100%); }
.tpq-table thead th { background: transparent !important; }
.tpq-table th:nth-child(1) { width: 36%; } .tpq-table th:nth-child(2) { width: 24%; } .tpq-table th:nth-child(3) { width: 10%; }
.tpq-table th:nth-child(4) { width: 15%; } .tpq-table th:nth-child(5) { width: 15%; }
.tpq-table tbody tr, .tpq-table tbody tr:nth-child(even), .tpq-table tbody tr:hover { background: transparent !important; }
.tpq-table td.num { white-space: nowrap; }
.tpq-table td.c-tooth { overflow-wrap: anywhere; font-size: 12.5px; }
.tpq-title { font-family: "Anton", Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Narrow", sans-serif; }
@media print { .tpq-table thead tr { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.tpq-table td { background: transparent !important; }
.q-table td:first-child { min-width: 190px; overflow-wrap: anywhere; width: 100%; }
.q-table td.num { white-space: nowrap; }
.q-actions > form, .q-actions > details { display: inline-block; vertical-align: top; }
.q-actions details[open] { display: block; }
.q-actions { margin-top: .2rem; white-space: normal; }
.q-actions .btn-sm { padding: .1em .45em; font-size: .8rem; }
.q-actions details > summary { font-size: .8rem; cursor: pointer; color: var(--brand-700); display: inline-block; padding: .1em .45em; }
.q-actions details[open] { min-width: 0; }
.tpq-table td.tpq-disc-h { white-space: normal; line-height: 1.15; }
@media print { .demo-banner { display: none !important; } }

/* Website sections editor */
.ws-toc { display: flex; flex-wrap: wrap; gap: .4rem; padding: .8rem 1rem; margin-bottom: 1rem; }
.ws-toc a { padding: .25em .7em; border-radius: 999px; background: var(--blue-100, #eef3fb); font-size: .85rem; text-decoration: none; }
.ws-section { margin-bottom: 1rem; scroll-margin-top: 1rem; }
.ws-section .ws-wide { grid-column: 1 / -1; }
.ws-show { margin: .2rem 0 .8rem; }
.ws-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.ws-photo img, .ws-photo-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; background: #e9e4d6; }
.ws-photo-ph { position: relative; }
.ws-photo-ph img { opacity: .85; }
.ws-photo-ph .badge { position: absolute; left: 8px; top: 8px; }
.ws-photo strong { display: block; margin-top: .4rem; }
