:root {
  --bg: #f4f7f8; --card: #ffffff; --ink: #14272e; --muted: #5d737b; --line: #dfe7ea;
  --brand: #0b7a75; --brand-dark: #075e5a; --brand-soft: #e3f3f1; --danger: #b3261e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.topbar { position: sticky; top: 0; z-index: 5; background: var(--brand); color: #fff; display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.topbar h1 { font-size: 18px; margin: 0; flex: 1; }
.topbar .who { font-size: 13px; text-align: right; opacity: .95; }
.topbar button { background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.btn { background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 600; }
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.small { padding: 7px 11px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn:disabled { opacity: .55; cursor: default; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-size: 14px; margin-top: 10px; }

/* sign in */
.login { max-width: 400px; margin: 8vh auto 0; }
.login h1 { margin: 0 0 4px; font-size: 26px; }
.demo-logins { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.demo-note { background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-top: 16px; }

/* patient list */
.searchbar { display: flex; gap: 10px; margin-bottom: 14px; }
.searchbar input { flex: 1; font-size: 17px; padding: 13px 14px; }
.plist { display: grid; gap: 10px; }
.pitem { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.pitem:hover { border-color: var(--brand); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 700; flex: none; }
.pitem .name { font-weight: 600; }
.pitem .sub { font-size: 14px; color: var(--muted); }
.pitem .last { margin-left: auto; font-size: 13px; color: var(--muted); text-align: right; }
.empty { text-align: center; padding: 36px 12px; color: var(--muted); }

/* patient file */
.back { background: none; border: 0; color: var(--brand); padding: 0; margin-bottom: 10px; font-weight: 600; }
.phead { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.phead .avatar { width: 56px; height: 56px; font-size: 20px; }
.phead h2 { margin: 0; font-size: 22px; }
.phead .facts { color: var(--muted); font-size: 15px; }
.alert { background: #fff4e5; border: 1px solid #f3d19c; border-radius: 10px; padding: 8px 12px; margin-top: 12px; font-size: 15px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.day { margin-top: 18px; }
.day h3 { font-size: 15px; margin: 0 0 8px; color: var(--brand-dark); display: flex; align-items: center; gap: 8px; }
.day h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.visit { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.visit .vt { font-weight: 600; }
.visit .vd { font-size: 14px; color: var(--muted); }
.visit p { margin: 6px 0 0; white-space: pre-wrap; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumb { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; text-align: left; position: relative; }
.thumb img { display: block; width: 100%; height: 120px; object-fit: cover; background: #0e1b20; }
.thumb .cap { padding: 7px 9px; font-size: 13px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--brand-soft); color: var(--brand-dark); border-radius: 6px; padding: 2px 6px; }
.thumb .del { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,.92); border: 0; border-radius: 8px; font-size: 12px; padding: 4px 7px; color: var(--danger); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* dialogs */
.sheet-bg { position: fixed; inset: 0; background: rgba(10,25,30,.5); z-index: 20; display: grid; place-items: end center; }
.sheet { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px 18px 24px; }
.sheet h2 { margin: 0 0 4px; font-size: 20px; }
.sheet .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
@media (min-width: 720px) { .sheet-bg { place-items: center; } .sheet { border-radius: 18px; } }

/* full screen viewer, for showing a patient their x-ray or report */
.viewer { position: fixed; inset: 0; background: #06100f; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; }
.viewer-close { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 10px; padding: 9px 14px; }
.viewer-caption { color: #fff; padding: 12px 16px; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; max-width: 90vw; }
[hidden] { display: none !important; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } .pitem .last { display: none; } }
.login-logo { display: block; max-width: 180px; max-height: 90px; margin: 0 0 12px; }
.top-logo { height: 34px; width: auto; border-radius: 6px; background: #fff; padding: 2px; }

/* ---------- navigation ---------- */
.tabs { position: sticky; top: 58px; z-index: 4; display: flex; gap: 4px; background: #fff; border-bottom: 1px solid var(--line); padding: 6px 12px; overflow-x: auto; }
.tabs button { flex: none; background: none; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 600; color: var(--muted); }
.tabs button.on { background: var(--brand-soft); color: var(--brand-dark); }
.pagetitle { font-size: 20px; margin: 4px 0 14px; }
.subtitle { font-size: 16px; margin: 22px 0 10px; }
.grow { flex: 1; min-width: 0; }
.small { font-size: 13px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.grid2.even { grid-template-columns: 1fr 1fr; }
.stack { display: grid; gap: 16px; }
.cardhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cardhead h3 { margin: 0; font-size: 16px; flex: 1; }
.cardfoot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.count { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; border-radius: 999px; padding: 2px 10px; font-size: 14px; }
.count.warn { background: #fde7e5; color: var(--danger); }
.card.flush { padding: 4px 14px; }
.card.upcoming { margin-bottom: 14px; }
.note { background: var(--brand-soft); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin-bottom: 12px; }
.line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .d { width: 92px; flex: none; font-size: 13px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; background: #e8eef0; color: var(--ink); white-space: nowrap; }
.badge.warn { background: #fde7e5; color: var(--danger); }
.badge.st-arrived { background: #fff1d6; color: #8a5a00; }
.badge.st-completed { background: #dff3e4; color: #1b6b34; }
.badge.st-cancelled, .badge.st-no_show { background: #fde7e5; color: var(--danger); }
.linkish { background: none; border: 0; padding: 0; font-weight: 600; color: var(--ink); text-align: left; }
.linkish:hover { color: var(--brand); text-decoration: underline; }

/* ---------- appointments ---------- */
.appt { display: flex; gap: 12px; padding: 10px 0 10px 10px; border-left: 4px solid var(--brand); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.appt.tone1 { border-left-color: #7a4fb5; }
.appt.tone2 { border-left-color: #c2620a; }
.appt.st-cancelled, .appt.st-no_show { opacity: .6; }
.appt-time { width: 78px; flex: none; font-weight: 600; font-size: 15px; }
.appt-time .muted { font-weight: 400; font-size: 13px; }
.appt-main { flex: 1; min-width: 0; }
.appt-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.caltop { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.caltop .btn:last-child { margin-left: auto; }
.inline { width: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 9px 16px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--brand); color: #fff; }
.calnav { display: flex; gap: 6px; }
.daycols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.wday { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 180px; }
.wday.now { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.wday-head { display: block; width: 100%; background: none; border: 0; font-weight: 700; padding: 4px 2px 8px; text-align: left; color: var(--ink); }
.wday-head:hover { color: var(--brand); }
.chipappt { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 5px 7px; margin-bottom: 5px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chipappt.tone1 { border-left-color: #7a4fb5; background: #f0e9f8; }
.chipappt.tone2 { border-left-color: #c2620a; background: #fbeedd; }
.chipappt.st-cancelled, .chipappt.st-no_show { opacity: .5; text-decoration: line-through; }
.chipappt.st-completed { opacity: .75; }
.chipappt .ct { font-weight: 700; }
.addslot { background: none; border: 1px dashed var(--line); border-radius: 6px; width: 100%; padding: 5px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.addslot:hover { border-color: var(--brand); color: var(--brand); }
.wa { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; background: #f3fbf4; }
.wa-to { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.wa-msg { font-size: 14px; }

/* ---------- money and stock ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tiles.big { margin-bottom: 16px; }
.tile { background: var(--bg); border-radius: 12px; padding: 12px; }
.tiles.big .tile { background: var(--card); border: 1px solid var(--line); padding: 16px; }
.tile .tl { font-size: 13px; color: var(--muted); }
.tile .tv { font-size: 20px; font-weight: 700; margin-top: 2px; }
.tiles.big .tv { font-size: 26px; }
.tile.pos .tv, .amt.pos { color: #1b6b34; }
.tile.neg .tv, .amt.neg { color: var(--danger); }
.amt { font-weight: 700; white-space: nowrap; }
.qty { font-weight: 700; white-space: nowrap; min-width: 90px; text-align: right; }
.bar { flex: 1; height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; min-width: 40px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.line > span:first-child:not(.grow):not(.d) { min-width: 150px; }
.x { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 6px; }
.x:hover { color: var(--danger); }
@media (max-width: 820px) { .grid2, .grid2.even { grid-template-columns: 1fr; } .caltop .btn:last-child { margin-left: 0; } .tiles.big .tv { font-size: 20px; } .line.entry { flex-wrap: wrap; } }
@media (max-width: 900px) { .week { grid-template-columns: repeat(7, minmax(150px, 1fr)); } }
.tabs button { padding-left: 12px; padding-right: 12px; }

/* ---------- appointment system: one calendar, a colour per doctor ---------- */
:root { --d0: #0b7a75; --d0s: #dff1ef; --d1: #7a4fb5; --d1s: #efe7f8; --d2: #c2620a; --d2s: #fbecd9; }
.calhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.calhead .pagetitle { margin: 0; flex: 1; min-width: 200px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 12px; height: 12px; border-radius: 3px; background: var(--d0); display: inline-block; }
.lg.tone1 i { background: var(--d1); } .lg.tone2 i { background: var(--d2); }
.lg.off i { background: repeating-linear-gradient(45deg, #c9d3d7, #c9d3d7 3px, #eef2f3 3px, #eef2f3 6px); }
.timegrid { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.tg-row { display: flex; min-width: min-content; }
.tg-head { position: sticky; top: 0; border-bottom: 1px solid var(--line); background: #fff; }
.tg-gutter { width: 54px; flex: none; position: relative; }
.tg-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; }
.tg-hour:first-child { transform: none; }
.tg-col-head { flex: 1; min-width: 132px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px; font-weight: 700; border-left: 1px solid var(--line); border-top: 4px solid var(--d0); }
.tg-col-head.tone1 { border-top-color: var(--d1); } .tg-col-head.tone2 { border-top-color: var(--d2); }
.tg-col { flex: 1; min-width: 132px; position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, transparent 50%, #f0f4f5 50%, #f0f4f5 calc(50% + 1px), transparent calc(50% + 1px)); }
.tg-col:hover { background-color: #fafcfc; }
.tg-appt { position: absolute; left: 4px; right: 4px; overflow: hidden; text-align: left; border: 0; border-left: 4px solid var(--d0); background: var(--d0s); border-radius: 7px; padding: 3px 7px; cursor: pointer; z-index: 2; box-shadow: 0 0 0 1px #fff; }
.tg-appt.tone1 { border-left-color: var(--d1); background: var(--d1s); } .tg-appt.tone2 { border-left-color: var(--d2); background: var(--d2s); }
.tg-appt:hover { filter: brightness(.96); }
.tg-appt.st-completed { opacity: .7; }
.tg-appt.st-cancelled, .tg-appt.st-no_show { opacity: .45; text-decoration: line-through; z-index: 1; }
.tg-appt.st-arrived { box-shadow: 0 0 0 2px #e0a100; }
.ta-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-off { position: absolute; left: 0; right: 0; border: 0; text-align: left; padding: 6px 9px; font-size: 13px; color: #44565d; cursor: pointer; z-index: 1;
  background: repeating-linear-gradient(45deg, #dde4e7, #dde4e7 6px, #eef2f3 6px, #eef2f3 12px); }
.chipappt.off { border-left-color: #8b9aa0; background: repeating-linear-gradient(45deg, #dde4e7, #dde4e7 5px, #eef2f3 5px, #eef2f3 10px); color: #44565d; }
.chipappt.tone1 { border-left-color: var(--d1); background: var(--d1s); } .chipappt.tone2 { border-left-color: var(--d2); background: var(--d2s); }
.appt.tone1 { border-left-color: var(--d1); } .appt.tone2 { border-left-color: var(--d2); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mhead { font-size: 13px; font-weight: 700; color: var(--muted); padding: 2px 6px; }
.mday { background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-height: 84px; padding: 6px 8px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.mday:hover { border-color: var(--brand); }
.mday.now { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.mday.dim { opacity: .45; }
.mnum { font-weight: 700; }
.mpills { display: flex; gap: 4px; flex-wrap: wrap; }
.mpill { min-width: 22px; text-align: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--d0); border-radius: 99px; padding: 1px 6px; }
.mpill.tone1 { background: var(--d1); } .mpill.tone2 { background: var(--d2); } .mpill.off { background: #8b9aa0; }
.newbox { background: var(--brand-soft); border-radius: 10px; padding: 4px 12px 12px; }
.apptmeta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.apptmeta .muted { flex-basis: 100%; }
a.btn { text-decoration: none; display: inline-block; }
input.mins { width: 84px; text-align: right; }
.linkish.small { font-weight: 600; color: var(--brand); }
@media (max-width: 820px) { .caltop .grow { display: none; } .mday { min-height: 64px; padding: 4px; } .mpill { min-width: 18px; padding: 0 4px; } }
@media (max-width: 600px) { .tg-col, .tg-col-head { min-width: 96px; } .tg-gutter { width: 42px; } .tg-col-head { padding: 8px 6px; font-size: 13px; } .tg-col-head .count { display: none; } .tg-appt { left: 2px; right: 2px; padding: 3px 5px; } .ta-name { font-size: 13px; } }
.chipappt .cp { display: block; font-size: 12px; color: var(--muted); }
/* ---------- Calls and enquiries (calls.js) ---------- */
.tbc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tbc-top .pagetitle { margin: 0; flex: 1; }
.tbc-list .filters { margin-bottom: 8px; }
.tbc-day { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 0 4px; }
.tbc-call { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tbc-call:last-child { border-bottom: 0; }
.tbc-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--brand-soft); color: var(--brand-dark); }
.tbc-ico.missed, .tbc-ico.rejected { background: #fde7e5; color: var(--danger); }
.tbc-ico.out { background: #e8eef0; color: var(--ink); }
.tbc-who { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tbc-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.tbc-notes { white-space: pre-wrap; margin-top: 4px; }
.badge.tbc-enq { background: #e6eefc; color: #1f4fa3; }
.tbc-radios { display: grid; gap: 8px; }
.tbc-radio { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; color: var(--ink); font-size: 15px; cursor: pointer; }
.tbc-radio input { width: auto; margin-top: 4px; }
.tbc-radio span { display: grid; gap: 2px; }
.tbc-add { margin-left: auto; }
.tbc-h4 { margin: 12px 0 2px; font-size: 14px; color: var(--muted); }
.tbc-daybar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.tbc-daybar input { width: auto; }
.tbc-ask { display: grid; gap: 8px; margin-bottom: 12px; }
.tbc-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
/* calls: one line per call, number card */
.tbc-row { align-items: center; }
.tbc-open { background: none; border: 0; padding: 0; text-align: left; min-width: 0; color: inherit; }
.tbc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tbc-right { display: flex; align-items: center; gap: 8px; flex: none; }
.tbc-dial { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #1e8e3e; color: #fff; display: grid; place-items: center; padding: 0; }
.tbc-log { white-space: nowrap; }
.tbc-card { display: flex; flex-direction: column; gap: 12px; }
.tbc-grab { width: 40px; height: 4px; border-radius: 2px; background: #dadce0; align-self: center; }
.tbc-cardhead { display: flex; gap: 10px; align-items: flex-start; }
.tbc-cardname { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.tbc-x { border: 0; background: none; font-size: 18px; color: var(--muted); padding: 4px 6px; }
.tbc-cardacts { display: flex; gap: 10px; }
.tbc-bigcall, .tbc-wa { flex: 1; height: 46px; border-radius: 23px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; }
.tbc-bigcall { border: 0; background: #1e8e3e; color: #fff; }
.tbc-wa { border: 1px solid #dadce0; background: #fff; color: #137333; }
.tbc-sec { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; margin-top: 4px; }
.tbc-facts { display: grid; gap: 8px; background: #f8f9fa; border-radius: 12px; padding: 12px; }
.tbc-fact { display: grid; gap: 1px; white-space: pre-wrap; }
.tbc-hist .line { gap: 10px; }
.tbc-ico.sm { width: 28px; height: 28px; font-size: 13px; }
.tbc-hist .line > span.tbc-ico { min-width: 0 !important; width: 28px; flex: none; }
.tbc-hist .line > span.grow { min-width: 0; flex: 1; }

/* give appointment: doctor buttons and free-time picker */
.gv-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.gv-doc { border: 2px solid var(--line); border-left: 6px solid var(--brand); background: #fff; border-radius: 10px; padding: 12px 10px; font-weight: 600; text-align: left; }
.gv-doc.tone1 { border-left-color: var(--d1, #7a4fb5); } .gv-doc.tone2 { border-left-color: var(--d2, #c2620a); }
.gv-doc.on { border-color: var(--brand); background: var(--brand-soft); }
.gv-doc.tone1.on { border-color: var(--d1, #7a4fb5); background: var(--d1s, #f0e9f8); } .gv-doc.tone2.on { border-color: var(--d2, #c2620a); background: var(--d2s, #fbeedd); }
.gv-slots { margin-top: 14px; }
.gv-h { font-weight: 700; margin: 14px 0 8px; }
.gv-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gv-big { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 6px; display: grid; gap: 2px; justify-items: center; }
.gv-big .gv-day { font-size: 13px; color: var(--muted); font-weight: 600; }
.gv-big .gv-time { font-size: 19px; font-weight: 700; }
.gv-big .gv-sub { font-size: 12px; color: var(--muted); }
.gv-big.on, .gv-daychip.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.gv-big.on span, .gv-daychip.on span { color: #fff; }
.gv-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.gv-daychip { flex: none; width: 54px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 0; display: grid; justify-items: center; }
.gv-dow, .gv-mon { font-size: 11px; color: var(--muted); } .gv-dom { font-size: 17px; font-weight: 700; }
.gv-times { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.gv-t { min-width: 84px; padding: 9px 10px; }
.gv-picked { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); font-weight: 600; }
/* top "More" menu in the current look */
.more{position:relative} .more-menu{position:absolute;right:0;top:calc(100% + 6px);min-width:200px;background:#fff;color:#202124;border-radius:12px;box-shadow:0 4px 16px rgba(60,64,67,.25);padding:6px 0;z-index:30;display:grid} .more-menu[hidden]{display:none} .more-who{padding:8px 16px 10px;border-bottom:1px solid #e8eaed;display:grid;font-size:14px} .topbar .more-menu button{background:none;border:0;border-radius:0;color:#202124;text-align:left;padding:11px 16px} .topbar .more-menu .more-out{color:#c5221f}
/* new version banner and version line (update-check.js) */
.newver { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: #202124; color: #fff; border-radius: 22px; padding: 8px 8px 8px 16px; font-size: 14px; display: flex; gap: 10px; align-items: center; z-index: 70; box-shadow: 0 4px 14px rgba(0,0,0,.25); white-space: nowrap; }
.newver button { height: 32px; border-radius: 16px; border: 0; background: #8ab4f8; color: #202124; font-weight: 600; padding: 0 14px; }
.verb { font-size: 11px; color: #5f6368; text-align: center; padding: 8px 0 90px; }
@media (min-width: 900px) { .newver { bottom: 24px; } .verb { padding-bottom: 16px; } }
