:root {
  --bg-main: #080c14;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-input: rgba(15, 23, 42, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(37, 99, 235, 0.4);
  
  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.25);
  --accent-cyan: #0284c7;
  --accent-indigo: #4f46e5;
  --danger: #ef4444;
  --warning: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body.dark-theme {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.07) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(79, 70, 229, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(2, 132, 199, 0.04) 0px, transparent 60%);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  background: rgba(8, 12, 20, 0.8);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  position: relative;
}

.pulse-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.02em;
}

.badge-tag {
  font-size: 0.68rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.brand-sub span {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
  display: inline-block;
}

.status-indicator.ready {
  background: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.status-indicator.live {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  animation: pulseDotLive 2s infinite ease-in-out;
}

@keyframes pulseDotLive {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
    transform: scale(1.05);
  }
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* Layout */
.app-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  flex: 1;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
}

/* Stage Card (Left Column) */
.call-stage-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.avatar-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.ai-avatar {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-core {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ring-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.4);
  opacity: 0;
  pointer-events: none;
}

.ai-avatar.active-speaking .avatar-core {
  transform: scale(1.08);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.6);
}

.ai-avatar.active-speaking .r1 {
  animation: ripple 2s infinite cubic-bezier(0, 0.2, 0.8, 1);
}

.ai-avatar.active-speaking .r2 {
  animation: ripple 2s infinite 0.7s cubic-bezier(0, 0.2, 0.8, 1);
}

@keyframes ripple {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.companion-meta h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.companion-role {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.speaking-state-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border-radius: 20px;
  margin-top: 0.6rem;
  transition: all 0.3s;
}

.speaking-state-pill.speaking {
  background: rgba(16, 185, 129, 0.18);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.speaking-state-pill.listening {
  background: rgba(6, 182, 212, 0.18);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.call-timer {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Waveform Canvas */
.waveform-container {
  margin: 2rem 0;
  height: 140px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

#waveformCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.waveform-labels {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.stream-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.mic-dot { background: var(--accent-cyan); }
.ai-dot { background: var(--primary); }

/* Controls Toolbar */
.controls-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.8rem 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  flex: 1;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.btn-icon-round {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  flex: 1;
}

.btn-danger:hover {
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.hidden {
  display: none !important;
}

/* Architectural Pill */
.architecture-pill {
  margin-top: 2rem;
  padding: 0.9rem 1.1rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.45;
}

.arch-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a5b4fc;
  margin-bottom: 0.3rem;
}

.arch-text {
  color: var(--text-muted);
}

.arch-text strong {
  color: var(--text-main);
}

/* Insights Panel (Right Column) */
.insights-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}



/* Transcript Top Bar */
.transcript-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-main);
}

.panel-heading h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.panel-heading svg {
  color: var(--primary);
}

.action-row {
  display: flex;
  gap: 0.6rem;
}

.btn-xs {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-xs:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Transcript Feed */
.transcript-feed {
  flex: 1;
  padding: 1.4rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: 480px;
  max-height: 650px;
}

.turn-message {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  line-height: 1.5;
  animation: fadeIn 0.25s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.turn-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.76rem;
}

.turn-speaker {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.speaker-patient {
  border-left: 3px solid var(--accent-cyan);
  background: rgba(6, 182, 212, 0.04);
}
.speaker-patient .turn-speaker { color: var(--accent-cyan); }

.speaker-ai {
  border-left: 3px solid var(--primary);
  background: rgba(16, 185, 129, 0.04);
}
.speaker-ai .turn-speaker { color: var(--primary); }

.turn-time {
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.turn-text {
  font-size: 0.92rem;
  color: var(--text-main);
}

.streaming-cursor {
  display: inline-block;
  width: 6px;
  height: 14px;
  background: var(--primary);
  margin-left: 3px;
  animation: blink 0.9s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--text-dim);
  max-width: 420px;
  margin: auto;
}

.empty-icon {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.86rem;
  line-height: 1.5;
}

/* Clinical Measures Dashboard */
.clinical-dashboard {
  padding: 1.2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-height: 580px;
}

.triage-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.triage-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.triage-val {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.triage-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.triage-badge.emergency {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.triage-badge.urgent {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.triage-badge.routine {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.measures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.measure-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.measure-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.measure-val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 0.3rem;
}

.pain-val {
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 1.15rem;
}

.section-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.section-card h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
}

.placeholder-tag {
  color: var(--text-dim);
  font-size: 0.82rem;
  font-style: italic;
}

.double-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.reasoning-summary-card {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.reasoning-summary-card h4 {
  color: #a5b4fc;
}

.reasoning-summary-card p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #cbd5e1;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.help-text {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.help-text code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  color: var(--accent-cyan);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  background: rgba(0, 0, 0, 0.2);
}



/* Prompt Modal */
.modal-card-xl {
  max-width: 900px;
  width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.modal-body-prompt {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  padding: 1.25rem 1.5rem;
  flex: 1;
}

.prompt-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.prompt-status-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
}

.status-dot.dot-idle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.6);
}

.status-dot.dot-locked {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.prompt-meta-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.prompt-stat-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.badge-custom-active {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.prompt-field-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin-bottom: 0;
}

.prompt-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

/* Legacy modal styles removed - Tab 3 Editor active */

.prompt-footer-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
}

.prompt-footer-hint svg {
  color: var(--primary);
  flex-shrink: 0;
}

.prompt-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-footer-right {
  display: flex;
  gap: 0.6rem;
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
}

.btn-reset:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   PHYSICIAN-READABLE ADL EXTRACTION TABLE & ITERATION LOOP
   ============================================================ */
.iteration-card {
  margin-top: 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.iteration-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.step-tag {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.iteration-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.step-pill {
  font-size: 0.74rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 500;
}

.step-pill.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}

.step-arrow {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.sqlite-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.5rem;
}

.sqlite-status code {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* Physician Table */
.physician-adl-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}

.extraction-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
}

.adl-physician-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

.adl-physician-table th {
  background: rgba(30, 41, 59, 0.85);
  padding: 0.85rem 1.1rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}

.adl-physician-table td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
  line-height: 1.5;
}

.adl-physician-table tbody tr:last-child td {
  border-bottom: none;
}

.adl-physician-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.adl-name-cell strong {
  color: #f8fafc;
  font-size: 0.95rem;
}

.ai-concluded-cell {
  color: #e2e8f0;
}

.patient-statement-cell {
  color: #cbd5e1;
  font-style: italic;
}

.patient-statement-cell.quoted::before {
  content: "“";
}
.patient-statement-cell.quoted::after {
  content: "”";
}

/* Status Badges for Database Values */
.status-badge {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.badge-independent {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-assistance {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-dependent {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-pending {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Prompt Tab Styles */
.prompt-tab-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.1rem 1.25rem 0.85rem 1.25rem;
  height: calc(100vh - 230px);
  min-height: 440px;
  max-height: 820px;
  box-sizing: border-box;
  overflow: hidden;
}

/* 3-Part Navigation Bar */
.prompt-parts-nav {
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
  padding: 0.15rem 0 0.35rem 0;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.prompt-part-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.prompt-part-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.prompt-part-btn.active {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
}

.prompt-part-btn .part-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
  font-family: var(--font-mono);
}

.prompt-part-btn.active .part-num {
  background: #10b981;
  color: #042f2e;
  font-weight: 700;
}

.part-guidance-pill {
  flex-shrink: 0;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.part-guidance-pill strong {
  color: #f1f5f9;
}

.part-guidance-pill code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--accent-cyan);
}

.prompt-part-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  overflow: hidden;
}

.prompt-editor-toolbar {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.1rem 0;
}

.prompt-actions-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prompt-textarea-container {
  flex: 1;
  display: flex;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.prompt-textarea,
.prompt-textarea-container textarea {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  flex: 1;
  resize: none;
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 0.83rem;
  line-height: 1.6;
  padding: 0.95rem 1rem 3.5rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  overflow-y: scroll;
  box-sizing: border-box;
  white-space: pre-wrap;
}

.prompt-textarea:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.prompt-tab-footer {
  flex-shrink: 0;
  font-size: 0.76rem;
  color: var(--text-dim);
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* All Transcripts Archive Table */
.transcripts-archive-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}

.transcripts-archive-container .table-responsive {
  overflow-x: hidden;
}

.transcripts-archive-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.83rem;
}

.transcripts-archive-table th {
  background: rgba(30, 41, 59, 0.85);
  padding: 0.7rem 0.85rem;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}

.transcripts-archive-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
  line-height: 1.35;
}

.transcripts-archive-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.session-title-text {
  color: #f1f5f9;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-stats-sub {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.stat-pill-sm {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.prompt-ver-badge {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  font-weight: 600 !important;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: 0.02em;
}

.prompt-ver-badge svg {
  color: #3b82f6;
  flex-shrink: 0;
}

.session-id-sub {
  color: var(--text-dim);
  font-size: 0.7rem;
  font-family: var(--font-mono);
}

.snippet-cell {
  color: #94a3b8;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-actions-cell {
  text-align: right;
  white-space: nowrap;
}

.actions-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}

.btn-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-action-pill:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-action-pill.btn-adl-pill {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.28);
}

.btn-action-pill.btn-adl-pill:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #ffffff;
  border-color: rgba(16, 185, 129, 0.5);
}

.btn-action-pill.btn-dl-pill {
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.3);
}

