/* ============================================================
   whiletruedo — 2026 Clean SaaS Aesthetic (Light mode, CSS-only)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Design Tokens --- */
:root {
    --color-bg: #f8f9fb;
    --color-surface: #ffffff;
    --color-text: #111827;
    --color-text-secondary: #374151;
    --color-muted: #6b7280;
    --color-subtle: #9ca3af;
    --color-primary: #7c3aed;
    --color-primary-hover: #6d28d9;
    --color-primary-light: #f5f3ff;
    --color-secondary: #10b981;
    --color-secondary-hover: #059669;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --color-danger: #ef4444;
    --color-danger-light: #fef2f2;
    --color-warning: #f59e0b;
    --color-warning-light: #fffbeb;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --transition: 200ms ease;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
}

/* --- Base --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.6;
}

::selection { background: var(--color-primary-light); color: var(--color-primary); }

/* Thin scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-muted); }

h1, h2, h3, h4, h5, h6 { letter-spacing: -0.02em; line-height: 1.3; }

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-hover); }

.container { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

/* --- Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
    background: rgba(26,26,26,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.nav-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-brand:hover { color: #fff; }
.nav-prebeta { font-size: 0.65rem; font-weight: 500; color: rgba(255,255,255,0.35); letter-spacing: 0; vertical-align: middle; }
.nav-links { display: flex; align-items: center; gap: 0.125rem; }
.nav-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 450;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
}
.nav-links a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.nav-links .btn-link {
    color: rgba(255,255,255,0.7);
    background: none;
}
.nav-links .btn-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1.4;
    white-space: nowrap;
    color: inherit;
}
.btn:hover { transform: translateY(-0.5px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-full);
    box-shadow: 0 1px 3px rgba(124,58,237,0.25);
}
.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 2px 8px rgba(124,58,237,0.3);
    color: #fff;
}

.btn-secondary { background: var(--color-secondary); color: #fff; }
.btn-secondary:hover { background: var(--color-secondary-hover); color: #fff; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    border-radius: var(--radius-full);
}
.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-link {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
}
.btn-link:hover { background: var(--color-bg); color: var(--color-text); }

.btn-icon { background: none; border: none; color: var(--color-subtle); cursor: pointer; padding: 0.25rem; transition: color var(--transition); }
.btn-icon:hover { color: var(--color-text-secondary); }
.btn-icon.pass:hover { color: var(--color-warning); }

.inline-form { display: inline; }

/* --- Hero --- */
.hero {
    text-align: center;
    background: #1a1a1a;
    margin: 0 -1.25rem;
    padding: 5rem 1.25rem 4rem;
}
.hero-eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1.25rem;
    letter-spacing: 0;
    text-transform: none;
}
.hero-eyebrow code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: #a78bfa;
    background: rgba(167,139,250,0.1);
    padding: 0.1em 0.4em;
    border-radius: 4px;
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 1.25rem;
}
.hero-sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.55);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}
.hero-carousel { position: relative; width: 100%; max-width: 400px; margin: 0 auto 1.5rem; aspect-ratio: 320 / 200; overflow: hidden; }
.hero-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.8s ease;
    pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide svg { width: 100%; height: 100%; }
