/* ==========================================================================
   AutoMinds Voice AI — Ultra-Premium White & Clinical Blue Design System
   Matches AutoMinds Standard Color Theme & Apple Glass Aesthetics
   ========================================================================== */

:root {
  --bg-base: #f8fafc; /* Crisp clean off-white / light slate */
  --bg-surface: rgba(255, 255, 255, 0.88);
  --bg-surface-subtle: rgba(248, 250, 252, 0.85);
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-hover: rgba(239, 246, 255, 0.9);

  --border-subtle: rgba(226, 232, 240, 0.85);
  --border-focus: #3b82f6;
  --border-glow: rgba(37, 99, 235, 0.2);

  --text-primary: #0f172a; /* Slate 900 */
  --text-secondary: #475569; /* Slate 600 */
  --text-muted: #64748b; /* Slate 500 */

  /* Primary Blue Palette */
  --primary-blue: #2563eb; /* Blue 600 */
  --primary-blue-hover: #1d4ed8; /* Blue 700 */
  --primary-blue-active: #1e40af; /* Blue 800 */
  --blue-soft: #eff6ff; /* Blue 50 */
  --blue-border: #bfdbfe; /* Blue 200 */

  --accent-cyan: #0284c7; /* Sky 600 */
  --accent-indigo: #4f46e5; /* Indigo 600 */
  --accent-violet: #7c3aed; /* Violet 600 */
  --accent-emerald: #059669; /* Emerald 600 */
  --accent-amber: #d97706; /* Amber 600 */
  --accent-rose: #e11d48; /* Rose 600 */

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 12px 32px -6px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --shadow-blue-btn: 0 10px 25px -4px rgba(37, 99, 235, 0.4);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Subtle Background Glows (Soft Blue/Lavender tints on white) */
.ambient-glow {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.6;
}

.glow-top-left {
  top: -120px;
  left: -80px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(191, 219, 254, 0.65) 0%, transparent 70%);
}

.glow-top-right {
  top: -80px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(221, 214, 254, 0.5) 0%, transparent 70%);
}

.glow-bottom-center {
  bottom: -200px;
  left: 25%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(219, 234, 254, 0.55) 0%, transparent 70%);
}

/* App Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  border: 1px solid var(--blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.logo-icon {
  width: 24px;
  height: 24px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.badge-pill {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-full);
  color: var(--primary-blue);
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.header-status-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.clinic-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.06);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
}

.agent-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.agent-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
}

.agent-speed {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--primary-blue);
}

/* Main Layout: Split Columns */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  flex: 1;
  align-items: stretch;
}

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

/* White Glassmorphism Card Container */
.stage-card {
  background: var(--bg-surface);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Voice Stage Container */
.voice-stage-container {
  padding: 28px;
}

/* Stage Navigation Tabs */
.stage-nav {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-tab.active {
  background: #ffffff;
  color: var(--primary-blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tab-icon {
  width: 16px;
  height: 16px;
}

/* Panel Switcher */
.panel-view {
  display: none;
  flex-direction: column;
  flex: 1;
}

.panel-view.active {
  display: flex;
}

/* Voice Centerpiece */
.voice-centerpiece {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 10px 20px;
  flex: 1;
}

/* Ethereal Siri-style Iridescent Aura Sphere */
.aura-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.aura-glow {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.6) 0%, rgba(196, 181, 253, 0.4) 50%, transparent 75%);
  filter: blur(30px);
  transition: all 0.4s ease;
}

.aura-pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(59, 130, 246, 0.35);
  pointer-events: none;
  opacity: 0;
}

.aura-pulse-ring.active {
  animation: aura-expand 2.2s cubic-bezier(0.1, 0.7, 0.1, 1) infinite;
}

.ring-2.active {
  animation-delay: 1.1s;
}

@keyframes aura-expand {
  0% {
    width: 100px;
    height: 100px;
    opacity: 0.8;
    border-color: rgba(37, 99, 235, 0.5);
  }
  100% {
    width: 250px;
    height: 250px;
    opacity: 0;
    border-color: rgba(147, 197, 253, 0);
  }
}

.aura-sphere {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.16), inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

/* Idle State: Translucent Iridescent Fluid Orb */
.aura-sphere.idle {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #dbeafe 45%, #c7d2fe 80%, #93c5fd 100%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  color: var(--primary-blue);
}

.aura-sphere.connecting {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #bfdbfe 40%, #818cf8 80%, #6366f1 100%);
  border: 2px solid #818cf8;
  color: #312e81;
  animation: aura-breathe 2s infinite ease-in-out;
}

.aura-sphere.listening {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #bae6fd 35%, #60a5fa 75%, #38bdf8 100%);
  border: 2px solid #38bdf8;
  color: #0369a1;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.45), 0 12px 28px rgba(37, 99, 235, 0.2);
  animation: aura-listening 1.6s infinite alternate ease-in-out;
}

.aura-sphere.thinking {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ddd6fe 35%, #a855f7 75%, #7c3aed 100%);
  border: 2px solid #a855f7;
  color: #4c1d95;
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.45);
  animation: aura-spin 3s infinite linear;
}

