/* =============================================
   ORIENTATION MEDICALE - SENEGAL
   NIAKS TECH - Saly
   Apple-level Medical Design - Light Mode
   ============================================= */

:root {
  --bg: #FFFFFF;
  --bg-secondary: #F8FAFB;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --green: #00853F;
  --green-light: #E8F5EE;
  --green-dark: #006B32;
  --gold: #D4AF37;
  --red: #DC2626;
  --red-light: #FEE2E2;
  --orange: #EA580C;
  --orange-light: #FFF7ED;
  --yellow: #F59E0B;
  --yellow-light: #FEF3C7;
  --blue: #2563EB;
  --blue-light: #EFF6FF;
  --border: #E5E7EB;
  --border-focus: #00853F;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-xl: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 50px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
}

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

html, body {
  width: 100%; height: 100vh; height: 100dvh;
  overflow: hidden;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: 'Poppins', system-ui, -apple-system, Roboto, sans-serif;
  font-size: 15px; line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* ── SCREENS ── */
.screen {
  position: fixed; top: 0; left: 0; right: 0;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(12px + var(--safe-top)) 0 20px;
  display: none; opacity: 0;
  transition: opacity 0.2s ease;
}
.screen.active { display: block; opacity: 1 }
.screen.fullscreen { bottom: 0 }

.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 16px }

.screen-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  margin-bottom: 14px;
}

/* ── SPLASH ── */
#splash {
  bottom: 0; display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
#splash.active { display: flex }
.splash-inner { text-align: center }
.splash-icon { font-size: 56px; margin-bottom: 20px }
.splash-title { font-size: 26px; font-weight: 700; color: var(--text-primary); line-height: 1.2 }
.splash-sub { font-size: 13px; color: var(--green); margin-top: 8px; letter-spacing: 3px; text-transform: uppercase; font-weight: 600 }
.splash-loader { width: 100px; height: 3px; background: var(--border); border-radius: 2px; margin: 32px auto 0; overflow: hidden }
.splash-bar { width: 0; height: 100%; background: var(--green); border-radius: 2px; animation: splashLoad 1.6s ease-in-out forwards }
@keyframes splashLoad { to { width: 100% } }
.splash-credit { font-size: 11px; color: var(--text-muted); margin-top: 48px; letter-spacing: 2px }

/* ── TYPOGRAPHY ── */
.section-title { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px }
.section-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6 }
.section-header { margin-bottom: 18px }

/* ── LOGO ── */
.logo-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; padding-top: 8px }
.logo-icon { font-size: 28px }
.logo-text { font-size: 15px; font-weight: 700; color: var(--text-primary) }
.logo-text span { color: var(--green) }

/* ── FEATURES ── */
.features { display: flex; gap: 10px; margin-bottom: 24px }
.feat {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; background: var(--bg-secondary); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.feat-icon { font-size: 24px }
.feat-label { font-size: 11px; color: var(--text-secondary); text-align: center; font-weight: 500 }

/* ── BUTTONS ── */
.btn-primary {
  display: block; width: 100%; padding: 18px 0; border: none;
  background: var(--green); color: #fff;
  font-family: inherit; font-size: 16px; font-weight: 700; letter-spacing: 0.5px;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background 0.15s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:active { background: var(--green-dark); transform: scale(0.98) }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed }

.btn-secondary {
  display: block; width: 100%; padding: 16px 0;
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text-secondary); font-family: inherit; font-size: 14px; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:active { background: var(--bg-secondary) }

.btn-link { background: none; border: none; color: var(--green); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px }
.btn-link-muted { background: none; border: none; color: var(--text-muted); font-family: inherit; font-size: 13px; cursor: pointer; padding: 4px; text-decoration: none }

.btn-back {
  background: none; border: none; color: var(--text-primary);
  font-size: 20px; cursor: pointer; padding: 8px 4px; margin-bottom: 4px;
}

.btn-danger {
  display: block; width: 100%; padding: 14px 0;
  border: 1.5px solid var(--red); background: var(--bg);
  color: var(--red); font-family: inherit; font-size: 14px; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer; margin-top: 12px;
}

/* ── FORM ── */
.form-group { margin-bottom: 18px }
.input-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.3px;
}
.input-field {
  display: block; width: 100%; padding: 16px;
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 15px;
  color: var(--text-primary); outline: none; transition: border-color 0.2s;
  -webkit-appearance: none; appearance: none;
}
.input-field:focus { border-color: var(--green) }
.input-field::placeholder { color: var(--text-muted) }