.cta-group { display: flex; gap: 0.875rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.btn-hero-primary {
    background: #ffffff;
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.875rem 2.25rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    text-decoration: none;
}
.btn-hero-primary:hover { background: #e8e8e8; color: #1a1a1a; transform: translateY(-1px); }
.btn-hero-outline {
    background: transparent;
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.875rem 2.25rem;
    border-radius: var(--radius-full);
    border: 1.5px solid rgba(255,255,255,0.25);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), transform var(--transition);
    text-decoration: none;
}
.btn-hero-outline:hover { border-color: rgba(255,255,255,0.6); color: #ffffff; transform: translateY(-1px); }

/* --- Hero code block --- */
.hero-code {
    max-width: 520px;
    margin: 0 auto;
    background: #1e1e2e;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    text-align: left;
}
.hero-code-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    background: #16161f;
}
.hero-code-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #3a3a4a;
}
.hero-code-dot:nth-child(1) { background: #ff5f57; }
.hero-code-dot:nth-child(2) { background: #febc2e; }
.hero-code-dot:nth-child(3) { background: #28c840; }
.hero-code-block {
    margin: 0;
    padding: 1.5rem 1.75rem 1.75rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    color: #cdd6f4;
    white-space: pre;
    overflow-x: auto;
}
.code-kw  { color: #cba6f7; font-weight: 600; }
.code-fn  { color: #89b4fa; }
.code-str { color: #a6e3a1; }
.code-lit { color: #fab387; }
.code-comment { color: #6c7086; font-style: italic; }

@media (max-width: 600px) {
    .hero-code { margin: 0 -0.25rem; }
    .hero-code-block { font-size: 0.775rem; padding: 1.25rem; }
}

/* --- Pain Points --- */
.pain-points { padding: 2.5rem 0 1rem; text-align: center; }
.pain-points h2 { font-size: 1.5rem; margin-bottom: 1.25rem; color: var(--color-text); }
.pain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }
.pain-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: left;
}
.pain-quote {
    font-size: 1.05rem;
    font-weight: 600;
    font-style: italic;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.pain-detail {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* --- Features --- */
.features { padding: 5rem 0 6rem; text-align: center; }
.features-heading {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 3.5rem;
    color: var(--color-text);
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.feature {
    background: var(--color-surface);
    padding: 2rem 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    text-align: left;
}
.feature-num {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}
.feature h3 { margin-bottom: 0.5rem; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.feature p { color: var(--color-muted); font-size: 0.875rem; line-height: 1.6; }

/* --- Explainer section --- */
.explainer {
    background: #1a1a1a;
    margin: 0 -1.25rem;
    padding: 5rem 1.25rem;
}
.explainer-inner { max-width: 640px; margin: 0 auto; }
.explainer-overline {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a78bfa;
    margin-bottom: 1rem;
}
.explainer h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.15;
}
.explainer p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.8;
    margin-bottom: 1rem;
}
.explainer p strong { color: rgba(255,255,255,0.9); font-weight: 600; }
@media (max-width: 768px) { .explainer { padding: 3.5rem 1.25rem; } }


/* --- Alerts / Messages --- */
.messages { margin: 1rem 0; }
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    background: var(--color-surface);
}
.alert-success { border-left-color: var(--color-secondary); color: #065f46; background: #f0fdf4; }
.alert-error { border-left-color: var(--color-danger); color: #991b1b; background: #fef2f2; }
.alert-warning { border-left-color: var(--color-warning); color: #92400e; background: #fffbeb; }
.alert-info { border-left-color: var(--color-primary); color: #1e40af; background: #eff6ff; }

/* --- Forms --- */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-group input::placeholder, .form-group textarea::placeholder {
    color: var(--color-subtle);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
    background: #fafbff;
}
.form-help { font-size: 0.8rem; color: var(--color-muted); margin-top: 0.375rem; }
.form-errors { color: var(--color-danger); font-size: 0.85rem; margin-top: 0.25rem; }
.form-errors ul { list-style: none; }

/* --- Agent create form --- */
.create-agent-page { max-width: 640px; padding: 3rem 0 5rem; }
.create-agent-header { margin-bottom: 2.5rem; }
.create-agent-header h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.375rem; }
.create-agent-header p { color: var(--color-muted); font-size: 1rem; }

.create-agent-form {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.create-field {
    padding: 2rem 2.25rem;
    border-bottom: 1px solid var(--color-border-light);
}

.create-field-label {
    margin-bottom: 0.875rem;
}
.create-field-label label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
    margin-bottom: 0.3rem;
}
.create-field-hint {
    font-size: 0.825rem;
    color: var(--color-muted);
    line-height: 1.5;
}

.create-field input[type="text"],
.create-field input[type="date"],
.create-field select,
.create-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.925rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.create-field input::placeholder,
.create-field textarea::placeholder { color: var(--color-subtle); }
.create-field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.create-field input:focus,
.create-field select:focus,
.create-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
    background: var(--color-surface);
}

.start-fields { display: flex; gap: 1rem; }

.start-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.start-field-wrap.start-field-date { flex: 1.3; }
.start-field-wrap.start-field-time { flex: 1; }

.start-field-icon {
    position: absolute;
    left: 0.875rem;
    color: var(--color-muted);
    pointer-events: none;
    z-index: 1;
}
.start-field-wrap input[type="date"],
.start-field-wrap select {
    padding-left: 2.5rem;
    width: 100%;
}

.create-agent-actions {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.5rem 2.25rem;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

@media (max-width: 600px) {
    .create-agent-page { padding: 1.75rem 0 3rem; }
    .create-agent-header h1 { font-size: 1.5rem; }
    .create-field { padding: 1.5rem 1.25rem; }
    .create-agent-actions { padding: 1.25rem; flex-direction: column; align-items: stretch; }
    .create-agent-actions .btn { width: 100%; justify-content: center; }
    .start-fields { flex-direction: column; gap: 0.75rem; }
    .start-field-wrap.start-field-date,
    .start-field-wrap.start-field-time { flex: none; width: 100%; }
}

/* --- Search Filters --- */
.search-filters { display: flex; flex-direction: column; gap: 0.75rem; }
.search-filters-row {
    display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap;
}
.search-filters-row .form-group {
    flex: 1; min-width: 140px; margin-bottom: 0;
}
.search-filters-row .checkbox-group {
    display: flex; align-items: center; gap: 0.4rem;
    padding-bottom: 0.45rem; white-space: nowrap; font-size: 0.85rem; margin: 0;
}
.search-filters-actions {
    display: flex; gap: 0.5rem; padding-bottom: 0.35rem;
}
@media (max-width: 640px) {
    .search-filters-row { flex-direction: column; }
    .search-filters-row .form-group { min-width: 100%; }
}

/* --- Search Hero --- */
.search-hero {
    text-align: center;
    padding: 2.5rem 1.5rem 2rem;
    margin-bottom: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}
.search-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.search-hero-form {
    display: flex;
    gap: 0.5rem;
    max-width: 480px;
    margin: 0 auto;
}
.search-hero-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-hero-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

/* --- Filter Toggle Buttons --- */
.filter-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}
.filter-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.filter-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.filter-toggle.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* --- Advanced Filters (collapsible) --- */
.advanced-filters {
    display: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
}
.advanced-filters.open { display: block; }
.advanced-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.advanced-filters-grid .form-group { margin-bottom: 0; }
.advanced-filters-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.advanced-filters-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- Results Count --- */
.results-count {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 0.75rem;
}

/* --- Cards --- */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.card h2, .card h3 { margin-bottom: 0.75rem; }

/* --- Page Sections --- */
.page-header { padding: 2.5rem 0 1.5rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; }
.page-header p { color: var(--color-muted); margin-top: 0.375rem; font-size: 0.9rem; }

/* --- Chat --- */
.chat-container {
    display: flex; flex-direction: column; height: calc(100vh - 200px);
    background: var(--color-surface); border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden; margin: 1rem 0;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.chat-input-area { border-top: 1px solid var(--color-border); padding: 1rem; display: flex; gap: 0.5rem; }
.chat-input-area textarea {
    flex: 1; padding: 0.625rem 0.875rem; border: 1px solid var(--color-border);
    border-radius: var(--radius); font-size: 0.9rem; font-family: inherit;
    resize: none; min-height: 44px; max-height: 120px;
    transition: border-color var(--transition);
}
.chat-input-area textarea:focus { outline: none; border-color: var(--color-primary); }

.message { max-width: 75%; padding: 0.75rem 1rem; border-radius: var(--radius); font-size: 0.9rem; line-height: 1.5; }
.message-interviewer { background: var(--color-bg); align-self: flex-start; border-bottom-left-radius: 2px; }
.message-customer { background: var(--color-primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }
.message-system { background: var(--color-warning-light); align-self: center; text-align: center; font-size: 0.85rem; max-width: 90%; }

.typing-indicator { align-self: flex-start; padding: 0.75rem 1rem; background: var(--color-bg); border-radius: var(--radius); }
.typing-indicator span { display: inline-block; width: 8px; height: 8px; background: var(--color-muted); border-radius: 50%; margin: 0 2px; animation: typing 1.4s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

/* --- Tags (Notion-style) --- */
.tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid rgba(124,58,237,0.15);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    margin: 0.15rem;
}

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.625rem 0.875rem; text-align: left; border-bottom: 1px solid var(--color-border-light); font-size: 0.875rem; }
th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
    background: transparent;
    border-bottom-color: var(--color-border);
}

/* --- Utility --- */
.text-muted { color: var(--color-muted); }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }

/* --- Dossier --- */
.dossier-section { margin-bottom: 1.5rem; }
.dossier-section h3 { font-size: 0.95rem; margin-bottom: 0.5rem; border-bottom: 1px solid var(--color-border-light); padding-bottom: 0.375rem; }
.key-fact { padding: 0.5rem 0; border-bottom: 1px solid var(--color-border-light); }
.key-fact:last-child { border-bottom: none; }
.key-fact strong { display: block; font-size: 0.8rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.03em; }

/* --- Score badge --- */
.score-badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.15rem 0.5rem; border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 600;
}
.score-high { background: #ecfdf5; color: #065f46; }
.score-medium { background: #fffbeb; color: #92400e; }
.score-low { background: var(--color-bg); color: var(--color-muted); }

/* --- Safety alert --- */
.safety-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.safety-box {
    background: #fff; border-radius: var(--radius-lg); padding: 2rem; max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: dialog-enter 200ms ease;
}
.safety-box h2 { color: var(--color-danger); margin-bottom: 1rem; }

/* --- Accordion --- */
.accordion-toggle { cursor: pointer; user-select: none; }
.accordion-toggle::before { content: "\25B6"; display: inline-block; margin-right: 0.5rem; transition: transform var(--transition); font-size: 0.7rem; }
.accordion-toggle.open::before { transform: rotate(90deg); }
.accordion-content { display: none; padding: 0.75rem 0; }
.accordion-content.open { display: block; }

/* --- Status badges --- */
.status { display: inline-block; padding: 0.15rem 0.5rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.status-pending { background: #fffbeb; color: #92400e; }
.status-accepted { background: #ecfdf5; color: #065f46; }
.status-declined { background: #fef2f2; color: #991b1b; }
.status-in_progress { background: #eff6ff; color: #1e40af; }
.status-completed { background: #ecfdf5; color: #065f46; }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 0.25rem; padding: 1.5rem 0; }
.pagination a, .pagination span {
    padding: 0.375rem 0.75rem; border: 1px solid var(--color-border);
    border-radius: var(--radius); font-size: 0.85rem; text-decoration: none; color: var(--color-text-secondary);
    transition: all var(--transition);
}
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-light); }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* --- Checkbox --- */
.checkbox-group { display: flex; align-items: flex-start; gap: 0.5rem; }
.checkbox-group input[type="checkbox"] { width: auto; margin-top: 0.25rem; }

/* --- Marketplace grid --- */
.marketplace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }

/* --- Disclaimer --- */
.disclaimer {
    background: var(--color-warning-light);
    border-left: 3px solid var(--color-warning);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: #92400e;
    margin: 1rem 0;
}

/* --- Interview question cards --- */
.question-card {
    background: var(--color-surface); border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 1.25rem; margin-bottom: 1.25rem;
}
.question-label { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 0.5rem; line-height: 1.4; }
.question-input-wrapper { display: flex; gap: 0.5rem; align-items: flex-start; }
.question-input-wrapper textarea {
    flex: 1; padding: 0.625rem 0.875rem; border: 1px solid var(--color-border);
    border-radius: var(--radius); font-size: 0.9rem; font-family: inherit;
    min-height: 100px; resize: vertical;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.question-input-wrapper textarea:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

/* --- Microphone button --- */
.mic-btn {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--color-border); background: var(--color-surface);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--color-muted); transition: all var(--transition);
}
.mic-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.mic-btn.recording {
    background: var(--color-danger); border-color: var(--color-danger); color: #fff;
    animation: mic-pulse 1.5s ease-in-out infinite;
}
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }
.mic-status { font-size: 0.8rem; color: var(--color-muted); margin-top: 0.25rem; min-height: 1.2em; }
.mic-status.active { color: var(--color-danger); }

/* --- Interview wizard --- */
.interview-wizard { max-width: 680px; margin: 0 auto; padding: 2rem 0; }

.wizard-progress { margin-bottom: 2rem; }
.wizard-progress-bar {
    height: 4px; background: var(--color-border); border-radius: 2px;
    overflow: hidden; margin-bottom: 1rem;
}
.wizard-progress-fill {
    height: 100%; background: var(--color-primary); border-radius: 2px;
    transition: width 0.3s ease;
}
.wizard-step-dots { display: flex; justify-content: space-between; }
.wizard-step-dot {
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 0.8rem; font-weight: 600;
    background: var(--color-bg); border: 2px solid var(--color-border); color: var(--color-muted);
    transition: all var(--transition);
}
.wizard-step-dot.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.wizard-step-dot.completed { background: var(--color-secondary); border-color: var(--color-secondary); color: #fff; }

.wizard-card {
    background: var(--color-surface); border-radius: var(--radius-lg);
    border: 1px solid var(--color-border); padding: 2rem;
}
.wizard-question-label { font-size: 0.8rem; color: var(--color-muted); margin-bottom: 0.5rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.wizard-question { font-size: 1.1rem; font-weight: 600; line-height: 1.5; margin-bottom: 1.5rem; }

.wizard-input-wrapper { display: flex; gap: 0.5rem; align-items: flex-start; }
.wizard-input-wrapper textarea {
    flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--color-border);
    border-radius: var(--radius); font-size: 0.95rem; font-family: inherit;
    min-height: 160px; resize: vertical; line-height: 1.6;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.wizard-input-wrapper textarea:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.wizard-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 1.5rem; gap: 1rem;
}

/* --- Summary tabs (CSS-only, underline style) --- */
.summary-tabs { position: relative; }
.summary-tab-input { display: none; }
.summary-tab-label {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    margin-right: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--color-muted);
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}
.summary-tab-label:hover { color: var(--color-text-secondary); }
.summary-tab-input:checked + .summary-tab-label {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.summary-tab-content {
    display: none; padding: 1rem 0; border-top: 1px solid var(--color-border-light);
}
#tab-layman:checked ~ #content-layman { display: block; }
#tab-clinical:checked ~ #content-clinical { display: block; }

/* --- Review page answers --- */
.review-answer { padding: 1rem 0; border-bottom: 1px solid var(--color-border-light); }
.review-answer:last-child { border-bottom: none; }
.review-question { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--color-text); }
.review-response { font-size: 0.9rem; color: var(--color-text-secondary); line-height: 1.6; white-space: pre-wrap; }

/* --- Password toggle --- */
.password-toggle {
    position: absolute; right: 0.5rem; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; color: var(--color-muted);
    cursor: pointer; font-size: 0.8rem; padding: 0.25rem;
    transition: color var(--transition);
}
.password-toggle:hover { color: var(--color-text-secondary); }

/* --- Footer --- */
.site-footer {
    margin-top: 3rem; padding: 1.5rem 0;
    border-top: 1px solid var(--color-border-light);
    text-align: center;
}
.site-footer p { margin-bottom: 0.25rem; }
.footer-disclaimer { font-size: 0.7rem; color: var(--color-subtle); margin-top: 0.25rem; }
.site-footer a { color: var(--color-muted); text-decoration: none; }
.site-footer a:hover { color: var(--color-text-secondary); }
.footer-search { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--color-border-light); }
.footer-search-form { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; align-items: flex-end; }
.footer-search-form .form-input-sm { width: 140px; padding: 0.4rem 0.6rem; font-size: 0.8125rem; }
.footer-states { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--color-border-light); }
.footer-states a { margin: 0 0.1rem; }

.search-fields-form { margin-bottom: 1.5rem; }
.search-fields-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; }
.search-field label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--color-muted); margin-bottom: 0.25rem; }

/* ============================================================
   Consolidated template styles
   ============================================================ */

/* --- Dashboard: dash-table, status-badge, td-actions, path-id-link --- */
.dash-section { margin-bottom: 2.5rem; }
.dash-section h2 { margin-bottom: 0.25rem; }
.dash-section .section-sub { color: var(--color-muted); font-size: 0.875rem; margin-bottom: 1rem; }

.dash-table {
    width: 100%; border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}
.dash-table th {
    text-align: left; padding: 0.75rem 1rem;
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--color-muted);
    background: transparent;
    border-bottom: 1px solid var(--color-border);
}
.dash-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tbody tr:hover { background: var(--color-bg); }
.dash-table .row-link {
    color: var(--color-text); text-decoration: none; font-weight: 500;
    display: flex; align-items: center; gap: 0.35rem;
}
.dash-table .row-link:hover { color: var(--color-primary); }
.dash-table .row-link:hover .row-name { text-decoration: underline; }
.dash-table .row-link .link-arrow { color: var(--color-subtle); font-size: 0.85rem; transition: transform 0.15s; }
.dash-table .row-link:hover .link-arrow { color: var(--color-primary); transform: translateX(2px); }

.tooltip-wrap {
    position: relative;
    cursor: default;
}
.tooltip-wrap .tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--color-text);
    color: var(--color-surface);
    font-size: 0.75rem;
    line-height: 1.4;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    white-space: nowrap;
    text-align: left;
    pointer-events: none;
    transition: opacity 0.15s;
    margin-bottom: 4px;
    z-index: 100;
}
.tooltip-wrap:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
}
.modal-box {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}
.modal-message {
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.modal-form .form-input {
    width: 100%; margin-bottom: 1rem;
}
.modal-buttons {
    display: flex; gap: 0.5rem; justify-content: flex-end;
}

/* --- Action Dropdown --- */
.action-dropdown {
    position: relative;
    display: inline-block;
}
.action-dropdown-toggle {
    cursor: pointer;
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 0.35rem 0.65rem 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.action-dropdown-toggle:hover {
    opacity: 0.9;
}
.action-dropdown-toggle::after {
    content: '';
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #fff;
}
.action-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 10rem;
    z-index: 50;
    padding: 0.25rem 0;
}
.action-dropdown.open .action-dropdown-menu {
    display: block;
}
.action-dropdown-menu a,
.action-dropdown-menu button {
    display: block;
    width: 100%;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    color: var(--color-text);
    text-decoration: none;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.action-dropdown-menu a:hover,
.action-dropdown-menu button:hover {
    background: var(--color-bg);
}
.action-dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.25rem 0;
}
.action-dropdown-menu .dropdown-item-disabled {
    display: block;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    color: var(--color-muted);
    cursor: default;
}
.action-dropdown-menu .dropdown-danger {
    color: var(--color-danger);
}

/* --- Expandable profile --- */
.expando-profile summary {
    list-style: none;
    cursor: pointer;
    display: inline-block;
}
.expando-profile summary::-webkit-details-marker { display: none; }
.expando-profile[open] summary { margin-bottom: 0.75rem; }
.expando-content {
    border-top: 1px solid var(--color-border);
    padding-top: 0.75rem;
}

/* --- Modal message history --- */
.modal-msg-history {
    max-height: 12rem;
    overflow-y: auto;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}
.modal-msg {
    padding: 0.35rem 0;
    font-size: 0.82rem;
    line-height: 1.4;
}
.modal-msg + .modal-msg {
    border-top: 1px solid var(--color-border);
}
.modal-msg-sender {
    font-weight: 600;
}
.modal-msg-you .modal-msg-sender {
    color: var(--color-primary);
}
.modal-msg-content {
    color: var(--color-text);
}
.modal-msg-time {
    display: block;
    font-size: 0.7rem;
    color: var(--color-muted);
    margin-top: 0.1rem;
}

/* --- Last message preview in table --- */
.last-msg-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 18rem;
}

/* --- Text size utility --- */
.text-xs { font-size: 0.7rem; }

/* --- Truncated specialties with hover --- */
.specialties-cell {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 20rem;
    cursor: default;
}
.specialties-cell:hover {
    -webkit-line-clamp: unset;
    overflow: visible;
    white-space: normal;
}

.status-badge {
    display: inline-block; padding: 0.2rem 0.6rem; border-radius: var(--radius-full);
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
}
.status-new-request { background: #eff6ff; color: #1e40af; }
.status-awaiting { background: #fffbeb; color: #92400e; }
.status-in-conversation { background: var(--color-primary-light); color: #3730a3; }
.status-connected { background: #ecfdf5; color: #065f46; }
.status-declined { background: #fef2f2; color: #991b1b; }
.status-withdrawn { background: var(--color-bg); color: var(--color-muted); }
.status-wants { background: #fffbeb; color: #92400e; }
.status-sent { background: #eff6ff; color: #1e40af; }
.status-archived { background: #fffbeb; color: #92400e; }

.td-actions { display: flex; gap: 0.375rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; }

.path-id-link {
    color: var(--color-muted); text-decoration: none;
    font-family: var(--font-mono); font-size: 0.82rem;
    border-bottom: 1px dashed var(--color-border);
    transition: color var(--transition), border-color var(--transition);
}
.path-id-link:hover { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* --- Interview: step-pills, q-card, action buttons --- */
.step-pills { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.step-pill {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    transition: all var(--transition); text-decoration: none;
    border: 2px solid var(--color-border); background: var(--color-bg); color: var(--color-subtle);
}
.step-pill:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-light); }
.step-pill.current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.step-pill.current:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.step-pill.answered { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.step-pill.answered:hover { background: var(--color-secondary-hover); border-color: var(--color-secondary-hover); }

.q-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    max-width: 640px; margin: 0 auto;
}
.q-card-body { padding: 2.5rem 2rem 1.5rem; }
.q-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem; border-top: 1px solid var(--color-border-light);
}
.q-card-footer .left { display: flex; gap: 0.5rem; }
.q-card-footer .right { display: flex; gap: 0.5rem; }

.btn-back, .btn-cancel {
    padding: 0.6rem 1.5rem; border-radius: var(--radius); font-size: 0.9rem; font-weight: 500;
    background: transparent; border: 1px solid var(--color-border); color: var(--color-text-secondary);
    cursor: pointer; transition: all var(--transition);
}
.btn-back:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-light); }
.btn-cancel:hover { border-color: var(--color-danger); color: var(--color-danger); background: var(--color-danger-light); }
.btn-next {
    padding: 0.6rem 2rem; border-radius: var(--radius); font-size: 0.9rem; font-weight: 500;
    background: var(--color-primary); border: none; color: #fff; cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(124,58,237,0.25);
}
.btn-next:hover { background: var(--color-primary-hover); box-shadow: 0 2px 8px rgba(124,58,237,0.3); transform: translateY(-0.5px); }

/* --- Dialogs --- */
.dialog-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 1000; align-items: center; justify-content: center;
}
.dialog-overlay.open { display: flex; }
.dialog-box {
    background: var(--color-surface); border-radius: var(--radius-lg);
    padding: 2rem; max-width: 400px; width: 90%;
    box-shadow: var(--shadow-lg); text-align: center;
    animation: dialog-enter 200ms ease;
}
.dialog-box h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.dialog-box p { color: var(--color-muted); font-size: 0.875rem; margin-bottom: 1.5rem; }
.dialog-actions { display: flex; gap: 0.75rem; justify-content: center; }
.dialog-actions button {
    padding: 0.5rem 1.5rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500;
    cursor: pointer; transition: all var(--transition);
}
.dialog-discard { background: transparent; border: 1px solid var(--color-border); color: var(--color-text-secondary); }
.dialog-discard:hover { border-color: var(--color-danger); color: var(--color-danger); background: var(--color-danger-light); }
.dialog-save { background: var(--color-primary); border: none; color: #fff; box-shadow: 0 1px 3px rgba(124,58,237,0.25); }
.dialog-save:hover { background: var(--color-primary-hover); }

@keyframes dialog-enter {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- Messages / chat bubbles --- */
.msg-thread { max-height: 400px; overflow-y: auto; margin-bottom: 1rem; padding: 0.5rem; }
.msg-bubble {
    padding: 0.75rem 1rem; border-radius: var(--radius-lg);
    margin-bottom: 0.5rem; max-width: 85%;
}
.msg-bubble.therapist { background: #eff6ff; margin-left: auto; }
.msg-bubble.customer { background: var(--color-bg); }
.msg-sender { font-size: 0.72rem; font-weight: 600; color: var(--color-muted); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.03em; }
.msg-time { font-size: 0.7rem; color: var(--color-subtle); margin-top: 0.25rem; }
.msg-content { font-size: 0.875rem; white-space: pre-wrap; line-height: 1.5; }
.msg-form { display: flex; gap: 0.5rem; }
.msg-form textarea {
    flex: 1; padding: 0.625rem 0.875rem; border: 1px solid var(--color-border);
    border-radius: var(--radius); font-family: inherit; font-size: 0.875rem;
    resize: vertical; min-height: 60px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.msg-form textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }

/* --- Detail pages (outreach, engagement) --- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-card {
    border: 1px solid var(--color-border); border-radius: var(--radius-lg);
    padding: 1.25rem; background: var(--color-surface);
}
.detail-card h3 { margin-bottom: 0.75rem; font-size: 0.95rem; }
.detail-card-full { grid-column: 1 / -1; }

.note-item { border-bottom: 1px solid var(--color-border-light); padding: 0.75rem 0; }
.note-item:last-child { border-bottom: none; }
.note-time { font-size: 0.72rem; color: var(--color-subtle); text-transform: uppercase; letter-spacing: 0.03em; }
.note-content { font-size: 0.875rem; margin-top: 0.25rem; white-space: pre-wrap; }
.note-form textarea, .msg-form textarea {
    width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius);
    padding: 0.625rem 0.875rem; font-size: 0.875rem; resize: vertical; min-height: 60px;
    box-sizing: border-box; font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.note-form textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }

.actions-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

/* --- Outreach detail --- */
.outreach-header { margin-bottom: 1.5rem; }
.outreach-header h1 { margin-bottom: 0.25rem; }
.outreach-meta { display: flex; gap: 0.75rem; align-items: center; color: var(--color-muted); font-size: 0.875rem; flex-wrap: wrap; }
.key-facts-list { margin: 0; padding-left: 1.25rem; }
.key-facts-list li { margin-bottom: 0.25rem; font-size: 0.875rem; color: var(--color-text-secondary); }

/* --- Engagement detail --- */
.consent-card {
    background: var(--color-warning-light); border: 1px solid #fcd34d;
    border-radius: var(--radius-lg); padding: 1.25rem;
}
.consent-card h3 { color: #92400e; margin-bottom: 0.5rem; }
.shared-card {
    background: #ecfdf5; border: 1px solid #86efac;
    border-radius: var(--radius-lg); padding: 1rem;
}
.shared-card h3 { color: #065f46; margin-bottom: 0.25rem; }
.intake-detail { padding: 0.5rem 0; border-bottom: 1px solid var(--color-border-light); }
.intake-detail:last-child { border-bottom: none; }
.intake-detail strong { display: block; font-size: 0.8rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.therapist-info-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.75rem; }

/* --- Customer dashboard --- */
/* Horizontal stepper: connected circles with arrows */
.workflow-tracker {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 2rem 2rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}
.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 0%;
    position: relative;
}
/* Connector line between circles */
.workflow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 3px;
    background: var(--color-border);
    border-radius: 2px;
    z-index: 1;
}
.workflow-step.completed:not(:last-child)::after {
    background: var(--color-secondary);
}
/* Arrow chevron at end of connector */
.workflow-step:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 13px;
    right: calc(50% - 24px);
    width: 0;
    height: 0;
    z-index: 2;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid var(--color-border);
}
.workflow-step.completed:not(:last-child)::before {
    border-left-color: var(--color-secondary);
}
.workflow-step .wizard-step-dot {
    z-index: 3;
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
    box-shadow: 0 0 0 4px var(--color-surface);
}
.workflow-label {
    font-size: 0.75rem;
    color: var(--color-muted);
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
}
.workflow-step.active .workflow-label { color: var(--color-primary); font-weight: 600; }
.workflow-step.completed .workflow-label { color: var(--color-secondary); }
.quick-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.activity-table {
    width: 100%; border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}
.activity-table th {
    text-align: left; padding: 0.75rem 1rem;
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--color-muted);
    background: transparent;
    border-bottom: 1px solid var(--color-border);
}
.activity-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}
.activity-table tr:last-child td { border-bottom: none; }
.activity-table tbody tr:hover { background: var(--color-bg); }
.activity-table .therapist-link {
    color: var(--color-text); text-decoration: none; font-weight: 500;
    display: flex; align-items: center; gap: 0.35rem;
}
.activity-table .therapist-link:hover { color: var(--color-primary); }
.activity-table .therapist-link:hover .therapist-name { text-decoration: underline; }
.activity-table .therapist-link .link-arrow { color: var(--color-subtle); font-size: 0.85rem; transition: transform 0.15s; }
.activity-table .therapist-link:hover .link-arrow { color: var(--color-primary); transform: translateX(2px); }

/* --- Responses table --- */
.resp-table {
    width: 100%; border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}
.resp-table th {
    text-align: left; padding: 0.75rem 1rem;
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--color-muted);
    background: transparent;
    border-bottom: 1px solid var(--color-border);
}
.resp-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}
.resp-table tr:last-child td { border-bottom: none; }
.resp-table tbody tr:hover { background: var(--color-bg); }
.resp-link { color: var(--color-text); text-decoration: none; font-weight: 500; transition: color var(--transition); }
.resp-link:hover { color: var(--color-primary); text-decoration: underline; }

/* --- Archive modal --- */
.archive-modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 100; align-items: center; justify-content: center;
}
.archive-modal.active { display: flex; }
.archive-modal-content {
    background: var(--color-surface); border-radius: var(--radius-lg);
    padding: 1.5rem; max-width: 420px; width: 90%;
    box-shadow: var(--shadow-lg);
    animation: dialog-enter 200ms ease;
}
.archive-modal-content textarea {
    width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius);
    padding: 0.625rem 0.875rem; font-size: 0.875rem; resize: vertical; min-height: 60px;
    box-sizing: border-box; font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.archive-modal-content textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }

/* --- Path detail --- */
.path-hub { max-width: 700px; margin: 0 auto; }
.path-status-bar {
    display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem;
    padding: 1rem 1.5rem; background: var(--color-bg);
    border-radius: var(--radius-lg); border: 1px solid var(--color-border);
}
.status-badge-lg {
    display: inline-block; padding: 0.3rem 0.8rem; border-radius: var(--radius-full);
    font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
}
.status-interview { background: #eff6ff; color: #1d4ed8; }
.status-dossier_review { background: #fffbeb; color: #92400e; }
.status-submitted { background: #ecfdf5; color: #065f46; }
.status-withdrawn { background: var(--color-bg); color: var(--color-muted); }
.path-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* --- Directory --- */
.breadcrumbs { margin-bottom: 1rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; font-size: 0.875rem; color: var(--color-muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; color: var(--color-subtle); }
.breadcrumbs a { color: var(--color-primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.directory-search { margin-bottom: 1.5rem; }
.search-row { display: flex; gap: 0.5rem; }
.search-row .form-input { flex: 1; }

.directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.directory-card { display: flex; flex-direction: column; padding: 1rem 1.25rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); text-decoration: none; color: var(--color-text); transition: border-color 0.15s, box-shadow 0.15s; }
.directory-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-sm); }
.directory-card strong { font-size: 1rem; }
.directory-card .text-muted { font-size: 0.8125rem; margin-top: 0.25rem; }

.directory-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.directory-listing-card { display: block; padding: 1rem 1.25rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); text-decoration: none; color: var(--color-text); transition: border-color 0.15s, box-shadow 0.15s; }
.directory-listing-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-sm); }
.listing-name { font-weight: 600; font-size: 1rem; }
.listing-credential { font-size: 0.8125rem; color: var(--color-muted); margin-top: 0.125rem; }
.listing-location { font-size: 0.8125rem; margin-top: 0.25rem; }
.listing-phone { font-size: 0.8125rem; margin-top: 0.25rem; }
.listing-specialties { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.tag-sm { font-size: 0.7rem; padding: 0.15rem 0.5rem; }

/* --- Listing Detail Page --- */
.listing-layout { display: flex; gap: 2.5rem; align-items: flex-start; flex-wrap: nowrap; }
.listing-sidebar { width: 230px; flex-shrink: 0; position: sticky; top: 80px; padding-top: 0.5rem; }
.ad-unit-sidebar { margin-top: 0; margin-bottom: 1rem; }
.listing-main { flex: 1; min-width: 0; }

/* --- Listing Detail: Hero --- */
.listing-hero {
    display: flex; align-items: flex-start; gap: 2rem;
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); padding: 2rem 2.25rem;
    margin-bottom: 1.25rem;
}
.listing-photo {
    width: 140px; height: 175px; object-fit: cover;
    border-radius: var(--radius); flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.listing-photo-placeholder {
    width: 140px; height: 175px; flex-shrink: 0;
    border-radius: var(--radius);
    background: var(--color-bg); border: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: center;
}
.listing-hero-info { flex: 1; min-width: 0; padding-top: 0.25rem; }
.listing-hero-info h1 {
    font-size: 1.85rem; font-weight: 700; letter-spacing: -0.03em;
    line-height: 1.2; margin-bottom: 0.375rem;
}
.listing-credential-line {
    font-size: 1.05rem; color: var(--color-primary); font-weight: 500;
    margin-bottom: 0.5rem;
}
.listing-location-line {
    font-size: 0.9rem; color: var(--color-muted);
    display: flex; align-items: center; gap: 0.3rem;
    margin-bottom: 1rem;
}
.listing-hero-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* --- Listing Detail: Sections --- */
.listing-section {
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); padding: 2rem 2.25rem;
    margin-bottom: 1.25rem;
}
.listing-section h3 {
    font-size: 1rem; font-weight: 600; color: var(--color-text);
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1.25rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border-light);
}
.icon-section { width: 18px; height: 18px; color: var(--color-primary); flex-shrink: 0; }
.icon-inline { width: 14px; height: 14px; flex-shrink: 0; }
.icon-detail { width: 16px; height: 16px; color: var(--color-muted); flex-shrink: 0; margin-top: 0.2rem; }