.aura-sphere.speaking {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #a7f3d0 30%, #34d399 70%, #059669 100%);
  border: 2px solid #34d399;
  color: #064e3b;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.45);
  animation: aura-speaking 0.9s infinite alternate ease-in-out;
}

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

@keyframes aura-listening {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); box-shadow: 0 0 45px rgba(56, 189, 248, 0.55); }
}

@keyframes aura-speaking {
  0% { transform: scale(1.02); }
  100% { transform: scale(1.12); box-shadow: 0 0 50px rgba(16, 185, 129, 0.6); }
}

.aura-icon {
  width: 42px;
  height: 42px;
}

/* Agent Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.status-badge.state-idle {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.status-badge.state-connecting {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--primary-blue);
}

.status-badge.state-listening {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

.status-badge.state-thinking {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  color: #7e22ce;
}

.status-badge.state-speaking {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.status-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Audio Visualizer Bars */
.audio-bars-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  margin-bottom: 14px;
}

.audio-bars-container .bar {
  width: 3px;
  height: 6px;
  background-color: var(--primary-blue);
  border-radius: 3px;
  opacity: 0.3;
  transition: height 0.15s ease, opacity 0.2s ease;
}

.audio-bars-container.active .bar {
  opacity: 1;
  animation: bar-jump 1s ease-in-out infinite alternate;
}

.audio-bars-container.active .bar:nth-child(1) { animation-delay: 0.0s; }
.audio-bars-container.active .bar:nth-child(2) { animation-delay: 0.15s; }
.audio-bars-container.active .bar:nth-child(3) { animation-delay: 0.3s; }
.audio-bars-container.active .bar:nth-child(4) { animation-delay: 0.45s; }
.audio-bars-container.active .bar:nth-child(5) { animation-delay: 0.2s; }
.audio-bars-container.active .bar:nth-child(6) { animation-delay: 0.35s; }
.audio-bars-container.active .bar:nth-child(7) { animation-delay: 0.1s; }
.audio-bars-container.active .bar:nth-child(8) { animation-delay: 0.5s; }

@keyframes bar-jump {
  0% { height: 6px; }
  100% { height: 26px; }
}

.stage-subtext {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 440px;
  line-height: 1.55;
}

/* Action Controls */
.action-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  margin-bottom: 24px;
  width: 100%;
}

.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 15px 36px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-blue-btn);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary-glow:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(37, 99, 235, 0.55);
}

.btn-primary-glow:active {
  transform: translateY(1px);
}

.btn-primary-glow.full-width {
  width: 100%;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.active-call-group {
  display: flex;
  gap: 14px;
}

.btn-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  box-shadow: var(--shadow-subtle);
  transition: all 0.2s ease;
}

.btn-control:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-control.active-muted {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.btn-control.danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
}

.btn-control.danger:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
}

/* Prompts Card */
.prompts-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompts-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.prompts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prompt-chip {
  font-size: 0.82rem;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: default;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Phone Outbound Form */
.phone-form-container {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.phone-icon-banner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  margin-bottom: 16px;
}

.phone-banner-icon {
  width: 28px;
  height: 28px;
}

.form-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.form-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 440px;
  margin-bottom: 24px;
}

.outbound-form {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.form-group input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.outbound-alert {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  width: 100%;
  max-width: 440px;
  text-align: left;
}

.outbound-alert.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.outbound-alert.error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

/* ==========================================================================
   Right Column: EHR System API Telemetry (White & Blue Theme)
   ========================================================================== */
.telemetry-stage-container {
  padding: 24px 28px;
}

.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.telemetry-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.telemetry-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
}

.telemetry-icon {
  width: 20px;
  height: 20px;
}

.telemetry-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.telemetry-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.telemetry-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--primary-blue);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.clock-icon {
  width: 14px;
  height: 14px;
}

.btn-subtle {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-subtle:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

/* Telemetry Metrics Bar */
.telemetry-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.metric-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.metric-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.metric-value {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #0f172a;
}

.status-active {
  color: var(--accent-emerald);
}

/* Feed Container */
.telemetry-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 240px;
  max-height: 620px;
  padding-right: 4px;
}

/* Empty State */
.feed-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
}

.empty-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  margin-bottom: 16px;
}

.empty-icon-box svg {
  width: 26px;
  height: 26px;
}

.feed-empty-state h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.feed-empty-state p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 380px;
  margin-bottom: 20px;
}

.pipeline-preview-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.step-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-blue);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