.btn-action-pill.btn-dl-pill:hover {
  background: rgba(99, 102, 241, 0.28);
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.55);
}

.transcript-pre-view {
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #e2e8f0;
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==============================================================================
   PROTOCOL SEQUENCE SELECTOR & MULTI-PROTOCOL EXTRACTIONS
   ============================================================================== */

.protocol-selection-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease;
}

.protocol-selection-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.protocol-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.protocol-selection-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.protocol-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

@media (max-width: 650px) {
  .protocol-chips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.protocol-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
  font-size: 0.78rem;
  color: var(--text-muted);
  box-sizing: border-box;
  min-height: 38px;
}

.protocol-chip:hover {
  background: rgba(51, 65, 85, 0.7);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.protocol-chip.selected {
  background: rgba(16, 185, 129, 0.16);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.protocol-chip-checkbox {
  width: 13px;
  height: 13px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.protocol-chip-name {
  font-weight: 600;
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.protocol-chip-badge {
  font-size: 0.62rem;
  font-weight: 500;
  padding: 0.08rem 0.32rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  white-space: nowrap;
  margin-left: auto;
  line-height: 1.15;
}

.protocol-chip.selected .protocol-chip-badge {
  background: rgba(37, 99, 235, 0.15);
  color: #2563eb;
}

/* Chip Order Badges and Quick Reorder Controls */
.chip-order-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.25rem;
  flex-shrink: 0;
}

.chip-order-number {
  font-size: 0.62rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  padding: 0.04rem 0.3rem;
  border-radius: 9999px;
  line-height: 1.1;
}

.chip-order-arrows {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
}

.chip-arrow-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e40af;
  font-size: 0.55rem;
  width: 16px;
  height: 12px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-arrow-btn:hover:not(:disabled) {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.chip-arrow-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* Protocol Sequence Flow & Interactive Reordering */
.protocol-sequence-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.flow-label {
  color: var(--text-dim);
  font-weight: 600;
  margin-right: 0.1rem;
}

.flow-step {
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.flow-step.flow-active {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.35);
  font-weight: 600;
}

.flow-arrow, .flow-arrow-sep {
  color: var(--text-dim);
  font-size: 0.75rem;
  user-select: none;
}

/* Flow Protocols Group & Interactive Pills */
.flow-protocols-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.flow-interactive-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e40af;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.76rem;
  cursor: grab;
  user-select: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.flow-interactive-pill:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.16);
}

.flow-interactive-pill:active {
  cursor: grabbing;
}

.flow-interactive-pill.dragging {
  opacity: 0.45;
  border-style: dashed;
}

.flow-interactive-pill.drag-over {
  border-color: #2563eb;
  background: #dbeafe;
  transform: scale(1.04);
}

.flow-pill-order {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.flow-pill-name {
  font-weight: 700;
  color: #1e40af;
}

.flow-pill-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 0.1rem;
}

.flow-arrow-btn, .flow-remove-btn {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.62rem;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
}

.flow-arrow-btn:hover:not(:disabled) {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.flow-arrow-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

.flow-remove-btn {
  color: #ef4444;
  border-color: #fecaca;
}

.flow-remove-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.flow-swap-all-btn {
  background: #ffffff;
  border: 1px dashed #93c5fd;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}

.flow-swap-all-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  border-style: solid;
}

.flow-order-hint {
  font-size: 0.73rem;
  color: #64748b;
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.4;
}

.flow-empty-hint {
  color: #94a3b8;
  font-style: italic;
}

/* Protocol Section in Extraction UI */
.protocol-section-block {
  margin-bottom: 1.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.4);
}

.protocol-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.1rem;
  background: rgba(30, 41, 59, 0.5);
  border-bottom: 1px solid var(--border-subtle);
}

.protocol-section-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.protocol-section-icon {
  font-size: 1.1rem;
}

.protocol-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
}

