:root {
  --bg: #F7F5F0;
  --bg-card: #FFFFFF;
  --text-primary: #2C2A25;
  --text-secondary: #7A756B;
  --text-muted: #B0AA9E;
  --accent: #5B7F6E;
  --accent-soft: #E8F0EB;
  --border: #E8E4DD;
  --shadow-sm: 0 1px 3px rgba(44,42,37,0.04);
  --shadow-lg: 0 8px 32px rgba(44,42,37,0.08);
  --radius: 20px;
  --font-display: 'Fraunces', serif;
  --font-body: 'DM Sans', sans-serif;
  --red: #D45B5B;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  -webkit-font-smoothing: antialiased;
}

.phone-frame {
  width: 100%;
  max-width: 390px;
  height: 90dvh;
  max-height: 844px;
  background: var(--bg);
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
}

@media (max-width: 430px) {
  body { padding: 0; }
  .phone-frame {
    max-width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
}

.status-bar {
  padding: 12px 24px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.header {
  padding: 8px 24px 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.header-logo span { color: var(--accent); }

.header-streak {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.header-streak .dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}

.screen {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.screen.active { display: flex; }

.welcome-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  text-align: center;
}

.welcome-icon {
  width: 72px;
  height: 72px;
  background: var(--accent-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.06); opacity: 1; }
}

.welcome-icon svg { width: 32px; height: 32px; color: var(--accent); }

.welcome-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.welcome-sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: 40px;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 16px 48px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(91, 127, 110, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(91, 127, 110, 0.35); }
.btn-primary:active { transform: translateY(0); }

.welcome-mic-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}
.chat-area::-webkit-scrollbar { display: none; }

.message {
  max-width: 82%;
  padding: 14px 18px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(12px);
  animation: msgIn 0.4s ease forwards;
}

@keyframes msgIn {
  to { opacity: 1; transform: translateY(0); }
}

.message.ai {
  background: var(--bg-card);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.message.user {
  background: var(--accent);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 12px rgba(91, 127, 110, 0.2);
}

.message.ai.speaking::after {
  content: '';
  position: absolute;
  top: -8px;
  right: -4px;
  font-size: 14px;
  animation: speakPulse 1s ease-in-out infinite;
}
@keyframes speakPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 16px 20px;
  align-self: flex-start;
  opacity: 0;
  animation: msgIn 0.3s ease forwards;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.voice-area {
  padding: 12px 20px 28px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.voice-transcript {
  width: 100%;
  min-height: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 16px;
  transition: all 0.3s;
  line-height: 1.5;
}
.voice-transcript.active { color: var(--text-primary); font-size: 15px; }
.voice-transcript.sending { color: var(--accent); font-weight: 500; }
.voice-transcript.placeholder { color: var(--text-muted); font-style: italic; }

.voice-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.btn-mic {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(91, 127, 110, 0.25);
  position: relative;
}
.btn-mic svg { width: 26px; height: 26px; color: white; position: relative; z-index: 1; }
.btn-mic:hover { transform: scale(1.05); box-shadow: 0 6px 28px rgba(91, 127, 110, 0.35); }
.btn-mic:active { transform: scale(0.97); }

.btn-mic.listening {
  background: var(--red);
  box-shadow: 0 4px 20px rgba(212, 91, 91, 0.3);
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(212, 91, 91, 0.3), 0 4px 20px rgba(212, 91, 91, 0.3); }
  50% { box-shadow: 0 0 0 14px rgba(212, 91, 91, 0), 0 4px 20px rgba(212, 91, 91, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(212, 91, 91, 0), 0 4px 20px rgba(212, 91, 91, 0.3); }
}

.sound-waves {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--red);
  opacity: 0;
  pointer-events: none;
}
.btn-mic.listening .sound-waves { animation: wave-expand 1.5s ease-out infinite; }
.btn-mic.listening .sound-waves:nth-child(2) { animation-delay: 0.5s; }

@keyframes wave-expand {
  0% { inset: -4px; opacity: 0.5; }
  100% { inset: -22px; opacity: 0; }
}

.btn-skip {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  width: 60px;
  display: flex;
  justify-content: center;
}
.btn-skip:hover { border-color: var(--text-muted); color: var(--text-secondary); }

.spacer-div { width: 60px; }

.voice-hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; min-height: 18px; }

.fallback-input { width: 100%; display: flex; gap: 10px; align-items: center; }
.fallback-input input {
  flex: 1; border: 1.5px solid var(--border); border-radius: 50px; padding: 14px 20px;
  font-family: var(--font-body); font-size: 15px; outline: none; background: var(--bg-card); color: var(--text-primary);
}
.fallback-input input:focus { border-color: var(--accent); }
.btn-send {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.btn-send svg { width: 18px; height: 18px; color: white; }

.progress-dots {
  display: flex; justify-content: center; gap: 6px; padding: 8px 0 4px; flex-shrink: 0;
}
.progress-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: all 0.4s ease;
}
.progress-dot.done { background: var(--accent); }
.progress-dot.current { background: var(--accent); width: 20px; border-radius: 3px; }

.summary-content { flex: 1; overflow-y: auto; padding: 16px 20px 32px; }
.summary-card {
  background: var(--bg-card); border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  opacity: 0; transform: translateY(16px); animation: msgIn 0.5s ease forwards;
}
.summary-card:nth-child(2) { animation-delay: 0.1s; }
.summary-card h3 {
  font-family: var(--font-display); font-size: 17px; font-weight: 400; margin-bottom: 12px;
}
.summary-date { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 16px; font-weight: 500; }
.clinician-note {
  background: #FAFAF7; border: 1px dashed var(--border); border-radius: 12px; padding: 16px;
  font-size: 13px; line-height: 1.7; color: var(--text-secondary); font-family: 'DM Sans', monospace; white-space: pre-wrap;
}
.btn-copy {
  width: 100%; padding: 16px; background: var(--accent-soft); color: var(--accent);
  border: 1.5px solid rgba(91,127,110,0.15); border-radius: 12px; font-weight: 500; cursor: pointer; margin-top: 8px;
}
.btn-copy:hover { background: var(--accent); color: white; }

.mode-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 2px 0 6px; flex-shrink: 0;
}
.mode-toggle button {
  background: none; border: none; font-size: 12px; color: var(--text-muted); cursor: pointer;
  padding: 4px 10px; border-radius: 20px; font-family: var(--font-body); transition: all 0.2s;
}
.mode-toggle button.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }

/* ── Header right group ── */
.header-right {
  display: flex; align-items: center; gap: 8px;
}

/* ── Settings button ── */
.btn-settings {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--bg-card); cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: all 0.2s;
  color: var(--text-muted);
}
.btn-settings:hover { color: var(--text-secondary); transform: rotate(30deg); }

/* ── Settings screen ── */
.settings-content {
  flex: 1; overflow-y: auto; padding: 0 20px 32px;
}

.settings-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0 20px;
}

.settings-title {
  font-family: var(--font-display); font-size: 20px; font-weight: 400;
}

.btn-back {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--bg-card); cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); color: var(--text-secondary); transition: all 0.2s;
}
.btn-back:hover { color: var(--text-primary); }

.settings-section {
  background: var(--bg-card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.settings-section h3 {
  font-family: var(--font-display); font-size: 16px; font-weight: 400;
  margin-bottom: 16px;
}

.med-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.med-item:last-of-type { border-bottom: none; }
.med-item span { font-size: 15px; }

.btn-remove-med {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: none; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.2s;
}
.btn-remove-med:hover { color: var(--red); background: rgba(212,91,91,0.08); }

.med-add {
  display: flex; gap: 10px; align-items: center; margin-top: 12px;
}
.med-add input {
  flex: 1; border: 1.5px solid var(--border); border-radius: 50px; padding: 12px 16px;
  font-family: var(--font-body); font-size: 14px; outline: none;
  background: var(--bg); color: var(--text-primary);
}
.med-add input:focus { border-color: var(--accent); }

/* ── History button ── */
.btn-history {
  margin-top: 12px;
  background: none; border: 1.5px solid var(--border); color: var(--text-secondary);
  padding: 12px 24px; border-radius: 50px; font-family: var(--font-body);
  font-size: 14px; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 8px;
}
.btn-history:hover { border-color: var(--accent); color: var(--accent); }

/* ── History screen ── */
.history-empty {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
  font-size: 15px; line-height: 1.6;
}

/* ── Compound Summary ── */
.compound-card {
  background: linear-gradient(135deg, var(--accent-soft) 0%, #f0f4f1 100%);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
  border: 1px solid rgba(91,127,110,0.15);
}
.compound-card h3 {
  font-family: var(--font-display); font-size: 18px; font-weight: 400;
  margin-bottom: 4px; color: var(--text-primary);
}
.compound-subtitle {
  font-size: 13px; color: var(--text-muted); margin-bottom: 16px;
}
.compound-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px;
}
.compound-stat {
  background: var(--bg-card); border-radius: 12px; padding: 14px;
  text-align: center;
}
.compound-stat .stat-value {
  font-family: var(--font-display); font-size: 24px; color: var(--accent);
  font-weight: 400;
}
.compound-stat .stat-label {
  font-size: 11px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.compound-note {
  background: var(--bg-card); border: 1px dashed var(--border); border-radius: 12px;
  padding: 16px; font-size: 13px; line-height: 1.7; color: var(--text-secondary);
  font-family: 'DM Sans', monospace; white-space: pre-wrap;
}
.compound-note-label {
  font-size: 12px; font-weight: 500; color: var(--accent); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.compound-copy {
  width: 100%; padding: 12px; background: var(--accent); color: white;
  border: none; border-radius: 12px; font-weight: 500; cursor: pointer;
  margin-top: 12px; font-family: var(--font-body); font-size: 14px;
  transition: all 0.2s;
}
.compound-copy:hover { opacity: 0.9; }

/* ── Timeline entries ── */
.timeline-label {
  font-size: 12px; font-weight: 500; color: var(--text-muted); margin: 20px 0 8px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.timeline-entry {
  background: var(--bg-card); border-radius: 16px; padding: 16px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  opacity: 0; transform: translateY(8px); animation: msgIn 0.4s ease forwards;
}
.timeline-date {
  font-size: 12px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500;
}
.timeline-fields { display: flex; flex-direction: column; gap: 6px; }
.timeline-field {
  display: flex; gap: 8px; font-size: 13px; line-height: 1.4;
}
.timeline-field-label {
  color: var(--text-muted); min-width: 80px; flex-shrink: 0;
}
.timeline-field-value {
  color: var(--text-primary);
}
.timeline-field-value.skipped { color: var(--text-muted); font-style: italic; }

/* ── Password Gate ── */
.password-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: gateFadeIn 0.5s ease;
}

.gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(247, 245, 240, 0.65);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.gate-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border-radius: 28px;
  padding: 48px 36px 40px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(44, 42, 37, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  animation: gateCardIn 0.6s ease;
}

.gate-logo {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.gate-logo span { color: var(--accent); }

.gate-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.gate-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.15em;
  outline: none;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
  transition: all 0.3s;
  margin-bottom: 16px;
}
.gate-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 127, 110, 0.12);
}

.gate-btn {
  width: 100%;
  margin-bottom: 0;
}

.gate-error {
  display: none;
  color: var(--red);
  font-size: 13px;
  margin-top: 14px;
  animation: gateShake 0.4s ease;
}

@keyframes gateFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gateCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.gate-unlocking .gate-backdrop {
  animation: gateBackdropOut 0.5s ease forwards;
}
.gate-unlocking .gate-card {
  animation: gateCardOut 0.4s ease forwards;
}

@keyframes gateBackdropOut {
  to { opacity: 0; }
}
@keyframes gateCardOut {
  to { opacity: 0; transform: translateY(-20px) scale(0.96); }
}

/* ── Login Overlay ── */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: gateFadeIn 0.3s ease;
}

.login-status {
  font-size: 13px;
  color: var(--accent);
  margin-top: 14px;
  min-height: 20px;
}
.login-status.error {
  color: var(--red);
}

.btn-login-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
  padding: 8px 16px;
  transition: color 0.2s;
}
.btn-login-close:hover {
  color: var(--text-secondary);
}