/* Dynamic Telemetry Cards */
.telemetry-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.telemetry-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slide-down 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.telemetry-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  border-color: #cbd5e1;
}

.telemetry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-blue);
}

.telemetry-card.tool-lookup::before { background: var(--accent-emerald); }
.telemetry-card.tool-route::before { background: var(--accent-cyan); }
.telemetry-card.tool-slots::before { background: var(--accent-indigo); }
.telemetry-card.tool-book::before { background: var(--accent-violet); }
.telemetry-card.tool-sms::before { background: var(--accent-amber); }

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.card-icon {
  width: 17px;
  height: 17px;
}

.card-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-latency-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.card-status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.card-details-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.5;
  word-break: break-word;
}

.detail-highlight {
  color: var(--primary-blue);
  font-weight: 700;
}

.detail-success {
  color: #059669;
  font-weight: 700;
}

.detail-amber {
  color: #b45309;
  font-weight: 600;
}

.detail-danger {
  color: #e11d48;
  font-weight: 700;
}

/* Footer */
.app-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  padding: 8px 0;
}

/* Custom Scrollbar for Telemetry Feed */
.telemetry-feed::-webkit-scrollbar {
  width: 6px;
}

.telemetry-feed::-webkit-scrollbar-track {
  background: transparent;
}

.telemetry-feed::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 3px;
}

.telemetry-feed::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

/* Security Modal Overlay (White & Blue Theme) */
.security-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.security-modal-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  max-width: 520px;
  width: 100%;
  padding: 28px 32px;
  animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.security-banner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.security-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  margin-bottom: 4px;
}

.security-icon-circle svg {
  width: 26px;
  height: 26px;
}

.security-banner-content h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.security-banner-content p {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
}

.security-banner-content code {
  background: #f1f5f9;
  color: #1e293b;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.security-steps-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  text-align: left;
  font-size: 0.82rem;
  color: #334155;
  width: 100%;
}

.security-steps-box ol {
  margin-top: 8px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   Outbound Confirmation Monitor & Patient Details Card Styles
   ========================================================================== */

.telemetry-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.telemetry-icon-box.outbound-theme {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--primary-blue);
  border-color: #bfdbfe;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid transparent;
}

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

.live-tag.standby {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}
.live-tag.standby .live-dot { background: #94a3b8; }

.live-tag.ringing {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}
.live-tag.ringing .live-dot {
  background: #f59e0b;
  animation: pulseDot 1.2s infinite;
}

.live-tag.connected {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.live-tag.connected .live-dot {
  background: #2563eb;
  animation: pulseDot 1s infinite;
}

.live-tag.confirmed {
  background: #d1fae5;
  color: #065f46;
  border-color: #a7f3d0;
}
.live-tag.confirmed .live-dot { background: #10b981; }

.live-tag.cancelled {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}
.live-tag.cancelled .live-dot { background: #ef4444; }

.outbound-active-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

/* Patient Profile Card */
.patient-profile-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.patient-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.patient-avatar-box {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.patient-name-block {
  flex: 1;
}

.patient-name {
  font-size: 1.12rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.patient-clinic {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

.patient-status-badge {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.patient-status-badge.ringing {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.patient-status-badge.connected {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.patient-status-badge.confirmed {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.patient-status-badge.cancelled {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.patient-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.detail-cell {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

.detail-value.mono {
  font-family: var(--font-mono);
  color: var(--primary-blue);
  font-size: 0.86rem;
}

/* Call Timeline Stepper */
.call-timeline-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

.timeline-title {
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin-bottom: 14px;
}

.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 26px;
  bottom: -10px;
  width: 2px;
  background: #e2e8f0;
}

.timeline-step.done:not(:last-child)::after {
  background: #10b981;
}

.timeline-step.active:not(:last-child)::after {
  background: #bfdbfe;
}

.step-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-step.active .step-indicator {
  background: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.timeline-step.done .step-indicator {
  background: #ecfdf5;
  border-color: #10b981;
  color: #10b981;
}

.step-body {
  display: flex;
  flex-direction: column;
  padding-top: 3px;
}

.step-heading {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1e293b;
}

.step-sub {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 2px;
}

/* Outcome Card */
.outcome-card {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.outcome-card.awaiting {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.outcome-card.confirmed {
  background: #ecfdf5;
  border-color: #6ee7b7;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

.outcome-card.cancelled {
  background: #fff1f2;
  border-color: #fecdd3;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.12);
}

.outcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.outcome-tag {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.outcome-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.outcome-badge.pending {
  background: #f1f5f9;
  color: #64748b;
}

.outcome-badge.confirmed {
  background: #10b981;
  color: #ffffff;
}

.outcome-badge.cancelled {
  background: #e11d48;
  color: #ffffff;
}

.outcome-details-text {
  font-size: 0.86rem;
  line-height: 1.5;
  color: #334155;
  font-weight: 500;
}