/* --- Listing Detail: Detail Grid --- */
.listing-details-grid { display: flex; flex-direction: column; gap: 0; }
.detail-item {
    display: flex; align-items: flex-start; gap: 0.875rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--color-border-light);
}
.detail-item:first-child { padding-top: 0; }
.detail-item:last-child { border-bottom: none; padding-bottom: 0; }
.detail-label {
    display: block; font-size: 0.725rem; font-weight: 600;
    color: var(--color-muted); text-transform: uppercase;
    letter-spacing: 0.05em; margin-bottom: 0.2rem;
}
.detail-value { display: block; font-size: 0.9rem; color: var(--color-text); line-height: 1.5; }
.detail-value a { color: var(--color-primary); text-decoration: none; }
.detail-value a:hover { text-decoration: underline; }

/* --- Listing Detail: Bio & Tags --- */
.listing-bio {
    font-size: 0.95rem; line-height: 1.75; color: var(--color-text-secondary);
    white-space: pre-wrap;
}
.listing-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-insurance { background: #ecfdf5; color: #065f46; border-color: rgba(16,185,129,0.2); }

/* --- Listing Detail: Sidebar Extras --- */
.sidebar-related { margin-top: 1.75rem; padding-top: 0.75rem; }
.sidebar-related-title { font-size: 0.8rem; font-weight: 600; color: var(--color-text); margin-bottom: 0.625rem; }
.sidebar-claim { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--color-border-light); }
.sidebar-claim-label { font-size: 0.8rem; color: var(--color-muted); margin-bottom: 0.5rem; text-align: center; }