.protocol-section-full {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.utc-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(2, 132, 199, 0.25);
  font-weight: 600;
}

/* ==============================================================================
   LIGHT THEME DESIGN SYSTEM (CLEAN, MODERN, CLINICAL ACCESSIBILITY)
   ============================================================================== */

body.light-theme {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border-subtle: #e2e8f0;
  --border-active: #2563eb;

  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.2);
  --accent-cyan: #0284c7;
  --accent-indigo: #4f46e5;
  --danger: #dc2626;
  --warning: #d97706;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 40%),
    radial-gradient(at 100% 100%, rgba(2, 132, 199, 0.05) 0px, transparent 45%),
    radial-gradient(at 50% 0%, rgba(79, 70, 229, 0.03) 0px, transparent 50%);
  color: #0f172a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Navbar in Light Theme */
.light-theme .navbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.light-theme .brand-title {
  color: #0f172a;
}

.light-theme .brand-sub {
  color: #64748b;
}

.light-theme .brand-icon {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: #2563eb;
}

.light-theme .pulse-dot {
  background: #2563eb;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.6);
}

.light-theme .session-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  white-space: nowrap;
  flex-shrink: 0;
}

.light-theme .session-badge.active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Instructions & Guide Button */
.btn-help-guide {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-help-guide:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

.btn-help-guide svg {
  color: #2563eb;
}

@media (max-width: 1200px) {
  .navbar {
    padding: 0.75rem 1.25rem;
    gap: 0.75rem;
  }
  .nav-view-btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    gap: 0.35rem;
  }
}

@media (max-width: 992px) {
  .navbar {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  .nav-view-switcher {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0.3rem 0.4rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .nav-actions {
    margin-left: auto;
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: 0.6rem 0.75rem;
  }
  .brand-title {
    font-size: 1.05rem;
  }
  .brand-sub {
    font-size: 0.75rem;
  }
  .btn-help-guide span {
    display: none;
  }
  .btn-help-guide {
    padding: 0.45rem;
    border-radius: 50%;
  }
}

/* Stage Step Blocks (Simplified Direction) */
.stage-step-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease;
}

.stage-step-block:hover {
  border-color: #cbd5e1;
}

.step-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-badge {
  background: #1d4ed8;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.25);
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.step-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0.1rem 0 0 0;
}

.companion-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.2rem;
}

/* Left Card & Insights Panel in Light Mode */
.light-theme .call-stage-card,
.light-theme .insights-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
}

.light-theme .companion-role {
  color: #64748b;
}

/* AI Companion Avatar in Light Mode (Clean, Minimalist Healthcare Assistant) */
.light-theme .avatar-group {
  gap: 1rem;
}

.light-theme .ai-avatar {
  width: 58px;
  height: 58px;
}

.light-theme .avatar-core {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
  transition: all 0.25s ease;
}

.light-theme .ring-pulse {
  border-color: rgba(37, 99, 235, 0.25);
  border-radius: 18px;
}

.light-theme .ai-avatar.active-speaking .avatar-core {
  transform: scale(1.05);
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.25);
}

