/* ==========================================================================
   Destiny Dental Clinic (Krishna Dental Care) — Design System
   Built from the Dental Immediate Template token spec.
   ========================================================================== */

:root {
  /* Color Palette */
  --porcelain:       #F8F4EC;
  --porcelain-dim:   #F1ECE1;
  --ink:              #211D18;
  --ink-soft:         #5C554C;

  --steel:            #1C2A27;
  --steel-2:          #25352F;

  --teal:             #2F6E63;
  --teal-deep:        #1E4A42;
  --teal-mist:        #E9F1EE;

  --petal:            #D9767F;
  --petal-deep:       #B85560;

  --line:             rgba(33,29,24,0.13);
  --line-light:       rgba(248,244,236,0.18);

  /* Glassmorphism */
  --glass-bg-dark:    rgba(20, 28, 26, 0.65);
  --glass-bg-light:   rgba(248, 244, 236, 0.18);
  --glass-bg-cream:   rgba(248, 244, 236, 0.88);
  --glass-border:     rgba(248, 244, 236, 0.20);
  --glass-border-ink: rgba(33, 29, 24, 0.12);
  --glass-highlight:  rgba(248, 244, 236, 0.35);
  --glass-blur:       18px;
  --glass-blur-sm:    10px;

  /* Typography */
  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  'IBM Plex Mono', monospace;

  /* Radii & Motion */
  --radius-pill: 999px;
  --radius-lg:   28px;
  --radius-md:   18px;
  --radius-sm:   12px;
  --ease:        cubic-bezier(.22,.61,.36,1);

  /* Elevation */
  --shadow-sm: 0 2px 10px rgba(28, 42, 39, 0.08);
  --shadow-md: 0 12px 32px rgba(28, 42, 39, 0.14);
  --shadow-lg: 0 24px 60px rgba(20, 28, 26, 0.28);

  /* Layout */
  --container: 1180px;
  --header-h: 82px;
  --z-bg: -1;
  --z-base: 1;
  --z-nav: 60;
  --z-overlay: 80;
  --z-drawer: 90;
  --z-toast: 100;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--porcelain);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0 0 .4em; letter-spacing: .2px; }
p { margin: 0 0 1em; color: var(--ink-soft); }

:focus-visible {
  outline: 2.5px solid var(--petal);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--petal); display: inline-block; }
.section { padding: 96px 0; position: relative; }
.section-tight { padding: 64px 0; }
@media (max-width: 780px) { .section { padding: 64px 0; } .section-tight { padding: 44px 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--radius-pill); border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; letter-spacing: .01em; transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: var(--porcelain); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-deep); box-shadow: var(--shadow-md); }
.btn-petal { background: var(--petal); color: #fff; box-shadow: var(--shadow-sm); }
.btn-petal:hover { background: var(--petal-deep); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--glass-bg-light); color: var(--porcelain); border-color: var(--glass-border); backdrop-filter: blur(var(--glass-blur-sm)); -webkit-backdrop-filter: blur(var(--glass-blur-sm)); }
.btn-ghost:hover { background: rgba(248,244,236,0.28); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- Fixed Canvas Background Layer ---------- */
.bg-canvas-container {
  position: fixed; inset: 0; z-index: var(--z-bg); pointer-events: none; overflow: hidden; background: var(--steel);
}
.scrub-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,28,26,.55) 0%, rgba(20,28,26,.30) 30%, rgba(20,28,26,.42) 70%, rgba(20,28,26,.68) 100%);
}

/* ---------- Universal Glass Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-nav); height: var(--header-h);
  display: flex; align-items: center;
  background: var(--glass-bg-dark); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--line-light);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--porcelain); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%; background: var(--teal-mist); color: var(--teal-deep);
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 19px; letter-spacing: .2px; }
.brand-text span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(248,244,236,.65); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: rgba(248,244,236,.82); font-size: 14.5px; font-weight: 600; padding: 10px 14px; border-radius: var(--radius-pill);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--glass-bg-light); color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-phone { display: flex; align-items: center; gap: 8px; color: var(--porcelain); font-family: var(--mono); font-size: 13px; }
.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--glass-border);
  background: var(--glass-bg-light); color: var(--porcelain); align-items: center; justify-content: center; flex: none;
}
.nav-toggle svg { width: 20px; height: 20px; }

.mobile-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay); background: var(--glass-bg-dark);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.mobile-overlay.is-open { opacity: 1; pointer-events: auto; }
.mobile-overlay a { color: var(--porcelain); font-family: var(--serif); font-size: 30px; padding: 12px 20px; }
.mobile-overlay .btn { margin-top: 18px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-phone { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 420px) {
  .brand-text strong { font-size: 15.5px; white-space: nowrap; }
  .brand-text span { display: none; }
  .brand-mark { width: 34px; height: 34px; font-size: 17px; }
}

/* ---------- Glass Surfaces ---------- */
.glass-dark {
  background: var(--glass-bg-dark); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg); color: var(--porcelain);
}
.glass-cream {
  background: var(--glass-bg-cream); border: 1px solid var(--glass-border-ink);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}

