@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url(/fonts/vazirmatn-arabic-400-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url(/fonts/vazirmatn-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url(/fonts/vazirmatn-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url(/fonts/vazirmatn-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF; }

/* --brand comes from /theme.css (the owner's color in the admin panel) */
:root {
  --brand: #0a84ff; --brand-d: #0062c4; --brand-dd: #0b3f86; --brand-l: #e8f2ff;
  --blue: var(--brand); --blue-d: var(--brand-d); --blue-l: var(--brand-l);
  --bg: #f4f7fc; --card: #fff; --text: #172033; --muted: #66728a; --line: #e3e9f2;
  --ok: #0f9d58; --ok-l: #e6f6ee; --off: #8a94a6; --off-l: #f0f2f5; --err: #d93025; --err-l: #fdecea; --info-l: #eef5ff;
  --gold: #f5a623; --navy: #0f1b33;
  --r: 18px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 64, .05), 0 6px 20px rgba(16, 32, 64, .06);
  --shadow-h: 0 4px 10px rgba(16, 32, 64, .08), 0 14px 34px rgba(16, 32, 64, .12);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d131d; --card: #151d2a; --text: #e8edf5; --muted: #9aa7bb; --line: #243044; --brand-l: #13263f;
    --ok-l: #0f2a1d; --off-l: #1e2530; --err-l: #3a1715; --info-l: #14223a; --navy: #0a0f18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-h: 0 8px 24px rgba(0, 0, 0, .45); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: Vazirmatn, Tahoma, sans-serif; background: var(--bg); color: var(--text); line-height: 1.85; font-size: 16px; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; margin: .5em 0 .35em; line-height: 1.5; }
h2 { font-size: 1.2rem; margin: .3em 0 .6em; line-height: 1.5; }
h3 { font-size: 1.02rem; margin: .25em 0; }
p { margin: .35em 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.inline { display: inline; }
.ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.ic.big { width: 48px; height: 48px; color: var(--muted); }

/* ---------------------------------------------------------------- header / footer */
.top { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
@media (prefers-color-scheme: dark) { .top { background: rgba(21, 29, 42, .92); } }
.top-in { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--text); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand.light { color: #fff; }
.logo { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-dd)); color: #fff; box-shadow: 0 4px 12px rgba(10, 132, 255, .35); }
.logo-ic { width: 22px; height: 22px; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-main { flex: 1; }
.nav-main a { color: var(--text); padding: 6px 12px; border-radius: 10px; font-size: .95rem; }
.nav-main a:hover { background: var(--brand-l); color: var(--brand); text-decoration: none; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.menu { position: relative; display: none; }
.menu summary { list-style: none; cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary .ic { width: 22px; height: 22px; }
.menu-panel { position: absolute; inset-inline-end: 0; top: 50px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-h); padding: 8px; display: grid; min-width: 210px; z-index: 30; }
.menu-panel a { padding: 9px 12px; border-radius: 10px; color: var(--text); }
.menu-panel a:hover { background: var(--brand-l); text-decoration: none; }
@media (max-width: 900px) { .nav-main { display: none; } .menu { display: block; } }
@media (max-width: 560px) { .hide-sm { display: none !important; } .top-actions .btn { padding: 6px 10px; font-size: .82rem; } .brand { font-size: 1.1rem; } }

.foot { margin-top: 56px; background: var(--navy); color: #c6d0e0; padding: 40px 0 0; font-size: .92rem; }
.foot a { color: #dbe4f3; display: block; padding: 3px 0; }
.foot h4 { color: #fff; margin: 0 0 10px; font-size: 1rem; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.foot .socials { display: flex; gap: 14px; flex-wrap: wrap; }
.foot .socials a { display: inline; }
.foot-end { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 28px; padding: 16px; text-align: center; color: #8d9ab0; font-size: .85rem; }

/* ---------------------------------------------------------------- buttons, forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand); color: #fff; border: 0; border-radius: 12px; padding: 10px 20px; font: inherit; font-weight: 700; cursor: pointer; text-align: center; transition: background .15s, transform .1s, box-shadow .15s; box-shadow: 0 2px 8px rgba(10, 132, 255, .25); }
.btn:hover { background: var(--brand-d); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 6px 14px; font-size: .88rem; font-weight: 400; border-radius: 10px; }
.btn.wide { display: flex; width: 100%; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); box-shadow: none; }
.btn.ghost:hover { background: var(--brand-l); }
.btn.light { background: #fff; color: var(--brand-dd); box-shadow: none; }
.btn.light:hover { background: #eef4ff; }
.btn.danger { background: var(--err); box-shadow: none; }
.btn.danger.ghost, .btn.small.danger { background: transparent; color: var(--err); border: 1px solid var(--err); }
.link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(10, 132, 255, .18); }
.check, .radio { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.check input, .radio input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0; }
legend { padding: 0 6px; color: var(--muted); font-size: .9rem; }
.stack { display: grid; gap: 12px; }
.stack label { display: grid; gap: 4px; }
.stack .radio, .stack .check { display: flex; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------- cards, badges */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.narrow-card { max-width: 560px; margin-inline: auto; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; border-radius: 999px; padding: 2px 10px; background: var(--brand-l); color: var(--brand); }
.badge.ok { background: var(--ok-l); color: var(--ok); }
.badge.off { background: var(--off-l); color: var(--off); }
.row-gap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row-between { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; color: var(--text); }
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.alert { border-radius: 12px; padding: 11px 14px; margin: 10px 0; white-space: pre-line; }
.alert.error { background: var(--err-l); color: var(--err); }
.alert.success { background: var(--ok-l); color: var(--ok); }
.alert.info { background: var(--info-l); }
.stars { color: var(--gold); display: inline-flex; gap: 4px; align-items: center; }
.stars .dim { color: var(--line); }
.stars.small { font-size: .85rem; }
.verified { color: var(--brand); font-size: .8em; }
.crumbs { font-size: .85rem; color: var(--muted); margin-top: 16px; }
.crumbs a { color: var(--muted); }
.page-head { padding: 6px 0 4px; }
.page-head h1 { margin-bottom: 0; }
.empty { text-align: center; padding: 40px 18px; }
.prose .bio { font-size: 1.02rem; }

/* ---------------------------------------------------------------- home */
.hero { position: relative; color: #fff; padding: 56px 0 74px; overflow: hidden;
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(255, 255, 255, .18), transparent 60%),
    radial-gradient(700px 300px at 0% 110%, rgba(255, 255, 255, .12), transparent 60%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dd) 100%); }
.hero::after { content: ''; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M26 18h4v8h8v4h-8v8h-4v-8h-8v-4h8z' fill='%23fff'/%3E%3C/svg%3E"); }
.hero-in { position: relative; z-index: 1; text-align: center; }
.hero h1 { font-size: clamp(1.6rem, 4.2vw, 2.6rem); margin: 0 0 .3em; }
.hero p { font-size: 1.05rem; opacity: .92; margin: 0 auto 1.2em; max-width: 680px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.hero-chips a { color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); padding: 4px 14px; border-radius: 999px; font-size: .9rem; }
.hero-chips a:hover { background: rgba(255, 255, 255, .26); text-decoration: none; }
.search { display: grid; gap: 10px; grid-template-columns: 1fr; background: var(--card); color: var(--text); border-radius: 20px; padding: 12px; text-align: start; }
.hero-search { max-width: 980px; margin: 0 auto; box-shadow: 0 18px 50px rgba(5, 25, 60, .35); }
.search-q { position: relative; display: block; }
.search-q .ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-q input { padding-inline-start: 40px; }
@media (min-width: 860px) { .hero-search { grid-template-columns: 2.2fr 1fr 1fr 1fr auto; align-items: center; } .hero-search .check { grid-column: 1 / -1; order: 9; } }
.search.compact { padding: 0; border-radius: 0; background: none; }
.search.compact .btn { width: 100%; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -40px; position: relative; z-index: 2; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; display: grid; justify-items: center; gap: 2px; }
.stat .ic { color: var(--brand); width: 26px; height: 26px; }
.stat b { font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .9rem; }

.services { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 22px 0 6px; }
@media (min-width: 640px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .services { grid-template-columns: repeat(4, 1fr); } }
.service { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.service:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); text-decoration: none; }
.service-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-l); color: var(--brand); margin-bottom: 6px; }
.service-ic .ic { width: 24px; height: 24px; }

.block { margin: 34px 0 10px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile { display: grid; justify-items: center; text-align: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 10px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); border-color: var(--brand); text-decoration: none; }
.tile-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-l); color: var(--brand); margin-bottom: 4px; }
.tile-ic .ic { width: 28px; height: 28px; }
.tile b { font-size: .95rem; line-height: 1.5; }

.steps-row { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .steps-row { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 18px 18px; box-shadow: var(--shadow); }
.step > .ic { width: 30px; height: 30px; color: var(--brand); display: block; margin-bottom: 6px; }
.step-n { position: absolute; inset-inline-end: 16px; top: 12px; font-size: 2rem; font-weight: 700; color: var(--brand-l); }
.cta-band { margin: 40px 0 0; border-radius: 24px; padding: 28px; color: #fff; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--brand-dd), var(--brand)); box-shadow: var(--shadow-h); }
.cta-band h2 { margin: 0; }
.cta-band p { margin: .2em 0 0; opacity: .9; max-width: 640px; }

/* ---------------------------------------------------------------- doctor cards */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .grid.cards { grid-template-columns: repeat(4, 1fr); } .with-side .grid.cards { grid-template-columns: repeat(3, 1fr); } }
.doc { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin: 0; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.doc:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: var(--brand); text-decoration: none; }
.doc-top { position: relative; }
.verified-dot { position: absolute; bottom: 2px; inset-inline-end: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; border: 2px solid var(--card); }
.verified-dot .ic { width: 14px; height: 14px; }
.doc-info { min-width: 0; width: 100%; display: grid; justify-items: center; gap: 2px; }
.doc-info h3 { margin: 4px 0 0; font-size: 1.05rem; }
.doc-info .row-gap { justify-content: center; margin-top: 4px; }
.doc-info .verified { display: none; }
.free { font-size: .8rem; color: var(--ok); display: inline-flex; gap: 4px; align-items: center; }
.doc-cta { margin-top: auto; }
.av { border-radius: 50%; object-fit: cover; flex: none; background: var(--brand-l); }
.av.sm { width: 46px; height: 46px; }
.av.md { width: 92px; height: 92px; box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--brand-l); }
.av.lg { width: 128px; height: 128px; box-shadow: 0 0 0 5px var(--card), var(--shadow-h); }
.av.letter { display: inline-grid; place-items: center; color: var(--brand); font-weight: 700; font-size: 2rem; }
.av.lg.letter { font-size: 3rem; }
.av.sm.letter { font-size: 1.2rem; }

/* ---------------------------------------------------------------- lists */
.with-side { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .with-side { grid-template-columns: 290px 1fr; } .side { position: sticky; top: 84px; } }
.side { margin: 0; }
.side h3 { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.side .search { gap: 10px; }
.cols { columns: 2 160px; }
.cols a { display: block; padding: 3px 0; }
.prov-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .prov-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .prov-grid { grid-template-columns: repeat(3, 1fr); } }
.prov-grid .card { margin: 0; }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 22px 0; }

/* ---------------------------------------------------------------- doctor page */
.doc-head { padding: 0; overflow: hidden; }
.doc-cover { height: 110px; background: linear-gradient(135deg, var(--brand), var(--brand-dd)); }
.doc-head-in { display: flex; gap: 18px; align-items: flex-start; padding: 14px 22px 20px; flex-wrap: wrap; }
.doc-head-in > .av.lg { margin-top: -78px; }
.doc-head-text { flex: 1; min-width: 220px; }
.doc-head-text h1 { margin: 0; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-self: center; }
@media (max-width: 700px) { .doc-head-in { flex-direction: column; align-items: center; text-align: center; } .doc-head-text .row-gap { justify-content: center; } .doc-actions { justify-content: center; } }
.doc-cols { display: grid; gap: 0 18px; grid-template-columns: 1fr; align-items: start; }
.doc-cols > *, .with-side > *, .doc-head-text { min-width: 0; }
@media (min-width: 980px) { .doc-cols { grid-template-columns: 1.55fr 1fr; } .doc-side { order: 2; position: sticky; top: 84px; } .doc-main { order: 1; } }
.booking-box { border-color: var(--brand); box-shadow: var(--shadow-h); }
.card h2 { display: flex; gap: 8px; align-items: center; }
.card h2 .ic { color: var(--brand); }
.doc-mini { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.bio { white-space: pre-line; }
.services { list-style: none; padding: 0; margin: 0; }
.services li { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.services li:last-child { border-bottom: 0; }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.day { flex: none; scroll-snap-align: start; display: grid; justify-items: center; min-width: 66px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); font-size: .78rem; line-height: 1.5; background: var(--card); transition: border-color .15s; }
.day b { font-size: 1.25rem; }
.day:hover { border-color: var(--brand); text-decoration: none; }
.day.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(10, 132, 255, .3); }
.day.nav { place-items: center; font-size: 1.4rem; min-width: 42px; }
.day.open { border: 2px solid var(--ok); background: var(--ok-l); }
.day.closed { border: 2px solid var(--err); background: var(--err-l); color: var(--err); opacity: .85; }
.day.open.on { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: 0 6px 16px rgba(15, 157, 88, .3); }
.day.closed.on { background: var(--err); border-color: var(--err); color: #fff; box-shadow: none; }
.cal-step { margin: 0 0 6px; font-weight: 700; color: var(--brand); }
.cal-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-head > :first-child { justify-self: start; }
.cal-head > :last-child { justify-self: end; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.cal-wd { text-align: center; font-size: .78rem; color: var(--muted); padding-bottom: 2px; }
.cal .day { min-width: 0; padding: 6px 2px; font-size: .7rem; line-height: 1.3; }
.cal .day b { font-size: 1.05rem; }
.cal .day.blank { border: 0; background: transparent; }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal span.day.closed { cursor: not-allowed; }
.cal-back { margin-bottom: 8px; }
.day-legend { display: grid; gap: 6px; margin: 0 0 10px; color: var(--muted, #6b7280); }
.day-legend .lg { display: flex; align-items: center; gap: 8px; }
.day-legend .dot { flex: none; display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.day-legend .dot.open { background: var(--ok); }
.day-legend .dot.closed { background: var(--err); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 8px; }
.time { text-align: center; border: 1px solid var(--brand); border-radius: 12px; padding: 9px 0; font-weight: 700; transition: background .15s, color .15s; }
.time:hover { background: var(--brand); color: #fff; text-decoration: none; }
.review { border-bottom: 1px dashed var(--line); padding: 12px 0; }
.review:last-child { border-bottom: 0; }
.rate { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate input { position: absolute; opacity: 0; width: 1px; }
.rate label { font-size: 2.2rem; color: var(--line); cursor: pointer; line-height: 1; }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: var(--gold); }
.rate input:focus-visible + label { outline: 2px solid var(--brand); }
.booking.past { opacity: .65; }
.booking.hl { border-color: var(--ok); }
.cta { background: var(--brand-l); border-color: transparent; }

/* ---------------------------------------------------------------- admin */
.admin .nav-admin { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.admin .nav-admin a { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); background: var(--card); }
.admin .nav-admin a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.admin .top-in { gap: 12px; }
.admin .nav { margin-inline-start: auto; gap: 14px; }
.grid2 { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font-size: .9rem; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.table .actions { display: flex; flex-wrap: wrap; gap: 4px; }
.table input, .table select { padding: 4px 6px; }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { width: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.key { background: var(--brand-l); padding: 6px 8px; border-radius: 8px; }
.qr { display: flex; justify-content: center; margin: 12px 0; }
.qr svg { border-radius: 8px; max-width: 100%; height: auto; }
.stats.trust .stat b { font-size: 1.05rem; } .stats.trust .stat span { text-align: center; }

/* ---------------------------------------------------------------- magazine */
.grid.arts { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.arts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid.arts { grid-template-columns: repeat(3, 1fr); } }
.art { padding: 0; overflow: hidden; margin: 0; color: var(--text); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.art:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); text-decoration: none; }
.art-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand-l), var(--card)); display: grid; place-items: center; overflow: hidden; }
.art-cover img { width: 100%; height: 100%; object-fit: cover; }
.art-ph .ic { width: 54px; height: 54px; color: var(--brand); opacity: .55; }
.art-body { padding: 14px 16px 16px; display: grid; gap: 4px; justify-items: start; }
.art-body h3 { font-size: 1.05rem; line-height: 1.6; }
.art-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mag-tabs { margin: 6px 0 16px; }
.art-page { display: grid; gap: 0 18px; grid-template-columns: 1fr; align-items: start; }
.art-page > * { min-width: 0; }
@media (min-width: 980px) { .art-page { grid-template-columns: 2.2fr 1fr; } .art-side { position: sticky; top: 84px; } }
.art-main h1 { font-size: 1.7rem; }
.art-hero { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--r-sm); margin-bottom: 8px; }
.lead { font-size: 1.1rem; color: var(--muted); border-inline-start: 4px solid var(--brand); padding-inline-start: 12px; }
.prose-body { font-size: 1.05rem; line-height: 2.1; }
.prose-body h2 { margin-top: 1.2em; }
.prose-body ul { padding-inline-start: 1.4em; }
.toc { margin: 0; padding-inline-start: 1.2em; }
.art-links { margin: 0; padding-inline-start: 1.2em; }

.score { display: inline-flex; align-items: center; gap: 2px; font-size: .78rem; font-weight: 700; color: #8a5a00; background: #fff4dc; border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
@media (prefers-color-scheme: dark) { .score { color: #ffcf70; background: #3a2c10; } }
.doc-head-text .score { font-size: .9rem; }
.trust { color: var(--text); margin: 0; }

/* ---------------------------------------------------------------- consultation */
.consult-box { border-color: var(--ok); }
.consult-row { display: block; color: var(--text); }
.consult-row:hover { border-color: var(--brand); text-decoration: none; }
.thread { display: grid; gap: 10px; margin: 14px 0; }
.msg { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; max-width: 88%; box-shadow: var(--shadow); }
.msg.me { justify-self: start; background: var(--brand-l); border-color: transparent; }
.msg:not(.me) { justify-self: end; }
.msg.system { justify-self: center; max-width: 100%; background: var(--off-l); box-shadow: none; font-size: .9rem; }
.msg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.msg-files img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; }

/* ---------------------------------------------------------------- crop (admin) */
.crop { display: grid; gap: 8px; justify-items: center; background: var(--off-l); border-radius: var(--r-sm); padding: 12px; }
.crop[hidden] { display: none; }
.crop-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.crop-tools .on { background: var(--brand); color: #fff; }
.crop-canvas { max-width: 100%; border-radius: 10px; cursor: grab; touch-action: none; background: #222; box-shadow: var(--shadow); }
.crop-canvas:active { cursor: grabbing; }
.crop-zoom { display: flex; align-items: center; gap: 8px; width: min(100%, 520px); }
.crop-zoom input { flex: 1; }

.hours { margin: 0; padding-inline-start: 1.2em; }
.hours-grid { display: grid; gap: 6px; }
.hours-row { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 8px; align-items: center; }
.hours-row .inline-form input { width: 6.2em; }
.hours-row select.time-pick { width: 6.5em; padding-inline: 8px; text-align: center; font-size: 1rem; }
.hours-row b { display: grid; gap: 2px; }
.hours-copy { font-weight: normal; font-size: .8rem; text-align: start; padding: 0; }
@media (max-width: 640px) { .hours-row { grid-template-columns: 1fr; } }

/* ================================================================ redesign v10 */
/* hero: text + booking mock, softer background */
.hero { padding: 48px 0 40px; background:
    radial-gradient(600px 320px at 90% 0%, rgba(255, 255, 255, .22), transparent 65%),
    radial-gradient(520px 300px at 5% 100%, rgba(120, 220, 255, .25), transparent 60%),
    linear-gradient(140deg, var(--brand) 0%, var(--brand-dd) 100%); }
.hero::after { background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1.5px); background-size: 22px 22px; opacity: .14;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; margin-bottom: 26px; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }
.hero-text { text-align: center; }
@media (min-width: 900px) { .hero-text { text-align: start; } }
.hero-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); padding: 4px 14px; border-radius: 999px; margin-bottom: 12px; }
.hero h1 { font-size: clamp(1.8rem, 4.6vw, 2.9rem); line-height: 1.35; margin: 0 0 .35em; letter-spacing: -.01em; }
.hero p { font-size: 1.08rem; line-height: 2; margin: 0 auto; max-width: 560px; opacity: .95; }
@media (min-width: 900px) { .hero p { margin: 0; } }
.hero-art { display: none; }
@media (min-width: 900px) { .hero-art { display: block; } }
.mock { background: #fff; color: #172033; border-radius: 22px; padding: 18px; box-shadow: 0 30px 60px rgba(5, 20, 50, .35); max-width: 380px; margin-inline: auto; transform: rotate(-2deg); }
.mock-top { display: flex; align-items: center; gap: 10px; }
.mock-top div { display: grid; flex: 1; line-height: 1.6; } .mock-top div span { font-size: .8rem; color: #66728a; }
.mock-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #e8f2ff; color: #0a84ff; }
.mock-av .ic { width: 26px; height: 26px; }
.mock-score { font-size: .8rem; font-weight: 700; color: #a86a00; background: #fff4dc; padding: 2px 8px; border-radius: 999px; }
.mock-days, .mock-times { display: grid; gap: 6px; margin-top: 12px; }
.mock-days { grid-template-columns: repeat(4, 1fr); }
.mock-times { grid-template-columns: repeat(3, 1fr); }
.mock-days span, .mock-times span { text-align: center; border: 1px solid #e3e9f2; border-radius: 10px; padding: 4px 0; font-size: .78rem; color: #66728a; }
.mock-days b { display: block; font-size: 1rem; color: #172033; }
.mock-days .on, .mock-times .on { background: #0a84ff; border-color: #0a84ff; color: #fff; } .mock-days .on b { color: #fff; }
.mock-ok { margin-top: 12px; background: #e6f6ee; color: #0f9d58; border-radius: 10px; padding: 6px 10px; font-size: .85rem; font-weight: 700; display: flex; gap: 6px; align-items: center; }

/* search: a label above every field, nothing gets cut off */
.search .field { display: grid; gap: 2px; min-width: 0; }
.search .field > span:first-child { font-size: .78rem; font-weight: 700; color: var(--muted); padding-inline-start: 4px; }
.search select, .search input[type=search] { width: 100%; min-width: 0; text-overflow: ellipsis; }
.search-in { position: relative; display: block; }
.search-in .ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-in input { padding-inline-start: 40px; }
.hero-search { padding: 14px 16px 12px; border-radius: 22px; }
@media (min-width: 640px) { .hero-search { grid-template-columns: 1fr 1fr 1fr; } .hero-search .search-q { grid-column: 1 / -1; } }
@media (min-width: 980px) { .hero-search { grid-template-columns: 2fr 1.2fr 1fr 1fr auto; align-items: end; } .hero-search .search-q { grid-column: auto; } .hero-search .btn { height: 46px; padding-inline: 24px; } }

/* sections */
.block-head { align-items: flex-end; }
.block-head h2 { font-size: 1.35rem; margin: 0; }
.block-head p { margin: 0; }
.block { margin-top: 42px; }

/* specialty tiles: a color per specialty */
.t0 { --tc: #0a84ff; --tl: #e7f1ff; } .t1 { --tc: #e5484d; --tl: #feecee; } .t2 { --tc: #12a594; --tl: #e1f7f3; } .t3 { --tc: #8e4ec6; --tl: #f3ebfb; }
.t4 { --tc: #e5780b; --tl: #fff1e2; } .t5 { --tc: #d6409f; --tl: #fdeaf5; } .t6 { --tc: #3e63dd; --tl: #ebeffd; } .t7 { --tc: #2b9a4a; --tl: #e6f5ea; }
@media (prefers-color-scheme: dark) { .t0, .t1, .t2, .t3, .t4, .t5, .t6, .t7 { --tl: color-mix(in srgb, var(--tc) 18%, #151d2a); } }
.tiles { gap: 14px; }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; align-items: center; text-align: start; gap: 12px; padding: 14px; border-radius: 16px; position: relative; }
.tile:hover { border-color: var(--tc, var(--brand)); }
.tile-ic { width: 52px; height: 52px; border-radius: 14px; margin: 0; background: var(--tl, var(--brand-l)); color: var(--tc, var(--brand)); flex: none; }
.tile-txt { display: grid; min-width: 0; line-height: 1.6; }
.tile b { font-size: 1rem; line-height: 1.6; }
.tile-n { font-size: .78rem; color: var(--muted); }

/* doctor card: specialty as a colored tag */
.spec-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--tl, var(--brand-l)); color: var(--tc, var(--brand)); margin: 4px 0; max-width: 100%; }
.spec-tag .ic { width: 1.05em; height: 1.05em; }
.doc { padding: 20px 16px 16px; }
.doc-cta { margin-top: 10px; }

/* features: 3 colored cards */
.features { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { display: grid; gap: 6px; align-content: start; padding: 22px; border-radius: 20px; color: #fff; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); text-decoration: none; }
.feature::after { content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .12); inset-inline-end: -50px; top: -60px; }
.feature b { font-size: 1.2rem; } .feature span { opacity: .92; line-height: 1.9; } .feature em { font-style: normal; font-weight: 700; margin-top: 6px; }
.feature .feature-ic { width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; opacity: 1; }
.feature-ic .ic { width: 26px; height: 26px; }
.f1 { background: linear-gradient(135deg, #0a84ff, #0b52c4); } .f2 { background: linear-gradient(135deg, #12a594, #0b7a6c); } .f3 { background: linear-gradient(135deg, #8e4ec6, #6232a0); }

/* why */
.why { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.why h2 { margin-top: 0; }
.why-row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .why-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .why-row { grid-template-columns: repeat(4, 1fr); } }
.why-item { display: flex; gap: 12px; align-items: flex-start; }
.why-item b { display: block; } .why-item p { margin: 2px 0 0; line-height: 1.8; }
.why-ic { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--brand-l); color: var(--brand); }
.step-n { color: var(--brand); opacity: .18; }
@media (max-width: 639px) {
  .hero-search { grid-template-columns: 1fr 1fr; } .hero-search .search-q, .hero-search .field:has(select[name=specialty]), .hero-search .check, .hero-search .btn { grid-column: 1 / -1; }
  .hero { padding-top: 28px; } .hero-grid { margin-bottom: 18px; } .hero p { font-size: 1rem; }
  .tile { gap: 8px; padding: 10px; } .tile-ic { width: 40px; height: 40px; border-radius: 12px; } .tile-ic .ic { width: 22px; height: 22px; } .tile b { font-size: .9rem; }
  .block { margin-top: 32px; } .block-head { flex-wrap: wrap; }
}

/* city list waiting for a province */
select:disabled { opacity: .6; cursor: not-allowed; background-color: var(--off-l); }

/* storage meter (doctor panel, admin): a <progress>; inline style="" is blocked by the CSP */
progress.meter { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 12px; border: 0; border-radius: 999px; background: var(--off-l); overflow: hidden; margin: 6px 0; color: var(--brand); }
progress.meter::-webkit-progress-bar { background: var(--off-l); border-radius: 999px; }
progress.meter::-webkit-progress-value { border-radius: 999px; background: repeating-linear-gradient(135deg, var(--brand) 0 8px, color-mix(in srgb, var(--brand) 80%, #fff) 8px 16px); }
progress.meter::-moz-progress-bar { border-radius: 999px; background: var(--brand); }
progress.meter.warn::-webkit-progress-value { background: #e59a00; }
progress.meter.warn::-moz-progress-bar { background: #e59a00; }
progress.meter.full::-webkit-progress-value { background: var(--err); }
progress.meter.full::-moz-progress-bar { background: var(--err); }
.storage-card .kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.packs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-top: 10px; }
.pack { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 16px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.pack b { font-size: 1.2rem; color: var(--brand); }
.pack .btn { margin-top: 6px; width: 100%; }

/* small helpers instead of inline style="" (blocked by the CSP) */
.u-err { color: var(--err) !important; } .u-ok { color: var(--ok) !important; } .u-warn { color: #c77700 !important; } .u-brand { color: var(--brand) !important; }
.u-mt12 { margin-top: 12px !important; } .u-mt18 { margin-top: 18px !important; }
.u-w4 { width: 4em !important; } .u-w45 { width: 4.5em !important; } .u-w5 { width: 5em !important; } .u-w9 { width: 9em !important; }
.u-minw14 { min-width: 14em !important; } .u-minw220 { min-width: 220px; }
.u-fs125 { font-size: 1.25rem; } .u-fs14 { font-size: 1.4rem; }
.u-thumb169 { width: 160px; height: 90px; object-fit: cover; }
.u-color { width: 64px !important; height: 40px; padding: 2px !important; }
.badge.u-badge-err { background: var(--err-l); color: var(--err); }

/* calendar & times: green = free, grey = full/taken, red = closed (v18) */
.day.full, .cal span.day.full { border: 2px solid var(--line); background: var(--off-l); color: var(--off); cursor: not-allowed; }
.dot.full { background: var(--off); }
.time.free { border: 2px solid var(--ok); background: var(--ok-l); color: var(--ok); }
.time.free:hover { background: var(--ok); color: #fff; }
.time.taken { border: 1px dashed var(--line); background: var(--off-l); color: var(--off); text-decoration: line-through; cursor: not-allowed; font-weight: 400; }
