/* ============================================
   COMPONENTS — Cards, Buttons, Badges, etc.
   ============================================ */

/* ---- Glass Card ---- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 199, 214, 0.2), transparent);
}

.card:hover {
  background: var(--surface-card-hover);
  border-color: rgba(148, 199, 214, 0.25);
  transform: translateY(-2px);
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  box-shadow: var(--glow-blue);
}

/* ---- Patient Status Card (Command Center) ---- */
.patient-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-base);
  position: relative;
}

.patient-card .status-indicator {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.patient-card .status-indicator.stable {
  background: var(--status-stable);
  box-shadow: var(--glow-green);
}

.patient-card .status-indicator.warning {
  background: var(--status-warning);
  box-shadow: var(--glow-yellow);
  animation: pulse-warning 2s infinite;
}

.patient-card .status-indicator.critical {
  background: var(--status-critical);
  box-shadow: var(--glow-red);
  animation: pulse-critical 1s infinite;
}

.patient-card .patient-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.patient-card .patient-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.patient-card .vital-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) 0;
  border-top: 1px solid var(--surface-glass-border);
}

.patient-card .vital-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.patient-card .vital-value {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

.patient-card .vital-value.in-range { color: var(--status-stable); }
.patient-card .vital-value.warning { color: var(--status-warning); }
.patient-card .vital-value.critical { color: var(--status-critical); }

.patient-card .trend-arrow {
  font-size: var(--text-xs);
  margin-left: var(--space-xs);
}

.patient-card.alert-active {
  border-color: var(--status-critical);
  box-shadow: var(--glow-red);
  animation: card-alert 0.5s ease;
}

/* ---- Condition Card ---- */
.condition-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.condition-card:hover {
  background: var(--surface-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--glow-blue);
}

.condition-card .condition-icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
  display: block;
}

.condition-card .condition-name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.condition-card .condition-code {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: monospace;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--welby-medium-blue);
  color: var(--welby-black);
}

.btn-primary:hover {
  background: var(--welby-light-blue);
  box-shadow: var(--glow-blue-strong);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--welby-medium-blue);
  border: 1px solid var(--welby-medium-blue);
}

.btn-outline:hover {
  background: var(--surface-glass);
  box-shadow: var(--glow-blue);
}

.btn-ghost {
  background: var(--surface-glass);
  color: var(--text-primary);
  border: 1px solid var(--surface-glass-border);
}

.btn-ghost:hover {
  background: var(--surface-card);
  border-color: var(--welby-medium-blue);
}

.btn-danger {
  background: rgba(240, 82, 69, 0.15);
  color: var(--welby-red);
  border: 1px solid rgba(240, 82, 69, 0.3);
}

.btn-danger:hover {
  background: rgba(240, 82, 69, 0.25);
  box-shadow: var(--glow-red);
}

.btn-lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-base);
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-stable {
  background: rgba(74, 222, 128, 0.15);
  color: var(--status-stable);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-warning {
  background: rgba(251, 180, 101, 0.15);
  color: var(--status-warning);
  border: 1px solid rgba(251, 180, 101, 0.3);
}

.badge-critical {
  background: rgba(240, 82, 69, 0.15);
  color: var(--status-critical);
  border: 1px solid rgba(240, 82, 69, 0.3);
}

.badge-info {
  background: rgba(148, 199, 214, 0.15);
  color: var(--status-info);
  border: 1px solid rgba(148, 199, 214, 0.3);
}

/* ---- Alert Card ---- */
.alert-card {
  background: var(--surface-card);
  border-left: 3px solid;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  animation: slideInRight 0.4s ease;
}

.alert-card.alert-critical {
  border-left-color: var(--status-critical);
  background: rgba(240, 82, 69, 0.05);
}

.alert-card.alert-warning {
  border-left-color: var(--status-warning);
  background: rgba(251, 180, 101, 0.05);
}

.alert-card.alert-info {
  border-left-color: var(--status-info);
  background: rgba(148, 199, 214, 0.05);
}

.alert-card .alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
}

.alert-card .alert-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.alert-card .alert-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.alert-card .alert-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Stat Card ---- */
.stat-card {
  text-align: center;
  padding: var(--space-xl);
}

.stat-value {
  font-family: var(--font-accent);
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  color: var(--welby-medium-blue);
  line-height: 1;
  margin-bottom: var(--space-xs);
  text-shadow: var(--glow-blue);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- Acuity Table ---- */
.acuity-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
}

.acuity-table thead th {
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: var(--text-xs);
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--surface-glass-border);
}

.acuity-table thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
.acuity-table thead th:last-child { border-radius: 0 var(--radius-md) 0 0; }

.acuity-table tbody td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--surface-glass-border);
  vertical-align: top;
}

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

.acuity-table .acuity-low { color: var(--status-stable); }
.acuity-table .acuity-medium { color: var(--status-warning); }
.acuity-table .acuity-high { color: var(--status-critical); }

/* ---- Pathway Node ---- */
.pathway-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.pathway-node .node-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-glass);
  border: 2px solid var(--surface-glass-border);
  font-size: var(--text-xl);
  transition: all var(--transition-base);
}

.pathway-node:hover .node-circle,
.pathway-node.active .node-circle {
  border-color: var(--welby-medium-blue);
  box-shadow: var(--glow-blue);
  background: rgba(148, 199, 214, 0.15);
}

.pathway-node .node-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  max-width: 100px;
  transition: color var(--transition-fast);
}

.pathway-node.active .node-label {
  color: var(--welby-medium-blue);
}

.pathway-connector {
  flex: 1;
  height: 2px;
  background: var(--surface-glass-border);
  position: relative;
  align-self: center;
  margin-top: -40px;
}

.pathway-connector .connector-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--welby-medium-blue);
  box-shadow: var(--glow-blue);
  transition: width 0.8s ease;
  width: 0%;
}