select.input-field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239CA3AF' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
textarea.input-field { resize: vertical; min-height: 100px }
input[type="file"].input-field { padding: 12px; font-size: 13px }

.input-error { border-color: var(--red) !important }
.field-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px }
.field-error { font-size: 11px; color: var(--red); margin-top: 4px; display: none }

/* ── PHONE INPUT ── */
.phone-wrap {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-secondary); overflow: hidden; transition: border-color 0.2s;
}
.phone-wrap:focus-within { border-color: var(--green) }
.phone-prefix {
  padding: 16px 12px 16px 16px; font-size: 15px; font-weight: 600;
  color: var(--text-secondary); background: transparent; white-space: nowrap;
  border-right: 1px solid var(--border);
}
.phone-input {
  flex: 1; padding: 16px 16px 16px 12px; border: none; background: transparent;
  font-family: inherit; font-size: 15px; color: var(--text-primary); outline: none;
  letter-spacing: 1px;
}
.phone-input::placeholder { color: var(--text-muted); letter-spacing: 0 }

/* ── OTP ── */
.otp-wrap { display: flex; gap: 12px; justify-content: center; margin: 20px 0 }
.otp-digit {
  width: 56px; height: 64px; text-align: center;
  font-size: 24px; font-weight: 700; font-family: inherit;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-secondary); color: var(--text-primary); outline: none;
}
.otp-digit:focus { border-color: var(--green) }

