/* =====================================================================
   THE PERSONA MIND - design system (mobile first)
   ===================================================================== */
:root {
  --navy: #182848;
  --navy-2: #22386a;
  --primary: #3762ff;
  --primary-dark: #2448d8;
  --primary-soft: #eef3ff;
  --blue: #4b6cb7;
  --gold: #e0a526;
  --gold-soft: #fff6e0;
  --bg: #f5f8ff;
  --card: #ffffff;
  --text: #17233d;
  --muted: #5b6b85;
  --border: #dde5f2;
  --success: #15803d;
  --success-soft: #dcfce7;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(24, 40, 72, .08);
  --shadow-lg: 0 24px 60px rgba(24, 40, 72, .14);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-head: 'Poppins', var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(55, 98, 255, .45); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 12px;
  font: 600 .95rem/1.2 var(--font); border: 1.5px solid transparent; cursor: pointer; text-decoration: none !important; transition: background .15s, transform .05s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(55, 98, 255, .25); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #cf951b; }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-outline { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-white { background: #fff; color: var(--navy); }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: .875rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Header ---------- */
.announcement { background: var(--gold); color: var(--navy); text-align: center; font-weight: 600; font-size: .9rem; padding: 8px 16px; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-family: var(--font-head); font-size: 1.1rem; text-decoration: none !important; }
.brand strong { font-weight: 800; }
.brand-light { color: #fff; }
.brand img { border-radius: 10px; background: #fff; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1px solid var(--border); background: #fff; border-radius: 12px; font-size: 1.2rem; color: var(--navy); cursor: pointer; }
.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 8px 16px 18px; box-shadow: var(--shadow); flex-direction: column; }
.site-nav.open { display: flex; }
.site-nav > a { padding: 13px 4px; color: var(--text); font-weight: 500; border-bottom: 1px solid #f0f3f9; }
.site-nav > a.active { color: var(--primary); }
.nav-actions { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; position: static; flex-direction: row; align-items: center; gap: 4px; padding: 0; box-shadow: none; border: 0; background: none; }
  .site-nav > a { padding: 8px 12px; border: 0; border-radius: 10px; font-size: .95rem; }
  .site-nav > a:hover { background: var(--primary-soft); text-decoration: none; }
  .nav-actions { display: flex; margin: 0 0 0 10px; }
}

/* ---------- Alerts & badges ---------- */
.flash-wrap { padding-top: 16px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; margin-bottom: 14px; font-size: .95rem; border: 1px solid transparent; }
.alert i { margin-top: 3px; }
.alert-success { background: var(--success-soft); color: #14532d; border-color: #bbf7d0; }
.alert-error { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.alert-info { background: var(--primary-soft); color: #1e3a8a; border-color: #dbe4ff; }
.alert-warning { background: var(--warning-soft); color: #78350f; border-color: #fde68a; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: #eef1f6; color: var(--muted); }
.badge-gold { background: var(--gold-soft); color: #8a5a00; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, rgba(224, 165, 38, .22), transparent 60%), linear-gradient(140deg, #182848 0%, #22386a 55%, #2f4f9a 100%); color: #fff; padding: 56px 0 72px; }
.hero h1 { color: #fff; margin-bottom: 14px; }
.hero h1 span { color: var(--gold); }
.hero p.lead { font-size: 1.1rem; color: #d7e0f5; max-width: 620px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero-art { display: none; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.2fr .8fr; } .hero-art { display: block; } .hero { padding: 80px 0 96px; } }
.hero-art img { background: #fff; border-radius: 28px; box-shadow: var(--shadow-lg); padding: 18px; transform: rotate(2deg); }
.hero-search { background: #fff; border-radius: 18px; padding: 10px; display: grid; gap: 8px; margin-top: 26px; box-shadow: var(--shadow-lg); }
.hero-search .field-inline { display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; min-height: 52px; }
.hero-search .field-inline i { color: var(--muted); }
.hero-search input, .hero-search select { border: 0; outline: 0; flex: 1; font: 500 1rem var(--font); color: var(--text); background: transparent; min-width: 0; height: 50px; }
@media (min-width: 760px) { .hero-search { grid-template-columns: 1.4fr 1fr auto; } .hero-search .field-inline { border: 0; border-right: 1px solid var(--border); border-radius: 0; } }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; color: #c9d5f0; font-size: .92rem; }
.hero-trust i { color: var(--gold); margin-right: 6px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: #fff; }
.section-head { max-width: 680px; margin: 0 auto 32px; text-align: center; }
.section-head p { color: var(--muted); }
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -44px; position: relative; z-index: 2; }
.stat { background: #fff; border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); }
.stat strong { display: block; font: 800 1.7rem var(--font-head); color: var(--navy); }
.stat span { color: var(--muted); font-size: .9rem; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .topic-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .topic-grid { grid-template-columns: repeat(5, 1fr); } }
.topic { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); color: var(--text); transition: transform .15s, box-shadow .15s; text-decoration: none !important; }
.topic:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c9d6f2; }
.topic i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 1.1rem; }
.topic strong { font-size: .98rem; }
.topic small { color: var(--muted); }

.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 18px; right: 18px; font: 800 2.4rem var(--font-head); color: #eef2fb; }
.step i { font-size: 1.5rem; color: var(--gold); margin-bottom: 10px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

.cta-band { background: linear-gradient(135deg, var(--navy), #2f4f9a); color: #fff; border-radius: 24px; padding: 34px 24px; display: grid; gap: 18px; align-items: center; }
.cta-band h2 { color: #fff; margin: 0; }
.cta-band p { color: #d7e0f5; margin: 0; }
@media (min-width: 860px) { .cta-band { grid-template-columns: 1fr auto; padding: 44px; } }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--radius); border: 1px solid #e6ecf6; padding: 20px; box-shadow: 0 2px 6px rgba(24, 40, 72, .03); }
.card + .card { margin-top: 16px; }
.card h2, .card h3 { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.1rem; }
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Psychologist cards ---------- */
.psy-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .psy-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .psy-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.psy-card { position: relative; background: #fff; border: 1px solid #e3eaf6; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .2s, transform .2s; }
.psy-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.psy-card-top { display: flex; gap: 14px; color: inherit; text-decoration: none !important; }
.psy-card-info h3 { font-size: 1.05rem; margin: 2px 0 2px; }
.verified { color: var(--primary); font-size: .85rem; }
.psy-title { color: var(--blue); font-weight: 600; font-size: .88rem; margin: 0 0 4px; }
.psy-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: var(--muted); font-size: .85rem; }
.psy-meta i { margin-right: 5px; color: #8fa0bd; }
.psy-intro { color: #3d4b66; font-size: .93rem; margin: 0; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--primary-soft); color: #2a4396; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 500; }
.tags li.more { background: #eef1f6; color: var(--muted); }
.psy-card-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #eef2f8; display: flex; flex-direction: column; gap: 10px; }
.psy-card-facts { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; }
.psy-card-facts i { margin-right: 6px; }
.psy-card-facts strong { color: var(--navy); font-size: 1rem; }
.psy-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ribbon { position: absolute; top: 14px; right: 14px; background: var(--success-soft); color: var(--success); font-size: .72rem; font-weight: 700; padding: 4px 8px; border-radius: 8px; }
.avatar { border-radius: 50%; object-fit: cover; background: var(--primary-soft); flex-shrink: 0; }
.avatar-sm { width: 40px; height: 40px; }
.avatar-md { width: 56px; height: 56px; }
.avatar-lg { width: 84px; height: 84px; border-radius: 22px; }
.avatar-xl { width: 140px; height: 140px; border-radius: 32px; border: 4px solid #fff; box-shadow: var(--shadow); }
.avatar-initials { display: inline-grid; place-items: center; color: var(--primary); }

/* ---------- Directory ---------- */
.page-hero { background: linear-gradient(140deg, #182848, #2f4f9a); color: #fff; padding: 34px 0 30px; }
.page-hero h1 { color: #fff; margin-bottom: 6px; }
.page-hero p { color: #d7e0f5; margin: 0; }
.breadcrumb { font-size: .85rem; color: #b9c6e6; margin-bottom: 10px; }
.breadcrumb a { color: #fff; }
.directory { display: grid; gap: 20px; padding: 24px 0 56px; }
@media (min-width: 1000px) { .directory { grid-template-columns: 290px 1fr; align-items: start; } }
.filters { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.filters h2 { font-size: 1.05rem; }
@media (max-width: 999px) {
  .filters { position: fixed; inset: 0; z-index: 80; border-radius: 0; overflow-y: auto; transform: translateX(-100%); transition: transform .25s; padding-bottom: 90px; }
  .filters.open { transform: none; }
  .filters-close { display: inline-flex !important; }
}
.filters-close { display: none; }
.filters .filter-actions { position: sticky; bottom: 0; background: #fff; padding-top: 12px; display: grid; gap: 8px; }
.results-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.results-bar .count { font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.active-filters a { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: .85rem; color: var(--text); }
.active-filters a i { margin-left: 6px; color: var(--muted); }
.empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty i { font-size: 2.4rem; color: var(--blue); margin-bottom: 12px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--border); color: var(--text); font-weight: 600; text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 0 16px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--text); }
.req { color: var(--danger); }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field input[type=number],
.field input[type=url], .field input[type=date], .field input[type=time], .field input[type=month], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 12px; font: 400 1rem var(--font); color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(55, 98, 255, .12); outline: 0; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 5px; }
.field-icon { position: relative; }
.field-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8fa0bd; }
.field-icon input { padding-left: 40px !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; cursor: pointer; margin-bottom: 12px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; border: 1.5px solid var(--border); border-radius: 999px; font-size: .9rem; cursor: pointer; background: #fff; user-select: none; }
.chip-check input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-check input:focus-visible + span { outline: 3px solid rgba(55, 98, 255, .45); }
fieldset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
legend { font: 700 1.05rem var(--font-head); color: var(--navy); margin-bottom: 12px; padding: 0; }
.form-section { padding: 20px 0; border-top: 1px solid #eef2f8; }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.password-wrap { position: relative; }
.password-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); width: 40px; height: 40px; cursor: pointer; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 32px 16px 56px; }
.auth-card { width: 100%; max-width: 460px; background: #fff; border-radius: 22px; padding: 30px 24px; box-shadow: var(--shadow-lg); border: 1px solid #e6ecf6; }
.auth-card.wide { max-width: 920px; }
.auth-card .logo { display: block; margin: 0 auto 10px; width: 64px; }
.auth-card h1 { font-size: 1.6rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 22px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Profile page ---------- */
.profile-hero { background: linear-gradient(140deg, #182848, #2f4f9a); padding: 28px 0 90px; color: #fff; }
.profile-hero .breadcrumb a { color: #fff; }
.profile-layout { display: grid; gap: 20px; margin-top: -70px; padding-bottom: 100px; }
@media (min-width: 1000px) { .profile-layout { grid-template-columns: 1fr 360px; align-items: start; padding-bottom: 56px; } .profile-aside { position: sticky; top: 88px; } }
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
@media (min-width: 700px) { .profile-head { flex-direction: row; text-align: left; align-items: flex-start; } }
.profile-head h1 { font-size: 1.7rem; margin-bottom: 4px; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
@media (min-width: 700px) { .profile-badges { justify-content: flex-start; } }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--bg); border-radius: 12px; padding: 12px; text-align: center; }
.fact i { color: var(--blue); }
.fact strong { display: block; font-size: .95rem; margin-top: 4px; }
.fact span { font-size: .78rem; color: var(--muted); }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef2f8; font-size: .95rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list i { color: var(--blue); width: 20px; text-align: center; margin-top: 4px; }
.info-list span { color: var(--muted); min-width: 120px; }
.week { width: 100%; border-collapse: collapse; font-size: .93rem; }
.week td { padding: 9px 4px; border-bottom: 1px solid #eef2f8; }
.week td:last-child { text-align: right; color: var(--muted); }
.week tr.off td { color: #a3afc4; }
.prose p { color: #33415c; }
.book-box .price { font: 800 1.6rem var(--font-head); color: var(--navy); }
.mobile-book-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--border); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; box-shadow: 0 -8px 24px rgba(24, 40, 72, .08); }
.mobile-book-bar .btn { flex: 1; }
@media (min-width: 1000px) { .mobile-book-bar { display: none; } }

/* ---------- Booking wizard ---------- */
.wizard { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.progress { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.progress li { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); }
.progress li::before { content: ''; display: block; height: 6px; border-radius: 6px; background: var(--border); margin-bottom: 6px; }
.progress li.done::before, .progress li.current::before { background: var(--primary); }
.progress li.current { color: var(--primary); font-weight: 700; }
.booking-with { display: flex; gap: 12px; align-items: center; }
.dates { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.date-btn { scroll-snap-align: start; flex: 0 0 74px; border: 1.5px solid var(--border); background: #fff; border-radius: 14px; padding: 10px 4px; text-align: center; cursor: pointer; font: inherit; color: var(--text); }
.date-btn small { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; }
.date-btn strong { display: block; font-size: 1.05rem; }
.date-btn em { display: block; font-style: normal; font-size: .75rem; color: var(--muted); }
.date-btn[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: #fff; }
.date-btn[aria-pressed=true] small, .date-btn[aria-pressed=true] em { color: #dbe4ff; }
.date-btn:disabled { opacity: .35; cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot-btn { min-height: 44px; border: 1.5px solid var(--border); background: #fff; border-radius: 12px; font: 600 .9rem var(--font); cursor: pointer; color: var(--text); }
.slot-btn[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: #fff; }
.slot-btn:disabled { text-decoration: line-through; opacity: .4; cursor: not-allowed; }
.otp-input { letter-spacing: 12px; text-align: center; font-size: 1.6rem !important; font-weight: 700; }
.success-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; font-size: 2.4rem; margin: 0 auto 16px; }

/* ---------- FAQ ---------- */
.faq details { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; color: var(--primary); line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); }

/* ---------- Crisis strip & footer ---------- */
.crisis-strip { background: #fff5f5; border-top: 1px solid #fde2e2; padding: 14px 0; }
.crisis-strip .container { display: flex; gap: 12px; align-items: center; }
.crisis-strip i { color: var(--danger); font-size: 1.3rem; }
.crisis-strip p { margin: 0; font-size: .92rem; }
.crisis-strip a { font-weight: 700; color: var(--danger); }
.site-footer { background: var(--navy); color: #c9d5f0; padding: 44px 0 0; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
.site-footer h3 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer a { color: #c9d5f0; display: block; padding: 4px 0; font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.footer-brand p { font-size: .93rem; margin-top: 12px; max-width: 360px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; font-size: 1.1rem; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 32px; padding: 18px 16px; font-size: .85rem; }
.footer-bottom a { display: inline; }

/* =====================================================================
   DASHBOARD (psychologist + admin)
   ===================================================================== */
.panel-body { background: #f3f6fc; }
.panel { min-height: 100vh; }
.panel-sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; background: var(--navy); color: #c9d5f0; padding: 20px 14px; overflow-y: auto; z-index: 70; transform: translateX(-100%); transition: transform .25s; display: flex; flex-direction: column; gap: 18px; }
.panel-sidebar.open { transform: none; }
.panel-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 60; }
.panel-user { display: flex; gap: 10px; align-items: center; padding: 12px; background: rgba(255, 255, 255, .06); border-radius: 14px; }
.panel-user strong { display: block; color: #fff; font-size: .92rem; line-height: 1.3; }
.panel-user small { color: #9fb0d6; }
.panel-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.panel-sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: #c9d5f0; font-weight: 500; font-size: .94rem; text-decoration: none; }
.panel-sidebar nav a i { width: 20px; text-align: center; }
.panel-sidebar nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.panel-sidebar nav a.active { background: var(--primary); color: #fff; }
.nav-badge { margin-left: auto; background: var(--gold); color: var(--navy); font-style: normal; font-size: .75rem; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.panel-main { min-width: 0; }
.panel-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px; min-height: 64px; }
.panel-topbar h1 { font-size: 1.2rem; margin: 0; flex: 1; }
.panel-toggle { width: 44px; height: 44px; border: 1px solid var(--border); background: #fff; border-radius: 12px; font-size: 1.1rem; color: var(--navy); cursor: pointer; }
.panel-content { padding: 18px 16px 48px; max-width: 1200px; }
@media (min-width: 1000px) {
  .panel-sidebar { transform: none; }
  .panel-main { margin-left: 270px; }
  .panel-toggle { display: none; }
  .panel-overlay { display: none !important; }
  .panel-content { padding: 26px 30px 60px; }
}
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: #fff; border: 1px solid #e6ecf6; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none !important; }
.kpi i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.kpi strong { font: 800 1.6rem var(--font-head); color: var(--navy); }
.kpi span { color: var(--muted); font-size: .85rem; }
.kpi.warn i { background: var(--warning-soft); color: var(--warning); }
.kpi.ok i { background: var(--success-soft); color: var(--success); }
.kpi.gold i { background: var(--gold-soft); color: #8a5a00; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.tabs a { white-space: nowrap; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .9rem; text-decoration: none; }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tabs a em { font-style: normal; opacity: .7; margin-left: 4px; }

/* Responsive tables: become cards on phones */
.table-wrap { background: #fff; border: 1px solid #e6ecf6; border-radius: var(--radius); overflow: hidden; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8faff; padding: 12px 14px; border-bottom: 1px solid #e6ecf6; }
.table td { padding: 12px 14px; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.actions > * { display: inline-flex; vertical-align: middle; margin-left: 6px; }
@media (max-width: 760px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 14px; border-bottom: 1px solid #eef2f8; }
  .table td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; font-size: .82rem; }
  .table td.actions { justify-content: flex-start; padding-top: 10px; }
  .table td.actions::before { display: none; }
}
.person { display: flex; align-items: center; gap: 10px; text-align: left; }
.person small { display: block; color: var(--muted); }
.appt-card { background: #fff; border: 1px solid #e6ecf6; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; display: grid; gap: 10px; }
.appt-card .row { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.appt-card h3 { margin: 0; font-size: 1.02rem; }
.appt-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; }
.appt-meta i { margin-right: 5px; color: #8fa0bd; }
.locked { display: flex; gap: 10px; align-items: center; background: #f8faff; border: 1px dashed #c9d6f2; border-radius: 12px; padding: 10px 12px; color: var(--muted); font-size: .9rem; }
.locked i { color: var(--blue); }
.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.month { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fff; }
.month strong { display: block; font-size: .92rem; }
.month.paid { border-color: #bbf7d0; background: #f3fdf6; }
.month.unpaid { border-color: #fde68a; background: #fffbeb; }
.progress-bar { height: 10px; background: #eef2f8; border-radius: 10px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); }
.day-row { display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px solid #eef2f8; align-items: center; }
@media (min-width: 900px) { .day-row { grid-template-columns: 160px repeat(5, 1fr); } }
.day-row .field { margin: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch span.track { width: 46px; height: 26px; border-radius: 26px; background: #cfd8e8; position: relative; transition: background .2s; flex-shrink: 0; }
.switch span.track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + span.track { background: var(--primary); }
.switch input:checked + span.track::after { transform: translateX(20px); }
.switch input:focus-visible + span.track { outline: 3px solid rgba(55, 98, 255, .45); }
dialog { border: 0; border-radius: 20px; padding: 0; width: min(520px, calc(100% - 24px)); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(15, 23, 42, .5); }
dialog form { padding: 22px; }
.photo-edit { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
@media print { .site-header, .site-footer, .crisis-strip, .mobile-book-bar, .panel-sidebar, .panel-topbar { display: none !important; } .panel-main { margin: 0; } }

/* ---------- Overflow guards & small fixes ---------- */
html, body { overflow-x: hidden; }
.card, .psy-card, .appt-card, .wizard, .panel-content { min-width: 0; }
.kv dd, .info-list div { min-width: 0; overflow-wrap: anywhere; }
.tags li a { color: inherit; }
.mobile-book-bar .btn-outline { flex: 0 0 56px; }
.h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
.h3 { font-size: 1.15rem; }
@media (max-width: 699px) { .center-mobile { text-align: center; } .profile-head h1 { font-size: 1.45rem; } }
.btn.loading { opacity: .7; }
.panel-close { width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-size: 1.1rem; cursor: pointer; }
@media (min-width: 1000px) { .panel-close { display: none; } }
@media (max-width: 639px) {
  .topic { flex-direction: row; align-items: center; padding: 12px; gap: 10px; }
  .topic i { width: 36px; height: 36px; flex-shrink: 0; font-size: 1rem; }
  .topic strong { font-size: .88rem; line-height: 1.25; }
  .topic small { display: none; }
}
.card h3 + .tags, .tags + h3 { margin-top: 12px; }
/* Logo (set in includes/layout.php -> PM_LOGO). Fixed height, width follows the image. */
.brand .brand-logo { height: 42px; width: auto; max-width: 180px; object-fit: contain; border-radius: 8px; background: #fff; }
.panel-sidebar .brand .brand-logo { height: 36px; max-width: 150px; }

/* "SRI LANKA" tag next to the brand name (header, footer, dashboard) */
.brand-country { display: inline-block; font-style: normal; font-family: var(--font); font-size: .62rem; font-weight: 800; letter-spacing: .06em; line-height: 1; padding: 4px 7px; margin-left: 4px; border-radius: 6px; background: var(--navy); color: #fff; vertical-align: middle; position: relative; top: -2px; white-space: nowrap; }
.brand-light .brand-country { background: var(--gold); color: var(--navy); }
@media (max-width: 380px) { .brand { font-size: 1rem; } .brand-country { font-size: .56rem; padding: 3px 5px; } }
.brand span, .site-nav > a, .nav-actions .btn { white-space: nowrap; }
@media (min-width: 1000px) and (max-width: 1299px) {
  .site-nav > a { padding: 8px 7px; font-size: .86rem; }
  .nav-actions { margin-left: 4px; gap: 6px; }
  .nav-actions .btn { padding: 7px 10px; font-size: .82rem; }
  .header-inner .brand { font-size: 1rem; }
  .header-inner .brand .brand-logo { height: 36px; }
}
@media (min-width: 1000px) and (max-width: 1099px) { .site-nav > a[href$="#how-it-works"] { display: none; } }