.pathway-connector .patient-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--welby-light-blue);
  box-shadow: var(--glow-blue-strong);
  transition: left 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Modal / Overlay ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 42, 48, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--surface-secondary);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-xl);
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-2xl);
  position: relative;
  animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-muted);
  font-size: var(--text-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--surface-card);
  color: var(--text-primary);
}

/* ---- Escalation Ladder ---- */
.escalation-ladder {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.escalation-step {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  transition: all var(--transition-base);
}

.escalation-step.active {
  border-color: currentColor;
  box-shadow: 0 0 15px currentColor;
}

.escalation-step .step-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.escalation-step .step-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.escalation-step .step-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ---- Tab System ---- */
.tabs {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-xs);
  background: var(--surface-glass);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-glass-border);
  width: fit-content;
  margin: 0 auto var(--space-xl);
  flex-wrap: wrap;
  justify-content: center;
}

.tab {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-primary);
}

.tab:hover {
  color: var(--text-primary);
  background: var(--surface-card);
}

.tab.active {
  color: var(--welby-black);
  background: var(--welby-medium-blue);
  font-weight: var(--weight-semibold);
}

/* ---- Quiz ---- */
.quiz-option {
  display: block;
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-sm);
}

.quiz-option:hover {
  background: var(--surface-card);
  border-color: var(--welby-medium-blue);
}

.quiz-option.correct {
  background: rgba(74, 222, 128, 0.1);
  border-color: var(--status-stable);
  color: var(--status-stable);
}

.quiz-option.incorrect {
  background: rgba(240, 82, 69, 0.1);
  border-color: var(--status-critical);
  color: var(--status-critical);
}

/* ---- Revenue Calculator ---- */
.calc-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--surface-glass-border);
  border-radius: var(--radius-full);
  outline: none;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--welby-medium-blue);
  cursor: pointer;
  box-shadow: var(--glow-blue);
}

/* ---- Toggle Chips ---- */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.chip {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-primary);
}

.chip:hover { border-color: var(--welby-medium-blue); color: var(--text-secondary); }
.chip.active {
  background: rgba(148, 199, 214, 0.15);
  border-color: var(--welby-medium-blue);
  color: var(--welby-medium-blue);
}

/* ---- Progress Ring ---- */
.progress-ring {
  position: relative;
  width: 80px;
  height: 80px;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring .ring-bg {
  fill: none;
  stroke: var(--surface-glass-border);
  stroke-width: 4;
}

.progress-ring .ring-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.progress-ring .ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

/* ---- Alert Panel Header & Badge ---- */
.alert-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  transition: background 0.3s ease;
  padding: var(--space-xs) 0;
}

.alert-panel-header.flash {
  background: rgba(240, 82, 69, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-xs) var(--space-sm);
}

.alert-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--status-critical);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  animation: pulse-critical 2s infinite;
}

/* ---- Order Modal Options ---- */
.order-option {
  display: block;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.order-option:hover {
  background: var(--surface-glass);
  border-color: var(--welby-medium-blue);
}
.order-option.selected {
  background: rgba(148, 199, 214, 0.12);
  border-color: var(--welby-medium-blue);
  box-shadow: inset 0 0 0 1px var(--welby-medium-blue);
}

/* ---- Trigger Alert Button ---- */
.btn-trigger-alert {
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  font-family: var(--font-primary);
  color: var(--welby-red);
  background: rgba(240, 82, 69, 0.1);
  border: 1px solid rgba(240, 82, 69, 0.3);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-trigger-alert:hover {
  background: rgba(240, 82, 69, 0.25);
  border-color: var(--welby-red);
  box-shadow: var(--glow-red);
}

/* ---- Clinical Evaluation Panel ---- */
.clinical-eval {
  margin-top: var(--space-lg);
  border-top: 1px solid var(--surface-glass-border);
  padding-top: var(--space-md);
}

.clinical-eval-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--welby-medium-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.eval-section {
  margin-bottom: var(--space-md);
}

.eval-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  margin-bottom: var(--space-xs);
  transition: background var(--transition-fast);
  user-select: none;
}

.eval-section-header:hover {
  background: var(--surface-card-hover);
}

.eval-section-header .eval-section-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.eval-section-header .eval-section-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.eval-section-header .eval-chevron {
  font-size: var(--text-xs);
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.eval-section.collapsed .eval-section-body {
  display: none;
}

.eval-section.collapsed .eval-chevron {
  transform: rotate(-90deg);
}

.eval-section-body {
  padding: var(--space-xs) 0;
}

.eval-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: 4px 0;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}

.eval-item .eval-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 11px;
}

.eval-item .eval-text {
  flex: 1;
}

.eval-item .eval-meta {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
}

.eval-item.status-due {
  color: var(--status-critical);
}

.eval-item.status-pending {
  color: var(--status-warning);
}

.eval-item.status-complete {
  color: var(--status-stable);
}

.eval-item.status-na {
  color: var(--text-muted);
  opacity: 0.7;
}

.eval-item.referral-needed {
  color: var(--status-warning);
}

.eval-order-btn {
  display: inline-block;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(240, 82, 69, 0.15);
  color: var(--status-critical);
  border: 1px solid rgba(240, 82, 69, 0.3);
  border-radius: var(--radius-full);
  cursor: pointer;
  margin-left: var(--space-xs);
  transition: all var(--transition-fast);
}

.eval-order-btn:hover {
  background: rgba(240, 82, 69, 0.25);
  box-shadow: var(--glow-red);
}

.eval-device-status {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 0;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.eval-device-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.eval-device-dot.active {
  background: var(--status-stable);
  box-shadow: var(--glow-green);
  animation: pulse-stable 2s infinite;
}

.eval-device-dot.inactive {
  background: var(--text-muted);
}

.eval-device-sync {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
}

.eval-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.eval-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--weight-semibold);
}

