@font-face{font-family:'Cairo';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/cairo-400.ttf) format('truetype');}
@font-face{font-family:'Cairo';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/cairo-500.ttf) format('truetype');}
@font-face{font-family:'Cairo';font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/cairo-600.ttf) format('truetype');}
@font-face{font-family:'Cairo';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/cairo-700.ttf) format('truetype');}
@font-face{font-family:'Cairo';font-style:normal;font-weight:800;font-display:swap;src:url(/fonts/cairo-800.ttf) format('truetype');}
/* MyDoctor – دكتوري : design system
   Theme A (default) = medical blue on white. Theme B = deep navy / glass.
   Theme C = light, airy blue. Switch with data-theme on <body>. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Cairo', 'Segoe UI', Tahoma, 'Helvetica Neue', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, button { font-size: 15px; }
.ic { width: 20px; height: 20px; flex: 0 0 auto; }

:root, body[data-theme="a"] {
  --bg: #F2F7FC;
  --card: #FFFFFF;
  --card-2: #F7FAFE;
  --ink: #0D1B2A;
  --ink-2: #3C5068;
  --muted: #6C7E92;
  --line: #E1EAF4;
  --brand: #0F4C81;
  --brand-2: #1B7FCE;
  --brand-soft: #E7F2FC;
  --brand-ink: #0B3C66;
  --hero-bg: radial-gradient(120% 120% at 100% 0%, #1D7AC4 0%, #0F4C81 45%, #0A3358 100%);
  --hero-ink: #FFFFFF;
  --hero-sub: rgba(255, 255, 255, .82);
  --hero-glass: rgba(255, 255, 255, .14);
  --hero-line: rgba(255, 255, 255, .22);
  --gold: #F2A93B;
  --ok: #12805A;
  --ok-soft: #E4F5EE;
  --warn: #B4741A;
  --danger: #C0392B;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 6px 20px rgba(15, 76, 129, .07);
  --shadow-lg: 0 16px 40px rgba(15, 76, 129, .14);
  --topbar-bg: rgba(242, 247, 252, .86);
  --chip: #FFFFFF;
}

body[data-theme="b"] {
  --bg: #EDF2F8;
  --card: #FFFFFF;
  --card-2: #F5F8FC;
  --ink: #0A1A2B;
  --ink-2: #3A4E63;
  --muted: #6A7C90;
  --line: #DEE7F1;
  --brand: #0B2E4D;
  --brand-2: #1683C9;
  --brand-soft: #E3F0FA;
  --brand-ink: #082338;
  --hero-bg: radial-gradient(140% 130% at 0% 0%, #12557F 0%, #0B2E4D 42%, #061E33 100%);
  --hero-ink: #FFFFFF;
  --hero-sub: rgba(255, 255, 255, .78);
  --hero-glass: rgba(255, 255, 255, .09);
  --hero-line: rgba(255, 255, 255, .18);
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 8px 26px rgba(8, 35, 56, .09);
  --shadow-lg: 0 20px 50px rgba(8, 35, 56, .18);
  --topbar-bg: rgba(237, 242, 248, .84);
}

body[data-theme="c"] {
  --bg: #F6FAFF;
  --card: #FFFFFF;
  --card-2: #F4F9FF;
  --ink: #0C2033;
  --ink-2: #3D5570;
  --muted: #6F849B;
  --line: #E4EEF9;
  --brand: #1467C4;
  --brand-2: #3E9BEF;
  --brand-soft: #EAF4FF;
  --brand-ink: #0F4E96;
  --hero-bg: linear-gradient(160deg, #FFFFFF 0%, #E9F4FF 55%, #DCEEFF 100%);
  --hero-ink: #0B2B4A;
  --hero-sub: #4A6580;
  --hero-glass: rgba(20, 103, 196, .07);
  --hero-line: rgba(20, 103, 196, .16);
  --radius: 26px;
  --radius-sm: 16px;
  --shadow: 0 8px 24px rgba(20, 103, 196, .08);
  --shadow-lg: 0 18px 44px rgba(20, 103, 196, .14);
  --topbar-bg: rgba(246, 250, 255, .88);
}

body[data-theme="b"] .topbar { background: rgba(6, 30, 51, .92); border-bottom-color: rgba(255, 255, 255, .08); }
body[data-theme="b"] .brand-txt strong { color: #FFFFFF; }
body[data-theme="b"] .brand-txt small { color: rgba(255, 255, 255, .55); }
body[data-theme="b"] .city-pill { background: rgba(255, 255, 255, .12); color: #DCEBF8; }
body[data-theme="b"] .icon-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #DCEBF8; }
body[data-theme="b"] .topnav a { color: rgba(255, 255, 255, .72); }
body[data-theme="b"] .topnav a.on { background: rgba(255, 255, 255, .14); color: #FFFFFF; }
body[data-theme="b"] .hero-stats strong { color: #FFFFFF; }
body[data-theme="c"] .search { box-shadow: 0 8px 20px rgba(20, 103, 196, .13); }
body[data-theme="c"] .hero::after { background: radial-gradient(circle, rgba(20, 103, 196, .12), transparent 65%); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px max(14px, calc((100vw - 1080px) / 2));
  background: var(--topbar-bg);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand .logo { border-radius: 11px; box-shadow: 0 4px 12px rgba(15, 76, 129, .22); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt strong { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.brand-txt small { font-size: 10px; color: var(--muted); letter-spacing: .6px; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.topnav { display: none; }
.topnav a { padding: 7px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.topnav a.on { background: var(--brand-soft); color: var(--brand-ink); }
.city-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.city-pill .ic { width: 15px; height: 15px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
}
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand-2); }

/* ---------- page shell ---------- */
.page {
  max-width: 1080px; margin: 0 auto;
  padding: 16px 14px calc(92px + env(safe-area-inset-bottom));
}
.page-head { margin: 6px 2px 14px; }
.page-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: var(--hero-bg); color: var(--hero-ink);
  border-radius: var(--radius);
  padding: 22px 18px 18px;
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ""; position: absolute; inset: auto -60px -80px auto;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  background: var(--hero-glass); border: 1px solid var(--hero-line);
  color: inherit; font-size: 12.5px; font-weight: 700;
}
.hero-badge .ic { width: 14px; height: 14px; }
.hero-main { position: relative; z-index: 1; }
.hero-side { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; position: relative; z-index: 1; }
.hero h1 { font-size: 25px; line-height: 1.35; font-weight: 800; margin: 12px 0 6px; letter-spacing: -.4px; }
.hero-sub { color: var(--hero-sub); font-size: 13.5px; }
.search {
  display: flex; align-items: center; gap: 8px;
  margin-top: 0; padding: 6px 6px 6px 12px;
  background: #FFFFFF; border-radius: 16px;
  box-shadow: 0 10px 26px rgba(3, 25, 45, .18);
}
.search-ic { width: 19px; height: 19px; color: var(--muted); }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: #0D1B2A; padding: 8px 2px; font-size: 14.5px;
}
.search input::placeholder { color: #8A9AAC; }
.search button {
  border: 0; border-radius: 12px; padding: 10px 18px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #fff; font-weight: 700; font-size: 14px;
}
.search button:active { transform: translateY(1px); }
.hero-stats {
  display: flex; align-items: center; gap: 18px;
  padding-top: 13px; border-top: 1px solid var(--hero-line);
}
.hero-stats div { display: flex; flex-direction: column; line-height: 1.25; }
.hero-stats strong { font-size: 17px; font-weight: 800; }
.hero-stats span { font-size: 11.5px; color: var(--hero-sub); }

/* ---------- blocks ---------- */
.block { margin-top: 22px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.block-head h2 { font-size: 16.5px; font-weight: 800; letter-spacing: -.2px; }
.link { display: inline-flex; align-items: center; gap: 2px; color: var(--brand-2); font-size: 13px; font-weight: 700; }
.link .ic { width: 15px; height: 15px; }
.hint { color: var(--muted); font-size: 12px; }

/* specialties */
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.spec {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px 11px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); text-align: center;
  transition: transform .15s ease, border-color .15s ease;
}
.spec:hover { transform: translateY(-2px); border-color: var(--brand-2); }
.spec-ic {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px;
  background: var(--brand-soft); color: var(--brand);
}
.spec-ic .ic { width: 22px; height: 22px; }
.spec-name { font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.3; }
.spec-count {
  position: absolute; top: 6px; inset-inline-end: 7px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}

/* horizontal scroller */
.hscroll {
  display: flex; gap: 11px; overflow-x: auto; padding: 2px 2px 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
.doc-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.offer-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* doctor card */
.doc-card {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 9px;
  padding: 13px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.doc-head { display: flex; gap: 10px; align-items: flex-start; }
.avatar {
  width: 50px; height: 50px; border-radius: 16px; object-fit: cover; flex: 0 0 auto;
  border: 1px solid var(--line);
}
.avatar-txt {
  display: grid; place-items: center; font-weight: 800; font-size: 21px; color: #fff; white-space: nowrap;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  letter-spacing: .5px;
}
.doc-id { min-width: 0; }
.doc-id h3 { font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.doc-spec { color: var(--brand-2); font-size: 12.5px; font-weight: 700; }
.doc-area { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.doc-area .ic { width: 13px; height: 13px; }
.doc-qual {
  font-size: 11.5px; color: var(--ink-2); background: var(--card-2);
  border-radius: 10px; padding: 6px 9px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.doc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.doc-rating { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.stars { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.stars .ic { width: 14px; height: 14px; color: var(--gold); }
.doc-fee { text-align: end; line-height: 1.2; }
.doc-fee span { display: block; font-size: 10.5px; color: var(--muted); }
.doc-fee strong { font-size: 14px; font-weight: 800; color: var(--brand); }
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
}
.badge .ic { width: 12px; height: 12px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-demo { background: #FFF3E0; color: #A9631A; }

/* offers */
.offer {
  position: relative; padding: 15px;
  border-radius: var(--radius-sm); color: #fff;
  background: linear-gradient(150deg, var(--brand-2), var(--brand-ink));
  box-shadow: var(--shadow);
}
.offer h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.offer p { font-size: 12.5px; color: rgba(255, 255, 255, .82); }
.offer .badge-demo { position: absolute; top: 10px; inset-inline-start: 10px; }
.offer-cta {
  display: inline-block; margin-top: 10px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  font-size: 12px; font-weight: 700;
}

/* all doctors button */
.btn-all {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 20px; padding: 14px; border-radius: var(--radius-sm);
  background: var(--card); border: 1.5px solid var(--brand-2); color: var(--brand);
  font-weight: 800; font-size: 14.5px;
}
.btn-all .ic { width: 16px; height: 16px; }

/* note card */
.note-card {
  display: flex; gap: 11px; align-items: flex-start;
  margin-top: 14px; padding: 14px; border-radius: var(--radius-sm);
  background: var(--brand-soft); border: 1px solid rgba(27, 127, 206, .18);
}
.note-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #fff; color: var(--brand); flex: 0 0 auto; }
.note-card strong { display: block; font-size: 13.5px; }
.note-card p { font-size: 12px; color: var(--ink-2); margin-top: 1px; }

/* empty states */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 26px 18px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px dashed var(--line);
}
.empty-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--brand-soft); color: var(--brand); }
.empty-ic .ic { width: 24px; height: 24px; }
.empty h3 { font-size: 15px; font-weight: 800; }
.empty p { font-size: 12.5px; color: var(--muted); max-width: 34ch; }
.empty-sm { padding: 18px; }

/* doctors page */
.search-inline { margin-bottom: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.doc-grid { display: grid; grid-template-columns: 1fr; gap: 11px; margin-top: 6px; }
.doc-grid .doc-card { flex: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.pager a { padding: 7px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--brand); font-weight: 700; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--brand); font-weight: 700; font-size: 13.5px;
}
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-sm .ic { width: 15px; height: 15px; }

.soon { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 54px 20px; }
.soon-ic { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); }
.soon-ic .ic { width: 28px; height: 28px; }
.soon-code { font-size: 44px; font-weight: 800; color: var(--brand-soft); line-height: 1; }
.soon h1 { font-size: 19px; font-weight: 800; }
.soon p { color: var(--muted); font-size: 13.5px; max-width: 40ch; }
.soon .btn-ghost { margin-top: 8px; }
.prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; color: var(--ink-2); font-size: 14px; }

/* footer */
.foot {
  max-width: 1080px; margin: 0 auto; padding: 6px 16px calc(96px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px;
}
.foot-brand { display: flex; align-items: center; gap: 9px; padding-top: 16px; }
.foot-brand strong { display: block; font-size: 13.5px; color: var(--ink); }
.foot-brand span { font-size: 11.5px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 8px; }
.foot-links a { color: var(--ink-2); font-weight: 600; }
.foot-note { font-size: 11px; line-height: 1.7; }

/* bottom nav */
.bottomnav {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
  background: var(--topbar-bg);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 2px; border-radius: 12px; color: var(--muted); font-size: 10.5px; font-weight: 700;
}
.bottomnav a .ic { width: 21px; height: 21px; }
.bottomnav a.on { color: var(--brand); }
.bottomnav a.on .ic { filter: drop-shadow(0 2px 5px rgba(15, 76, 129, .22)); }

/* ---------- admin ---------- */
.auth-wrap {
  min-height: 100dvh; display: grid; place-items: center;
  padding: 24px 14px 40px;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(27, 127, 206, .16), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px; padding: 22px 20px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.auth-brand strong { display: block; font-size: 15px; font-weight: 800; }
.auth-brand span { font-size: 11.5px; color: var(--muted); }
.auth-card h1 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.auth-note { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.field { display: block; margin-top: 12px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field input {
  display: block; width: 100%; margin-top: 5px; padding: 11px 12px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card-2);
  color: var(--ink); outline: none; font-weight: 500;
}
.field input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(27, 127, 206, .14); }
.field-hint { display: block; font-weight: 500; font-size: 11px; color: var(--muted); margin-top: 4px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; margin-top: 16px; padding: 12px;
  border: 0; border-radius: 13px; color: #fff; font-weight: 800; font-size: 14.5px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  box-shadow: 0 10px 22px rgba(15, 76, 129, .22);
}
.btn .ic { width: 17px; height: 17px; }
.alert {
  margin-top: 10px; padding: 10px 12px; border-radius: 11px;
  background: #FDECEA; color: #A3271B; font-size: 12.5px; font-weight: 600;
  border: 1px solid #F5C9C3;
}
.auth-foot { margin-top: 14px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.auth-back { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--brand-2); }

.admin { padding-top: 18px; }
.admin-top form { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.stat {
  display: flex; flex-direction: column; gap: 1px;
  padding: 12px 13px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.stat span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.stat small { font-size: 10.5px; color: var(--muted); }
.stat-warn { border-color: #F3D9B0; background: #FFFBF3; }
.stat-money strong { font-size: 18px; color: var(--brand); }
.panel { margin-top: 16px; padding: 14px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-head h2 { font-size: 15px; font-weight: 800; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th, .table td { text-align: start; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 11px; color: var(--muted); font-weight: 700; background: var(--card-2); }
.table td small { color: var(--muted); font-size: 10.5px; }
.status { padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 10.5px; font-weight: 700; }
.phases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.phases li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); }
.phases li .ic { width: 17px; height: 17px; color: var(--muted); }
.phases li div { flex: 1; min-width: 0; }
.phases li strong { display: block; font-size: 12.5px; }
.phases li span { font-size: 11px; color: var(--muted); }
.phases li em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.phases li.done { background: var(--ok-soft); border-color: #BFE6D5; }
.phases li.done .ic, .phases li.done em { color: var(--ok); }
code { font-family: ui-monospace, Menlo, monospace; font-size: 11px; background: var(--card-2); padding: 1px 5px; border-radius: 5px; }

/* ---------- doctor profile (phase 2) ---------- */
.back { display: inline-flex; align-items: center; gap: 3px; margin: 2px 2px 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.back .ic { width: 15px; height: 15px; transform: scaleX(-1); }
.profile {
  background: var(--hero-bg); color: var(--hero-ink);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.profile::after {
  content: ""; position: absolute; inset: -60px -70px auto auto; width: 200px; height: 200px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 65%);
}
.profile-head { display: flex; gap: 13px; align-items: center; position: relative; z-index: 1; }
.avatar-lg { width: 68px; height: 68px; border-radius: 20px; font-size: 28px; border-color: rgba(255, 255, 255, .3); }
.profile-id { min-width: 0; }
.profile-id h1 { font-size: 19px; font-weight: 800; line-height: 1.35; letter-spacing: -.2px; }
.profile-spec { color: var(--hero-sub); font-size: 13px; font-weight: 700; margin-top: 1px; }
.profile-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.profile-tags .stars { color: inherit; }
.profile-tags .stars .ic { color: var(--gold); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 15px 0 14px; position: relative; z-index: 1; }
.fact { padding: 8px 9px; border-radius: 12px; background: var(--hero-glass); border: 1px solid var(--hero-line); }
.fact span { display: block; font-size: 10.5px; color: var(--hero-sub); }
.fact strong { font-size: 13.5px; font-weight: 800; }
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px; border-radius: 14px; background: #FFFFFF; color: #0B2E4D;
  font-weight: 800; font-size: 14.5px; box-shadow: 0 10px 24px rgba(3, 25, 45, .22);
  position: relative; z-index: 1;
}
.btn-primary .ic { width: 18px; height: 18px; }
.cta-note { text-align: center; font-size: 11px; color: var(--hero-sub); margin-top: 7px; position: relative; z-index: 1; }
.panel-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.panel-text.muted, .muted { color: var(--muted); }
.panel-note { display: flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 11.5px; color: var(--ok); font-weight: 700; }
.panel-note .ic { width: 14px; height: 14px; }
.clinic { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.clinic:last-of-type { border-bottom: 0; }
.clinic-name { display: flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 800; }
.clinic-name .ic { width: 15px; height: 15px; color: var(--brand-2); }
.clinic-phone { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--brand-2); direction: ltr; }
.clinic-phone .ic { width: 14px; height: 14px; }
.hours { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hours-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; font-size: 12.5px; background: var(--card-2); }
.hours-row + .hours-row { border-top: 1px solid var(--line); }
.hours-row span { color: var(--muted); font-weight: 600; }
.hours-row strong { font-weight: 700; }
.review { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }

/* ---------- search filters (phase 2) ---------- */
.filters { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.filter-row select, .filters select {
  width: 100%; padding: 9px 10px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
}
.filter-row select:focus, .filters select:focus { border-color: var(--brand-2); outline: none; }
.switch {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; padding: 9px 11px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 700; color: var(--ink-2);
}
.switch input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.filter-actions { display: flex; align-items: center; gap: 12px; }
a.doc-card { transition: transform .15s ease, border-color .15s ease; }
a.doc-card:hover { transform: translateY(-2px); border-color: var(--brand-2); }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .page { padding: 20px 22px 100px; }
  .hero { padding: 30px 28px 24px; }
  .hero h1 { font-size: 30px; }
  .search { max-width: 560px; }
  .spec-grid { grid-template-columns: repeat(6, 1fr); gap: 11px; }
  .doc-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-row { grid-template-columns: repeat(5, 1fr); }
  .switch { grid-column: auto; }
  .profile { padding: 24px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats-4 { grid-template-columns: repeat(4, 1fr); }
  .foot { padding-bottom: 30px; }
  .bottomnav { max-width: 560px; margin: 0 auto 12px; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
}
@media (min-width: 1000px) {
  .page { padding: 26px 24px 40px; }
  .hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 34px; align-items: center; padding: 34px 32px; }
  .hero-side { margin-top: 0; gap: 18px; }
  .hero h1 { font-size: 32px; margin-top: 10px; }
  .hero .search { max-width: none; }
  .hero-stats { flex-direction: row; justify-content: space-between; gap: 10px; }
  .hero-stats div { flex-direction: column; }
  .doc-row { grid-template-columns: repeat(3, 1fr); }
  .offer-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-grid { grid-template-columns: repeat(3, 1fr); }
  .bottomnav { display: none; }
  .topnav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; margin-inline-end: 14px; }
  .foot { padding-bottom: 26px; }
  .spec-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Phase 3: booking + status + admin appointments ---------- */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; } }
.book-form .field { margin-top: 12px; }
.visit-types { border: 0; padding: 0; margin: 0 0 6px; display: grid; gap: 10px; }
.visit-types legend { font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.visit {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--card-2); border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.visit:has(input:checked) { border-color: var(--brand-2); background: var(--brand-soft); }
.visit input { accent-color: var(--brand); width: 20px; height: 20px; margin: 0; }
.visit-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.visit-name { font-weight: 800; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.visit-hint { font-size: 12px; color: var(--muted); }
.visit-price { font-size: 15px; color: var(--brand); white-space: nowrap; }
.badge-warn { background: #FDF0DC; color: var(--warn); font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.form-note { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 14px 0; }
.form-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ok); }
.hint.center { text-align: center; display: block; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(18,128,90,.2); }

.pill { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.pill-warn { background: #FDF0DC; color: var(--warn); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-bad { background: #FBE7E4; color: var(--danger); }
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ref { font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--muted); letter-spacing: .5px; }
.status-title { font-size: 22px; margin: 0 0 6px; color: var(--ink); }
.status-sub { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin: 0 0 16px; }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; position: relative; opacity: .45; }
.timeline li.done { opacity: 1; }
.timeline li:not(:last-child)::after {
  content: ''; position: absolute; inset-inline-start: 15px; top: 38px; bottom: -2px; width: 2px; background: var(--line);
}
.timeline li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--muted); }
.timeline li.done svg { color: var(--ok); }
.timeline strong { display: block; font-size: 14px; color: var(--ink); }
.timeline span { font-size: 12px; color: var(--muted); }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv strong { color: var(--ink); text-align: end; }
.bad-text { color: var(--danger); }
.status-form .field { margin-bottom: 12px; }
.status-form select, .status-form input { width: 100%; }
.not-confirmed { color: var(--warn); font-weight: 700; }
.field textarea, .book-form textarea { width: 100%; resize: vertical; font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px; line-height: 1.6; }
.field textarea:focus { outline: none; border-color: var(--brand-2); }
.profile .status-title { color: var(--hero-ink); }
.profile .status-sub { color: var(--hero-sub); }
.profile .ref { color: var(--hero-sub); }
.profile .not-confirmed { color: #FFD79A; }
.appt-list { display: grid; gap: 10px; }
.appt-row { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.appt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.appt-ref { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.appt-name { font-weight: 800; font-size: 15px; }
.appt-name small { font-weight: 400; color: var(--muted); font-size: 12px; }
.appt-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