.light-theme .call-timer {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.light-theme .speaking-state-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.light-theme .speaking-state-pill.speaking {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.light-theme .speaking-state-pill.listening {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

/* Waveform in Light Mode */
.light-theme .waveform-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.light-theme .waveform-labels {
  color: #64748b;
}

/* Protocol Chips in Light Mode */
.light-theme .protocol-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.light-theme .protocol-chip:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.light-theme .protocol-chip.selected {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1e40af;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.16);
}

.light-theme .protocol-chip-badge {
  background: #f1f5f9;
  color: #64748b;
}

.light-theme .protocol-chip.selected .protocol-chip-badge {
  background: #dbeafe;
  color: #1e40af;
}

.light-theme .protocol-sequence-flow {
  border-top: 1px solid #e2e8f0;
}

.light-theme .flow-step {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
}

.light-theme .flow-step.flow-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
}

/* Buttons in Light Mode */
.light-theme .btn-secondary {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.light-theme .btn-secondary:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.light-theme .iteration-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.light-theme .step-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #64748b;
}

.light-theme .step-pill.active {
  background: #e0e7ff;
  border-color: #818cf8;
  color: #3730a3;
}

.light-theme .sqlite-status {
  border-top: 1px solid #e2e8f0;
  color: #64748b;
}

.light-theme .sqlite-status code {
  background: #e0f2fe;
  color: #0369a1;
}



.light-theme .transcript-top-bar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.light-theme .panel-heading h3 {
  color: #0f172a;
}

.light-theme .panel-sub {
  color: #64748b;
}

.light-theme .btn-xs {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.light-theme .btn-xs:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* Transcripts in Light Mode */
.light-theme .turn-message {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.light-theme .speaker-ai {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
}

.light-theme .speaker-ai .turn-speaker {
  color: #1e40af;
}

.light-theme .speaker-patient {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0284c7;
}

.light-theme .speaker-patient .turn-speaker {
  color: #0369a1;
}

.light-theme .turn-time {
  color: #64748b;
}

.light-theme .turn-text {
  color: #0f172a;
}

.light-theme .empty-state {
  color: #64748b;
}

.light-theme .empty-state h3 {
  color: #1e293b;
}

/* Structured Clinical Extractions in Light Mode */
.light-theme .extraction-summary-bar {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.light-theme .protocol-section-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.light-theme .protocol-section-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.light-theme .protocol-section-title {
  color: #0f172a;
}

.light-theme .protocol-section-full {
  color: #64748b;
}

.light-theme .table-responsive {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.light-theme .adl-physician-table th,
.light-theme .transcripts-archive-table th {
  background: #f1f5f9;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.light-theme .adl-physician-table td,
.light-theme .transcripts-archive-table td {
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.light-theme .adl-physician-table tbody tr:hover,
.light-theme .transcripts-archive-table tbody tr:hover {
  background: #f8fafc;
}

.light-theme .adl-name-cell strong {
  color: #0f172a;
}

.light-theme .ai-concluded-cell {
  color: #1e293b;
}

.light-theme .patient-statement-cell {
  color: #475569;
}

.light-theme .session-title-text {
  color: #0f172a;
}

.light-theme .stat-pill-sm {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.light-theme .prompt-ver-badge {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

.light-theme .prompt-ver-badge svg {
  color: #2563eb;
}

.light-theme .session-select-dropdown {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

/* Status Badges in Light Mode */
.light-theme .badge-independent {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.light-theme .badge-assistance {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.light-theme .badge-dependent {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.light-theme .badge-pending {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* Prompt Editor & Textareas in Light Mode */
.light-theme .prompt-textarea {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.light-theme .prompt-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Prompt Editor Navigation in Light Mode */
.light-theme .prompt-parts-nav {
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.25rem 0 0.85rem 0;
  gap: 0.65rem;
}

.light-theme .prompt-part-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 8px;
  font-weight: 600;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.light-theme .prompt-part-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.light-theme .prompt-part-btn.active {
  color: #1d4ed8;
  background: #ffffff;
  border: 1.5px solid #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

.light-theme .prompt-part-btn .part-num {
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.light-theme .prompt-part-btn.active .part-num {
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
}

.light-theme .part-guidance-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.84rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  line-height: 1.5;
}

.light-theme .part-guidance-pill strong {
  color: #0f172a;
}

.light-theme .prompt-editor-toolbar {
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.4rem 0;
}

.light-theme .prompt-status-tag {
  color: #0f172a;
  font-weight: 600;
  font-size: 0.85rem;
}

.light-theme .status-dot.dot-idle {
  background: #2563eb;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.5);
}

/* Transcripts Archive in Light Mode */
.light-theme .transcripts-archive-container {
  background: #ffffff;
}

.light-theme .btn-action-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.light-theme .btn-action-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.light-theme .btn-action-pill.btn-adl-pill {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.light-theme .btn-action-pill.btn-adl-pill:hover {
  background: #dbeafe;
}

.light-theme .btn-action-pill.btn-dl-pill {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.light-theme .btn-action-pill.btn-dl-pill:hover {
  background: #dbeafe;
}

/* Modals in Light Mode */
.light-theme .modal-backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
}

.light-theme .modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.2);
  color: #0f172a;
}

.light-theme .modal-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.light-theme .modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.light-theme .transcript-pre-view {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

/* Instructions & Guide Modal Specific Styling */
.modal-card-lg {
  max-width: 820px;
  width: 95%;
}

.guide-icon-badge {
  background: rgba(37, 99, 235, 0.12) !important;
  color: #2563eb !important;
  font-size: 1.25rem;
}

.instructions-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 68vh;
  overflow-y: auto;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 680px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

.guide-step-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.05rem 1.15rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.guide-step-card:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.guide-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.guide-step-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.guide-step-content p {
  font-size: 0.83rem;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}

.guide-tip-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.15rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  color: #1e40af;
  font-size: 0.83rem;
  line-height: 1.45;
}

.guide-tip-banner strong {
  color: #1e3a8a;
}

.tip-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ==============================================================================
   GUARANTEED BASE MODAL SYSTEM & FIXED BACKDROP
   ============================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  box-sizing: border-box;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.modal-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: #f8fafc;
}

/* ==============================================================================
   MULTI-VIEW TOP NAVIGATION & WORKSTATION ARCHITECTURE
   ============================================================================== */

.nav-view-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #f1f5f9;
  padding: 0.3rem 0.4rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.nav-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nav-view-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
}

.nav-view-btn.active {
  color: #1d4ed8;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
  border: 1px solid #dbeafe;
}

.nav-count-badge {
  font-size: 0.7rem;
  background: #e2e8f0;
  color: #475569;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  font-weight: 700;
}

.nav-view-btn.active .nav-count-badge {
  background: #dbeafe;
  color: #1e40af;
}

.nav-custom-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
  display: inline-block;
  margin-left: 2px;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.nav-custom-dot.hidden {
  display: none !important;
}

.nav-guide-btn {
  color: #0284c7;
}

.nav-guide-btn:hover {
  color: #0369a1;
}

.nav-guide-btn.active {
  color: #0284c7;
}

.utc-clock {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #0284c7;
  font-weight: 600;
}

/* Page Containers */
.app-main-container {
  flex: 1;
  max-width: 1560px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.view-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  animation: fadeIn 0.2s ease forwards;
}

.view-page.hidden {
  display: none !important;
}

/* View 1: Call Workstation Grid */
.call-view-layout {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .call-view-layout {
    grid-template-columns: 1fr;
  }
}

.live-transcript-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  min-height: 650px;
}

/* Post-call action banner in Live Transcript */
.call-completed-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: slideDown 0.3s ease;
}

.call-completed-banner strong {
  color: #1e3a8a;
  font-size: 0.9rem;
}

.call-completed-banner p {
  color: #1e40af;
  font-size: 0.8rem;
  margin: 0.1rem 0 0 0;
}

/* Views 2, 3, 4, 5: Cards & Layouts */
.results-view-card,
.archive-view-card,
.prompts-view-card,
.guide-view-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.view-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 1rem;
}

.view-title-group h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.view-title-group p {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0.2rem 0 0 0;
}

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

.prompt-header-actions {
  width: 100%;
  flex: 1 1 100%;
}

/* Prompt Editor Action Buttons: Green Bold Save & Red Bold Reset */
.btn-save-prompt, #savePromptBtn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  letter-spacing: 0.01em !important;
  border: 1px solid #059669 !important;
  padding: 0.45rem 1.05rem !important;
  border-radius: 7px !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin-left: auto !important;
}

.btn-save-prompt:hover, #savePromptBtn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5) !important;
  transform: translateY(-1px);
  border-color: #047857 !important;
}

.btn-save-prompt:active, #savePromptBtn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3) !important;
}

.btn-save-prompt svg, #savePromptBtn svg {
  stroke: #ffffff !important;
  stroke-width: 2.3 !important;
}

/* Red Bold Reset Buttons */
.btn-reset-prompt, #resetCurrentPartBtn, #resetPromptBtn {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.42rem 0.85rem !important;
  border-radius: 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-reset-prompt:hover, #resetCurrentPartBtn:hover, #resetPromptBtn:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.35) !important;
  transform: translateY(-1px);
}

.btn-reset-prompt:active, #resetCurrentPartBtn:active, #resetPromptBtn:active {
  transform: translateY(0);
}

body:not(.light-theme) .btn-reset-prompt,
body:not(.light-theme) #resetCurrentPartBtn,
body:not(.light-theme) #resetPromptBtn {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

body:not(.light-theme) .btn-reset-prompt:hover,
body:not(.light-theme) #resetCurrentPartBtn:hover,
body:not(.light-theme) #resetPromptBtn:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

/* Dedicated Guide Page Styling */
.guide-page-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.guide-hero-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f7ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.guide-hero-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 0.35rem;
}

.guide-hero-text p {
  font-size: 0.88rem;
  color: #1e40af;
  margin: 0;
  line-height: 1.5;
}

.guide-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .guide-cards-grid {
    grid-template-columns: 1fr;
  }
}

.guide-feature-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.guide-feature-box:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.guide-badge-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.guide-feature-text h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.4rem 0;
}

.guide-feature-text p {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.guide-feature-text code {
  background: #e2e8f0;
  color: #0f172a;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

/* Healthcare Pro Tips Container (Full Width, No Squishing) */
.guide-tips-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.guide-tip-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.guide-tip-card:hover {
  background: #ffffff;
  border-color: #93c5fd;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.tip-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tip-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tip-card-header h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.guide-tip-card p {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
  padding-left: 2.75rem;
}

@media (max-width: 640px) {
  .guide-tip-card p {
    padding-left: 0;
  }
}

/* Patient Context Input & Step 2 Styling */
.patient-context-block {
  border-left: 3px solid #3b82f6 !important;
  background: rgba(15, 23, 42, 0.55);
}

.light-theme .patient-context-block {
  background: #f8fafc;
  border-left-color: #2563eb !important;
}

.context-actions-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-outline-context {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-context:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.light-theme .btn-outline-context {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.light-theme .btn-outline-context:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.context-input-container {
  margin-top: 0.5rem;
}

.patient-context-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  padding: 0.65rem 0.85rem;
  outline: none;
  resize: vertical;
  min-height: 95px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.patient-context-textarea:focus {
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.light-theme .patient-context-textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.light-theme .patient-context-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.context-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.context-hint-text {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #94a3b8;
}

.light-theme .context-hint-text {
  color: #64748b;
}

.context-char-counter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #64748b;
}

/* Slide Toggle Switch for Patient Context */
.context-toggle-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.context-toggle-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #94a3b8;
}

.light-theme .context-toggle-label {
  color: #475569;
}

.switch-slide {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  margin: 0;
  vertical-align: middle;
}

.switch-slide input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #64748b;
  transition: 0.25s ease;
  border-radius: 20px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.switch-slide input:checked + .slider-round {
  background-color: #10b981;
}

.switch-slide input:checked + .slider-round:before {
  transform: translateX(16px);
}

.context-toggle-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
  transition: all 0.2s ease;
}

.context-toggle-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.light-theme .context-toggle-badge {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.light-theme .context-toggle-badge.active {
  background: #dcfce7;
  color: #059669;
  border-color: #86efac;
}

/* Disabled & Locked Textarea State when context toggle is OFF */
.patient-context-textarea:disabled,
.patient-context-textarea.context-disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  background: rgba(15, 23, 42, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  border-style: dashed !important;
}

.light-theme .patient-context-textarea:disabled,
.light-theme .patient-context-textarea.context-disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  border-style: dashed !important;
}

/* Patient Context Collapsible Visibility & Transitions */
.hidden {
  display: none !important;
}

.patient-context-body {
  margin-top: 0.85rem;
  transition: opacity 0.2s ease, max-height 0.25s ease;
}

.patient-context-body.hidden,
#patientContextBody.hidden,
#promptPart4Body.hidden,
#clearContextBtn.hidden,
#promptPart4ExcludedNotice.hidden {
  display: none !important;
}

.session-select-dropdown {
  min-width: 320px;
  max-width: 480px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--border, #cbd5e1);
  background: var(--surface, #ffffff);
  color: var(--text-main, #0f172a);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.session-select-dropdown:focus {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ==========================================================================
   PROMPT VERSION CONTROL & HISTORY MODAL
   ========================================================================== */

.prompt-version-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.6rem;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 9999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.prompt-version-pill.active-glow {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.btn-history-prompt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #0284c7;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-history-prompt:hover {
  background: rgba(14, 165, 233, 0.18);
  border-color: #0284c7;
  transform: translateY(-1px);
}

.prompt-history-card {
  max-width: 960px !important;
  width: 92vw !important;
  max-height: 86vh !important;
  height: 82vh !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  box-sizing: border-box !important;
}

.history-modal-body {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  flex: 1 !important;
  min-height: 0 !important;
  max-height: calc(82vh - 68px) !important;
  box-sizing: border-box !important;
}

/* History Filter Bar */
.history-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  background: var(--surface-subtle, #f8fafc);
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  overflow-x: auto;
  flex-shrink: 0;
}

.history-filter-btn {
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim, #64748b);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.history-filter-btn:hover {
  color: var(--text-main, #0f172a);
  background: rgba(0, 0, 0, 0.05);
}

.history-filter-btn.active {
  background: var(--primary, #2563eb);
  color: #ffffff;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

/* Split Container */
.history-split-container {
  display: flex !important;
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.history-timeline-panel {
  width: 38%;
  min-width: 290px;
  max-width: 380px;
  border-right: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  overflow-y: auto;
  background: var(--surface-card, rgba(0, 0, 0, 0.015));
  padding: 0.5rem;
}

.history-preview-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface, #ffffff);
}

/* History Timeline Item */
.history-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.4rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface, #ffffff);
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-item:hover {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.03);
}

.history-item.active {
  border-color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.06);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
}

.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-ver-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.1);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

.history-target-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dim, #64748b);
  letter-spacing: 0.03em;
}

.history-item-summary {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-main, #0f172a);
  line-height: 1.3;
}

.history-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim, #64748b);
  margin-top: 0.2rem;
}

.history-empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 2.5rem 1rem;
  font-size: 0.85rem;
}

/* History Preview Panel */
.history-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  background: var(--surface-subtle, rgba(0, 0, 0, 0.02));
}

.history-preview-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.version-tag {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.88rem;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary, #2563eb);
  padding: 0.15rem 0.55rem;
  border-radius: 5px;
}

.version-target-key {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main, #0f172a);
}

.version-time {
  font-size: 0.75rem;
  color: var(--text-dim, #64748b);
}

.btn-restore-version {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: #10b981;
  color: #ffffff;
  border: 1px solid #059669;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.btn-restore-version:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.history-change-summary-box {
  padding: 0.6rem 1.25rem;
  background: rgba(37, 99, 235, 0.04);
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  font-size: 0.82rem;
  color: #1e40af;
  font-weight: 500;
}

.history-code-preview-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.history-code-preview {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-main, #0f172a);
  white-space: pre-wrap;
  word-break: break-word;
}

/* =============================================================
   CALL QUALITY & UX REVIEW AGENT STYLES
   ============================================================= */

/* Navbar Review Button (Replaces Ready for Role-Play badge) */
.nav-review-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.12));
  border: 1px solid rgba(37, 99, 235, 0.25);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary, #2563eb);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
  white-space: nowrap;
}

