/* Misha Orthodontics EMS — Liquid Glass theme (light & dark) */
:root {
  --accent: #6d5dfc; --accent-2: #19c3b3; --accent-soft: rgba(109, 93, 252, .12);
  --danger: #e5484d; --warn: #f5a524; --ok: #22b573; --info: #3b82f6;
  --bg: #eef0f7; --bg-solid: #ffffff; --text: #1b1d2a; --muted: #6b7088; --line: rgba(30, 35, 70, .10);
  --glass: rgba(255, 255, 255, .62); --glass-strong: rgba(255, 255, 255, .85); --glass-border: rgba(255, 255, 255, .75);
  --shadow: 0 10px 30px rgba(40, 40, 90, .10), 0 1px 2px rgba(40, 40, 90, .06);
  --radius: 18px; --radius-sm: 12px; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Gujarati", Roboto, Inter, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0d0f1a; --bg-solid: #171a29; --text: #eceefb; --muted: #9aa0bf; --line: rgba(255, 255, 255, .09);
  --glass: rgba(28, 31, 52, .58); --glass-strong: rgba(30, 33, 55, .92); --glass-border: rgba(255, 255, 255, .09);
  --shadow: 0 10px 30px rgba(0, 0, 0, .45); --accent-soft: rgba(139, 125, 255, .18); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-blobs i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.bg-blobs i:nth-child(1) { width: 520px; height: 520px; background: #a89bff; top: -160px; left: -120px; }
.bg-blobs i:nth-child(2) { width: 460px; height: 460px; background: #7fe7dc; bottom: -160px; right: -80px; }
.bg-blobs i:nth-child(3) { width: 380px; height: 380px; background: #ffc6e0; top: 40%; left: 45%; opacity: .35; }
[data-theme="dark"] .bg-blobs i { opacity: .22; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .4em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; } h4 { font-size: .92rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); } .small { font-size: .85em; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

/* glass surfaces */
.glass { background: var(--glass); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); border: 1px solid var(--glass-border); box-shadow: var(--shadow); border-radius: var(--radius); }
.card { background: var(--glass); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); border: 1px solid var(--glass-border); box-shadow: var(--shadow); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 14px; }
.grid > .card + .card, .kanban > .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; flex: 1; }

/* layout */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.brand .logo { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px; overflow: hidden; flex: none; }
.brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.brand b { display: block; font-size: 15px; } .brand span { font-size: 11.5px; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; color: var(--text); font-weight: 520; }
.nav a:hover { background: var(--accent-soft); }
.nav a.active { background: linear-gradient(135deg, var(--accent), #8b7dff); color: #fff; box-shadow: 0 6px 18px rgba(109, 93, 252, .35); }
.nav a .ic { width: 20px; text-align: center; font-size: 16px; }
.nav a .badge { margin-left: auto; }
.side .spacer { flex: 1; }
.side .me { padding: 10px; border-radius: 14px; background: var(--accent-soft); font-size: 13px; }
.main { padding: 22px 26px 80px; max-width: 1500px; width: 100%; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { margin: 0; flex: 1; }
.searchbox { position: relative; }
.searchbox input { width: 300px; padding-left: 34px; }
.searchbox::before { content: "⌕"; position: absolute; left: 12px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 18px; }
.search-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; max-height: 360px; overflow: auto; padding: 6px; background: var(--glass-strong); }
.search-pop .item { padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.search-pop .item:hover, .search-pop .item.sel { background: var(--accent-soft); }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.grow { flex: 1; }
.stat { padding: 16px 18px; }
.stat .v { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }

/* forms */
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 560; }
label.f.req > span::after { content: " *"; color: var(--danger); }
input, select, textarea { font: inherit; color: var(--text); background: var(--glass-strong); border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; outline: none; transition: border .15s, box-shadow .15s; min-width: 0; }
select option, select optgroup { background: var(--bg-solid); color: var(--text); } /* readable in dark theme */
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
.form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.form .full { grid-column: 1 / -1; } .form .span2 { grid-column: span 2; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--text); font-weight: 500; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--glass-strong); cursor: pointer; font-size: 13px; user-select: none; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; padding: 9px 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--text); cursor: pointer; transition: transform .08s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { box-shadow: 0 4px 14px rgba(60, 60, 120, .12); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #8b7dff); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(109, 93, 252, .3); }
.btn.teal { background: linear-gradient(135deg, #14b8a6, #19c3b3); color: #fff; border-color: transparent; }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.wa { background: #25d366; color: #fff; border-color: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 17px; padding: 4px 6px; border-radius: 8px; color: var(--muted); }
.icon-btn:hover { background: var(--accent-soft); color: var(--text); }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--accent-soft); }
table.t tr.dim td { opacity: .5; text-decoration: line-through; }

/* badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge.ok { background: rgba(34, 181, 115, .14); color: var(--ok); } .badge.warn { background: rgba(245, 165, 36, .16); color: #c27c00; }
.badge.danger { background: rgba(229, 72, 77, .14); color: var(--danger); } .badge.info { background: rgba(59, 130, 246, .14); color: var(--info); }
.badge.grey { background: var(--line); color: var(--muted); }
.alert-banner { display: flex; gap: 8px; align-items: center; background: rgba(229, 72, 77, .12); color: var(--danger); border: 1px solid rgba(229, 72, 77, .35); padding: 8px 12px; border-radius: 12px; font-weight: 600; }
.note { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 13.5px; }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-border); overflow-x: auto; margin-bottom: 14px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.tabs a { padding: 8px 14px; border-radius: 11px; color: var(--text); font-weight: 560; white-space: nowrap; }
.tabs a.active { background: var(--bg-solid); box-shadow: var(--shadow); color: var(--accent); }

/* patient header */
.phead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar { width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 700; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; border-radius: 11px; font-size: 14px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }

/* calendar */
.cal { display: grid; position: relative; overflow-x: auto; }
.cal-head { display: grid; position: sticky; top: 0; z-index: 2; }
.cal-col { position: relative; border-left: 1px solid var(--line); }
.cal-slot { height: 22px; border-top: 1px dashed var(--line); }
.cal-slot.hour { border-top: 1px solid var(--line); }
.cal-slot:hover { background: var(--accent-soft); cursor: copy; }
.cal-times div { height: 22px; font-size: 11px; color: var(--muted); padding-right: 6px; text-align: right; transform: translateY(-7px); }
.appt { position: absolute; left: 3px; right: 3px; border-radius: 10px; padding: 4px 7px; font-size: 12px; color: #fff; overflow: hidden; cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .15); border-left: 4px solid rgba(0, 0, 0, .2); line-height: 1.25; }
.appt.s-done { opacity: .55; } .appt.s-no_show { opacity: .45; text-decoration: line-through; } .appt.s-arrived { outline: 2px solid #ffd54a; } .appt.s-in_chair { outline: 2px solid #fff; box-shadow: 0 0 0 3px var(--ok); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 1; }

/* queue */
.qcard { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--line); }
.qcard + .qcard { margin-top: 8px; }
.qtime { font-weight: 700; font-size: 15px; min-width: 52px; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumb { position: relative; border-radius: 14px; overflow: hidden; background: var(--line); aspect-ratio: 4/3; cursor: pointer; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.thumb .ft { display: grid; place-items: center; height: 100%; font-size: 28px; }
.thumb.sel { outline: 3px solid var(--accent); }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(10, 12, 30, .35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 14px; z-index: 50; overflow-y: auto; animation: fade .15s; }
.modal { width: 100%; max-width: 640px; background: var(--glass-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border: 1px solid var(--glass-border); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); animation: pop .18s; }
.modal.wide { max-width: 960px; } .modal.xl { max-width: 1200px; }
.modal-h { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 10px; }
.modal-h h2 { margin: 0; flex: 1; }
.modal-b { padding: 18px 20px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0 } } @keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0 } }

#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 99; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 11px 16px; border-radius: 14px; background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow); border: 1px solid var(--glass-border); font-weight: 560; max-width: 380px; animation: pop .2s; color: var(--text); }
.toast.err { border-left: 4px solid var(--danger); } .toast.ok { border-left: 4px solid var(--ok); }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 400px; padding: 30px; }
.login .logo { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 800; overflow: hidden; }
.login .logo img { width: 100%; height: 100%; object-fit: cover; }

/* kanban for leads */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 10px; overflow-x: auto; }
.kcol { padding: 10px; min-height: 200px; }
.kcard { padding: 10px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line); margin-top: 8px; cursor: pointer; font-size: 13px; }
.kcard:hover { border-color: var(--accent); }

