/* Skhva Clinic — patient app and clinic workspace. "Quiet luxury. Human care."
   Colours, fonts, sizes and radii come from tokens.css (the brand kit); this file uses the semantic tokens only. */

:root {
  /* layout aliases on top of the brand tokens */
  --radius: var(--radius-xl); --shadow: var(--shadow-sm);
  --scrim: rgba(36,37,34,.45);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  /* clinical dental-chart status colours (data, not brand): muted so they sit with the palette */
  --tooth-caries: #E3C77A; --tooth-pulpitis: #D99B78; --tooth-periodontitis: #CF8F86; --tooth-filling: #A9BFCB;
  /* doctors' calendar colours (the clinic's choice; can be changed per doctor in Settings) */
  --doctor-lika: #9B3FE0; --doctor-keti: #1E88E5; --doctor-pati: #F2B705;
  --paid: #2E9E57; --unpaid: #D93A2B;
  --tooth-crown: #C4B08A; --tooth-noncarious: #CDBFD6; --tooth-artificial: #D3D4C8; --tooth-implant: #8C9188;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
/* body text: DejaVu Sans Light for Latin/Cyrillic, BPG DejaVu for Georgian, Noto Sans Hebrew for Hebrew (one stack) */
body { font-family: var(--font-text); font-weight: 300; background: var(--bg); color: var(--ink); font-size: 17px; line-height: 1.53; -webkit-font-smoothing: antialiased; }
html[lang=ka] body { font-size: 16px; line-height: 1.6; }
html[lang=he] body { font-family: var(--font-he); }
body.clinic-mode { font-size: 15px; }
html[lang=ka] body.clinic-mode { font-size: 14.5px; }
:lang(ka) { letter-spacing: 0 !important; }
body.noscroll { overflow: hidden; }
a { color: var(--ink); text-decoration-color: var(--color-platinum); text-underline-offset: 3px; }
/* hierarchy comes from size and colour, not bold */
b, strong { font-weight: 400; color: var(--ink); }
body.clinic-mode b, body.clinic-mode strong { font-weight: 600; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; color: var(--ink); font-family: var(--font-serif); font-weight: 400; }
html[lang=he] :is(h1, h2, h3, h4) { font-family: var(--font-he); font-weight: 500; }
p { margin: .4em 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* focus: 2 px ring, 2 px offset, on every interactive element */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--ink-secondary); } .small { font-size: .86rem; } .center { text-align: center; } .hide { display: none !important; }
.req { color: var(--error); }

/* ---------- layout ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 16px var(--space-5) calc(110px + var(--safe-b)); }
.page.narrow { max-width: 520px; padding-bottom: 40px; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line); padding: calc(10px + var(--safe-t)) var(--space-5) 10px; display: flex; align-items: center; gap: 12px; min-height: 56px; }
.tb-logo { height: 36px; width: auto; }
.tb-title { color: var(--ink); font-size: 18px; line-height: 24px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px; color: var(--ink-secondary); text-decoration: none; font-size: 13px; line-height: 16px; position: relative; min-width: 0; }
.tabbar a svg { color: var(--icon); }
.tabbar a span { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on svg { color: var(--ink); stroke-width: 1.8; }
.dot { position: absolute; top: 3px; left: calc(50% + 6px); background: var(--error); color: var(--on-error); font-style: normal; font-size: 13px; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.menurow .dot { position: static; margin-left: auto; }
.fab-wa { position: fixed; right: 16px; bottom: calc(78px + var(--safe-b)); z-index: 25; width: 54px; height: 54px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; box-shadow: var(--shadow-md); }
[dir=rtl] .fab-wa { right: auto; left: 16px; }
body.has-actions .fab-wa { display: none; }
.fab-wa svg { width: 26px; height: 26px; stroke: none; fill: var(--on-primary); }

/* major title: Decomart (EN/RU), BPG No9 (KA), Noto Sans Hebrew 500 (HE); no numerals in Decomart */
.greet { font-family: var(--font-brand); font-weight: 400; font-size: 28px; line-height: 36px; margin: 10px 0 16px; color: var(--ink); }
html[lang=ka] .greet { font-family: var(--font-ka-major); font-size: 24px; line-height: 34px; }
html[lang=he] .greet { font-family: var(--font-he); font-weight: 500; font-size: 24px; }
.pagetitle { font-size: 22px; line-height: 30px; margin: 6px 0 14px; }
.sec { font-family: var(--font-serif); font-size: 18px; line-height: 24px; color: var(--ink); margin: 26px 2px 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
html[lang=ka] .sec { font-size: 17.5px; }
html[lang=he] .sec { font-family: var(--font-he); font-weight: 500; font-size: 17px; }
.sec .more { font-family: var(--font-text); font-size: 15px; color: var(--ink-secondary); }
.lead { color: var(--ink-secondary); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 16px; margin-bottom: 12px; }
.card h3 { font-size: 18px; line-height: 24px; margin-bottom: 10px; }
html[lang=ka] .card h3 { font-size: 17.5px; }
.card.hl { border-color: var(--line-strong); border-width: 1.25px; }
.empty { text-align: center; color: var(--ink-secondary); padding: 36px 16px; border: 1px dashed var(--color-platinum); border-radius: var(--radius-xl); }
.notice { background: var(--secondary); border-radius: var(--radius-md); padding: 10px 14px; font-size: 15px; color: var(--ink); }
.subhead { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.subhead h2 { font-size: 22px; line-height: 30px; }
.subhead > div { flex: 1; min-width: 0; }
.iconbtn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--secondary); color: var(--ink); display: grid; place-items: center; font-size: 1.5rem; line-height: 1; text-decoration: none; cursor: pointer; flex: none; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.center { justify-content: center; } .row.between { justify-content: space-between; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- buttons & inputs ---------- */
/* primary: Charcoal / Ivory; secondary: Platinum light / Charcoal; labels wrap, never truncate */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius-md); padding: 12px 20px; font-family: var(--font-text); font-size: 16px; line-height: 20px; font-weight: 300; letter-spacing: .03em; cursor: pointer; text-decoration: none; text-align: center; background: var(--secondary); color: var(--on-secondary); min-height: var(--control-height); }
html[lang=ka] .btn, html[lang=he] .btn { letter-spacing: 0; }
.btn:hover { background: var(--secondary-hover); }
.btn.sm { padding: 7px 14px; min-height: var(--control-height-sm); font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; margin: 8px 0; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.primary:hover, .btn.primary:active { background: var(--primary-hover); }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: var(--error); color: var(--on-error); }
.btn.wa { background: var(--primary); color: var(--on-primary); }
.btn.wa:hover, .btn.wa:active { background: var(--primary-hover); }
.btn.wa svg { fill: var(--on-primary); stroke: none; width: 22px; height: 22px; }
.btn:disabled { opacity: .5; cursor: default; }
.fld { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.fld > span { font-size: 15px; color: var(--ink); }
input[type=text], input[type=search], input[type=url], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=datetime-local], input[type=week], input[type=number], input[type=password], input[type=month], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-md); padding: 11px 14px; font-size: 16px; font-weight: 300; min-height: var(--control-height); color: var(--ink); }
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--line-strong); box-shadow: none; }
input::placeholder, textarea::placeholder { color: var(--ink-disabled); }
.codeinput { font-size: 22px; letter-spacing: .18em; text-transform: uppercase; text-align: center; }
.help { color: var(--ink-secondary); font-size: 14px; margin-top: -6px; display: block; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills.col { flex-direction: column; }
.pills.col .pill { text-align: start; }
.pills.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.pill { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius-full); padding: 8px 15px; cursor: pointer; font-size: 15px; text-decoration: none; white-space: nowrap; }
.pills.col .pill { white-space: normal; border-radius: var(--radius-md); }
.pill.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.checkline { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.checkline input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; margin-top: 1px; }
.error { color: var(--error); background: var(--error-bg); padding: 10px 12px; border-radius: 10px; font-size: 15px; }
.missing { outline: 2px solid var(--error); outline-offset: 4px; border-radius: 10px; }
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
.tag { display: inline-block; font-style: normal; font-size: 13px; line-height: 18px; padding: 3px 10px; border-radius: var(--radius-full); background: var(--secondary); color: var(--ink); white-space: nowrap; }
.tag.ok, .st-approved { background: var(--success-bg); color: var(--success); }
.tag.warn, .st-proposed { background: var(--warning-bg); color: var(--warning); }
.st-declined { background: var(--error-bg); color: var(--error); }
.st-replaced, .st-draft { background: var(--secondary); color: var(--ink-secondary); }
.stg-inquiry { background: var(--info-bg); color: var(--info); } .stg-plan { background: var(--warning-bg); color: var(--warning); } .stg-approved, .stg-treatment { background: var(--success-bg); color: var(--success); }
.stg-completed, .stg-followup { background: var(--surface-muted); color: var(--ink); } .stg-archived { background: var(--secondary); color: var(--ink-secondary); }

/* ---------- launch view (charcoal, ivory frame and logo) ---------- */
#launch { position: fixed; inset: 0; z-index: 1000; background: var(--launch-gradient); transition: opacity .3s ease; }
#launch.out { opacity: 0; pointer-events: none; }
#launch .frame { position: absolute; left: 24px; right: 24px; top: calc(var(--safe-t) + 8px); bottom: calc(var(--safe-b) + 8px); border: 1.25px solid var(--color-ivory); border-radius: var(--radius-frame); display: grid; place-items: center; }
#launch img { width: 56vw; max-width: 340px; animation: launch-in .6s ease-out both; }
@keyframes launch-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #launch img { animation: none; } #launch { transition: none; } }

/* ---------- welcome ---------- */
.welcome { min-height: 100vh; min-height: 100dvh; background: var(--welcome-gradient); display: flex; flex-direction: column; align-items: center; padding: calc(var(--safe-t) + 12px) 24px calc(var(--safe-b) + 14px); }
.welcome > * { width: 100%; max-width: 420px; }
.lang-switch { display: inline-flex; width: auto; max-width: 100%; direction: ltr; background: var(--surface-muted); padding: 4px; border-radius: var(--radius-full); gap: 0; flex-wrap: wrap; justify-content: center; }
.lang-switch button { border: 0; background: transparent; color: var(--ink-secondary); padding: 7px 13px; border-radius: var(--radius-full); cursor: pointer; font-size: 13.5px; line-height: 18px; font-family: var(--font-text); font-weight: 300; }
.lang-switch button[data-lang=ka] { font-family: var(--font-ka-text); }
.lang-switch button[data-lang=he] { font-family: var(--font-he); }
.lang-switch button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.w-logo { display: block; width: min(70vw, 320px); max-width: 100%; margin: 70px auto 62px; }
.w-logo.small { width: 200px; max-width: 60%; margin: 24px auto; }
.w-options { display: flex; flex-direction: column; gap: 12px; }
.choice { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 15px 14px; text-decoration: none; color: var(--ink); }
.choice.main { border: 1.25px solid var(--line-strong); }
.choice .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--icon-warm-bg); color: var(--icon-warm); display: grid; place-items: center; flex: none; }
.choice .ic svg { width: 22px; height: 22px; stroke-width: 1.5; }
.choice .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.choice .tx b { font-family: var(--font-serif); font-size: 18px; line-height: 23px; color: var(--ink); font-weight: 400; }
html[lang=ka] .choice .tx b { font-family: var(--font-ka-sub); font-size: 17.5px; line-height: 25px; }
html[lang=he] .choice .tx b { font-family: var(--font-he); font-weight: 500; font-size: 17px; }
.choice .tx small { font-size: 14px; line-height: 19px; color: var(--ink-secondary); }
html[lang=ka] .choice .tx small { font-family: var(--font-ka-text); font-size: 15px; line-height: 21px; }
.choice .chev { width: 18px; height: 18px; color: var(--ink-secondary); flex: none; }
[dir=rtl] .choice .chev { transform: scaleX(-1); }
.w-wa { display: flex; align-items: center; justify-content: center; gap: 12px; height: 54px; border-radius: var(--radius-lg); background: var(--primary); color: var(--on-primary); text-decoration: none; font-size: 16px; line-height: 20px; letter-spacing: .03em; margin-top: auto; padding: 0 16px; text-align: center; }
html[lang=ka] .w-wa, html[lang=he] .w-wa { letter-spacing: 0; }
.w-wa:hover { background: var(--primary-hover); }
.w-wa svg { width: 22px; height: 22px; fill: var(--on-primary); stroke: none; }
.w-spacer { flex: 1 0 40px; }
.w-foot { text-align: center; font-size: 13px; line-height: 18px; color: var(--ink-secondary); margin: 40px 0 0; }
.w-foot a { color: var(--ink-secondary); text-decoration: underline; text-decoration-color: var(--color-platinum); text-underline-offset: 3px; }
.hello { color: var(--ink); font-size: 18px; }
.splash { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--ink-secondary); }
.splash img { width: 22px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .splash img { animation: none; } }