/* --- Listing Detail: CTA Icons & Outline Variant --- */
.cta-icon { width: 15px; height: 15px; vertical-align: -2px; margin-right: 0.25rem; }
.cta-outline { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); }
.cta-outline:hover { background: var(--color-bg); color: var(--color-text); border-color: var(--color-primary); }

/* --- Ad Unit Placeholders --- */
.ad-unit { margin-top: 1.5rem; text-align: center; }
.ad-unit-label { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-subtle); margin-bottom: 0.375rem; }
.ad-placeholder {
    background: var(--color-bg); border: 1px dashed var(--color-border);
    border-radius: var(--radius); color: var(--color-subtle);
    font-size: 0.8rem; display: flex; align-items: center; justify-content: center;
    min-height: 250px;
}
.ad-unit-sidebar .ad-placeholder { min-height: 250px; width: 100%; }
.ad-unit-footer { margin: 2rem 0; }
.ad-placeholder-footer { min-height: 90px; max-width: 728px; margin: 0 auto; }

.cta-btn { display: block; width: 100%; padding: 0.65rem 1rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; text-align: center; text-decoration: none; cursor: pointer; border: none; margin-bottom: 0.5rem; transition: background 0.15s, border-color 0.15s; }
.cta-btn { background: var(--color-primary); color: #fff; }
.cta-btn:hover { background: var(--color-primary-hover); color: #fff; }
.cta-label { font-size: 0.8rem; color: var(--color-muted); margin-bottom: 0.375rem; text-align: center; }
.cta-hint { cursor: help; text-decoration: underline dotted; text-underline-offset: 2px; }
.cta-orange { background: #e97714; }
.cta-orange:hover { background: #c96310; }
.cta-green { background: var(--color-secondary); }
.cta-green:hover { background: var(--color-secondary-hover); }
.cta-sent { background: var(--color-muted); cursor: default; text-align: center; }
.similar-list { list-style: none; padding: 0; margin: 0; }
.similar-list li { padding: 0.25rem 0; }
.similar-list a { font-size: 0.8rem; color: var(--color-primary); text-decoration: none; }
.similar-list a:hover { text-decoration: underline; }
.cta-divider { height: 1px; background: var(--color-border-light); margin: 0.5rem 0; }

.claim-box {
    background: #eef2ff; border: 1px solid #c7d2fe; border-radius: var(--radius-lg);
    padding: 1.5rem; margin-top: 0.75rem; text-align: center;
}
.claim-box h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.claim-box p { color: var(--color-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.btn-claim-blue {
    display: inline-block; background: #3b6af5; color: #fff; font-weight: 600; font-size: 1.05rem;
    padding: 0.75rem 2rem; border-radius: 0.5rem; text-decoration: none; border: none; cursor: pointer;
    transition: background 0.15s;
}
.btn-claim-blue:hover { background: #2952cc; color: #fff; }

.directory-layout { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: nowrap; }
.directory-sidebar { width: 30%; flex-shrink: 0; position: sticky; top: 80px; }
.directory-sidebar h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.directory-sidebar ul { list-style: none; padding: 0; margin: 0; }
.directory-sidebar li a { display: block; padding: 0.35rem 0; font-size: 0.85rem; color: var(--color-muted); text-decoration: none; line-height: 1.3; }
.directory-sidebar li a:hover { color: var(--color-primary); }
.directory-sidebar li a.active { color: var(--color-primary); font-weight: 600; }
.sidebar-count { font-size: 0.75rem; color: var(--color-subtle); }
.sidebar-clear { display: inline-block; margin-top: 0.75rem; font-size: 0.85rem; color: var(--color-primary); }
.directory-main { flex: 1; min-width: 0; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.5rem 0; }

/* --- Therapist Cards (Find a Therapist) --- */
.therapist-cards { display: flex; flex-direction: column; gap: 1rem; }
.therapist-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: box-shadow var(--transition), border-color var(--transition);
}
.therapist-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}
.therapist-card-header { margin-bottom: 0.5rem; }
.therapist-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.therapist-card-name:hover { color: var(--color-primary); }
.therapist-card-credentials {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: 0.125rem;
}
.therapist-card-bio {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.625rem;
}
.therapist-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
    margin-bottom: 0.625rem;
}
.therapist-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin-bottom: 0.75rem;
}
.therapist-card-details span:not(:last-child)::after {
    content: " · ";
    margin-left: 0.25rem;
}
.therapist-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.btn-disabled {
    background: var(--color-bg);
    color: var(--color-subtle);
    border: 1px solid var(--color-border);
    cursor: default;
    pointer-events: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .navbar .container { flex-wrap: wrap; gap: 0.5rem; }
    .nav-links { flex-wrap: wrap; gap: 0.125rem; }
    .nav-links a { font-size: 0.8rem; padding: 0.3rem 0.5rem; }
    .hero { padding: 3.5rem 1.25rem 3rem; }
    .hero h1 { font-size: 2rem; }
    .hero-sub { font-size: 0.95rem; }
    .btn-hero-primary, .btn-hero-outline { width: 100%; justify-content: center; font-size: 0.95rem; }
    .cta-group { flex-direction: column; align-items: stretch; max-width: 320px; margin-left: auto; margin-right: auto; }
    .features { padding: 3rem 0 4rem; }
    .features-heading { margin-bottom: 2rem; }
    .workflow-tracker { padding: 1.5rem 1rem; }
    .q-card-body { padding: 1.5rem 1.25rem 1rem; }
    .q-card-footer { padding: 0.75rem 1.25rem; flex-wrap: wrap; gap: 0.5rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .directory-layout { flex-direction: column; }
    .directory-sidebar { max-width: 100%; position: static; flex-basis: auto; }
    .listing-layout { flex-direction: column; }
    .listing-sidebar { width: 100%; position: static; order: 2; }
    .listing-hero { flex-direction: column; align-items: center; text-align: center; }
    .listing-hero-tags { justify-content: center; }
    .listing-location-line { justify-content: center; }
    .listing-photo, .listing-photo-placeholder { width: 110px; height: 136px; }
    .directory-sidebar ul { display: flex; flex-wrap: wrap; gap: 0.375rem; }
    .directory-sidebar li a { padding: 0.3rem 0.65rem; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-full); font-size: 0.75rem; white-space: nowrap; }
    .directory-sidebar li a.active { background: var(--color-primary-light); border-color: var(--color-primary); }
    .flex-between { flex-wrap: wrap; gap: 0.75rem; }
}

/* ============================================================
   Search & Filters (sf- prefix)
   ============================================================ */

/* --- Hero --- */
.sf-hero {
    padding: 3.5rem 1.5rem 3rem;
    text-align: center;
    background: linear-gradient(170deg, #f8faff 0%, var(--color-primary-light) 50%, var(--color-bg) 100%);
    border-radius: var(--radius-lg);
}
.sf-hero-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.6rem; color: var(--color-text); }
.sf-hero-subtitle { font-size: 1.1rem; color: var(--color-muted); margin-bottom: 2.5rem; line-height: 1.6; }

.sf-hero-form { max-width: 580px; margin: 0 auto; }
.sf-hero-input-wrap {
    display: flex;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 0.35rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}
.sf-hero-input {
    flex: 1; border: none; padding: 1rem 1.25rem; font-size: 1.05rem;
    border-radius: var(--radius); outline: none; background: transparent;
    color: var(--color-text); font-family: inherit;
}
.sf-hero-input::placeholder { color: var(--color-subtle); }
.sf-hero-btn { border-radius: var(--radius) !important; padding: 1rem 2rem !important; font-size: 1rem !important; }

.sf-hero-shortcuts { margin-top: 1.5rem; font-size: 0.85rem; color: var(--color-subtle); }
.sf-hero-shortcuts a { color: var(--color-muted); margin: 0 0.35rem; text-decoration: none; }
.sf-hero-shortcuts a:hover { color: var(--color-primary); text-decoration: underline; }

.sf-trust-bar {
    display: flex; justify-content: center; gap: 3rem; padding: 1.5rem 1rem;
    font-size: 0.88rem; color: var(--color-muted); border-bottom: 1px solid var(--color-border);
}
.sf-trust-bar strong { color: var(--color-text-secondary); }

/* --- Compact search bar (results page) --- */
.sf-search-bar { padding: 1.5rem 0 0.5rem; }
.sf-search-form { max-width: 520px; }
.sf-search-input-wrap {
    display: flex;
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 0.25rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
}
.sf-search-input {
    flex: 1; border: none; padding: 0.65rem 0.9rem; font-size: 0.95rem;
    border-radius: var(--radius); outline: none; background: transparent;
    color: var(--color-text); font-family: inherit;
}
.sf-search-input::placeholder { color: var(--color-subtle); }
.sf-search-btn { border-radius: var(--radius) !important; }

/* --- Filter pills + dropdowns --- */
.sf-filters { padding: 1rem 0 0.5rem; }
.sf-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.sf-pills-label {
    font-size: 0.88rem; font-weight: 600; color: var(--color-muted);
    margin-right: 0.25rem; white-space: nowrap;
}

.sf-pill-wrap { position: relative; }
.sf-pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 1.1rem; border-radius: var(--radius-full);
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    background: var(--color-surface); border: 1.5px solid var(--color-border);
    color: var(--color-text-secondary); transition: all 0.15s;
    font-family: inherit; white-space: nowrap;
    box-shadow: var(--shadow-xs);
}
.sf-pill:hover, .sf-pill-open {
    border-color: var(--color-primary); color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
.sf-pill-has {
    background: var(--color-primary-light); border-color: var(--color-primary);
    color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light);
}
.sf-caret {
    width: 14px; height: 14px; color: var(--color-subtle);
    flex-shrink: 0; transition: transform 0.15s;
}
.sf-pill-open .sf-caret { color: var(--color-primary); transform: rotate(180deg); }
.sf-pill-has .sf-caret { color: var(--color-primary); }

/* Dropdown */
.sf-dd {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 30;
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    min-width: 280px;
}
.sf-dd-open { display: block; }
.sf-dd-wide { min-width: 340px; }
.sf-dd-narrow { min-width: 180px; }
.sf-dd-body { max-height: 340px; overflow-y: auto; padding: 0.5rem 0; }
.sf-dd-group {
    padding: 0.6rem 1rem 0.25rem; font-size: 0.7rem; font-weight: 600;
    color: var(--color-subtle); text-transform: uppercase; letter-spacing: 0.04em;
}
.sf-dd-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.5rem 1rem; font-size: 0.88rem; cursor: pointer;
    color: var(--color-text-secondary); border-radius: 6px;
    margin: 0 0.35rem; transition: background 0.1s;
}
.sf-dd-item:hover { background: var(--color-border-light); }
.sf-dd-item input { display: none; }

.sf-ck, .sf-rd {
    width: 17px; height: 17px; border: 1.5px solid var(--color-border);
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    transition: all 0.1s;
}
.sf-ck { border-radius: 4px; }
.sf-rd { border-radius: 50%; }
.sf-dd-item input:checked + .sf-ck { background: var(--color-primary); border-color: var(--color-primary); }
.sf-dd-item input:checked + .sf-ck::after { content: '\2713'; color: #fff; font-size: 0.6rem; font-weight: 700; }
.sf-dd-item input:checked + .sf-rd { border-color: var(--color-primary); }
.sf-dd-item input:checked + .sf-rd::after {
    content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary);
}

.sf-dd-foot {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.6rem 1rem; border-top: 1px solid var(--color-border-light);
}
.sf-dd-foot a { font-size: 0.82rem; color: var(--color-muted); text-decoration: none; }
.sf-dd-foot a:hover { color: var(--color-primary); }
.sf-dd-foot .btn { margin-left: auto; }

/* Selected tags in columns */
.sf-tags-grid {
    display: flex; gap: 2rem; margin-top: 0.75rem;
    padding-top: 0.75rem; border-top: 1px solid var(--color-border-light);
}
.sf-tags-col { display: flex; flex-direction: column; gap: 0.3rem; }
.sf-tags-col-clear { justify-content: flex-end; }
.sf-tags-label {
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--color-subtle); margin-bottom: 0.15rem;
}
.sf-tag {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.3rem 0.65rem; border-radius: var(--radius-full);
    font-size: 0.8rem; font-weight: 500;
    background: var(--color-primary-light); color: var(--color-primary);
}
.sf-tag-x {
    background: none; border: none; color: var(--color-primary);
    font-size: 1rem; cursor: pointer; padding: 0; line-height: 1;
    opacity: 0.6; font-family: inherit;
}
.sf-tag-x:hover { opacity: 1; }
.sf-tags-clear {
    font-size: 0.8rem; color: var(--color-muted); text-decoration: none; margin-left: 0.25rem;
}
.sf-tags-clear:hover { color: var(--color-primary); }

