/* =========================================================
   Heart Care Clinic — v2 design system
   ========================================================= */
:root {
  --indigo: #5b5bf7;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --navy: #0b1437;
  --grad: linear-gradient(135deg, #5b5bf7 0%, #8b5cf6 50%, #22d3ee 120%);
  --grad-2: linear-gradient(135deg, #6366f1, #22d3ee);
  --grad-soft: linear-gradient(135deg, rgba(91,91,247,.10), rgba(34,211,238,.10));
  --accent: #ff5d73;
  --ok: #12b886;
  --warn: #f59f00;

  --bg: #f4f6fd;
  --surface: #ffffff;
  --surface-2: #f6f7fc;
  --glass: rgba(255,255,255,.72);
  --text: #0b1437;
  --muted: #6b7590;
  --line: #e8ebf5;
  --brand-text: #4f46e5;

  --shadow-sm: 0 2px 6px -2px rgba(17, 24, 74, .08);
  --shadow: 0 1px 2px rgba(17,24,74,.04), 0 12px 32px -14px rgba(17, 24, 74, .16);
  --shadow-lg: 0 24px 50px -20px rgba(91, 91, 247, .55);
  --r-xl: 30px;
  --r: 22px;
  --r-sm: 14px;
  --nav-h: 70px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font-d: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
}
[data-theme="dark"] {
  --bg: #070b1d;
  --surface: #10162e;
  --surface-2: #161d3a;
  --glass: rgba(16,22,46,.72);
  --text: #eaeefb;
  --muted: #8d97b5;
  --line: #222a4a;
  --brand-text: #a5b4fc;
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.18), rgba(34,211,238,.10));
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px -14px rgba(0,0,0,.7);
  --shadow-sm: 0 2px 6px -2px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .4s, color .4s;
}
h1, h2, h3, h4, .font-d { font-family: var(--font-d); letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: rgba(91,91,247,.25); }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.grad-text { background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text); opacity: .9; }
[hidden] { display: none !important; }

/* ---------- Ambient aurora ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; animation: drift 22s ease-in-out infinite alternate; }
.aurora .a1 { width: 520px; height: 520px; background: #c7d2fe; top: -180px; left: -160px; }
.aurora .a2 { width: 440px; height: 440px; background: #a5f3fc; top: 30%; right: -200px; animation-delay: -8s; }
.aurora .a3 { width: 380px; height: 380px; background: #fbcfe8; bottom: -160px; left: 20%; opacity: .3; animation-delay: -14s; }
[data-theme="dark"] .aurora span { opacity: .16; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.15); } }

/* ---------- Splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 999; background: var(--navy);
  background-image: radial-gradient(circle at 20% 20%, rgba(91,91,247,.55), transparent 50%), radial-gradient(circle at 80% 80%, rgba(34,211,238,.4), transparent 50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; transition: opacity .6s var(--ease), visibility .6s, transform .6s var(--ease);
}
#splash.hide { opacity: 0; visibility: hidden; transform: scale(1.06); }
.splash-ring { padding: 10px; border-radius: 36px; background: conic-gradient(from 0deg, #5b5bf7, #22d3ee, #f472b6, #5b5bf7); animation: spin 3s linear infinite; }
.splash-logo { width: 88px; height: 88px; border-radius: 28px; background: var(--navy); display: grid; place-items: center; font-size: 46px; animation: spin 3s linear infinite reverse; }
.splash-logo i { animation: beat 1.1s ease-in-out infinite; color: #ff7a93; }
.splash-name { font-family: var(--font-d); font-size: 1.6rem; font-weight: 700; margin-top: 22px; }
.splash-sub { opacity: .6; font-size: .9rem; }
.ecg { width: 200px; margin-top: 14px; }
.ecg path { fill: none; stroke: #67e8f9; stroke-width: 2.5; stroke-dasharray: 260; stroke-dashoffset: 260; animation: ecg 1.4s linear infinite; }
@keyframes ecg { to { stroke-dashoffset: 0; } }
@keyframes beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Layout ---------- */
.app { min-height: 100vh; }
.screen { display: none; min-height: 100vh; padding-bottom: calc(var(--nav-h) + 56px + var(--safe-b)); }
.screen.active { display: block; animation: screenIn .55s var(--ease); }
@keyframes screenIn { from { opacity: 0; transform: translateY(18px) scale(.99); } to { opacity: 1; transform: none; } }
.pad { padding: 0 18px; max-width: 1120px; margin: 0 auto; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px;
  max-width: 1120px; margin: 0 auto;
}
.topbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }
.hero-top { position: relative; padding-top: calc(20px + env(safe-area-inset-top, 0px)); padding-bottom: 18px; }
.hero-top::before { display: none; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-av { width: 46px; height: 46px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 1.35rem; box-shadow: var(--shadow-lg); }
.hello { color: var(--muted); font-weight: 600; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title { font-size: 1.3rem; font-weight: 700; line-height: 1.15; }
.top-title.sm { font-size: 1.12rem; text-align: center; flex: 1; }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  position: relative; width: 44px; height: 44px; flex: none;
  border-radius: 15px; display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  font-size: 1.25rem; transition: transform .25s var(--spring), background .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.sm { width: 36px; height: 36px; border-radius: 12px; font-size: 1.1rem; }
.icon-btn.glass { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(10px); box-shadow: none; }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,93,115,.6); } 70%,100% { box-shadow: 0 0 0 8px rgba(255,93,115,0); } }
.step-count { width: 44px; text-align: center; font-weight: 800; color: var(--brand-text); font-family: var(--font-d); }

/* ---------- Search ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow); margin-bottom: 16px; transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 5px rgba(91,91,247,.12), var(--shadow); }
.search > i { color: var(--muted); font-size: 1.2rem; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); padding: 10px 0; min-width: 0; }
.search input::placeholder { color: var(--muted); }
.search-k { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); color: var(--brand-text); font-size: 1.1rem; }
.search-results { margin: -6px 0 16px; display: grid; gap: 8px; }
.search-results:empty { display: none; }

/* ---------- Home grid ---------- */
.home-grid { display: grid; gap: 16px; }
.home-side { display: grid; gap: 16px; align-content: start; }