/* ---------- Hero (index.html) ---------- */
.hero-wrap { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 64px; }
.hero-top { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 40px; }
.hero-kicker { color: var(--teal-mist); font-family: var(--mono); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.hero-kicker::before { content: ''; width: 26px; height: 1px; background: var(--petal); }
.hero-title { color: var(--porcelain); font-size: clamp(40px, 6.4vw, 84px); line-height: 1.02; max-width: 15ch; margin-bottom: 22px; }
.hero-title em { font-style: italic; color: var(--teal-mist); }
.hero-sub { color: rgba(248,244,236,.82); font-size: 17.5px; max-width: 46ch; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }

.beat-track { position: relative; }
.beat { display: none; }
.beat.is-active { display: block; }
.beat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.beat-card { padding: 22px 22px 20px; }
.beat-card .beat-num { font-family: var(--mono); font-size: 11px; color: var(--teal-mist); letter-spacing: .1em; margin-bottom: 10px; display: block; }
.beat-card h3 { font-size: 21px; color: var(--porcelain); margin-bottom: 6px; }
.beat-card p { color: rgba(248,244,236,.72); font-size: 14px; margin: 0; }
.scroll-cue { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; color: rgba(248,244,236,.55); font-family: var(--mono); font-size: 11px; letter-spacing: .18em; display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) { .beat-grid { grid-template-columns: 1fr; } .scroll-cue { display: none; } }

/* Entry grid under hero on index */
.entry-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.entry-card { padding: 26px 22px; color: var(--porcelain); transition: transform .3s var(--ease), background .3s var(--ease); }
.entry-card:hover { transform: translateY(-4px); background: rgba(20,28,26,.78); }
.entry-card .icon { width: 46px; height: 46px; border-radius: 14px; background: var(--teal-mist); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.entry-card h3 { font-size: 19px; margin-bottom: 6px; }
.entry-card p { font-size: 13.5px; color: rgba(248,244,236,.7); margin: 0; }
@media (max-width: 980px) { .entry-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .entry-grid { grid-template-columns: 1fr; } }

/* Page hero (non-index pages) */
.page-hero { padding: 150px 0 80px; }
.page-hero h1 { color: var(--porcelain); font-size: clamp(34px, 5vw, 58px); max-width: 20ch; }
.page-hero p.lead { color: rgba(248,244,236,.8); max-width: 52ch; font-size: 17px; }
.page-hero .eyebrow { color: var(--teal-mist); }
.page-hero .eyebrow::before { background: var(--petal); }

/* Section headers on cream */
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); }
.section-head p { font-size: 16px; }

/* ---------- Care Catalogue ---------- */
.catalogue-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.catalogue-card { padding: 30px 26px; display: flex; flex-direction: column; gap: 14px; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.catalogue-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.catalogue-card .icon { width: 50px; height: 50px; border-radius: 14px; background: var(--teal-mist); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; }
.catalogue-card h3 { font-size: 22px; }
.catalogue-card p { font-size: 14.5px; margin-bottom: 4px; }
.catalogue-card .tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.catalogue-card .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; padding: 5px 10px; border-radius: var(--radius-pill); background: var(--teal-mist); color: var(--teal-deep); }
.catalogue-card .card-link { margin-top: auto; font-weight: 700; color: var(--teal); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
@media (max-width: 980px) { .catalogue-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .catalogue-grid { grid-template-columns: 1fr; } }

/* Care deep page */
.care-detail-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 40px; align-items: start; }
.care-detail-grid .glass-cream { padding: 34px; }
.care-list { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 24px; }
.care-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-size: 15px; }
.care-list .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--teal-mist); color: var(--teal-deep); flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; margin-top: 1px; }
.care-side-card { padding: 26px; margin-bottom: 18px; }
.care-side-card h4 { font-size: 16px; margin-bottom: 10px; }
.care-side-card .stat { font-family: var(--serif); font-size: 34px; color: var(--teal-deep); }
.care-side-card .stat-label { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
@media (max-width: 900px) { .care-detail-grid { grid-template-columns: 1fr; } }

/* ---------- Quiz ---------- */
.quiz-shell { padding: 40px; }
.quiz-progress { display: flex; gap: 6px; margin-bottom: 28px; }
.quiz-progress span { height: 4px; flex: 1; border-radius: 2px; background: var(--line); overflow: hidden; }
.quiz-progress span i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .3s var(--ease); }
.quiz-progress span.done i { width: 100%; }
.quiz-question { display: none; }
.quiz-question.is-active { display: block; animation: fadeUp .4s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.quiz-question h3 { font-size: 24px; margin-bottom: 22px; }
.quiz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quiz-option {
  text-align: left; padding: 18px 20px; border-radius: var(--radius-md); border: 1.5px solid var(--line);
  background: #fff; font-weight: 600; font-size: 15px; color: var(--ink); transition: all .2s var(--ease);
}
.quiz-option:hover { border-color: var(--teal); }
.quiz-option.selected { border-color: var(--teal); background: var(--teal-mist); color: var(--teal-deep); }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; }
#quizResult { display: none; text-align: center; padding: 10px; }
#quizResult.is-active { display: block; animation: fadeUp .4s var(--ease); }
#quizResult .result-badge { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--teal-mist); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; }
#quizResult h3 { font-size: 26px; }
#quizResult p.result-desc { max-width: 46ch; margin: 0 auto 22px; }
@media (max-width: 640px) { .quiz-grid { grid-template-columns: 1fr; } .quiz-shell { padding: 26px; } }