/* ---------- home ---------- */
.journey .stepper { list-style: none; padding: 0; margin: 4px 0 10px; display: flex; gap: 4px; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: max(13px, .66rem); color: var(--ink-secondary); min-width: 0; }
.stepper li i { width: 100%; height: 6px; border-radius: 3px; background: var(--line); }
.stepper li.done i { background: var(--surface-muted); } .stepper li.now i { background: var(--primary); }
.stepper li.now { color: var(--primary); font-weight: 700; }
.stepper li span { line-height: 1.15; display: none; }
.stepper li.now span { display: block; position: absolute; }
.journey .stepper { position: relative; padding-bottom: 18px; }
.stepper li { position: relative; }
.stepper li.now span { top: 12px; white-space: nowrap; }
.stepper li:first-child.now span { left: 0; } .stepper li:last-child.now span { right: 0; }
.stage-desc { font-weight: 500; }
.docnote { background: var(--secondary); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.docnote small { color: var(--primary); font-weight: 600; }
.todo { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 0; border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; cursor: pointer; }
.todo > svg:first-child { color: var(--primary); width: 26px; height: 26px; }
.todo > div:not(.datebadge) { flex: 1; min-width: 0; } .todo b { display: block; color: var(--ink); } .todo small { display: block; color: var(--ink-secondary); font-size: .85rem; }
.todo.accent { background: var(--surface-muted); color: var(--ink); } .todo.accent b { color: var(--ink) !important; } .todo.accent small, .todo.accent svg { color: var(--ink) !important; } .todo.accent b, .todo.accent small, .todo.accent svg { color: var(--on-primary); }
.datebadge { width: 54px; height: 58px; border-radius: 12px; background: var(--secondary); color: var(--primary); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.datebadge b { font-size: 1.35rem; line-height: 1; color: var(--primary) !important; } .datebadge small { font-size: max(13px, .64rem) !important; color: var(--ink) !important; text-align: center; line-height: 1.1; }
.allset { display: flex; gap: 10px; align-items: center; color: var(--success); background: var(--success-bg); padding: 12px 14px; border-radius: 12px; }
.hero-ok { text-align: center; } .hero-ok > svg { width: 52px; height: 52px; color: var(--success); background: var(--success-bg); border-radius: 50%; padding: 10px; } .hero-ok h2 { margin: 10px 0; }

/* ---------- files ---------- */
.filelist { display: flex; flex-direction: column; gap: 8px; }
.filerow { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 0; border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); text-align: left; width: 100%; cursor: pointer; color: var(--ink); }
.thumb { display: block; width: 52px; height: 52px; border-radius: 10px; background: var(--secondary) center/cover no-repeat; flex: none; }
.ficon { width: 52px; height: 52px; border-radius: 10px; background: var(--secondary); display: grid; place-items: center; color: var(--primary); flex: none; }
.fmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; background: none; border: 0; text-align: left; padding: 0; cursor: pointer; }
.fmeta b { overflow-wrap: anywhere; color: var(--ink); } .fmeta small { color: var(--ink-secondary); font-size: .82rem; }
.amt { font-weight: 600; white-space: nowrap; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.amt small { font-weight: 400; color: var(--ink-secondary); font-size: max(13px, .78rem); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.gitem { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.gitem .thumb { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; }
.gitem small { display: block; font-size: max(13px, .74rem); color: var(--ink-secondary); overflow-wrap: anywhere; margin-top: 3px; }
.segs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.segs a { flex: none; text-decoration: none; padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); font-size: .9rem; }
.segs a.on { background: var(--ink); border-color: var(--ink); color: var(--on-primary); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed var(--surface-muted); border-radius: var(--radius); padding: 22px; color: var(--primary); cursor: pointer; background: var(--secondary); margin-bottom: 14px; text-align: center; }
.drop.big { padding: 34px; } .drop.over { background: var(--surface-muted); }
.progrow, .qrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.progrow progress, .qrow progress { flex: 1 1 100%; height: 6px; accent-color: var(--primary); }
.progrow.ok, .qrow.ok { color: var(--success); } .progrow.bad, .qrow.bad { color: var(--error); }
.qrow .qname { flex: 1 1 100%; font-weight: 600; } .qrow .qname small { font-weight: 400; color: var(--ink-secondary); margin-left: 6px; }
.qrow select, .qrow input { width: auto; flex: 1 1 140px; min-height: 40px; padding: 7px 10px; }
.qrow .amt-in { flex: 0 1 110px; }
.mini { display: flex; gap: 4px; align-items: center; font-size: .82rem; } .mini input { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }

/* ---------- plan ---------- */
.planrow { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.planrow > div { flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; } .planrow b { color: var(--ink); } .planrow small { color: var(--ink-secondary); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 8px; }
.tiles div { background: var(--ink); color: var(--on-primary); border-radius: 14px; padding: 12px 14px; }
.tiles div:nth-child(n+2) { background: var(--surface-muted); color: var(--ink); }
.tiles small { display: block; font-size: max(13px, .74rem); opacity: .9; } .tiles b { font-size: 1.15rem; }
.pitem { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 10px; border-left: 4px solid var(--primary); }
.pitem.prio-Urgent { border-left-color: var(--error); } .pitem.prio-Optional { border-left-color: var(--info); }
.pitem-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; } .pitem-h b { color: var(--ink); }
.prio-Urgent .tag.prio { background: var(--error-bg); color: var(--error); } .prio-Optional .tag.prio { background: var(--info-bg); color: var(--info); }
.proc { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.proc span:first-child { display: flex; flex-direction: column; } .proc small { color: var(--ink-secondary); font-size: max(13px, .8rem); }
.proc .ok { color: var(--success); font-weight: 600; } .proc .warn { color: var(--warning); font-weight: 600; }
.phases { margin: 0; padding-left: 0; list-style: none; }
.phases li { display: flex; flex-direction: column; padding: 8px 0 8px 14px; border-left: 3px solid var(--surface-muted); margin-left: 4px; }
.phases li small { color: var(--ink-secondary); } .phases li i { font-style: normal; font-size: .82rem; color: var(--primary); font-weight: 600; }
.sum div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.sum div span:last-child { white-space: nowrap; }
.sum .tot { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 1.15rem; color: var(--primary); }
.opt { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; } .opt.rec { border-color: var(--primary); background: var(--secondary); }
.opt b { display: block; color: var(--ink); } .opt span { font-weight: 600; color: var(--primary); }
.trip { display: flex; gap: 10px; align-items: center; padding: 6px 0; } .trip b { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-muted); display: grid; place-items: center; font-size: max(13px, .8rem); }
.trip span { display: flex; flex-direction: column; } .trip small { color: var(--ink-secondary); }
.decided { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--secondary); }
.decided.ok { background: var(--success-bg); color: var(--success); font-weight: 600; }
.sticky-actions { position: sticky; bottom: calc(70px + var(--safe-b)); display: grid; grid-template-columns: 1fr 2fr; gap: 8px; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 6px; z-index: 5; }
.visit { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; margin-bottom: 10px; }
.visit > div:nth-child(2) { flex: 1; min-width: 0; } .visit b { display: block; color: var(--ink); } .visit small { color: var(--ink-secondary); } .visit p { font-size: .9rem; margin: 4px 0 0; }

/* ---------- more ---------- */
.menu { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.menurow { display: flex; align-items: center; gap: 14px; padding: 15px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); background: var(--surface); }
.menurow:last-child { border-bottom: 0; } .menurow > svg:first-child { color: var(--primary); } .menurow span { flex: 1; display: flex; flex-direction: column; } .menurow small { color: var(--ink-secondary); font-size: .82rem; }
.menurow.static { border-radius: 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.care summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; } .care summary::after { content: '+'; color: var(--primary); font-size: 1.3rem; } .care[open] summary::after { content: '–'; }
.care ul { padding-left: 20px; margin: 10px 0 0; } .care li { margin-bottom: 6px; }
.doctor { display: flex; gap: 16px; align-items: center; background: var(--secondary); }
.doc-symbol { width: 34px; } .doc-name { font-family: var(--font-brand); font-size: 1.45rem; color: var(--ink); margin: 0; }
.contact a { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.contact a:last-child { border-bottom: 0; } .contact svg { color: var(--primary); } .contact a:nth-child(2) svg { color: var(--icon); stroke: none; fill: currentColor; }
.policy h3 { margin: 18px 0 6px; font-size: 1rem; } .policy p { font-size: .94rem; }

/* ---------- forms ---------- */
.form-page .card h3 { color: var(--primary); }
.f-info { white-space: pre-line; color: var(--ink); font-size: .95rem; }
.f-list { padding-left: 20px; margin: 6px 0 10px; } .f-list li { margin-bottom: 6px; font-size: .95rem; }
.q { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.q:last-child { border-bottom: 0; }
.q .pills { margin-top: 6px; } .q .detail { margin-top: 8px; }
.sigbox { position: relative; border: 1.5px dashed var(--ink); border-radius: 14px; background: var(--surface); height: 170px; margin: 8px 0 4px; }
.sigbox canvas { width: 100%; height: 100%; display: block; touch-action: none; border-radius: 14px; }
.sig-hint { position: absolute; left: 14px; bottom: 10px; color: var(--ink-disabled); font-size: .82rem; pointer-events: none; }

/* ---------- sheet / toast / viewer ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { position: relative; background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + var(--safe-b)); animation: up .2s ease-out; }
.sheet.wide { max-width: 900px; }
.sheet h3 { margin-bottom: 12px; padding-right: 40px; }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--secondary); font-size: 1.4rem; cursor: pointer; color: var(--ink); z-index: 2; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } } @keyframes fade { from { opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: calc(140px + var(--safe-b)); transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: var(--on-primary); padding: 11px 18px; border-radius: 12px; z-index: 200; transition: .25s; max-width: 90vw; text-align: center; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.viewer { overflow: hidden; border-radius: 14px; background: var(--surface-inverse); touch-action: none; max-height: 72vh; display: grid; place-items: center; }
.viewer img { max-height: 72vh; transform-origin: center; transition: transform .05s; user-select: none; -webkit-user-drag: none; }
.viewer-cap { text-align: center; color: var(--ink-secondary); }

/* ---------- clinic ---------- */
body.clinic-mode { background: var(--bg); }
.clinic { min-height: 100vh; }
.c-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.c-logo { height: 38px; }
.c-top nav { display: flex; gap: 6px; align-items: center; flex: 1; flex-wrap: wrap; }
.c-top nav a:not(.btn) { text-decoration: none; color: var(--ink); padding: 8px 14px; border-radius: 10px; font-weight: 500; }
.c-top nav a.on { background: var(--secondary); color: var(--ink); }
.c-main { max-width: 1180px; margin: 0 auto; padding: 18px 20px 60px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.cgrid .wide { grid-column: 1 / -1; }
.count { font-style: normal; font-size: max(13px, .78rem); background: var(--secondary); color: var(--primary); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.crow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.crow:last-child { border-bottom: 0; } .crow > a, .crow > div:first-child { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); flex: 1; min-width: 0; }
a.crow { flex-direction: column; align-items: flex-start; } a.crow.big { flex-direction: row; align-items: center; background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); border: 0; }
a.crow.big > div { flex: 1; display: flex; flex-direction: column; }
.crow small { color: var(--ink-secondary); font-size: .84rem; }
.alerts { display: flex; gap: 6px; align-items: flex-start; color: var(--error); font-size: .82rem; margin-top: 4px; } .alerts svg { width: 16px; height: 16px; }
.stagebar { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.stg { background: var(--surface); border-radius: 12px; padding: 10px 14px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; min-width: 120px; box-shadow: var(--shadow); }
.stg b { font-size: 1.5rem; color: var(--ink); }
.phead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.phead h1 { font-size: 1.6rem; }
.stage-sel { width: auto; min-width: 170px; }
.alertbox { display: flex; gap: 12px; background: var(--error-bg); color: var(--error); border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; }
.alertbox p { margin: 2px 0 0; color: var(--ink); }
.narrowc { max-width: 720px; }
.invite { display: flex; gap: 16px; align-items: flex-start; background: var(--secondary); border-radius: 14px; padding: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.invite .code { font-size: 1.6rem; letter-spacing: .12em; color: var(--ink); margin: 2px 0; }
.invite .link { font-size: max(13px, .78rem); word-break: break-all; color: var(--ink-secondary); }
.qr svg { width: 150px; height: 150px; background: var(--surface); border-radius: 8px; stroke: none; }
.sigimg { max-height: 70px; background: var(--surface); border-radius: 8px; border: 1px solid var(--line); padding: 4px; }
.linkish { color: inherit; }

/* ---------- printable form ---------- */
.printform { background: var(--surface); color: var(--ink); padding: 24px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.pf-head { display: flex; gap: 18px; align-items: center; border-bottom: 3px solid var(--primary); padding-bottom: 12px; margin-bottom: 14px; font-size: 11.5px; color: var(--ink-secondary); }
.pf-head img { height: 54px; }
.printform h2 { color: var(--primary); font-size: 18px; margin-bottom: 6px; } .printform h4 { color: var(--primary); margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
html[lang=ka] .printform h4 { text-transform: none; }
.pf-meta { color: var(--ink-secondary); } .pf-info { white-space: pre-line; }
.pf-flags { background: var(--error-bg); color: var(--error); padding: 8px 12px; border-radius: 8px; margin: 10px 0; }
.pf-qa { width: 100%; border-collapse: collapse; } .pf-qa td { border-bottom: 1px solid var(--line); padding: 5px 6px; vertical-align: top; } .pf-qa td:first-child { width: 62%; color: var(--ink-secondary); }
.pf-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 22px; break-inside: avoid; }
.pf-sigs img { max-height: 80px; display: block; } .pf-sigs span { display: block; border-top: 1px solid var(--ink); padding-top: 4px; font-size: 11px; color: var(--ink-secondary); }
body.printbody { background: var(--surface); } body.printbody .printform { box-shadow: none; padding: 0; }
@media print { body.printbody { margin: 12mm; } .pf-sigs { page-break-inside: avoid; } }

@media (min-width: 900px) {
  .page { padding-top: 24px; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- clinic Wix Forms ---------- */
.wf-block { margin: 6px 0 12px; line-height: 1.5; } .wf-block h3, .wf-block h4 { margin: 14px 0 6px; color: var(--primary); } .wf-block p { margin: 0 0 8px; } .wf-block ul, .wf-block ol { padding-left: 20px; margin: 0 0 8px; }
.rich-img { max-width: 100%; border-radius: 8px; }
.imgchoice { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.imgchoice button { border: 2px solid var(--line); border-radius: 10px; padding: 4px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.imgchoice button.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; } .imgchoice img { width: 100%; aspect-ratio: 2/1; object-fit: cover; border-radius: 6px; }
.wf-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: .85rem; }
.chip button { border: 0; background: none; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.formbtns { display: flex; flex-wrap: wrap; gap: 8px; } .formbtns .btn.pt { border-color: var(--primary); }
.card.sub { background: var(--bg); margin: 10px 0; }
.ftable { width: 100%; border-collapse: collapse; margin: 10px 0 14px; } .ftable td { padding: 6px 4px; border-bottom: 1px solid var(--line); } .ftable td:last-child { width: 190px; }
.docview { margin-top: 12px; overflow-x: auto; }
.pf-sigline { display: flex; align-items: flex-end; gap: 14px; margin: 14px 0; break-inside: avoid; } .pf-sigline span { color: var(--ink-secondary); min-width: 40%; }
.pf-sig { max-height: 80px; max-width: 260px; } .pf-img { max-width: 220px; max-height: 160px; border-radius: 6px; margin: 2px; vertical-align: top; }
.printform .pf-info p { margin: 0 0 6px; } .printform .pf-info h3, .printform .pf-info h4 { color: var(--primary); margin: 12px 0 6px; font-size: 14px; } .printform .pf-info { white-space: normal; }
.pdf-holder { position: fixed; left: -10000px; top: 0; width: 794px; background: var(--surface); }
.pdf-holder .printform { border-radius: 0; }

/* treatment plan pictures */
.plan-imgs { margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } .plan-imgs .gitem small { white-space: normal; }

/* sign-in choice, payments */

.payrow small { display: block; margin-top: 2px; } .payrow .amt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; } small.warn { color: var(--warning); }

/* messages and notifications */
.card.msg { border-left: 3px solid var(--line-strong); } .card.msg p { margin: 4px 0 0; }
.msgline { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 8px; } .msgline p { margin: 2px 0 0; }
.notices { margin-top: 10px; } .notices summary { cursor: pointer; color: var(--ink-secondary); font-size: .85rem; } .notices .small { padding: 3px 0; border-bottom: 1px dashed var(--line); }

/* inquiry attachments */
.inqfiles { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; } .inqfiles b { font-size: .92rem; } .inqfiles .wf-files { margin-top: 6px; }
a.disabled { pointer-events: none; opacity: .45; }

.phonerow { display: flex; gap: 8px; } .phonerow select { flex: 0 0 auto; max-width: 46%; } .phonerow input { flex: 1; min-width: 0; }
.fld.missing input, .fld.missing select { border-color: var(--error); }

/* ---------- right-to-left (Hebrew) ---------- */
[dir=rtl] .fab-wa { right: auto; left: 16px; }
[dir=rtl] .menurow .dot { margin-left: 0; margin-right: auto; }
[dir=rtl] .card.msg { border-left: 0; border-right: 3px solid var(--line-strong); }
[dir=rtl] .pitem { border-left: 0; border-right: 4px solid var(--primary); }
[dir=rtl] .pitem.prio-Urgent { border-right-color: var(--error); } [dir=rtl] .pitem.prio-Optional { border-right-color: var(--info); }
[dir=rtl] .pills.col .pill, [dir=rtl] .todo, [dir=rtl] .filerow, [dir=rtl] .fmeta, [dir=rtl] .gitem { text-align: right; }
[dir=rtl] .amt { text-align: left; align-items: flex-start; }
[dir=rtl] .qrow .qname small, [dir=rtl] .count { margin-left: 0; margin-right: 6px; }
[dir=rtl] .phases li { padding: 8px 14px 8px 0; border-left: 0; border-right: 3px solid var(--surface-muted); margin-left: 0; margin-right: 4px; }
[dir=rtl] .care ul, [dir=rtl] .f-list, [dir=rtl] .wf-block ul, [dir=rtl] .wf-block ol { padding-left: 0; padding-right: 20px; }
[dir=rtl] .sig-hint { left: auto; right: 14px; }
[dir=rtl] .sheet h3 { padding-right: 0; padding-left: 40px; }
[dir=rtl] .sheet-x { right: auto; left: 12px; }
[dir=rtl] .stepper li:first-child.now span { left: auto; right: 0; } [dir=rtl] .stepper li:last-child.now span { right: auto; left: 0; }
[dir=rtl] svg.chev, [dir=rtl] .subhead .iconbtn { transform: scaleX(-1); }
[dir=rtl] input[type=tel], [dir=rtl] input[type=email], [dir=rtl] .phonerow select { direction: ltr; text-align: right; }

/* ---------- clinic workspace: side menu on computers, top bar on phones ---------- */
.clinic { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.clinic > * { min-width: 0; }
.crow > .row { flex-wrap: wrap; }
.c-side { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
.c-brand img { display: block; } .c-logo.full { display: none; } .c-logo.mark { height: 34px; width: auto; }
.c-nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; min-width: 0; }
.c-nav a { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 15px; }
.c-nav a svg { width: 19px; height: 19px; color: var(--icon); } .c-nav a:hover { background: var(--bg); }
.c-nav a.on { background: var(--secondary); color: var(--ink); } .c-nav a.on svg { color: var(--ink); }
.c-foot { display: flex; gap: 8px; align-items: center; }
@media (min-width: 1000px) {
  .clinic { grid-template-columns: 228px minmax(0, 1fr); }
  .c-side { height: 100vh; flex-direction: column; align-items: stretch; flex-wrap: nowrap; border-bottom: 0; border-right: 1px solid var(--line); padding: 18px 12px; gap: 18px; }
  .c-brand { padding: 4px 8px 8px; } .c-logo.full { display: block; width: 172px; height: auto; } .c-logo.mark { display: none; }
  .c-nav { flex-direction: column; overflow: visible; flex: 1; }
  .c-nav a { padding: 9px 12px; }
  .c-foot { flex-direction: column; align-items: stretch; }
  .c-main { max-width: 1480px; margin: 0; padding: 22px 28px 60px; width: 100%; }
  .cgrid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
}
.mt { margin-top: 10px; }
.w60 { width: 70px !important; flex: none; }
.row.nowrap { flex-wrap: nowrap; }
.auto { display: inline-flex; align-items: center; gap: 4px; font-size: max(13px, .7rem); font-weight: 600; background: var(--success-bg); color: var(--success); border-radius: 5px; padding: 0 6px; vertical-align: 2px; white-space: nowrap; }
.auto::before { content: "↻"; }
.code { font: 600 .74rem/1.5 'Noto Sans', monospace; background: var(--info-bg); color: var(--info); border-radius: 5px; padding: 0 6px; white-space: nowrap; }
.code.alt { background: var(--secondary); color: var(--primary-hover); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: .84rem; cursor: pointer; color: var(--ink); }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.alertin { border-color: var(--error) !important; background: var(--error-bg); }
.grid4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; }

/* medical card */
.mc-head h3 { margin-bottom: 2px; }
.mc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; margin: 14px 0; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 18px; margin-bottom: 8px; }
.kv span { display: block; font-size: max(13px, .74rem); color: var(--ink-secondary); } .kv b { font-weight: 500; overflow-wrap: anywhere; }
.savebar { position: sticky; bottom: 12px; z-index: 15; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--ink); color: var(--on-primary); border-radius: 12px; padding: 10px 14px; margin: 12px 0; box-shadow: var(--shadow); }
.vrow { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.vrow:hover { background: var(--secondary); }
.vrow .vd { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; } .vrow .vd small { display: block; font-weight: 400; color: var(--ink-secondary); }
.vrow .vb b { display: block; } .vrow .vb small { color: var(--ink-secondary); }

/* tooth chart */
.odo { overflow-x: auto; padding-bottom: 4px; }
.odo-in { min-width: 740px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.jaw { display: flex; gap: 14px; } .quad { display: flex; gap: 3px; }
.jawlbl { font-size: .7rem; color: var(--ink-secondary); letter-spacing: .05em; }
.midline { width: 100%; max-width: 720px; height: 1px; background: var(--line); margin: 3px 0; }
.tooth { width: 41px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 3px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; position: relative; cursor: pointer; }
.tooth:hover { border-color: var(--primary); }
.tooth.mark { outline: 2px solid var(--primary); outline-offset: 1px; background: var(--secondary); }
.tooth svg { width: 24px; height: 36px; fill: none; stroke: none; }
.tooth svg path { fill: var(--surface); stroke: var(--icon); stroke-width: 1.2; }
.tooth .tn { font-size: .66rem; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.tooth .ts { font-size: .7rem; font-weight: 700; min-height: 15px; line-height: 15px; color: var(--ink); white-space: nowrap; }
.tooth .tk { position: absolute; top: 1px; right: 3px; font-size: .55rem; font-style: normal; color: var(--ink-secondary); }
.st-C path.cr { fill: var(--tooth-caries) !important; } .st-P path.cr { fill: var(--tooth-pulpitis) !important; } .st-Pt path { fill: var(--tooth-periodontitis) !important; }
.st-F path.cr { fill: var(--tooth-filling) !important; } .st-K path.cr { fill: var(--tooth-crown) !important; } .st-A svg { opacity: .18; }
.st-R path.cr { fill: none !important; stroke-dasharray: 2 2; } .st-N path.cr { fill: var(--tooth-noncarious) !important; } .st-X path { fill: var(--tooth-artificial) !important; }
.st-M path { stroke: var(--error) !important; } .st-T path { stroke-dasharray: 3 2; } .st-I path.rt { fill: var(--tooth-implant) !important; }
.odo-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; margin-top: 8px; color: var(--ink-secondary); }
.odo-legend b { display: inline-block; min-width: 22px; text-align: center; border-radius: 4px; background: var(--secondary); color: var(--ink); margin-right: 4px; }
.tpop { position: fixed; z-index: 150; width: 320px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md); padding: 12px 14px; }
.tpop h4 { color: var(--ink); }
.topts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 8px 0; }
.topts button, .tcls button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 4px 6px; font-size: max(13px, .8rem); text-align: left; cursor: pointer; }
.topts button.on, .tcls button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.tcls { display: flex; gap: 4px; margin: 3px 0 8px; } .tcls button { flex: 1; text-align: center; }

/* visit record editor */
.ve-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ve-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.ve-main, .ve-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ve-main .card, .ve-side .card { margin: 0; }
@media (min-width: 1100px) { .ve-grid { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); } .ve-side { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow: auto; } }
.bookpick { display: flex; flex-wrap: wrap; gap: 6px; }
.codepick { position: relative; }
.codepick input { width: 100%; }
.codelist { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 320px; overflow: auto; padding: 4px; }
.codelist button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: .86rem; }
.codelist button:hover { background: var(--secondary); }
.selcodes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.selcode { display: inline-flex; align-items: center; gap: 6px; background: var(--secondary); border-radius: 8px; padding: 4px 6px 4px 8px; font-size: .86rem; }
.selcode button { border: 0; background: none; font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--ink-secondary); }
.ncsplist { max-height: 340px; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 2px 10px; }
.ncsp { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .88rem; cursor: pointer; }
.ncsp:last-child { border-bottom: 0; }
.rxrow { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.amrq { background: var(--info-bg); border-radius: 8px; padding: 6px 8px; margin: 6px 0; }
.sigbox { position: relative; }
.sigprev { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-height: 70%; max-width: 70%; pointer-events: none; opacity: .9; }

/* journals */
.jtable { border-collapse: collapse; width: 100%; font-size: max(13px, .8rem); }
.jtable th { background: var(--secondary); color: var(--ink); font-size: max(13px, .7rem); font-weight: 600; text-align: left; padding: 6px; border: 1px solid var(--line); min-width: 70px; vertical-align: bottom; }
.jtable td { border: 1px solid var(--line); padding: 5px 6px; vertical-align: top; background: var(--surface); }
.jtable tr[data-vid] { cursor: pointer; } .jtable tr[data-vid]:hover td { background: var(--secondary); }
.tw { overflow-x: auto; }
.doctors input { width: 100%; min-width: 90px; } .doctors td.c { text-align: center; }
.savebar[hidden], .codelist[hidden] { display: none; }

/* ---------- calendar ---------- */
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; font-size: .86rem; }
.cal-legend a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.cal-legend a.off { opacity: .45; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-legend small { color: var(--ink-secondary); }
.cal { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.cal-grid { display: grid; min-width: 760px; }
.cal-h { position: sticky; top: 0; z-index: 3; background: var(--secondary); padding: 8px; font-size: .8rem; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.cal-h a { color: inherit; text-decoration: none; }
.cal-h.today { background: var(--primary); } .cal-h.today a { color: var(--on-primary); }
.cal-hours div { font-size: .7rem; color: var(--ink-secondary); text-align: right; padding: 0 6px; border-bottom: 1px dashed var(--line); box-sizing: border-box; font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--line); }
.cal-slot { border-bottom: 1px dashed var(--line); box-sizing: border-box; cursor: copy; }
.cal-slot:hover { background: var(--secondary); }
.cal-ev { position: absolute; z-index: 2; text-align: left; border: 0; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--ink); border-radius: 7px; padding: 3px 6px; font-size: .74rem; line-height: 1.25; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.cal-ev:hover { z-index: 4; box-shadow: var(--shadow-md); }
.cal-ev b { font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.cal-ev span { white-space: nowrap; overflow: hidden; text-overflow: clip; color: var(--ink-secondary); }
.cal-ev .who { color: var(--c); font-weight: 600; }
.cal-ev i { font-style: normal; font-size: .66rem; color: var(--ink-secondary); }
.cal-ev.cancelled, .cal-ev.declined { opacity: .5; text-decoration: line-through; }
.cal-ev.pending { border-left-style: dashed; }
.cal-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 120; width: min(440px, 100vw); background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow-md); padding: 22px 18px 30px; overflow: auto; }
.cal-panel h3 { margin-bottom: 4px; padding-right: 40px; }
.col-actions { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.card.sub { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slots button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 10px; font-size: .86rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.slots button.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.nb-res { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.nb-res button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; }
.nb-res button small { color: var(--ink-secondary); }
.banner { background: var(--warning-bg); color: var(--warning); border-radius: 10px; padding: 10px 12px; }
.phead .row input[type=date], .phead .row input[type=month] { width: auto; }
#toast { white-space: pre-line; }

/* ---------- check-out & salaries ---------- */
.vline { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.vline .vrow { flex: 1; min-width: 0; border-bottom: 0; }
.vline > .btn { flex: none; min-height: 34px; padding: 6px 12px; white-space: nowrap; }
.cotable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cotable th { text-align: left; font-size: max(13px, .74rem); font-weight: 600; color: var(--ink-secondary); padding: 4px 4px 6px; border-bottom: 1px solid var(--line); }
.cotable td { padding: 5px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cotable input, .cotable select { min-height: 38px; padding: 7px 8px; font-size: .92rem; border-radius: 9px; }
.cotable td:first-child { min-width: 200px; } .cotable td:nth-child(2) { min-width: 150px; }
.cotable .btn.sm { min-height: 34px; padding: 4px 10px; }
th.r, td.r, input.r { text-align: right; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.w80 { width: 92px !important; flex: none; }
.cototal { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding: 12px 14px; background: var(--secondary); border-radius: 12px; color: var(--ink); }
.cototal b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pay button { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 9px 8px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.pay button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.warnline { color: var(--warning); }
.salcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.salcards .card { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.salcards .big { font-size: 1.7rem; font-weight: 700; color: var(--primary); margin: 6px 0 2px; }
.jtable tr[data-pid] { cursor: pointer; } .jtable tr[data-pid]:hover td { background: var(--secondary); }

/* ---------- treated teeth, visit editor additions ---------- */
.odo.treated .tooth.idle { cursor: default; opacity: .55; }
.odo.treated .tooth.idle:hover { border-color: var(--line); }
.odo.treated .tooth.done { background: var(--surface-muted); border-color: var(--primary); }
.odo.treated .tooth.done svg path { fill: var(--icon-warm-bg); stroke: var(--primary); }
.odo.treated .tooth.done .ts { color: var(--primary); }
.tpop.tinfo { width: 380px; max-height: 70vh; overflow: auto; }
.tline { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); border-radius: 8px; }
.tline:hover { background: var(--secondary); }
.tline small { color: var(--ink-secondary); }
.ncspgrp { padding: 6px 0 4px; border-bottom: 1px solid var(--line); }
.ncspgrp:last-child { border-bottom: 0; }
.ncspgrp > b { display: block; font-size: .84rem; color: var(--ink); margin: 4px 0 2px; }
.codelist button.on { background: var(--secondary); font-weight: 600; }
.chip.radio input { display: none; }
.checkline.big { font-size: 1.02rem; }
.disc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
/* ---------- Today: boxes open on click, birthdays ---------- */
details.dbox > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.dbox > summary::-webkit-details-marker { display: none; }
details.dbox > summary::after { content: '▾'; color: var(--ink-secondary); transition: transform .15s; }
details.dbox[open] > summary::after { transform: rotate(180deg); }
details.dbox > summary h3 { margin: 0; }
details.dbox[open] > summary { margin-bottom: 10px; }
.count.some { background: var(--primary); color: var(--on-primary); }
.crow.bday .linkish { text-align: left; flex: 1; display: flex; flex-direction: column; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.crow.bday.past { opacity: .6; }
.crow.bday.today b { color: var(--primary); }
.linkish small { color: var(--ink-secondary); }
/* ---------- coupons, documents ---------- */
.code.big { font-size: .95rem; letter-spacing: .04em; }
.tag.cst-ok { background: var(--success-bg); color: var(--success); } .tag.cst-done { background: var(--info-bg); color: var(--info); }
.tag.cst-off { background: var(--secondary); color: var(--ink-secondary); } .tag.cst-soon { background: var(--warning-bg); color: var(--warning); }
.cbig { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.cbig.cst-ok { border-color: var(--primary); background: var(--success-bg); }
.cbig .ok { color: var(--primary); font-weight: 600; }
.deals textarea, .deals input { width: 100%; min-width: 120px; }
.deals td { vertical-align: top; }
.range { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.range input[type=date] { width: auto; min-height: 40px; padding: 7px 8px; }
.range select { width: auto; min-height: 40px; padding: 7px 8px; }
.dbar { align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.dbar .fld { margin: 0; }
.row.wrap { flex-wrap: wrap; }
.tag.pay-paid { background: var(--success-bg); color: var(--success); } .tag.pay-partial { background: var(--warning-bg); color: var(--warning); } .tag.pay-unpaid { background: var(--error-bg); color: var(--error); }
.segs { overflow-x: auto; }
.deals td:nth-child(1) { min-width: 180px; } .deals td:nth-child(2) { min-width: 240px; } .deals td:nth-child(4) { min-width: 150px; }

/* ---------- calendar: fills the screen; payment and arrival marks ---------- */
.c-main:has(.cal) { max-width: none; }
.cal-ev { font-size: 13px; line-height: 1.3; padding: 4px 22px 4px 7px; border-left-width: 5px; background: color-mix(in srgb, var(--c) 22%, var(--surface)) !important; }
.cal-ev b { font-size: 13px; }
.cal-ev span { font-size: 12.5px; }
.cal-ev .who { color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.paymark { position: absolute; top: 3px; right: 3px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10.5px !important; line-height: 1; color: var(--on-primary) !important; }
.paymark.paid { background: var(--paid); }
.paymark.unpaid, .paymark.partial { background: var(--unpaid); }
.paymark.partial { background: linear-gradient(90deg, var(--paid) 50%, var(--unpaid) 50%); }
.vmark { font-style: normal; font-size: 11.5px !important; color: var(--paid) !important; }
.vmark.miss { color: var(--unpaid) !important; }
.status-row { margin: 10px 0 2px; }
/* ---------- Today: the clinic's day ---------- */
.dayview { margin-bottom: 18px; }
.daytiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.dt { border-radius: var(--radius-xl); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; border: 1px solid transparent; }
.dt small { font-size: 13px; color: inherit; opacity: .85; }
.dt b { font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 1.15; color: inherit; }
.dt.t-pat { background: var(--info-bg); color: var(--info); }
.dt.t-in { background: var(--success-bg); color: var(--success); }
.dt.t-wait { background: var(--warning-bg); color: var(--warning); }
.dt.t-miss { background: var(--error-bg); color: var(--error); }
.dt.t-cancel { background: var(--secondary); color: var(--ink-secondary); }
.dt.t-money { background: var(--primary); color: var(--on-primary); }
.daygrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 1100px) { .daygrid { grid-template-columns: minmax(0, 2.3fr) minmax(260px, 1fr); } }
.trow { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; grid-template-areas: "tt tm ts" "tt ta ta"; gap: 6px 14px; padding: 12px 12px 12px 14px; border-left: 5px solid var(--c); border-radius: 12px; background: color-mix(in srgb, var(--c) 9%, var(--surface)); margin-bottom: 10px; align-items: start; }
.trow .tt { grid-area: tt; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.trow .tt b { font-size: 18px; } .trow .tt small { color: var(--ink-secondary); font-size: 13px; }
.trow .tm { grid-area: tm; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trow .tm a { text-decoration: none; } .trow .tm b { font-size: 17px; }
.trow .tm small { color: var(--ink-secondary); font-size: 14px; }
.tdoc { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink); }
.tdoc i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.trow .ts { grid-area: ts; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.trow .ta { grid-area: ta; display: flex; flex-wrap: wrap; gap: 6px; }
.trow .ta:empty { display: none; }
.trow.st-cancelled { opacity: .55; } .trow.st-cancelled .tm b { text-decoration: line-through; }
.trow.st-missed { background: color-mix(in srgb, var(--error) 7%, var(--surface)); }
.stpill { font-size: 13px; padding: 3px 10px; border-radius: var(--radius-full); white-space: nowrap; }
.stpill.st-scheduled { background: var(--warning-bg); color: var(--warning); }
.stpill.st-arrived { background: var(--info-bg); color: var(--info); }
.stpill.st-done { background: var(--success-bg); color: var(--success); }
.stpill.st-missed { background: var(--error-bg); color: var(--error); }
.stpill.st-cancelled { background: var(--secondary); color: var(--ink-secondary); }
.paybadge { font-size: 13px; padding: 3px 10px; border-radius: var(--radius-full); white-space: nowrap; color: var(--on-primary); }
.paybadge.paid { background: var(--paid); }
.paybadge.unpaid { background: var(--unpaid); }
.paybadge.partial { background: var(--warning); }
.dayincome .bigsum { font-family: var(--font-serif); font-size: 34px; line-height: 1.2; margin: 2px 0 10px; }
.dayincome h4 { font-family: var(--font-text); font-size: 13px; color: var(--ink-secondary); margin: 12px 0 4px; font-weight: 300; }
.irow { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.irow b { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .trow { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "tt tm" "tt ts" "ta ta"; } .trow .ts { align-items: flex-start; flex-direction: row; flex-wrap: wrap; } }

/* Today: medical card status and consultation box */
.cardbadge { display: inline-block; margin-top: 4px; font-size: 13px; padding: 3px 10px; border-radius: var(--radius-full); text-decoration: none; width: fit-content; }
.cardbadge.ok { background: var(--success-bg); color: var(--success); }
.cardbadge.missing { background: var(--unpaid); color: var(--on-primary); }
.cardbadge.todo { background: var(--secondary); color: var(--ink-secondary); }
.cardbadge.consult { background: var(--info-bg); color: var(--info); }
.consultbox { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-secondary); margin-top: 4px; cursor: pointer; }
.consultbox input { width: 17px; height: 17px; accent-color: var(--primary); }
.paybadge.free { background: var(--secondary); color: var(--ink-secondary); }

/* calendar: times blocked in the doctors' own calendars (not bookable online) */
.cal-block { position: absolute; left: 0; right: 0; z-index: 1; border-left: 3px solid color-mix(in srgb, var(--c) 60%, var(--surface)); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, var(--surface)) 0 7px, color-mix(in srgb, var(--ink) 7%, var(--surface)) 7px 14px); cursor: not-allowed; overflow: hidden; }
.cal-block span { display: block; font-size: 12px; line-height: 1.2; padding: 3px 6px; color: var(--ink-secondary); }
/* time blocked by the clinic in this calendar: opens to remove it */
.cal-block.own { cursor: pointer; border-left-color: var(--c); }
.cal-block.own:hover, .cal-block.own:focus-visible { outline: 2px solid color-mix(in srgb, var(--c) 55%, transparent); outline-offset: -2px; }
.blk-docs { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.blk-docs .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* invoices and left-to-pay */
.leftpay { display: block; color: var(--error) !important; font-size: 13.5px; margin-top: 2px; }
.leftpay b { color: var(--error); }
.owed { color: var(--error); }
.invtable td { vertical-align: top; } td.nowrap { white-space: nowrap; } td.nowrap .btn { margin: 0 4px 4px 0; }
.crow .cardbadge { margin-right: 6px; }
/* forms sent to the patient (Forms tab) */
.sfopts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 16px; margin: 8px 0; }
.row.wrap { flex-wrap: wrap; }
.fld.inline { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.fld.inline select { width: auto; }
.sfh { margin: 18px 0 4px; font-size: 15px; }
.rqforms { margin-top: 6px; }
#sendforms .crow .tag { align-self: flex-start; width: max-content; }
#sendforms .rqforms { display: flex; flex-wrap: wrap; gap: 6px; }
/* feedback page */
.feedback .lang-switch { justify-content: center; margin: 8px 0 4px; }
.fb-logo { display: block; width: 190px; max-width: 60%; margin: 18px auto 20px; }
.fb-stars { display: flex; gap: 6px; margin: 6px 0 2px; }
.fb-stars button { font-size: 40px; line-height: 1; padding: 2px 4px; border: 0; background: none; color: var(--line-strong); cursor: pointer; transition: transform .12s, color .12s; }
.fb-stars button.on { color: #E8A317; }
.fb-stars button:hover { transform: scale(1.12); }
.fb-stars.done { justify-content: center; color: #E8A317; font-size: 34px; letter-spacing: 4px; }
.fb-word { min-height: 18px; color: var(--ink-secondary); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* clinic feedback page */
.fbst { color: #E8A317; letter-spacing: 1px; } .fbst i { color: var(--line-strong); font-style: normal; }
.fbrow.new { border-left: 3px solid var(--primary); padding-left: 10px; }
.fbtext { margin: 6px 0; white-space: pre-wrap; }
.fblink { background: var(--secondary); padding: 6px 10px; border-radius: 8px; word-break: break-all; }
.fbbars div { display: grid; grid-template-columns: 26px 1fr 22px; align-items: center; gap: 6px; font-size: 12px; }
.fbbars i { display: block; height: 6px; border-radius: 3px; background: #E8A317; min-width: 2px; }
/* anatomical areas chart (visit record, beside the teeth) */
.areas { display: grid; gap: 6px; margin-top: 6px; }
.arhead, .arrow { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.arhead span { font-size: 11px; color: var(--ink-secondary); text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.area { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; min-height: 52px; color: var(--ink); }
.area b { font-size: 13px; font-weight: 600; } .area small { font-size: 12px; color: var(--ink-secondary); }
.area:hover { border-color: var(--line-strong); }
.area.good { background: var(--success-bg); border-color: transparent; }
.area.bad { background: var(--warning-bg); border-color: var(--warning); } .area.bad small { color: var(--warning); font-weight: 600; }
.area.mark { box-shadow: 0 0 0 2px var(--primary); }
@media (max-width: 560px) { .area b { font-size: 12px; } .area { padding: 6px; } }
/* orthodontic part of the card */
.otable input, .otable select { width: 100%; min-width: 70px; padding: 4px 6px; font-size: 13px; }
.otable input[type=date] { min-width: 130px; }
.w80 { max-width: 110px; }
/* printed card: teeth with a finding or treated */
.pf-teeth td.on { background: #f3efe6; } .pf-teeth td.tno { font-size: 9px; color: #666; }
/* a kept signature while correcting a filled form */
.sigkept { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; } .sigkept img { max-height: 70px; max-width: 220px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.rxgrid td, .rxgrid th { font-size: 12px; }
.code.i11 { background: var(--info-bg); color: var(--info); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--ink-secondary); text-decoration: underline; cursor: pointer; font: inherit; }
.linkbtn.small { font-size: 12px; }
/* feedback page shown inside the website (#/feedback?embed=1) */
body.embedded { background: transparent; }
.feedback.embed { padding-top: 4px; }
.feedback.embed .fb-logo { display: none; }
.feedback .subhead { margin-bottom: 4px; }

/* ================================================================ SkhvaMe (My care, Passport, Messages, Comfort, sharing, demo) */
.demobar { position: sticky; top: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--color-taupe-tint); color: var(--color-taupe-deep); font-size: 14px; padding: 8px 16px; }
.demobar a { color: var(--color-taupe-deep); font-weight: 600; white-space: nowrap; }
.w-demo { display: block; text-align: center; margin-top: 14px; color: var(--ink-secondary); font-size: 15px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row.wrap { flex-wrap: wrap; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--ink-secondary); } .kv b { font-weight: 600; text-align: end; }
.verified { display: flex; align-items: center; gap: 6px; color: var(--success); margin: -6px 0 12px; }
.verified svg, .muted.small > svg, p.small > svg { width: 16px; height: 16px; flex: none; vertical-align: -3px; margin-inline-end: 4px; }
.ppitem h3 { margin: 0 0 6px; font-size: 17px; }
.warr { margin-top: 10px; } .warr summary { cursor: pointer; color: var(--ink-secondary); font-size: 15px; }
.wrow { margin-top: 8px; } .wrow b { display: block; } .wrow span { color: var(--ink-secondary); font-size: 14px; } .wrow p { margin: 4px 0 0; font-size: 14px; }
/* tooth chart (FDI, as the dentist sees it) */
.tchart { overflow-x: auto; padding-bottom: 4px; }
.tside { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-secondary); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.tchart .trow { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 2px; }
.tchart .trow.up { border-bottom: 1.5px dashed var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.tcell { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 4px 0 3px; font: inherit; color: var(--ink); cursor: pointer; min-height: 52px; }
.tcell i svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.tchart .trow.lo .tcell i { transform: scaleY(-1); }
.tcell b { font-size: 11px; font-weight: 600; line-height: 1.1; } .tcell small { font-size: 10px; line-height: 1; }
@media (max-width: 420px) { .tchart .tcell { border-radius: 6px; min-height: 46px; } .tcell i svg { width: 14px; height: 14px; } .tcell b { font-size: 10px; letter-spacing: -.02em; } }
div.tcell { cursor: default; }
.tcell:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.g-need { background: var(--warning-bg) !important; color: var(--warning) !important; border-color: var(--warning) !important; }
.g-treated { background: var(--info-bg) !important; color: var(--info) !important; }
.g-missing { background: var(--surface-muted) !important; color: var(--ink-disabled) !important; border-style: dashed !important; }
.g-other { background: var(--color-taupe-tint) !important; color: var(--color-taupe-deep) !important; }
.tlegend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tlegend span { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); }
/* oral health overview */
.ohlist { list-style: none; margin: 0; padding: 0; }
.ohlist li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ohlist li:last-child { border-bottom: 0; }
.ohlist b { display: block; } .ohlist small { color: var(--ink-secondary); }
.tag.lv-urgent { background: var(--error-bg); color: var(--error); } .tag.lv-soon { background: var(--warning-bg); color: var(--warning); }
.tag.lv-routine { background: var(--info-bg); color: var(--info); } .tag.lv-watch { background: var(--secondary); }
.hist { list-style: none; margin: 0; padding: 0; } .hist li { padding: 8px 0; border-bottom: 1px solid var(--line); } .hist li:last-child { border-bottom: 0; }
.hist small { display: block; color: var(--ink-secondary); } .hist b { display: block; font-weight: 600; }
.ppgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.pptool { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 14px; color: var(--ink); text-decoration: none; }
.pptool svg { width: 24px; height: 24px; stroke: var(--icon-warm); fill: none; stroke-width: 1.6; }
.pptool small { color: var(--ink-secondary); }
.filetile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.filetile .ficon { width: 100%; aspect-ratio: 1; border-radius: 12px; background: var(--secondary); display: grid; place-items: center; }
/* journey */
.jline { list-style: none; margin: 8px 0; padding: 0; position: relative; }
.jline li { display: flex; gap: 12px; padding: 0 0 14px; position: relative; }
.jline li::before { content: ""; position: absolute; inset-inline-start: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.jline li:last-child::before { display: none; }
.jline li > i { flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); z-index: 1; }
.jline .js-completed > i { background: var(--success); border-color: var(--success); }
.jline .js-in_progress > i { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--icon-warm-bg); }
.jline .js-scheduled > i { border-color: var(--info); } .jline .js-postponed > i { border-style: dashed; }
.jline b { display: block; } .jline small { color: var(--ink-secondary); } .jline p { margin: 4px 0 0; font-size: 15px; }
.todo-line { display: flex; gap: 8px; align-items: center; color: var(--accent); font-size: 15px; }
.todo-line svg { width: 18px; height: 18px; stroke: currentColor; fill: none; flex: none; }
.journeycard .bar, .bar { display: block; height: 6px; background: var(--secondary); border-radius: 999px; overflow: hidden; margin: 6px 0 2px; }
.bar i { display: block; height: 100%; background: var(--success); border-radius: 999px; }
.journeycard > div { flex: 1; min-width: 0; }
.recover { border-color: var(--line-strong); }
.recover h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; } .recover h3 svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; }
.urgent { display: flex; gap: 8px; align-items: flex-start; background: var(--error-bg); color: var(--error); border-radius: 12px; padding: 10px 12px; margin: 12px 0 0; }
.urgent svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; } .urgent a { color: var(--error); font-weight: 600; }
.visit.req { background: var(--warning-bg); box-shadow: none; }
.visit.req .datebadge svg { width: 22px; height: 22px; stroke: var(--warning); fill: none; }
/* travel */
.clocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.clocks div { background: var(--surface-inverse); color: var(--ink-inverse); border-radius: var(--radius-xl); padding: 12px 14px; }
.clocks small { display: block; opacity: .75; } .clocks b { font-family: var(--font-serif); font-size: 22px; font-weight: 400; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-secondary); }
.checklist li:last-child { border-bottom: 0; } .checklist li.ok { color: var(--ink); }
.checklist svg { width: 18px; height: 18px; stroke: var(--success); fill: none; flex: none; }
.todo-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; margin: 0 2px; }
/* messages */
.thread { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.bubble { max-width: 86%; padding: 10px 13px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.bubble.me { align-self: flex-end; background: var(--secondary); border-color: transparent; border-end-end-radius: 6px; }
.bubble.them { align-self: flex-start; border-end-start-radius: 6px; }
.bubble small { display: block; color: var(--ink-secondary); font-size: 12.5px; } .bubble p { margin: 4px 0 0; overflow-wrap: anywhere; }
.reqline { display: block; margin-top: 4px; font-size: 14px; }
.composer textarea { width: 100%; }
/* comfort */
.pill .ack { font-style: normal; font-weight: 700; margin-inline-start: 4px; } .pill .ack.ok { color: var(--success); } .pill .ack.no { color: var(--error); }
.pill[aria-pressed=true], .pill[aria-checked=true] { }
p.small.ok { color: var(--success); display: flex; align-items: center; gap: 6px; } p.small.ok svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
/* compare (time machine) */
.cmp { position: relative; border-radius: var(--radius-xl); overflow: hidden; background: var(--surface-inverse); --cut: 50%; }
.cmp img { display: block; width: 100%; height: auto; }
.cmp.slider .cmp-b { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--cut)); }
.cmp.slider .cmp-b img { width: 100%; height: 100%; object-fit: cover; }
.cmp.slider input[type=range] { position: absolute; inset-inline: 10px; bottom: 10px; width: calc(100% - 20px); }
.cmp.side { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } .cmp.side input { display: none; }
.cmp .lab { position: absolute; top: 8px; background: rgba(36, 37, 34, .78); color: var(--ink-inverse); font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.cmp .la { left: 8px; } .cmp .lb { right: 8px; }
.cmp.side .lab { position: static; display: none; }
/* 3D */
.viewer3d { border-radius: var(--radius-xl); overflow: hidden; background: var(--surface-inverse); color: var(--ink-inverse); min-height: 280px; display: grid; place-items: center; margin-bottom: 8px; touch-action: none; }
.viewer3d canvas { display: block; }
.viewer3d p { padding: 16px; text-align: center; }
/* decision room */
.opts { display: grid; gap: 8px; } .opts .opt .btn { margin-top: 8px; }
@media (min-width: 720px) { .opts { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } .ppgrid { grid-template-columns: repeat(4, 1fr); } }
/* the page a dentist opens from a shared link */
.shared .plainlist { columns: 2; font-size: 14px; color: var(--ink-secondary); margin: 10px 0 0; padding-inline-start: 18px; }
.invite h3 { margin: 0 0 4px; }
@media (prefers-reduced-motion: reduce) { .jline .js-in_progress > i { box-shadow: none; } }

.segs button { flex: none; font: inherit; padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); font-size: .9rem; cursor: pointer; }
.segs button.on { background: var(--ink); border-color: var(--ink); color: var(--on-primary); }
.cmp input[type=range] { accent-color: var(--color-taupe); }

/* passport pictures (stickers) and anatomical areas */
.pppics { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.pppic { position: relative; }
.pppic .thumb { width: 72px; height: 72px; border: 1px solid var(--line); cursor: zoom-in; padding: 0; }
.pppic .x { position: absolute; top: -6px; inset-inline-end: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--error); color: var(--on-error); font-size: 14px; line-height: 22px; cursor: pointer; }
.gallery.pics { grid-template-columns: repeat(4, 1fr); margin: 10px 0 4px; }
.arealist { list-style: none; margin: 0; padding: 0; }
.arealist li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.arealist li:last-child { border-bottom: 0; }
.arealist small { color: var(--warning); text-align: end; }
.pprow h5 { margin: 12px 0 2px; font-size: 14px; }
/* primary teeth rows in the passport chart */
.tchart .trow.baby .tcell { min-height: 42px; background: var(--color-ivory); }
.tchart .trow.baby.up { border-bottom: 0; padding-bottom: 2px; margin-bottom: 2px; }
.tchart .trow.baby.lo { border-bottom: 1.5px dashed var(--line); padding-bottom: 6px; margin-bottom: 6px; }

/* new booking: type-ahead service picker */
.svcpick { position: relative; }
.svclist { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 4px; }
.svclist button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; }
.svclist button small { color: var(--ink-secondary); }
.svclist button.on, .svclist button:hover { background: var(--secondary); }
.svcchip { display: inline-flex; align-items: center; gap: 8px; background: var(--secondary); border-radius: 999px; padding: 7px 8px 7px 14px; }
.svcchip small { color: var(--ink-secondary); }
.svcchip button { border: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); cursor: pointer; font-size: 16px; line-height: 1; }
/* services price list */
.svctable input, .svctable select { width: 100%; min-width: 0; }
.svctable td:first-child { min-width: 260px; }
.svctable .w90 { width: 90px; } .svctable .w70 { width: 70px; }
.svcgroup .catname { font-family: var(--font-serif); font-size: 18px; border: 0; border-bottom: 1px dashed var(--line); background: transparent; padding: 4px 0; min-width: 260px; color: var(--ink); }
/* insurance documents */
.insdoc h4 { margin: 0; }
.warnlist { list-style: none; margin: 8px 0 0; padding: 0; color: var(--warning); font-size: 14px; }
.warnlist li { padding: 2px 0; }
.xraylist { display: grid; gap: 8px; margin: 10px 0; }
.xrow { display: grid; grid-template-columns: 64px 1fr 190px; gap: 10px; align-items: center; }
.xrow .thumb { width: 64px; height: 48px; border-radius: 8px; cursor: zoom-in; }
.xrow .xt small { display: block; color: var(--ink-secondary); }
/* ================================================================ the whole app (patients and clinic): the dark theme of the launch screen and the passport */
body:not(.embedded, .printbody) {
  --bg: #1D1E1B; --surface: #2A2B27; --surface-muted: #34362F; --surface-inverse: #F6F4F0;
  --ink: #F6F4F0; --ink-secondary: #D2D0C6; --ink-disabled: #93958B; --ink-inverse: #242522;
  --line: rgba(246, 244, 240, .16); --line-strong: #B9C0AD;
  --primary: #F6F4F0; --primary-hover: #E6E4DC; --on-primary: #1D1E1B;
  --secondary: #3C3F38; --secondary-hover: #474A42; --on-secondary: #F6F4F0;
  --icon: #D2D0C6; --icon-warm: #D9C2A6; --icon-warm-bg: #3A352F; --accent: #D9C2A6; --focus: #F6F4F0;
  --success: #9BD3A8; --success-bg: #22382A; --warning: #F0C987; --warning-bg: #3E3322; --error: #F5A08D; --error-bg: #45251F; --on-error: #1D1E1B;
  --info: #A9CDEE; --info-bg: #213140; --paid: #3DAE68; --unpaid: #E2523F;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35); --shadow-md: 0 10px 30px rgba(0, 0, 0, .45);
  background: var(--launch-gradient) fixed; color: var(--ink);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
/* the thin ivory frame of the launch screen around the workspace */
body.clinic-mode::before { content: ""; position: fixed; inset: 8px; border: 1.25px solid rgba(246, 244, 240, .38); border-radius: var(--radius-frame); pointer-events: none; z-index: 0; }
body.clinic-mode .clinic { position: relative; z-index: 1; }
body.clinic-mode .c-side { background: rgba(29, 30, 27, .82); backdrop-filter: blur(8px); border-color: rgba(246, 244, 240, .14); }
body.clinic-mode .c-nav a { color: #E9E7E0; font-weight: 500; }
body.clinic-mode .c-nav a:hover { background: rgba(246, 244, 240, .07); }
body.clinic-mode .c-nav a.on { background: #F6F4F0; color: #1D1E1B; } body.clinic-mode .c-nav a.on svg { color: #1D1E1B; }
body:not(.embedded, .printbody) .card, body:not(.embedded, .printbody) .stg, body:not(.embedded, .printbody) .todo, body:not(.embedded, .printbody) .visit { border-color: rgba(246, 244, 240, .12); }
body:not(.embedded, .printbody) .muted, body:not(.embedded, .printbody) small { color: var(--ink-secondary); }
body:not(.embedded, .printbody) input[type=text], body:not(.embedded, .printbody) input[type=email], body:not(.embedded, .printbody) input[type=tel], body:not(.embedded, .printbody) input[type=date], body:not(.embedded, .printbody) input[type=time],
body:not(.embedded, .printbody) input[type=number], body:not(.embedded, .printbody) input[type=password], body:not(.embedded, .printbody) input[type=month], body:not(.embedded, .printbody) input[type=search], body:not(.embedded, .printbody) input[type=url], body:not(.embedded, .printbody) input[type=datetime-local], body:not(.embedded, .printbody) input[type=week], body:not(.embedded, .printbody) input:not([type]), body:not(.embedded, .printbody) select, body:not(.embedded, .printbody) textarea {
  background: #1F201D; color: var(--ink); border-color: rgba(246, 244, 240, .22); color-scheme: dark; }
body:not(.embedded, .printbody) input::placeholder, body:not(.embedded, .printbody) textarea::placeholder { color: #8F9187; }
body:not(.embedded, .printbody) .sheet { background: var(--surface); color: var(--ink); }
body:not(.embedded, .printbody) .btn.ghost:hover { background: var(--secondary); }
/* documents stay white paper with dark ink (as printed) */
body:not(.embedded, .printbody) .docview, body:not(.embedded, .printbody) .printform {
  --surface: #FFFFFF; --ink: #242522; --ink-secondary: #5E6753; --line: #DFDDD4; --primary: #242522; --primary-hover: #3A3B37; --on-primary: #F6F4F0; --secondary: #E6E4DC; color: #242522; }
body:not(.embedded, .printbody) .docview { background: #fff; border-radius: 12px; }
body.clinic-mode .dt small, body.clinic-mode .savebar small, body.clinic-mode .c-nav a.on small { color: inherit; }
.svctable .w160 { width: 160px; } .svctable input.bad { border-color: var(--error); }
/* imaging inbox */
.imgstrip { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0; }
.imgthumb { flex: none; width: 150px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.imgthumb figcaption { font-size: .8rem; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.imgthumb figcaption label { display: flex; gap: 4px; align-items: flex-start; }
.imgopen { width: 150px; height: 112px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #111; overflow: hidden; cursor: zoom-in; display: flex; align-items: center; justify-content: center; }
.imgopen img { width: 100%; height: 100%; object-fit: contain; }
.imgicon { color: #eee; font-weight: 600; letter-spacing: .05em; }
.imgassign { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; }
.imgfind { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.imgfind input { min-width: 200px; width: 260px; max-width: 100%; min-height: 40px; padding: 8px 12px; }
.imgres { display: contents; }
textarea.mono { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }
.imgopen img:not([src]) { visibility: hidden; }
.mergepick { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; } .mergepick .row { flex-wrap: wrap; gap: 10px; align-items: center; }
.alertbox.note { border-color: var(--line-strong, var(--line)); } .altrow { gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
/* the clinic stamp at the end of documents (preview and browser print; the PDF places it itself) */
.printform .pf-stampbox { text-align: right; margin: 14px 8px 0 0; }
.printform .pf-stamp { width: 140px; height: auto; display: inline-block; }
@media print { .printform .pf-stamp { width: 38mm; } }
/* patient home: the latest 3D scan, or a row of small pictures */
.showcase { margin: 4px 0 14px; }
.showcase.scan3d { border-radius: var(--radius-xl, 18px); overflow: hidden; background: var(--surface-inverse, #242522); }
.viewer3d.mini { min-height: 230px; margin: 0; border-radius: 0; }
.showcap { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--ink-inverse, #F6F4F0); text-decoration: none; }
.showcap span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.showcap b, .showcap small, .showcap svg { color: var(--ink-inverse, #F6F4F0); } .showcap small { opacity: .7; }
.carousel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 2px 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.citem { flex: none; scroll-snap-align: start; width: 74px; padding: 0; border: 0; background: none; display: flex; flex-direction: column; gap: 4px; align-items: center; cursor: pointer; color: var(--ink-secondary); }
.citem .thumb { width: 74px; height: 74px; border-radius: 16px; background: var(--secondary) center / cover no-repeat; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.citem small { font-size: 11px; }
.ppdl { margin: 0 0 12px; }
/* ================================================================ the passport look across the app: deep charcoal with a
   soft light from above, quiet cards, small spaced labels, 3D models on a transparent stage */
body:not(.embedded, .printbody, .clinic-mode) {
  background: radial-gradient(120% 55% at 50% -8%, rgba(214, 226, 240, .13), rgba(183, 198, 174, .04) 45%, transparent 70%), linear-gradient(180deg, #2A2C27 0%, #1A1B18 100%) fixed;
  background-color: #1A1B18; min-height: 100vh;
}
body:not(.embedded, .printbody, .clinic-mode) .topbar { background: rgba(26, 27, 24, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: rgba(246, 244, 240, .08); }
body:not(.embedded, .printbody, .clinic-mode) .tabbar { background: rgba(22, 23, 20, .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top-color: rgba(246, 244, 240, .08); }
body:not(.embedded, .printbody, .clinic-mode) :is(.card, .menu, .menurow) { background: linear-gradient(180deg, rgba(48, 50, 44, .92), rgba(36, 38, 34, .92)); }
body:not(.embedded, .printbody, .clinic-mode) :is(.card, .menu) { border: 1px solid rgba(246, 244, 240, .07); box-shadow: 0 10px 30px rgba(0, 0, 0, .28); }
body:not(.embedded, .printbody, .clinic-mode) .menurow { border-bottom-color: rgba(246, 244, 240, .06); }
/* section headings: small, spaced capitals (Georgian has no capitals and keeps its spacing) */
body:not(.embedded, .printbody, .clinic-mode) .sec { font-family: var(--font-text); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #A6A89C; }
body:not(.embedded, .printbody, .clinic-mode) .sec .more { letter-spacing: 0; text-transform: none; font-size: 14px; }
body:not(.embedded, .printbody, .clinic-mode) .demobar { background: #34362F; color: #E9E2D3; }
body:not(.embedded, .printbody, .clinic-mode) .demobar a { color: #D9C3A0; }
/* the 3D stage: transparent model over a soft light, in every viewer */
.viewer3d { background: radial-gradient(80% 70% at 50% 40%, rgba(214, 226, 240, .14), rgba(0, 0, 0, 0) 70%), linear-gradient(180deg, #2B2D28, #171815); color: var(--ink); border: 1px solid rgba(246, 244, 240, .07); }
.showcase.scan3d { background: radial-gradient(80% 70% at 50% 40%, rgba(214, 226, 240, .14), rgba(0, 0, 0, 0) 70%), linear-gradient(180deg, #2B2D28, #171815); border: 1px solid rgba(246, 244, 240, .08); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.showcase.scan3d .viewer3d { background: none; border: 0; }
.showcap { background: linear-gradient(180deg, rgba(23, 24, 21, 0), rgba(23, 24, 21, .55)); }
.showcap b, .showcap small, .showcap svg { color: #F6F4F0; }
.v3bar { align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.v3bar .segs { margin: 0; padding: 0; }
/* big numbers and the 3D pictures of the passport */
.ppglance { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.ppglance img { width: 100%; height: auto; display: block; }
.ppstats { display: grid; gap: 12px; }
.ppstat b { display: block; font-family: var(--font-serif); font-size: 30px; line-height: 1; color: #F6F4F0; }
.ppstat small { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #A6A89C; margin-top: 4px; }
.ppstat.need b { color: #E6A26E; } .ppstat.impl b { color: #C3CCD6; } .ppstat.crown b { color: #DCE8F4; } .ppstat.fill b { color: #B7C6AE; }
.ppitem .p3d { width: 56px; height: 56px; flex: none; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.hero3d { display: block; width: min(100%, 420px); margin: 0 auto; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.pphead { align-items: center; gap: 12px; margin-bottom: 4px; } .pphead h3 { margin: 0; } .pphead small { flex: none; }
.pp3d { min-height: 170px; display: grid; place-items: center; }
.showcase.hero { display: block; text-decoration: none; padding-top: 10px; }
.showcase.hero .hero3d { width: 88%; }
/* the welcome screen: the logo, then a 3D smile */
body:not(.embedded, .printbody) .welcome { background: radial-gradient(110% 50% at 50% 30%, rgba(214, 226, 240, .14), rgba(183, 198, 174, .04) 50%, transparent 72%), linear-gradient(180deg, #2A2C27 0%, #171815 100%); }
body:not(.embedded, .printbody) .w-demo { color: #D9C3A0; }
/* signing happens on white paper (the signature goes onto white documents in dark ink) */
body:not(.embedded, .printbody) .sigbox { background: #FBFAF7; border-color: rgba(246, 244, 240, .5); color: #242522; }
body:not(.embedded, .printbody) .sigbox :is(small, span, button, .muted) { color: #5E6753; }
/* the welcome screen fits one phone screen: the logo and the 3D smile shrink with the height, nothing scrolls */
.welcome:has(.w-hero) { height: 100vh; height: 100dvh; min-height: 0; overflow-y: auto; padding-top: calc(var(--safe-t) + 10px); }
.welcome .w-logo:has(+ .w-hero) { width: auto; height: clamp(64px, 13dvh, 120px); max-width: 70%; margin: clamp(10px, 3dvh, 28px) auto 0; flex: none; }
.welcome .w-hero { flex: 1 1 auto; min-height: 60px; max-height: 30dvh; width: auto; max-width: 84%; object-fit: contain; margin: 1dvh auto; }
.welcome:has(.w-hero) .w-options { gap: clamp(6px, 1.2dvh, 12px); flex: none; }
.welcome:has(.w-hero) .choice { padding: clamp(9px, 1.6dvh, 15px) 14px; }
.welcome:has(.w-hero) .choice .ic { width: 38px; height: 38px; }
.welcome:has(.w-hero) .w-demo { margin-top: clamp(8px, 1.6dvh, 14px); flex: none; }
.welcome:has(.w-hero) .w-spacer { flex: 0 1 2dvh; }
.welcome:has(.w-hero) .w-foot { margin: clamp(8px, 2dvh, 24px) 0 0; flex: none; }
/* the launch view: the welcome screen's light and colours, no frame */
#launch { background: radial-gradient(110% 50% at 50% 30%, rgba(214, 226, 240, .14), rgba(183, 198, 174, .04) 50%, transparent 72%), linear-gradient(180deg, #2A2C27 0%, #171815 100%); }
#launch .frame { border: 0; }
/* a whole arch: one area across the full row; its longer list of findings in a wider pop-up */
.arrow:has(.area.arch) { grid-template-columns: 1fr; } .arrow:has(.area.arch) > span { display: none; }
.area.arch b::before { content: "◠ "; opacity: .6; } .area.arch[data-area="arch_l"] b::before { content: "◡ "; }
.tpop.wide { width: 480px; max-height: 78vh; overflow: auto; }
/* check-out: the price list dropping down under a service */
.svcpick { position: relative; display: flex; align-items: center; min-width: 220px; }
.svcpick input { flex: 1; padding-right: 30px; }
.svcbtn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-secondary); font-size: 14px; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; }
.svcbtn:hover { background: var(--secondary); color: var(--ink); }
.svcpanel { position: fixed; z-index: 160; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; }
.svcgrp { position: sticky; top: -6px; background: var(--surface); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-secondary); padding: 8px 8px 4px; }
.svcopt { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: start; border: 0; background: none; color: var(--ink); padding: 7px 8px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px; }
.svcopt b { font-weight: 600; white-space: nowrap; }
.svcopt:hover, .svcopt.hi { background: var(--secondary); }
.svcpanel p { padding: 8px; margin: 0; }
/* Today: vivid tiles and status pills, readable on the dark workspace */
.dt { box-shadow: 0 8px 22px rgba(0, 0, 0, .28); border: 0; }
.dt small { opacity: .92; font-weight: 500; }
.dt.t-pat { background: linear-gradient(135deg, #2F6FED, #4F8DFF); color: #FFFFFF; }
.dt.t-in { background: linear-gradient(135deg, #12804B, #22B06A); color: #FFFFFF; }
.dt.t-wait { background: linear-gradient(135deg, #F2A516, #FFC845); color: #2A1E00; }
.dt.t-miss { background: linear-gradient(135deg, #C9302C, #F0544A); color: #FFFFFF; }
.dt.t-cancel { background: linear-gradient(135deg, #4E5566, #6B7386); color: #FFFFFF; }
.dt.t-money { background: linear-gradient(135deg, #7A4FE0, #A27BFF); color: #FFFFFF; }
.stpill { font-weight: 600; }
.stpill.st-scheduled { background: #FFC845; color: #2A1E00; }
.stpill.st-arrived { background: #3B7BFF; color: #FFFFFF; }
.stpill.st-done { background: #22B06A; color: #FFFFFF; }
.stpill.st-missed { background: #E5453D; color: #FFFFFF; }
.stpill.st-cancelled { background: #6B7386; color: #FFFFFF; }
.trow.st-missed { background: color-mix(in srgb, #E5453D 14%, var(--surface)); }
.trow { border-left-width: 6px; }
/* periodontal chart */
.pcharts { margin-top: 10px; }
.pchart .grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.psum { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 10px 0 4px; }
.psum > div { background: var(--secondary); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.psum b { font-size: 22px; font-variant-numeric: tabular-nums; } .psum small { color: var(--ink-secondary); font-size: 12px; }
.psum small.better { color: #22B06A; font-weight: 600; } .psum small.worse { color: #F2A516; font-weight: 600; }
.pband { margin-top: 14px; } .pband h4 { margin: 0 0 6px; }
.ptable { table-layout: fixed; border-collapse: collapse; width: calc(130px + 16 * 74px); }
.ptable th { width: 130px; text-align: start; font-size: 12px; font-weight: 600; padding: 2px 6px; white-space: nowrap; }
.ptable th small { display: block; font-weight: 400; color: var(--ink-secondary); }
.ptable td { width: 74px; padding: 2px 1px; text-align: center; border-left: 1px solid var(--line); white-space: nowrap; }
.ptable td.gone { opacity: .35; }
.ptable .pnums td { border-left-color: transparent; }
.ptooth { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 3px 0; font-weight: 700; cursor: pointer; }
.ptooth.gone { text-decoration: line-through; opacity: .5; } .ptooth.impl { border-color: #8FA3B8; }
.pin { width: 22px; height: 24px; padding: 0; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; border-radius: 5px; }
.pin.gm { color: #E5453D; } .pin.pd { color: #3B7BFF; } .pin.pd.deep { background: #FFF1D6; color: #8A5A00; } .pin.pd.deeper { background: #FFD9D4; color: #9C1E14; }
.pdot { width: 18px; height: 18px; margin: 0 2px; border-radius: 50%; border: 1.5px solid var(--line-strong, #999); background: transparent; cursor: pointer; padding: 0; vertical-align: middle; }
.pdot.bop.on { background: #E5453D; border-color: #E5453D; } .pdot.pl.on { background: #3B7BFF; border-color: #3B7BFF; }
.pfurc { min-width: 24px; height: 22px; border-radius: 11px; border: 1.5px solid var(--line-strong, #999); background: transparent; color: var(--ink); font-size: 11px; font-weight: 700; cursor: pointer; margin: 0 1px; }
.pfurc.f1 { background: #FFE29A; color: #5A4300; border-color: #FFC845; } .pfurc.f2 { background: #F7A35C; color: #3D1F00; border-color: #F2A516; } .pfurc.f3 { background: #E5453D; color: #fff; border-color: #E5453D; }
.ptable select { width: 46px; padding: 2px; font-size: 13px; }
.pcal { display: inline-block; width: 22px; font-size: 12px; color: var(--ink-secondary); font-variant-numeric: tabular-nums; } .pcal.hi { color: #E5453D; font-weight: 700; }
.ppic td { padding: 0; border-left: 0; }
.ptsvg { display: block; width: 100%; height: 120px; background: #FBFAF7; border-radius: 8px; }
.ptsvg .pt-mm { stroke: #E6E3DA; stroke-width: .6; } .ptsvg .pt-mm.five { stroke: #CFCBBE; } .ptsvg .pt-cej { stroke: #9A968A; stroke-width: 1; stroke-dasharray: 3 3; }
.ptsvg .pt-crown { fill: #F4EFE4; stroke: #A9A291; stroke-width: 1; } .ptsvg .pt-root { fill: #EDE5D3; stroke: #B9B19E; stroke-width: 1; }
.ptsvg .pt-implant { fill: #C9D2DC; stroke: #8494A6; } .ptsvg .pt-thread { stroke: #8494A6; stroke-width: 1; }
.ptsvg .pt-gm { fill: none; stroke: #E5453D; stroke-width: 2; } .ptsvg .pt-pd { fill: none; stroke: #3B7BFF; stroke-width: 2; }
.ptsvg .pt-gone { font-size: 18px; fill: #B0AA9A; text-anchor: middle; }
/* printed */
.printform .pf-perio th, .printform .pf-perio td { font-size: 9px; padding: 1px 2px; text-align: center; }
.printform .pf-perio td.gone { background: #eee; }
.printform .pf-perio-pic .ptsvg { height: 90px; }
.printform .pf-perio-chart { page-break-before: always; }
.ptable input.pin { width: 22px !important; height: 24px !important; min-height: 0 !important; padding: 0 !important; margin: 0 1px; border-radius: 5px; font-size: 13px; }
.ptable select { width: 50px !important; height: 26px !important; min-height: 0 !important; padding: 0 2px !important; font-size: 13px; }
.ptable input[type=checkbox] { width: 16px; height: 16px; min-height: 0; }
.printform .pf-perio-pic .ptsvg { width: 100%; height: auto; }
/* EHR upload list */
.ehrtable tr.ehr-late td { background: color-mix(in srgb, #E5453D 16%, transparent); }
.ehrtable tr.ehr-soon td { background: color-mix(in srgb, #FFC845 16%, transparent); }
.ehrtable tr.ehr-done td, .ehrtable tr.ehr-skip td { opacity: .65; }
.ehrtable .ehrleft { font-weight: 700; white-space: nowrap; } .ehrtable tr.ehr-late .ehrleft { color: #F0544A; } .ehrtable tr.ehr-soon .ehrleft { color: #FFC845; }
.ehrtable .ehrst { font-weight: 600; } .ehrtable .nowrap { white-space: nowrap; }
a.dt { text-decoration: none; }
/* periodontal diagnosis */
.pdx { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.pdx .grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.pdxres { margin-top: 10px; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: var(--secondary); border-left: 6px solid #3B7BFF; }
.pdxres b { font-size: 18px; } .pdxres ul { margin: 6px 0 4px 18px; padding: 0; font-size: 13.5px; }
.pdxres.health { border-left-color: #22B06A; } .pdxres.gingivitis { border-left-color: #FFC845; } .pdxres.periodontitis { border-left-color: #E5453D; }
/* periodontal chart as the Bern chart: white paper, rails at the sides, a box over the cell being typed */
.ptools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 12px; }
.pbtn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 0; background: #FFFFFF; color: #222; font-size: 13px; box-shadow: 0 1px 4px rgba(0, 0, 0, .22); cursor: pointer; list-style: none; }
.pbtn:hover { background: #F2F6FF; }
.pdrop { position: relative; } .pdrop > summary::-webkit-details-marker { display: none; } .pdrop[open] > summary { background: #E4ECFF; }
.pmenu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(420px, 86vw); background: #FFFFFF; color: #222; border-radius: 12px; padding: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, .28); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.pmenu b { color: #1F5FA8; } .pmenu .muted { color: #6B6B6B; } .pmenu .checkline span { color: #222; }
.pwrap { display: grid; grid-template-columns: 78px minmax(0, 1fr) 112px; gap: 12px; align-items: start; margin-top: 10px; }
.prail { display: flex; flex-direction: column; gap: 9px; position: sticky; top: 72px; background: #FFFFFF; border-radius: 12px; padding: 12px 9px; box-shadow: 0 2px 12px rgba(0, 0, 0, .14); }
.prail button { font-size: 11.5px; line-height: 1.2; padding: 9px 4px; border-radius: 8px; border: 0; background: #FFFFFF; color: #222; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); cursor: pointer; }
.prail button:hover { background: #F2F6FF; } .prail button.on { background: #1677FF; color: #FFFFFF; }
.ppaper { position: relative; overflow-x: auto; background: #FFFFFF; border-radius: 12px; padding: 8px 6px; box-shadow: 0 2px 12px rgba(0, 0, 0, .14); }
.ppaper svg { display: block; width: 100%; min-width: 760px; height: auto; user-select: none; }
.ppaper .pc-hit { cursor: pointer; stroke: none !important; fill: #FFFFFF !important; fill-opacity: 0 !important; } .ppaper .pc-hit:hover { fill: #FFD84D !important; fill-opacity: .35 !important; }
input.pcin { position: absolute; z-index: 5; box-sizing: border-box; padding: 0 !important; margin: 0; min-height: 0 !important; border: 2px solid #1677FF !important; border-radius: 3px !important; background: #FFFBE0 !important; color: #111 !important; text-align: center; font-weight: 700; line-height: 1; outline: none; box-shadow: 0 0 0 3px rgba(22, 119, 255, .25); }
input.pcin.gm { color: #E3211B !important; } input.pcin.pd { color: #2140D8 !important; }
.ppanel { margin-top: 14px; background: #FFFFFF; color: #222; border-radius: 12px; padding: 14px 16px; box-shadow: 0 2px 12px rgba(0, 0, 0, .14); }
.ppanel h4 { margin: 0 0 10px; color: #1F5FA8; } .ppanel .muted { color: #6B6B6B; }
.ppanel .tbl { width: 100%; border-collapse: collapse; font-size: 13px; } .ppanel .tbl th, .ppanel .tbl td { border-bottom: 1px solid #E3E3E3; padding: 6px 8px; text-align: start; color: #222; } .ppanel .tbl th { background: #F4F6FA; }
.pra { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 18px; align-items: start; } .prasvg { width: 100%; height: auto; }
.prisk { border-left: 6px solid; background: #F7F7F7; border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; } .prisk b { font-size: 17px; }
.plv { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; } .plv.l0 { background: #CFEBD3; color: #10652F; } .plv.l1 { background: #FCE8A6; color: #6B4E00; } .plv.l2 { background: #F8C9C4; color: #8E1610; }
.pbars { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 14px; } .pbars > div { display: grid; grid-template-columns: 70px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; }
.pbars i { height: 12px; background: #EEE; border-radius: 6px; overflow: hidden; } .pbars i b { display: block; height: 100%; }
.pcalib p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; }
.printform .pf-perio-pic svg { width: 100%; height: auto; display: block; margin: 4px 0 8px; }
@media (max-width: 1000px) { .pwrap { grid-template-columns: 1fr; } .prail { flex-direction: row; flex-wrap: wrap; position: static; } .pra { grid-template-columns: 1fr; } }
/* phone width: the visit's button goes under the visit instead of squeezing (or covering) its title */
.visit > .btn { flex: 0 0 auto; }
@media (max-width: 520px) { .visit { flex-wrap: wrap; } .visit > .btn { flex: 1 1 100%; width: auto; margin-top: 2px; } }
/* the first plan tile is ivory in the dark theme: its label and amount in dark ink */
body:not(.embedded, .printbody) .tiles div:first-child, body:not(.embedded, .printbody) .tiles div:first-child :is(small, b) { color: var(--on-primary); }
/* Georgian tab labels: whole words only, a little smaller (Georgian words are long) */
html[lang=ka] .tabbar a { font-size: 12px; }
html[lang=ka] .tabbar a span { overflow-wrap: normal; }
/* a long status tag inside a visit wraps instead of running past the card */
.visit .tag { white-space: normal; max-width: 100%; }
/* prescription: the post-surgical instructions on their own page when printed; Hebrew right to left */
.printform .rxpost { page-break-before: always; break-before: page; }
.printform.rxdoc[dir=rtl] { text-align: right; } .printform.rxdoc[dir=rtl] ul { padding-right: 20px; padding-left: 0; }
.rxlang { margin: 0; min-width: 200px; }
.rxauto { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2, rgba(127,127,127,.08)); }
.rxauto ul { margin: 4px 0 4px 18px; padding: 0; }
.printform.rxdoc h4 { margin: 10px 0 4px; }
/* an approved plan, component by component: each tooth or area folds open; what is done, billed and paid */
.pcomps .pcsum { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; margin: 6px 0 10px; }
.pcomps .pcsum b { white-space: nowrap; }
.pcgroup { border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; padding: 0 12px; }
.pcgroup > summary { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 9px 0; cursor: pointer; list-style: none; }
.pcgroup > summary::-webkit-details-marker { display: none; }
.pcgroup > summary::before { content: '▸'; margin-right: 6px; transition: transform .15s; }
.pcgroup[open] > summary::before { transform: rotate(90deg); }
.pcgroup > summary b { flex: 1; }
.pcrow { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--line); }
.pcrow input[type=checkbox] { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.pcname { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: break-word; }
.pcamt { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; white-space: nowrap; text-align: right; }
.tag.pc-planned { background: var(--secondary); color: var(--ink-secondary); }
.tag.pc-part, .tag.pc-billed { background: var(--warning-bg); color: var(--warning); }
.tag.pc-paid { background: var(--success-bg); color: var(--success); }
.coplan { margin-bottom: 10px; }
#coplans { margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.printform.billdoc[dir=rtl] { text-align: right; }
@media (max-width: 560px) {
  .pcrow { flex-wrap: wrap; }
  .pcname { flex-basis: calc(100% - 30px); }
  .pcamt { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; padding-left: 28px; }
  .pcomps .pcsum { flex-direction: column; gap: 2px; }
}
.rxfail { display: block; }
/* a phone number with its country code */
.phonefld { display: flex; gap: 6px; align-items: stretch; }
.phonefld select { flex: 0 0 auto; width: 9.5em; }
.phonefld input { flex: 1 1 auto; min-width: 0; }
.phonefld select.nocode { border-color: var(--warning, #b7791f); color: var(--warning, #b7791f); }
/* the lab order: tooth chart, works, photos */
.lbchart { display: grid; gap: 8px; margin: 6px 0 10px; overflow-x: auto; }
.lbrow { display: flex; gap: 4px; align-items: center; }
.lbrow i { width: 14px; flex: 0 0 14px; border-left: 1px solid var(--line); align-self: stretch; }
.lbt { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 7px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 12px; cursor: pointer; padding: 0; }
.lbt.sel { outline: 3px solid var(--ink); outline-offset: 1px; }
.lbdot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lbworks .crow small { display: block; }
.lbphotos { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.lbph { position: relative; display: inline-block; }
.lbph img { height: 64px; border-radius: 6px; display: block; }
.lbph button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: var(--surface); cursor: pointer; line-height: 1; }
.lbscans .checkline { margin: 2px 0; }
#lbImpl[hidden], #lbNew[hidden] { display: none !important; }
#lbShadeX[hidden], #lbShadeWX[hidden] { display: none !important; }
#lbShadeX, #lbShadeWX { margin-top: 6px; }
/* staff accounts */
.c-who { color: var(--ink-secondary); font-size: 12px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfperms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 14px; margin: 6px 0; }
#sfPerms[hidden], #sfDocBox[hidden], #sfDocNote[hidden] { display: none !important; }
.cal-panel [hidden] { display: none !important; }
.blk-row { justify-content: space-between; align-items: center; gap: 8px; }
.cotable.nocost .cost { display: none; }
.segs[hidden] { display: none; }
/* who made a booking: initials of the person in this app, a globe for the website, W for Wix */
.bymark { position: absolute; top: 3px; right: 22px; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-size: 9.5px !important; font-weight: 600; line-height: 1; background: var(--surface); color: var(--ink-secondary) !important; border: 1px solid var(--line); }
.bymark.staff { background: var(--ink); color: var(--surface) !important; border-color: var(--ink); }
.bymark.website svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
.kv .bymark { position: static; display: inline-grid; vertical-align: -3px; margin-right: 4px; }
.cal-ev:not(:has(.paymark)) .bymark { right: 3px; }
/* the work log */
.wl-day { margin: 18px 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-secondary); }
.wl-row { display: grid; grid-template-columns: 52px 190px 1fr; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); align-items: baseline; }
.wl-row time { font-variant-numeric: tabular-nums; color: var(--ink-secondary); font-size: .85rem; }
.wl-who { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.wl-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-what small { color: var(--ink-secondary); }
.wl-people { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
@media (max-width: 640px) { .wl-row { grid-template-columns: 46px 1fr; } .wl-what { grid-column: 1 / -1; padding-left: 56px; } }
.wl-people .chip { padding: 4px 12px; text-decoration: none; color: var(--ink); }
.wl-people .chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.booked { display: flex; align-items: center; gap: 6px; color: var(--ink-secondary); margin: 6px 0 0; }
.booked .bymark { position: static; flex: none; }
.wl-who .bymark { position: static; flex: none; align-self: center; }