/* --- Results header --- */
.sf-results-header { padding: 1.25rem 0 0.25rem; }
.sf-results-title { font-size: 1.3rem; font-weight: 700; color: var(--color-text); }
.sf-results-count { font-size: 0.88rem; color: var(--color-muted); margin-top: 0.2rem; }

/* --- Result cards --- */
.sf-results-list { padding: 1rem 0 2rem; }
.sf-result-card {
    display: flex; gap: 1.1rem; padding: 1.15rem 1.25rem;
    margin-bottom: 0.65rem; border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    background: var(--color-surface);
    transition: all 0.15s; text-decoration: none; color: inherit;
}
.sf-result-card:hover {
    border-color: #c7d2fe; box-shadow: 0 3px 12px rgba(124,58,237,0.07);
    text-decoration: none;
}
.sf-result-photo {
    width: 56px; height: 56px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0; background: var(--color-border-light);
}
.sf-result-avatar {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--color-primary-light);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--color-primary); font-size: 1.05rem;
    flex-shrink: 0; text-transform: uppercase;
}
.sf-result-info { flex: 1; min-width: 0; }
.sf-result-name { font-weight: 600; font-size: 1rem; color: var(--color-text); }
.sf-result-credential { font-size: 0.85rem; color: var(--color-muted); margin-top: 0.1rem; }
.sf-result-location { font-size: 0.85rem; color: var(--color-subtle); margin-top: 0.2rem; }
.sf-result-tags { margin-top: 0.45rem; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.sf-result-insurance { margin-top: 0.4rem; }
.sf-result-insurance-text { font-size: 0.8rem; color: var(--color-muted); }

.tag-insurance {
    background: #ecfdf5; color: #059669; font-weight: 500;
}
.tag-muted { background: var(--color-border-light); color: var(--color-subtle); }

/* --- Mobile --- */
@media (max-width: 768px) {
    .sf-hero { padding: 2.5rem 1rem 2rem; }
    .sf-hero-title { font-size: 1.5rem; }
    .sf-hero-subtitle { font-size: 0.9rem; }
    .sf-hero-input-wrap { flex-direction: column; gap: 0.35rem; padding: 0.35rem; }
    .sf-hero-btn { width: 100% !important; }
    .sf-trust-bar { gap: 1.25rem; font-size: 0.75rem; flex-wrap: wrap; justify-content: center; }

    .sf-dd {
        position: fixed; top: auto; bottom: 0; left: 0; right: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        min-width: auto; max-height: 60vh;
    }
    .sf-dd-body { max-height: 45vh; }
    .sf-tags-grid { flex-direction: column; gap: 0.75rem; }

    .sf-result-card { padding: 0.85rem 0.5rem; gap: 0.75rem; }
    .sf-result-avatar { width: 40px; height: 40px; font-size: 0.82rem; }
    .sf-result-name { font-size: 0.9rem; }
}

/* --- Auth Pages --- */
.auth-page { min-height: calc(100vh - 56px); display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: var(--shadow-md); }
.auth-card h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.375rem; }
.auth-card .auth-sub { color: var(--color-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.auth-form-group { margin-bottom: 1.25rem; }
.auth-form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 0.4rem; }
.auth-form-group input { width: 100%; padding: 0.75rem 1rem; border: 1.5px solid var(--color-border); border-radius: var(--radius); font-size: 0.9rem; font-family: inherit; color: var(--color-text); background: var(--color-bg); transition: border-color var(--transition), box-shadow var(--transition); }
.auth-form-group input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.08); background: var(--color-surface); }
.auth-submit { width: 100%; padding: 0.875rem; border-radius: var(--radius-full); background: #1a1a1a; color: #fff; font-size: 0.95rem; font-weight: 700; border: none; cursor: pointer; transition: background var(--transition), transform var(--transition); margin-top: 0.5rem; }
.auth-submit:hover { background: #333; transform: translateY(-1px); }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--color-muted); }
.auth-footer a { color: var(--color-primary); font-weight: 500; }