/* ---------- Before / After Slider ---------- */
.ba-slider { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); user-select: none; }
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-slider .ba-after { clip-path: inset(0 0 0 50%); }
.ba-slider .ba-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: var(--porcelain); transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(0,0,0,.15); pointer-events: none; }
.ba-slider .ba-handle {
  position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; border-radius: 50%;
  background: var(--porcelain); transform: translate(-50%,-50%); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); pointer-events: none; color: var(--teal-deep);
}
.ba-slider input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba-label { position: absolute; top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(20,28,26,.55); color: var(--porcelain); backdrop-filter: blur(6px); }
.ba-label.before { left: 16px; }
.ba-label.after { right: 16px; }
.ba-case-picker { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.ba-case-picker button { font-family: var(--mono); font-size: 12px; padding: 9px 16px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: #fff; }
.ba-case-picker button.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- Visit page ---------- */
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; }
.visit-info { padding: 36px; display: flex; flex-direction: column; gap: 22px; }
.visit-row { display: flex; gap: 16px; align-items: flex-start; }
.visit-row .icon { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-mist); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; flex: none; }
.visit-row h4 { font-size: 15px; margin-bottom: 4px; font-family: var(--sans); font-weight: 700; }
.visit-row p { font-size: 14.5px; margin: 0; }
.hours-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.hours-table td { padding: 7px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.hours-table td:last-child { text-align: right; font-family: var(--mono); color: var(--ink-soft); }
.hours-table tr.today td { color: var(--teal-deep); font-weight: 700; }
.visit-map { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); position: relative; min-height: 320px; border: 1px solid var(--line); }
.visit-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }
.pulse-ring { position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--petal); transform: translate(-50%,-50%); pointer-events: none; box-shadow: 0 0 0 0 rgba(217,118,127,.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217,118,127,.55); } 70% { box-shadow: 0 0 0 22px rgba(217,118,127,0); } 100% { box-shadow: 0 0 0 0 rgba(217,118,127,0); } }
@media (max-width: 900px) { .visit-grid { grid-template-columns: 1fr; } }