.nav-review-btn:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(14, 165, 233, 0.22));
  border-color: var(--primary, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.18);
  color: #1d4ed8;
}

.nav-review-btn.active {
  background: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.review-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  display: inline-block;
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.nav-review-btn.active .review-status-dot {
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.badge-review-engine {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.25);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.btn-review-pill {
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.btn-review-pill:hover {
  background: rgba(124, 58, 237, 0.16);
  border-color: #6d28d9;
  color: #5b21b6;
}

/* Header & Controls */
.review-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.review-actions-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Session Metadata Bar */
.review-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.review-meta-bar.hidden,
#reviewMetaBar.hidden,
.review-dashboard-container.hidden,
#reviewDashboard.hidden,
.review-5sec-container.hidden,
.review-card-section.hidden,
.review-inspector-accordion.hidden,
.review-summary-banner.hidden {
  display: none !important;
}

.review-meta-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
}

.meta-label {
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.meta-val {
  color: var(--text-main, #0f172a);
  font-weight: 600;
}

.meta-code {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  background: var(--bg-subtle, #f1f5f9);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  color: var(--text-main, #0f172a);
}

/* Loading & Empty States */
.review-loading-state, .review-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 16px;
  margin-bottom: 2rem;
}

.review-spinner-container h3, .review-empty-state h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1rem;
  color: var(--text-main, #0f172a);
}

.review-spinner-container p, .review-empty-state p {
  font-size: 0.88rem;
  color: var(--text-muted, #64748b);
  max-width: 550px;
  margin: 0.5rem auto 0;
  line-height: 1.5;
}

.review-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(37, 99, 235, 0.15);
  border-top-color: var(--primary, #2563eb);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

.pulse-dot-inline {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseGlow 1.2s infinite;
  margin-right: 4px;
}

/* Dashboard Layout */
.review-dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Top Row: Overall Score & Category Scores */
.review-score-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .review-score-row {
    grid-template-columns: 1fr;
  }
}

.review-score-card {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.score-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.score-card-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #64748b);
}

.rating-tier-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rating-tier-badge.tier-excellent {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.rating-tier-badge.tier-good {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.rating-tier-badge.tier-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.score-display-wrapper {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.score-number-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(14, 165, 233, 0.15));
  border: 3px solid var(--primary, #2563eb);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.score-value {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary, #2563eb);
}

.score-total {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  margin-top: 2px;
}

.score-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin-bottom: 0.3rem;
}

.score-note {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
  margin: 0;
}

/* Category Scores Grid */
.review-categories-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.card-section-title {
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748b);
  margin-bottom: 1rem;
}

/* Score & Stage Badges in Meta Bar */
.badge-score {
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  padding: 0.25rem 0.65rem !important;
  border-radius: 6px !important;
}

.badge-score-high {
  background: #ecfdf5 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
}

.badge-score-medium {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #93c5fd !important;
}

.badge-score-low {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}

.badge-stage {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 0.2rem 0.6rem !important;
  border-radius: 6px !important;
}

.badge-stage-complete {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0 !important;
}

.badge-stage-mid {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

.badge-stage-pre {
  background: #f8fafc !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

.badge-stage-abandoned {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}

.review-summary-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #4f46e5;
  border-radius: 10px;
}

.summary-banner-icon {
  color: #4f46e5;
  flex-shrink: 0;
  margin-top: 2px;
}

.summary-banner-content {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  line-height: 1.5;
}

.summary-banner-title {
  color: #0f172a;
  font-weight: 700;
}

.summary-banner-text {
  color: #334155;
}

.btn-copy-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-edit:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.prompt-change-issue {
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.5;
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
}

.prompt-change-issue strong {
  color: #854d0e;
}


/* -------------------------------------------------------------
   GITHUB-STYLE DIFF VIEWER (RED REMOVAL & GREEN SUGGESTIONS)
   ------------------------------------------------------------- */
.github-diff-viewer {
  border: 1px solid #d0d7de;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  margin-top: 0.35rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.diff-hunk-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: #f6f8fa;
  border-bottom: 1px solid #d0d7de;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.74rem;
  color: #57606a;
}

.diff-hunk-at {
  color: #0969da;
  font-weight: 700;
  user-select: none;
}

.diff-hunk-context {
  color: #24292f;
  font-weight: 600;
}

.diff-line {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.diff-line:last-child {
  border-bottom: none;
}

.diff-gutter {
  width: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.75rem;
  user-select: none;
}

.diff-marker {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.diff-text-cell {
  flex: 1;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.diff-sub-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.diff-content {
  margin: 0;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Red Removal / Replacement Line (GitHub red) */
.diff-line.diff-remove {
  background: #ffebe9;
  border-left: 4px solid #cf222e;
}

.diff-line.diff-remove .diff-gutter {
  background: rgba(207, 34, 46, 0.08);
  border-right: 1px solid rgba(207, 34, 46, 0.15);
}

.diff-line.diff-remove .diff-marker {
  color: #cf222e;
}

.diff-sub-label-remove {
  color: #cf222e;
}

.diff-content-remove {
  color: #24292f;
}

/* Green Suggestion / Add Line (GitHub green) */
.diff-line.diff-add {
  background: #e6ffec;
  border-left: 4px solid #1a7f37;
}

.diff-line.diff-add .diff-gutter {
  background: rgba(26, 127, 55, 0.08);
  border-right: 1px solid rgba(26, 127, 55, 0.15);
}

.diff-line.diff-add .diff-marker {
  color: #1a7f37;
}

.diff-sub-label-add {
  color: #1a7f37;
}

.diff-content-add {
  color: #24292f;
}

.prompt-change-empty {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  color: #166534;
  font-size: 0.88rem;
}

/* Auditor Context Inspector Accordion */
.review-inspector-accordion {
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface, #ffffff);
  margin-top: 0.5rem;
}

.inspector-header {
  padding: 1rem 1.25rem;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.inspector-header:hover {
  background: #f1f5f9;
}

.inspector-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main, #0f172a);
}

.accordion-arrow {
  font-size: 1.1rem;
  color: var(--text-muted, #64748b);
  font-weight: 700;
}

.inspector-content {
  border-top: 1px solid var(--border-subtle, #e2e8f0);
}

.inspector-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  background: #fafafa;
}

.inspector-tab-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
}

.inspector-tab-btn:hover {
  color: var(--text-main, #0f172a);
}

.inspector-tab-btn.active {
  background: #ffffff;
  border-color: var(--border-subtle, #e2e8f0);
  color: var(--primary, #2563eb);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.inspector-tab-panel {
  max-height: 550px;
  overflow-y: auto;
  padding: 1.25rem;
  background: #f8fafc;
}

body.dark-theme .inspector-tab-panel {
  background: rgba(15, 23, 42, 0.7);
}

.inspector-pre-content {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}

body.dark-theme .inspector-pre-content {
  color: #e2e8f0;
}

/* -------------------------------------------------------------
   TWILIO TELEPHONY VOICE COMPONENT STYLES (GPT-Live-1)
   ------------------------------------------------------------- */
.twilio-telephony-block {
  border: 1.5px solid rgba(79, 70, 229, 0.2) !important;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 1)) !important;
}

body.dark-theme .twilio-telephony-block {
  border-color: rgba(99, 102, 241, 0.3) !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.6)) !important;
}

.inbound-phone-card {
  transition: all 0.2s ease;
}

.inbound-phone-card:hover {
  border-color: #6366f1 !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

body.dark-theme .inbound-phone-card {
  background: rgba(15, 23, 42, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .inbound-phone-card div div:last-child {
  color: #f8fafc !important;
}

body.dark-theme #outboundPhoneInput {
  background: rgba(15, 23, 42, 0.9) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* -------------------------------------------------------------
   STREAMLINED 5-SECTION CONVERSATION REVIEW STYLES
   ------------------------------------------------------------- */
.review-5sec-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.review-card-section {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.review-card-header-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
}

.review-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-sec-number-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.review-sec-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

.review-sec-subtitle {
  margin: 0.2rem 0 0 0;
  font-size: 0.84rem;
  color: var(--text-muted, #64748b);
}

/* Section 1: Overall Conversation */
.overall-score-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(14, 165, 233, 0.06));
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.score-badge-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.score-num-big {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
}

.score-denom-small {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 600;
}

.score-hero-details h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

.score-hero-details p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted, #475569);
  line-height: 1.45;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

body.dark-theme .checklist-item {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.checklist-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.checklist-icon.pass {
  background: #dcfce7;
  color: #166534;
}

.checklist-icon.fail {
  background: #fee2e2;
  color: #991b1b;
}

.checklist-content {
  flex: 1;
}

.checklist-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin-bottom: 0.2rem;
}

.checklist-note {
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}

/* Section 2: What Went Well */
.strengths-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.strength-item-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
}

body.dark-theme .strength-item-card {
  background: rgba(6, 78, 59, 0.2);
  border-color: rgba(16, 185, 129, 0.25);
}

.strength-bullet-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #16a34a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.strength-text {
  font-size: 0.92rem;
  color: #14532d;
  line-height: 1.45;
  font-weight: 500;
}

body.dark-theme .strength-text {
  color: #86efac;
}

/* Sections 3, 4 & 5: Problems, Types, Evidence & Fixes */
.problems-container {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.problem-card-structured {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

body.dark-theme .problem-card-structured {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.problem-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.problem-headline-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
}

.problem-num-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
}

.problem-title-text {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

body.dark-theme .problem-title-text {
  color: #f8fafc;
}

/* Problem Type Badges */
.type-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.type-badge-prompt {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.type-badge-clinical-protocol {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.type-badge-safety {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.type-badge-technical {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.type-badge-data {
  background: #f0fdfa;
  color: #0d9488;
  border: 1px solid #99f6e4;
}

/* Evidence Block */
.evidence-block {
  background: #f8fafc;
  border-left: 3.5px solid #64748b;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
}

body.dark-theme .evidence-block {
  background: rgba(30, 41, 59, 0.5);
  border-left-color: #94a3b8;
}

.evidence-header {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.evidence-quote {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-style: italic;
  color: #1e293b;
  line-height: 1.45;
}

body.dark-theme .evidence-quote {
  color: #cbd5e1;
}

/* Fix Block */
.fix-block {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

body.dark-theme .fix-block {
  background: rgba(6, 78, 59, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
}

.fix-content {
  flex: 1;
}

.fix-header {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #15803d;
  margin-bottom: 0.25rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

body.dark-theme .fix-header {
  color: #4ade80;
}

.fix-text {
  font-size: 0.9rem;
  color: #166534;
  font-weight: 600;
  line-height: 1.4;
}

body.dark-theme .fix-text {
  color: #bbf7d0;
}

.btn-copy-fix {
  background: #ffffff;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-copy-fix:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

/* Nav Review Agent Button */
.btn-review-agent {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid #818cf8;
  background: #eef2ff;
  color: #4338ca;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.12);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.btn-review-agent:hover {
  background: #e0e7ff;
  border-color: #6366f1;
  color: #3730a3;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.2);
}

.btn-review-agent.active {
  background: #4f46e5;
  border-color: #4338ca;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.btn-review-agent.active svg {
  stroke: #ffffff;
}

.btn-review-agent svg {
  stroke: #4338ca;
}

.review-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  display: inline-block;
  animation: pulseGlow 2s infinite ease-in-out;
}

.btn-review-agent.active .review-status-dot {
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

