/* ============================================================
   DoctorLive — design tokens
   The ink-blue token board is the hero; everything else stays quiet.
   ============================================================ */
:root {
  --ink:      #123a5a;   /* token board, primary */
  --ink-2:    #0d2c45;
  --paper:    #eef2f5;   /* page background */
  --surface:  #ffffff;
  --line:     #d6dee5;
  --text:     #15222e;
  --muted:    #5d6e7d;
  --live:     #15835a;
  --break:    #b97d06;
  --off:      #8593a0;
  --danger:   #b43d36;
  --glow:     #e8f3ff;   /* token numeral colour */

  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-num:  "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;

  --r-lg: 14px;
  --r-sm: 8px;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #7fb4e0; --ink-2: #0b1f30;
    --paper: #0f1720; --surface: #16212c; --line: #26394a;
    --text: #e3ebf2; --muted: #93a4b3;
    --live: #3fbf87; --break: #e0a531; --off: #6f7f8d; --danger: #e0706a;
    --glow: #e8f3ff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: inherit; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 16px/1.6 var(--font-body);
}
a { color: var(--ink); }
h1, h2 { font-family: var(--font-num); font-weight: 650; line-height: 1.25; margin: 0; }
h1 { font-size: clamp(1.45rem, 3.4vw, 2rem); }
h2 { font-size: 1.3rem; }
p { margin: .25rem 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
code { background: var(--paper); padding: 0 .3em; border-radius: 4px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 55%, transparent); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .6rem clamp(1rem, 3vw, 2rem);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-num); font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--text); }
.topnav { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.navlink { text-decoration: none; font-weight: 500; }
.who { color: var(--muted); font-size: .9rem; }
.conn { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.conn.bad i { background: var(--danger); }
.conn.bad { color: var(--danger); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 1.25rem clamp(1rem, 3vw, 2rem) 3rem; }
.hello { margin-bottom: 1rem; }

/* ---------- Panels & grid ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.1rem 1.2rem; margin-bottom: 1rem; min-width: 0;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .8rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1rem; }
.assist-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1rem; align-items: start; }
.assist-layout .col { min-width: 0; }
@media (max-width: 860px) { .assist-layout { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .55rem 1rem; min-height: 42px;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover:not(:disabled) { border-color: var(--ink); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--ink-2); }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0b1f30; } .btn.primary:hover:not(:disabled) { background: #a9cdea; } }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 32px; padding: .2rem .65rem; font-size: .88rem; }
.btn.lg { min-height: 48px; font-size: 1.05rem; }
.btn.xl { min-height: 64px; font-size: 1.25rem; }
.btn.wait { pointer-events: none; opacity: .7; }
kbd { font: 600 .72rem var(--font-body); padding: 0 .35em; border: 1px solid currentColor; border-radius: 4px; opacity: .6; }

/* ---------- Status badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .2rem .7rem; border-radius: 999px; font-weight: 600; font-size: .9rem;
  background: color-mix(in srgb, var(--off) 14%, transparent); color: var(--off);
}
.badge i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.badge.live  { background: color-mix(in srgb, var(--live) 14%, transparent); color: var(--live); }
.badge.live i { animation: pulse 1.8s infinite; }
.badge.break { background: color-mix(in srgb, var(--break) 16%, transparent); color: var(--break); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .badge.live i { animation: none; } }

.arrival { font-weight: 500; color: var(--muted); }
.arrival[data-state="arrived"], .arrival[data-state="in_chamber"] { color: var(--live); }
.arrival[data-state="on_the_way"] { color: var(--ink); }

/* ---------- Token board: the page's centrepiece ---------- */
.token {
  display: grid; justify-items: center; text-align: center;
  padding: 1rem 1rem 1.2rem; margin-bottom: 1rem;
  background: var(--ink-2); color: var(--glow);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), inset 0 -18px 40px rgba(0,0,0,.25);
}
.token-label { font-size: .95rem; opacity: .75; }
.token-num {
  font-family: var(--font-num); font-weight: 800;
  font-size: clamp(5rem, 16vw, 8.5rem); line-height: .95; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(160, 205, 255, .35);
}
.token-sub { font-size: 1rem; opacity: .85; min-height: 1.6em; }
.token-sm .token-num { font-size: clamp(3.5rem, 10vw, 5rem); }

/* ---------- Segmented chamber control ---------- */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.seg-btn.on.s-live    { background: var(--live);  border-color: var(--live);  color: #fff; }
.seg-btn.on.s-break   { background: var(--break); border-color: var(--break); color: #fff; }
.seg-btn.on.s-offline { background: var(--off);   border-color: var(--off);   color: #fff; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 0 0 .9rem; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stats > div { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .55rem .75rem; }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: 0; font: 700 1.9rem/1.1 var(--font-num); font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 99px; background: var(--paper); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--live); transition: width .4s; }

/* ---------- Assistant controls ---------- */
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.controls [data-act="next"] { grid-column: 1 / -1; }
.controls .btn { white-space: nowrap; padding-inline: .6rem; }
.hint { color: var(--muted); font-size: .9rem; margin: .7rem 0 .3rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }

/* ---------- Map ---------- */
.map { height: 340px; border-radius: 10px; border: 1px solid var(--line); z-index: 0; }
.gps-line { color: var(--muted); font-size: .92rem; margin-bottom: .7rem; }
.gps-line.on { color: var(--live); }
.pin span {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: #fff; border: 2px solid var(--ink); font-size: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.pin-doctor span { border-color: var(--live); }
.pin.stale span { filter: grayscale(1); opacity: .6; }
.leaflet-container .route { stroke: #123a5a; }
.leaflet-container .acc { stroke: #15835a; fill: #15835a; }

/* ---------- Forms ---------- */
input {
  font: inherit; width: 100%; min-height: 44px; padding: .5rem .75rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text);
}
input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 20%, transparent); }
label { display: grid; gap: .3rem; font-weight: 500; }
.stack { display: grid; gap: .7rem; }
.err { color: var(--danger); min-height: 1.4em; margin: 0; }
.walkin { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: .5rem; margin-bottom: .8rem; }
@media (max-width: 520px) { .walkin { grid-template-columns: 1fr; } }
.lookup { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.lookup .muted { grid-column: 1 / -1; }

/* ---------- Queue table ---------- */
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.chip { font: inherit; font-size: .88rem; padding: .2rem .8rem; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.on { color: #0b1f30; } }
.table-scroll { overflow-x: auto; }
.queue { width: 100%; border-collapse: collapse; }
.queue th { text-align: left; font-weight: 500; color: var(--muted); font-size: .85rem; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
.queue td { padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.queue .sn { font: 700 1.35rem var(--font-num); width: 3.2rem; font-variant-numeric: tabular-nums; }
.queue .sub { display: block; color: var(--muted); font-size: .82rem; }
.queue .row-act { text-align: right; white-space: nowrap; }
.queue tr.st-called { background: color-mix(in srgb, var(--live) 9%, transparent); }
.queue tr.st-done td, .queue tr.st-cancelled td { color: var(--muted); }
.qs { font-size: .82rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px; background: var(--paper); white-space: nowrap; }
.qs-called  { background: var(--live); color: #fff; }
.qs-hold    { background: color-mix(in srgb, var(--break) 20%, transparent); color: var(--break); }
.qs-skipped { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 1.5rem .5rem; }

/* ---------- Patient: search ---------- */
.search-hero { max-width: 44rem; margin: 1.5rem 0 1.5rem; }
.search-hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); letter-spacing: -.01em; }
.searchbox { margin-top: 1rem; }
.searchbox input { min-height: 54px; font-size: 1.1rem; }
.results { display: grid; gap: .6rem; }
.doc-card {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; color: inherit;
}
.doc-card:hover { border-color: var(--ink); }
.doc-card h2 { font-size: 1.2rem; }
.spec { color: var(--ink); font-weight: 500; }
.doc-live { display: grid; justify-items: end; gap: .3rem; text-align: right; }
.mini-token { background: var(--ink-2); color: var(--glow); border-radius: 6px; padding: .1rem .6rem; font-size: .88rem; }
.mini-token b { font: 800 1.3rem var(--font-num); margin-right: .2rem; }
@media (max-width: 520px) { .doc-live { justify-items: start; text-align: left; } }

/* ---------- Patient: profile ---------- */
.profile { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.avatar {
  flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 1.8rem var(--font-num);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.live-strip { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }

.mine { display: flex; gap: 1rem; align-items: center; }
.mine-num {
  flex: none; min-width: 5.5rem; text-align: center; padding: .2rem .6rem;
  font: 800 3.4rem/1.1 var(--font-num);
  border: 3px solid var(--ink); border-radius: 10px; color: var(--ink);
}
.mine-status { font-weight: 600; font-size: 1.08rem; }
#minePanel[data-state="soon"]   { border-color: var(--break); }
#minePanel[data-state="called"] { border-color: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 25%, transparent); }
#minePanel[data-state="called"] .mine-num { border-color: var(--live); color: var(--live); }

.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: .4rem; }
.cell {
  display: grid; place-items: center; height: 44px; border-radius: 6px;
  font: 700 1.05rem var(--font-num); font-variant-numeric: tabular-nums;
  border: 1px solid var(--line); background: var(--surface);
}
.cell.c-done, .cell.c-skipped { color: var(--muted); background: var(--paper); text-decoration: line-through; text-decoration-thickness: 1px; }
.cell.c-hold   { border-color: var(--break); color: var(--break); }
.cell.c-called { background: var(--live); border-color: var(--live); color: #fff; }
.cell.mine     { outline: 3px solid var(--ink); outline-offset: 1px; }
.legend { display: flex; gap: .35rem .8rem; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: -.4rem; vertical-align: -1px; border: 1px solid var(--line); }
.lg-called { background: var(--live); } .lg-done { background: var(--paper); } .lg-waiting { background: var(--surface); } .lg-mine { outline: 2px solid var(--ink); }

/* ---------- Called overlay ---------- */
.callout { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: rgba(8, 20, 32, .7); padding: 1rem; }
.callout[hidden] { display: none; }
.callout-box { background: var(--surface); border-radius: var(--r-lg); padding: 1.5rem 2rem; text-align: center; max-width: 360px; width: 100%; }
.callout-title { font: 700 1.3rem var(--font-num); color: var(--live); }
.callout-num { font: 800 6rem/1 var(--font-num); color: var(--ink); margin: .3rem 0; }

/* ---------- Login ---------- */
.login-card { max-width: 400px; margin: 3rem auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; }
.login-card h1 { font-size: 1.5rem; }
.login-card form { margin-top: 1.2rem; }
.demo { margin-top: .5rem; font-size: .9rem; color: var(--muted); }
.demo summary { cursor: pointer; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 3000; display: grid; gap: .4rem; width: min(92vw, 420px); }
.toast { padding: .7rem 1rem; border-radius: var(--r-sm); background: var(--text); color: var(--surface); box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: opacity .4s, transform .4s; }
.toast.ok { background: var(--live); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ============================================================
   Admin panel
   ============================================================ */
select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .45rem .6rem; min-height: 40px;
}
textarea { width: 100%; resize: vertical; min-height: 64px; }
select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 20%, transparent); }
.row-gap { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row-gap input { width: auto; min-width: 12rem; }
.nowrap { white-space: nowrap; }

.admin-hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }

.tabs { display: flex; gap: .25rem; overflow-x: auto; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.tab {
  font: 600 .98rem var(--font-body); color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: .6rem .9rem; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }

.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1rem; }
.kpis > div { background: var(--surface); }
.kpis dd small { font-size: 1rem; color: var(--muted); font-weight: 600; }

.sys-warn, .sys-ok {
  display: flex; gap: .75rem; align-items: center; flex-wrap: wrap;
  padding: .7rem 1rem; border-radius: var(--r-sm); margin-bottom: 1rem; font-size: .95rem;
}
.sys-warn { background: color-mix(in srgb, var(--break) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--break) 45%, transparent); }
.sys-ok   { background: color-mix(in srgb, var(--live) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--live) 35%, transparent); color: var(--live); }

/* Toggle switch */
.switch { display: inline-flex; align-items: center; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  width: 46px; height: 26px; border-radius: 99px; background: var(--off); position: relative; transition: background .18s;
}
.switch .thumb {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s;
}
.switch input:checked + .track { background: var(--live); }
.switch input:checked + .track .thumb { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid color-mix(in srgb, var(--ink) 55%, transparent); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .4; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .switch .track, .switch .thumb { transition: none; } }

.switch-list { display: grid; }
.switch-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .85rem 0; border-top: 1px solid var(--line);
}
.switch-row:first-child { border-top: 0; padding-top: 0; }
.switch-text { display: grid; gap: .1rem; max-width: 40rem; }
.switch-row.is-off .switch-text strong { color: var(--danger); }
.switch-ctl { display: flex; gap: .4rem; align-items: center; flex: none; }
.switch-ctl input[type="time"] { width: auto; }
.notice-edit { display: grid; gap: .4rem; justify-items: end; width: min(26rem, 60vw); }
@media (max-width: 600px) {
  .switch-row { flex-direction: column; align-items: flex-start; }
  .notice-edit { width: 100%; }
}

.admin-table td { vertical-align: middle; }
.admin-table select { min-height: 34px; padding: .2rem .4rem; font-size: .9rem; }
.row-off td { opacity: .55; }
.row-off td:has(.switch) { opacity: 1; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: .05rem .5rem; border-radius: 99px; background: var(--paper); color: var(--muted); margin-left: .25rem; }
.tag.ok  { background: color-mix(in srgb, var(--live) 14%, transparent); color: var(--live); margin: 0; }
.tag.off { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); margin: 0; }
.role { font-size: .82rem; font-weight: 600; padding: .1rem .55rem; border-radius: 99px; background: var(--paper); }
.role-admin  { background: var(--ink); color: #fff; }
.role-doctor { background: color-mix(in srgb, var(--live) 14%, transparent); color: var(--live); }
@media (prefers-color-scheme: dark) { .role-admin { color: #0b1f30; } }

.queue-tools { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .8rem; }
.btn.danger-outline { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.btn.danger-outline:hover:not(:disabled) { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Dialogs */
.dlg {
  border: 0; border-radius: var(--r-lg); padding: 0; width: min(680px, 94vw); max-height: 92vh;
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.dlg::backdrop { background: rgba(8, 20, 32, .55); }
.dlg-form { padding: 1.3rem 1.4rem; display: grid; gap: .9rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-grid label { font-size: .92rem; }
.form-grid select { width: 100%; }
.latlng { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.map-sm { height: 240px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .5rem; }
[hidden] { display: none !important; }

/* Patient-facing bits controlled by admin */
.notice-banner {
  background: color-mix(in srgb, var(--break) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--break) 45%, transparent);
  border-radius: var(--r-sm); padding: .7rem 1rem; margin-bottom: 1rem; font-weight: 500;
}
.closed-note { background: var(--paper); border-radius: var(--r-sm); padding: .8rem 1rem; color: var(--muted); }
.maint { max-width: 36rem; margin: 3rem auto; text-align: center; }
.check.disabled { opacity: .5; }

/* ---------- Doctor photos ---------- */
.avatar-sm { width: 56px; height: 56px; font-size: 1.4rem; }
.avatar-xs { width: 38px; height: 38px; font-size: 1rem; flex: none; }
.doc-card { justify-content: flex-start; }
.doc-card .doc-main { flex: 1; min-width: 12rem; }
.doc-cell { display: flex; gap: .65rem; align-items: center; }
.hello-photo { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.photo-edit { display: flex; gap: .8rem; align-items: center; }
.photo-actions { display: grid; gap: .35rem; justify-items: start; }
.photo-actions label.btn { cursor: pointer; }
.dlg .photo-edit { padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .avatar { color: #0b1f30; } }

/* ---------- Accounts: login links, reset, registration ---------- */
.login-links { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .95rem; }
.info-note, .ok-note { border-radius: var(--r-sm); padding: .75rem 1rem; }
.info-note { background: color-mix(in srgb, var(--ink) 8%, var(--surface)); }
.ok-note   { background: color-mix(in srgb, var(--live) 12%, var(--surface)); color: var(--live); font-weight: 500; }
.code-input { font: 700 1.6rem var(--font-num); letter-spacing: .35em; text-align: center; }
.tab .count { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; padding: 0 .35em; margin-left: .25rem;
  border-radius: 99px; background: var(--danger); color: #fff; font-size: .75rem; }
.sys-warn.danger { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.register { max-width: 760px; margin: 0 auto; }
.register > h1 { margin-top: .5rem; }
.register form h2 { margin-top: .6rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.register form h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.dlg-sm { width: min(440px, 94vw); }
.dlg-sm .dlg-form label { display: grid; gap: .3rem; }
a.who { text-decoration: none; color: var(--muted); }
a.who:hover { color: var(--ink); text-decoration: underline; }