/* ---------- Booking form ---------- */
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.form-panel { padding: 36px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  transition: border-color .2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-hint { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.wa-preview { padding: 22px; margin-top: 4px; }
.wa-preview h4 { font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--teal-deep); margin-bottom: 12px; }
.wa-bubble { background: #DCF3E4; border-radius: 14px 14px 14px 3px; padding: 14px 16px; font-size: 14px; color: #1a3a2c; white-space: pre-line; }
@media (max-width: 900px) { .book-grid { grid-template-columns: 1fr; } .field-row { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-search { position: relative; max-width: 480px; margin: 0 auto 42px; }
.faq-search input { width: 100%; padding: 15px 20px 15px 46px; border-radius: var(--radius-pill); border: 1.5px solid var(--line); background: #fff; font-size: 15px; }
.faq-search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-soft); }
.accordion { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 auto; }
.accordion-item { border-radius: var(--radius-md); overflow: hidden; }
.accordion-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px; text-align: left; background: transparent; border: 0; font-weight: 700; font-size: 15.5px; color: var(--ink);
}
.accordion-trigger .plus { width: 26px; height: 26px; border-radius: 50%; background: var(--teal-mist); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; flex: none; transition: transform .3s var(--ease); font-size: 15px; }
.accordion-item.is-open .accordion-trigger .plus { transform: rotate(45deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.accordion-panel p { padding: 0 24px 22px; font-size: 14.5px; }
.accordion-item.hidden-by-search { display: none; }
.faq-empty { display: none; text-align: center; color: var(--ink-soft); padding: 30px; }
.faq-empty.is-active { display: block; }

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 30px; color: var(--porcelain); position: relative; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line-light); }
.footer-col h5 { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: rgba(248,244,236,.6); margin-bottom: 16px; }
.footer-col p, .footer-col a { color: rgba(248,244,236,.82); font-size: 14.5px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a:hover { color: var(--teal-mist); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: rgba(248,244,236,.55); }
@media (max-width: 780px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: var(--z-nav); width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg);
  transition: transform .25s var(--ease);
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 28px; height: 28px; }

/* ==========================================================================
   ADMIN DASHBOARD
   ========================================================================== */
.admin-body { background: var(--porcelain); }
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 250px; flex: none; position: sticky; top: 0; height: 100vh; padding: 26px 18px;
  background: var(--glass-bg-dark); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-right: 1px solid var(--line-light); color: var(--porcelain); display: flex; flex-direction: column; z-index: var(--z-nav);
}
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 26px; border-bottom: 1px solid var(--line-light); margin-bottom: 18px; }
.admin-brand .brand-mark { width: 38px; height: 38px; font-size: 18px; }
.admin-brand strong { font-family: var(--serif); font-size: 17px; display: block; }
.admin-brand span { font-family: var(--mono); font-size: 10px; color: rgba(248,244,236,.6); text-transform: uppercase; letter-spacing: .08em; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); color: rgba(248,244,236,.75); font-size: 14px; font-weight: 600; transition: background .2s var(--ease), color .2s var(--ease); }
.admin-nav a svg { width: 18px; height: 18px; flex: none; }
.admin-nav a:hover { background: var(--glass-bg-light); color: #fff; }
.admin-nav a[aria-current="page"] { background: var(--teal); color: #fff; }
.admin-sidebar-foot { border-top: 1px solid var(--line-light); padding-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.admin-sidebar-foot a { font-size: 13px; color: rgba(248,244,236,.65); padding: 10px 14px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 10px; }
.admin-sidebar-foot a:hover { color: #fff; background: var(--glass-bg-light); }

.admin-main { flex: 1; min-width: 0; padding: 30px 34px 70px; position: relative; }
.admin-topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-topbar h1 { font-size: 30px; color: var(--ink); }
.admin-topbar p { margin: 0; font-size: 14px; }
.admin-mobile-toggle { display: none; }

.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.admin-card { padding: 22px; }
.admin-card .label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.admin-card .value { font-family: var(--serif); font-size: 38px; color: var(--teal-deep); line-height: 1; }
.admin-card .delta { font-size: 12.5px; color: var(--teal); margin-top: 8px; display: block; }
.admin-card .delta.warn { color: var(--petal-deep); }
@media (max-width: 1100px) { .admin-cards { grid-template-columns: 1fr 1fr; } }

.admin-panel {
  padding: 26px; margin-bottom: 24px;
  background: var(--glass-bg-cream); border: 1px solid var(--glass-border-ink);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.admin-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-panel-head h2 { font-size: 20px; }
.admin-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.admin-toolbar input[type="search"], .admin-toolbar select {
  padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; font-size: 14px;
}
.admin-toolbar input[type="search"] { min-width: 220px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.admin-table th { text-align: left; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); padding: 10px 14px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tbody tr { transition: background .2s var(--ease); cursor: default; }
.admin-table tbody tr.is-clickable { cursor: pointer; }
.admin-table tbody tr.is-clickable:hover { background: var(--teal-mist); }
.admin-table .cell-name { font-weight: 700; }
.admin-table .cell-sub { font-size: 12.5px; color: var(--ink-soft); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700; font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-requested { background: #FFF1D6; color: #9A6B00; }
.pill-confirmed { background: var(--teal-mist); color: var(--teal-deep); }
.pill-completed { background: #E4EFE9; color: #2F6E63; }
.pill-cancelled { background: #FBE4E4; color: #B23A3A; }
.pill-pending   { background: #FFF1D6; color: #9A6B00; }
.pill-paid      { background: var(--teal-mist); color: var(--teal-deep); }
.pill-overdue   { background: #FBE4E4; color: #B23A3A; }
.pill-new       { background: #E9F1FF; color: #2955A3; }
.pill-active    { background: var(--teal-mist); color: var(--teal-deep); }

.row-actions { display: flex; gap: 8px; }
.icon-btn { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.icon-btn:hover { border-color: var(--teal); color: var(--teal); }
.icon-btn svg { width: 15px; height: 15px; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-soft); }
.empty-state svg { width: 40px; height: 40px; color: var(--line); margin-bottom: 14px; }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(20,28,26,.45); z-index: var(--z-overlay); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.drawer-scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 420px; max-width: 92vw; background: var(--porcelain);
  box-shadow: var(--shadow-lg); z-index: var(--z-drawer); transform: translateX(100%); transition: transform .35s var(--ease);
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 21px; margin-bottom: 4px; }
.drawer-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.drawer-body { padding: 22px 26px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 18px 26px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.drawer-field { margin-bottom: 16px; }
.drawer-field label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; font-family: var(--mono); }
.drawer-field div.readonly { font-size: 15px; padding: 4px 0; }
.status-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.status-btn { padding: 9px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 700; }
.status-btn.is-active { border-color: var(--teal); background: var(--teal); color: #fff; }

/* Patient detail */
.patient-detail-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 22px; align-items: start; }
.patient-id-card { padding: 26px; text-align: center; }
.avatar-ring { width: 84px; height: 84px; border-radius: 50%; background: var(--teal-mist); color: var(--teal-deep); font-family: var(--serif); font-size: 30px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.patient-id-card h3 { font-size: 20px; margin-bottom: 2px; }
.patient-id-card .sub { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.id-stat-row { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.notes-box { padding: 14px 16px; background: var(--teal-mist); border-radius: var(--radius-sm); font-size: 13.5px; color: var(--teal-deep); margin-top: 14px; text-align: left; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 16px; padding-bottom: 22px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: 9px; top: 22px; bottom: 0; width: 1.5px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--teal-mist); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; flex: none; font-size: 10px; z-index: 1; }
.timeline-body h4 { font-size: 14.5px; margin-bottom: 3px; }
.timeline-body .meta { font-size: 12px; color: var(--ink-soft); font-family: var(--mono); }
@media (max-width: 980px) { .patient-detail-grid { grid-template-columns: 1fr; } }

/* Treatment plan progress */
.progress-track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress-track i { display: block; height: 100%; background: var(--teal); }
.plan-stage-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.plan-stage { font-size: 11px; font-family: var(--mono); padding: 4px 9px; border-radius: var(--radius-pill); background: var(--line); color: var(--ink-soft); }
.plan-stage.done { background: var(--teal-mist); color: var(--teal-deep); }
.plan-stage.current { background: var(--petal); color: #fff; }

/* Messages / lead pipeline */
.msg-list { display: flex; flex-direction: column; gap: 2px; }
.msg-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 14px; border-radius: var(--radius-sm); transition: background .2s var(--ease); }
.msg-row:hover { background: var(--teal-mist); }
.msg-row .avatar-ring { width: 42px; height: 42px; font-size: 15px; margin: 0; flex: none; }
.msg-row .msg-main { flex: 1; min-width: 0; }
.msg-row .msg-top { display: flex; justify-content: space-between; gap: 10px; }
.msg-row h4 { font-size: 14.5px; margin: 0; }
.msg-row time { font-size: 11.5px; font-family: var(--mono); color: var(--ink-soft); flex: none; }
.msg-row p { font-size: 13.5px; margin: 4px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-row.is-unread h4::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--petal); display: inline-block; margin-left: 8px; }

/* Content manager */
.content-form textarea { min-height: 90px; resize: vertical; }
.banner-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.banner-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.banner-item p { margin: 0; font-size: 14px; color: var(--ink); }
.switch { position: relative; width: 40px; height: 22px; border-radius: 11px; background: var(--line); flex: none; border: 0; }
.switch::before { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: var(--shadow-sm); }
.switch.is-on { background: var(--teal); }
.switch.is-on::before { transform: translateX(18px); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--steel); color: var(--porcelain); padding: 13px 22px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: var(--z-toast); opacity: 0; pointer-events: none; transition: all .3s var(--ease); display: flex; align-items: center; gap: 10px; }
.toast.is-active { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

@media (max-width: 980px) {
  .admin-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .3s var(--ease); width: 260px; }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-mobile-toggle { display: flex; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; align-items: center; justify-content: center; flex: none; }
  .admin-main { padding: 22px 18px 60px; }
  .admin-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .admin-cards { grid-template-columns: 1fr; } }