.eval-summary-badge.labs-due {
  background: rgba(240, 82, 69, 0.12);
  color: var(--status-critical);
  border: 1px solid rgba(240, 82, 69, 0.25);
}

.eval-summary-badge.referrals-needed {
  background: rgba(251, 180, 101, 0.12);
  color: var(--status-warning);
  border: 1px solid rgba(251, 180, 101, 0.25);
}

.eval-summary-badge.devices-active {
  background: rgba(74, 222, 128, 0.12);
  color: var(--status-stable);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.eval-summary-badge.alerts-count {
  background: rgba(240, 82, 69, 0.12);
  color: var(--status-critical);
  border: 1px solid rgba(240, 82, 69, 0.25);
}

/* ---- Acuity Classifier Wizard ---- */
.acw-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.acw-header h2 {
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.acw-header p {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.acw-mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.acw-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-primary);
  color: var(--text-primary);
}
.acw-mode-btn:hover {
  background: var(--surface-card);
  border-color: var(--welby-medium-blue);
  box-shadow: var(--glow-blue);
  transform: translateY(-2px);
}
.acw-mode-btn .acw-mode-icon {
  font-size: var(--text-3xl);
}
.acw-mode-btn .acw-mode-label {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}
.acw-mode-btn .acw-mode-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

/* Steps indicator */
.acw-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}
.acw-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-glass-border);
  transition: all var(--transition-base);
}
.acw-step-dot.active {
  background: var(--welby-medium-blue);
  box-shadow: var(--glow-blue);
  transform: scale(1.3);
}
.acw-step-dot.complete {
  background: var(--status-stable);
  box-shadow: var(--glow-green);
}
.acw-step-connector {
  width: 24px;
  height: 2px;
  background: var(--surface-glass-border);
  transition: background var(--transition-base);
}
.acw-step-connector.complete {
  background: var(--status-stable);
}

/* Wizard card content */
.acw-card {
  animation: acwFadeIn 0.4s ease;
}
@keyframes acwFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.acw-card-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}
.acw-card-title .acw-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--welby-medium-blue);
  color: var(--welby-black);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}
.acw-card-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.acw-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--surface-glass);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
}
.acw-result-label {
  color: var(--text-muted);
}
.acw-result-value {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

/* Acuity meter bar */
.acw-meter-wrapper {
  margin-bottom: var(--space-lg);
}
.acw-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.acw-meter-track {
  height: 8px;
  background: var(--surface-glass);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.acw-meter-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), background 0.6s ease;
  box-shadow: 0 0 8px currentColor;
}
.acw-meter-fill.low {
  background: var(--status-stable);
  color: var(--status-stable);
}
.acw-meter-fill.medium {
  background: var(--status-warning);
  color: var(--status-warning);
}
.acw-meter-fill.high {
  background: var(--status-critical);
  color: var(--status-critical);
}
.acw-meter-text {
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  margin-top: var(--space-xs);
  transition: color var(--transition-base);
}

/* Wizard form elements */
.acw-select, .acw-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}
.acw-select:focus, .acw-input:focus {
  border-color: var(--welby-medium-blue);
}
.acw-form-group {
  margin-bottom: var(--space-md);
}
.acw-form-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.acw-option-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.acw-option-btn {
  padding: var(--space-sm) var(--space-md);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.acw-option-btn:hover {
  border-color: var(--welby-medium-blue);
  color: var(--text-primary);
}
.acw-option-btn.selected {
  background: rgba(148, 199, 214, 0.15);
  border-color: var(--welby-medium-blue);
  color: var(--welby-medium-blue);
  font-weight: var(--weight-semibold);
}

/* Navigation buttons */
.acw-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--surface-glass-border);
}

/* Final result */
.acw-final-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
  text-align: center;
  animation: acwFadeIn 0.5s ease;
}
.acw-final-badge.low {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.acw-final-badge.medium {
  background: rgba(251, 180, 101, 0.1);
  border: 1px solid rgba(251, 180, 101, 0.3);
}
.acw-final-badge.high {
  background: rgba(240, 82, 69, 0.1);
  border: 1px solid rgba(240, 82, 69, 0.3);
}
.acw-final-level {
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.acw-final-badge.low .acw-final-level { color: var(--status-stable); }
.acw-final-badge.medium .acw-final-level { color: var(--status-warning); }
.acw-final-badge.high .acw-final-level { color: var(--status-critical); }

/* Demo auto-play indicator */
.acw-auto-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--welby-medium-blue);
  padding: 2px 8px;
  background: rgba(148, 199, 214, 0.1);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}
.acw-auto-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--welby-medium-blue);
  animation: pulse-stable 1.5s infinite;
}

/* Patient picker grid */
.acw-patient-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.acw-patient-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-primary);
  color: var(--text-primary);
}
.acw-patient-btn:hover {
  border-color: var(--welby-medium-blue);
  background: var(--surface-card);
}
.acw-patient-btn .acw-patient-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.acw-patient-btn .acw-patient-info {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

/* ============================================
   WORKFLOW TIMELINE
   ============================================ */

.wf-header { margin-bottom: var(--space-xl); }
.wf-header h2 { font-family: var(--font-accent); font-size: var(--text-3xl); font-weight: var(--weight-bold); margin-bottom: var(--space-xs); }
.wf-header .wf-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 2px; color: var(--accent-primary); margin-bottom: var(--space-sm); }
.wf-header p { font-size: var(--text-sm); color: var(--text-muted); }

.wf-controls {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md); margin-bottom: var(--space-lg);
  background: var(--surface-glass); border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
}
.wf-play-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-primary); border: none; color: #fff;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.wf-play-btn:hover { transform: scale(1.1); box-shadow: 0 0 16px var(--accent-glow); }
.wf-speed-group { display: flex; gap: var(--space-xs); }
.wf-speed-btn {
  padding: 4px 12px; border-radius: 20px; border: 1px solid var(--surface-glass-border);
  background: transparent; color: var(--text-muted); font-size: var(--text-xs);
  cursor: pointer; transition: all 0.2s;
}
.wf-speed-btn.active { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }
.wf-current-time { margin-left: auto; font-family: var(--font-accent); font-size: var(--text-lg); color: var(--accent-primary); }

