/* ==========================================================================
   InnerOS VoiceOps — Light Enterprise Design System (Higgs Realtime 2026)
   ========================================================================== */

:root {
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-panel-sub: #f1f5f9;
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-focus: #0ea5e9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;

  --color-brand: #0284c7;
  --color-brand-hover: #0369a1;
  --color-brand-light: #e0f2fe;

  --color-success: #10b981;
  --color-success-light: #ecfdf5;
  --color-success-border: #a7f3d0;

  --color-warning: #f59e0b;
  --color-warning-light: #fffbeb;
  --color-warning-border: #fde68a;

  --color-danger: #ef4444;
  --color-danger-light: #fef2f2;
  --color-danger-border: #fecaca;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--color-brand);
}

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

.brand-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-title strong {
  color: var(--color-brand);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.site-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.pulse-dot.green {
  background-color: var(--color-success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: pulseGreen 2s infinite;
}

.pulse-dot.blue {
  background-color: var(--color-brand);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
  animation: pulseBlue 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulseBlue {
  0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(2, 132, 199, 0); }
  100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

.header-center .model-badge {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: var(--text-white);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.badge-label {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.85;
  letter-spacing: 0.05em;
}

.badge-val {
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.governance-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-success);
  background: var(--color-success-light);
  border: 1px solid var(--color-success-border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

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

/* Alert Banner */
.alert-banner {
  background: #fffbeb;
  border-bottom: 1px solid var(--color-warning-border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-badge {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.alert-text {
  font-weight: 500;
  color: #92400e;
}

.alert-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-pill {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-secondary);
}

.metric-pill strong {
  color: var(--color-brand);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1560px;
  margin: 0 auto;
  width: 100%;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Voice Hero */
.voice-hero {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.voice-hero-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.voice-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.voice-orb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--color-brand-light);
  border: 2px solid var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: var(--color-brand);
  flex-shrink: 0;
}

.orb-svg {
  width: 24px;
  height: 24px;
}

.voice-orb.active {
  background: #ecfdf5;
  border-color: var(--color-success);
  color: var(--color-success);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  animation: orbPulse 1.5s infinite;
}

@keyframes orbPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.voice-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-meta h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.audio-tag {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  animation: pulseGreen 1s infinite;
}

.audio-tag.hidden {
  display: none;
}

.voice-meta p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.waveform-wrap {
  display: flex;
  align-items: center;
}

.waveform-canvas {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.voice-hero-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.btn-group {
  display: flex;
  gap: 8px;
}

/* Buttons */
.btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--color-brand);
  color: var(--text-white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-brand-hover);
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: #cbd5e1;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-panel-sub);
  color: var(--text-primary);
}

.btn-success {
  background: var(--color-success);
  color: var(--text-white);
}

.btn-success:hover:not(:disabled) {
  background: #059669;
}

.btn-danger {
  background: var(--color-danger);
  color: var(--text-white);
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
}

.btn-lg {
  padding: 10px 20px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

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

.voice-config-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-select-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.boson-voice-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.scenario-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.scenario-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.pill-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

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

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 1fr 340px;
  gap: 20px;
  flex: 1;
}

/* Panels */
.panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
}

.panel-header h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-live {
  background: #ecfdf5;
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.badge-pill {
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
}

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: var(--text-secondary);
}

.status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.active {
  background: #ecfdf5;
  color: var(--color-success);
}

/* Live Current Step Box */
.current-step-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.step-indicator-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0369a1;
}

.step-detail {
  color: var(--text-secondary);
  font-style: italic;
}

/* Subsystems List */
.subsystems-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subsystem-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: all 0.15s ease;
}

.subsystem-card.alert {
  background: #fffbeb;
  border-color: #fde68a;
}

.subsystem-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.subsystem-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.status-indicator {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.status-indicator.optimal {
  background: #ecfdf5;
  color: var(--color-success);
}

.status-indicator.warning {
  background: #fef2f2;
  color: var(--color-danger);
}

.subsystem-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.data-row strong {
  color: var(--text-primary);
  font-weight: 600;
}

.text-danger {
  color: var(--color-danger) !important;
}

/* Conversation Box */
.transcript-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.45;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble.system {
  align-self: center;
  background: #f1f5f9;
  border: 1px dashed var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.chat-bubble.user {
  align-self: flex-end;
  align-items: flex-end;
  text-align: right;
  background: var(--color-brand);
  color: var(--text-white);
  border-bottom-right-radius: 2px;
}

.chat-bubble.agent {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 2px;
}

.bubble-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.8;
  display: block;
  margin-bottom: 2px;
}

/* Tool Stream */
.tool-call-section {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.tool-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-brand);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tool-latency {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.tool-stream {
  max-height: 110px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-item {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-item.empty {
  font-family: var(--font-sans);
  color: var(--text-muted);
  justify-content: center;
  font-size: 12px;
}

/* Chat Input Bar */
.chat-input-bar {
  display: flex;
  gap: 8px;
}

.chat-input-bar input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

.chat-input-bar input:focus {
  border-color: var(--border-focus);
}

/* Governance Column */
.col-governance {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.partner-integrations-panel .partner-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.partner-card {
  background: var(--bg-panel-sub);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.partner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.partner-head strong {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.partner-truth {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.partner-truth.real {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.partner-truth.fallback {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.partner-truth.not-connected {
  color: #64748b;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.partner-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.partner-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.partner-line span {
  color: var(--text-secondary);
}

.partner-line code {
  font-family: var(--font-mono);
  font-size: 10px;
}

.partner-open-btn {
  margin-top: 6px;
  align-self: flex-start;
}

.partner-open-btn.hidden {
  display: none;
}

.ha-controls-panel .ha-controls-note {
  margin: 0 0 10px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
}

.ha-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ha-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #475569;
}

.ha-field-wide {
  grid-column: 1 / -1;
}

.ha-field input,
.ha-field select {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12px;
  background: #fff;
}

.ha-controls-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  font-size: 11px;
  color: #64748b;
}

.ha-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.ha-controls-actions {
  display: grid;
  gap: 6px;
}

.proposal-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 12px;
}

.proposal-card.active {
  background: #fffbeb;
  border-color: var(--color-warning);
}

.approval-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Audit Card */
.audit-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.audit-body code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.evidence-hash {
  margin-top: 6px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hash-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.hash-val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  word-break: break-all;
}

/* HTR Card */
.htr-card {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: var(--text-white);
  border: none;
}

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

.htr-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.htr-class {
  background: rgba(255, 255, 255, 0.2);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
}

.htr-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 6px 0;
}

.htr-number {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}

.htr-unit {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
}

.htr-desc {
  font-size: 11px;
  opacity: 0.85;
  line-height: 1.4;
}

/* Subsystem Cards */
.telemetry-sync-ticker {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
}

.subsystems-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subsystem-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: all 0.25s ease;
}

.subsystem-card:hover {
  background: #ffffff;
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.subsystem-card.highlighted {
  border-color: var(--color-brand);
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25), 0 4px 12px rgba(2, 132, 199, 0.15);
  transform: translateY(-2px);
}

.subsystem-card.alert {
  border-left: 3px solid var(--color-danger);
}

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

.subsystem-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary);
}

.sub-svg {
  width: 16px;
  height: 16px;
}

.head-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.truth-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.truth-badge.live {
  background: #0284c7;
  color: #ffffff;
}

.truth-badge.unverified {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.truth-badge.replay {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.truth-badge.synthetic {
  background: #f3e8ff;
  color: #7e22ce;
}

.provider-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 4px;
  border-top: 1px dashed var(--border-light);
  padding-top: 4px;
}

.status-indicator {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.status-indicator.optimal {
  background: #ecfdf5;
  color: #059669;
}

.status-indicator.warning {
  background: #fef2f2;
  color: #dc2626;
}

.subsystem-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.data-row strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.data-row strong.text-danger {
  color: var(--color-danger);
}

/* Footer */
.app-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.app-footer code {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* Executable World — light professional surface (white base) */
body.executable-theme {
  --bg-app: #ffffff;
  --bg-card: #ffffff;
  --bg-panel-sub: #f1f5f9;
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-focus: #0284c7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --color-brand: #0369a1;
  --color-brand-hover: #0284c7;
  --color-brand-light: #e0f2fe;

  --color-success: #059669;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-info: #0284c7;

  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.04);
  --shadow-md: 0 4px 16px rgb(15 23 42 / 0.06);
  --shadow-lg: 0 12px 32px rgb(15 23 42 / 0.08);

  background: var(--bg-app);
  color: var(--text-primary);
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(2, 132, 199, 0.07), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 100%, rgba(5, 150, 105, 0.06), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #f1f5f9 100%);
}

.ambient-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

.ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

body.executable-theme .app-layout {
  position: relative;
  z-index: 1;
}

body.executable-theme .app-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

body.executable-theme .brand-title strong {
  color: var(--color-brand);
  font-weight: 700;
}

body.executable-theme .logo-icon {
  color: var(--color-brand);
  opacity: 0.9;
}

body.executable-theme .site-tag,
body.executable-theme .model-badge {
  background: var(--bg-panel-sub);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

body.executable-theme .header-status-chip {
  font-size: 11px;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel-sub);
  letter-spacing: 0.02em;
}

body.executable-theme .status-strip {
  display: flex;
  align-items: center;
  padding: 8px 24px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.85);
}

body.executable-theme .status-strip-text {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

body.executable-theme .alert-banner {
  display: none;
}

body.executable-theme .card,
body.executable-theme .panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

body.executable-theme .voice-hero {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-color: var(--border-light);
}

body.executable-theme .subsystem-card {
  background: var(--bg-panel-sub);
  border-color: var(--border-subtle);
}

body.executable-theme .subsystem-card.alert {
  border-color: rgba(196, 163, 90, 0.25);
  background: rgba(196, 163, 90, 0.06);
}

body.executable-theme .btn-primary {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border-color: #0369a1;
  color: #ffffff;
  font-weight: 600;
}

body.executable-theme .btn-primary:hover {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
}

body.executable-theme .btn-outline {
  background: #ffffff;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

body.executable-theme .btn-outline:hover {
  background: var(--bg-panel-sub);
  color: var(--text-primary);
}

body.executable-theme .btn-secondary {
  background: var(--bg-panel-sub);
  border-color: var(--border-light);
  color: var(--text-secondary);
}

body.executable-theme .panel-header h3 {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

body.executable-theme .badge-live,
body.executable-theme .badge-pill,
body.executable-theme .truth-badge {
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
}

body.executable-theme .truth-badge.live {
  background: rgba(107, 155, 122, 0.15);
  color: var(--color-success);
  border-color: rgba(107, 155, 122, 0.3);
}

body.executable-theme .transcript-box {
  background: #f8fafc;
  border-color: var(--border-light);
}

body.executable-theme .chat-bubble.system {
  background: #f1f5f9;
  border-color: var(--border-light);
}

body.executable-theme .tool-call-section {
  border-color: var(--border-light);
  background: #f8fafc;
}

body.executable-theme .assemblyai-live-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  padding: 6px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

body.executable-theme .assemblyai-live-status.ready,
body.executable-theme .assemblyai-live-status.active {
  color: var(--color-success);
  border-color: rgba(107, 155, 122, 0.35);
}

body.executable-theme .assemblyai-live-status.blocked,
body.executable-theme .assemblyai-live-status.error {
  color: var(--color-danger);
  border-color: rgba(193, 123, 123, 0.35);
}

body.executable-theme .live-voice-caption {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.executable-theme .live-voice-caption.hidden {
  display: none;
}

body.executable-theme .boson-voice-badge {
  background: rgba(139, 164, 196, 0.1);
  color: var(--color-info);
  border-color: rgba(139, 164, 196, 0.22);
}

body.executable-theme .voice-orb {
  background: radial-gradient(circle at 35% 30%, #e0f2fe, #ffffff);
  border-color: var(--border-light);
}

body.executable-theme .voice-orb.active {
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25), 0 0 20px rgba(2, 132, 199, 0.15);
}

body.executable-theme .scenario-advanced {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

body.executable-theme .scenario-advanced summary {
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

body.executable-theme .scenario-advanced .scenario-bar {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

body.executable-theme .pill-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
}

body.executable-theme .pill-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

body.executable-theme .app-footer {
  background: #ffffff;
  border-top-color: var(--border-light);
}

body.executable-theme .capability-chip {
  background: #f8fafc;
  border-color: var(--border-light);
}

body.executable-theme .capability-chip.active {
  border-color: rgba(107, 155, 122, 0.28);
}

body.executable-theme .main-content {
  padding-top: 20px;
}

body.executable-theme .dashboard-grid {
  gap: 16px;
}

body.executable-theme .chat-input-bar input {
  background: #ffffff;
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

body.executable-theme .chat-input-bar input::placeholder {
  color: var(--text-muted);
}

body.executable-theme .voice-provider-select {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  min-width: 160px;
}

body.executable-theme .voice-config-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

body.executable-theme .reasoning-badge {
  font-size: 11px;
  color: var(--text-secondary);
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-top: 6px;
  line-height: 1.4;
}

body.executable-theme .telephony-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #f8fafc;
}

body.executable-theme .telephony-panel.hidden {
  display: none;
}

body.executable-theme .telephony-panel h4 {
  font-size: 13px;
  margin-bottom: 6px;
}

body.executable-theme .telephony-help {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

body.executable-theme .telephony-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}

body.executable-theme .telephony-row input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

body.executable-theme .telephony-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

body.executable-theme .telephony-plan {
  font-size: 11px;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px;
  max-height: 140px;
  overflow: auto;
  color: var(--text-secondary);
}

.capability-matrix-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 12px;
  line-height: 1.5;
}

.capability-section {
  margin-bottom: 14px;
}

.capability-section-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.capability-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.capability-chip {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-panel-sub);
  font-size: 11px;
}

.capability-chip.active {
  border-color: rgba(63, 185, 80, 0.35);
}

.capability-chip.inactive {
  opacity: 0.75;
}

.capability-chip-mark {
  font-weight: 700;
  color: var(--color-success);
}

.capability-chip.inactive .capability-chip-mark {
  color: var(--text-muted);
}

.capability-chip-label {
  color: var(--text-primary);
  font-weight: 500;
}

.capability-chip-truth {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