.sig-pad { width: 100%; height: 170px; border: 1.5px dashed var(--muted); border-radius: 12px; background: #fff; touch-action: none; }
.ceph-row input { width: 90px; }
.flag-hi { color: var(--danger); font-weight: 700; } .flag-lo { color: var(--info); font-weight: 700; }
.empty { text-align: center; padding: 30px; color: var(--muted); }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare img { width: 100%; border-radius: 12px; }
hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.mobile-nav { display: none; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 14px 12px 90px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .searchbox input { width: 100%; } .searchbox { flex: 1 1 100%; order: 3; }
  .mobile-nav { display: flex; position: fixed; bottom: 10px; left: 10px; right: 10px; z-index: 40; padding: 6px; justify-content: space-around; border-radius: 20px; background: var(--glass-strong); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: var(--shadow); border: 1px solid var(--glass-border); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; font-size: 10.5px; color: var(--muted); padding: 4px 8px; border-radius: 12px; }
  .mobile-nav a .ic { font-size: 19px; } .mobile-nav a.active { color: var(--accent); background: var(--accent-soft); }
  .form { grid-template-columns: 1fr 1fr; } .form .span2 { grid-column: 1 / -1; }
  .modal-back { padding: 0; } .modal { border-radius: 0; min-height: 100vh; max-width: none !important; }
  .kanban { grid-template-columns: repeat(6, 78vw); }
}

/* ---------------- printing ---------------- */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; color: #000; font-size: 11.5pt; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
}
.pr { font-family: "Segoe UI", "Noto Sans Gujarati", Arial, sans-serif; color: #000; }
.pr-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #6d5dfc; padding-bottom: 10px; margin-bottom: 12px; }
.pr-head img { height: 58px; } .pr-head .c { flex: 1; } .pr-head b { font-size: 18pt; color: #4b3fd1; } .pr-head .s { font-size: 9.5pt; color: #444; }
.pr-title { text-align: center; font-size: 14pt; font-weight: 700; margin: 6px 0 10px; letter-spacing: .03em; }
.pr-ids { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 20px; border: 1px solid #bbb; padding: 8px 10px; border-radius: 6px; font-size: 10.5pt; margin-bottom: 12px; }
.pr table { width: 100%; border-collapse: collapse; font-size: 10.5pt; }
.pr th, .pr td { border: 1px solid #bbb; padding: 5px 7px; text-align: left; }
.pr th { background: #f1effe; }
.pr .tot td { font-weight: 700; }
.pr .body { white-space: pre-wrap; font-size: 11pt; line-height: 1.55; }
.pr .sig { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 36px; gap: 20px; }
.pr .sig div { flex: 1; border-top: 1px solid #000; padding-top: 4px; font-size: 10pt; text-align: center; }
.pr .sig img { max-height: 60px; display: block; margin: 0 auto 4px; }
.pr .foot { margin-top: 18px; font-size: 8.5pt; color: #555; border-top: 1px solid #ccc; padding-top: 6px; display: flex; justify-content: space-between; }
.pr .page-break { page-break-after: always; }
.main, .grow, .phead > div { min-width: 0; }
.phead > .grow { flex: 1 1 220px; }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .topbar h1 { font-size: 1.25rem; flex: 1 1 auto; }
  #page-actions .btn { padding: 7px 11px; font-size: 13px; }
  .card { padding: 14px; }
  .tabs { margin-left: -2px; margin-right: -2px; }
  .main { overflow-x: hidden; }
}

/* v1.1+ : tooth chart */
.tchart { overflow-x: auto; padding: 6px 0; }
.trow { display: flex; gap: 4px; justify-content: center; min-width: max-content; }
.trow .tooth.mid { margin-right: 14px; }
.tmid { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; border-top: 2px solid var(--line); margin: 6px 0; padding-top: 2px; }
.tooth { width: 40px; cursor: pointer; text-align: center; }
.tcrown { height: 40px; border-radius: 10px 10px 14px 14px; border: 1.5px solid var(--line); background: var(--glass-strong); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.tooth:hover .tcrown { border-color: var(--accent); }
.tdots { height: 8px; display: flex; gap: 2px; justify-content: center; margin-top: 2px; } .tdots i { width: 7px; height: 7px; border-radius: 50%; }
/* ceph tracer */
.ceph-wrap { display: grid; grid-template-columns: 230px 1fr 250px; gap: 10px; }
.ceph-canvas { overflow: auto; max-height: 72vh; background: #000; border-radius: 12px; }
.ceph-list { max-height: 60vh; overflow: auto; margin-top: 6px; }
.lm { padding: 5px 8px; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
.lm:hover { background: var(--accent-soft); } .lm.cur { background: var(--accent); color: #fff; } .lm.done:not(.cur) { color: var(--ok); }
#cvals table.t td { padding: 4px 6px; }
@media (max-width: 1000px) { .ceph-wrap { grid-template-columns: 1fr; } .ceph-list { max-height: 160px; } }
/* phone calendar chair switch */
.chair-switch { display: none; }
@media (max-width: 820px) { .chair-switch { display: flex; margin-bottom: 8px; } }
.appt.s-requested { opacity: .8; outline: 2px dashed #fff; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.15) 0 8px, transparent 8px 16px); }
.chip.on .badge { background: rgba(255,255,255,.3); color: #fff; }

.cal-break { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, rgba(120,120,150,.10) 0 6px, transparent 6px 12px); color: var(--muted); font-size: 11px; padding: 2px 6px; pointer-events: none; }

.btn.pulse { box-shadow: 0 0 0 3px rgba(245,165,36,.45); }

/* =====================================================================
   1.6 — LIQUID GLASS THEME (overrides everything above)
   Translucent layered glass, specular rims, soft refraction, pill controls
   ===================================================================== */
:root {
  --lg-tint: rgba(255, 255, 255, .42);
  --lg-tint-2: rgba(255, 255, 255, .18);
  --lg-strong: rgba(255, 255, 255, .72);
  --lg-rim: rgba(255, 255, 255, .85);
  --lg-rim-2: rgba(255, 255, 255, .25);
  --lg-shadow: 0 1px 1px rgba(30, 30, 80, .04), 0 8px 24px rgba(40, 40, 110, .10), 0 24px 60px rgba(40, 40, 110, .08);
  --lg-blur: blur(28px) saturate(185%) brightness(1.04);
  --lg-radius: 26px;
  --bg: #e9ecf8;
}
[data-theme="dark"] {
  --lg-tint: rgba(38, 42, 70, .48);
  --lg-tint-2: rgba(25, 28, 48, .30);
  --lg-strong: rgba(34, 38, 64, .82);
  --lg-rim: rgba(255, 255, 255, .22);
  --lg-rim-2: rgba(255, 255, 255, .05);
  --lg-shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35), 0 30px 70px rgba(0, 0, 0, .3);
  --bg: #0a0c18;
}
body { background: var(--bg); }
.bg-blobs { background:
  radial-gradient(1200px 800px at 0% 0%, rgba(140, 120, 255, .40), transparent 60%),
  radial-gradient(900px 700px at 100% 100%, rgba(40, 210, 190, .35), transparent 60%),
  radial-gradient(800px 600px at 70% 10%, rgba(255, 170, 210, .30), transparent 60%),
  radial-gradient(700px 600px at 20% 90%, rgba(120, 190, 255, .30), transparent 60%); }
[data-theme="dark"] .bg-blobs { background:
  radial-gradient(1200px 800px at 0% 0%, rgba(110, 90, 255, .30), transparent 60%),
  radial-gradient(900px 700px at 100% 100%, rgba(20, 160, 150, .22), transparent 60%),
  radial-gradient(800px 600px at 70% 10%, rgba(200, 80, 160, .16), transparent 60%); }
.bg-blobs i { animation: drift 28s ease-in-out infinite alternate; }
.bg-blobs i:nth-child(2) { animation-duration: 34s; } .bg-blobs i:nth-child(3) { animation-duration: 40s; }
@keyframes drift { to { transform: translate(60px, -40px) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .bg-blobs i { animation: none; } }

/* the glass material */
.glass, .card, .side, .modal, .toast, .search-pop, .tabs, .kcol, .qcard, .mobile-nav, .topbar, .ch-bar, .ch-tabs {
  position: relative;
  background: linear-gradient(145deg, var(--lg-tint), var(--lg-tint-2));
  backdrop-filter: var(--lg-blur); -webkit-backdrop-filter: var(--lg-blur);
  border: 1px solid transparent;
  box-shadow: var(--lg-shadow), inset 0 1px 0 var(--lg-rim), inset 0 -1px 0 var(--lg-rim-2), inset 1px 0 0 var(--lg-rim-2), inset -1px 0 0 var(--lg-rim-2);
}
/* specular sheen on the top edge */
.card::before, .modal::before, .side::before, .ch-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .08) 18%, transparent 40%);
  mix-blend-mode: soft-light; opacity: .9;
}
[data-theme="dark"] .card::before, [data-theme="dark"] .modal::before, [data-theme="dark"] .side::before { opacity: .35; }
.card { border-radius: var(--lg-radius); padding: 20px; }
.card > * { position: relative; }

/* floating sidebar */
.shell { grid-template-columns: 262px 1fr; }
.side { margin: 14px 0 14px 14px; height: calc(100vh - 28px); top: 14px; border-radius: 30px; padding: 18px 12px; border-right: none; }
.nav a { border-radius: 999px; padding: 10px 14px; transition: background .2s, transform .15s; }
.nav a:hover { background: rgba(255, 255, 255, .35); }
[data-theme="dark"] .nav a:hover { background: rgba(255, 255, 255, .06); }
.nav a.active { background: linear-gradient(135deg, rgba(109, 93, 252, .92), rgba(139, 125, 255, .80)); box-shadow: 0 8px 20px rgba(109, 93, 252, .35), inset 0 1px 0 rgba(255, 255, 255, .55); }
.side .me { border-radius: 20px; background: rgba(255, 255, 255, .28); box-shadow: inset 0 1px 0 var(--lg-rim); }
[data-theme="dark"] .side .me { background: rgba(255, 255, 255, .05); }

/* sticky glass top bar */
.main { padding-top: 14px; }
.topbar { position: sticky; top: 14px; z-index: 20; border-radius: 999px; padding: 10px 12px 10px 22px; margin-bottom: 18px; }
.topbar h1 { font-size: 1.25rem; }

/* pill controls */
.btn { border-radius: 999px; padding: 9px 17px; background: linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .45)); border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 2px 8px rgba(40, 40, 110, .08), inset 0 1px 0 rgba(255, 255, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
[data-theme="dark"] .btn { background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05)); border-color: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); color: var(--text); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(40, 40, 110, .14), inset 0 1px 0 rgba(255, 255, 255, .9); }
.btn.primary { background: linear-gradient(180deg, rgba(128, 114, 255, .96), rgba(98, 82, 245, .92)); border-color: rgba(255, 255, 255, .35); color: #fff; box-shadow: 0 8px 22px rgba(109, 93, 252, .38), inset 0 1px 0 rgba(255, 255, 255, .55); }
.btn.teal { background: linear-gradient(180deg, rgba(36, 214, 196, .95), rgba(18, 180, 166, .92)); border-color: rgba(255, 255, 255, .35); box-shadow: 0 8px 20px rgba(25, 195, 179, .32), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.wa { background: linear-gradient(180deg, rgba(60, 220, 120, .96), rgba(33, 190, 95, .92)); border-color: rgba(255, 255, 255, .35); box-shadow: 0 8px 20px rgba(37, 211, 102, .3), inset 0 1px 0 rgba(255, 255, 255, .5); color: #fff; }
.btn.danger { background: linear-gradient(180deg, rgba(240, 90, 95, .96), rgba(215, 60, 66, .92)); border-color: rgba(255, 255, 255, .3); color: #fff; box-shadow: 0 8px 20px rgba(229, 72, 77, .3), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.sm { padding: 6px 12px; }

input, select, textarea { border-radius: 14px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .7); box-shadow: inset 0 1px 2px rgba(30, 30, 80, .06); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
input:focus, select:focus, textarea:focus { background: rgba(255, 255, 255, .8); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(109, 93, 252, .18); }
[data-theme="dark"] input:focus, [data-theme="dark"] select:focus, [data-theme="dark"] textarea:focus { background: rgba(255, 255, 255, .1); }
.searchbox input { border-radius: 999px; }

/* segmented tabs */
.tabs { border-radius: 999px; padding: 5px; }
.tabs a { border-radius: 999px; transition: background .2s, color .2s; }
.tabs a.active { background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .7)); box-shadow: 0 4px 12px rgba(40, 40, 110, .12), inset 0 1px 0 #fff; }
[data-theme="dark"] .tabs a.active { background: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); color: #fff; }

/* chips, badges */
.chip { border-radius: 999px; background: rgba(255, 255, 255, .5); border-color: rgba(255, 255, 255, .7); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); }
[data-theme="dark"] .chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); box-shadow: none; }
.chip.on { background: linear-gradient(180deg, rgba(128, 114, 255, .95), rgba(98, 82, 245, .9)); box-shadow: 0 4px 12px rgba(109, 93, 252, .3), inset 0 1px 0 rgba(255, 255, 255, .5); }
.badge { backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }

/* tables on glass */
table.t th { border-bottom-color: rgba(255, 255, 255, .5); }
[data-theme="dark"] table.t th { border-bottom-color: rgba(255, 255, 255, .08); }
table.t td { border-bottom-color: rgba(120, 120, 170, .12); }
table.t tr.click:hover td { background: rgba(255, 255, 255, .35); }
[data-theme="dark"] table.t tr.click:hover td { background: rgba(255, 255, 255, .05); }

/* modal = thick glass sheet */
.modal-back { background: rgba(20, 20, 50, .22); backdrop-filter: blur(6px) saturate(120%); -webkit-backdrop-filter: blur(6px) saturate(120%); }
.modal { border-radius: 30px; background: linear-gradient(150deg, var(--lg-strong), var(--lg-tint)); }
.modal-h, .modal-f { border-color: rgba(255, 255, 255, .4); }
[data-theme="dark"] .modal-h, [data-theme="dark"] .modal-f { border-color: rgba(255, 255, 255, .07); }
.toast { border-radius: 18px; }
.qcard { border-radius: 20px; }
.kcard, .note, .thumb { border-radius: 16px; }
.note { background: rgba(255, 255, 255, .38); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
[data-theme="dark"] .note { background: rgba(255, 255, 255, .05); box-shadow: none; }
.alert-banner { border-radius: 16px; background: linear-gradient(180deg, rgba(255, 90, 95, .16), rgba(255, 90, 95, .08)); backdrop-filter: blur(10px); }
.stat .v { background: linear-gradient(135deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.progress { background: rgba(120, 120, 170, .15); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06); }
.progress > i { box-shadow: 0 0 12px rgba(109, 93, 252, .45); }
.login { border-radius: 34px; }
.mobile-nav { border-radius: 26px; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: rgba(120, 120, 170, .3); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
@media (max-width: 820px) { .side { display: none; } .topbar { border-radius: 22px; top: 8px; } .modal { border-radius: 0; } }
/* Fallback when the browser has no backdrop-filter: keep text readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card, .side, .modal, .tabs, .qcard, .topbar { background: var(--bg-solid); }
}

/* =====================================================================
   CHAIR SCREEN (touch)
   ===================================================================== */
body.chair-mode { font-size: 17px; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
body.chair-mode input, body.chair-mode textarea { user-select: text; -webkit-user-select: text; }
.ch-wrap { padding: 16px 20px 40px; max-width: 1500px; margin: 0 auto; }
.ch-lock { min-height: 100vh; padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.ch-lock-top { position: absolute; top: 24px; left: 28px; right: 28px; display: flex; justify-content: space-between; align-items: center; }
.ch-h { text-align: center; font-size: 1.8rem; margin: 10px 0 24px; }
.ch-brand { display: flex; align-items: center; gap: 12px; }
.ch-brand .logo, .ch-brand .avatar { width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; overflow: hidden; flex: none; }
.ch-brand .logo img, .ch-brand .avatar img { width: 100%; height: 100%; object-fit: cover; }
.ch-brand b { display: block; font-size: 1.15rem; } .ch-brand span { color: var(--muted); font-size: .9rem; }
.ch-clock { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ch-users { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.ch-user { width: 190px; padding: 22px 14px; border-radius: 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font: inherit; color: var(--text); border: none; transition: transform .12s; }
.ch-user:active { transform: scale(.96); }
.ch-user .avatar { width: 76px; height: 76px; border-radius: 26px; font-size: 30px; }
.ch-user small { color: var(--muted); text-transform: capitalize; }
.modal.pin { max-width: 380px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 4px 0 20px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); transition: background .15s; }
.pin-dots i.on { background: var(--accent); box-shadow: 0 0 10px rgba(109, 93, 252, .6); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-key { height: 72px; border-radius: 24px; font: 600 26px var(--font); color: var(--text); border: 1px solid rgba(255, 255, 255, .7); background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .45)); box-shadow: 0 3px 10px rgba(40, 40, 110, .1), inset 0 1px 0 #fff; cursor: pointer; }
[data-theme="dark"] .pin-key { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.pin-key:active { transform: scale(.95); }
.pin-key.ok { background: linear-gradient(180deg, rgba(128, 114, 255, .96), rgba(98, 82, 245, .92)); color: #fff; }
.modal.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.ch-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 28px; margin-bottom: 16px; position: sticky; top: 10px; z-index: 10; flex-wrap: wrap; }
.ch-chip { border: none; border-radius: 999px; padding: 12px 18px; font: 600 16px var(--font); color: var(--text); cursor: pointer; }
.ch-chip.primary { background: linear-gradient(180deg, rgba(128, 114, 255, .96), rgba(98, 82, 245, .92)); color: #fff; }
.ch-seg { display: flex; padding: 4px; border-radius: 999px; }
.ch-seg button { border: none; background: none; font: 600 15px var(--font); color: var(--text); padding: 10px 16px; border-radius: 999px; cursor: pointer; }
.ch-seg button.on { background: rgba(255, 255, 255, .85); box-shadow: 0 3px 10px rgba(40, 40, 110, .12); }
[data-theme="dark"] .ch-seg button.on { background: rgba(255, 255, 255, .14); }
.ch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.ch-appt { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 26px; border: none; text-align: left; font: inherit; color: var(--text); cursor: pointer; min-height: 96px; transition: transform .12s; }
.ch-appt:active { transform: scale(.98); }
.ch-appt.s-in_chair { box-shadow: var(--lg-shadow), 0 0 0 3px var(--ok); } .ch-appt.s-arrived { box-shadow: var(--lg-shadow), 0 0 0 3px var(--warn); } .ch-appt.s-done { opacity: .55; }
.ch-time { font-size: 1.3rem; font-weight: 800; min-width: 92px; }
.ch-who { flex: 1; display: flex; flex-direction: column; gap: 3px; } .ch-who b { font-size: 1.2rem; } .ch-who span { color: var(--muted); } .ch-who em { color: var(--danger); font-style: normal; font-weight: 700; font-size: .92rem; }
.ch-empty { padding: 50px; text-align: center; border-radius: 28px; color: var(--muted); grid-column: 1 / -1; }
.ch-alert { font-size: 1.15rem; padding: 14px 18px; margin-bottom: 14px; }
.ch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.ch-card { padding: 20px; border-radius: 26px; position: relative; }
.ch-card h3 { margin: 14px 0 8px; } .ch-card h3:first-child { margin-top: 0; }
.ch-big { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.ch-pill { display: inline-block; margin-top: 10px; padding: 8px 14px; border-radius: 999px; background: rgba(109, 93, 252, .12); font-weight: 600; }
.ch-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; } .ch-kv span { color: var(--muted); }
.ch-tabs { display: flex; gap: 6px; padding: 6px; border-radius: 999px; margin-bottom: 14px; overflow-x: auto; }
.ch-tabs button { border: none; background: none; font: 600 16px var(--font); color: var(--text); padding: 12px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.ch-tabs button.on { background: linear-gradient(180deg, rgba(128, 114, 255, .96), rgba(98, 82, 245, .92)); color: #fff; box-shadow: 0 6px 16px rgba(109, 93, 252, .35); }
.ch-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ch-c { border: 1px solid rgba(255, 255, 255, .7); background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .45)); border-radius: 999px; padding: 13px 18px; font: 600 16px var(--font); color: var(--text); cursor: pointer; min-height: 50px; box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(40, 40, 110, .06); }
[data-theme="dark"] .ch-c { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); box-shadow: none; }
.ch-c.on { background: linear-gradient(180deg, rgba(128, 114, 255, .96), rgba(98, 82, 245, .92)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(109, 93, 252, .35); }
.ch-c.cam.on { background: linear-gradient(180deg, rgba(36, 214, 196, .95), rgba(18, 180, 166, .92)); color: #fff; }
.ch-num { width: 110px; font-size: 22px; padding: 12px; text-align: center; }
.ch-sel { font-size: 16px; padding: 10px 14px; }
.ch-done { font-size: 19px; padding: 16px 30px; }
.ch-hist { padding: 12px 0; border-bottom: 1px solid rgba(120, 120, 170, .15); }
.ch-pv { position: fixed; inset: 0; z-index: 200; overflow: auto; background: var(--bg); }
.ch-pv::before { content: ""; position: fixed; inset: 0; background: radial-gradient(900px 600px at 10% 0%, rgba(140, 120, 255, .35), transparent 60%), radial-gradient(800px 600px at 100% 100%, rgba(40, 210, 190, .3), transparent 60%); z-index: -1; }
.ch-pv-in { max-width: 1100px; margin: 0 auto; padding: 30px 20px; }
.ch-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.ch-ba img { width: 100%; border-radius: 18px; aspect-ratio: 4/3; object-fit: cover; } .ch-ba span { display: block; text-align: center; margin-top: 6px; color: var(--muted); }
@media (max-width: 900px) { .ch-grid { grid-template-columns: 1fr; } .ch-list { grid-template-columns: 1fr; } }
input[type=color] { width: 48px; height: 34px; padding: 3px; border-radius: 12px; cursor: pointer; background: rgba(255,255,255,.6); }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } input[type=color]::-webkit-color-swatch { border: none; border-radius: 9px; }
input[type=checkbox], input[type=radio] { padding: 0; box-shadow: none; backdrop-filter: none; }

/* =====================================================================
   1.7 — PRINT: black-and-white design, letterhead-aware
   ===================================================================== */
.pr { font-family: "Segoe UI", "Noto Sans Gujarati", "Nirmala UI", Arial, sans-serif; color: #000; font-size: 10.5pt; line-height: 1.4; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pr * { color: #000; box-sizing: border-box; }
.pr.grey img:not([src^="data:"]) { filter: grayscale(1) contrast(1.08); }
.pr-bg { position: fixed; top: 0; left: 0; width: 210mm; height: 297mm; z-index: -1; }
.pr-frame { width: 100%; border-collapse: collapse; } .pr-frame > thead > tr > td, .pr-frame > tfoot > tr > td { padding: 0; border: 0; } .pr-frame > tbody > tr > td { border: 0; }
.bw-clinic { display: flex; gap: 12px; align-items: center; border-bottom: 1pt solid #000; padding-bottom: 8px; margin-bottom: 10px; }
.bw-clinic img { height: 54px; filter: grayscale(1); } .bw-clinic b { display: block; font-size: 17pt; } .bw-clinic span { display: block; font-size: 9pt; }
.bw-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; border-bottom: 2.5pt solid #000; padding-bottom: 5px; margin-bottom: 10px; }
.bw-title h1 { font-size: 16pt; letter-spacing: .09em; text-transform: uppercase; margin: 0; font-weight: 800; }
.bw-meta { text-align: right; font-size: 9.5pt; white-space: nowrap; } .bw-meta span { text-transform: uppercase; font-size: 7.5pt; letter-spacing: .06em; }
.bw-id { display: grid; grid-template-columns: repeat(4, 1fr); border: 1pt solid #000; margin-bottom: 12px; }
.bw-id > div { padding: 5px 8px; border-right: .5pt solid #000; border-bottom: .5pt solid #000; min-width: 0; } .bw-id > div:nth-child(4n) { border-right: 0; }
.bw-id > div:nth-last-child(-n+4):nth-child(4n+1), .bw-id > div:nth-last-child(-n+4):nth-child(4n+1) ~ div { border-bottom: 0; }
.bw-id > div:last-child:nth-child(4n+1) { grid-column: 1 / -1; border-right: 0; }
.bw-id span, .bw-lab { display: block; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; margin-bottom: 2px; }
.bw-id b { font-size: 10.5pt; overflow-wrap: anywhere; }
.pr table.bw-t { width: 100%; border-collapse: collapse; font-size: 10pt; }
.pr table.bw-t th { border: 0; border-top: 1.5pt solid #000; border-bottom: 1.5pt solid #000; background: none; text-align: left; padding: 5px 6px; font-size: 8pt; text-transform: uppercase; letter-spacing: .05em; }
.pr table.bw-t td { border: 0; border-bottom: .5pt solid #888; padding: 5px 6px; vertical-align: top; }
.pr table.bw-t tbody tr:nth-child(even) td { background: #f3f3f3; }
.pr table.bw-t tfoot td { border-bottom: 0; padding: 4px 6px; } .pr table.bw-t tr.tot td { border-top: 1.5pt solid #000; border-bottom: 1.5pt solid #000; font-weight: 800; font-size: 12pt; }
.pr .r { text-align: right; }
.pr table.bw-kv { width: 100%; border-collapse: collapse; } .pr table.bw-kv td { border: 0; padding: 2px 0; }
.bw-box { border: 1.2pt solid #000; padding: 8px 12px; } .bw-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bw-hatch { background: repeating-linear-gradient(45deg, #bbb 0 1px, #fff 1px 5px); }
.bw-big { font-size: 22pt; font-weight: 800; line-height: 1.1; } .bw-big small { font-size: 10pt; font-weight: 400; }
.bw-amount { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; border: 2pt solid #000; padding: 12px 14px; align-items: center; }
.bw-barrow { display: flex; align-items: center; gap: 8px; margin: 6px 0; } .bw-barrow span { font-size: 9pt; white-space: nowrap; }
.bw-bar { flex: 1; height: 10px; border: 1pt solid #000; background: repeating-linear-gradient(45deg, #ccc 0 1px, #fff 1px 4px); } .bw-bar i { display: block; height: 100%; background: #000; }
.bw-steps { display: flex; margin: 8px 0 4px; } .bw-steps > div { flex: 1; text-align: center; position: relative; font-size: 9pt; }
.bw-steps > div::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; border-top: 1.5pt solid #000; } .bw-steps > div:first-child::before { display: none; }
.bw-steps i { display: block; width: 17px; height: 17px; border-radius: 50%; border: 1.5pt solid #000; background: #fff; margin: 0 auto 3px; position: relative; z-index: 1; }
.bw-steps .on i { background: #000; } .bw-steps .warn i { background: repeating-linear-gradient(45deg, #000 0 2px, #fff 2px 4px); }
.bw-steps b { display: block; } .bw-steps span { display: block; font-size: 8pt; }
.bw-legend { font-size: 8pt; margin-top: 4px; } .bw-tiny { font-size: 7.5pt; }
.bw-note { font-size: 8.5pt; border-left: 3pt solid #000; padding: 4px 10px; margin-top: 12px; }
.bw-check { margin-top: 12px; font-size: 11pt; }
.bw-body { white-space: pre-wrap; font-size: 10.5pt; line-height: 1.55; }
.bw-list > div { display: flex; gap: 10px; padding: 7px 0; border-bottom: .5pt solid #888; font-size: 11.5pt; }
.bw-list i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #000; color: #fff !important; font-style: normal; font-weight: 700; font-size: 10pt; display: grid; place-items: center; }
.bw-sig { display: flex; gap: 18px; margin-top: 22px; page-break-inside: avoid; } .bw-sig > div { flex: 1; text-align: center; font-size: 9pt; }
.bw-sigbox { height: 20mm; border-bottom: 1pt solid #000; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 3px; } .bw-sigbox img { max-height: 19mm; max-width: 100%; }
.bw-sig b { display: block; min-height: 1.2em; } .bw-sig span { text-transform: uppercase; font-size: 7.5pt; letter-spacing: .06em; }
.bw-foot { margin-top: 12px; padding-top: 4px; border-top: .5pt solid #888; display: flex; justify-content: space-between; font-size: 7.5pt; }
.bw-rx { font-size: 26pt; font-family: Georgia, serif; line-height: 1; margin: 2px 0 6px; }
.bw-dose { display: inline-flex; gap: 3px; } .bw-dose i { width: 17px; height: 17px; border-radius: 50%; border: 1.2pt solid #000; font-style: normal; font-size: 8pt; font-weight: 700; display: grid; place-items: center; }
.bw-dose i.on { background: #000; color: #fff !important; } .bw-sos { border: 1pt dashed #000; padding: 1px 6px; font-size: 8.5pt; }
.bw-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: .5pt solid #888; } .bw-grid > div { display: grid; grid-template-columns: 34mm 1fr; gap: 6px; padding: 3px 4px; border-bottom: .5pt solid #888; font-size: 9.5pt; } .bw-grid span { font-size: 8pt; text-transform: uppercase; }
.bw-teeth .row { display: flex; justify-content: center; gap: 2px; } .bw-teeth .row:first-child { border-bottom: 1.5pt solid #000; padding-bottom: 2px; margin-bottom: 2px; }
.bw-teeth .row > div { width: 9.6mm; text-align: center; } .bw-teeth .row > div.mid { margin-right: 4mm; }
.bw-teeth span { display: block; font-size: 7.5pt; font-weight: 700; } .bw-teeth i { display: grid; place-items: center; height: 10mm; border: .8pt solid #000; font-style: normal; font-size: 6.5pt; font-weight: 700; line-height: 1.05; }
.bw-teeth i.has { border-width: 1.6pt; } .bw-teeth i.gone { background: repeating-linear-gradient(45deg, #999 0 1px, #fff 1px 4px); }
.bw-norm { position: relative; height: 10px; border-bottom: 1pt solid #000; margin-top: 3px; } .bw-norm .band { position: absolute; left: 33.3%; width: 33.4%; top: 2px; bottom: 0; background: #bbb; }
.bw-norm .dot { position: absolute; top: -1px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #000; }
.bw-hyg { display: flex; gap: 10px; margin-top: 4px; } .bw-hyg > div { text-align: center; font-size: 8pt; } .bw-hyg i { display: block; width: 16px; height: 16px; border-radius: 50%; border: 1.4pt solid #000; margin: 0 auto 2px; }
.bw-hyg i.good { background: #000; } .bw-hyg i.fair { background: linear-gradient(90deg, #000 50%, #fff 50%); }
.bw-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; page-break-inside: avoid; } .bw-pair img { width: 100%; height: 58mm; object-fit: cover; border: .8pt solid #000; } .bw-pair span { font-size: 8.5pt; }
.bw-opts { display: grid; gap: 8px; } .bw-opts.n2 { grid-template-columns: 1fr 1fr; } .bw-opts.n3 { grid-template-columns: 1fr 1fr 1fr; }
.bw-opts > div { border: 1pt solid #000; padding: 10px; page-break-inside: avoid; } .bw-opts > div.rec { border-width: 3pt; } .bw-opts h3 { font-size: 13pt; margin: 2px 0 6px; }
.bw-optno { font-size: 8pt; text-transform: uppercase; letter-spacing: .06em; } .bw-pt { font-size: 9.5pt; padding: 1px 0; }
.bw-fee { margin-top: 10px; border-top: 1.5pt solid #000; padding-top: 5px; display: flex; justify-content: space-between; align-items: baseline; } .bw-fee b { font-size: 15pt; } .bw-fee span { font-size: 8pt; text-transform: uppercase; }
.bw-card { width: 86mm; border: 1.5pt solid #000; padding: 10px 12px; } .bw-card > b { font-size: 12pt; display: block; } .bw-card hr { border: 0; border-top: 1pt solid #000; margin: 6px 0; }
/* treatment options */
.po-grid { display: grid; gap: 10px; } .po-grid.n2 { grid-template-columns: 1fr 1fr; } .po-grid.n3 { grid-template-columns: 1fr 1fr 1fr; }
.po-card { padding: 14px; border-radius: 20px; } .po-card.rec, .po-big.rec { box-shadow: var(--lg-shadow), 0 0 0 3px var(--accent); } .po-card.chosen, .po-big.chosen { box-shadow: var(--lg-shadow), 0 0 0 3px var(--ok); }
.po-show { display: grid; gap: 18px; } .po-show.n2 { grid-template-columns: 1fr 1fr; } .po-show.n3 { grid-template-columns: 1fr 1fr 1fr; }
.po-big { padding: 26px; border-radius: 30px; position: relative; display: flex; flex-direction: column; } .po-big h2 { font-size: 1.7rem; margin: 2px 0 10px; } .po-big h4 { margin: 16px 0 6px; }
.po-num { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; } .po-num small { font-size: 1.1rem; font-weight: 500; }
.po-pt { font-size: 1.08rem; padding: 3px 0; } .po-rib { position: absolute; top: -13px; left: 24px; background: var(--accent); color: #fff; padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.po-fee { margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); } .po-fee b { font-size: 1.9rem; } .po-fee { margin-bottom: 12px; }
.po-pick { font-size: 18px; padding: 14px; }
@media (max-width: 900px) { .po-show, .po-grid { grid-template-columns: 1fr !important; } }

/* =====================================================================
   1.7.1 — smooth switching: sliding glass pill + page transition
   ===================================================================== */
.seg:not(.mobile-nav) { position: relative; }   /* the phone bar must stay fixed to the screen */
.seg > a, .seg > button { position: relative; z-index: 1; transition: color .25s ease; }
.seg-ind { position: absolute; z-index: 0; left: 0; top: 5px; bottom: 5px; width: 0; border-radius: 999px; opacity: 0; pointer-events: none;
  transform-origin: left center; will-change: transform;
  transition: transform .44s cubic-bezier(.32, .72, 0, 1), opacity .25s ease; }
.seg-ind.v { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 0; transform-origin: center top; }
/* sub-menu strips */
.tabs .seg-ind { background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .72)); box-shadow: 0 4px 12px rgba(40, 40, 110, .14), inset 0 1px 0 #fff; }
[data-theme="dark"] .tabs .seg-ind { background: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.tabs.seg > a.active { background: none; box-shadow: none; }
.tabs { scroll-behavior: smooth; }
.tabs::-webkit-scrollbar, .ch-tabs::-webkit-scrollbar { height: 4px; }
.tabs::-webkit-scrollbar-thumb, .ch-tabs::-webkit-scrollbar-thumb { background: rgba(120, 120, 170, .25); border: 0; }
/* sidebar menu */
.nav .seg-ind { left: 0; right: 0; background: linear-gradient(135deg, rgba(109, 93, 252, .92), rgba(139, 125, 255, .80)); box-shadow: 0 8px 20px rgba(109, 93, 252, .35), inset 0 1px 0 rgba(255, 255, 255, .55); }
.nav.seg a.active { background: none; box-shadow: none; }
.nav.seg a:hover:not(.active) { background: rgba(255, 255, 255, .35); }
/* chair screen */
.ch-tabs .seg-ind { top: 6px; bottom: 6px; background: linear-gradient(180deg, rgba(128, 114, 255, .96), rgba(98, 82, 245, .92)); box-shadow: 0 6px 16px rgba(109, 93, 252, .35); }
.ch-tabs.seg > button.on { background: none; box-shadow: none; color: #fff; }
.ch-seg .seg-ind { top: 4px; bottom: 4px; background: rgba(255, 255, 255, .88); box-shadow: 0 3px 10px rgba(40, 40, 110, .12); }
[data-theme="dark"] .ch-seg .seg-ind { background: rgba(255, 255, 255, .15); }
.ch-seg.seg > button.on { background: none; box-shadow: none; }
.mobile-nav .seg-ind { top: 6px; bottom: 6px; background: var(--accent-soft); }
.mobile-nav.seg a.active { background: none; }
/* new page content eases in; the sub-menu above it stays still */
@keyframes pgIn { from { opacity: 0; transform: translateY(10px) scale(.994); } to { opacity: 1; transform: none; } }
#page.pg-in > *:not(.tabs) { animation: pgIn .3s cubic-bezier(.32, .72, 0, 1) both; }
/* thin loading bar while the next screen is fetched */
#nav-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .25s ease; overflow: hidden; }
#nav-progress::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; border-radius: 999px; background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent); transform: translateX(-110%); }
#nav-progress.on { opacity: 1; } #nav-progress.on::before { animation: navSlide 1.05s cubic-bezier(.45, 0, .25, 1) infinite; }
@keyframes navSlide { to { transform: translateX(380%); } }
@media (prefers-reduced-motion: reduce) {
  .seg-ind { transition: opacity .2s ease !important; }
  #page.pg-in > *:not(.tabs) { animation: none !important; }
  #nav-progress.on::before { animation: none; transform: none; width: 100%; opacity: .45; }
  .tabs { scroll-behavior: auto; }
}

/* =====================================================================
   1.8 — GRAPHICS (icons, rings, charts, motion) — work in every theme
   ===================================================================== */
:root { --accent-3: #ff7ac3; --g-track: rgba(120, 120, 170, .16); --grad: linear-gradient(135deg, var(--accent), var(--accent-2)); }
[data-theme="dark"] { --g-track: rgba(255, 255, 255, .10); }
.gi { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.24em; }
.nav a .ic .gi, .mobile-nav a .ic .gi { width: 20px; height: 20px; }
.card-head h2 .gi, .card-head h3 .gi { color: var(--accent); margin-right: 6px; }
.g-ring { flex: none; overflow: visible; }
.g-arc { animation: gArc 1.1s cubic-bezier(.22, 1, .36, 1) .1s forwards; filter: drop-shadow(0 0 5px color-mix(in srgb, currentColor 0%, var(--g-glow, transparent))); }
@keyframes gArc { to { stroke-dashoffset: var(--to); } }
.g-ring-t { fill: var(--text); font-weight: 700; letter-spacing: -.02em; } .g-ring-s { fill: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.g-seg { opacity: 0; animation: gFade .6s ease forwards; } @keyframes gFade { to { opacity: 1; } }
.g-donut { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.g-legend { display: grid; gap: 7px; font-size: 13px; flex: 1; min-width: 150px; } .g-legend > div { display: flex; align-items: center; gap: 8px; } .g-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.g-legend span { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .g-legend b { font-variant-numeric: tabular-nums; }
.g-area { display: block; width: 100%; } .g-grid { stroke: var(--g-track); stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.g-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: gDraw 1.3s cubic-bezier(.22, 1, .36, 1) .1s forwards; } @keyframes gDraw { to { stroke-dashoffset: 0; } }
.g-fill { opacity: 0; animation: gFade .9s ease .5s forwards; }
.g-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.g-bars { display: flex; align-items: stretch; gap: 6px; } .g-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.g-bar i { display: block; width: 100%; max-width: 30px; border-radius: 7px 7px 3px 3px; transform-origin: bottom; animation: gGrow .7s cubic-bezier(.22, 1, .36, 1) backwards; opacity: .55; } .g-bar.hi i { opacity: 1; box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 55%, transparent); }
@keyframes gGrow { from { transform: scaleY(0); } }
.g-bar b { font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; } .g-bar span { font-size: 10.5px; color: var(--muted); white-space: nowrap; } .g-bar.hi span { color: var(--text); font-weight: 700; }
.g-hbars { display: grid; gap: 9px; font-size: 13px; } .g-hbars > div { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; }
.g-hbars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .g-hbars em { height: 9px; border-radius: 99px; background: var(--g-track); overflow: hidden; } .g-hbars i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: gWide .8s cubic-bezier(.22, 1, .36, 1) backwards; } @keyframes gWide { from { transform: scaleX(0); } }
.g-hbars b { font-variant-numeric: tabular-nums; }
.g-empty { color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; }
/* card hover lift + number glow */
.card.lift { transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s; } .card.lift:hover { transform: translateY(-3px); }

/* ---- command centre ---- */
.cc-k { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cc-kpi { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--text); min-width: 0; }
.cc-kpi > div { min-width: 0; } .cc-kpi .l { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.cc-kpi .v { font-size: 1.65rem; font-weight: 720; letter-spacing: -.025em; line-height: 1.15; white-space: nowrap; } .cc-kpi .s { font-size: 12.5px; color: var(--accent); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-g { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; } .cc-g > div { display: grid; gap: 14px; align-content: start; } .cc-g .card + .card { margin-top: 0; }
.cc-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; } .cc-h h3 { margin: 0; flex: 1; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 7px; } .cc-h h3 .gi { color: var(--accent); }
.cc-live { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); display: inline-flex; align-items: center; gap: 6px; } .cc-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.cc-tl { display: grid; grid-template-columns: minmax(64px, auto) 1fr; gap: 10px 12px; align-items: center; font-size: 13px; } .cc-tl > span { color: var(--muted); font-weight: 600; white-space: nowrap; }
.cc-lane { position: relative; height: 36px; border-radius: 11px; background: var(--g-track); overflow: hidden; }
.cc-brk { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, transparent 0 5px, var(--g-track) 5px 10px); }
.cc-bk { position: absolute; top: 3px; bottom: 3px; border-radius: 8px; padding: 0 9px; font-size: 11.5px; font-weight: 650; display: flex; align-items: center; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; background: var(--grad); animation: gWide .6s cubic-bezier(.22, 1, .36, 1) backwards; transform-origin: left; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.cc-bk.done { opacity: .5; } .cc-bk.in_chair { background: linear-gradient(135deg, var(--accent-3), var(--accent)); box-shadow: 0 0 14px color-mix(in srgb, var(--accent-3) 60%, transparent); } .cc-bk.arrived { background: linear-gradient(135deg, var(--accent-2), var(--info)); } .cc-bk.no_show { background: repeating-linear-gradient(135deg, var(--danger) 0 6px, color-mix(in srgb, var(--danger) 70%, #000) 6px 12px); opacity: .7; }
.cc-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); z-index: 2; pointer-events: none; }
.cc-hours { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 600; }
.cc-key { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 10px; } .cc-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cc-big { font-size: 1.5rem; font-weight: 720; letter-spacing: -.02em; } .cc-delta { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); } .cc-delta.down { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.cc-pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; } .cc-pipe div { padding: 10px 4px; border-radius: 14px; background: var(--g-track); } .cc-pipe b { display: block; font-size: 1.3rem; font-weight: 720; } .cc-pipe span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
@media (max-width: 1100px) { .cc-k { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cc-g { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cc-k { grid-template-columns: 1fr; } }

/* ---- patient journey ---- */
.jr-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; } .jr-hero .grow { min-width: 220px; }
.jr-hero h2 { margin: 0 0 2px; } .jr-facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; } .jr-facts div { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; } .jr-facts b { display: block; font-size: 1.05rem; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 700; }
.jr-steps { display: flex; margin: 26px 0 6px; overflow-x: auto; padding-bottom: 6px; }
.jr-st { flex: 1; min-width: 104px; text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; position: relative; padding: 0 4px; }
.jr-st u { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 9px; border: 2px solid var(--g-track); background: var(--bg-solid); position: relative; z-index: 1; text-decoration: none; color: transparent; transition: all .3s; }
.jr-st u .gi { width: 15px; height: 15px; stroke-width: 2.6; }
.jr-st::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: var(--g-track); border-radius: 9px; } .jr-st:first-child::before { display: none; }
.jr-st.done { color: var(--text); } .jr-st.done u { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 55%, transparent); } .jr-st.done::before { background: var(--accent); }
.jr-st.cur { color: var(--text); } .jr-st.cur u { background: var(--accent-3); border-color: var(--accent-3); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-3) 22%, transparent), 0 0 18px var(--accent-3); animation: jrPulse 2s ease-in-out infinite; } .jr-st.cur::before { background: linear-gradient(90deg, var(--accent), var(--accent-3)); }
@keyframes jrPulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent-3) 8%, transparent), 0 0 22px var(--accent-3); } }
.jr-st small { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
.jr-bar { height: 12px; border-radius: 99px; background: var(--g-track); overflow: hidden; margin-top: 14px; } .jr-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); transform-origin: left; animation: gWide 1.1s cubic-bezier(.22, 1, .36, 1) backwards; box-shadow: 0 0 14px color-mix(in srgb, var(--accent-3) 50%, transparent); }
.jr-al { display: flex; flex-wrap: wrap; gap: 5px; } .jr-al i { width: 22px; height: 22px; border-radius: 7px; background: var(--g-track); display: grid; place-items: center; font-size: 9.5px; font-style: normal; font-weight: 700; color: var(--muted); } .jr-al i.d { background: var(--accent); color: #fff; } .jr-al i.c { background: var(--accent-3); color: #fff; box-shadow: 0 0 12px var(--accent-3); transform: scale(1.15); }
.jr-line { position: relative; margin-left: 9px; padding-left: 26px; border-left: 2px solid var(--g-track); display: grid; gap: 14px; }
.jr-ev { position: relative; } .jr-ev::before { content: ""; position: absolute; left: -33px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg-solid), 0 0 10px var(--accent); }
.jr-ev.ph::before { background: var(--accent-2); box-shadow: 0 0 0 4px var(--bg-solid), 0 0 10px var(--accent-2); } .jr-ev.nx::before { background: transparent; border: 2px dashed var(--accent-3); box-shadow: 0 0 0 4px var(--bg-solid); }
.jr-ev time { font-size: 12px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; } .jr-ev b { display: block; margin: 1px 0; }
.jr-ph { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; } .jr-ph img { width: 84px; height: 64px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 1px solid var(--line); transition: transform .2s; } .jr-ph img:hover { transform: scale(1.06); }

/* ---- appearance picker ---- */
.skins { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.skin { cursor: pointer; border-radius: 20px; padding: 12px; border: 2px solid var(--line); background: transparent; font: inherit; color: var(--text); text-align: left; transition: transform .2s, border-color .2s, box-shadow .2s; } .skin:hover { transform: translateY(-3px); }
.skin.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.skin .pv { height: 118px; border-radius: 13px; position: relative; overflow: hidden; margin-bottom: 10px; display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 9px; }
.skin .pv u { border-radius: 7px; } .skin .pv > div { display: grid; grid-template-rows: 14px 1fr 1fr; gap: 6px; } .skin .pv > div > i { border-radius: 6px; display: block; } .skin .pv .rw { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.skin b { display: flex; align-items: center; gap: 8px; } .skin p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }

/* =====================================================================
   1.8 — THEME: AURORA DARK
   ===================================================================== */
html[data-skin="aurora"] {
  --accent: #2ee6c5; --accent-2: #7aa2ff; --accent-3: #ff6ad5; --accent-soft: rgba(46, 230, 197, .16);
  --bg: #0a1026; --bg-solid: #121a3a; --text: #eef2ff; --muted: #94a0cb; --line: rgba(255, 255, 255, .11);
  --glass: rgba(255, 255, 255, .06); --glass-strong: rgba(20, 28, 62, .94); --glass-border: rgba(255, 255, 255, .13);
  --lg-tint: rgba(255, 255, 255, .085); --lg-tint-2: rgba(255, 255, 255, .035); --lg-strong: rgba(24, 33, 72, .94); --lg-rim: rgba(255, 255, 255, .16); --lg-rim-2: rgba(255, 255, 255, .05);
  --lg-shadow: 0 18px 50px rgba(0, 0, 0, .38); --shadow: 0 18px 50px rgba(0, 0, 0, .4); --g-track: rgba(255, 255, 255, .09);
  --grad: linear-gradient(135deg, #2ee6c5, #5aa9ff); --on-accent: #04121f; --ok: #3fe08e; --info: #6fb1ff; --warn: #ffc24d; --danger: #ff6b7a;
}
html[data-skin="aurora"] .bg-blobs { background: radial-gradient(900px 600px at 12% -5%, rgba(46, 230, 197, .30), transparent 60%), radial-gradient(900px 650px at 100% 12%, rgba(255, 106, 213, .22), transparent 60%), radial-gradient(1000px 700px at 55% 112%, rgba(122, 162, 255, .32), transparent 60%), #0a1026; }
html[data-skin="aurora"] .bg-blobs i:nth-child(1) { background: #2ee6c5; opacity: .16; } html[data-skin="aurora"] .bg-blobs i:nth-child(2) { background: #7aa2ff; opacity: .2; } html[data-skin="aurora"] .bg-blobs i:nth-child(3) { background: #ff6ad5; opacity: .14; }
html[data-skin="aurora"] .stat .v, html[data-skin="aurora"] .cc-kpi .v { background: linear-gradient(120deg, #fff 30%, var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-skin="aurora"] .g-arc, html[data-skin="aurora"] .g-line { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 70%, transparent)); }

/* =====================================================================
   1.8 — THEME: BRIGHT TECH
   ===================================================================== */
html[data-skin="bright"] {
  --accent: #0a66ff; --accent-2: #00b3ff; --accent-3: #7a4dff; --accent-soft: rgba(10, 102, 255, .10);
  --bg: #eef2f8; --bg-solid: #ffffff; --text: #0d1b33; --muted: #63738f; --line: #dbe3ef;
  --glass: #ffffff; --glass-strong: #ffffff; --glass-border: #dbe3ef;
  --lg-tint: #ffffff; --lg-tint-2: #fbfcff; --lg-strong: #ffffff; --lg-rim: #ffffff; --lg-rim-2: rgba(219, 227, 239, .9); --lg-blur: none;
  --lg-shadow: 0 10px 30px rgba(20, 60, 140, .09), 0 1px 2px rgba(20, 60, 140, .06); --shadow: 0 10px 30px rgba(20, 60, 140, .10); --g-track: #e6ecf5;
  --grad: linear-gradient(135deg, #0a66ff, #00b3ff); --lg-radius: 18px;
}
html[data-skin="bright"] .bg-blobs { background: linear-gradient(rgba(10, 102, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(10, 102, 255, .045) 1px, transparent 1px), radial-gradient(900px 500px at 100% 0%, rgba(0, 179, 255, .13), transparent 60%), radial-gradient(800px 500px at 0% 100%, rgba(122, 77, 255, .09), transparent 60%), #eef2f8; background-size: 36px 36px, 36px 36px, auto, auto, auto; }
html[data-skin="bright"] .bg-blobs i { display: none; }
html[data-skin="bright"] .card::before, html[data-skin="bright"] .modal::before, html[data-skin="bright"] .side::before { display: none; }
html[data-skin="bright"] .btn { border-radius: 12px; backdrop-filter: none; }
html[data-skin="bright"] .btn:not(.primary):not(.wa):not(.teal):not(.danger):not(.ghost) { background: #fff; border-color: #d3dcea; box-shadow: 0 1px 2px rgba(20, 60, 140, .06); border-radius: 12px; backdrop-filter: none; }
html[data-skin="bright"] .btn:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(10, 102, 255, .14); }
html[data-skin="bright"] input, html[data-skin="bright"] select, html[data-skin="bright"] textarea { background: #f6f8fc; border-color: #d3dcea; border-radius: 11px; backdrop-filter: none; }
html[data-skin="bright"] input:focus, html[data-skin="bright"] select:focus, html[data-skin="bright"] textarea:focus { background: #fff; box-shadow: 0 0 0 4px rgba(10, 102, 255, .14); }
html[data-skin="bright"] .side { border-radius: 22px; } html[data-skin="bright"] .topbar, html[data-skin="bright"] .tabs { border-radius: 16px; } html[data-skin="bright"] .tabs a, html[data-skin="bright"] .nav a, html[data-skin="bright"] .seg-ind { border-radius: 11px; }
html[data-skin="bright"] .tabs .seg-ind { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(10, 102, 255, .22); } html[data-skin="bright"] .tabs a.active { color: var(--accent); }
html[data-skin="bright"] .nav a:hover:not(.active) { background: #f1f5fb; } html[data-skin="bright"] .side .me { background: #f4f7fc; box-shadow: none; }
html[data-skin="bright"] .chip, html[data-skin="bright"] .note { background: #f4f7fc; border-color: #dbe3ef; box-shadow: none; }
html[data-skin="bright"] table.t th { border-bottom-color: #dbe3ef; } html[data-skin="bright"] table.t tr.click:hover td { background: #f3f7ff; }
html[data-skin="bright"] .modal { border-radius: 22px; background: #fff; } html[data-skin="bright"] .modal-h, html[data-skin="bright"] .modal-f { border-color: #e4eaf3; }
html[data-skin="bright"] .stat .v, html[data-skin="bright"] .cc-kpi .v { background: none; -webkit-text-fill-color: currentColor; color: var(--text); }

/* shared by both new themes: every accent surface follows the theme colours */
html[data-skin="aurora"] .nav a.active, html[data-skin="bright"] .nav a.active { background: var(--grad); color: var(--on-accent, #fff); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
html[data-skin="aurora"] .nav.seg a.active, html[data-skin="bright"] .nav.seg a.active { background: none; box-shadow: none; }
html[data-skin="aurora"] .nav .seg-ind, html[data-skin="bright"] .nav .seg-ind, html[data-skin="aurora"] .ch-tabs .seg-ind, html[data-skin="bright"] .ch-tabs .seg-ind { background: var(--grad); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 38%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
html[data-skin="aurora"] .btn.primary, html[data-skin="bright"] .btn.primary, html[data-skin="aurora"] .chip.on, html[data-skin="bright"] .chip.on, html[data-skin="aurora"] .pin-key.ok, html[data-skin="bright"] .pin-key.ok,
html[data-skin="aurora"] .ch-chip.primary, html[data-skin="bright"] .ch-chip.primary, html[data-skin="aurora"] .ch-c.on, html[data-skin="bright"] .ch-c.on, html[data-skin="aurora"] .ch-tabs:not(.seg) button.on, html[data-skin="bright"] .ch-tabs:not(.seg) button.on {
  background: var(--grad); color: var(--on-accent, #fff); border-color: transparent; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 34%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
html[data-skin="aurora"] .ch-tabs.seg > button.on, html[data-skin="aurora"] .nav a.active, html[data-skin="aurora"] .nav.seg a.active { color: var(--on-accent); }
html[data-skin="aurora"] input:focus, html[data-skin="aurora"] select:focus, html[data-skin="aurora"] textarea:focus { box-shadow: 0 0 0 4px rgba(46, 230, 197, .2); }
html[data-skin="aurora"] .progress > i, html[data-skin="bright"] .progress > i { background: var(--grad); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent); }
html[data-skin="aurora"] .pin-dots i.on, html[data-skin="bright"] .pin-dots i.on { box-shadow: 0 0 10px var(--accent); }
html[data-skin="aurora"] .brand .logo, html[data-skin="bright"] .brand .logo, html[data-skin="aurora"] .avatar, html[data-skin="bright"] .avatar { background: var(--grad); color: var(--on-accent, #fff); }
@media (prefers-reduced-motion: reduce) { .g-arc { animation: none; stroke-dashoffset: var(--to); } .g-line { animation: none; stroke-dashoffset: 0; } .g-fill, .g-seg { animation: none; opacity: 1; } .g-bar i, .g-hbars i, .cc-bk, .jr-bar i { animation: none; } .cc-live::before, .jr-st.cur u { animation: none; } }

.cc-bk { padding: 0 5px; }
.g-donut > svg { flex: none; } .g-legend { min-width: 0; flex: 1 1 130px; overflow: hidden; }

.mobile-nav.seg { position: fixed; }
html, body { max-width: 100%; overflow-x: clip; }
/* phone: the single-column layout must win over the wider-screen rule above */
@media (max-width: 820px) { .shell { grid-template-columns: minmax(0, 1fr); } .main { min-width: 0; } }

/* ---- phones: keep the GPU light ------------------------------------------
   Dozens of frosted-glass layers plus big blurred blobs can exhaust an iPhone's
   graphics memory, which makes Safari blank the screen and reload the page.
   On phones/tablets only the bottom bar keeps the blur; everything else uses a
   plain translucent fill that looks nearly identical. */
@media (max-width: 1024px), (pointer: coarse) {
  .glass, .card, .side, .tabs, .btn, input, select, textarea, .badge, .alert-banner, .toast, .modal-back, .modal,
  .seg, .seg-ind { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .modal { background: var(--glass-strong); }
  .bg-blobs i { display: none !important; }   /* the gradient on .bg-blobs itself stays */
  .mobile-nav { -webkit-backdrop-filter: blur(14px) !important; backdrop-filter: blur(14px) !important; }
  #page.pg-in > *:not(.tabs) { animation-name: pgInLite; animation-duration: .18s; }
}
@keyframes pgInLite { from { opacity: 0; } to { opacity: 1; } }

/* phone number: country code + digits */
.phone { display: flex; gap: 6px; } .phone select { flex: 0 0 auto; width: 118px; max-width: 42%; padding-right: 6px; } .phone input { flex: 1; min-width: 0; }

/* ---- opened from the iPhone home screen (standalone) ---------------------
   The page runs edge to edge, so keep clear of the notch / home bar, and drop the heaviest effects
   (large soft shadows, gradients behind every card) that make home-screen web apps stutter. */
html.standalone body { padding-top: env(safe-area-inset-top); }
html.standalone .mobile-nav { bottom: calc(8px + env(safe-area-inset-bottom)); }
html.standalone .main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
html.standalone * { text-shadow: none !important; }
html.standalone .card, html.standalone .glass, html.standalone .btn, html.standalone .tabs { box-shadow: 0 1px 2px rgba(0, 0, 0, .12) !important; }
html.standalone .bg-blobs { display: none; }
html.standalone #page.pg-in > *:not(.tabs) { animation: none !important; }
html.standalone body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
@supports (-webkit-touch-callout: none) { html.standalone body { min-height: -webkit-fill-available; } }
@media (max-width: 820px) {
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form > label.f:has([data-phone]) { grid-column: 1 / -1; }
  .phone select { width: 112px; }
}
@media (max-width: 820px) { #toasts { bottom: 96px; left: 12px; right: 12px; } .toast { max-width: none; } }

/* iPhone Safari zooms the whole page when a field with text smaller than 16px gets focus — keep fields at 16px on touch screens */
@media (pointer: coarse) { input, select, textarea, .phone select, .phone input { font-size: 16px !important; } }