/* ── INTENSITY ── */
.intensity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.intensity-btn {
  padding: 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg);
  font-family: inherit; font-size: 14px; font-weight: 600;
  text-align: center; cursor: pointer; transition: all 0.15s; color: var(--text-secondary);
}
.intensity-btn.selected { font-weight: 700 }
.intensity-btn[data-val="faible"].selected { background: var(--green-light); border-color: var(--green); color: var(--green) }
.intensity-btn[data-val="moderee"].selected { background: var(--yellow-light); border-color: var(--yellow); color: #92400E }
.intensity-btn[data-val="forte"].selected { background: var(--orange-light); border-color: var(--orange); color: var(--orange) }
.intensity-btn[data-val="tres_forte"].selected { background: var(--red); border-color: var(--red); color: #fff }

/* ── URGENCE ALERT ── */
.urgence-alert {
  display: none; padding: 14px 16px;
  background: var(--red-light); border: 1.5px solid var(--red);
  border-radius: var(--radius-sm); margin-bottom: 16px;
}
.urgence-alert.show { display: block }
.urgence-alert p { font-size: 13px; color: #991B1B; font-weight: 500; margin-bottom: 10px }
.btn-urgence {
  display: inline-block; padding: 10px 20px;
  background: var(--red); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; text-decoration: none;
}

/* ── LEGAL ── */
.legal-box {
  background: #FFFBEB; border: 1px solid #FDE68A;
  border-radius: var(--radius-sm); padding: 14px 16px;
  margin: 16px 0; font-size: 12px; color: #92400E; line-height: 1.5;
}
.legal-box strong { color: #78350F }
.legal-note { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 16px; line-height: 1.5 }

.checkbox-wrap {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; font-size: 13px; color: var(--text-secondary); margin: 16px 0;
}
.checkbox-wrap input { margin-top: 3px; accent-color: var(--green); width: 18px; height: 18px }
.checkbox-wrap a { color: var(--green); font-weight: 600 }

/* ── PAIEMENT ── */
.prix-card {
  text-align: center; padding: 28px 20px;
  background: var(--green-light); border-radius: var(--radius); margin-bottom: 20px;
}
.prix-montant { font-size: 40px; font-weight: 700; color: var(--green) }
.prix-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px }

.pay-btns { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px }
.btn-pay {
  width: 100%; padding: 18px; border: none; border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit; font-size: 16px; font-weight: 700; color: #fff;
  transition: transform 0.08s;
}
.btn-pay:active { transform: scale(0.98) }
.btn-pay.wave { background: #1DC3F0 }
.btn-pay.om { background: #FF6600 }

/* ── CONFIRMATION / STATUS ── */
.confirm-icon { font-size: 56px; margin-bottom: 16px; text-align: center }
.status-card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; background: var(--green-light);
  border-radius: var(--radius-sm); margin: 20px 0;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex-shrink: 0 }
.status-dot.pulse { animation: pulse 1.5s ease infinite }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.3 } }
.status-text { font-size: 14px; color: var(--text-secondary) }
.ref-text { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 16px }

.progress-bar-wrap { height: 4px; background: var(--border); border-radius: 2px; margin: 12px 0; overflow: hidden }
.progress-bar-fill { height: 100%; background: var(--green); border-radius: 2px; width: 0; animation: progressAnim 1800s linear forwards }
@keyframes progressAnim { to { width: 100% } }

.wait-estimate { font-size: 13px; color: var(--text-muted); text-align: center }

/* ── REPONSE ── */
.urgence-badge {
  display: inline-block; padding: 6px 20px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px;
}
.urgence-badge.faible { background: var(--green-light); color: var(--green) }
.urgence-badge.modere { background: var(--blue-light); color: var(--blue) }
.urgence-badge.urgent { background: var(--orange-light); color: var(--orange) }
.urgence-badge.tres_urgent { background: var(--red-light); color: var(--red) }

.reponse-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.rep-section { margin-bottom: 18px }
.rep-section:last-of-type { margin-bottom: 0 }
.rep-section h3 { font-size: 11px; color: var(--green); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; margin-bottom: 6px }
.rep-section p { font-size: 14px; color: var(--text-primary); line-height: 1.6 }
.rep-medecin {
  display: flex; align-items: center; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--border); margin-top: 18px;
}
.rep-doc-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--green-light); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0 }
.rep-doc-info { display: flex; flex-direction: column }
.rep-doc-name { font-size: 14px; font-weight: 600; color: var(--text-primary) }
.rep-doc-spec { font-size: 12px; color: var(--text-muted) }

.btn-share {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; border: 1.5px solid var(--green);
  background: var(--bg); color: var(--green); font-family: inherit;
  font-size: 14px; font-weight: 600; border-radius: var(--radius-sm);
  cursor: pointer; margin-top: 12px;
}

/* ── NOTATION / STARS ── */
.rating-group { margin-bottom: 20px; text-align: center }
.rating-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; display: block; font-weight: 500 }
.stars { display: flex; justify-content: center; gap: 8px }
.star {
  font-size: 36px; color: var(--border); cursor: pointer;
  transition: color 0.12s, transform 0.1s;
}
.star:active { transform: scale(1.15) }
.star.filled { color: var(--gold) }