.wf-progress {
  width: 100%; height: 6px; border-radius: 3px;
  background: var(--surface-glass); margin-bottom: var(--space-xl); position: relative;
}
.wf-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--welby-light-blue));
  transition: width 0.5s ease; width: 0%;
}
.wf-progress-labels {
  display: flex; justify-content: space-between;
  font-size: var(--text-xs); color: var(--text-muted); margin-top: 4px;
}

.wf-timeline { position: relative; padding-left: 48px; }
.wf-timeline::before {
  content: ''; position: absolute; left: 19px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--accent-primary) 0%, var(--surface-glass-border) 100%);
}

.wf-event { position: relative; margin-bottom: var(--space-lg); cursor: pointer; }
.wf-event-dot {
  position: absolute; left: -48px; top: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--surface-card); z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; transition: all 0.3s;
}
.wf-event.active .wf-event-dot {
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--accent-glow);
}
.wf-event.active .wf-event-dot::after {
  content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%;
  border: 2px solid var(--accent-primary); animation: wfPulse 1.5s infinite;
}
@keyframes wfPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

.wf-event-time {
  font-family: var(--font-accent); font-size: var(--text-xs);
  color: var(--text-muted); margin-bottom: 4px;
}
.wf-event-content {
  background: var(--surface-card); border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg); padding: var(--space-md);
  transition: all 0.3s;
}
.wf-event:hover .wf-event-content { border-color: var(--accent-primary); }
.wf-event.active .wf-event-content {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(0,200,200,0.1);
}
.wf-event-title {
  display: flex; align-items: center; gap: var(--space-sm);
  font-weight: var(--weight-semibold); font-size: var(--text-sm); margin-bottom: 4px;
}
.wf-event-type { font-size: var(--text-xs); padding: 2px 8px; border-radius: 10px; background: var(--surface-glass); }
.wf-event-summary { font-size: var(--text-xs); color: var(--text-secondary); }
.wf-event-expand { float: right; color: var(--text-muted); font-size: 12px; transition: transform 0.3s; }
.wf-event.expanded .wf-event-expand { transform: rotate(180deg); }

.wf-event-detail {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  margin-top: 0;
}
.wf-event.expanded .wf-event-detail { max-height: 400px; margin-top: var(--space-md); }
.wf-detail-desc { font-size: var(--text-xs); color: var(--text-secondary); margin-bottom: var(--space-sm); line-height: 1.6; }
.wf-detail-actions {
  list-style: none; padding: 0; margin: 0 0 var(--space-sm);
}
.wf-detail-actions li {
  font-size: var(--text-xs); color: var(--text-secondary); padding: 4px 0;
  padding-left: 20px; position: relative;
}
.wf-detail-actions li::before { content: '✓'; position: absolute; left: 0; color: var(--status-stable); }
.wf-detail-meta {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-sm);
  padding-top: var(--space-sm); border-top: 1px solid var(--surface-glass-border);
}
.wf-detail-meta-item { font-size: var(--text-xs); }
.wf-detail-meta-item .label { color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-size: 9px; }
.wf-detail-meta-item .value { color: var(--text-primary); margin-top: 2px; }

.wf-summary {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-md);
  margin-top: var(--space-2xl); padding-top: var(--space-xl);
  border-top: 1px solid var(--surface-glass-border);
}
.wf-stat {
  text-align: center; padding: var(--space-md);
  background: var(--surface-glass); border-radius: var(--radius-lg);
  border: 1px solid var(--surface-glass-border);
}
.wf-stat-value {
  font-family: var(--font-accent); font-size: var(--text-2xl);
  font-weight: var(--weight-bold); color: var(--accent-primary);
}
.wf-stat-label { font-size: var(--text-xs); color: var(--text-muted); margin-top: 4px; }


/* ============================================
   PATIENT EXPERIENCE PHONE MOCKUP
   ============================================ */

.pe-layout {
  display: flex; gap: var(--space-2xl); align-items: flex-start;
  justify-content: center; padding: var(--space-lg) 0;
}
.pe-header { margin-bottom: var(--space-xl); text-align: center; }
.pe-header h2 { font-family: var(--font-accent); font-size: var(--text-3xl); font-weight: var(--weight-bold); margin-bottom: var(--space-xs); }
.pe-header .pe-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 2px; color: var(--accent-primary); margin-bottom: var(--space-sm); }
.pe-header p { font-size: var(--text-sm); color: var(--text-muted); max-width: 500px; margin: 0 auto; }

.pe-phone-wrapper { position: relative; flex-shrink: 0; }

.pe-phone-frame {
  width: 280px; height: 580px; border-radius: 40px;
  background: #1a1a1a; padding: 10px;
  box-shadow: 0 0 0 2px #333, 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(0,200,200,0.05);
  position: relative;
}
.pe-phone-notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 28px; background: #1a1a1a; border-radius: 0 0 16px 16px;
  z-index: 10;
}
.pe-phone-notch::after {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: #333;
}
.pe-phone-screen {
  width: 100%; height: 100%; border-radius: 30px;
  background: #ffffff; overflow: hidden; position: relative;
}
.pe-phone-statusbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px 6px; font-size: 12px; font-weight: 600;
  color: #1a1a1a; position: relative; z-index: 5;
}
.pe-phone-statusbar .pe-signal { letter-spacing: -1px; }

.pe-phone-content {
  height: calc(100% - 40px); overflow-y: auto; position: relative;
}
.pe-phone-content::-webkit-scrollbar { display: none; }

