/* ============================================================
   MEDFREE — Design system v2
   Primary: #406769 / Background: #F5F3EE / Surface: #FFFFFF
   Font: Inter
   ============================================================ */

:root {
  --brand:       #406769;
  --brand-dark:  #2F4D4F;
  --brand-light: #7F9C9D;
  --brand-pale:  #E7EFEE;
  --brand-glow:  rgba(64,103,105,.14);

  --bg:          #F5F3EE;
  --surface:     #FFFFFF;
  --surface-soft:#E7EFEE;

  --text:        #263536;
  --text-sec:    #667577;
  --text-faint:  #94A8A9;

  --border:      #D8E0DE;
  --border-soft: #EAF0EE;

  --success:     #5F8A72;
  --success-pale:#E4F0E9;
  --warning:     #C49A5A;
  --warning-pale:#F6EDD9;
  --danger:      #C86F6B;
  --danger-pale: #F8E8E7;

  /* Legacy aliases for backward compat */
  --oat:         #F5F3EE;
  --paper:       #FFFFFF;
  --char:        #263536;
  --muted:       #667577;
  --faint:       #94A8A9;
  --line:        #D8E0DE;
  --line-soft:   #EAF0EE;
  --clay:        #C49A5A;
  --clay-pale:   #F6EDD9;
  --amber:       #C49A5A;
  --amber-pale:  #F6EDD9;
  --sky:         #406769;
  --sky-pale:    #E7EFEE;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11","ss01";
}
h1,h2,h3,h4,h5 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; color: var(--text); }
h1 { font-weight: 800; letter-spacing: -0.04em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
textarea { resize: vertical; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; }
::selection { background: var(--brand-pale); }

/* ── Layout ─────────────────────────────────────────────────── */
.container    { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.container-sm { max-width: 760px;  margin: 0 auto; padding: 0 24px; }
.grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3  { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4  { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.stack   { display: flex; flex-direction: column; gap: 12px; }
.row     { display: flex; align-items: center; gap: 12px; }
.row-sb  { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ml-auto { margin-left: auto; }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }  .mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; } .mb-8 { margin-bottom: 2rem; }

/* ── App shell ──────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px; flex-shrink: 0;
  background: var(--text);
  display: flex; flex-direction: column;
  padding: 22px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo {
  font-size: 20px; font-weight: 800; letter-spacing: -0.05em;
  color: #fff; padding: 0 10px 22px; display: block;
}
.sidebar-logo span { color: var(--brand-light); }

.sidebar-group {
  font-size: 10px; letter-spacing: 1.8px; font-weight: 700;
  color: #4A6263; padding: 14px 12px 5px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; color: #9BB4B5; font-weight: 500;
  cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; text-decoration: none;
  transition: background .16s, color .16s;
  margin-bottom: 2px;
}
.nav-item:hover  { background: #2F4D4F; color: #fff; }
.nav-item.active { background: var(--brand); color: #fff; font-weight: 600; }
.nav-item svg    {
  width: 17px; height: 17px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.nav-badge {
  margin-left: auto; background: var(--warning); color: #fff;
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 100px;
}
.sidebar-footer {
  margin-top: auto; padding: 14px 12px 0; border-top: 1px solid #2F4D4F;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user .nm { color: #fff; font-weight: 600; font-size: 13px; }
.sidebar-user .sb { color: #4A6263; font-size: 11.5px; }

.page-content { flex: 1; min-width: 0; padding: 30px 36px 56px; }
.page-header  {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px; margin-bottom: 26px; flex-wrap: wrap;
}
.page-header h1 { font-size: 27px; margin-bottom: 3px; }
.page-header p  { color: var(--text-sec); margin: 0; font-size: 14.5px; }

/* ── Top nav ────────────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 80;
  background: rgba(245,243,238,.95);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s;
}
.topnav.scrolled { box-shadow: 0 2px 20px rgba(38,53,54,.07); }
.topnav-inner {
  display: flex; align-items: center; gap: 28px;
  max-width: 1160px; margin: 0 auto; padding: 14px 32px;
}
.topnav-logo { font-size: 20px; font-weight: 800; letter-spacing: -0.05em; color: var(--text); }
.topnav-logo span { color: var(--brand); }
.topnav-links { display: flex; gap: 24px; font-size: 14.5px; color: var(--text-sec); font-weight: 500; }
.topnav-links a { transition: color .18s; }
.topnav-links a:hover, .topnav-links a.active { color: var(--text); }
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mood-chip {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 100px; padding: 5px 14px 5px 9px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: border-color .18s;
}
.mood-chip:hover { border-color: var(--brand-light); }
.mood-chip .mood-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  background: var(--brand); color: #fff; border: 1.5px solid var(--brand);
  padding: 11px 22px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; transition: background .18s, transform .12s, box-shadow .18s;
  white-space: nowrap;
}
.btn:hover  { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 4px 18px var(--brand-glow); }
.btn:active { transform: translateY(0); }
.btn:disabled { background: var(--brand-light); border-color: var(--brand-light); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm   { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg   { padding: 14px 30px; font-size: 15.5px; border-radius: 12px; }
.btn-pill { border-radius: 100px; }
.btn-quiet {
  background: var(--surface); color: var(--text);
  border-color: var(--border); box-shadow: none;
}
.btn-quiet:hover { background: var(--surface-soft); border-color: var(--brand-light); color: var(--brand-dark); box-shadow: none; transform: translateY(-1px); }
.btn-ghost { background: none; border-color: transparent; color: var(--text-sec); }
.btn-ghost:hover { color: var(--text); background: none; box-shadow: none; transform: none; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #b55e5b; border-color: #b55e5b; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px;
}
.card-paper  { background: var(--surface); border-color: var(--border-soft); }
.card-dark   { background: var(--text); color: #E4ECEC; border-color: var(--text); }
.card-brand  { background: var(--surface-soft); border-color: var(--brand-light); }
.card-head   { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.card-head h3 { font-size: 16.5px; }
.card-link   { font-size: 13px; color: var(--brand); font-weight: 600; text-decoration: none; }
.card-link:hover { color: var(--brand-dark); }
.card-hover  { transition: transform .22s, box-shadow .22s; cursor: pointer; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(38,53,54,.08); }

/* ── Stat tiles ─────────────────────────────────────────────── */
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 18px; }
.stat-tile .sl { font-size: 12.5px; color: var(--text-sec); margin-bottom: 6px; }
.stat-tile .sv { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: var(--text); }
.stat-tile .sd { font-size: 12.5px; color: var(--brand); font-weight: 600; margin-top: 5px; }

/* ── Progress bars ──────────────────────────────────────────── */
.progress-bar  { height: 8px; background: var(--surface-soft); border-radius: 100px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 100px; transition: width .8s cubic-bezier(.4,0,.2,1); }
.progress-fill.mid { background: var(--brand-light); }
.progress-row  { margin-bottom: 16px; }
.progress-row:last-child { margin-bottom: 0; }
.progress-head { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; gap: 10px; }
.progress-head .val { color: var(--text-sec); font-size: 12.5px; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-field .hint { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; font-family: inherit; font-size: 15px; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
  transition: border-color .18s, box-shadow .18s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow);
}
.form-field textarea { min-height: 90px; line-height: 1.55; }
.form-field .err-msg { font-size: 12.5px; color: var(--danger); margin-top: 4px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14.5px; }
.form-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.alert-error   { background: var(--danger-pale);  color: #7A3328; border: 1px solid #E8B8B6; }
.alert-success { background: var(--success-pale); color: #1A4D30; border: 1px solid #B0D4BC; }
.alert-info    { background: var(--surface-soft); color: #2C5253; border: 1px solid var(--border); }
.alert-warn    { background: var(--warning-pale); color: #6A4E1A; border: 1px solid #E0CCA0; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 100px; }
.badge-brand   { background: var(--surface-soft); color: var(--brand-dark); }
.badge-clay    { background: var(--warning-pale); color: #7A5420; }
.badge-amber   { background: var(--warning-pale); color: #7A5420; }
.badge-sky     { background: var(--surface-soft); color: var(--brand); }
.badge-char    { background: var(--text); color: #fff; }
.badge-danger  { background: var(--danger-pale);  color: #8A2E2B; }
.badge-success { background: var(--success-pale); color: #2A5E3A; }

/* ── Avatar ─────────────────────────────────────────────────── */
.av {
  border-radius: 50%; background: var(--surface-soft); color: var(--brand-dark);
  display: grid; place-items: center; font-weight: 700; flex-shrink: 0; font-size: 14px;
}
.av-sm { width: 32px; height: 32px; font-size: 12px; }
.av-md { width: 40px; height: 40px; font-size: 14px; }
.av-lg { width: 52px; height: 52px; font-size: 18px; }
.av-xl { width: 72px; height: 72px; font-size: 24px; }

/* ── Tables ─────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; font-size: 11.5px; letter-spacing: .6px; color: var(--text-sec);
  font-weight: 700; padding: 0 13px 11px; border-bottom: 1.5px solid var(--border);
  text-transform: uppercase;
}
.data-table td { padding: 12px 13px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-soft); }
.tname { font-weight: 600; display: flex; align-items: center; gap: 10px; }

/* ── Chips ──────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text);
  padding: 8px 15px; border-radius: 100px; font-size: 14px;
  cursor: pointer; transition: border-color .15s, background .15s; font-family: inherit;
}
.chip:hover { border-color: var(--brand-light); background: var(--surface-soft); }
.chip.selected, .chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Note box ───────────────────────────────────────────────── */
.note-box {
  background: var(--surface-soft); border-radius: 11px; padding: 14px 16px;
  font-size: 13.5px; color: #2F4D4F; line-height: 1.6; border: 1px solid var(--border);
}
.note-box b { color: var(--brand-dark); }

/* ── Divider ────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border-soft); margin: 16px 0; }

/* ── Message rows ───────────────────────────────────────────── */
.msg-row { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.msg-row:last-child { border-bottom: none; }
.msg-row .mn { font-size: 14px; font-weight: 600; color: var(--text); }
.msg-row .mt { font-size: 13px; color: var(--text-sec); line-height: 1.5; }
.msg-row .mw { font-size: 11.5px; color: var(--text-faint); margin-left: auto; flex-shrink: 0; }
.unread-dot::after {
  content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--warning); margin-left: 6px; vertical-align: middle;
}

/* ── Exercise rows ──────────────────────────────────────────── */
.ex-row {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: 11px; padding: 13px 15px;
}
.ex-row.done { opacity: .62; }
.ex-row.done .ex-title { text-decoration: line-through; }
.check-box {
  width: 22px; height: 22px; border-radius: 7px; border: 1.6px solid var(--border);
  flex-shrink: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); font-size: 13px; font-weight: 700;
  transition: background .15s, border-color .15s;
}
.check-box.checked { background: var(--brand); border-color: var(--brand); color: #fff; }
.ex-title { font-size: 14px; font-weight: 500; }
.ex-meta  { font-size: 12.5px; color: var(--text-faint); }
.ex-dur   { margin-left: auto; font-size: 12.5px; color: var(--text-faint); flex-shrink: 0; }

/* ── Slot rows ──────────────────────────────────────────────── */
.slot-row {
  display: flex; align-items: center; gap: 13px; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: 11px; padding: 13px 15px;
  margin-bottom: 9px; transition: border-color .18s;
}
.slot-row:last-child { margin-bottom: 0; }
.slot-row:hover { border-color: var(--brand-light); }
.slot-row.live  { border-color: var(--brand); background: var(--surface-soft); }
.slot-time  { font-size: 13.5px; font-weight: 700; width: 52px; flex-shrink: 0; color: var(--brand); }
.slot-who   { font-size: 14px; font-weight: 600; }
.slot-meta  { font-size: 12.5px; color: var(--text-sec); }
.slot-right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ── Bar chart ──────────────────────────────────────────────── */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 130px; }
.bar-col   { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar-fill  { width: 100%; border-radius: 6px 6px 3px 3px; min-height: 4px; background: var(--brand); }
.bar-fill.low { background: var(--surface-soft); }
.bar-label { font-size: 11px; color: var(--text-faint); }

/* ── Streak dots ─────────────────────────────────────────────── */
.streak-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.streak-dot {
  width: 34px; height: 34px; border-radius: 9px; background: var(--surface-soft);
  display: grid; place-items: center; font-size: 12px; color: var(--text-faint); font-weight: 500;
}
.streak-dot.hit { background: var(--brand); color: #fff; font-weight: 700; }

/* ── Milestones ──────────────────────────────────────────────── */
.milestone { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.milestone:last-child { border-bottom: none; }
.m-dot {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; background: var(--surface-soft);
  color: var(--text-faint); font-size: 12px; margin-top: 2px; font-weight: 700;
}
.m-dot.done { background: var(--brand); color: #fff; }
.m-dot.now  { background: var(--text); color: var(--brand-light); }
.milestone h4 { font-size: 14.5px; margin-bottom: 2px; font-weight: 600; }
.milestone p  { font-size: 13px; color: var(--text-sec); margin: 0; }
.milestone .m-when { margin-left: auto; font-size: 12.5px; color: var(--text-faint); flex-shrink: 0; }

/* ── Next session banner ─────────────────────────────────────── */
.next-banner {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  background: var(--text); color: #D4E0E0; border-radius: 15px;
  padding: 24px 26px; margin-bottom: 20px;
}
.nb-when  { font-size: 11.5px; font-weight: 700; color: var(--brand-light); letter-spacing: 1.3px; margin-bottom: 4px; }
.nb-title { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.nb-sub   { color: #7F9C9D; font-size: 13.5px; }
.nb-acts  { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.nb-cd    { background: #2F4D4F; border-radius: 8px; padding: 7px 13px; font-size: 12.5px; color: #9BB4B5; }
.nb-cd b  { color: var(--brand-light); }

/* ── Companion chat ──────────────────────────────────────────── */
.chat-box { height: 260px; overflow-y: auto; padding: 6px 0; display: flex; flex-direction: column; gap: 11px; }
.bubble { padding: 11px 15px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; max-width: 86%; }
.bubble-user { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; animation: bubble-in .28s ease; }
.bubble-comp { background: var(--surface); border: 1px solid var(--border); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; animation: bubble-in .28s ease; }
.chat-input-row { display: flex; gap: 8px; margin-top: 12px; }
.chat-input-row input {
  flex: 1; font-family: inherit; font-size: 14.5px; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 10px; background: var(--bg);
}
.chat-input-row input:focus { outline: none; border-color: var(--brand); }

/* ── Mood grid ──────────────────────────────────────────────── */
.mood-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin: 14px 0; }
.mood-btn {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 12px 10px; font-size: 13.5px; font-weight: 500; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px; transition: all .18s;
}
.mood-btn:hover  { border-color: var(--brand-light); background: var(--surface-soft); }
.mood-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.mood-emoji { font-size: 22px; }

/* ── Breathing ──────────────────────────────────────────────── */
.breath-wrap { display: flex; flex-direction: column; align-items: center; padding: 22px 0; }
.breath-ring {
  width: 168px; height: 168px; border-radius: 50%; border: 3px solid var(--surface-soft);
  display: grid; place-items: center; position: relative; margin-bottom: 20px;
}
.breath-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
  animation: breathe 4s ease-in-out infinite;
}
.breath-timer { font-size: 40px; font-weight: 800; color: var(--text); letter-spacing: -0.05em; }
.breath-unit  { font-size: 13.5px; color: var(--text-sec); text-align: center; }
.breath-phase { font-size: 18px; font-weight: 600; color: var(--brand); }
.breath-sub   { font-size: 13.5px; color: var(--text-sec); margin-top: 3px; }

/* ── Resources ──────────────────────────────────────────────── */
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.res-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 11px;
  padding: 12px; display: flex; align-items: center; gap: 11px;
  cursor: pointer; transition: border-color .18s;
}
.res-card:hover { border-color: var(--brand-light); }
.res-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--surface-soft); display: grid; place-items: center; flex-shrink: 0; font-size: 16px; }
.res-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.res-dur   { font-size: 12px; color: var(--text-faint); }

/* ── Booking steps ──────────────────────────────────────────── */
.step-rail { display: flex; flex-direction: column; gap: 0; width: 190px; flex-shrink: 0; }
.step-item { display: flex; gap: 11px; padding-bottom: 20px; position: relative; }
.step-item::before {
  content: ''; position: absolute; left: 11px; top: 25px; bottom: -4px;
  width: 1px; background: var(--border);
}
.step-item:last-child::before { display: none; }
.step-num {
  width: 23px; height: 23px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text-faint);
  position: relative; z-index: 1; transition: all .22s;
}
.step-lbl { font-size: 13.5px; color: var(--text-faint); transition: color .18s; }
.step-item.active .step-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-item.active .step-lbl { color: var(--text); font-weight: 600; }
.step-item.done .step-num   { background: var(--surface-soft); border-color: var(--brand-light); color: var(--brand-dark); }
.step-item.done .step-lbl   { color: var(--text-sec); }

/* ── Specialist / plan cards ────────────────────────────────── */
.svc-card, .spec-card, .plan-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px;
  cursor: pointer; text-align: left; color: var(--text); width: 100%;
  transition: border-color .18s;
}
.svc-card  { padding: 20px; }
.spec-card { padding: 16px 18px; display: flex; gap: 15px; align-items: flex-start; }
.plan-card { padding: 16px 18px; display: flex; gap: 15px; align-items: center; position: relative; }
.svc-card:hover, .spec-card:hover, .plan-card:hover { border-color: var(--brand-light); }
.svc-card.selected, .spec-card.selected, .plan-card.selected {
  border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand);
}
.svc-card .svc-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.svc-card .svc-desc  { font-size: 13.5px; color: var(--text-sec); }
.svc-card .svc-tag   { font-size: 12.5px; color: var(--brand); font-weight: 600; margin-top: 8px; }
.spec-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.spec-vfy  { font-size: 11px; font-weight: 600; color: var(--brand-dark); background: var(--surface-soft); padding: 2px 8px; border-radius: 100px; }
.spec-meta { font-size: 13px; color: var(--text-sec); margin-top: 3px; }
.spec-lang { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.spec-lang span { font-size: 11.5px; background: var(--bg); border: 1px solid var(--border); color: var(--text-sec); padding: 2px 8px; border-radius: 5px; }
.spec-price { margin-left: auto; text-align: right; flex-shrink: 0; }
.spec-price .amt { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.spec-price .per { font-size: 12px; color: var(--text-faint); display: block; }
.plan-card .plan-title { font-size: 16px; font-weight: 700; }
.plan-card .plan-desc  { font-size: 13px; color: var(--text-sec); margin-top: 2px; }
.plan-price { margin-left: auto; text-align: right; flex-shrink: 0; }
.plan-price .amt  { font-size: 20px; font-weight: 800; }
.plan-price .save { font-size: 12px; color: var(--brand); font-weight: 600; display: block; }
.plan-price .unit { font-size: 11.5px; color: var(--text-faint); display: block; }
.plan-flag { position: absolute; top: -10px; left: 16px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 100px; }

/* Slot grid */
.slot-grid { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.slot-btn {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px;
  padding: 8px 14px; font-size: 13.5px; cursor: pointer; transition: all .15s; font-family: inherit;
}
.slot-btn:hover { border-color: var(--brand-light); }
.slot-btn.selected { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Booking summary */
.booking-summary { background: var(--surface); border: 1.5px solid var(--border); border-radius: 13px; overflow: hidden; }
.sum-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--border-soft); font-size: 14.5px; }
.sum-row .k { color: var(--text-sec); }
.sum-row .v { font-weight: 600; text-align: right; }
.sum-row.total { background: var(--surface-soft); border-bottom: none; }
.sum-row.total .k { font-weight: 700; color: var(--text); }
.sum-row.total .v { font-size: 21px; font-weight: 800; color: var(--brand-dark); }

/* ── Modal ──────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(38,53,54,.44);
  z-index: 200; display: none; place-items: center; padding: 20px;
}
.overlay.open { display: grid; }
.modal {
  background: var(--surface); border-radius: 20px; max-width: 500px; width: 100%;
  padding: 30px; max-height: 92vh; overflow-y: auto; animation: slide-up .28s ease;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.modal-head h3 { font-size: 21px; }
.close-btn {
  background: var(--surface-soft); border: none; width: 32px; height: 32px;
  border-radius: 50%; font-size: 17px; color: var(--text-sec);
  display: grid; place-items: center; cursor: pointer;
}
.close-btn:hover { background: var(--border); color: var(--text); }

/* ── Service image cards ─────────────────────────────────────── */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.svc-card-img {
  background: var(--surface); border: 1.5px solid var(--border-soft);
  border-radius: 20px; overflow: hidden; cursor: pointer;
  transition: transform .28s, box-shadow .28s; text-decoration: none; color: inherit;
}
.svc-card-img:hover { transform: translateY(-5px); box-shadow: 0 18px 48px rgba(38,53,54,.1); }
.svc-img-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.svc-img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform .6s ease; }
.svc-card-img:hover .svc-img-wrap img { transform: scale(1.04); }
.svc-img-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,20,18,.5) 0%, rgba(15,20,18,.04) 60%); }
.svc-img-badge { position: absolute; top: 14px; left: 14px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: 100px; }
.svc-img-body { padding: 24px; }
.svc-pills { display: flex; gap: 7px; margin-bottom: 12px; flex-wrap: wrap; }
.svc-pill { font-size: 12.5px; font-weight: 600; background: var(--surface-soft); color: var(--brand-dark); padding: 4px 11px; border-radius: 100px; }
.svc-img-title { font-size: 23px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 7px; }
.svc-img-sub   { font-size: 14.5px; color: var(--text-sec); margin: 0 0 13px; }
.svc-img-list  { margin: 0 0 15px; padding-left: 16px; color: var(--text-sec); font-size: 14px; }
.svc-img-list li { margin-bottom: 4px; }
.svc-tagline   { font-size: 13px; font-weight: 700; color: var(--brand-dark); margin-bottom: 14px; font-style: italic; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero-img { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg  { position: absolute; inset: 0; background-size: cover; background-position: center 30%; transform: scale(1.04); transition: transform 8s ease; }
.hero-img:hover .hero-bg { transform: scale(1); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(105deg,rgba(10,18,18,.78) 0%,rgba(10,18,18,.44) 55%,rgba(10,18,18,.18) 100%); }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 330px; gap: 48px; align-items: center; padding-top: 24px; padding-bottom: 40px; }
.hero-copy { color: #fff; }
.hero-eyebrow { font-size: 11.5px; letter-spacing: 2.8px; font-weight: 700; color: var(--brand-light); margin-bottom: 14px; animation: slide-up .6s ease both; }
.hero-h1 { font-size: 56px; line-height: 1.06; margin-bottom: 14px; animation: slide-up .7s .05s ease both; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.3); }
.hero-checks { display: flex; flex-direction: column; gap: 5px; margin-bottom: 18px; }
.hero-check { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: #D4E0E0; opacity: 0; transform: translateX(-12px); transition: opacity .4s ease, transform .4s ease; }
.hero-check.show { opacity: 1; transform: none; }
.hero-check .tick { color: var(--brand-light); font-weight: 700; }
.hero-sub { font-size: 16.5px; color: #A8BCBC; max-width: 46ch; margin: 0 0 24px; line-height: 1.6; animation: fade-in .8s .3s ease both; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; animation: slide-up .7s .2s ease both; }
.hero-note { font-size: 13px; color: rgba(255,255,255,.48); margin-top: 16px; animation: fade-in 1s .5s ease both; }
.hero-companion { background: rgba(255,255,255,.97); backdrop-filter: blur(16px); border-radius: 20px; padding: 22px; animation: float-in .9s .15s ease both; box-shadow: 0 20px 60px rgba(0,0,0,.28); }
.hc-head  { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.hc-av    { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.hc-name  { font-size: 14px; font-weight: 700; color: var(--text); }
.hc-sub   { font-size: 12px; color: var(--text-sec); }
.hc-msg   { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 13px; line-height: 1.4; }
.mood-quick { display: flex; gap: 7px; justify-content: space-around; margin-bottom: 13px; }
.mq-btn { background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px; font-size: 20px; width: 44px; height: 44px; cursor: pointer; transition: all .18s; display: grid; place-items: center; }
.mq-btn:hover, .mq-btn.active { border-color: var(--brand); transform: scale(1.1); }
.hc-foot  { font-size: 12px; font-weight: 600; color: var(--brand-dark); text-align: center; padding-top: 11px; border-top: 1px solid var(--border-soft); }

/* ── Quote banner ───────────────────────────────────────────── */
.quote-banner { background: var(--brand); padding: 46px 0; text-align: center; position: relative; overflow: hidden; }
.quote-banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.08) 0%, transparent 60%); }
.qb-mark   { font-size: 72px; line-height: .7; color: rgba(255,255,255,.22); font-family: Georgia,serif; margin-bottom: 6px; }
.qb-text   { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; color: #fff; margin-bottom: 16px; position: relative; }
.qb-checks { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.84); }

/* ── Stats strip ────────────────────────────────────────────── */
.strip { background: var(--text); padding: 24px 0; }
.strip-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.strip-stat .sv { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.04em; }
.strip-stat .sl { font-size: 13px; color: #7F9C9D; margin-top: 1px; }

/* ── Section ────────────────────────────────────────────────── */
.section { padding: 68px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 56ch; margin-bottom: 34px; }
.section-head h2 { font-size: 33px; margin-bottom: 9px; }
.section-head p  { color: var(--text-sec); font-size: 15.5px; margin: 0; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: 27px; transition: transform .22s, box-shadow .22s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(38,53,54,.07); }
.feature-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-soft); display: grid; place-items: center; margin-bottom: 16px; }
.feature-ico svg { width: 21px; height: 21px; stroke: var(--brand); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ── Articles ───────────────────────────────────────────────── */
.article-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 15px; padding: 26px 28px; cursor: pointer; transition: border-color .18s, transform .18s; }
.article-card:hover { border-color: var(--brand-light); transform: translateY(-2px); }
.article-meta { font-size: 12.5px; color: var(--text-faint); margin-bottom: 9px; }
.article-card h3 { font-size: 21px; margin-bottom: 9px; }
.article-card p  { color: var(--text-sec); font-size: 14.5px; line-height: 1.7; margin: 0; }
.read-more { margin-top: 13px; font-size: 14px; font-weight: 600; color: var(--brand); }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { background: var(--text); color: #7F9C9D; }
.site-footer a { color: #7F9C9D; display: block; margin-bottom: 6px; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: 13.5px; margin-bottom: 11px; font-weight: 600; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 44px 0; }
.footer-logo { font-size: 20px; font-weight: 800; letter-spacing: -0.05em; color: #fff; margin-bottom: 9px; }
.footer-logo span { color: var(--brand-light); }
.footer-copy  { line-height: 1.7; font-size: 13.5px; }
.footer-crisis { margin-top: 13px; font-size: 12.5px; color: #4A6263; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 5px; align-items: center; margin-top: 20px; }
.page-btn { padding: 7px 13px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 13.5px; background: var(--surface); color: var(--text); cursor: pointer; transition: all .15s; font-family: inherit; }
.page-btn:hover { border-color: var(--brand-light); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes slide-up  { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes float-in  { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pulse     { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes breathe   { 0%,100% { transform: scale(.85); opacity: .5; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes bubble-in { from { opacity: 0; transform: scale(.92) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin      { to { transform: rotate(360deg); } }
.spin { animation: spin .7s linear infinite; display: inline-block; }
.v-live { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-light); animation: pulse 2s infinite; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-companion { display: none; }
  .hero-h1 { font-size: 40px; }
  .svc-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .strip-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; flex-direction: row; overflow-x: auto; padding: 10px; position: static; }
  .sidebar-logo { padding: 0 12px 0 6px; font-size: 18px; flex-shrink: 0; }
  .sidebar-group, .sidebar-footer { display: none; }
  .nav-item { white-space: nowrap; width: auto; margin: 0; flex-shrink: 0; }
  .page-content { padding: 22px 18px 44px; }
}
@media (max-width: 600px) {
  .hero-h1 { font-size: 32px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .mood-grid { grid-template-columns: repeat(4,1fr); }
  .topnav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .res-grid { grid-template-columns: 1fr; }
  .qb-text { font-size: 22px; }
}

/* ============================================================
   BOTTOM TAB BAR — replaces hamburger on mobile
   ============================================================ */
@media (max-width: 768px) {
  .hamburger { display: none !important; }
  .drawer-backdrop { display: none !important; }
  .sidebar { display: none !important; }
  .mobile-topbar { display: flex !important; justify-content: space-between; padding: 11px 16px !important; }
  .page-content { padding-bottom: 80px !important; }
}

.tab-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--border);
  z-index: 150; box-shadow: 0 -4px 24px rgba(38,53,54,.08);
}
@media (max-width: 768px) { .tab-bar { display: flex; } }

.tab-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  padding: 6px 4px 4px; cursor: pointer; text-decoration: none;
  color: var(--text-faint); font-size: 10.5px; font-weight: 500;
  position: relative; transition: color .18s;
  border: none; background: none; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.tab-item svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none !important;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .18s, transform .18s;
  overflow: visible;
}
.tab-item svg * { fill: none !important; }
.tab-item svg path, .tab-item svg circle,
.tab-item svg rect, .tab-item svg polyline,
.tab-item svg line, .tab-item svg polygon {
  fill: none !important;
}
.tab-item.active { color: var(--brand); }
.tab-item.active svg { stroke: var(--brand); transform: translateY(-1px); }
.tab-item.active::after {
  content: ''; position: absolute; bottom: 5px;
  left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--brand);
}
.tab-item:hover { color: var(--brand-light); }

/* Primary center tab */
.tab-item.tab-primary { color: var(--text-faint); }
.tab-icon-wrap {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); display: grid; place-items: center;
  margin-bottom: 2px; box-shadow: 0 4px 16px var(--brand-glow);
  transition: transform .18s;
}
.tab-item.tab-primary svg { stroke: #fff; }
.tab-item.tab-primary:hover .tab-icon-wrap { transform: scale(1.08); }
.tab-item.tab-primary::after { display: none; }

/* Badge */
.tab-badge {
  position: absolute; top: 4px; right: calc(50% - 18px);
  background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 1.5px solid var(--surface);
}