/* ── Account section in Settings ── */
.settings-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.account-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-email {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.account-badge {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.btn-signout {
  width: 100%;
  padding: 12px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s;
}
.btn-signout:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ── Role Selection Screen ── */
.role-selection {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: gateFadeIn 0.5s ease;
}

.role-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border-radius: 28px;
  padding: 48px 36px 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(44, 42, 37, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  animation: gateCardIn 0.6s ease;
}

.role-options {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.role-option {
  flex: 1;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 24px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}
.role-option:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(91, 127, 110, 0.12);
  transform: translateY(-2px);
}

.role-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.role-icon.patient-icon {
  background: var(--accent-soft);
  color: var(--accent);
}
.role-icon.clinician-icon {
  background: #E3ECF6;
  color: #2B5EA7;
}

.role-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.role-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.gate-unlocking.role-selection .gate-backdrop {
  animation: gateBackdropOut 0.5s ease forwards;
}
.gate-unlocking.role-selection .role-card {
  animation: gateCardOut 0.4s ease forwards;
}

/* ── Clinician Mode Palette ── */
body.clinician-mode {
  --bg: #F4F6F9;
  --bg-card: #FFFFFF;
  --accent: #2B5EA7;
  --accent-soft: #E3ECF6;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --red: #DC2626;
}
