/**
 * OctaStudio Cold-Call Performance Dashboard
 * Executive Dark Glassmorphism Design System
 * Inspired by Geckoboard, SalesDeck, and modern high-contrast sales cockpits
 */

:root {
  /* Surfaces */
  --bg-void: #090d16;
  --bg-base: #0c1220;
  --bg-surface: rgba(18, 26, 42, 0.72);
  --bg-surface-elevated: rgba(26, 36, 56, 0.75);
  --bg-surface-hover: rgba(36, 48, 72, 0.8);
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(56, 189, 248, 0.35);
  
  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  
  /* Accents & Glows */
  --accent: #38bdf8;
  --accent-muted: rgba(56, 189, 248, 0.15);
  --accent-glow: rgba(56, 189, 248, 0.35);
  
  --emerald: #10b981;
  --emerald-muted: rgba(16, 185, 129, 0.15);
  --emerald-glow: rgba(16, 185, 129, 0.3);
  
  --amber: #f59e0b;
  --amber-muted: rgba(245, 158, 11, 0.15);
  --amber-glow: rgba(245, 158, 11, 0.3);
  
  --violet: #a78bfa;
  --violet-muted: rgba(167, 139, 250, 0.15);
  --violet-glow: rgba(167, 139, 250, 0.3);
  
  --rose: #f43f5e;
  --rose-muted: rgba(244, 63, 94, 0.15);
  --rose-glow: rgba(244, 63, 94, 0.3);
  
  /* Aliases for semantic backward compatibility */
  --semantic-green: var(--emerald);
  --semantic-green-muted: var(--emerald-muted);
  --semantic-red: var(--rose);
  --semantic-red-muted: var(--rose-muted);
  
  /* Fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  
  /* Geometry */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-void);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.05) 0%, transparent 60%),
    radial-gradient(circle at 100% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  gap: 1rem;
}

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

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.nav-tabs {
  display: flex;
  background-color: rgba(18, 26, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 36px;
}

.nav-tab-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.nav-tab-btn.active {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

/* Layout Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(1.25rem, 2.5vw, 2.25rem);
}

/* General Cards with Glassmorphism */
.card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

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

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.775rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* Status Bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 26, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.status-bar strong {
  color: var(--text-primary);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

/* KPI Card Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

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

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

.kpi-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.05);
}

.kpi-card.hero {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.09) 0%, rgba(18, 26, 42, 0.85) 100%);
  box-shadow: 0 4px 24px -2px rgba(56, 189, 248, 0.15);
}

.kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.kpi-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-badge.cyan {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent);
}

.kpi-icon-badge.emerald {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--emerald);
}

.kpi-icon-badge.amber {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--amber);
}

.kpi-icon-badge.violet {
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: var(--violet);
}

.kpi-top-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kpi-top-pill.cyan {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.kpi-top-pill.emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.kpi-top-pill.amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.kpi-top-pill.violet {
  background: rgba(167, 139, 250, 0.12);
  color: var(--violet);
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.kpi-label {
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.kpi-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.kpi-sparkline {
  width: 90px;
  height: 28px;
  flex-shrink: 0;
  overflow: visible;
}

.kpi-denom {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.kpi-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: auto;
}

.kpi-progress {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.65rem 0 0.5rem 0;
  overflow: hidden;
}

.kpi-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Delta Badges */
.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-top: 0.25rem;
}

.delta-pill.better {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.delta-pill.worse {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.delta-pill.neutral {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   TODAY HERO SECTION & SPEEDOMETER RADIAL DIAL GAUGE
   ========================================================================== */
.today-hero-card {
  background: linear-gradient(180deg, rgba(22, 32, 54, 0.7) 0%, rgba(14, 20, 34, 0.8) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.05);
  position: relative;
  overflow: hidden;
}

.today-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.today-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.today-title-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.today-flank-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  margin: 0.75rem 0 1.5rem 0;
}

@media (max-width: 860px) {
  .today-flank-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.flank-box {
  background: rgba(18, 26, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.flank-box-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.flank-box-badge.amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.flank-box-badge.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.flank-box-label {
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.flank-box-val {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.2rem;
}

.flank-box-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Speedometer Gauge Wrapper */
.gauge-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
}

.gauge-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

@keyframes segmentRipple {
  0% {
    opacity: 0.05;
    stroke-width: 2;
  }
  60% {
    stroke-width: 8;
  }
  100% {
    stroke-width: 6.5;
  }
}

@keyframes segmentPulseGlow {
  0% {
    filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.4));
    opacity: 0.88;
  }
  100% {
    filter: drop-shadow(0 0 9px rgba(56, 189, 248, 0.9)) drop-shadow(0 0 15px rgba(129, 140, 248, 0.45));
    opacity: 1;
  }
}

.gauge-segment {
  transition: opacity 0.35s ease, stroke 0.35s ease, stroke-width 0.2s ease;
  transform-origin: 150px 138px;
}

.gauge-segment.active {
  animation: segmentPulseGlow 2.4s ease-in-out infinite alternate;
}

.gauge-segment:hover {
  stroke-width: 8.5 !important;
  opacity: 1 !important;
  cursor: pointer;
}

.gauge-center-content {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  width: 180px;
}

.gauge-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  margin-bottom: 0.2rem;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.gauge-hero-number {
  font-size: clamp(2.5rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  font-variant-numeric: tabular-nums;
}

.gauge-hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.gauge-sub-progress {
  font-size: 0.775rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 0.2rem;
}

/* Inline End-of-Day Quick Logger */
.eod-logger-container {
  background: rgba(12, 18, 30, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  margin-top: 1rem;
}

.eod-logger-header {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eod-inputs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
}

@media (max-width: 768px) {
  .eod-inputs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.form-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-stealth {
  background: rgba(18, 26, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  outline: none;
  width: 100%;
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
}

.input-stealth:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
  background: rgba(26, 36, 56, 0.9);
}

/* ==========================================================================
   PIPELINE CONVERSION FUNNEL BAR (IMAGE 2 INSPIRATION)
   ========================================================================== */
.pipeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.pipeline-stage {
  flex: 1;
  min-width: 130px;
  background: rgba(26, 36, 56, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pipeline-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.pipeline-stage-name {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-secondary);
}

.pipeline-stage-rate {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.pipeline-stage-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.pipeline-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.pipeline-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  min-height: 40px;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #0b1120;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(26, 36, 56, 0.8);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(36, 48, 72, 0.9);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: var(--rose);
  color: #fff;
}

.btn-sm {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

.btn-accent {
  background: rgba(167, 139, 250, 0.15);
  color: var(--violet);
  border-color: rgba(167, 139, 250, 0.3);
}

.btn-accent:hover {
  background: var(--violet);
  color: #000;
}

/* ==========================================================================
   CHARTS & PERFORMANCE
   ========================================================================== */
.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
}

/* Fix this next card */
.fix-next-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(18, 26, 42, 0.7) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.fix-next-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.fix-next-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 0.5rem;
}

.fix-next-quote {
  font-size: 0.875rem;
  color: #f1f5f9;
  line-height: 1.45;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.fix-next-link {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.fix-next-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   DATA TABLES (IMAGE 3 INSPIRATION)
   ========================================================================== */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  background: rgba(18, 26, 42, 0.5);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.data-table th {
  background: rgba(26, 36, 56, 0.8);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.725rem;
}

.data-table td {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

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

.data-table tbody tr.call-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.data-table tbody tr.call-row:hover {
  background-color: rgba(56, 189, 248, 0.05);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  font-size: 0.725rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-real {
  background-color: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-roleplay {
  background-color: rgba(167, 139, 250, 0.12);
  color: var(--violet);
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.badge-closed {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background-color: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Tag Pills */
.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-pill {
  font-size: 0.725rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.tag-pill.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Segmented Control */
.segmented-control {
  display: inline-flex;
  background-color: rgba(18, 26, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.segmented-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  min-height: 34px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.segmented-btn:hover {
  color: var(--text-primary);
}

.segmented-btn.active {
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* Small Sample Banner */
.small-sample-banner {
  background: rgba(18, 26, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.small-sample-banner strong {
  color: #fff;
}

/* Disclosure */
.metrics-disclosure {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.metrics-disclosure summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.metrics-disclosure summary:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.metrics-disclosure-content {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Modal Overlay & Content */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background-color: #0e1526;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  max-width: 840px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 24px rgba(56, 189, 248, 0.1);
}

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

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: #fff;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
}

.toast {
  background-color: #1a2438;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.toast.toast-success { border-left: 3px solid var(--emerald); }
.toast.toast-error { border-left: 3px solid var(--rose); }

/* Dropzone for Upload Modal */
.dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background-color: rgba(18, 26, 42, 0.4);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background-color: rgba(56, 189, 248, 0.04);
}

.speaker-card-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.speaker-card {
  background-color: rgba(18, 26, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.speaker-card.selected {
  border-color: var(--accent);
  background-color: var(--accent-muted);
}

/* ==========================================================================
   PERFORMANCE META STRIP & BADGES
   ========================================================================== */
.perf-header-wrapper {
  margin-bottom: 1.5rem;
}

.perf-meta-strip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.perf-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(18, 26, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.perf-meta-pill strong {
  color: #fff;
}

/* ==========================================================================
   PROMPT TERMINAL CARDS (SALESDECK / EXECUTIVE DARK UI)
   ========================================================================== */
.prompt-card {
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.prompt-terminal-box {
  background: #090e18;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.prompt-terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 26, 42, 0.75);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.45rem 0.85rem;
}

.prompt-terminal-dots {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

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

.prompt-dot.red { background: #ef4444; }
.prompt-dot.yellow { background: #f59e0b; }
.prompt-dot.green { background: #10b981; }

.prompt-terminal-title {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.prompt-terminal-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.prompt-textarea {
  width: 100%;
  height: 220px;
  background: transparent;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  padding: 1rem 1.15rem;
  border: none;
  resize: vertical;
  outline: none;
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-textarea:focus {
  outline: none;
}

/* Copy button feedback state */
.btn.btn-copied,
.copy-prompt-btn.btn-copied,
.copy-active-prompt-btn.btn-copied {
  background: rgba(16, 185, 129, 0.2) !important;
  color: var(--emerald) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

/* ==========================================================================
   SETTINGS TAB PANELS & FOCUSED LAYOUT
   ========================================================================== */
.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.settings-status-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
}

.settings-status-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.settings-status-val {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.settings-status-sub {
  font-size: 0.725rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ==========================================================================
   KINETIC CELEBRATION & DEAL-CLOSE REWARD STYLES
   ========================================================================== */

/* Fullscreen Celebration Modal Overlay */
.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.celebration-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.celebration-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.celebration-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: linear-gradient(160deg, rgba(16, 24, 40, 0.96) 0%, rgba(10, 15, 26, 0.98) 100%);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 24px;
  padding: 2.5rem 2rem 2rem 2rem;
  text-align: center;
  box-shadow: 
    0 25px 60px -12px rgba(0, 0, 0, 0.85),
    0 0 45px rgba(16, 185, 129, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
  transform: scale(0.88) translateY(24px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.celebration-overlay.active .celebration-card {
  transform: scale(1) translateY(0);
}

.celebration-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.celebration-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transform: scale(1.08);
}

.celebration-trophy-ring {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.celebration-trophy-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.5) 0%, rgba(16, 185, 129, 0.2) 65%, transparent 100%);
  animation: trophyPulse 2s ease-in-out infinite;
}

@keyframes trophyPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.7)); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.celebration-trophy-badge {
  font-size: 2.75rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.celebration-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.35rem;
}

.celebration-headline {
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 0.35rem;
  background: linear-gradient(135deg, #ffffff 0%, #34d399 40%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.3));
}

.celebration-subhead {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  font-weight: 500;
}

.celebration-metrics-box {
  background: rgba(6, 10, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}

.celebration-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.celebration-metric-row.primary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 0.85rem;
}

.celebration-metric-label {
  color: var(--text-muted);
  font-weight: 500;
}

.celebration-metric-value {
  font-weight: 700;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  color: #fff;
}

.celebration-metric-value.green {
  font-size: 1.75rem;
  color: var(--emerald);
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.celebration-metric-value.cyan {
  color: var(--accent);
}

.celebration-recalibration-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  padding: 0.65rem 1.15rem;
  font-size: 0.775rem;
  color: #a7f3d0;
  margin-bottom: 1.75rem;
  text-align: left;
  line-height: 1.4;
}

.celebration-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.celebration-primary-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45) !important;
  flex: 1.4;
}

.celebration-primary-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6) !important;
  transform: translateY(-1px);
}

.celebration-secondary-btn {
  flex: 1;
}

/* Card Celebratory Flash Surge */
@keyframes cardSurge {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8), 0 4px 20px -2px rgba(0, 0, 0, 0.35);
    border-color: rgba(16, 185, 129, 0.8);
    transform: scale(1.02);
  }
  50% {
    box-shadow: 0 0 35px 4px rgba(16, 185, 129, 0.5), 0 8px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(16, 185, 129, 0.9);
  }
  100% {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
    border-color: var(--border-subtle);
    transform: scale(1);
  }
}

.card-celebrate-flash {
  animation: cardSurge 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Demo Close Trigger Button */
.btn-celebrate-demo {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 32px;
}

.btn-celebrate-demo:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