/* ── HISTORIQUE ── */
.hist-list { margin-top: 8px }
.hist-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 10px; cursor: pointer;
  transition: box-shadow 0.15s;
}
.hist-item:active { box-shadow: var(--shadow-lg) }
.hist-left { flex: 1; min-width: 0 }
.hist-symptom { font-size: 14px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.hist-date { font-size: 12px; color: var(--text-muted); margin-top: 2px }
.hist-badge {
  font-size: 11px; padding: 4px 12px; border-radius: var(--radius-pill); font-weight: 600; flex-shrink: 0; margin-left: 10px;
}
.hist-badge.en_attente { background: var(--yellow-light); color: #92400E }
.hist-badge.en_cours { background: var(--blue-light); color: var(--blue) }
.hist-badge.repondu { background: var(--green-light); color: var(--green) }
.empty-state { text-align: center; color: var(--text-muted); font-size: 14px; padding: 48px 0 }
.empty-icon { font-size: 40px; margin-bottom: 12px; display: block }

/* ── PROFIL ── */
.profil-header {
  display: flex; flex-direction: column; align-items: center; padding: 28px 0 20px;
}
.profil-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--green-light); display: flex; align-items: center;
  justify-content: center; font-size: 32px; margin-bottom: 12px;
}
.profil-name { font-size: 18px; font-weight: 700; color: var(--text-primary) }
.profil-phone { font-size: 13px; color: var(--text-muted) }

.profil-stats {
  display: flex; gap: 1px; background: var(--border);
  border-radius: var(--radius-sm); overflow: hidden; margin: 16px 0;
}
.profil-stat {
  flex: 1; text-align: center; padding: 14px 8px; background: var(--bg-card);
}
.profil-stat-val { font-size: 20px; font-weight: 700; color: var(--green) }
.profil-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px }

.profil-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.profil-row-label { font-size: 14px; color: var(--text-secondary) }
.profil-row-val { font-size: 14px; font-weight: 500; color: var(--text-primary) }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  background: var(--bg); border-top: 1px solid var(--border);
  display: none; align-items: flex-start; justify-content: space-around;
  padding-top: 8px; padding-bottom: var(--safe-bottom);
  z-index: 100;
}
.bottom-nav.show { display: flex }
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; padding: 4px 16px; background: none; border: none;
  font-family: inherit; -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: var(--green) }
.nav-icon { font-size: 22px; line-height: 1 }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 16px + var(--safe-bottom)); left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text-primary); color: #fff;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; box-shadow: var(--shadow-xl);
  opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 999; pointer-events: none; white-space: nowrap; max-width: 90%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) }

/* ── CENTER HELPER ── */
.center-content { display: flex; flex-direction: column; align-items: center; text-align: center }

/* ══════════════════════════════════════
   TRIAGE WIZARD
   ══════════════════════════════════════ */

/* ── WIZARD STEPPER ── */
.wizard-progress { display: flex; align-items: center; gap: 0; margin-bottom: 20px; padding: 0 4px }
.wizard-step-dot {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-muted); background: var(--bg);
  flex-shrink: 0; transition: all 0.2s;
}
.wizard-step-dot.active { border-color: var(--green); color: #fff; background: var(--green) }
.wizard-step-dot.done { border-color: var(--green); color: #fff; background: var(--green) }
.wizard-step-line { flex: 1; height: 2px; background: var(--border); transition: background 0.2s }
.wizard-step-line.done { background: var(--green) }

/* ── WIZARD PANELS ── */
.wizard-panel { display: none; animation: wzFadeIn 0.25s ease }
.wizard-panel.active { display: block }
@keyframes wzFadeIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) } }

.wizard-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px }
.wizard-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.5 }

/* ── WIZARD NAV BUTTONS ── */
.wizard-nav { display: flex; gap: 10px; margin-top: 20px }
.wizard-nav .btn-primary { flex: 1 }
.wizard-nav .btn-secondary { flex: 0 0 auto; width: auto; padding: 16px 24px }

/* ── BODY SYSTEM GRID ── */
.body-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.body-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px; background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s;
  text-align: center;
}
.body-card:active { transform: scale(0.97) }
.body-card.selected { border-color: var(--green); background: var(--green-light); box-shadow: 0 0 0 2px var(--green-light) }
.body-card-icon { font-size: 28px; line-height: 1 }
.body-card-label { font-size: 12px; font-weight: 600; color: var(--text-primary); line-height: 1.2 }
.body-card-desc { font-size: 10px; color: var(--text-muted); line-height: 1.3; display: none }
.body-card.selected .body-card-desc { display: block }