/* Phone screen types - all use LIGHT theme */
.pe-screen { padding: 16px; color: #1a1a1a; font-size: 13px; animation: peSlideIn 0.3s ease; }
@keyframes peSlideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* Device Reading */
.pe-reading-device { text-align: center; padding: 8px; color: #666; font-size: 11px; margin-bottom: 12px; background: #f5f5f5; border-radius: 8px; }
.pe-reading-value { font-size: 48px; font-weight: 700; color: #1a1a1a; text-align: center; margin: 20px 0 8px; }
.pe-reading-unit { font-size: 14px; color: #888; text-align: center; }
.pe-reading-status {
  text-align: center; padding: 8px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600; margin: 16px auto; display: inline-block;
}
.pe-reading-status.in-range { background: #e8f5e9; color: #2e7d32; }
.pe-reading-status.above-target { background: #fff3e0; color: #e65100; }
.pe-reading-message { text-align: center; color: #666; font-size: 12px; margin-top: 12px; }
.pe-reading-time { text-align: center; color: #aaa; font-size: 11px; margin-top: 8px; }

/* SMS */
.pe-sms-header { padding: 8px 0 12px; text-align: center; font-weight: 600; color: #1a1a1a; border-bottom: 1px solid #eee; margin-bottom: 12px; font-size: 14px; }
.pe-sms-bubble {
  max-width: 85%; padding: 10px 14px; border-radius: 18px;
  margin-bottom: 6px; font-size: 13px; line-height: 1.4;
  clear: both; position: relative;
}
.pe-sms-bubble.welby {
  background: #e9e9eb; color: #1a1a1a; float: left; border-bottom-left-radius: 4px;
}
.pe-sms-bubble.patient {
  background: #007aff; color: #fff; float: right; border-bottom-right-radius: 4px;
}
.pe-sms-time { clear: both; text-align: center; font-size: 10px; color: #aaa; padding: 8px 0; }

/* Incoming Call */
.pe-call-screen {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff; text-align: center;
  height: 100%; padding: 40px 16px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
}
.pe-call-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--welby-light-blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 12px;
}
.pe-call-name { font-size: 22px; font-weight: 600; }
.pe-call-org { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; }
.pe-call-label { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 20px; letter-spacing: 1px; text-transform: uppercase; }
.pe-call-actions { display: flex; gap: 60px; margin-top: auto; }
.pe-call-btn {
  width: 64px; height: 64px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; cursor: pointer;
}
.pe-call-btn.decline { background: #ff3b30; }
.pe-call-btn.accept { background: #34c759; }

/* Active Call */
.pe-call-active {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff; text-align: center; height: 100%; padding: 40px 16px;
  display: flex; flex-direction: column; align-items: center;
}
.pe-call-timer { font-size: 36px; font-weight: 300; margin: 16px 0; font-variant-numeric: tabular-nums; }
.pe-call-notes { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 20px; padding: 0 16px; line-height: 1.5; }

/* Education */
.pe-edu-card {
  background: #f8f9fa; border-radius: 12px; overflow: hidden; margin-top: 8px;
}
.pe-edu-hero { height: 100px; background: linear-gradient(135deg, #667eea, #764ba2); display: flex; align-items: center; justify-content: center; font-size: 36px; }
.pe-edu-body { padding: 16px; }
.pe-edu-category { font-size: 11px; text-transform: uppercase; color: #888; letter-spacing: 1px; margin-bottom: 6px; }
.pe-edu-title { font-size: 17px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; }
.pe-edu-preview { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 12px; }
.pe-edu-btn { display: block; text-align: center; padding: 10px; background: #007aff; color: #fff; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }

/* Notification / Med Reminder */
.pe-lockscreen {
  background: linear-gradient(135deg, #1a1a2e, #0f3460); height: 100%;
  padding: 50px 16px 20px; color: #fff; text-align: center;
}
.pe-lock-time { font-size: 56px; font-weight: 200; }
.pe-lock-date { font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 4px; }
.pe-notification-card {
  margin-top: 40px; background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
  border-radius: 14px; padding: 14px; text-align: left;
  animation: peNotifSlide 0.5s ease;
}
@keyframes peNotifSlide { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pe-notif-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pe-notif-icon { width: 24px; height: 24px; border-radius: 6px; background: var(--accent-primary); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.pe-notif-app { font-size: 12px; color: rgba(255,255,255,0.7); }
.pe-notif-body { font-size: 14px; line-height: 1.4; }

/* Weekly Summary */
.pe-summary-header { text-align: center; padding: 8px 0 16px; }
.pe-summary-period { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.pe-summary-grade { font-size: 48px; font-weight: 800; margin: 8px 0; }
.pe-summary-grade.good { color: #2e7d32; }
.pe-summary-msg { font-size: 13px; color: #666; }
.pe-summary-stats { margin-top: 16px; }
.pe-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #f0f0f0;
}
.pe-summary-label { font-size: 13px; color: #444; }
.pe-summary-val { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.pe-summary-trend { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.pe-summary-trend.improving { background: #e8f5e9; color: #2e7d32; }
.pe-summary-trend.stable { background: #e3f2fd; color: #1565c0; }

/* Context panel */
.pe-context {
  width: 340px; flex-shrink: 0;
}
.pe-context-card {
  background: var(--surface-card); border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
}
.pe-context-time { font-size: var(--text-xs); color: var(--accent-primary); font-family: var(--font-accent); margin-bottom: var(--space-xs); }
.pe-context-title { font-size: var(--text-lg); font-weight: var(--weight-semibold); margin-bottom: var(--space-sm); }
.pe-context-desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--space-lg); }
.pe-bts-title {
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); margin-bottom: var(--space-sm);
}
.pe-bts-list { list-style: none; padding: 0; margin: 0; }
.pe-bts-list li {
  font-size: var(--text-xs); color: var(--text-secondary); padding: 6px 0;
  padding-left: 20px; position: relative; line-height: 1.4;
}
.pe-bts-list li::before { content: '⚡'; position: absolute; left: 0; }

/* Navigation */
.pe-nav {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-md); margin-top: var(--space-xl);
}
.pe-nav-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-glass); border: 1px solid var(--surface-glass-border);
  color: var(--text-primary); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.pe-nav-btn:hover { background: var(--accent-primary); color: #fff; }
.pe-dots { display: flex; gap: 6px; }
.pe-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--surface-glass-border); transition: all 0.3s;
}
.pe-dot.active { background: var(--accent-primary); transform: scale(1.3); }
.pe-auto-toggle {
  padding: 4px 12px; border-radius: 20px; border: 1px solid var(--surface-glass-border);
  background: transparent; color: var(--text-muted); font-size: var(--text-xs);
  cursor: pointer; transition: all 0.2s;
}
.pe-auto-toggle.active { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }


/* ============================================
   STAFFING CALCULATOR
   ============================================ */

.staff-header { margin-bottom: var(--space-xl); }
.staff-header h2 { font-family: var(--font-accent); font-size: var(--text-3xl); font-weight: var(--weight-bold); margin-bottom: var(--space-xs); }
.staff-header .staff-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 2px; color: var(--accent-primary); margin-bottom: var(--space-sm); }
.staff-header p { font-size: var(--text-sm); color: var(--text-muted); }

.staff-inputs {
  display: grid; grid-template-columns: 1fr 2fr; gap: var(--space-xl);
  margin-bottom: var(--space-xl); padding: var(--space-lg);
  background: var(--surface-glass); border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
}
.staff-panel-group { text-align: center; }
.staff-panel-value {
  font-family: var(--font-accent); font-size: var(--text-5xl);
  font-weight: var(--weight-bold); color: var(--accent-primary);
  line-height: 1; margin: var(--space-md) 0;
}
.staff-panel-label { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.staff-slider {
  -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px;
  background: var(--surface-glass); outline: none; margin: var(--space-sm) 0;
}
.staff-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-primary); cursor: pointer;
  box-shadow: 0 0 10px var(--accent-glow);
}
.staff-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-primary); cursor: pointer; border: none;
}

.staff-acuity-group { display: flex; flex-direction: column; gap: var(--space-md); }
.staff-acuity-row { display: flex; align-items: center; gap: var(--space-md); }
.staff-acuity-label { width: 80px; font-size: var(--text-sm); color: var(--text-secondary); }
.staff-acuity-val { width: 50px; text-align: right; font-family: var(--font-accent); font-weight: var(--weight-bold); color: var(--text-primary); }
.staff-acuity-slider { flex: 1; }

.staff-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.staff-metric {
  text-align: center; padding: var(--space-lg);
  background: var(--surface-card); border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg); position: relative; overflow: hidden;
}
.staff-metric::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.staff-metric.welby::before { background: var(--accent-primary); }
.staff-metric.industry::before { background: var(--text-muted); }
.staff-metric.savings::before { background: var(--status-stable); }
.staff-metric.breakeven::before { background: var(--status-info); }
.staff-metric-value {
  font-family: var(--font-accent); font-size: var(--text-3xl);
  font-weight: var(--weight-bold); margin-bottom: var(--space-xs);
}
.staff-metric.welby .staff-metric-value { color: var(--accent-primary); }
.staff-metric.industry .staff-metric-value { color: var(--text-muted); }
.staff-metric.savings .staff-metric-value { color: var(--status-stable); }
.staff-metric.breakeven .staff-metric-value { color: var(--status-info); }
.staff-metric-label { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.staff-metric-badge {
  display: inline-block; margin-top: var(--space-sm); padding: 2px 10px;
  border-radius: 10px; font-size: var(--text-xs); font-weight: var(--weight-semibold);
}
.staff-metric-badge.positive { background: rgba(46,125,50,0.15); color: var(--status-stable); }

.staff-charts {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.staff-chart {
  background: var(--surface-card); border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg); padding: var(--space-md);
}
.staff-chart-title {
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
  margin-bottom: var(--space-md); padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--surface-glass-border);
}

.staff-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface-card); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--surface-glass-border);
}
.staff-table th, .staff-table td {
  padding: var(--space-sm) var(--space-md); text-align: left;
  font-size: var(--text-sm); border-bottom: 1px solid var(--surface-glass-border);
}
.staff-table th {
  background: var(--surface-glass); font-weight: var(--weight-semibold);
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 1px;
}
.staff-table .welby-col { background: rgba(0,200,200,0.03); }
.staff-table th.welby-col { color: var(--accent-primary); }
.staff-table .metric-name { color: var(--text-secondary); }
.staff-table .highlight { font-weight: var(--weight-bold); color: var(--accent-primary); }
.staff-table .savings-row td {
  font-weight: var(--weight-bold); border-top: 2px solid var(--accent-primary);
  color: var(--status-stable);
}

/* ============================================
   SMS ONBOARDING SIMULATOR
   ============================================ */

.sms-sim-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-xl);
  align-items: start;
  min-height: 600px;
}

/* Phone Frame */
.sms-phone-frame {
  width: 320px;
  height: 640px;
  background: #000;
  border-radius: 40px;
  border: 3px solid #333;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 0 0 2px #1a1a1a;
  margin: 0 auto;
  flex-shrink: 0;
}

.sms-phone-notch {
  width: 120px;
  height: 28px;
  background: #000;
  border-radius: 0 0 16px 16px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.sms-phone-screen {
  position: absolute;
  inset: 12px;
  background: var(--surface-primary);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sms-header {
  padding: 36px var(--space-md) var(--space-sm);
  background: var(--surface-secondary);
  border-bottom: 1px solid var(--surface-glass-border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sms-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--welby-medium-blue), var(--welby-dark-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  font-weight: var(--weight-bold);
}

.sms-header-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.sms-header-status {
  font-size: 10px;
  color: var(--status-stable);
}

/* Message Area */
.sms-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  scroll-behavior: smooth;
}

.sms-messages::-webkit-scrollbar { width: 3px; }
.sms-messages::-webkit-scrollbar-thumb { background: var(--surface-glass-border); border-radius: 3px; }

.sms-input-bar {
  padding: var(--space-sm) var(--space-md);
  background: var(--surface-secondary);
  border-top: 1px solid var(--surface-glass-border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sms-input-field {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-family: var(--font-primary);
}

.sms-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--welby-medium-blue);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Message Bubbles */
.sms-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.45;
  animation: smsBubbleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  word-wrap: break-word;
  white-space: pre-line;
}

.sms-bubble.agent {
  align-self: flex-start;
  background: var(--surface-card);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.sms-bubble.patient {
  align-self: flex-end;
  background: var(--welby-medium-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.sms-typing {
  align-self: flex-start;
  padding: 10px 18px;
  background: var(--surface-card);
  border: 1px solid var(--surface-glass-border);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.sms-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s infinite;
}

.sms-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.sms-typing-dot:nth-child(3) { animation-delay: 0.4s; }

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

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

/* Scenario Cards */
.sms-scenarios {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.sms-scenario-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.sms-scenario-card:hover {
  border-color: var(--welby-medium-blue);
  transform: translateY(-1px);
}

.sms-scenario-card.active {
  border-color: var(--welby-medium-blue);
  background: rgba(148,199,214,0.08);
  box-shadow: var(--glow-blue);
}

/* Speed Controls */
.sms-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--surface-glass-border);
}

.sms-speed-btn {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sms-speed-btn.active {
  background: rgba(148,199,214,0.15);
  border-color: var(--welby-medium-blue);
  color: var(--welby-medium-blue);
}

/* Interactive Choice Buttons (Symptom Checker) */
.sms-choices {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 85%;
  animation: smsBubbleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sms-choice-btn {
  padding: 9px 14px;
  border-radius: 18px;
  border: 1.5px solid var(--welby-medium-blue);
  background: transparent;
  color: var(--welby-medium-blue);
  font-size: 12px;
  line-height: 1.35;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.sms-choice-btn:hover {
  background: var(--welby-medium-blue);
  color: #fff;
}

.sms-choice-btn.selected {
  background: var(--welby-medium-blue);
  color: #fff;
  opacity: 0.8;
  pointer-events: none;
}

/* Escalation Outcome Panel */
.sms-outcome {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
  animation: smsBubbleIn 0.4s ease;
}

.sms-outcome.green {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  color: var(--status-stable);
}

.sms-outcome.yellow {
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.25);
  color: var(--status-warning);
}

.sms-outcome.orange {
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.25);
  color: #f97316;
}

.sms-outcome.red {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  color: var(--status-critical);
}

/* Mode Tabs */
.sms-mode-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  justify-content: center;
}

.sms-mode-tab {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sms-mode-tab.active {
  background: rgba(148,199,214,0.15);
  border-color: var(--welby-medium-blue);
  color: var(--welby-medium-blue);
  font-weight: var(--weight-semibold);
}

.sms-mode-tab:hover:not(.active) {
  border-color: rgba(148,199,214,0.3);
  color: var(--text-secondary);
}

/* ============================================
   COMMAND CENTER DASHBOARD
   ============================================ */

/* Ops Metrics Bar */
.dash-metrics {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
}

.dash-metric {
  flex: 1;
  text-align: center;
}

.dash-metric-value {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

.dash-metric-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 3-Column Layout */
.dash-layout {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: var(--space-md);
  min-height: 500px;
}

.dash-panel {
  background: var(--surface-card);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dash-panel-wide { min-width: 0; }

.dash-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--surface-glass-border);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--text-primary);
  flex-shrink: 0;
}

/* Alert Queue */
.dash-alert-list {
  overflow-y: auto;
  max-height: 480px;
  padding: var(--space-xs);
}

.dash-alert {
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  border-left: 3px solid transparent;
  animation: smsBubbleIn 0.3s ease both;
}

.dash-alert.red { border-left-color: var(--status-critical); background: rgba(239,68,68,0.06); }
.dash-alert.orange { border-left-color: #f97316; background: rgba(249,115,22,0.06); }
.dash-alert.yellow { border-left-color: var(--status-warning); background: rgba(234,179,8,0.06); }

.dash-alert-header {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: 2px;
}

.dash-alert-patient {
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.dash-alert-time {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
}

.dash-alert-reason {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.dash-alert-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.dash-alert-nurse.unassigned {
  color: var(--status-warning);
  font-weight: var(--weight-semibold);
}

.dash-claim-btn {
  width: 100%;
  margin-top: var(--space-xs);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--welby-medium-blue);
  background: transparent;
  color: var(--welby-medium-blue);
  font-size: 11px;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dash-claim-btn:hover {
  background: var(--welby-medium-blue);
  color: #fff;
}

/* Patient Table */
.dash-table-wrap {
  overflow-y: auto;
  max-height: 480px;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
}

.dash-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: var(--weight-semibold);
  border-bottom: 1px solid var(--surface-glass-border);
  position: sticky;
  top: 0;
  background: var(--surface-card);
  z-index: 1;
}

.dash-table td {
  padding: 8px 12px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.dash-row { transition: background var(--transition-fast); }
.dash-row:hover { background: var(--surface-glass); }

.dash-row[style*="cursor"] .dash-patient-name {
  color: var(--welby-medium-blue);
}

.dash-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dash-status-dot.critical { background: var(--status-critical); box-shadow: 0 0 6px var(--status-critical); }
.dash-status-dot.warning { background: var(--status-warning); }
.dash-status-dot.stable { background: var(--status-stable); }

.dash-patient-name {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.dash-conditions {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.dash-reading.critical { color: var(--status-critical); font-weight: var(--weight-semibold); }
.dash-reading.warning { color: var(--status-warning); font-weight: var(--weight-semibold); }
.dash-reading.stable { color: var(--status-stable); }

.dash-sparkline {
  width: 84px;
  height: 24px;
}

.dash-filters {
  display: flex;
  gap: 4px;
}

.dash-filter-btn {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--surface-glass-border);
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dash-filter-btn.active {
  background: rgba(148,199,214,0.12);
  border-color: var(--welby-medium-blue);
  color: var(--welby-medium-blue);
}

/* Activity Feed */
.dash-activity-feed {
  overflow-y: auto;
  max-height: 480px;
  padding: var(--space-xs);
}

.dash-activity-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  animation: smsBubbleIn 0.3s ease both;
}

.dash-activity-item.new {
  background: rgba(148,199,214,0.06);
  border-radius: var(--radius-md);
}

.dash-activity-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

.dash-activity-text {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}

.dash-activity-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Compliance Heatmap */
.dash-heatmap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.heatmap-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.heatmap-name {
  width: 80px;
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-cells {
  display: flex;
  gap: 2px;
  flex: 1;
}

.heatmap-cell {
  flex: 1;
  height: 12px;
  border-radius: 2px;
  min-width: 4px;
}

.heatmap-cell.filled { background: rgba(0,200,200,0.5); }
.heatmap-cell.empty { background: rgba(255,255,255,0.04); }

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

/* ============================================
   30-DAY PATIENT JOURNEY TIMELINE
   ============================================ */

.journey-30-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.j30-day {
  display: flex;
  gap: var(--space-md);
  position: relative;
  animation: smsBubbleIn 0.4s ease both;
}

.j30-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
  z-index: 1;
}

.j30-connector {
  position: absolute;
  left: 5px;
  top: 18px;
  bottom: -2px;
  width: 2px;
  background: var(--surface-glass-border);
}

.j30-content {
  flex: 1;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-xs);
}

.j30-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.j30-icon { font-size: 16px; }

.j30-label {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.j30-events {
  padding-left: var(--space-xs);
}

.j30-event {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  padding: 2px 0;
  line-height: 1.5;
}

.j30-event::before {
  content: '\2022  ';
  color: var(--text-muted);
}

.j30-metrics {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-xs);
}

.j30-metric {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---- Voice Mode Call Animation ---- */
.voice-call-icon {
  position: relative;
  display: inline-block;
  width: 100px;
  height: 100px;
}

.voice-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--welby-medium-blue), var(--welby-dark-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.voice-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--welby-medium-blue);
  transform: translate(-50%, -50%);
  opacity: 0;
}

.voice-call-icon.ringing .voice-ring {
  animation: voiceRing 2s ease-out infinite;
}

.voice-ring.delay {
  animation-delay: 0.6s !important;
}

@keyframes voiceRing {
  0% { width: 80px; height: 80px; opacity: 0.6; }
  100% { width: 140px; height: 140px; opacity: 0; }
}

/* ---- Human Handoff Banner ---- */
.sms-handoff {
  text-align: center;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  animation: smsBubbleIn 0.4s ease;
  margin: var(--space-sm) 0;
}

.sms-handoff.red {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--status-critical);
}

.sms-handoff.orange {
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.3);
  color: #f97316;
}

.sms-handoff.yellow {
  background: rgba(234,179,8,0.12);
  border: 1px solid rgba(234,179,8,0.3);
  color: var(--status-warning);
}

/* ---- Escalation Chain ---- */
.escalation-step {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: var(--text-xs);
}

.escalation-step:last-child { border-bottom: none; }

.escalation-icon { font-size: 16px; flex-shrink: 0; }

.escalation-role {
  font-weight: var(--weight-semibold);
  color: inherit;
}

.escalation-action {
  font-size: 11px;
  opacity: 0.75;
}

.escalation-status {
  margin-left: auto;
  font-size: 14px;
  flex-shrink: 0;
}

.escalation-step.done { opacity: 0.6; }
.escalation-step.active { opacity: 1; }
.escalation-step.pending { opacity: 0.4; }

/* ============================================
   HOW IT WORKS — Integration Flow
   ============================================ */

.integration-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.integration-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.integration-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-base);
}

.integration-card:hover {
  border-color: rgba(148,199,214,0.25);
  transform: translateY(-2px);
}

.integration-output {
  border-color: rgba(0,200,200,0.15);
}

.integration-output:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--glow-green);
}

.integration-icon {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xs);
}

.integration-label {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  font-size: var(--text-sm);
  margin-bottom: 2px;
}

.integration-detail {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

/* Center Engine */
.integration-center {
  align-items: center;
}

.integration-engine {
  background: var(--surface-card);
  border: 2px solid var(--welby-medium-blue);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--glow-blue);
  position: relative;
}

.integration-engine::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(148,199,214,0.1), transparent, rgba(0,200,200,0.1));
  z-index: -1;
}

.engine-core {
  text-align: center;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--surface-glass-border);
}

.engine-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.engine-feature {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.engine-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--welby-medium-blue);
  flex-shrink: 0;
}

/* Go-Live Timeline */
.timeline-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 160px;
}

.timeline-week {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--welby-medium-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-glass);
  border: 2px solid var(--surface-glass-border);
  margin-bottom: var(--space-sm);
  transition: all var(--transition-base);
}

.timeline-dot.active {
  background: var(--welby-medium-blue);
  border-color: var(--welby-medium-blue);
  box-shadow: 0 0 12px rgba(148,199,214,0.4);
}

.timeline-connector {
  width: 60px;
  height: 2px;
  background: var(--surface-glass-border);
  margin-top: 34px;
  flex-shrink: 0;
}

.timeline-title {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  font-size: var(--text-sm);
  margin-bottom: 2px;
}

.timeline-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 900px) {
  .sms-sim-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .integration-flow {
    grid-template-columns: 1fr;
  }
  .timeline-bar {
    flex-direction: column;
    align-items: center;
  }
  .timeline-connector {
    width: 2px;
    height: 30px;
    margin-top: 0;
  }
}