/* ---------- Hero ---------- */
.hero-card {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--navy); color: #fff;
  border-radius: var(--r-xl); padding: 24px 22px;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 4px;
  box-shadow: 0 30px 60px -30px rgba(11, 20, 55, .7);
  min-height: 300px;
}
.hero-mesh {
  position: absolute; inset: -20%; z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(91,91,247,.9), transparent 38%),
    radial-gradient(circle at 85% 15%, rgba(34,211,238,.55), transparent 35%),
    radial-gradient(circle at 70% 90%, rgba(244,114,182,.45), transparent 40%),
    radial-gradient(circle at 20% 95%, rgba(139,92,246,.6), transparent 40%);
  animation: mesh 14s ease-in-out infinite alternate;
}
@keyframes mesh { to { transform: rotate(14deg) scale(1.1); } }
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(to bottom, #000, transparent 80%); }
.hero-ecg { position: absolute; left: 0; right: 0; top: 46%; width: 100%; height: 90px; z-index: -1; opacity: .35; }
.hero-ecg path { fill: none; stroke: #67e8f9; stroke-width: 2; stroke-dasharray: 900; stroke-dashoffset: 900; animation: ecgRun 4s linear infinite; filter: drop-shadow(0 0 6px #22d3ee); }
@keyframes ecgRun { 60% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -900; } }
.hero-info { position: relative; z-index: 1; align-self: center; }
.hero-info h2 { font-size: 2rem; font-weight: 800; line-height: 1.02; margin: 12px 0 6px; }
.hero-deg { font-size: .78rem; opacity: .75; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0 6px; font-size: .78rem; font-weight: 700; }
.hero-meta i { color: #fde047; }
.hero-meta em { font-style: normal; opacity: .6; font-weight: 500; }
.status-line { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; margin-bottom: 14px; padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: pulse 1.8s infinite; }
.live-dot.closed { background: #fda4af; animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.7); } 70%,100% { box-shadow: 0 0 0 9px rgba(74,222,128,0); } }
.hero-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-photo { position: relative; z-index: 1; margin: -10px -22px -24px 0; align-self: end; }
.photo-ring { position: absolute; inset: 8% 4% 18% 10%; border-radius: 50%; background: conic-gradient(from 90deg, transparent, rgba(103,232,249,.7), transparent 40%, rgba(165,180,252,.7), transparent 80%); animation: spin 10s linear infinite; filter: blur(1px); mask: radial-gradient(circle, transparent 62%, #000 63%); }
.hero-photo img { position: relative; width: 100%; filter: drop-shadow(0 24px 30px rgba(0,0,0,.4)); }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 8px; z-index: 2;
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 7px 12px 7px 7px; border-radius: 14px; font-size: .7rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
  animation: floaty 4s ease-in-out infinite;
}
.float-card i { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; font-size: .95rem; }
.fc1 i { background: #ff5d73; animation: beat 1.2s infinite; }
.fc2 i { background: #12b886; }
.float-card b { display: block; line-height: 1.1; font-size: .78rem; }
.float-card small { opacity: .75; }
.fc1 { top: 14%; left: -18px; }
.fc2 { bottom: 26%; right: 18px; animation-delay: -2s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.chip-glass { background: rgba(255,255,255,.12) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); font-size: .68rem !important; }
.chip-glass i { color: #67e8f9; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 16px; font-weight: 700; font-size: .9rem;
  transition: transform .25s var(--spring), box-shadow .25s, opacity .2s, filter .2s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.95); }
.btn i { font-size: 1.1em; }
.btn-white { background: #fff; color: var(--navy); box-shadow: 0 10px 24px -10px rgba(0,0,0,.4); }
.btn-ghost-light { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-primary { background: var(--grad); background-size: 200% 200%; color: #fff; box-shadow: var(--shadow-lg); animation: gradShift 6s ease infinite; }
.btn-primary:hover { filter: brightness(1.07); }
@keyframes gradShift { 50% { background-position: 100% 50%; } }
.btn-primary:disabled { opacity: .4; box-shadow: none; cursor: not-allowed; filter: grayscale(.3); }
.btn-soft { background: var(--grad-soft); color: var(--brand-text); border: 1px solid color-mix(in srgb, var(--indigo) 14%, transparent); }
.btn-danger { background: rgba(255,93,115,.1); color: #e5384f; border: 1px solid rgba(255,93,115,.2); }
[data-theme="dark"] .btn-danger { color: #fda4af; }
.btn.full { width: 100%; }
.btn.sm { padding: 9px 14px; font-size: .8rem; border-radius: 12px; }
.btn.icon-only { padding: 13px; flex: none !important; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }
.link { color: var(--brand-text); font-weight: 700; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.45); transform: scale(0); animation: ripple .6s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--grad-soft); color: var(--brand-text); font-weight: 700; font-size: .74rem; }

/* ---------- Quick actions ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.q-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  font-size: .72rem; font-weight: 700; line-height: 1.2;
  padding: 14px 4px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--spring), box-shadow .3s;
}
.q-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.q-ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 1.35rem; color: #fff; position: relative; }
.q-ic::after { content: ""; position: absolute; inset: 4px 6px -6px; border-radius: inherit; background: inherit; filter: blur(10px); opacity: .55; z-index: -1; }
.q-item { position: relative; isolation: isolate; }
.g1 { background: linear-gradient(135deg, #6366f1, #a855f7); }
.g2 { background: linear-gradient(135deg, #22d3ee, #3b82f6); }
.g3 { background: linear-gradient(135deg, #34d399, #10b981); }
.g4 { background: linear-gradient(135deg, #fb7185, #f97316); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card-title { font-size: 1.02rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: var(--brand-text); font-size: 1rem; }

/* slots card */
.slots-card { margin: 0; }
.slots-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.slots-day { font-family: var(--font-d); font-weight: 700; font-size: 1.05rem; }
.round-link { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font-size: 1.1rem; transition: transform .3s var(--spring); }
.round-link:hover { transform: rotate(45deg); }
.chip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot-chip { padding: 10px 6px; border-radius: 13px; font-weight: 700; font-size: .8rem; background: var(--surface-2); border: 1.5px solid var(--line); transition: all .2s var(--ease); }
.slot-chip:hover { border-color: var(--indigo); color: var(--brand-text); background: var(--grad-soft); transform: translateY(-2px); }

/* next appointment */
.next-appt {
  margin-top: 16px; display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: var(--r); position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.next-appt::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--grad); }
.na-date { flex: none; width: 58px; height: 62px; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; text-align: center; line-height: 1.05; box-shadow: var(--shadow-lg); }
.na-date b { font-family: var(--font-d); font-size: 1.45rem; display: block; }
.na-date small { font-size: .62rem; text-transform: uppercase; font-weight: 800; letter-spacing: .06em; }
.na-info { flex: 1; min-width: 0; }
.na-info b { display: block; font-family: var(--font-d); }
.na-info small { color: var(--muted); font-size: .78rem; }
.countdown { display: inline-block; font-size: .66rem; font-weight: 800; color: var(--ok); background: rgba(18,184,134,.12); padding: 2px 8px; border-radius: 99px; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 4px; }
.stat { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: var(--shadow-sm); }
.stat-ic { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; }
.c1 { background: #eef0ff; color: #5b5bf7; } .c2 { background: #fff6e0; color: #e8a400; }
.c3 { background: #ffe8ec; color: #ff5d73; } .c4 { background: #e0fbff; color: #0ea5c6; }
[data-theme="dark"] .stat-ic { background: rgba(255,255,255,.06); }
.stat b { display: block; font-family: var(--font-d); font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.stat small { color: var(--muted); font-size: .7rem; font-weight: 600; }

/* ---------- Section heads ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 30px 0 14px; gap: 10px; }
.sec-head h3 { font-size: 1.25rem; font-weight: 700; }
.sec-head > a { color: var(--brand-text); font-size: .8rem; font-weight: 700; display: flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 99px; background: var(--grad-soft); white-space: nowrap; }
.rating-pill { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: .85rem; padding: 6px 12px; border-radius: 99px; background: #fff6e0; color: #b7791f; }
.rating-pill i { color: #f59f00; }
[data-theme="dark"] .rating-pill { background: rgba(245,159,0,.15); color: #fcd34d; }

/* ---------- Horizontal scroll ---------- */
.hscroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px; padding: 4px 18px 18px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }

.svc-card {
  width: 178px; position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 4px;
  transition: transform .35s var(--spring), box-shadow .35s;
}
.svc-card::before { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: var(--tint); opacity: .5; top: -50px; right: -50px; z-index: -1; transition: transform .5s var(--ease); }
.svc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.svc-card:hover::before { transform: scale(1.6); }
.svc-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 8px; flex: none; }
[data-theme="dark"] .svc-ic { filter: saturate(1.2) brightness(.95); }
.svc-card b { font-family: var(--font-d); font-size: .95rem; line-height: 1.2; font-weight: 600; }
.svc-card small { color: var(--muted); font-size: .72rem; }
.svc-card .price { font-family: var(--font-d); font-weight: 700; font-size: 1.05rem; margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.svc-card .price i { width: 32px; height: 32px; border-radius: 11px; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: 1rem; transition: transform .3s var(--spring); }
.svc-card:hover .price i { transform: rotate(45deg); background: var(--indigo); color: #fff; }

/* ---------- Why ---------- */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.why-item { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 3px; }
.why-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 1.15rem; margin-bottom: 8px; box-shadow: var(--shadow-lg); }
.why-item b { font-family: var(--font-d); font-size: .95rem; font-weight: 600; }
.why-item small { color: var(--muted); font-size: .74rem; line-height: 1.4; }

/* ---------- Testimonials ---------- */
.t-card { width: 290px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-sm); position: relative; }
.t-card::after { content: "\ec51"; font-family: remixicon; position: absolute; right: 16px; bottom: 6px; font-size: 3.4rem; color: var(--line); line-height: 1; }
.t-stars { color: #f59f00; font-size: .85rem; letter-spacing: 2px; margin-bottom: 8px; }
.t-card p { font-size: .86rem; color: var(--text); opacity: .85; margin-bottom: 14px; position: relative; z-index: 1; }
.t-head { display: flex; align-items: center; gap: 10px; }
.t-av { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .85rem; }
.t-head b { display: block; font-size: .86rem; }
.t-head small { color: var(--muted); font-size: .72rem; display: flex; align-items: center; gap: 4px; }
.t-head small i { color: var(--ok); }

/* ---------- Clinic ---------- */
.clinic { padding: 0; overflow: hidden; }
.map { height: 180px; background: var(--surface-2); }
.map iframe { width: 100%; height: 100%; border: 0; }
[data-theme="dark"] .map iframe { filter: invert(.9) hue-rotate(180deg) saturate(.7) brightness(.9); }
.clinic-body { padding: 18px; }
.clinic-body h4 { font-size: 1.05rem; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.clinic-body h4 i { color: var(--brand-text); }
.clinic-body > p { font-size: .82rem; margin: 6px 0 14px; display: flex; gap: 6px; }
.clinic-body > p i { color: var(--accent); }
.hours { display: grid; gap: 2px; margin-bottom: 16px; font-size: .8rem; }
.hours div { display: flex; justify-content: space-between; padding: 7px 12px; border-radius: 10px; }
.hours div.today { background: var(--grad-soft); font-weight: 700; color: var(--brand-text); }
.hours .closed { color: var(--accent); font-weight: 600; }

/* CTA band */
.cta-band {
  margin: 26px 0 10px; padding: 22px; border-radius: var(--r-xl); color: #fff;
  background: var(--grad); background-size: 200% 200%; animation: gradShift 8s ease infinite;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-band::before { content: "\ee0f"; font-family: remixicon; position: absolute; right: -10px; top: -30px; font-size: 9rem; opacity: .1; }
.cta-band h3 { font-size: 1.25rem; }
.cta-band p { opacity: .85; font-size: .85rem; }
.foot { text-align: center; padding: 24px 0 6px; font-size: .8rem; }
.foot a { text-decoration: underline; }

/* ---------- Segmented control ---------- */
.seg {
  position: relative; display: flex; padding: 5px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.seg button { position: relative; z-index: 1; flex: 1; padding: 10px 8px; border-radius: 13px; font-weight: 700; font-size: .82rem; color: var(--muted); white-space: nowrap; transition: color .3s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.active { color: #fff; }
.seg-ind { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 13px; background: var(--grad); box-shadow: 0 8px 18px -8px var(--indigo); transition: transform .45s var(--spring), width .45s var(--spring); }
.seg.small button { padding: 9px 8px; font-size: .8rem; }

/* ---------- Services page ---------- */
.page-intro { margin: 4px 0 18px; }
.page-intro h2 { font-size: 1.6rem; font-weight: 800; line-height: 1.15; margin: 4px 0 6px; }
.page-intro h2 .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.page-intro p { font-size: .88rem; }
.service-list { display: grid; gap: 12px; margin-bottom: 14px; }
.svc-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px;
  box-shadow: var(--shadow-sm); animation: screenIn .5s var(--ease) both; transition: transform .3s var(--spring), box-shadow .3s;
}
.svc-row:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.svc-row .svc-ic { margin: 0; }
.svc-body { flex: 1; min-width: 0; }
.svc-row b { display: block; font-family: var(--font-d); font-size: 1rem; font-weight: 600; }
.svc-row p { font-size: .76rem; color: var(--muted); margin: 2px 0 8px; }
.svc-meta { display: flex; gap: 6px; font-size: .7rem; font-weight: 700; color: var(--muted); flex-wrap: wrap; }
.svc-meta span { padding: 3px 8px; border-radius: 99px; background: var(--surface-2); display: inline-flex; align-items: center; gap: 3px; }
.svc-meta .fee { background: var(--grad-soft); color: var(--brand-text); }
.svc-row .btn { flex: none; }
.info-card { display: flex; gap: 12px; align-items: flex-start; font-size: .82rem; color: var(--muted); background: var(--grad-soft); }
.info-card b { color: var(--text); }
.info-card i { font-size: 1.4rem; color: var(--brand-text); }

/* ---------- Booking ---------- */
.stepper { list-style: none; display: flex; justify-content: space-between; position: relative; margin: 6px 4px 22px; }
.stepper::before { content: ""; position: absolute; left: 18px; right: 18px; top: 17px; height: 3px; background: var(--line); border-radius: 3px; }
.stepper::after { content: ""; position: absolute; left: 18px; top: 17px; height: 3px; border-radius: 3px; background: var(--grad); width: calc((100% - 36px) * var(--p, 0)); transition: width .5s var(--ease); }
.stepper li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stepper span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--surface); border: 2px solid var(--line); color: var(--muted); transition: all .35s var(--spring); }
.stepper small { font-size: .68rem; font-weight: 700; color: var(--muted); }
.stepper li.on span { border-color: transparent; background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); transform: scale(1.1); }
.stepper li.on small { color: var(--brand-text); }
.stepper li.done span { border-color: transparent; background: var(--ok); color: #fff; font-size: 0; }
.stepper li.done span::after { content: "\eb7b"; font-family: remixicon; font-size: 1rem; }
.step { display: none; }
.step.active { display: block; animation: stepIn .45s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.step.back-anim.active { animation-name: stepBack; }
@keyframes stepBack { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.step-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.step-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.step-title-row .step-title { margin: 0; }
.strip-nav { display: flex; gap: 6px; }

.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.mode-toggle button {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left;
  padding: 16px; border-radius: 20px; background: var(--surface);
  border: 2px solid var(--line); transition: all .3s var(--ease);
}
.mt-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 1.3rem; transition: all .3s; }
.mode-toggle b { display: block; font-size: .92rem; font-family: var(--font-d); font-weight: 600; }
.mode-toggle small { color: var(--muted); font-size: .72rem; }
.mt-check { position: absolute; top: 12px; right: 12px; font-size: 1.3rem; color: var(--indigo); opacity: 0; transform: scale(.4); transition: all .35s var(--spring); }
.mode-toggle button.active { border-color: var(--indigo); background: var(--grad-soft); box-shadow: 0 12px 24px -16px var(--indigo); }
.mode-toggle button.active .mt-ic { background: var(--grad); color: #fff; }
.mode-toggle button.active .mt-check { opacity: 1; transform: none; }

.pick-list { display: grid; gap: 10px; }
.pick {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 12px 14px; border-radius: 18px; background: var(--surface);
  border: 2px solid var(--line); transition: all .25s var(--ease);
}
.pick:hover { border-color: color-mix(in srgb, var(--indigo) 40%, var(--line)); }
.pick .svc-ic { margin: 0; width: 42px; height: 42px; font-size: 1.15rem; }
.pk-body { flex: 1; min-width: 0; }
.pick b { display: block; font-size: .9rem; font-weight: 700; }
.pick small { color: var(--muted); font-size: .72rem; }
.pk-fee { font-family: var(--font-d); font-weight: 700; color: var(--text); }
.radio-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; transition: all .25s var(--spring); }
.pick.selected { border-color: var(--indigo); background: var(--grad-soft); }
.pick.selected .radio-dot { border-color: var(--indigo); background: var(--indigo); box-shadow: inset 0 0 0 4px var(--surface); transform: scale(1.1); }
.pick.disabled { opacity: .4; pointer-events: none; }

.date-strip { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px 20px; padding: 10px 18px 12px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-behavior: smooth; }
.date-strip::-webkit-scrollbar { display: none; }
.date-pill {
  flex: none; width: 64px; padding: 12px 0 10px; border-radius: 20px; text-align: center;
  background: var(--surface); border: 1.5px solid var(--line); scroll-snap-align: start;
  transition: all .3s var(--spring);
}
.date-pill:hover { transform: translateY(-3px); }
.date-pill small { display: block; font-size: .66rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.date-pill b { display: block; font-family: var(--font-d); font-size: 1.4rem; font-weight: 700; line-height: 1.3; }
.date-pill .avail { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin: 2px auto 0; }
.date-pill.few .avail { background: var(--warn); }
.date-pill.off { opacity: .35; pointer-events: none; background: var(--surface-2); }
.date-pill.off .avail { background: var(--accent); }
.date-pill.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.date-pill.active small { color: rgba(255,255,255,.85); }
.date-pill.active .avail { background: #fff; }

.slot-group { display: grid; gap: 20px; }
.slot-group h4 { font-family: "Plus Jakarta Sans", sans-serif; letter-spacing: 0; font-size: .85rem; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.slot-group h4 .gi { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 1rem; }
.slot-group h4 .cnt { margin-left: auto; color: var(--muted); font-weight: 600; font-size: .72rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot {
  padding: 12px 0; border-radius: 14px; font-weight: 700; font-size: .82rem; text-align: center;
  background: var(--surface); border: 1.5px solid var(--line); transition: all .25s var(--spring);
}
.slot:hover:not(:disabled) { border-color: var(--indigo); color: var(--brand-text); transform: translateY(-2px); }
.slot:disabled { background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 6px, transparent 6px, transparent 12px); color: var(--muted); opacity: .55; cursor: not-allowed; text-decoration: line-through; }
.slot.selected { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-lg); transform: scale(1.06); }
.skeleton { height: 44px; border-radius: 14px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-slots { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty-slots i { font-size: 2.6rem; display: block; margin-bottom: 6px; color: var(--brand-text); }
.legend { display: flex; gap: 14px; justify-content: center; margin-top: 20px; font-size: .7rem; color: var(--muted); font-weight: 600; }
.legend span { display: flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg.free { border: 1.5px solid var(--line); background: var(--surface); }
.lg.taken { background: var(--line); }
.lg.sel { background: var(--grad); }

/* ---------- Form fields ---------- */
.field { position: relative; margin-bottom: 12px; }
.field > i { position: absolute; left: 16px; top: 18px; color: var(--muted); font-size: 1.1rem; pointer-events: none; transition: color .2s; z-index: 1; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  padding: 25px 16px 9px 46px; border-radius: 16px;
  border: 1.5px solid var(--line); background: var(--surface); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s; appearance: none; -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 92px; }
.field label { position: absolute; left: 47px; top: 17px; color: var(--muted); font-size: .9rem; pointer-events: none; transition: all .2s var(--ease); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 5px rgba(91,91,247,.12); }
.field:focus-within > i { color: var(--brand-text); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select:focus + label, .field select.has-value + label { top: 7px; font-size: .68rem; font-weight: 700; color: var(--brand-text); }
.field.select::after { content: "\ea4e"; font-family: remixicon; position: absolute; right: 14px; top: 17px; color: var(--muted); pointer-events: none; }
.field.invalid input, .field.invalid select { border-color: var(--accent); background: rgba(255,93,115,.04); }
.field.invalid > i, .field.invalid label { color: var(--accent) !important; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-label { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 6px 0 10px; }

.symptoms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.symptoms button { padding: 8px 13px; border-radius: 99px; font-size: .76rem; font-weight: 600; background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); transition: all .25s var(--spring); }
.symptoms button.on { border-color: var(--indigo); color: #fff; background: var(--grad); transform: scale(1.04); }
.symptoms button.on::before { content: "\eb7b  "; font-family: remixicon; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; cursor: pointer; }
.switch-row b { display: block; font-size: .88rem; }
.switch-row small { color: var(--muted); font-size: .74rem; }
.switch-row input { display: none; }
.switch { width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .3s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .35s var(--spring); }
.switch-row input:checked + .switch { background: var(--grad); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }

.check { display: flex; align-items: center; gap: 10px; font-size: .84rem; font-weight: 500; margin: 14px 0; cursor: pointer; }
.check input { display: none; }
.check span { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; transition: all .2s; }
.check input:checked + span { background: var(--grad); border-color: transparent; }
.check input:checked + span::after { content: "\eb7b"; font-family: remixicon; color: #fff; font-size: .9rem; }
.check a { color: var(--brand-text); font-weight: 700; }

.pay { padding: 14px; }
.pay .mini-label { margin: 2px 4px 10px; }
.pay-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 2px solid var(--line); margin-bottom: 8px; cursor: pointer; transition: all .25s; }
.pay-opt:last-child { margin-bottom: 0; }
.pay-opt input { display: none; }
.po-ic { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--grad-soft); color: var(--brand-text); font-size: 1.2rem; }
.pay-opt > span:nth-of-type(2) { flex: 1; }
.pay-opt b { display: block; font-size: .88rem; }
.pay-opt small { color: var(--muted); font-size: .74rem; }
.po-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; transition: all .25s var(--spring); }
.pay-opt:has(input:checked) { border-color: var(--indigo); background: var(--grad-soft); }
.pay-opt:has(input:checked) .po-dot { border-color: var(--indigo); background: var(--indigo); box-shadow: inset 0 0 0 4px var(--surface); }

/* summary ticket */
.summary { position: relative; margin-bottom: 14px; filter: drop-shadow(0 14px 24px rgba(17,24,74,.12)); }
.sum-head { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); color: #fff; padding: 18px; display: flex; gap: 14px; align-items: center; border-radius: var(--r) var(--r) 0 0; }
.sum-head img { width: 56px; height: 56px; border-radius: 18px; background: rgba(255,255,255,.15); }
.sum-head b { display: block; font-family: var(--font-d); font-size: 1.05rem; }
.sum-head small { opacity: .75; font-size: .76rem; }
.sum-tear { height: 22px; background: radial-gradient(circle at 0 50%, transparent 11px, var(--surface) 12px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 11px, var(--surface) 12px) right / 51% 100% no-repeat; position: relative; }
.sum-tear::after { content: ""; position: absolute; left: 20px; right: 20px; top: 50%; border-top: 2px dashed var(--line); }
.sum-rows { background: var(--surface); padding: 2px 18px 14px; border-radius: 0 0 var(--r) var(--r); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: .85rem; border-bottom: 1px solid var(--line); }
.sum-row:last-child { border: 0; }
.sum-row span { color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.sum-row b { text-align: right; }
.sum-row.total { margin-top: 4px; padding-top: 14px; }
.sum-row.total b { font-family: var(--font-d); font-size: 1.35rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.book-bar {
  position: fixed; left: 12px; right: 12px; z-index: 30;
  bottom: calc(var(--nav-h) + 22px + var(--safe-b));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-radius: 22px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow);
}
.book-bar-info { min-width: 0; }
.book-bar-info small { display: block; color: var(--muted); font-size: .7rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-bar-info b { font-family: var(--font-d); font-size: 1.2rem; font-weight: 700; }
.book-bar .btn { min-width: 150px; }
#screen-book { padding-bottom: calc(var(--nav-h) + 130px + var(--safe-b)); }

/* ---------- Appointments ---------- */
.appt-list { display: grid; gap: 14px; }
.appt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; animation: screenIn .5s var(--ease) both; }
.appt-top { display: flex; gap: 12px; padding: 16px 16px 12px; align-items: center; }
.appt-top .svc-ic { margin: 0; }
.a-body { flex: 1; min-width: 0; }
.appt-top b { display: block; font-family: var(--font-d); font-size: 1rem; font-weight: 600; }
.appt-top small { color: var(--muted); font-size: .75rem; }
.appt-id { font-size: .66rem; color: var(--muted); font-weight: 700; letter-spacing: .06em; }
.status { font-size: .64rem; font-weight: 800; padding: 5px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .05em; align-self: flex-start; }
.status.confirmed { background: rgba(18,184,134,.12); color: #0c9a6f; }
.status.cancelled { background: rgba(255,93,115,.12); color: #e5384f; }
.status.completed { background: rgba(91,91,247,.12); color: #5b5bf7; }
.status.no-show { background: rgba(245,159,0,.14); color: #c77c00; }
.appt-when { display: flex; gap: 8px; margin: 0 16px; padding: 12px; border-radius: 14px; background: var(--surface-2); font-size: .78rem; font-weight: 600; flex-wrap: wrap; }
.appt-when span { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 100px; }
.appt-when i { color: var(--brand-text); }
.appt-actions { display: flex; gap: 8px; padding: 12px 16px 16px; }
.appt-actions .btn { flex: 1; padding: 10px; font-size: .8rem; }
.appt-actions .btn.icon-only { flex: none; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.em-ic { width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 40px; background: var(--grad-soft); display: grid; place-items: center; font-size: 3.2rem; color: var(--brand-text); position: relative; animation: floaty 4s ease-in-out infinite; }
.em-ic::after { content: ""; position: absolute; inset: -10px; border-radius: 48px; border: 2px dashed var(--line); animation: spin 20s linear infinite; }
.empty b { display: block; color: var(--text); font-family: var(--font-d); font-size: 1.15rem; margin-bottom: 4px; }
.empty .btn { margin-top: 18px; }

/* ---------- Profile ---------- */
.profile-cover { height: 180px; position: relative; overflow: hidden; isolation: isolate; background: var(--navy); border-radius: 0 0 36px 36px; }
.profile-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 18px 18px; }
.topbar.on-cover { color: #fff; position: relative; }
.topbar.on-cover::before { display: none; }
.profile { margin-top: -78px; position: relative; }
.profile-head { text-align: center; margin-bottom: 16px; }
.avatar-xl { width: 136px; height: 136px; margin: 0 auto 12px; border-radius: 42px; padding: 4px; background: conic-gradient(from 180deg, #5b5bf7, #22d3ee, #f472b6, #5b5bf7); box-shadow: var(--shadow-lg); position: relative; }
.avatar-xl img { width: 100%; height: 100%; border-radius: 38px; object-fit: cover; background: linear-gradient(160deg, #e0e7ff, #cffafe); border: 4px solid var(--surface); }
.avatar-xl .online { position: absolute; right: 2px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; background: #22c55e; border: 4px solid var(--surface); }
.profile-head h2 { font-size: 1.6rem; font-weight: 800; }
.profile-head p { font-size: .8rem; }
.tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 12px 0 8px; }
.langs i { color: var(--brand-text); }
.profile-cta { max-width: 420px; margin: 16px auto 0; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 4px; margin-bottom: 14px; text-align: center; }
.mini-stats div + div { border-left: 1px solid var(--line); }
.mini-stats b { display: block; font-family: var(--font-d); font-size: 1.2rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mini-stats small { color: var(--muted); font-size: .7rem; font-weight: 600; }
.about-text { font-size: .88rem; color: var(--muted); line-height: 1.65; }
.about-text .more { display: none; }
.about-text.open .more { display: inline; }
.timeline { list-style: none; position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--indigo), var(--cyan)); border-radius: 2px; }
.timeline li { position: relative; padding-bottom: 16px; }
.timeline li:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -26px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 4px solid var(--indigo); }
.timeline em { font-style: normal; font-size: .66rem; font-weight: 800; color: var(--brand-text); background: var(--grad-soft); padding: 2px 8px; border-radius: 99px; }
.timeline b { display: block; font-size: .9rem; margin-top: 4px; }
.timeline small { color: var(--muted); font-size: .76rem; }
.awards { display: grid; gap: 10px; }
.award { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface-2); }
.award i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #fde68a, #f59e0b); color: #fff; font-size: 1.25rem; flex: none; box-shadow: 0 8px 16px -8px #f59e0b; }
.award b { display: block; font-size: .86rem; }
.award small { color: var(--muted); font-size: .74rem; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-cloud span { padding: 7px 13px; border-radius: 99px; font-size: .77rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); transition: all .2s; }
.chip-cloud span:hover { background: var(--grad-soft); color: var(--brand-text); border-color: transparent; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border: 0; }
.faq-q { width: 100%; text-align: left; padding: 14px 0; font-weight: 700; font-size: .87rem; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.faq-q i { width: 28px; height: 28px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-text); transition: transform .35s var(--spring), background .3s; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); font-size: .84rem; color: var(--muted); }
.faq-a p { padding-bottom: 14px; }
.faq-item.open .faq-q i { transform: rotate(45deg); background: var(--grad); color: #fff; }
.socials { display: flex; justify-content: center; gap: 12px; margin: 20px 0; }
.socials a { width: 50px; height: 50px; border-radius: 17px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: grid; place-items: center; font-size: 1.3rem; color: var(--brand-text); transition: all .3s var(--spring); }
.socials a:hover { transform: translateY(-4px); background: var(--grad); color: #fff; }
.install { display: flex; align-items: center; gap: 12px; }
.install div { flex: 1; }
.install b { display: block; }
.install small { color: var(--muted); font-size: .76rem; }

/* ---------- Floating pill nav (mobile) ---------- */
.nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 40;
  height: var(--nav-h); padding: 0 8px;
  display: flex; align-items: center; justify-content: space-around;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  box-shadow: 0 18px 40px -16px rgba(17,24,74,.35);
  border-radius: 26px;
}
.brand, .nav-foot, .nav-label { display: none; }
.nav-glow { position: absolute; top: 9px; left: 0; width: 52px; height: 36px; border-radius: 14px; background: var(--grad-soft); transition: transform .5s var(--spring), opacity .3s; pointer-events: none; }
.nav-item {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: .64rem; font-weight: 700; color: var(--muted); width: 60px; padding: 8px 0 4px;
  transition: color .25s;
}
.nav-item i { font-size: 1.35rem; line-height: 1; height: 26px; display: grid; place-items: center; }
.nav-item i:nth-child(2) { display: none; }
.nav-item.active { color: var(--brand-text); }
.nav-item.active i:first-child { display: none; }
.nav-item.active i:nth-child(2) { display: grid; animation: pop .45s var(--spring); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.nav-book { margin-top: -38px; }
.nav-book .fab {
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 1.8rem;
  box-shadow: var(--shadow-lg); border: 4px solid var(--bg);
  transition: transform .35s var(--spring), border-radius .35s;
}
.nav-book .fab i { height: auto; font-size: 1.8rem; transition: transform .35s var(--spring); }
.nav-book:hover .fab, .nav-book.active .fab { border-radius: 50%; }
.nav-book.active .fab i { transform: rotate(135deg); }
.nav-book.active .fab i { display: grid !important; }
.nav-book:active .fab { transform: scale(.88); }
.badge { position: absolute; top: 2px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .62rem; font-style: normal; display: grid; place-items: center; border: 2px solid var(--surface); }

/* ---------- Sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(7,11,29,.55); backdrop-filter: blur(4px); z-index: 80; opacity: 0; visibility: hidden; transition: all .35s; }
.sheet-backdrop.show { opacity: 1; visibility: visible; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--surface); border-radius: 32px 32px 0 0;
  max-height: 90vh; overflow-y: auto;
  padding: 10px 20px calc(24px + var(--safe-b));
  transform: translateY(105%); transition: transform .5s var(--ease);
  max-width: 560px; margin: 0 auto;
}
.sheet.show { transform: none; }
.sheet-handle { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 18px; }
.sheet h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.sheet p { color: var(--muted); font-size: .88rem; }
.sheet .btn-row { margin-top: 18px; }
.sheet-ic { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; font-size: 1.7rem; margin-bottom: 14px; background: var(--grad-soft); color: var(--brand-text); }
.sheet-ic.danger { background: rgba(255,93,115,.12); color: var(--accent); }

.success { text-align: center; padding: 4px 0 0; }
.success-ic { width: 92px; height: 92px; margin: 0 auto 16px; border-radius: 50%; background: linear-gradient(135deg, #34d399, #0ea5a4); display: grid; place-items: center; color: #fff; font-size: 3rem; box-shadow: 0 20px 40px -15px #10b981; animation: popIn .7s var(--spring); position: relative; }
.success-ic::before, .success-ic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #34d399; animation: wave 1.8s ease-out infinite; }
.success-ic::after { animation-delay: .6s; }
@keyframes wave { to { transform: scale(1.7); opacity: 0; } }
@keyframes popIn { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1); } }
.ticket { margin: 18px 0 4px; border-radius: 22px; border: 1.5px solid var(--line); text-align: left; background: var(--surface-2); display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 14px 16px; align-items: center; }
.ticket .sum-row { padding: 6px 0; font-size: .8rem; border-color: var(--line); }
.ticket-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; letter-spacing: .08em; color: var(--brand-text); }
.qr { width: 92px; height: 92px; padding: 6px; background: #fff; border-radius: 14px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: 100%; display: block; }

.notif { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border: 0; }
.notif i { width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--grad-soft); color: var(--brand-text); font-size: 1.15rem; }
.notif b { display: block; font-size: .86rem; }
.notif small { color: var(--muted); font-size: .76rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); z-index: 200;
  transform: translate(-50%, -160%); transition: transform .5s var(--spring);
  background: var(--navy); color: #fff; padding: 12px 18px 12px 14px; border-radius: 18px;
  font-weight: 600; font-size: .85rem; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.45); max-width: calc(100% - 28px);
}
[data-theme="dark"] .toast { background: #eef1fb; color: var(--navy); }
.toast.show { transform: translate(-50%, 0); }
.toast i { font-size: 1.3rem; color: #34d399; }
.toast.err i { color: #fb7185; }

/* ---------- Confetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.confetti i { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(108vh) rotate(760deg); opacity: .7; } }
.shake { animation: shake .45s; }
@keyframes shake { 20%,60% { transform: translateX(-7px); } 40%,80% { transform: translateX(7px); } }
.ri-spin { display: inline-block; animation: spin 1s linear infinite; }

/* =========================================================
   Tablet+
   ========================================================= */
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .why { grid-template-columns: repeat(4, 1fr); }
  .service-list, .appt-list { grid-template-columns: 1fr 1fr; }
  .hero-info h2 { font-size: 2.6rem; }
  .chip-row { grid-template-columns: repeat(6, 1fr); }
}

/* =========================================================
   Desktop: sidebar layout
   ========================================================= */
@media (min-width: 1024px) {
  :root { --side: 280px; }
  .nav {
    top: 14px; bottom: 14px; left: 14px; right: auto; width: calc(var(--side) - 28px); height: auto;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px;
    padding: 24px 16px; border-radius: 28px;
  }
  .nav-glow { display: none; }
  .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 0 6px; }
  .brand-logo { width: 46px; height: 46px; border-radius: 15px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 1.4rem; box-shadow: var(--shadow-lg); }
  .brand b { display: block; font-family: var(--font-d); font-size: 1rem; }
  .brand small { color: var(--muted); font-size: .74rem; }
  .nav-label { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 14px; margin-bottom: 6px; }
  .nav-item { flex-direction: row; width: auto; gap: 14px; padding: 12px 14px; border-radius: 14px; font-size: .9rem; }
  .nav-item i { height: auto; }
  .nav-item:hover { background: var(--surface-2); color: var(--text); }
  .nav-item.active { background: var(--grad-soft); }
  .nav-item.active::before { content: ""; position: absolute; left: -16px; top: 50%; width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--grad); transform: translateY(-50%); }
  .nav-book { order: 10; margin: 14px 0 0; background: var(--grad); color: #fff !important; justify-content: center; box-shadow: var(--shadow-lg); padding: 13px; }
  .nav-book:hover { background: var(--grad); filter: brightness(1.08); color: #fff; }
  .nav-book .fab { width: auto; height: auto; background: none; border: 0; box-shadow: none; }
  .nav-book .fab i { font-size: 1.3rem; }
  .nav-book.active::before { display: none; }
  .badge { position: static; margin-left: auto; border: 0; }
  .nav-foot { display: grid; gap: 10px; margin-top: auto; order: 11; }
  .side-promo { position: relative; overflow: hidden; padding: 18px; border-radius: 20px; background: var(--navy); color: #fff; display: grid; gap: 4px; }
  .side-promo::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0, rgba(91,91,247,.8), transparent 60%), radial-gradient(circle at 0 100%, rgba(34,211,238,.5), transparent 60%); }
  .side-promo > * { position: relative; }
  .side-promo > i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.15); font-size: 1.2rem; margin-bottom: 6px; }
  .side-promo small { opacity: .75; font-size: .74rem; margin-bottom: 8px; }
  .side-cta { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255,93,115,.08); border: 1px solid rgba(255,93,115,.18); }
  .side-cta i { font-size: 1.3rem; color: var(--accent); }
  .side-cta small { display: block; font-size: .66rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  .side-cta b { font-size: .84rem; }

  .screens { margin-left: var(--side); }
  .screen, #screen-book { padding-bottom: 60px; }
  .pad { padding: 0 32px; }
  .topbar { padding-left: 32px; padding-right: 32px; }
  .back { visibility: hidden; }
  #bookBack { visibility: visible; }
  .top-title { font-size: 1.7rem; }
  .top-title.sm { font-size: 1.4rem; text-align: left; }

  .home-grid { grid-template-columns: 1.65fr 1fr; align-items: stretch; }
  .home-side { grid-template-rows: auto 1fr; }
  .quick { grid-template-columns: 1fr 1fr; }
  .q-item { flex-direction: row; text-align: left; padding: 14px; gap: 12px; font-size: .82rem; }
  .q-item br { display: none; }
  .chip-row { grid-template-columns: repeat(3, 1fr); }
  .hero-card { padding: 36px; min-height: 360px; }
  .hero-info h2 { font-size: 3.2rem; }
  .hero-photo { max-width: 330px; justify-self: end; margin: -20px -36px -36px 0; }
  .hscroll { margin: 0; padding: 4px 0 18px; }
  .svc-card { width: 210px; }
  .clinic { display: grid; grid-template-columns: 1.3fr 1fr; }
  .map { height: 100%; min-height: 300px; }
  .cta-band { padding: 30px 36px; }

  .book-pad { max-width: 780px; }
  .book-bar { position: sticky; left: auto; right: auto; bottom: 20px; margin-top: 26px; }
  .profile-cover { height: 220px; margin: 14px 32px 0; border-radius: 36px; }
  .profile { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; max-width: 1040px; }
  .profile-head, .mini-stats, .socials, .install { grid-column: 1 / -1; }
  .sheet { bottom: auto; top: 50%; left: 50%; right: auto; width: 520px; border-radius: 30px; transform: translate(-50%, -44%) scale(.96); opacity: 0; visibility: hidden; transition: all .4s var(--ease); padding-top: 26px; }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; visibility: visible; }
  .sheet-handle { display: none; }
}

@media (max-width: 380px) {
  .hero-card { grid-template-columns: 1fr .75fr; padding: 18px; }
  .hero-info h2 { font-size: 1.6rem; }
  .q-ic { width: 42px; height: 42px; }
  .nav-item { width: 54px; }
  .btn { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Mobile hero refinement ---------- */
@media (max-width: 639px) {
  .hero-card { display: block; min-height: 290px; padding: 22px 20px; }
  .hero-info { max-width: 64%; }
  .hero-info h2 { font-size: 2.05rem; }
  .hero-meta { flex-direction: column; gap: 2px; }
  .status-line { font-size: .7rem; }
  .hero-cta { flex-wrap: nowrap; }
  .hero-cta .btn { padding: 11px 14px; font-size: .82rem; }
  .hero-photo { position: absolute; right: -14px; bottom: 0; width: 50%; margin: 0; }
  .fc1 { top: 4%; left: -6px; }
  .fc2 { display: none; }
  .stat { padding: 12px; gap: 10px; }
  .stat small { font-size: .66rem; }
}