/* ── SYMPTOM CHECKLIST ── */
.symptom-list { display: flex; flex-direction: column; gap: 8px }
.symptom-check {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.symptom-check:active { background: var(--bg-secondary) }
.symptom-check.checked { border-color: var(--green); background: var(--green-light) }
.symptom-check-box {
  width: 22px; height: 22px; border: 2px solid var(--border); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.12s; font-size: 14px; color: transparent;
}
.symptom-check.checked .symptom-check-box { border-color: var(--green); background: var(--green); color: #fff }
.symptom-check-text { font-size: 14px; color: var(--text-primary); line-height: 1.3 }

/* ── RED FLAG LIST ── */
.redflag-list { display: flex; flex-direction: column; gap: 8px }
.redflag-check {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: #FFF5F5; border: 1.5px solid #FCA5A5;
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.12s;
}
.redflag-check.checked { border-color: var(--red); background: var(--red-light) }
.redflag-check-box {
  width: 22px; height: 22px; border: 2px solid #FCA5A5; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.12s; font-size: 14px; color: transparent;
}
.redflag-check.checked .redflag-check-box { border-color: var(--red); background: var(--red); color: #fff }
.redflag-check-text { font-size: 13px; color: #991B1B; line-height: 1.3; font-weight: 500 }

.redflag-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--red-light); border-radius: var(--radius-sm);
  margin-bottom: 12px; font-size: 13px; font-weight: 600; color: #991B1B;
}

/* ── CONTEXT QUESTION ── */
.ctx-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.ctx-choice {
  padding: 14px 12px; background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; text-align: center;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-secondary);
  transition: all 0.12s;
}
.ctx-choice:active { transform: scale(0.97) }
.ctx-choice.selected { border-color: var(--green); background: var(--green-light); color: var(--green) }
.ctx-choices.single-col { grid-template-columns: 1fr }

.ctx-multi { display: flex; flex-wrap: wrap; gap: 8px }
.ctx-tag {
  padding: 10px 16px; background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-pill); cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text-secondary);
  transition: all 0.12s;
}
.ctx-tag.selected { border-color: var(--green); background: var(--green-light); color: var(--green) }

