  :root {
    --primary: #057571;
    --primary-dark: #045a57;
    --primary-light: #e0f2f1;
    --secondary: #339c98;
    --secondary-light: #eaf7f7;
    --accent: #e28e2d;
    --accent-light: #fef3e2;
    --accent2: #ffa100;
    --white: #ffffff;
    --bg: #f8fafa;
    --text: #1a2e2d;
    --text-muted: #5a7a79;
    --text-light: #8faead;
    --border: #d0e8e7;
    --border-soft: #e8f4f3;
    --danger: #c0392b;
    --danger-light: #fdf0ee;
    --success: #057571;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-card: 0 2px 20px rgba(5,117,113,0.08);
    --shadow-elevated: 0 8px 40px rgba(5,117,113,0.14);
  }

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

  body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
  }

  /* ─── Top Nav ─── */
  .topnav {
    background: var(--white);
    border-bottom: 1px solid var(--border-soft);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .logo-mark {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
  }
  .logo-mark svg { width: 20px; height: 20px; fill: white; }
  .logo-text { font-family: 'Lora', serif; font-size: 17px; color: var(--primary); font-weight: 600; }
  .logo-sub { font-size: 11px; color: var(--text-muted); letter-spacing: 0.04em; text-transform: uppercase; display: block; line-height: 1; }

  .nav-tabs { display: flex; gap: 4px; }
  .nav-tab {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-muted);
    transition: all 0.2s;
  }
  .nav-tab:hover { background: var(--secondary-light); color: var(--primary); }
  .nav-tab.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

  .badge-admin {
    font-size: 11px;
    background: var(--accent-light);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-left: 6px;
  }

  /* ─── Views ─── */
  .view { display: none; }
  .view.active { display: block; }

  /* ─── PATIENT FLOW ─── */
  .flow-wrapper {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
  }
  .flow-bg-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-light);
    opacity: 0.5;
  }
  .flow-bg-circle.c1 { width: 500px; height: 500px; top: -200px; right: -150px; }
  .flow-bg-circle.c2 { width: 300px; height: 300px; bottom: -100px; left: -80px; opacity: 0.3; }

  .flow-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-elevated);
    padding: 3rem 3.5rem;
    max-width: 620px;
    width: 100%;
    position: relative;
    z-index: 1;
  }

  .progress-bar-track {
    height: 4px;
    background: var(--border-soft);
    border-radius: 2px;
    margin-bottom: 2.5rem;
    overflow: hidden;
  }
  .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  }

  .step-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.75rem;
  }
  .step-question {
    font-family: 'Lora', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 0.5rem;
  }
  .step-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 2rem;
  }

  /* Crisis screen */
  .crisis-box {
    background: var(--danger-light);
    border: 1.5px solid #f1a79d;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .crisis-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--danger);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .crisis-number {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: white;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid #f5c5bf;
  }
  .crisis-number .num { font-size: 22px; font-weight: 700; color: var(--danger); letter-spacing: 0.05em; }
  .crisis-number .desc { font-size: 13px; color: var(--text-muted); }

  /* Options grid */
  .options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 1.5rem;
  }
  .options-grid.single-col { grid-template-columns: 1fr; }
  .opt-btn {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: var(--white);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
  }
  .opt-btn .opt-icon { font-size: 20px; flex-shrink: 0; }
  .opt-btn:hover { border-color: var(--secondary); background: var(--secondary-light); }
  .opt-btn.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
  .opt-btn.danger:hover { border-color: var(--danger); background: var(--danger-light); }

  /* Form fields */
  .field-group { margin-bottom: 1.25rem; }
  .field-label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: 0.05em; }
  .field-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.2s;
    outline: none;
  }
  .field-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,117,113,0.1); }

  .checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 1rem;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
  }
  .checkbox-row input[type="checkbox"] { margin-top: 2px; accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }

  .btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.5rem;
  }
  .btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
  .btn-primary:active { transform: translateY(0); }

  .btn-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    margin-top: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: color 0.2s;
  }
  .btn-back:hover { color: var(--primary); }

  .consent-box {
    background: var(--secondary-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
  }
  .consent-box strong { color: var(--text); display: block; margin-bottom: 4px; }

  .soft-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    transition: all 0.2s;
  }
  .soft-tag:hover { border-color: var(--secondary); color: var(--secondary); }
  .soft-tag.selected { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

  .step-hidden { display: none; }

  @keyframes spin { to { transform: rotate(360deg); } }

  .ai-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.18s;
    animation: fadeUp 0.3s ease both;
  }
  .ai-chip:hover { background: var(--primary); color: white; }
  .ai-chip.removed { opacity:0.35; background: var(--white); color: var(--text-muted); border-color: var(--border); text-decoration: line-through; }
  .ai-chip .chip-remove { font-size: 14px; line-height: 1; opacity: 0.6; }
  .ai-chip:hover .chip-remove { opacity: 1; }

  .ai-clinical-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid #f5d9ad;
    margin-left: 2px;
  }

  /* ─── RESULTS VIEW ─── */
  .results-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
  }
  .results-header {
    margin-bottom: 2rem;
  }
  .results-header h1 {
    font-family: 'Lora', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
  }
  .results-header p { color: var(--text-muted); font-size: 15px; }

  .match-banner {
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    font-size: 14px;
    color: var(--primary-dark);
  }
  .match-banner-icon { font-size: 22px; }

  .therapist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
  }

  @keyframes cardIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .therapist-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1.5px solid var(--border-soft);
    overflow: hidden;
    transition: all 0.25s;
    position: relative;
  }
  .therapist-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elevated); border-color: var(--border); }
  .therapist-card.top-match { border-color: var(--primary); }

  .top-match-ribbon {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 14px;
    text-align: center;
  }

  .card-header {
    padding: 1.5rem 1.5rem 1rem;
    display: flex;
    gap: 14px;
    align-items: flex-start;
  }
  .therapist-photo {
    width: 68px; height: 68px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Lora', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--primary);
  }
  .therapist-meta { flex: 1; }
  .therapist-name {
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
    margin-bottom: 2px;
  }
  .therapist-specialty {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
  }
  .rnpi-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--secondary-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.03em;
  }
  .rnpi-badge svg { width: 12px; height: 12px; fill: var(--primary); }

  .card-body { padding: 0 1.5rem 1rem; }
  .therapist-bio {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1rem; }
  .skill-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid #f5d9ad;
  }

  .match-reason {
    background: var(--secondary-light);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }
  .match-reason-icon { flex-shrink: 0; font-size: 15px; margin-top: 1px; }

  .availability-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
  }
  .avail-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ec87a; flex-shrink: 0; }

  .card-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    gap: 10px;
  }
  .btn-whatsapp {
    flex: 1;
    padding: 13px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    text-decoration: none;
  }
  .btn-whatsapp:hover { background: #1dba5a; }
  .btn-whatsapp svg { width: 18px; height: 18px; fill: white; }

  .btn-secondary {
    padding: 13px 16px;
    background: var(--white);
    color: var(--primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
  }
  .btn-secondary:hover { background: var(--primary-light); border-color: var(--primary); }

  /* Match score bar */
  .match-score { padding: 0 1.5rem 0; margin-bottom: 12px; }
  .score-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
  .score-pct { font-weight: 700; color: var(--primary); }
  .score-track { height: 6px; background: var(--border-soft); border-radius: 3px; overflow: hidden; }
  .score-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 3px; }

  /* ─── ADMIN PANEL ─── */
  .admin-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
  }
  .admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
  }
  .admin-header h1 {
    font-family: 'Lora', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
  }
  .admin-header p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

  .admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 2.5rem;
  }
  .stat-card {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-card);
  }
  .stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); font-weight: 600; margin-bottom: 8px; }
  .stat-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
  .stat-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
  .stat-value.accent { color: var(--accent); }
  .stat-value.primary { color: var(--primary); }
  .stat-value.danger { color: var(--danger); }

  .admin-section { margin-bottom: 2.5rem; }
  .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
  }
  .section-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .count-pill {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
  }
  .count-pill.green { background: var(--primary-light); color: var(--primary); }

  .admin-table {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    box-shadow: var(--shadow-card);
  }
  .admin-table table { width: 100%; border-collapse: collapse; }
  .admin-table th {
    background: var(--bg);
    text-align: left;
    padding: 10px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 1px solid var(--border-soft);
  }
  .admin-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
  }
  .admin-table tr:last-child td { border-bottom: none; }
  .admin-table tr:hover td { background: var(--bg); }

  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
  }
  .status-badge.pending { background: var(--accent-light); color: var(--accent); }
  .status-badge.approved { background: var(--primary-light); color: var(--primary); }
  .status-badge.rejected { background: var(--danger-light); color: var(--danger); }
  .status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

  .action-btns { display: flex; gap: 6px; }
  .btn-approve, .btn-reject, .btn-view {
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
  }
  .btn-approve { background: var(--primary-light); color: var(--primary); }
  .btn-approve:hover { background: var(--primary); color: white; }
  .btn-reject { background: var(--danger-light); color: var(--danger); }
  .btn-reject:hover { background: var(--danger); color: white; }
  .btn-view { background: var(--border-soft); color: var(--text-muted); }
  .btn-view:hover { background: var(--border); }
  .btn-delete { background: #fdf0ee; color: var(--danger); }
  .btn-delete:hover { background: var(--danger); color: white; }
  .emoji-opt { font-size:24px;padding:8px;border:1.5px solid var(--border-soft);border-radius:10px;background:var(--white);cursor:pointer;transition:all .15s;line-height:1; }
  .emoji-opt:hover { border-color:var(--primary);background:var(--primary-light);transform:scale(1.1); }

  .therapist-mini { display: flex; align-items: center; gap: 10px; }
  .avatar-mini {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: var(--primary);
    flex-shrink: 0;
  }
  .therapist-mini-name { font-weight: 600; font-size: 14px; }
  .therapist-mini-role { font-size: 12px; color: var(--text-muted); }

  .feedback-row td:first-child { max-width: 220px; }
  .feedback-comment { font-size: 13px; color: var(--text-muted); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
  .stars { color: var(--accent2); font-size: 13px; letter-spacing: 1px; }

  /* Moderator flag */
  .flag-badge { background: #fff3e0; color: #e65100; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }

  /* Privacy Architecture Section */
  .privacy-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .privacy-card {
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-card);
  }
  .privacy-card-title { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
  .privacy-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
  .privacy-icon.teal { background: var(--secondary-light); }
  .privacy-icon.orange { background: var(--accent-light); }
  .privacy-icon.green { background: var(--primary-light); }
  .privacy-icon.red { background: var(--danger-light); }
  .privacy-field { font-size: 13px; color: var(--text-muted); padding: 5px 0; border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; }
  .privacy-field:last-child { border-bottom: none; }
  .privacy-field .field-name { font-weight: 500; color: var(--text); }
  .db-label { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
  .db-label.db-a { background: var(--secondary-light); color: var(--primary); }
  .db-label.db-b { background: var(--accent-light); color: var(--accent); }
  .db-label.hidden { background: #f0f0f0; color: #888; }

  /* Animated entrance */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .flow-card { animation: fadeUp 0.4s ease both; }

  /* Step transition */
  .step-pane { animation: fadeUp 0.3s ease both; }

  /* Tooltip */
  .tooltip-wrap { position: relative; display: inline-block; }
  .tooltip-text {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: white;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 7px;
    white-space: nowrap;
    z-index: 200;
  }
  .tooltip-wrap:hover .tooltip-text { display: block; }

  /* ── RESPONSIVE — Mobile first ─────────────────────────── */
  .nav-slogan { display: block; }
  .nav-tabs-wrap { display: flex; align-items:center; gap:8px; }

  @media (max-width: 768px) {
    .topnav { padding: 0 1rem; height: 64px !important; }
    .logo img { height: 48px !important; }
    .nav-slogan { display: none; }
    .nav-tab { padding: 7px 10px; font-size: 12px; }

    .flow-wrapper { padding: 1rem; align-items: flex-start; padding-top: 1.5rem; }
    .flow-card { padding: 1.75rem 1.25rem; border-radius: var(--radius-lg); }
    .step-question { font-size: 20px; }
    .options-grid { grid-template-columns: 1fr; }

    .results-wrapper { padding: 1.5rem 1rem; }
    .results-header h1 { font-size: 20px; }
    .therapist-grid { grid-template-columns: 1fr; }
    .card-footer { flex-direction: column; }
    .btn-whatsapp, .btn-secondary { width: 100%; text-align: center; justify-content: center; }

    .admin-wrapper { padding: 1.5rem 1rem; }
    .admin-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .admin-header h1 { font-size: 20px; }
    .admin-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-value { font-size: 22px; }
    .admin-table { font-size: 12px; }
    .admin-table th, .admin-table td { padding: 8px 8px; white-space: nowrap; }
    .action-btns { flex-wrap: wrap; gap: 4px; }
    .btn-approve, .btn-reject, .btn-delete, .btn-view { font-size: 11px; padding: 5px 8px; }

    #view-terapeuta div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
    .privacy-cards { grid-template-columns: 1fr; }
    .flow-bg-circle { display: none; }

    /* Resultados header */
    .match-banner { flex-direction: column; gap: 8px; }
  }

  @media (max-width: 480px) {
    .topnav { padding: 0 0.75rem; height: 56px !important; }
    .logo img { height: 38px !important; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .flow-card { padding: 1.5rem 1rem; }
    .step-question { font-size: 18px; }
    .btn-primary { font-size: 15px; padding: 13px; }
    /* Ocultar tabs de paciente/resultados, solo mostrar tuerca */
  }

/* ── Semáforo del monitor (panel admin) ──────────────────────
   Estado base antes de que el JS lo pinte con su color real. */
.sem-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: #f5f5f5;
  border: 1.5px solid #d0d0d0;
  color: #8faead;
}