/* ── TRIAGE RESULT CARD ── */
.triage-result {
  border-radius: var(--radius); padding: 24px 20px; margin-bottom: 16px;
  text-align: center; border: 2px solid;
}
.triage-result.P1 { background: #FEE2E2; border-color: #DC2626 }
.triage-result.P2 { background: #FFF7ED; border-color: #EA580C }
.triage-result.P3 { background: #FEF3C7; border-color: #F59E0B }
.triage-result.P4 { background: #E8F5EE; border-color: #00853F }
.triage-level-badge {
  display: inline-block; padding: 6px 24px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: #fff; margin-bottom: 8px;
}
.triage-level-badge.P1 { background: #DC2626 }
.triage-level-badge.P2 { background: #EA580C }
.triage-level-badge.P3 { background: #F59E0B }
.triage-level-badge.P4 { background: #00853F }
.triage-delai { font-size: 14px; font-weight: 600; margin-bottom: 4px }
.triage-reasons { font-size: 12px; color: var(--text-secondary); text-align: left; margin-top: 12px; line-height: 1.6 }
.triage-reasons li { margin-bottom: 2px }

/* ── TRIAGE ALERT (P1 fullscreen) ── */
.triage-p1-alert {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: #DC2626; color: #fff; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 32px;
}
.triage-p1-alert.show { display: flex }
.triage-p1-alert-icon { font-size: 64px; margin-bottom: 16px; animation: pulseAlert 1s infinite }
@keyframes pulseAlert { 0%,100% { transform: scale(1) } 50% { transform: scale(1.1) } }
.triage-p1-alert h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px }
.triage-p1-alert p { font-size: 16px; opacity: 0.9; margin-bottom: 24px; max-width: 320px }
.triage-p1-alert .btn-call {
  display: inline-block; padding: 18px 40px; background: #fff; color: #DC2626;
  font-size: 20px; font-weight: 700; border-radius: var(--radius-sm);
  text-decoration: none; margin-bottom: 12px;
}
.triage-p1-alert .btn-dismiss {
  background: none; border: 1px solid rgba(255,255,255,0.4); color: #fff;
  padding: 12px 32px; border-radius: var(--radius-sm); font-family: inherit;
  font-size: 14px; cursor: pointer; margin-top: 8px;
}

/* ── DOCTOR TRIAGE VIEW ── */
.doc-triage-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 16px;
}
.doc-triage-banner.P1 { background: #FEE2E2; border: 1.5px solid #DC2626 }
.doc-triage-banner.P2 { background: #FFF7ED; border: 1.5px solid #EA580C }
.doc-triage-banner.P3 { background: #FEF3C7; border: 1.5px solid #F59E0B }
.doc-triage-banner.P4 { background: #E8F5EE; border: 1.5px solid #00853F }
.doc-triage-level { font-size: 14px; font-weight: 700 }
.doc-triage-delai { font-size: 12px; color: var(--text-secondary) }

.doc-summary-section { margin-bottom: 14px }
.doc-summary-label {
  font-size: 10px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1px; font-weight: 700; margin-bottom: 4px;
}
.doc-summary-val { font-size: 13px; color: var(--text-primary); line-height: 1.5 }
.doc-redflag-tag {
  display: inline-block; padding: 4px 10px; background: var(--red-light);
  color: var(--red); font-size: 11px; font-weight: 600; border-radius: var(--radius-pill);
  margin: 2px 4px 2px 0;
}
.doc-symptom-tag {
  display: inline-block; padding: 4px 10px; background: var(--bg-secondary);
  color: var(--text-secondary); font-size: 11px; font-weight: 500; border-radius: var(--radius-pill);
  margin: 2px 4px 2px 0;
}

/* ══════ LANGUAGE SWITCHER ══════ */
.auth-lang-bar { display: flex; justify-content: flex-end; gap: 6px; padding: 12px 0 0 }
.lang-btn-mini {
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  color: var(--text-secondary); font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: var(--radius-pill); cursor: pointer;
  transition: all 0.15s;
}
.lang-btn-mini.active { background: var(--green); color: #fff; border-color: var(--green) }

.lang-switcher { display: flex; gap: 6px }
.lang-btn {
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  color: var(--text-secondary); font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: var(--radius-pill); cursor: pointer;
  transition: all 0.15s;
}
.lang-btn.active { background: var(--green); color: #fff; border-color: var(--green) }

/* ══════ AUDIO TOGGLE ══════ */
.audio-toggle {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-secondary); border: 1.5px solid var(--border);
  color: var(--text-secondary); font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius-pill); cursor: pointer;
  transition: all 0.15s;
}
.audio-toggle.active { background: var(--green-light); border-color: var(--green); color: var(--green) }
.audio-toggle-icon { font-size: 16px }

/* ══════ AUDIO BUTTON (inline) ══════ */
.btn-audio {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green-light); border: none; cursor: pointer;
  font-size: 18px; color: var(--green); transition: all 0.15s;
  flex-shrink: 0; margin-left: 8px;
}
.btn-audio:active { background: var(--green); color: #fff }
.btn-audio.hidden { display: none }

/* ── RESPONSIVE ── */
@media (max-width: 360px) {
  .section-title { font-size: 19px }
  .btn-primary { font-size: 15px; padding: 16px 0 }
  .otp-digit { width: 48px; height: 56px; font-size: 20px }
  .feat-label { font-size: 10px }
}
@media (min-width: 600px) {
  .container { max-width: 480px }
}
