/* Supergoop Seasonal Promotion Studio - Main Stylesheet */

/* Supergoop Brand Colors & Variables */
:root {
  --dplus-blue: #0066FF;
  --dplus-dark: #1a1a2e;
  --dplus-purple: #6366f1;
  --dplus-green: #10b981;
  --dplus-red: #ef4444;
  --dplus-orange: #f59e0b;
}

/* Font Family */
* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Dark Theme Gradient Background */
[data-bs-theme="dark"] body {
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  min-height: 100vh;
  color: #e5e5e5;
}

/* Light Theme - Keep clean */
[data-bs-theme="light"] body {
  background: #f8f9fa;
  min-height: 100vh;
}

/* Step Navigation */
.step-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
  backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .step-nav {
  background: rgba(26, 26, 46, 0.95);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .step-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.step-nav .brand {
  font-weight: 700;
  font-size: 1.25rem;
}

.step-nav .brand span {
  color: var(--dplus-blue);
}

.step-indicator {
  display: flex;
  gap: var(--step-gap);
  align-items: center;
}

.step-dot {
  width: var(--step-dot-size, 32px);
  height: var(--step-dot-size, 32px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .step-dot {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  color: #e5e5e5;
}

[data-bs-theme="light"] .step-dot {
  background: rgba(0,0,0,0.05);
  border: 2px solid rgba(0,0,0,0.1);
  color: #212529;
}

.step-dot.active {
  background: var(--dplus-blue);
  border-color: var(--dplus-blue);
  color: #fff;
}

.step-dot.completed {
  background: var(--dplus-green);
  border-color: var(--dplus-green);
  color: #fff;
}

.step-dot:hover {
  transform: scale(1.1);
}

/* Module color coding */
.step-dot.module-data-foundation {
  border-color: #17a2b8 !important;
}

.step-dot.module-data-foundation.active,
.step-dot.module-data-foundation.completed {
  background: #17a2b8 !important;
  border-color: #17a2b8 !important;
}

.step-dot.module-elasticity {
  border-color: #fd7e14 !important;
}

.step-dot.module-elasticity.active,
.step-dot.module-elasticity.completed {
  background: #fd7e14 !important;
  border-color: #fd7e14 !important;
}

.step-dot.module-simulation {
  border-color: #6f42c1 !important;
}

.step-dot.module-simulation.active,
.step-dot.module-simulation.completed {
  background: #6f42c1 !important;
  border-color: #6f42c1 !important;
}

.step-dot.module-segmentation {
  border-color: #6f42c1 !important;
}

.step-dot.module-segmentation.active,
.step-dot.module-segmentation.completed {
  background: #6f42c1 !important;
  border-color: #6f42c1 !important;
}

.step-dot.module-analytics {
  border-color: #20c997 !important;
}

.step-dot.module-analytics.active,
.step-dot.module-analytics.completed {
  background: #20c997 !important;
  border-color: #20c997 !important;
}

/* Step legend */
.steps-stack {
  --step-dot-size: 32px;
  --step-line-width: 24px;
  --step-gap: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: max-content;
  margin-right: 2rem;
}

.step-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
  margin-top: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.8;
  justify-content: center;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  box-sizing: border-box;
  flex: 0 0 12px;
  aspect-ratio: 1 / 1;
}

.legend-color.data-foundation {
  color: #17a2b8;
}

.legend-color.elasticity {
  color: #fd7e14;
}

.legend-color.simulation {
  color: #6f42c1;
}

.legend-color.segmentation {
  color: #6f42c1;
}

.legend-color.analytics {
  color: #20c997;
}

.legend-data-foundation,
.legend-segmentation,
.legend-elasticity,
.legend-analytics {
  grid-column: auto;
}

@media (max-width: 992px) {
  .steps-stack {
    align-items: center;
    width: 100%;
  }

  .step-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .legend-data-foundation,
  .legend-segmentation,
  .legend-elasticity,
  .legend-analytics {
    grid-column: auto;
  }
}

.step-line {
  width: var(--step-line-width, 24px);
  height: 2px;
}

[data-bs-theme="dark"] .step-line {
  background: rgba(255,255,255,0.2);
}

[data-bs-theme="light"] .step-line {
  background: rgba(0,0,0,0.1);
}

#commercial-context-section {
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

#commercial-context-section .border.rounded-3 {
  border-color: rgba(148, 163, 184, 0.28) !important;
}

[data-bs-theme="dark"] #commercial-context-section {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] #commercial-context-section .border.rounded-3 {
  border-color: rgba(148, 163, 184, 0.18) !important;
}

.commercial-context-tabs {
  gap: 0.5rem;
}

.commercial-context-tabs .nav-link {
  border-radius: 999px;
  font-weight: 600;
  color: inherit;
  background: rgba(148, 163, 184, 0.12);
}

.commercial-context-tabs .nav-link.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(16, 185, 129, 0.85));
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

/* Steps Overview Modal */
.steps-overview-trigger {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.steps-modal .modal-content {
  border-radius: 0;
  border: none;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.steps-modal .modal-dialog {
  transform-origin: top right;
  transform: translateY(-18px) scale(0.98);
  opacity: 0;
  transition: transform 0.7s ease, opacity 0.5s ease;
}

.steps-modal.show .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.steps-modal .modal-header {
  padding: 1.25rem 1.5rem 0.75rem;
}

.steps-modal .modal-body {
  padding: 0.75rem 1.5rem 1.25rem;
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Avoid forcing full-height layout inside the steps modal */
.steps-modal .modal-body .container-fluid,
.steps-modal .modal-body .row {
  height: auto !important;
}

[data-bs-theme="dark"] .steps-modal .modal-content {
  background: linear-gradient(160deg, rgba(20, 24, 45, 0.98), rgba(10, 12, 26, 0.98));
  color: #e5e5e5;
}

[data-bs-theme="light"] .steps-modal .modal-content {
  background: linear-gradient(160deg, #ffffff, #f3f6ff);
  color: #1a1a2e;
}

.steps-table {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.steps-table-header,
.steps-table-row {
  display: grid;
  grid-template-columns: minmax(90px, 110px) minmax(220px, 1.4fr) minmax(200px, 1fr);
  gap: 1rem;
  align-items: start;
}

.steps-table-header {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 1rem;
}

[data-bs-theme="light"] .steps-table-header {
  color: rgba(26, 26, 46, 0.7);
}

.steps-table-row {
  border-radius: 16px;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.25, 1), opacity 0.55s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  width: 100%;
  cursor: pointer;
  color: inherit;
  text-align: left;
  opacity: 0;
  transform: translateY(-16px) translateX(calc((var(--step-index, 1) - 1) * 26px)) scale(0.96);
  transition-delay: calc(var(--step-index, 1) * 0.05s);
  will-change: transform, opacity;
}

.steps-modal.show .steps-table-row {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

[data-bs-theme="light"] .steps-table-row {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .steps-table-row {
  background: rgba(17, 20, 38, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
}

.steps-table-row:hover,
.steps-table-row:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 102, 255, 0.6);
}

.steps-table-step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dplus-blue);
}

.steps-table-step-label {
  font-size: 0.75rem;
}

.steps-table-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.97rem;
  line-height: 1.25;
}

.steps-table-body strong {
  font-size: 1rem;
}

.steps-table-rfp {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.75);
}

[data-bs-theme="light"] .steps-table-rfp {
  color: rgba(26, 26, 46, 0.7);
}

.steps-modal-dot {
  cursor: default;
  pointer-events: none;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  .steps-modal .modal-dialog,
  .steps-table-row,
  .steps-modal.show .steps-table-row {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

@media (max-width: 991px) {
  .steps-table-header {
    display: none;
  }

  .steps-table-row {
    grid-template-columns: 1fr;
  }

  .steps-table-rfp {
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
  }

  [data-bs-theme="dark"] .steps-table-rfp {
    border-top-color: rgba(255, 255, 255, 0.12);
  }
}

/* Main content - account for fixed nav */
.main-content {
  padding-top: 96px;
  min-height: 100vh;
}

/* Sections */
.section {
  display: none;
  padding: 2rem 0;
  animation: fadeIn 0.5s ease;
}

.section.active {
  display: block;
}

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

/* Glassmorphism Cards */
.glass-card {
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: transform 0.2s, box-shadow 0.2s;
}

[data-bs-theme="dark"] .glass-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.glass-card:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .glass-card:hover {
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.15);
}

[data-bs-theme="light"] .glass-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Section Headers */
.section-header {
  margin-bottom: 2rem;
}

.section-header-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section-header-main {
  min-width: 260px;
}

.section-header-citation {
  flex: 0 0 auto;
  max-width: 360px;
  margin-top: 1.3rem;
}

.section-citation-card {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(13, 110, 253, 0.06);
}

.section-citation-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--dplus-blue);
  margin-bottom: 0.35rem;
}

.section-citation-text {
  font-size: 0.9rem;
  color: #1f2937;
}

[data-bs-theme="dark"] .section-citation-card {
  border-color: rgba(255,255,255,0.1);
  background: rgba(59, 130, 246, 0.12);
}

[data-bs-theme="dark"] .section-citation-text {
  color: rgba(255,255,255,0.85);
}

.section-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dplus-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  max-width: 600px;
}

[data-bs-theme="dark"] .section-title {
  color: #fff;
}

[data-bs-theme="dark"] .section-subtitle {
  color: rgba(255,255,255,0.6);
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .hero h1 {
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

[data-bs-theme="dark"] .hero p {
  color: rgba(255,255,255,0.7);
}

/* Custom Buttons */
.btn-primary-custom {
  background: var(--dplus-blue);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  color: #fff;
  transition: all 0.3s ease;
}

.btn-primary-custom:hover {
  background: #0052cc;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.3);
}

.btn-primary-custom:focus-visible {
  color: #fff;
}

.btn-secondary-custom {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .btn-secondary-custom {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}

[data-bs-theme="light"] .btn-secondary-custom {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.1);
  color: #212529;
}

.btn-secondary-custom:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .btn-secondary-custom:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

[data-bs-theme="light"] .btn-secondary-custom:hover {
  background: rgba(0,0,0,0.1);
  color: #212529;
}

/* Section Footer Navigation */
.section-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
}

[data-bs-theme="dark"] .section-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .section-footer {
  border-top: 1px solid rgba(0,0,0,0.1);
}

/* Loading Overlay */
#load-data-section {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin: 0 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

body.app-loading-step {
  overflow: hidden;
}

body.app-loading-step .step-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.app-loading-step footer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.app-loading-step #load-data-section {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

[data-bs-theme="dark"] body.app-loading-step #load-data-section {
  background: rgba(15, 23, 42, 0.96);
}

[data-bs-theme="light"] body.app-loading-step #load-data-section {
  background: rgba(248, 250, 252, 0.97);
}

body.app-loading-step #load-data-section .glass-card {
  width: min(640px, 100%);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  opacity: 1;
  transform: translateY(0) scale(1);
}

#load-data-section .glass-card {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.loading-card {
  position: relative;
  overflow: hidden;
  padding: 2.25rem;
  border-radius: 28px;
  text-align: center;
  isolation: isolate;
}

.loading-card::before,
.loading-card::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.8;
  z-index: -1;
}

.loading-card::before {
  width: 220px;
  height: 220px;
  top: -70px;
  left: -30px;
  background: rgba(0, 102, 255, 0.18);
}

.loading-card::after {
  width: 180px;
  height: 180px;
  right: -25px;
  bottom: -40px;
  background: rgba(16, 185, 129, 0.16);
}

.loading-market-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.4rem;
}

.loading-market-board {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

.loading-signal-card,
.loading-market-core {
  position: relative;
  border-radius: 22px;
  padding: 0.95rem 1rem;
  text-align: left;
  overflow: hidden;
}

.loading-signal-card::before,
.loading-market-core::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 44%),
    linear-gradient(180deg, transparent, rgba(255,255,255,0.02));
  pointer-events: none;
}

.loading-signal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.loading-signal-head i {
  font-size: 0.9rem;
  opacity: 0.9;
}

.loading-signal-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loading-signal-value {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.loading-signal-spark {
  display: flex;
  align-items: end;
  gap: 0.28rem;
  height: 28px;
  margin-top: 0.6rem;
}

.loading-signal-spark span {
  width: 8px;
  border-radius: 999px;
  animation: loadingBarPulse 1.8s ease-in-out infinite;
}

.loading-signal-spark span:nth-child(1) { height: 8px; animation-delay: 0s; }
.loading-signal-spark span:nth-child(2) { height: 14px; animation-delay: 0.12s; }
.loading-signal-spark span:nth-child(3) { height: 18px; animation-delay: 0.24s; }
.loading-signal-spark span:nth-child(4) { height: 12px; animation-delay: 0.36s; }
.loading-signal-spark span:nth-child(5) { height: 22px; animation-delay: 0.48s; }

.spark-down span {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.92));
}

.spark-up span {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.28), rgba(37, 99, 235, 0.9));
}

.loading-signal-meter {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  animation: loadingMeterDrift 2.8s ease-in-out infinite;
}

.meter-fill-inventory {
  width: 62%;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.55), rgba(16, 185, 129, 0.95));
}

.meter-fill-promo {
  width: 48%;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.55), rgba(245, 158, 11, 0.96));
}

.loading-market-core {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  flex-direction: column;
  min-height: 118px;
  padding: 1.15rem 1rem;
  text-align: center;
}

.loading-market-core-chart {
  width: 100%;
  max-width: 300px;
  height: 56px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.loading-market-bar {
  width: 20px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.95));
  animation: loadingMarketBars 1.8s ease-in-out infinite;
}

.loading-market-bar.bar-a { height: 18px; animation-delay: 0s; }
.loading-market-bar.bar-b { height: 38px; animation-delay: 0.12s; }
.loading-market-bar.bar-c { height: 28px; animation-delay: 0.24s; }
.loading-market-bar.bar-d { height: 46px; animation-delay: 0.36s; }
.loading-market-bar.bar-e { height: 22px; animation-delay: 0.48s; }

.loading-market-core-label {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loading-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.loading-title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}

.loading-subtitle {
  max-width: 520px;
  margin: 0 auto 1rem;
  font-size: 0.98rem;
  line-height: 1.55;
}

.loading-pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin: 0 auto 1.25rem;
}

.loading-pill {
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.loading-stage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

.loading-stage-badge {
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.loading-progress-shell {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
}

.loading-progress-fill {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
}

.loading-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 12%, rgba(255,255,255,0.38) 32%, transparent 52%);
  animation: loadingShimmer 1.8s linear infinite;
}

.loading-microcopy {
  margin-top: 0.95rem;
  font-size: 0.84rem;
}

[data-bs-theme="dark"] .loading-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(17, 24, 39, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.18);
}

[data-bs-theme="light"] .loading-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248, 250, 252, 0.98));
  border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .loading-signal-card,
[data-bs-theme="dark"] .loading-market-core {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

[data-bs-theme="light"] .loading-signal-card,
[data-bs-theme="light"] .loading-market-core {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

[data-bs-theme="dark"] .loading-signal-label,
[data-bs-theme="dark"] .loading-market-core-label {
  color: rgba(191, 219, 254, 0.82);
}

[data-bs-theme="light"] .loading-signal-label,
[data-bs-theme="light"] .loading-market-core-label {
  color: rgba(29, 78, 216, 0.82);
}

[data-bs-theme="dark"] .loading-signal-value {
  color: #f8fafc;
}

[data-bs-theme="light"] .loading-signal-value {
  color: #0f172a;
}

[data-bs-theme="dark"] .loading-signal-head i {
  color: rgba(226, 232, 240, 0.82);
}

[data-bs-theme="light"] .loading-signal-head i {
  color: rgba(15, 23, 42, 0.62);
}

[data-bs-theme="dark"] .loading-signal-meter {
  background: rgba(255,255,255,0.08);
}

[data-bs-theme="light"] .loading-signal-meter {
  background: rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .loading-kicker {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.22);
}

[data-bs-theme="light"] .loading-kicker {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

[data-bs-theme="dark"] .loading-title {
  color: #f8fafc;
}

[data-bs-theme="light"] .loading-title {
  color: #0f172a;
}

[data-bs-theme="dark"] .loading-subtitle,
[data-bs-theme="dark"] .loading-microcopy {
  color: rgba(226, 232, 240, 0.8);
}

[data-bs-theme="light"] .loading-subtitle,
[data-bs-theme="light"] .loading-microcopy {
  color: rgba(15, 23, 42, 0.68);
}

[data-bs-theme="dark"] .loading-pill {
  color: rgba(226, 232, 240, 0.92);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

[data-bs-theme="light"] .loading-pill {
  color: rgba(15, 23, 42, 0.82);
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .loading-stage-badge {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.15);
}

[data-bs-theme="light"] .loading-stage-badge {
  color: #15803d;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.12);
}

[data-bs-theme="dark"] .loading-progress-shell {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

[data-bs-theme="light"] .loading-progress-shell {
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

@keyframes loadingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes loadingShimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(140%); }
}

@keyframes loadingBarPulse {
  0%, 100% { transform: scaleY(0.88); opacity: 0.68; }
  50% { transform: scaleY(1.12); opacity: 1; }
}

@keyframes loadingMeterDrift {
  0%, 100% { transform: scaleX(0.94); transform-origin: left center; }
  50% { transform: scaleX(1.04); transform-origin: left center; }
}

@keyframes loadingMarketBars {
  0%, 100% { transform: translateY(0) scaleY(0.94); opacity: 0.75; }
  50% { transform: translateY(-3px) scaleY(1.08); opacity: 1; }
}

@media (max-width: 640px) {
  .loading-card {
    padding: 1.6rem;
    border-radius: 22px;
  }

  .loading-market-board {
    grid-template-columns: 1fr;
  }

  .loading-stage-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .loading-market-core {
    min-height: 104px;
  }

  .loading-market-core-chart {
    gap: 0.42rem;
  }

  .loading-market-bar {
    width: 16px;
  }
}

#loading-progress {
  display: block;
  visibility: visible;
}

/* ══════════════════════════════════════════════════════
   Modern Loading Screen  (ld-*)
   Full-bleed aurora overlay — no card, pure atmosphere
   ══════════════════════════════════════════════════════ */

/* Override the section wrapper so it's a full-bleed canvas */
#load-data-section {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

[data-bs-theme="dark"] #load-data-section  { background: #080d1a; }
[data-bs-theme="light"] #load-data-section { background: #f0f4ff; }

/* ── Aurora blobs ────────────────────────────────────── */
.ld-aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.ld-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: ldBlobDrift 14s ease-in-out infinite alternate;
  will-change: transform;
}
.ld-blob-1 {
  width: 600px; height: 520px;
  top: -160px; left: -120px;
  animation-duration: 18s;
}
.ld-blob-2 {
  width: 500px; height: 480px;
  bottom: -140px; right: -100px;
  animation-duration: 22s;
  animation-delay: -7s;
}
.ld-blob-3 {
  width: 380px; height: 360px;
  top: 30%; left: 35%;
  animation-duration: 16s;
  animation-delay: -4s;
}
[data-bs-theme="dark"] .ld-blob-1 { background: rgba(37,99,235,0.22); }
[data-bs-theme="dark"] .ld-blob-2 { background: rgba(124,58,237,0.18); }
[data-bs-theme="dark"] .ld-blob-3 { background: rgba(16,185,129,0.12); }
[data-bs-theme="light"] .ld-blob-1 { background: rgba(37,99,235,0.13); }
[data-bs-theme="light"] .ld-blob-2 { background: rgba(124,58,237,0.1); }
[data-bs-theme="light"] .ld-blob-3 { background: rgba(16,185,129,0.09); }
@keyframes ldBlobDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -30px) scale(1.06); }
  66%  { transform: translate(-25px, 45px) scale(0.95); }
  100% { transform: translate(15px, -15px) scale(1.04); }
}

/* ── Top progress strip ──────────────────────────────── */
.ld-top-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  z-index: 10;
  overflow: hidden;
}
[data-bs-theme="dark"]  .ld-top-strip { background: rgba(255,255,255,0.06); }
[data-bs-theme="light"] .ld-top-strip { background: rgba(37,99,235,0.1); }

.ld-top-fill {
  height: 100%;
  min-width: 5%;
  background: linear-gradient(90deg, #2563eb 0%, #7c3aed 55%, #10b981 100%);
  background-size: 200% 100%;
  animation: ldTopShimmer 2.2s linear infinite;
  transition: width 0.42s cubic-bezier(0.22,1,0.36,1);
  position: relative;
}
.ld-top-fill::after {
  content: '';
  position: absolute;
  top: 0; right: -20px;
  width: 20px; height: 100%;
  background: inherit;
  filter: blur(6px);
  opacity: 0.7;
}
.ld-top-fill.ld-progress-done {
  background: linear-gradient(90deg, #059669, #10b981);
  animation: none;
}
@keyframes ldTopShimmer {
  from { background-position: 0% 0%; }
  to   { background-position: 200% 0%; }
}

/* ── Centre content ──────────────────────────────────── */
.ld-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2.5rem 4rem;
  max-width: 560px;
  width: 100%;
  animation: ldFadeUp 0.55s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes ldFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logo mark */
.ld-logo {
  width: 84px; height: 84px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1.6rem;
  animation: ldLogoBreath 3.8s ease-in-out infinite;
}
[data-bs-theme="dark"]  .ld-logo { background: rgba(255,255,255,0.06); color: #fbbf24; box-shadow: 0 0 48px rgba(251,191,36,0.22); }
[data-bs-theme="light"] .ld-logo { background: rgba(255,255,255,0.9); color: #d97706; box-shadow: 0 12px 40px rgba(37,99,235,0.14); border: 1px solid rgba(37,99,235,0.08); }
@keyframes ldLogoBreath {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}

/* Word mark */
.ld-wordmark {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
[data-bs-theme="dark"]  .ld-wordmark { color: #f8fafc; }
[data-bs-theme="light"] .ld-wordmark { color: #0f172a; }

.ld-sub {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 2.4rem;
}

/* Stage text + cursor */
.ld-stage-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 1.6rem;
  margin-bottom: 1.8rem;
}
#loading-stage {
  font-size: 0.95rem;
  font-weight: 600;
}
[data-bs-theme="dark"]  #loading-stage { color: rgba(148,163,184,0.85); }
[data-bs-theme="light"] #loading-stage { color: #475569; }

.ld-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  border-radius: 1px;
  animation: ldBlink 1s step-end infinite;
}
[data-bs-theme="dark"]  .ld-cursor { background: rgba(148,163,184,0.6); }
[data-bs-theme="light"] .ld-cursor { background: #94a3b8; }
@keyframes ldBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Segmented progress pills */
.ld-segs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 1.5rem;
}
.ld-seg {
  height: 4px;
  width: 36px;
  border-radius: 999px;
  transition: background 0.3s, width 0.3s, opacity 0.3s;
  opacity: 0.22;
}
[data-bs-theme="dark"]  .ld-seg { background: #94a3b8; }
[data-bs-theme="light"] .ld-seg { background: #94a3b8; }

.ld-seg.ld-seg-active {
  opacity: 1;
  width: 56px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  animation: ldSegPulse 1.2s ease-in-out infinite;
}
.ld-seg.ld-seg-done {
  opacity: 0.7;
  background: #10b981;
}
@keyframes ldSegPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* Percentage */
.ld-pct {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  opacity: 0.38;
}

/* Keep JS-referenced ID working */
#loading-progress-bar { min-width: 5% !important; }

/* Section Header Navigation (at top) */
.section-header-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

/* Simulate Loading Bar */
.simulate-loading {
  max-width: 420px;
  margin: 1rem auto 0;
  text-align: left;
}

.simulate-loading-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--dplus-blue);
}

.simulate-loading .progress {
  height: 16px;
  background-color: rgba(0, 102, 255, 0.12);
  border: 1px solid rgba(0, 102, 255, 0.2);
}

[data-bs-theme="dark"] .simulate-loading-label {
  color: #93c5fd;
}

[data-bs-theme="dark"] .simulate-loading .progress {
  background-color: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-bs-theme="dark"] .section-header-nav {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .section-header-nav {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* Insight Box */
.insight-box {
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

[data-bs-theme="dark"] .insight-box {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-bs-theme="light"] .insight-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.insight-box .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.insight-box h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Pricing Tier Cards */
.tier-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.tier-card:hover {
  transform: translateY(-4px);
}

[data-bs-theme="dark"] .tier-card:hover {
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.2);
}

[data-bs-theme="light"] .tier-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.tier-card.ad-lite {
  border-left: 4px solid var(--dplus-orange);
}

.tier-card.ad-free {
  border-left: 4px solid var(--dplus-blue);
}

.tier-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

[data-bs-theme="dark"] .tier-name {
  color: #fff;
}

.tier-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dplus-blue);
  margin-bottom: 0.5rem;
}

.tier-price span {
  font-size: 1rem;
  font-weight: 400;
}

.tier-card .table {
  text-align: left;
  color: inherit;
}

.tier-card .table th {
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tier-card .table td code {
  font-size: 0.72rem;
  opacity: 0.7;
}

/* Hide tabs when showing individual elasticity model steps */
.hide-elasticity-tabs #elasticityTabs {
  display: none !important;
}

.hide-elasticity-tabs > .container > .card > .card-header {
  display: none !important;
}

.hide-elasticity-tabs > .container > .card > .card-body > .alert.alert-info {
  display: none !important;
}

.hide-elasticity-tabs > .container > .card {
  border: none !important;
  background: transparent !important;
}

/* Keep existing custom styles with theme support */
.kpi-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 12px;
  padding: 1.5rem;
}

[data-bs-theme="dark"] .kpi-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .kpi-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.kpi-card:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .kpi-card:hover {
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.15);
}

[data-bs-theme="light"] .kpi-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.metric-card {
  text-align: center;
  padding: 1.5rem;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
}

[data-bs-theme="dark"] .metric-value {
  color: #fff;
}

.metric-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-bs-theme="dark"] .metric-label {
  color: rgba(255,255,255,0.6);
}

[data-bs-theme="light"] .metric-label {
  color: #6c757d;
}

.metric-change {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.metric-change.positive { color: var(--dplus-green); }
.metric-change.negative { color: var(--dplus-red); }

.kpi-breakdown {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(128, 128, 128, 0.18);
  display: grid;
  gap: 0.35rem;
}

.kpi-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.kpi-breakdown-label {
  flex: 0 0 auto;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-breakdown-value {
  text-align: right;
  font-weight: 600;
}

[data-bs-theme="dark"] .kpi-breakdown-label {
  color: rgba(255, 255, 255, 0.62);
}

[data-bs-theme="light"] .kpi-breakdown-label {
  color: rgba(33, 37, 41, 0.62);
}

[data-bs-theme="dark"] .kpi-breakdown-value {
  color: rgba(255, 255, 255, 0.92);
}

[data-bs-theme="light"] .kpi-breakdown-value {
  color: #212529;
}

@media (max-width: 1200px) {
  .kpi-breakdown-row {
    flex-direction: column;
    gap: 0.1rem;
  }

  .kpi-breakdown-value {
    text-align: left;
  }
}

.scenario-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 16px;
  padding: 1.5rem;
}

[data-bs-theme="dark"] .scenario-card {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .scenario-card {
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.scenario-card:hover {
  transform: translateY(-2px);
  border-color: var(--dplus-blue);
}

.scenario-card.selected {
  border-color: var(--dplus-blue);
}

[data-bs-theme="dark"] .scenario-card.selected {
  background: rgba(0, 102, 255, 0.05);
}

[data-bs-theme="light"] .scenario-card.selected {
  background: rgba(0, 102, 255, 0.05);
}

.scenario-card.recommended {
  border-color: var(--dplus-green);
}

[data-bs-theme="dark"] .scenario-card.recommended {
  background: rgba(16, 185, 129, 0.05);
}

[data-bs-theme="light"] .scenario-card.recommended {
  background: rgba(16, 185, 129, 0.05);
}

.badge-recommended {
  background: var(--dplus-green);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
}
/* Chat message styles */
.chat-message.system {
  opacity: 0.7;
  font-size: 0.875rem;
}
.chat-message.tool {
  color: #0d6efd;
}
.chat-message.tool-error {
  color: #dc3545;
}
.chat-message.error {
  color: #dc3545;
}

/* Markdown content styling */
.message-content {
  line-height: 1.6;
}
.message-content p {
  margin-bottom: 0.75rem;
}
.message-content p:last-child {
  margin-bottom: 0;
}
.message-content ul, .message-content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}
.message-content li {
  margin-bottom: 0.25rem;
}
.message-content code {
  background-color: #f8f9fa;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #d63384;
}
.message-content pre {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
}
.message-content pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}
.message-content strong {
  font-weight: 600;
}
.message-content em {
  font-style: italic;
}
.message-content blockquote {
  border-left: 4px solid #dee2e6;
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 0.75rem;
  color: #6c757d;
}
.message-content h1, .message-content h2, .message-content h3,
.message-content h4, .message-content h5, .message-content h6 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.message-content h1 { font-size: 1.5rem; }
.message-content h2 { font-size: 1.35rem; }
.message-content h3 { font-size: 1.2rem; }
.message-content h4 { font-size: 1.1rem; }
.message-content h5 { font-size: 1rem; }
.message-content h6 { font-size: 0.95rem; }
.message-content table {
  width: 100%;
  margin-bottom: 0.75rem;
  border-collapse: collapse;
}
.message-content table th,
.message-content table td {
  padding: 0.5rem;
  border: 1px solid #dee2e6;
}
.message-content table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* Data viewer styles */
#data-table-container {
  max-height: 600px;
  overflow-y: auto;
  border-radius: 8px;
}

#data-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
}

[data-bs-theme="dark"] #data-table thead th {
  background-color: #212529;
}

[data-bs-theme="light"] #data-table thead th {
  background-color: #f8f9fa;
}

#data-table tbody tr:hover {
  background-color: rgba(0, 102, 255, 0.1);
}

/* Dataset accordion styles */
#datasets-accordion .accordion-button {
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}

#datasets-accordion .accordion-button:not(.collapsed) {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

#datasets-accordion .accordion-body {
  padding: 0;
}

.dataset-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.dataset-item:hover {
  background-color: rgba(13, 110, 253, 0.05);
  border-left-color: #0d6efd;
}

.dataset-item.active {
  background-color: rgba(13, 110, 253, 0.1);
  border-left-color: #0d6efd;
  font-weight: 500;
}

.dataset-item i {
  width: 20px;
}

/* Loading progress styles */
#loading-progress {
  max-width: 600px;
  margin: 0 auto;
}

#loading-progress .progress {
  border-radius: 10px;
  overflow: hidden;
}

[data-bs-theme="dark"] #loading-progress .progress {
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

[data-bs-theme="light"] #loading-progress .progress {
  background-color: #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#loading-progress .progress-bar {
  transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.24s ease;
  font-weight: 500;
  background-color: var(--dplus-blue);
}

#loading-stage {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dplus-blue);
  min-height: 20px;
  display: block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ML Methodology Popover Styles */
.ml-popover {
  max-width: 450px;
  font-size: 0.875rem;
}

.ml-popover .popover-header {
  background-color: #0d6efd;
  color: white;
  font-weight: 600;
  border-bottom: none;
}

.ml-popover .popover-body {
  padding: 1rem;
  line-height: 1.6;
}

.ml-popover .popover-body strong {
  color: #0d6efd;
  font-weight: 600;
}

.ml-popover .popover-arrow::after {
  border-right-color: #0d6efd;
}

/* Info icon hover effect */
[data-bs-toggle="popover"]:hover i {
  transform: scale(1.1);
  transition: transform 0.2s;
}

/* Interactive Demand Curve styles */
.demand-curve-controls {
  padding: 10px 15px;
  border-radius: 8px 8px 0 0;
}

[data-bs-theme="dark"] .demand-curve-controls {
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .demand-curve-controls {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.demand-curve-controls .btn {
  transition: all 0.3s ease;
}

.demand-curve-controls .btn.active {
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.demand-curve {
  transition: stroke-width 0.2s, opacity 0.2s;
}

.current-marker, .new-marker {
  transition: r 0.2s, transform 0.2s;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.current-marker:hover, .new-marker:hover {
  transform: scale(1.1);
}

/* Customer Segmentation Section Styles */
.segment-filters {
  padding: 20px;
  border-radius: 8px;
}

[data-bs-theme="dark"] .segment-filters {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .segment-filters {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
}

.filter-pills {
  min-height: 38px;
}

.filter-pill {
  padding: 6px 14px;
  border: 2px solid var(--dplus-blue);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  user-select: none;
}

[data-bs-theme="dark"] .filter-pill {
  background-color: rgba(255, 255, 255, 0.05);
  color: #e5e5e5;
}

[data-bs-theme="light"] .filter-pill {
  background-color: white;
  color: #212529;
}

.filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 102, 255, 0.3);
}

[data-bs-theme="dark"] .filter-pill:hover {
  background-color: rgba(0, 102, 255, 0.1);
}

[data-bs-theme="light"] .filter-pill:hover {
  background-color: #e7f3ff;
}

.filter-pill.active {
  background-color: var(--dplus-blue);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 102, 255, 0.3);
}

.filter-pill.active:hover {
  background-color: #0052cc;
}

/* Scenario card tabs styling */
.scenario-card-tab {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 12px;
  padding: 1rem;
}

[data-bs-theme="dark"] .scenario-card-tab {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255, 255, 255, 0.03);
}

[data-bs-theme="light"] .scenario-card-tab {
  border: 1px solid #dee2e6;
  background: white;
}

.scenario-card-tab:hover {
  transform: translateY(-2px);
  border-color: var(--dplus-blue);
}

[data-bs-theme="dark"] .scenario-card-tab:hover {
  box-shadow: 0 4px 8px rgba(0, 102, 255, 0.2);
}

[data-bs-theme="light"] .scenario-card-tab:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.scenario-card-tab.selected {
  border: 2px solid var(--dplus-blue);
}

[data-bs-theme="dark"] .scenario-card-tab.selected {
  background-color: rgba(0, 102, 255, 0.1);
}

[data-bs-theme="light"] .scenario-card-tab.selected {
  background-color: rgba(0, 102, 255, 0.05);
}

.scenario-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.scenario-card-actions .badge {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.scenario-card-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0.25rem 0.45rem;
}

/* Event Timeline Slider Styles */
.timeline-slider-container {
  position: relative;
  padding: 2rem 1rem;
  margin: 2rem 0;
}

.timeline-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  margin: 5rem 0 3rem;
}

[data-bs-theme="dark"] .timeline-track {
  background: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .timeline-track {
  background: #e9ecef;
}

.timeline-event {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.timeline-today-line {
  position: absolute;
  top: -26px;
  bottom: -26px;
  width: 2px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.timeline-today-label {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

[data-bs-theme="light"] .timeline-today-line {
  background: rgba(15, 23, 42, 0.9);
}

[data-bs-theme="light"] .timeline-today-label {
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
}

[data-bs-theme="dark"] .timeline-today-line {
  background: rgba(248, 250, 252, 0.95);
}

[data-bs-theme="dark"] .timeline-today-label {
  background: rgba(248, 250, 252, 0.95);
  color: #0f172a;
}

.timeline-event:hover {
  transform: translate(-50%, -50%) scale(1.5);
}

.timeline-event.is-selected {
  transform: translate(-50%, -50%) scale(1.6);
  box-shadow: 0 0 0 6px rgba(15, 23, 42, 0.18);
}

[data-bs-theme="dark"] .timeline-event.is-selected {
  box-shadow: 0 0 0 6px rgba(248, 250, 252, 0.22);
}

.timeline-event.event-price {
  background: var(--dplus-green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.timeline-event.event-promo {
  background: var(--dplus-blue);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.2);
}

.timeline-event.event-competitor {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.timeline-event.event-content {
  background: var(--dplus-orange);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.timeline-years {
  position: relative;
  height: 30px;
  margin-bottom: 1rem;
}

.timeline-year-marker {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.875rem;
  font-weight: 600;
}

[data-bs-theme="dark"] .timeline-year-marker {
  color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="light"] .timeline-year-marker {
  color: #6c757d;
}

.timeline-months {
  position: relative;
  height: 22px;
  margin-bottom: 0.75rem;
}

.timeline-month-marker {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.timeline-month-marker.is-major {
  font-weight: 700;
}

[data-bs-theme="dark"] .timeline-month-marker {
  color: rgba(255, 255, 255, 0.58);
}

[data-bs-theme="light"] .timeline-month-marker {
  color: rgba(15, 23, 42, 0.58);
}

.timeline-month-guide {
  position: absolute;
  top: -14px;
  bottom: -14px;
  width: 1px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.timeline-month-guide.is-major {
  width: 2px;
}

[data-bs-theme="dark"] .timeline-month-guide {
  background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .timeline-month-guide.is-major {
  background: rgba(255, 255, 255, 0.14);
}

[data-bs-theme="light"] .timeline-month-guide {
  background: rgba(15, 23, 42, 0.08);
}

[data-bs-theme="light"] .timeline-month-guide.is-major {
  background: rgba(15, 23, 42, 0.14);
}

.timeline-details {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dplus-blue);
}

/* Price Slider Styles (for interactive elasticity models) */
.price-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  outline: none;
  transition: opacity 0.2s;
}

[data-bs-theme="dark"] .price-slider {
  background: rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .price-slider {
  background: #e9ecef;
}

.price-slider:hover {
  opacity: 1;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dplus-blue);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 102, 255, 0.3);
  transition: all 0.2s ease;
}

.price-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.5);
}

.price-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dplus-blue);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 102, 255, 0.3);
  border: none;
  transition: all 0.2s ease;
}

.price-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.5);
}

/* Metric Display Cards */
.metric-display-card {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .metric-display-card {
  background: rgba(0, 102, 255, 0.1);
  border: 1px solid rgba(0, 102, 255, 0.2);
}

[data-bs-theme="light"] .metric-display-card {
  background: rgba(0, 102, 255, 0.05);
  border: 1px solid rgba(0, 102, 255, 0.15);
}

/* Step 1 channel promo controls: panel stays visible, but live-impact block does not overlay */
.channel-promo-secondary-card {
  position: static;
}

.channel-promo-controls-card {
  position: sticky;
  top: 108px;
}

.channel-promo-controls-card .card-body {
  max-height: calc(100vh - 132px);
  overflow-y: auto;
  padding-right: 0.75rem;
}

.channel-promo-controls-card .card-body::-webkit-scrollbar {
  width: 8px;
}

.channel-promo-controls-card .card-body::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.45);
  border-radius: 999px;
}

.channel-promo-live-impact {
  border-color: rgba(37, 99, 235, 0.24) !important;
  position: static;
  top: auto;
  z-index: auto;
  box-shadow: none;
  backdrop-filter: none;
}

[data-bs-theme="dark"] .channel-promo-live-impact {
  background: rgba(15, 23, 42, 0.96) !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.5);
}

[data-bs-theme="light"] .channel-promo-live-impact {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(37, 99, 235, 0.28) !important;
}

#channel-promo-elasticity-body td,
#channel-promo-elasticity-body th {
  vertical-align: middle;
}

.channel-promo-pitch-caption {
  border-left: 3px solid rgba(59, 130, 246, 0.5);
  padding-left: 0.5rem;
}

@media (max-width: 991px) {
  .channel-promo-controls-card {
    position: static;
    top: auto;
  }

  .channel-promo-controls-card .card-body {
    max-height: none;
    overflow-y: visible;
    padding-right: 1rem;
  }

  .channel-promo-live-impact {
    position: static;
    box-shadow: none;
  }
}

.decision-engine-controls > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.decision-engine-controls .decision-engine-action {
  margin-top: auto;
}

.decision-engine-spacer {
  visibility: hidden;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.metric-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.metric-value {
  font-size: 1.125rem;
  font-weight: 600;
}

/* Insight Box (for What is Elasticity? type sections) */
.insight-box {
  padding: 1.25rem;
  border-radius: 12px;
  margin-top: 1.5rem;
}

[data-bs-theme="dark"] .insight-box {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-bs-theme="light"] .insight-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.insight-box .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.insight-box h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.event-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  margin-bottom: 0.5rem;
  z-index: 10;
}

[data-bs-theme="dark"] .event-tooltip {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

[data-bs-theme="light"] .event-tooltip {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #212529;
}

.timeline-event:hover .event-tooltip {
  opacity: 1;
}

.timeline-product-badge {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.6rem;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  pointer-events: none;
  z-index: 3;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stagger labels above/below the track to avoid overlapping */
.timeline-event .timeline-product-badge {
  top: 20px;
}
.timeline-event.stagger-above .timeline-product-badge {
  top: auto;
  bottom: 20px;
}
.timeline-event.stagger-far-below .timeline-product-badge {
  top: 34px;
}
.timeline-event.stagger-far-above .timeline-product-badge {
  top: auto;
  bottom: 34px;
}

/* Connector line from dot to staggered label */
.timeline-event .timeline-product-badge::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.3);
}
.timeline-event .timeline-product-badge::before {
  bottom: 100%;
  height: 4px;
}
.timeline-event.stagger-above .timeline-product-badge::before {
  bottom: auto;
  top: 100%;
  height: 4px;
}
.timeline-event.stagger-far-below .timeline-product-badge::before {
  bottom: 100%;
  height: 18px;
}
.timeline-event.stagger-far-above .timeline-product-badge::before {
  bottom: auto;
  top: 100%;
  height: 18px;
}

[data-bs-theme="light"] .timeline-product-badge {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
}

/* Social spike event separate color in timeline */
.timeline-event.event-social {
  background: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

/* Time Horizon Bars (for Churn Elasticity) */
.time-bar {
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.time-bar .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  opacity: 0.5;
  transition: width 0.3s ease;
  border-radius: 6px 0 0 6px;
}

.time-bar .time-bar-label {
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
}

[data-bs-theme="dark"] .time-bar .time-bar-label {
  color: #e5e5e5;
}

[data-bs-theme="light"] .time-bar .time-bar-label {
  color: #212529;
}

/* Tier Button Group (for Churn) */
.tier-btn {
  flex: 1;
  transition: all 0.2s ease;
}

.tier-btn.active {
  background-color: var(--dplus-blue);
  color: white;
  border-color: var(--dplus-blue);
}

/* Migration Flow (for Tier Migration) */
.migration-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.flow-box {
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  min-width: 150px;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .flow-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="light"] .flow-box {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.1);
}

.flow-arrow {
  font-size: 2rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

.flow-box-label {
  font-weight: 600;
}

[data-bs-theme="dark"] .flow-box-label {
  color: rgba(255, 255, 255, 0.72);
}

[data-bs-theme="light"] .flow-box-label {
  color: #334155;
}

/* Event Details Table */
.event-details-table {
  max-height: 100vh;
  overflow-y: auto;
}

.event-detail-card {
  border: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.08);
}

.event-detail-close-row {
  margin-bottom: 0.5rem !important;
}

.event-summary-tile,
.event-summary-metric,
.event-story-panel,
.event-detail-table-card,
.promo-event-summary-card,
.promo-story-card,
.promo-detail-card,
.promo-story-metric,
.promo-story-narrative {
  border: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.08);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(var(--bs-body-bg-rgb), 0.94), rgba(var(--bs-tertiary-bg-rgb), 0.88));
}

.event-summary-tile,
.event-summary-metric {
  padding: 0.85rem 0.9rem;
}

.promo-story-card .card-body,
.promo-detail-card .card-body {
  padding: 1rem;
}

.promo-event-summary-card {
  overflow: hidden;
}

.promo-event-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  color: #fff;
}

.promo-event-header-complete {
  background: linear-gradient(135deg, #168f58, #106e44);
}

.promo-event-header-planned {
  background: linear-gradient(135deg, #64748b, #475569);
}

.promo-event-header-progress {
  background: linear-gradient(135deg, #d97706, #b45309);
}

.promo-event-header-competitor {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

.promo-event-header-social {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.promo-event-header-tentpole {
  background: linear-gradient(135deg, #d97706, #92400e);
}

.promo-event-header-price {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.promo-event-header-generic {
  background: linear-gradient(135deg, #475569, #334155);
}

.promo-event-summary-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.promo-event-summary-status {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.promo-event-summary-body {
  padding: 1rem 1.1rem 1.05rem;
}

.promo-event-summary-line {
  margin-bottom: 0.7rem;
  line-height: 1.45;
}

.promo-event-summary-line:last-child {
  margin-bottom: 0;
}

.event-summary-tile .label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-secondary-color);
  margin-bottom: 0.35rem;
}

.event-summary-tile .value {
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
}

.event-summary-tile .subvalue {
  font-size: 0.74rem;
  color: var(--bs-secondary-color);
  margin-top: 0.25rem;
}

.event-story-panel,
.event-detail-table-card {
  padding: 0.95rem 1rem;
}

.promo-story-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.promo-story-metric {
  padding: 0.7rem 0.8rem;
}

.promo-story-metric .label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-secondary-color);
  margin-bottom: 0.3rem;
}

.promo-story-metric .value {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.promo-story-metric .subvalue {
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
  margin-top: 0.25rem;
}

.promo-story-narrative {
  padding: 0.85rem 0.9rem;
}

.event-scope-badges .badge {
  font-weight: 500;
}

.event-details-table table th {
  white-space: nowrap;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.event-details-table table td {
  min-width: 8rem;
}

.event-details-table table td:nth-child(1) {
  min-width: 11rem;
}

.event-details-table table td:nth-child(9) {
  min-width: 12rem;
}

.event-details-table table td:nth-child(11) {
  min-width: 12rem;
}

@media (max-width: 991.98px) {
  .promo-story-metrics {
    grid-template-columns: 1fr;
  }
}

/* Cohort Watchlist */
.cohort-watchlist-card {
  border-radius: 10px;
}

.cohort-watchlist-body {
  font-size: 0.8125rem;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.cohort-rank {
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.cohort-watchlist-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(var(--bs-tertiary-bg-rgb), 0.88), rgba(var(--bs-tertiary-bg-rgb), 0.58));
  padding: 0.6rem 0.65rem;
  margin-bottom: 0.55rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cohort-watchlist-item:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.38);
  box-shadow: 0 6px 20px rgba(var(--bs-primary-rgb), 0.14);
  transform: translateY(-1px);
}

.cohort-watchlist-item.active {
  border-color: rgba(var(--bs-primary-rgb), 0.55);
  box-shadow: 0 10px 22px rgba(var(--bs-primary-rgb), 0.18);
}

.cohort-watchlist-item .progress {
  background-color: var(--bs-secondary-bg);
}

.cohort-watchlist-item .badge {
  font-weight: 500;
}

.cohort-watchlist-item .watchlist-sku-chip {
  border-radius: 999px;
  border: 1px solid rgba(var(--bs-secondary-color-rgb), 0.35);
  padding: 0.05rem 0.45rem;
  font-size: 0.69rem;
  line-height: 1.2;
}

.cohort-watchlist-item .watchlist-at-risk-count {
  font-size: 0.72rem;
}

.cohort-watchlist-drilldown {
  border: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.08);
  border-radius: 14px;
  padding: 0.85rem;
  min-height: 320px;
  background: linear-gradient(160deg, rgba(var(--bs-body-bg-rgb), 0.9), rgba(var(--bs-tertiary-bg-rgb), 0.95));
}

.cohort-watchlist-drilldown .watchlist-kpi {
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.08);
  background: rgba(var(--bs-body-bg-rgb), 0.7);
}

.cohort-watchlist-drilldown .watchlist-kpi .label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bs-secondary-color);
}

.cohort-watchlist-drilldown .watchlist-kpi .value {
  font-weight: 700;
  font-size: 0.9rem;
}

.cohort-watchlist-drilldown .watchlist-driver-row .progress {
  height: 7px;
  background-color: rgba(var(--bs-secondary-bg-rgb), 0.9);
}

.cohort-watchlist-drilldown .watchlist-sku-table td,
.cohort-watchlist-drilldown .watchlist-sku-table th {
  font-size: 0.74rem;
  vertical-align: middle;
}

.cohort-watchlist-drilldown .watchlist-sku-table .watchlist-sku-name {
  font-weight: 600;
}

.cohort-watchlist-legend .cohort-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

/* Step 6-8 visual-first layouts */
.promo-story-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: center;
}

.promo-story-flow .story-node {
  background: linear-gradient(160deg, rgba(var(--bs-primary-rgb), 0.08), rgba(var(--bs-body-bg-rgb), 0.95));
  border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
  border-radius: 0.65rem;
  padding: 0.45rem 0.55rem;
  min-height: 62px;
}

.promo-story-flow .story-node .label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bs-secondary-color);
}

.promo-story-flow .story-node .value {
  font-size: 0.79rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--bs-emphasis-color);
}

.promo-story-flow .story-arrow {
  text-align: center;
  color: var(--bs-secondary-color);
  font-size: 1rem;
  font-weight: 700;
}

@media (max-width: 991px) {
  .promo-story-flow {
    grid-template-columns: 1fr;
  }

  .promo-story-flow .story-arrow {
    transform: rotate(90deg);
  }
}

/* ========== Event Detail Card (ed-*) ========== */
.ed-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  animation: edSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

[data-bs-theme="dark"] .ed-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="light"] .ed-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
}

.ed-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
}

.ed-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

/* Hero Header */
.ed-hero {
  padding: 2rem 2rem 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.ed-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(255,255,255,0.12), transparent 60%);
  pointer-events: none;
}

.ed-hero-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.ed-hero-content {
  flex: 1;
  min-width: 0;
}

.ed-hero-type {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.ed-type-badge,
.ed-status-badge,
.ed-phase-badge,
.ed-tier-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  line-height: 1.3;
}

.ed-type-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.ed-status-badge {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
}

.ed-phase-badge {
  background: rgba(59, 130, 246, 0.3);
  color: rgba(255, 255, 255, 0.95);
}

.ed-tier-badge {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

.ed-hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.4rem;
  color: #fff;
}

.ed-hero-date {
  font-size: 0.88rem;
  opacity: 0.88;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ed-duration-pill {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255,255,255,0.2);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

/* Body */
.ed-body {
  padding: 1.75rem 2rem 2rem;
}

/* Facts Row */
.ed-facts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .ed-facts-row {
    grid-template-columns: 1fr;
  }
}

.ed-fact {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.ed-fact-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

[data-bs-theme="dark"] .ed-fact-icon {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}

[data-bs-theme="light"] .ed-fact-icon {
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
}

.ed-fact-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

[data-bs-theme="dark"] .ed-fact-label { color: rgba(148, 163, 184, 0.8); }
[data-bs-theme="light"] .ed-fact-label { color: #64748b; }

.ed-fact-value {
  font-size: 0.88rem;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

/* Product & Channel Badges */
.ed-product-badge,
.ed-channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  line-height: 1.3;
}

[data-bs-theme="dark"] .ed-product-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

[data-bs-theme="light"] .ed-product-badge {
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

[data-bs-theme="dark"] .ed-channel-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

[data-bs-theme="light"] .ed-channel-badge {
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.ed-product-badge-code {
  font-size: 0.68rem;
  opacity: 0.7;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Narrative */
.ed-narrative {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
}

[data-bs-theme="dark"] .ed-narrative {
  background: rgba(255, 255, 255, 0.04);
}

[data-bs-theme="light"] .ed-narrative {
  background: rgba(15, 23, 42, 0.03);
}

.ed-narrative-bar {
  width: 4px;
  min-width: 4px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ed-narrative-text {
  font-size: 0.9rem;
  line-height: 1.6;
}

[data-bs-theme="dark"] .ed-narrative-text { color: rgba(226, 232, 240, 0.85); }
[data-bs-theme="light"] .ed-narrative-text { color: #334155; }

/* Promo Details */
.ed-promo-details {
  margin-bottom: 1.5rem;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.5rem;
}

[data-bs-theme="dark"] .ed-promo-details {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

[data-bs-theme="light"] .ed-promo-details {
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.ed-promo-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.3rem 0;
}

.ed-promo-detail-label {
  font-size: 0.78rem;
  font-weight: 600;
}

[data-bs-theme="dark"] .ed-promo-detail-label { color: rgba(148, 163, 184, 0.85); }
[data-bs-theme="light"] .ed-promo-detail-label { color: #64748b; }

.ed-promo-detail-value {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
}

/* KPI Grid */
.ed-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

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

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

.ed-kpi {
  padding: 1rem;
  border-radius: 14px;
  text-align: center;
  transition: transform 0.2s ease;
}

.ed-kpi:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .ed-kpi {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="light"] .ed-kpi {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ed-kpi-highlight {
  grid-row: span 1;
}

[data-bs-theme="dark"] .ed-kpi-highlight {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

[data-bs-theme="light"] .ed-kpi-highlight {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
}

.ed-kpi-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

[data-bs-theme="dark"] .ed-kpi-label { color: rgba(148, 163, 184, 0.75); }
[data-bs-theme="light"] .ed-kpi-label { color: #64748b; }

.ed-kpi-value {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.ed-kpi-unit {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.7;
}

.ed-kpi-sub {
  font-size: 0.74rem;
}

[data-bs-theme="dark"] .ed-kpi-sub { color: rgba(148, 163, 184, 0.65); }
[data-bs-theme="light"] .ed-kpi-sub { color: #94a3b8; }

/* Signal Colors */
.ed-signal-up { color: #10b981; }
.ed-signal-down { color: #ef4444; }
.ed-signal-flat { color: #94a3b8; }

[data-bs-theme="light"] .ed-signal-up { color: #059669; }
[data-bs-theme="light"] .ed-signal-down { color: #dc2626; }

/* Signals Row */
.ed-signals-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .ed-signals-header { color: rgba(148, 163, 184, 0.7); }
[data-bs-theme="light"] .ed-signals-header { color: #64748b; }

.ed-signals-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

@media (max-width: 576px) {
  .ed-signals-row {
    grid-template-columns: 1fr;
  }
}

.ed-signal {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  transition: transform 0.2s ease;
}

.ed-signal:hover {
  transform: translateY(-1px);
}

[data-bs-theme="dark"] .ed-signal {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .ed-signal {
  background: rgba(15, 23, 42, 0.025);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

[data-bs-theme="dark"] .ed-signal.ed-signal-up {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.12);
}

[data-bs-theme="light"] .ed-signal.ed-signal-up {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.12);
}

[data-bs-theme="dark"] .ed-signal.ed-signal-down {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.12);
}

[data-bs-theme="light"] .ed-signal.ed-signal-down {
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.12);
}

.ed-signal-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

[data-bs-theme="dark"] .ed-signal-icon { background: rgba(255,255,255,0.06); }
[data-bs-theme="light"] .ed-signal-icon { background: rgba(15, 23, 42, 0.05); }

.ed-signal-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

[data-bs-theme="dark"] .ed-signal-label { color: rgba(148, 163, 184, 0.8); }
[data-bs-theme="light"] .ed-signal-label { color: #64748b; }

.ed-signal-value {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.ed-signal-value i {
  font-size: 1.1rem;
}

.ed-signal-detail {
  font-size: 0.76rem;
  margin-top: 0.1rem;
}

[data-bs-theme="dark"] .ed-signal-detail { color: rgba(148, 163, 184, 0.6); }
[data-bs-theme="light"] .ed-signal-detail { color: #94a3b8; }

/* Basis note */
.ed-basis-note {
  font-size: 0.76rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

[data-bs-theme="dark"] .ed-basis-note {
  color: rgba(148, 163, 184, 0.6);
  background: rgba(255,255,255,0.03);
}

[data-bs-theme="light"] .ed-basis-note {
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.02);
}

/* Table Section */
.ed-table-section {
  margin-top: 1.25rem;
  border-radius: 16px;
  overflow: hidden;
}

.ed-summary-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

[data-bs-theme="dark"] .ed-table-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

[data-bs-theme="light"] .ed-table-section {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.ed-table-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
}

.ed-table-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.ed-table-subtitle {
  font-size: 0.78rem;
}

[data-bs-theme="dark"] .ed-table-subtitle { color: rgba(148, 163, 184, 0.65); }
[data-bs-theme="light"] .ed-table-subtitle { color: #94a3b8; }

.ed-table-basis {
  font-size: 0.76rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

[data-bs-theme="dark"] .ed-table-basis {
  color: rgba(148, 163, 184, 0.7);
  background: rgba(255,255,255,0.05);
}

[data-bs-theme="light"] .ed-table-basis {
  color: #64748b;
  background: rgba(15, 23, 42, 0.04);
}

.ed-table-section table th {
  white-space: nowrap;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ed-table-section table td {
  vertical-align: middle;
}

/* ========== Event Breakdown Visual (ed-breakdown) ========== */
.ed-breakdown {
  margin-top: 1.25rem;
  border-radius: 20px;
  overflow: hidden;
  animation: edSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

[data-bs-theme="dark"] .ed-breakdown {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="light"] .ed-breakdown {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.07);
}

.ed-breakdown-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem 0.75rem;
}

.ed-breakdown-title {
  font-size: 1.1rem;
  font-weight: 700;
}

/* Charts Row */
.ed-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding: 0.75rem 2rem 1.25rem;
}

@media (max-width: 992px) {
  .ed-summary-tables-grid {
    grid-template-columns: 1fr;
  }

  .ed-charts-row {
    grid-template-columns: 1fr;
  }
}

.ed-chart-panel {
  border-radius: 16px;
  padding: 1.25rem;
}

[data-bs-theme="dark"] .ed-chart-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .ed-chart-panel {
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ed-chart-panel-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.ed-chart-panel-subtitle {
  font-size: 0.74rem;
  margin-bottom: 1rem;
}

[data-bs-theme="dark"] .ed-chart-panel-subtitle { color: rgba(148, 163, 184, 0.6); }
[data-bs-theme="light"] .ed-chart-panel-subtitle { color: #94a3b8; }

.ed-chart-wrap {
  position: relative;
  width: 100%;
}

/* SKU Section */
.ed-sku-section {
  padding: 0.5rem 2rem 2rem;
}

.ed-sku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

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

/* SKU Card */
.ed-sku-card {
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ed-sku-card:hover {
  transform: translateY(-3px);
}

[data-bs-theme="dark"] .ed-sku-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .ed-sku-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  border-color: rgba(59, 130, 246, 0.25);
}

[data-bs-theme="light"] .ed-sku-card {
  background: linear-gradient(160deg, rgba(255,255,255, 0.95), rgba(248, 250, 252, 0.9));
  border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-bs-theme="light"] .ed-sku-card:hover {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
}

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

.ed-sku-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.ed-sku-card-code {
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

[data-bs-theme="dark"] .ed-sku-card-code { color: rgba(148, 163, 184, 0.65); }
[data-bs-theme="light"] .ed-sku-card-code { color: #94a3b8; }

.ed-sku-card-verdict {
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1;
  padding-top: 0.1rem;
}

/* Bar comparison */
.ed-sku-card-bars {
  margin-bottom: 1rem;
}

.ed-sku-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.ed-sku-bar-label {
  width: 64px;
  min-width: 64px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: right;
}

[data-bs-theme="dark"] .ed-sku-bar-label { color: rgba(148, 163, 184, 0.7); }
[data-bs-theme="light"] .ed-sku-bar-label { color: #94a3b8; }

.ed-sku-bar-track {
  flex: 1;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

[data-bs-theme="dark"] .ed-sku-bar-track { background: rgba(255,255,255,0.06); }
[data-bs-theme="light"] .ed-sku-bar-track { background: rgba(15, 23, 42, 0.05); }

.ed-sku-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 4px;
}

.ed-sku-bar-baseline {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.3), rgba(148, 163, 184, 0.5));
}

.ed-sku-bar-up {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.4), rgba(16, 185, 129, 0.85));
}

.ed-sku-bar-down {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.35), rgba(239, 68, 68, 0.8));
}

.ed-sku-bar-value {
  width: 72px;
  min-width: 72px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
}

/* SKU metrics row */
.ed-sku-card-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(128, 128, 128, 0.12);
}

.ed-sku-metric {
  text-align: center;
}

.ed-sku-metric-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

[data-bs-theme="dark"] .ed-sku-metric-label { color: rgba(148, 163, 184, 0.6); }
[data-bs-theme="light"] .ed-sku-metric-label { color: #94a3b8; }

.ed-sku-metric-value {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.ed-sku-metric-sub {
  font-size: 0.68rem;
  margin-top: 0.1rem;
}

[data-bs-theme="dark"] .ed-sku-metric-sub { color: rgba(148, 163, 184, 0.5); }
[data-bs-theme="light"] .ed-sku-metric-sub { color: #94a3b8; }

/* ========== Campaign Timeline Bar ========== */
.ed-timeline-bar {
  margin-bottom: 1.25rem;
}

.ed-timeline-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

[data-bs-theme="dark"] .ed-timeline-labels { color: rgba(148, 163, 184, 0.7); }
[data-bs-theme="light"] .ed-timeline-labels { color: #64748b; }

.ed-timeline-duration {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}

[data-bs-theme="dark"] .ed-timeline-duration {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

[data-bs-theme="light"] .ed-timeline-duration {
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
}

.ed-timeline-track {
  position: relative;
  display: flex;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
}

[data-bs-theme="dark"] .ed-timeline-track {
  background: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .ed-timeline-track {
  background: rgba(15, 23, 42, 0.05);
}

.ed-timeline-active {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  position: relative;
  z-index: 1;
}

.ed-timeline-rolloff {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-radius: 0 999px 999px 0;
  position: relative;
}

[data-bs-theme="dark"] .ed-timeline-rolloff {
  background: repeating-linear-gradient(
    -45deg,
    rgba(99, 102, 241, 0.15),
    rgba(99, 102, 241, 0.15) 4px,
    rgba(99, 102, 241, 0.06) 4px,
    rgba(99, 102, 241, 0.06) 8px
  );
}

[data-bs-theme="light"] .ed-timeline-rolloff {
  background: repeating-linear-gradient(
    -45deg,
    rgba(99, 102, 241, 0.12),
    rgba(99, 102, 241, 0.12) 4px,
    rgba(99, 102, 241, 0.04) 4px,
    rgba(99, 102, 241, 0.04) 8px
  );
}

.ed-timeline-segment-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ed-timeline-rolloff .ed-timeline-segment-label {
  text-shadow: none;
}

[data-bs-theme="dark"] .ed-timeline-rolloff .ed-timeline-segment-label { color: rgba(165, 180, 252, 0.7); }
[data-bs-theme="light"] .ed-timeline-rolloff .ed-timeline-segment-label { color: rgba(99, 102, 241, 0.65); }

.ed-timeline-today-marker {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #f59e0b;
  z-index: 5;
  transform: translateX(-50%);
}

.ed-timeline-today-marker span {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f59e0b;
  white-space: nowrap;
}

/* ========== Promo KPI Row ========== */
.ed-promo-details {
  margin-top: 0.25rem;
}

.ed-promo-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ed-promo-kpi {
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
}

[data-bs-theme="dark"] .ed-promo-kpi {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .ed-promo-kpi {
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ed-promo-kpi-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

[data-bs-theme="dark"] .ed-promo-kpi-label { color: rgba(148, 163, 184, 0.7); }
[data-bs-theme="light"] .ed-promo-kpi-label { color: #64748b; }

.ed-promo-kpi-value {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.ed-kpi-unit {
  font-size: 0.72rem;
  font-weight: 500;
}

[data-bs-theme="dark"] .ed-kpi-unit { color: rgba(148, 163, 184, 0.6); }
[data-bs-theme="light"] .ed-kpi-unit { color: #94a3b8; }

/* Attainment bar */
.ed-attainment-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  margin-top: 0.4rem;
  overflow: hidden;
}

[data-bs-theme="dark"] .ed-attainment-bar { background: rgba(255, 255, 255, 0.08); }
[data-bs-theme="light"] .ed-attainment-bar { background: rgba(15, 23, 42, 0.06); }

.ed-attainment-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== Risk Flag ========== */
.ed-risk-flag {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .ed-risk-flag {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

[data-bs-theme="light"] .ed-risk-flag {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.ed-risk-flag i {
  font-size: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

/* ========== Tag Pills ========== */
.ed-promo-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.ed-tag-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: capitalize;
}

[data-bs-theme="dark"] .ed-tag-pill {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

[data-bs-theme="light"] .ed-tag-pill {
  background: rgba(99, 102, 241, 0.07);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

/* ========== Success Criteria Scorecard ========== */
.ed-scorecard {
  margin-top: 1rem;
  border-radius: 14px;
  padding: 1rem 1.25rem;
}

[data-bs-theme="dark"] .ed-scorecard {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .ed-scorecard {
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ed-scorecard-title {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .ed-scorecard-title { color: rgba(148, 163, 184, 0.85); }
[data-bs-theme="light"] .ed-scorecard-title { color: #475569; }

.ed-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}

.ed-scorecard-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
}

.ed-scorecard-pass .ed-scorecard-icon { color: #10b981; }
.ed-scorecard-fail .ed-scorecard-icon { color: #ef4444; }

[data-bs-theme="dark"] .ed-scorecard-pass {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.12);
}

[data-bs-theme="dark"] .ed-scorecard-fail {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.12);
}

[data-bs-theme="light"] .ed-scorecard-pass {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.1);
}

[data-bs-theme="light"] .ed-scorecard-fail {
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.1);
}

.ed-scorecard-icon {
  font-size: 1.1rem;
  margin-top: 0.05rem;
  flex-shrink: 0;
}

.ed-scorecard-label {
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

[data-bs-theme="dark"] .ed-scorecard-label { color: rgba(148, 163, 184, 0.75); }
[data-bs-theme="light"] .ed-scorecard-label { color: #64748b; }

.ed-scorecard-value {
  font-size: 0.88rem;
  font-weight: 700;
}

.ed-scorecard-vs {
  font-size: 0.7rem;
  font-weight: 500;
}

[data-bs-theme="dark"] .ed-scorecard-vs { color: rgba(148, 163, 184, 0.5); }
[data-bs-theme="light"] .ed-scorecard-vs { color: #94a3b8; }

/* ========== Channel Results Breakdown ========== */
.ed-channel-results {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ed-channel-result-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
}

[data-bs-theme="dark"] .ed-channel-result-item {
  background: rgba(255, 255, 255, 0.03);
}

[data-bs-theme="light"] .ed-channel-result-item {
  background: rgba(15, 23, 42, 0.02);
}

.ed-channel-result-name {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-channel-result-bar-wrap {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}

[data-bs-theme="dark"] .ed-channel-result-bar-wrap { background: rgba(255, 255, 255, 0.06); }
[data-bs-theme="light"] .ed-channel-result-bar-wrap { background: rgba(15, 23, 42, 0.05); }

.ed-channel-result-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.ed-bar-positive { background: linear-gradient(90deg, #10b981, #34d399); }
.ed-bar-negative { background: linear-gradient(90deg, #ef4444, #f87171); }

.ed-channel-result-metrics {
  display: flex;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ========== Strategic Outlook ========== */
.ed-strategic-outlook {
  margin-top: 1.25rem;
  border-radius: 16px;
  overflow: hidden;
  animation: edSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

[data-bs-theme="dark"] .ed-strategic-outlook {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

[data-bs-theme="light"] .ed-strategic-outlook {
  background: rgba(99, 102, 241, 0.03);
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.ed-strategic-header {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 1rem 1.25rem 0.5rem;
  display: flex;
  align-items: center;
}

[data-bs-theme="dark"] .ed-strategic-header { color: #a5b4fc; }
[data-bs-theme="light"] .ed-strategic-header { color: #4f46e5; }

.ed-strategic-body {
  padding: 0.25rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ed-strategic-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ed-strategic-section-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

[data-bs-theme="dark"] .ed-strategic-section-title { color: rgba(148, 163, 184, 0.75); }
[data-bs-theme="light"] .ed-strategic-section-title { color: #475569; }

/* Risk items */
.ed-risk-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.5;
}

.ed-risk-level {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

[data-bs-theme="dark"] .ed-risk-high { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.15); }
[data-bs-theme="dark"] .ed-risk-high .ed-risk-level { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
[data-bs-theme="dark"] .ed-risk-medium { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.15); }
[data-bs-theme="dark"] .ed-risk-medium .ed-risk-level { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
[data-bs-theme="dark"] .ed-risk-low { background: rgba(16, 185, 129, 0.06); border: 1px solid rgba(16, 185, 129, 0.12); }
[data-bs-theme="dark"] .ed-risk-low .ed-risk-level { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
[data-bs-theme="dark"] .ed-risk-info { background: rgba(59, 130, 246, 0.06); border: 1px solid rgba(59, 130, 246, 0.12); }
[data-bs-theme="dark"] .ed-risk-info .ed-risk-level { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }

[data-bs-theme="light"] .ed-risk-high { background: rgba(239, 68, 68, 0.05); border: 1px solid rgba(239, 68, 68, 0.12); }
[data-bs-theme="light"] .ed-risk-high .ed-risk-level { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
[data-bs-theme="light"] .ed-risk-medium { background: rgba(245, 158, 11, 0.05); border: 1px solid rgba(245, 158, 11, 0.12); }
[data-bs-theme="light"] .ed-risk-medium .ed-risk-level { background: rgba(245, 158, 11, 0.12); color: #b45309; }
[data-bs-theme="light"] .ed-risk-low { background: rgba(16, 185, 129, 0.04); border: 1px solid rgba(16, 185, 129, 0.1); }
[data-bs-theme="light"] .ed-risk-low .ed-risk-level { background: rgba(16, 185, 129, 0.12); color: #059669; }
[data-bs-theme="light"] .ed-risk-info { background: rgba(59, 130, 246, 0.04); border: 1px solid rgba(59, 130, 246, 0.1); }
[data-bs-theme="light"] .ed-risk-info .ed-risk-level { background: rgba(59, 130, 246, 0.12); color: #2563eb; }

/* Recommendations */
.ed-reco-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ed-reco-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.5;
}

[data-bs-theme="dark"] .ed-reco-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-bs-theme="light"] .ed-reco-item {
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.ed-reco-item i {
  color: #6366f1;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

/* ========== Business Implications ========== */
.ed-implications {
  margin-top: 1.25rem;
  border-radius: 16px;
  overflow: hidden;
  animation: edSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

[data-bs-theme="dark"] .ed-implications {
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.12);
}

[data-bs-theme="light"] .ed-implications {
  background: rgba(245, 158, 11, 0.025);
  border: 1px solid rgba(245, 158, 11, 0.1);
}

.ed-implications-header {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 1rem 1.25rem 0.5rem;
  display: flex;
  align-items: center;
}

[data-bs-theme="dark"] .ed-implications-header { color: #fbbf24; }
[data-bs-theme="light"] .ed-implications-header { color: #b45309; }

.ed-implications-duration {
  font-size: 0.78rem;
  padding: 0.4rem 1.25rem 0.6rem;
  font-style: italic;
}

[data-bs-theme="dark"] .ed-implications-duration { color: rgba(148, 163, 184, 0.65); }
[data-bs-theme="light"] .ed-implications-duration { color: #64748b; }

.ed-implications .ed-reco-list {
  padding: 0 1.25rem 1.25rem;
}

.ed-implications .ed-reco-item i {
  color: #f59e0b;
}

/* ========== Price Position Dumbbell Chart ========== */
.ed-price-position {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ed-price-position-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ed-dumbbell-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
}

[data-bs-theme="dark"] .ed-dumbbell-legend { color: rgba(148, 163, 184, 0.7); }
[data-bs-theme="light"] .ed-dumbbell-legend { color: #64748b; }

.ed-dumbbell-legend span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ed-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.ed-legend-dot.ed-dumbbell-ours { background: #3b82f6; }
.ed-legend-dot.ed-dumbbell-comp { background: #ef4444; }

.ed-price-position-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 80px 0 0;
  margin-left: 110px;
}

[data-bs-theme="dark"] .ed-price-position-scale { color: rgba(148, 163, 184, 0.4); }
[data-bs-theme="light"] .ed-price-position-scale { color: #94a3b8; }

.ed-dumbbell-row {
  display: grid;
  grid-template-columns: 110px 1fr 80px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.ed-dumbbell-label {
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-dumbbell-track {
  position: relative;
  height: 20px;
  border-radius: 999px;
}

[data-bs-theme="dark"] .ed-dumbbell-track { background: rgba(255, 255, 255, 0.04); }
[data-bs-theme="light"] .ed-dumbbell-track { background: rgba(15, 23, 42, 0.03); }

.ed-dumbbell-connector {
  position: absolute;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  opacity: 0.5;
}

.ed-dumbbell-connector.ed-gap-below { background: #10b981; }
.ed-dumbbell-connector.ed-gap-above { background: #ef4444; }
.ed-dumbbell-connector.ed-gap-parity { background: #f59e0b; }

.ed-dumbbell-dot {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease;
}

.ed-dumbbell-dot:hover {
  transform: translate(-50%, -50%) scale(1.3);
}

.ed-dumbbell-dot.ed-dumbbell-ours { background: #3b82f6; }
.ed-dumbbell-dot.ed-dumbbell-comp { background: #ef4444; }

.ed-dumbbell-values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.ed-dumbbell-price {
  font-size: 0.78rem;
  font-weight: 700;
}

.ed-dumbbell-gap {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}

.ed-gap-below {
  color: #10b981;
}

[data-bs-theme="dark"] .ed-dumbbell-gap.ed-gap-below { background: rgba(16, 185, 129, 0.12); }
[data-bs-theme="light"] .ed-dumbbell-gap.ed-gap-below { background: rgba(16, 185, 129, 0.08); }

.ed-gap-above {
  color: #ef4444;
}

[data-bs-theme="dark"] .ed-dumbbell-gap.ed-gap-above { background: rgba(239, 68, 68, 0.12); }
[data-bs-theme="light"] .ed-dumbbell-gap.ed-gap-above { background: rgba(239, 68, 68, 0.08); }

.ed-gap-parity {
  color: #f59e0b;
}

[data-bs-theme="dark"] .ed-dumbbell-gap.ed-gap-parity { background: rgba(245, 158, 11, 0.12); }
[data-bs-theme="light"] .ed-dumbbell-gap.ed-gap-parity { background: rgba(245, 158, 11, 0.08); }

/* ========== Step Chat Readout ========== */
.step-chat-loading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
}

[data-bs-theme="dark"] .step-chat-loading {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

[data-bs-theme="light"] .step-chat-loading {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.step-chat-loading-title {
  font-size: 0.84rem;
  font-weight: 700;
}

.step-chat-loading-copy {
  font-size: 0.74rem;
}

.step-chat-shell {
  border-radius: 20px;
  overflow: hidden;
}

[data-bs-theme="dark"] .step-chat-shell {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.14);
}

[data-bs-theme="light"] .step-chat-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.step-chat-shell-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0.75rem;
}

.step-chat-kicker {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-chat-title {
  margin-top: 0.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

.step-chat-status {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

[data-bs-theme="dark"] .step-chat-kicker,
[data-bs-theme="dark"] .step-chat-loading-copy {
  color: rgba(191, 219, 254, 0.8);
}

[data-bs-theme="light"] .step-chat-kicker,
[data-bs-theme="light"] .step-chat-loading-copy {
  color: rgba(29, 78, 216, 0.76);
}

[data-bs-theme="dark"] .step-chat-status {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.18);
}

[data-bs-theme="light"] .step-chat-status {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

.step-chat-turn {
  margin: 0 1.1rem 0.95rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
}

[data-bs-theme="dark"] .step-chat-turn-user {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

[data-bs-theme="light"] .step-chat-turn-user {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

[data-bs-theme="dark"] .step-chat-turn-assistant {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.14);
}

[data-bs-theme="light"] .step-chat-turn-assistant {
  background: rgba(239, 246, 255, 0.95);
  border: 1px solid rgba(96, 165, 250, 0.16);
}

.step-chat-turn-label {
  margin-bottom: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.step-chat-turn-body {
  font-size: 0.84rem;
  line-height: 1.55;
}

.step-chat-summary p {
  margin-bottom: 0.55rem;
}

.step-chat-summary p:last-child {
  margin-bottom: 0;
}

.step-chat-brief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 0.9rem;
}

.step-chat-brief-card {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
}

[data-bs-theme="dark"] .step-chat-brief-card {
  background: rgba(15, 23, 42, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

[data-bs-theme="light"] .step-chat-brief-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.step-chat-brief-label {
  margin-bottom: 0.55rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.step-chat-brief-list {
  margin: 0;
  padding-left: 1rem;
}

.step-chat-brief-list li + li {
  margin-top: 0.45rem;
}

.step-chat-empty {
  font-size: 0.76rem;
  opacity: 0.7;
}

/* ========== Market Signal Summary Cards ========== */
.ec-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}

.ec-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.ec-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.ec-legend-dot-dashed {
  position: relative;
}

.ec-legend-dot-dashed::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 1.5px dashed var(--legend-color, currentColor);
  opacity: 0.45;
}

[data-bs-theme="dark"] .ec-legend-item { color: rgba(226, 232, 240, 0.78); }
[data-bs-theme="light"] .ec-legend-item { color: #475569; }

.ec-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.9rem;
}

.ec-signal-card {
  min-width: 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

[data-bs-theme="dark"] .ec-signal-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .ec-signal-card {
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ec-signal-card-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

[data-bs-theme="dark"] .ec-signal-card-label { color: rgba(148, 163, 184, 0.65); }
[data-bs-theme="light"] .ec-signal-card-label { color: #94a3b8; }

.ec-signal-card-value {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ec-signal-card-sub {
  font-size: 0.76rem;
  font-weight: 500;
  margin-top: 0.32rem;
  line-height: 1.45;
}

[data-bs-theme="dark"] .ec-signal-card-sub { color: rgba(148, 163, 184, 0.55); }
[data-bs-theme="light"] .ec-signal-card-sub { color: #94a3b8; }

.ec-signal-card-meta {
  margin-top: 0.45rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.35;
}

[data-bs-theme="dark"] .ec-signal-card-meta { color: rgba(148, 163, 184, 0.48); }
[data-bs-theme="light"] .ec-signal-card-meta { color: #94a3b8; }

.ec-signal-card-stack {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.ec-signal-card-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ec-signal-card-detail {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ec-signal-card-detail-label {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
}

[data-bs-theme="dark"] .ec-signal-card-detail-label { color: rgba(148, 163, 184, 0.58); }
[data-bs-theme="light"] .ec-signal-card-detail-label { color: #94a3b8; }

.ec-signal-card-detail-value {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ec-signal-card-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  font-size: 0.79rem;
  line-height: 1.4;
  flex-wrap: wrap;
}

.ec-signal-card-line span {
  flex: 1 1 auto;
  min-width: 0;
}

.ec-signal-card-line strong {
  font-size: 0.92rem;
  white-space: nowrap;
}

#market-signals-competitive .ec-signal-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 1280px) {
  #market-signals-competitive .ec-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .step-chat-shell-header {
    flex-direction: column;
  }

  .step-chat-status {
    white-space: normal;
  }

  .ec-signal-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Weekly Drilldown (Step 3) ========== */

/* Week Header */
.wd-week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
}

[data-bs-theme="dark"] .wd-week-header {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.06));
  border: 1px solid rgba(59, 130, 246, 0.15);
}

[data-bs-theme="light"] .wd-week-header {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(99, 102, 241, 0.03));
  border: 1px solid rgba(59, 130, 246, 0.12);
}

.wd-week-date {
  font-size: 1.15rem;
  font-weight: 700;
}

.wd-week-badges {
  display: flex;
  gap: 0.5rem;
}

/* Executive Summary */
.wd-exec-summary {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.6;
}

[data-bs-theme="dark"] .wd-exec-summary {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.12);
}

[data-bs-theme="light"] .wd-exec-summary {
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.1);
}

.wd-exec-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #f59e0b;
}

/* KPI Cards */
.wd-kpi-card {
  text-align: center;
  padding: 1rem 0.75rem;
  border-radius: 14px;
  height: 100%;
  transition: transform 0.2s ease;
}

.wd-kpi-card:hover {
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .wd-kpi-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .wd-kpi-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.wd-kpi-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

[data-bs-theme="dark"] .wd-kpi-label { color: rgba(148, 163, 184, 0.65); }
[data-bs-theme="light"] .wd-kpi-label { color: #94a3b8; }

.wd-kpi-value {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}

.wd-kpi-change {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* Section Titles */
.wd-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

[data-bs-theme="dark"] .wd-section-title { color: rgba(148, 163, 184, 0.75); }
[data-bs-theme="light"] .wd-section-title { color: #475569; }

/* Channel Cards */
.wd-channel-card {
  border-radius: 16px;
  padding: 1.15rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wd-channel-card:hover {
  transform: translateY(-3px);
}

[data-bs-theme="dark"] .wd-channel-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .wd-channel-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="light"] .wd-channel-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

[data-bs-theme="light"] .wd-channel-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .wd-channel-mass { border-left: 3px solid #3b82f6; }
[data-bs-theme="dark"] .wd-channel-prestige { border-left: 3px solid #10b981; }
[data-bs-theme="light"] .wd-channel-mass { border-left: 3px solid #3b82f6; }
[data-bs-theme="light"] .wd-channel-prestige { border-left: 3px solid #10b981; }

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

.wd-channel-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.wd-channel-tier-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

[data-bs-theme="dark"] .wd-channel-mass .wd-channel-tier-badge { background: rgba(59, 130, 246, 0.12); color: #93c5fd; }
[data-bs-theme="dark"] .wd-channel-prestige .wd-channel-tier-badge { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }
[data-bs-theme="light"] .wd-channel-mass .wd-channel-tier-badge { background: rgba(59, 130, 246, 0.08); color: #2563eb; }
[data-bs-theme="light"] .wd-channel-prestige .wd-channel-tier-badge { background: rgba(16, 185, 129, 0.08); color: #059669; }

.wd-channel-card-revenue {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.wd-channel-rev-value {
  font-size: 1.4rem;
  font-weight: 800;
}

.wd-channel-rev-wow {
  font-size: 0.78rem;
  font-weight: 700;
}

.wd-trend-up { color: #10b981; }
.wd-trend-down { color: #ef4444; }
.wd-trend-flat { color: #94a3b8; }

.wd-channel-card-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wd-channel-metric {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
}

.wd-channel-metric-label {
  width: 60px;
  font-weight: 600;
  flex-shrink: 0;
}

[data-bs-theme="dark"] .wd-channel-metric-label { color: rgba(148, 163, 184, 0.6); }
[data-bs-theme="light"] .wd-channel-metric-label { color: #94a3b8; }

.wd-channel-metric-value {
  font-weight: 700;
}

.wd-channel-metric-wow {
  font-size: 0.68rem;
  font-weight: 600;
}

/* Panels */
.wd-panel {
  border-radius: 16px;
  padding: 1.25rem;
}

[data-bs-theme="dark"] .wd-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .wd-panel {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.wd-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.wd-panel-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
}

/* Product Grid Table */
.wd-product-table th {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.5rem;
}

[data-bs-theme="dark"] .wd-product-table th { color: rgba(148, 163, 184, 0.65); border-bottom-color: rgba(255,255,255,0.06); }
[data-bs-theme="light"] .wd-product-table th { color: #94a3b8; }

.wd-product-table td {
  padding: 0.5rem;
  font-size: 0.82rem;
  vertical-align: middle;
}

.wd-cell-units {
  display: block;
  font-weight: 700;
}

.wd-cell-delta {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
}

.wd-cell-up { background: rgba(16, 185, 129, 0.06); }
.wd-cell-up .wd-cell-delta { color: #10b981; }
.wd-cell-down { background: rgba(239, 68, 68, 0.06); }
.wd-cell-down .wd-cell-delta { color: #ef4444; }
.wd-cell-flat .wd-cell-delta { color: #94a3b8; }

/* Social Bars */
.wd-social-bar-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
}

.wd-social-bar-label {
  width: 110px;
  min-width: 110px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wd-social-bar-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}

[data-bs-theme="dark"] .wd-social-bar-track { background: rgba(255,255,255,0.06); }
[data-bs-theme="light"] .wd-social-bar-track { background: rgba(15,23,42,0.05); }

.wd-social-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #6366f1);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.wd-social-bar-value {
  width: 40px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Platform Mix */
.wd-social-platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(128,128,128,0.1);
}

.wd-platform-total {
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 0.5rem;
}

[data-bs-theme="dark"] .wd-platform-total { color: rgba(148, 163, 184, 0.7); }
[data-bs-theme="light"] .wd-platform-total { color: #64748b; }

.wd-platform-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

[data-bs-theme="dark"] .wd-platform-chip {
  background: rgba(255,255,255,0.05);
  color: rgba(226,232,240,0.8);
}

[data-bs-theme="light"] .wd-platform-chip {
  background: rgba(15,23,42,0.04);
  color: #475569;
}

/* Key Takeaways */
.wd-takeaways {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1rem;
}

[data-bs-theme="dark"] .wd-takeaways {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-bs-theme="light"] .wd-takeaways {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.wd-takeaways-header {
  font-size: 0.88rem;
  font-weight: 700;
  padding: 1rem 1.25rem 0.5rem;
}

.wd-takeaways-body {
  padding: 0.25rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.wd-takeaway-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.wd-takeaway-item i {
  font-size: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

[data-bs-theme="dark"] .wd-take-success { background: rgba(16, 185, 129, 0.06); border: 1px solid rgba(16, 185, 129, 0.12); }
[data-bs-theme="dark"] .wd-take-success i { color: #10b981; }
[data-bs-theme="dark"] .wd-take-warning { background: rgba(245, 158, 11, 0.06); border: 1px solid rgba(245, 158, 11, 0.12); }
[data-bs-theme="dark"] .wd-take-warning i { color: #f59e0b; }
[data-bs-theme="dark"] .wd-take-danger { background: rgba(239, 68, 68, 0.06); border: 1px solid rgba(239, 68, 68, 0.12); }
[data-bs-theme="dark"] .wd-take-danger i { color: #ef4444; }
[data-bs-theme="dark"] .wd-take-info { background: rgba(59, 130, 246, 0.06); border: 1px solid rgba(59, 130, 246, 0.12); }
[data-bs-theme="dark"] .wd-take-info i { color: #3b82f6; }

[data-bs-theme="light"] .wd-take-success { background: rgba(16, 185, 129, 0.04); border: 1px solid rgba(16, 185, 129, 0.1); }
[data-bs-theme="light"] .wd-take-success i { color: #059669; }
[data-bs-theme="light"] .wd-take-warning { background: rgba(245, 158, 11, 0.04); border: 1px solid rgba(245, 158, 11, 0.1); }
[data-bs-theme="light"] .wd-take-warning i { color: #b45309; }
[data-bs-theme="light"] .wd-take-danger { background: rgba(239, 68, 68, 0.04); border: 1px solid rgba(239, 68, 68, 0.1); }
[data-bs-theme="light"] .wd-take-danger i { color: #dc2626; }
[data-bs-theme="light"] .wd-take-info { background: rgba(59, 130, 246, 0.04); border: 1px solid rgba(59, 130, 246, 0.1); }
[data-bs-theme="light"] .wd-take-info i { color: #2563eb; }

/* ========== Current Business Overview (Step 1 refresh) ========== */

.cbo-range-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

[data-bs-theme="light"] .cbo-range-chip {
  background: #f8fbff;
  border: 1px solid rgba(59, 130, 246, 0.14);
  color: #475569;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.05);
}

[data-bs-theme="dark"] .cbo-range-chip {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: rgba(226, 232, 240, 0.86);
}

.cbo-filter-card,
.cbo-panel {
  border-radius: 22px;
}

[data-bs-theme="light"] .cbo-filter-card,
[data-bs-theme="light"] .cbo-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border: 1px solid rgba(59, 130, 246, 0.12);
  box-shadow: 0 14px 28px rgba(148, 163, 184, 0.14);
}

[data-bs-theme="dark"] .cbo-filter-card,
[data-bs-theme="dark"] .cbo-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(2, 6, 23, 0.92) 100%);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.42);
}

.cbo-filter-card {
  padding: 1.2rem 1.3rem 1.35rem;
}

.cbo-filter-header,
.cbo-panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.cbo-filter-header {
  margin-bottom: 1rem;
}

.cbo-filter-title,
.cbo-panel-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cbo-panel {
  padding: 1.25rem;
}

.cbo-panel-subtitle,
.cbo-selection-note,
.cbo-footnote {
  font-size: 0.8rem;
  line-height: 1.55;
}

[data-bs-theme="light"] .cbo-panel-subtitle,
[data-bs-theme="light"] .cbo-selection-note,
[data-bs-theme="light"] .cbo-footnote {
  color: #64748b;
}

[data-bs-theme="dark"] .cbo-panel-subtitle,
[data-bs-theme="dark"] .cbo-selection-note,
[data-bs-theme="dark"] .cbo-footnote {
  color: rgba(203, 213, 225, 0.72);
}

.cbo-footnote {
  margin-top: 0.9rem;
}

.cbo-kpi-card {
  position: relative;
  height: 100%;
  padding: 1rem 1rem 1.05rem;
  border-radius: 18px;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}

.cbo-kpi-card:hover {
  transform: translateY(-1px);
}

[data-bs-theme="light"] .cbo-kpi-card:hover {
  box-shadow: 0 14px 28px rgba(148, 163, 184, 0.2);
}

[data-bs-theme="light"] .cbo-kpi-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(59, 130, 246, 0.1);
  box-shadow: 0 10px 20px rgba(148, 163, 184, 0.12);
}

[data-bs-theme="dark"] .cbo-kpi-card {
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.cbo-kpi-risk {
  border-color: rgba(239, 68, 68, 0.22);
}

.cbo-kpi-risk::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #dc2626, #f97316);
  border-radius: 18px 18px 0 0;
}

[data-bs-theme="light"] .cbo-kpi-risk {
  background: linear-gradient(180deg, #fff8f8 0%, #fff3f3 100%);
}

.cbo-kpi-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
}

/* Default icon color */
[data-bs-theme="light"] .cbo-kpi-icon {
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
}
[data-bs-theme="dark"] .cbo-kpi-icon {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
}

/* Per-metric icon colors */
[data-bs-theme="light"] .cbo-kpi-icon-revenue { background: rgba(37,99,235,0.09); color: #2563eb; }
[data-bs-theme="light"] .cbo-kpi-icon-units   { background: rgba(124,58,237,0.09); color: #7c3aed; }
[data-bs-theme="light"] .cbo-kpi-icon-price   { background: rgba(245,158,11,0.1);  color: #d97706; }
[data-bs-theme="light"] .cbo-kpi-icon-gap     { background: rgba(220,38,38,0.08);  color: #dc2626; }
[data-bs-theme="light"] .cbo-kpi-icon-social  { background: rgba(16,185,129,0.09); color: #059669; }
[data-bs-theme="light"] .cbo-kpi-icon-risk    { background: rgba(239,68,68,0.12);  color: #dc2626; }

[data-bs-theme="dark"] .cbo-kpi-icon-revenue { background: rgba(96,165,250,0.12);  color: #93c5fd; }
[data-bs-theme="dark"] .cbo-kpi-icon-units   { background: rgba(167,139,250,0.12); color: #a78bfa; }
[data-bs-theme="dark"] .cbo-kpi-icon-price   { background: rgba(251,191,36,0.12);  color: #fbbf24; }
[data-bs-theme="dark"] .cbo-kpi-icon-gap     { background: rgba(248,113,113,0.12); color: #f87171; }
[data-bs-theme="dark"] .cbo-kpi-icon-social  { background: rgba(52,211,153,0.12);  color: #34d399; }
[data-bs-theme="dark"] .cbo-kpi-icon-risk    { background: rgba(248,113,113,0.14); color: #f87171; }

.cbo-kpi-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

[data-bs-theme="light"] .cbo-kpi-label { color: #94a3b8; }
[data-bs-theme="dark"] .cbo-kpi-label { color: rgba(148, 163, 184, 0.78); }

.cbo-kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.cbo-kpi-change {
  margin-top: 0.45rem;
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.45;
}

[data-bs-theme="light"] .cbo-kpi-change { color: #64748b; }
[data-bs-theme="dark"] .cbo-kpi-change { color: rgba(203, 213, 225, 0.72); }

.cbo-kpi-explain-btn {
  padding: 0;
  margin-top: 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.cbo-kpi-explain-btn:hover,
.cbo-kpi-explain-btn:focus {
  text-decoration: none;
}

[data-bs-theme="light"] .cbo-kpi-explain-btn {
  color: #b91c1c;
}

[data-bs-theme="dark"] .cbo-kpi-explain-btn {
  color: #fca5a5;
}

.cbo-risk-ai-callout {
  border-radius: 16px;
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
}

[data-bs-theme="light"] .cbo-risk-ai-callout {
  background: linear-gradient(180deg, #eff6ff 0%, #eef2ff 100%);
  border: 1px solid rgba(59, 130, 246, 0.16);
}

[data-bs-theme="dark"] .cbo-risk-ai-callout {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(96, 165, 250, 0.18);
}

.cbo-risk-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  margin: 0 0.4rem 0.45rem 0;
}

[data-bs-theme="light"] .cbo-risk-chip {
  background: rgba(226, 232, 240, 0.72);
  color: #334155;
}

[data-bs-theme="dark"] .cbo-risk-chip {
  background: rgba(51, 65, 85, 0.72);
  color: #e2e8f0;
}

.cbo-summary-band {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  border-radius: 20px;
}

[data-bs-theme="light"] .cbo-summary-band {
  background: linear-gradient(180deg, #eef5ff 0%, #eaf2ff 100%);
  border: 1px solid rgba(96, 165, 250, 0.22);
}

[data-bs-theme="dark"] .cbo-summary-band {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(96, 165, 250, 0.16);
}

.cbo-summary-label {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
}

.cbo-summary-text {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.55;
}

.cbo-summary-single {
  line-height: 1.55;
}

.cbo-summary-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}

.cbo-summary-list li {
  margin: 0;
  line-height: 1.5;
}

.cbo-summary-updated {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

[data-bs-theme="light"] .cbo-summary-label,
[data-bs-theme="light"] .cbo-summary-updated { color: #315ea8; }

[data-bs-theme="light"] .cbo-summary-text { color: #334155; }

[data-bs-theme="dark"] .cbo-summary-label,
[data-bs-theme="dark"] .cbo-summary-updated { color: #93c5fd; }

[data-bs-theme="dark"] .cbo-summary-text { color: rgba(226, 232, 240, 0.9); }

.cbo-channel-card {
  height: 100%;
  padding: 1rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.cbo-channel-card[style*="cursor:pointer"]:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.cbo-channel-mass::before,
.cbo-channel-prestige::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
}

[data-bs-theme="light"] .cbo-channel-mass::before {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.6), rgba(37, 99, 235, 0.3));
}
[data-bs-theme="light"] .cbo-channel-prestige::before {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.6), rgba(5, 150, 105, 0.3));
}
[data-bs-theme="dark"] .cbo-channel-mass::before {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.5), rgba(59, 130, 246, 0.25));
}
[data-bs-theme="dark"] .cbo-channel-prestige::before {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.45), rgba(16, 185, 129, 0.22));
}

[data-bs-theme="light"] .cbo-channel-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 2px solid rgba(148, 163, 184, 0.18);
}

[data-bs-theme="dark"] .cbo-channel-card {
  background: rgba(15, 23, 42, 0.74);
  border: 2px solid rgba(148, 163, 184, 0.14);
}

[data-bs-theme="light"] .cbo-channel-mass { border-color: rgba(59, 130, 246, 0.45); }
[data-bs-theme="light"] .cbo-channel-prestige { border-color: rgba(16, 185, 129, 0.42); }
[data-bs-theme="dark"] .cbo-channel-mass { border-color: rgba(96, 165, 250, 0.32); }
[data-bs-theme="dark"] .cbo-channel-prestige { border-color: rgba(74, 222, 128, 0.28); }

.cbo-channel-card-top,
.cbo-channel-brand,
.cbo-channel-metric-row,
.cbo-action-item {
  display: flex;
  align-items: center;
}

.cbo-channel-card-top,
.cbo-channel-metric-row {
  justify-content: space-between;
}

.cbo-channel-metric-row {
  align-items: flex-start;
  gap: 0.75rem;
}

.cbo-channel-metric-stack {
  text-align: right;
}

.cbo-channel-metric-sub {
  font-size: 0.71rem;
  font-weight: 700;
  margin-top: 0.12rem;
}

.cbo-channel-card-top {
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cbo-channel-brand {
  gap: 0.7rem;
}

.cbo-channel-brandmark {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
}

[data-bs-theme="light"] .cbo-channel-brandmark {
  background: #ffffff;
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

[data-bs-theme="dark"] .cbo-channel-brandmark {
  background: rgba(255,255,255,0.96);
  color: rgba(226, 232, 240, 0.92);
}

.cbo-channel-logo {
  width: 1.45rem;
  height: 1.45rem;
  object-fit: contain;
  display: block;
}

.cbo-channel-name {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
}

.cbo-channel-tier {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

[data-bs-theme="light"] .cbo-channel-tier { color: #94a3b8; }
[data-bs-theme="dark"] .cbo-channel-tier { color: rgba(148, 163, 184, 0.8); }

.cbo-channel-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  text-align: center;
  min-height: 2rem;
}

.cbo-channel-pill-alert {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.cbo-channel-pill-good {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.cbo-channel-pill-steady {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.cbo-channel-pill-watch {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.cbo-channel-revenue {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.cbo-channel-growth {
  margin-top: 0.2rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.cbo-channel-growth-label {
  font-weight: 500;
  opacity: 0.72;
}

.cbo-channel-metric-row {
  padding-top: 0.55rem;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

/* Channel card action button */
.cbo-channel-action-row {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.cbo-channel-action-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.cbo-channel-action-btn:active {
  transform: scale(0.97);
}

.cbo-channel-btn-danger {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.22);
}
.cbo-channel-btn-danger:hover { background: rgba(220, 38, 38, 0.18); }

.cbo-channel-btn-success {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.2);
}
.cbo-channel-btn-success:hover { background: rgba(5, 150, 105, 0.17); }

.cbo-channel-btn-primary {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.cbo-channel-btn-primary:hover { background: rgba(37, 99, 235, 0.17); }

.cbo-channel-btn-outline {
  background: transparent;
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.cbo-channel-btn-outline:hover { background: rgba(148, 163, 184, 0.08); }

[data-bs-theme="dark"] .cbo-channel-btn-danger { color: #f87171; border-color: rgba(248, 113, 113, 0.25); }
[data-bs-theme="dark"] .cbo-channel-btn-success { color: #34d399; border-color: rgba(52, 211, 153, 0.22); }
[data-bs-theme="dark"] .cbo-channel-btn-primary { color: #93c5fd; border-color: rgba(147, 197, 253, 0.22); }
[data-bs-theme="dark"] .cbo-channel-btn-outline { color: rgba(203, 213, 225, 0.72); }

.cbo-table thead th {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom-width: 1px;
}

[data-bs-theme="light"] .cbo-table thead th {
  color: #94a3b8;
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

[data-bs-theme="dark"] .cbo-table thead th {
  color: rgba(148, 163, 184, 0.78);
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

.cbo-table td {
  padding-top: 0.78rem;
  padding-bottom: 0.78rem;
  font-size: 0.84rem;
  line-height: 1.45;
}

.cbo-issue-item,
.cbo-action-item {
  gap: 0.75rem;
  border-radius: 18px;
  padding: 0.95rem 1rem;
  transition: box-shadow 0.15s ease;
}

.cbo-issue-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.cbo-issue-item + .cbo-issue-item,
.cbo-action-item + .cbo-action-item {
  margin-top: 0.8rem;
}

.cbo-issue-title,
.cbo-action-title {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.cbo-issue-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.cbo-issue-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.cbo-issue-icon-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.cbo-issue-icon-success {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.cbo-issue-icon-info {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.cbo-issue-chevron {
  color: #94a3b8;
  font-size: 0.88rem;
  padding-top: 0.2rem;
}

.cbo-issue-body,
.cbo-issue-action,
.cbo-action-body {
  font-size: 0.8rem;
  line-height: 1.5;
}

.cbo-issue-action {
  margin-top: 0.35rem;
  font-weight: 700;
}

.cbo-issue-danger {
  background: rgba(254, 242, 242, 0.95);
  border: 1px solid rgba(248, 113, 113, 0.22);
}

.cbo-issue-success {
  background: rgba(240, 253, 244, 0.96);
  border: 1px solid rgba(74, 222, 128, 0.24);
}

.cbo-issue-info {
  background: rgba(239, 246, 255, 0.96);
  border: 1px solid rgba(96, 165, 250, 0.22);
}

[data-bs-theme="dark"] .cbo-issue-danger,
[data-bs-theme="dark"] .cbo-issue-success,
[data-bs-theme="dark"] .cbo-issue-info {
  background: rgba(15, 23, 42, 0.72);
}

.cbo-action-item {
  align-items: flex-start;
}

.cbo-action-number {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
}

.cbo-action-danger .cbo-action-number { background: #dc2626; }
.cbo-action-success .cbo-action-number { background: #16a34a; }
.cbo-action-info .cbo-action-number { background: #2563eb; }

[data-bs-theme="light"] .cbo-action-danger,
[data-bs-theme="light"] .cbo-action-success,
[data-bs-theme="light"] .cbo-action-info {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

[data-bs-theme="dark"] .cbo-action-danger,
[data-bs-theme="dark"] .cbo-action-success,
[data-bs-theme="dark"] .cbo-action-info {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

@media (max-width: 1199.98px) {
  .cbo-summary-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .cbo-range-chip {
    width: 100%;
    justify-content: center;
  }

  .cbo-kpi-value,
  .cbo-channel-revenue {
    font-size: 1.55rem;
  }
}

/* ══════════════════════════════════════════════════════
   Modern Loading Screen  (ld-*)
   Full-bleed aurora overlay — no card, pure atmosphere
   ══════════════════════════════════════════════════════ */

/* Override the section wrapper so it's a full-bleed canvas */
#load-data-section {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

[data-bs-theme="dark"] #load-data-section  { background: #080d1a; }
[data-bs-theme="light"] #load-data-section { background: #f0f4ff; }

/* ── Aurora blobs ────────────────────────────────────── */
.ld-aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.ld-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: ldBlobDrift 14s ease-in-out infinite alternate;
  will-change: transform;
}
.ld-blob-1 {
  width: 600px; height: 520px;
  top: -160px; left: -120px;
  animation-duration: 18s;
}
.ld-blob-2 {
  width: 500px; height: 480px;
  bottom: -140px; right: -100px;
  animation-duration: 22s;
  animation-delay: -7s;
}
.ld-blob-3 {
  width: 380px; height: 360px;
  top: 30%; left: 35%;
  animation-duration: 16s;
  animation-delay: -4s;
}
[data-bs-theme="dark"] .ld-blob-1 { background: rgba(37,99,235,0.22); }
[data-bs-theme="dark"] .ld-blob-2 { background: rgba(124,58,237,0.18); }
[data-bs-theme="dark"] .ld-blob-3 { background: rgba(16,185,129,0.12); }
[data-bs-theme="light"] .ld-blob-1 { background: rgba(37,99,235,0.13); }
[data-bs-theme="light"] .ld-blob-2 { background: rgba(124,58,237,0.1); }
[data-bs-theme="light"] .ld-blob-3 { background: rgba(16,185,129,0.09); }
@keyframes ldBlobDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -30px) scale(1.06); }
  66%  { transform: translate(-25px, 45px) scale(0.95); }
  100% { transform: translate(15px, -15px) scale(1.04); }
}

/* ── Top progress strip ──────────────────────────────── */
.ld-top-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  z-index: 10;
  overflow: hidden;
}
[data-bs-theme="dark"]  .ld-top-strip { background: rgba(255,255,255,0.06); }
[data-bs-theme="light"] .ld-top-strip { background: rgba(37,99,235,0.1); }

.ld-top-fill {
  height: 100%;
  min-width: 5%;
  background: linear-gradient(90deg, #2563eb 0%, #7c3aed 55%, #10b981 100%);
  background-size: 200% 100%;
  animation: ldTopShimmer 2.2s linear infinite;
  transition: width 0.42s cubic-bezier(0.22,1,0.36,1);
  position: relative;
}
.ld-top-fill::after {
  content: '';
  position: absolute;
  top: 0; right: -20px;
  width: 20px; height: 100%;
  background: inherit;
  filter: blur(6px);
  opacity: 0.7;
}
.ld-top-fill.ld-progress-done {
  background: linear-gradient(90deg, #059669, #10b981);
  animation: none;
}
@keyframes ldTopShimmer {
  from { background-position: 0% 0%; }
  to   { background-position: 200% 0%; }
}

/* ── Centre content ──────────────────────────────────── */
.ld-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2.5rem 4rem;
  max-width: 560px;
  width: 100%;
  animation: ldFadeUp 0.55s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes ldFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logo mark */
.ld-logo {
  width: 84px; height: 84px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1.6rem;
  animation: ldLogoBreath 3.8s ease-in-out infinite;
}
[data-bs-theme="dark"]  .ld-logo { background: rgba(255,255,255,0.06); color: #fbbf24; box-shadow: 0 0 48px rgba(251,191,36,0.22); }
[data-bs-theme="light"] .ld-logo { background: rgba(255,255,255,0.9); color: #d97706; box-shadow: 0 12px 40px rgba(37,99,235,0.14); border: 1px solid rgba(37,99,235,0.08); }
@keyframes ldLogoBreath {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}

/* Word mark */
.ld-wordmark {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
[data-bs-theme="dark"]  .ld-wordmark { color: #f8fafc; }
[data-bs-theme="light"] .ld-wordmark { color: #0f172a; }

.ld-sub {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 2.4rem;
}

/* Stage text + cursor */
.ld-stage-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 1.6rem;
  margin-bottom: 1.8rem;
}
#loading-stage {
  font-size: 0.95rem;
  font-weight: 600;
}
[data-bs-theme="dark"]  #loading-stage { color: rgba(148,163,184,0.85); }
[data-bs-theme="light"] #loading-stage { color: #475569; }

.ld-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  border-radius: 1px;
  animation: ldBlink 1s step-end infinite;
}
[data-bs-theme="dark"]  .ld-cursor { background: rgba(148,163,184,0.6); }
[data-bs-theme="light"] .ld-cursor { background: #94a3b8; }
@keyframes ldBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Segmented progress pills */
.ld-segs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 1.5rem;
}
.ld-seg {
  height: 4px;
  width: 36px;
  border-radius: 999px;
  transition: background 0.3s, width 0.3s, opacity 0.3s;
  opacity: 0.22;
}
[data-bs-theme="dark"]  .ld-seg { background: #94a3b8; }
[data-bs-theme="light"] .ld-seg { background: #94a3b8; }

.ld-seg.ld-seg-active {
  opacity: 1;
  width: 56px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  animation: ldSegPulse 1.2s ease-in-out infinite;
}
.ld-seg.ld-seg-done {
  opacity: 0.7;
  background: #10b981;
}
@keyframes ldSegPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* Percentage */
.ld-pct {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  opacity: 0.38;
}

/* Keep JS-referenced ID working */
#loading-progress-bar { min-width: 5% !important; }

/* ── Elegant info hint icon ──────────────────────────── */
.cbo-info-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  font-size: 0.55rem;
  border-radius: 50%;
  cursor: help;
  vertical-align: middle;
  margin-left: 3px;
  position: relative;
  top: -1px;
  transition: all 0.2s ease;
}
[data-bs-theme="light"] .cbo-info-hint {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
}
[data-bs-theme="dark"] .cbo-info-hint {
  color: rgba(148, 163, 184, 0.6);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.15);
}
.cbo-info-hint:hover {
  transform: scale(1.15);
}
[data-bs-theme="light"] .cbo-info-hint:hover {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
}
[data-bs-theme="dark"] .cbo-info-hint:hover {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.3);
}

/* ── Channel card action bar ─────────────────────────── */
.cbo-channel-actions {
  display: flex;
  gap: 0;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.cbo-channel-action-link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0.35rem 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.cbo-channel-action-link + .cbo-channel-action-link {
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
}
.cbo-channel-action-link i {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}
[data-bs-theme="light"] .cbo-channel-action-link {
  color: #64748b;
}
[data-bs-theme="dark"] .cbo-channel-action-link {
  color: rgba(148, 163, 184, 0.7);
}
[data-bs-theme="light"] .cbo-channel-action-link:hover {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
}
[data-bs-theme="dark"] .cbo-channel-action-link:hover {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.08);
}
.cbo-channel-action-link:hover i {
  transform: scale(1.15);
}

/* ========== Step 2 Drivers & Signals ========== */
.step2-drivers-header {
  align-items: flex-start;
  gap: 1rem;
}

.section-title-info {
  font-size: 1.1rem;
  color: #60a5fa;
}

.step2-range-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(148, 163, 184, 0.12);
}

.step2-range-pill i {
  color: #64748b;
}

.step2-drivers-shell {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.step2-card {
  border: 1px solid rgba(191, 219, 254, 0.85);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    linear-gradient(135deg, rgba(219, 234, 254, 0.35), rgba(255, 255, 255, 0));
  box-shadow: 0 18px 42px rgba(148, 163, 184, 0.12);
  padding: 1rem 1.1rem;
}

.step2-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.step2-card-header-split {
  align-items: center;
}

.step2-card-kicker {
  font-size: 0.95rem;
  font-weight: 800;
  color: #2563eb;
}

.step2-card-kicker span {
  color: #64748b;
  font-weight: 700;
}

.step2-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.step2-snapshot-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(250px, 1.2fr);
  gap: 0.85rem;
}

.step2-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.step2-snapshot-loading {
  grid-column: 1 / -1;
  padding: 1.3rem;
  border-radius: 16px;
  background: #f8fafc;
  color: #64748b;
  border: 1px dashed rgba(148, 163, 184, 0.4);
}

.step2-snapshot-card-item {
  border-radius: 16px;
  border: 1px solid rgba(191, 219, 254, 0.72);
  padding: 0.95rem 0.95rem 0.85rem;
  min-height: 150px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.92));
}

.step2-snapshot-card-item[data-tone="pricing"] {
  background: linear-gradient(180deg, #ffffff, #eef5ff);
}

.step2-snapshot-card-item[data-tone="demand"] {
  background: linear-gradient(180deg, #ffffff, #ecfdf5);
  border-color: rgba(110, 231, 183, 0.68);
}

.step2-snapshot-card-item[data-tone="promo"] {
  background: linear-gradient(180deg, #ffffff, #f5f3ff);
  border-color: rgba(196, 181, 253, 0.7);
}

.step2-snapshot-card-item[data-tone="event"] {
  background: linear-gradient(180deg, #ffffff, #fff7ed);
  border-color: rgba(253, 186, 116, 0.66);
}

.step2-snapshot-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.step2-snapshot-label i {
  font-size: 1rem;
}

.step2-snapshot-card-item[data-tone="pricing"] .step2-snapshot-label { color: #3b82f6; }
.step2-snapshot-card-item[data-tone="demand"] .step2-snapshot-label { color: #10b981; }
.step2-snapshot-card-item[data-tone="promo"] .step2-snapshot-label { color: #8b5cf6; }
.step2-snapshot-card-item[data-tone="event"] .step2-snapshot-label { color: #f97316; }

.step2-snapshot-value {
  font-size: 1.95rem;
  line-height: 1;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 0.45rem;
}

.step2-snapshot-value.is-positive { color: #16a34a; }
.step2-snapshot-value.is-negative { color: #dc2626; }
.step2-snapshot-value.is-neutral { color: #1e293b; }

.step2-snapshot-headline {
  font-size: 1.02rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.38rem;
}

.step2-snapshot-subvalue {
  font-size: 0.84rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.6rem;
}

.step2-snapshot-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  background: rgba(226, 232, 240, 0.6);
  color: #475569;
}

.step2-snapshot-chip[data-tone="pricing"] { background: rgba(96, 165, 250, 0.14); color: #2563eb; }
.step2-snapshot-chip[data-tone="demand"] { background: rgba(52, 211, 153, 0.14); color: #059669; }
.step2-snapshot-chip[data-tone="promo"] { background: rgba(168, 85, 247, 0.14); color: #7c3aed; }
.step2-snapshot-chip[data-tone="event"] { background: rgba(249, 115, 22, 0.14); color: #c2410c; }

.step2-snapshot-footnote {
  font-size: 0.82rem;
  color: #475569;
}

.step2-snapshot-ai-note {
  margin-top: 0.7rem;
}

.step2-snapshot-ai-shell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.7rem 0.78rem;
  border-radius: 14px;
}

.step2-snapshot-ai-shell-loading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
}

.step2-snapshot-ai-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.16rem;
}

.step2-snapshot-ai-copy {
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-bs-theme="light"] .step2-snapshot-ai-shell {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

[data-bs-theme="dark"] .step2-snapshot-ai-shell {
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

[data-bs-theme="light"] .step2-snapshot-ai-label {
  color: #1d4ed8;
}

[data-bs-theme="dark"] .step2-snapshot-ai-label {
  color: #bfdbfe;
}

[data-bs-theme="light"] .step2-snapshot-ai-copy {
  color: #1e293b;
}

[data-bs-theme="dark"] .step2-snapshot-ai-copy {
  color: #e2e8f0;
}

.step2-analysis-feed {
  border-radius: 16px;
  border: 1px solid rgba(191, 219, 254, 0.72);
  background: linear-gradient(180deg, #f8fbff, #f8fafc);
  padding: 0.95rem;
}

.step2-analysis-feed-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 0.85rem;
}

.step2-analysis-feed-list {
  display: grid;
  gap: 0.78rem;
}

.step2-analysis-feed-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}

.step2-analysis-feed-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(191, 219, 254, 0.4);
  color: #2563eb;
  font-size: 0.92rem;
}

.step2-analysis-feed-label {
  font-size: 0.86rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 0.08rem;
}

.step2-analysis-feed-copy {
  font-size: 0.76rem;
  color: #64748b;
}

.step2-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.step2-panel-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
}

.step2-panel-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
}

.step2-panel-subtitle {
  margin-top: 0.32rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #64748b;
}

.step2-inline-filter {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.step2-filter-label,
#sku-price-filter-container label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  margin: 0;
}

#sku-price-filter-container {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

#sku-price-filter-container .form-select,
.step2-inline-filter .form-select {
  min-width: 160px;
  border-radius: 10px;
  border-color: rgba(148, 163, 184, 0.32);
  background-color: #fff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

.step2-chart-legend {
  min-height: 1.25rem;
}

.step2-chart-wrap {
  position: relative;
  width: 100%;
}

.step2-chart-wrap-lg {
  height: 300px;
}

.step2-chart-wrap-md {
  height: 236px;
}

.step2-panel-metrics {
  margin-top: 0.9rem;
}

.step2-panel-metrics .ec-signal-grid,
.step2-panel-metrics .d-flex {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.step2-panel-metrics .ec-signal-card {
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 0.95rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.step2-panel-metrics .ec-signal-card-value {
  font-size: 1.7rem;
  font-weight: 900;
  color: #0f172a;
}

.step2-panel-metrics .ec-signal-card-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.step2-panel-metrics .ec-signal-card-sub,
.step2-panel-metrics .ec-signal-card-meta,
.step2-panel-metrics .ec-signal-card-detail-label {
  color: #64748b;
}

.step2-timeline-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.step2-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.step2-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.52rem 0.8rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid transparent;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.step2-filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.12);
}

.step2-filter-pill-all { background: #dbeafe; color: #2563eb; border-color: rgba(96, 165, 250, 0.28); }
.step2-filter-pill-competitor { background: #fee2e2; color: #ef4444; border-color: rgba(248, 113, 113, 0.28); }
.step2-filter-pill-promo { background: #ede9fe; color: #8b5cf6; border-color: rgba(167, 139, 250, 0.3); }
.step2-filter-pill-seasonal { background: #ffedd5; color: #f59e0b; border-color: rgba(251, 191, 36, 0.3); }

.btn-check:not(:checked) + .step2-filter-pill {
  opacity: 0.58;
  box-shadow: none;
}

.step2-timeline-shell {
  min-height: 320px;
}

.step2-timeline-frame {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 1rem 1rem 1.1rem;
}

.step2-timeline-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.8rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.step2-timeline-meta-center {
  text-align: center;
  color: #334155;
}

.step2-timeline-ruler {
  position: relative;
}

.step2-timeline-year-row,
.step2-timeline-month-row {
  position: relative;
  height: 26px;
}

.step2-timeline-year {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 800;
  color: #94a3b8;
}

.step2-timeline-month {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
}

.step2-timeline-track {
  position: relative;
  height: 24px;
  margin-top: 0.2rem;
  border-top: 3px solid rgba(226, 232, 240, 0.92);
}

.step2-timeline-guide {
  position: absolute;
  top: -3px;
  width: 1px;
  height: 14px;
  background: rgba(148, 163, 184, 0.18);
}

.step2-timeline-guide.is-major {
  background: rgba(96, 165, 250, 0.28);
}

.step2-timeline-today {
  position: absolute;
  top: -12px;
  bottom: -148px;
  width: 1px;
  border-left: 2px dashed rgba(96, 165, 250, 0.7);
}

.step2-timeline-today span {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.76rem;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
}

.step2-timeline-highlight-row {
  position: relative;
  height: 122px;
  margin-top: 0.3rem;
}

.step2-timeline-highlight {
  position: absolute;
  transform: translateX(-50%);
  width: 130px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #fff;
  text-align: left;
  padding: 0.5rem 0.6rem;
  box-shadow: 0 10px 20px rgba(148, 163, 184, 0.12);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.step2-timeline-highlight:hover,
.step2-timeline-highlight.is-selected {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 14px 26px rgba(96, 165, 250, 0.18);
}

.step2-timeline-highlight[data-type="competitor"] { background: #fff5f5; }
.step2-timeline-highlight[data-type="promo"] { background: #f5f3ff; }
.step2-timeline-highlight[data-type="social"] { background: #f5f8ff; }
.step2-timeline-highlight[data-type="seasonal"] { background: #fff8eb; }

.step2-timeline-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 800;
  margin-bottom: 0.38rem;
}

.step2-timeline-highlight[data-type="competitor"] .step2-timeline-chip { background: rgba(239, 68, 68, 0.16); color: #dc2626; }
.step2-timeline-highlight[data-type="promo"] .step2-timeline-chip { background: rgba(139, 92, 246, 0.14); color: #7c3aed; }
.step2-timeline-highlight[data-type="social"] .step2-timeline-chip { background: rgba(59, 130, 246, 0.14); color: #2563eb; }
.step2-timeline-highlight[data-type="seasonal"] .step2-timeline-chip { background: rgba(245, 158, 11, 0.16); color: #d97706; }

.step2-timeline-highlight-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #334155;
  line-height: 1.2;
}

.step2-timeline-highlight-copy {
  margin-top: 0.22rem;
  font-size: 0.73rem;
  color: #64748b;
  line-height: 1.35;
}

.step2-timeline-dot {
  position: absolute;
  top: -8px;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 999px;
  transform: translateX(-50%);
  background-clip: padding-box;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.step2-timeline-dot[data-type="competitor"] { background: #ef4444; }
.step2-timeline-dot[data-type="promo"] { background: #8b5cf6; }
.step2-timeline-dot[data-type="social"] { background: #3b82f6; }
.step2-timeline-dot[data-type="seasonal"] { background: #f59e0b; }

.step2-timeline-legend {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
}

.step2-timeline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.step2-timeline-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.step2-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 1rem;
}

#event-storyline-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.step2-story-card {
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  padding: 0.95rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.step2-story-card[data-event-id] {
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.step2-story-card[data-event-id]:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(148, 163, 184, 0.12);
}

.step2-story-card[data-story-tone="competitor"] { background: linear-gradient(180deg, #fff6f6, #fffafb); border-color: rgba(252, 165, 165, 0.46); }
.step2-story-card[data-story-tone="social"] { background: linear-gradient(180deg, #f7f5ff, #fcfbff); border-color: rgba(196, 181, 253, 0.48); }
.step2-story-card[data-story-tone="promo"] { background: linear-gradient(180deg, #f0fdf4, #fbfffd); border-color: rgba(134, 239, 172, 0.46); }
.step2-story-card[data-story-tone="caution"] { background: linear-gradient(180deg, #fffaf0, #fffdf9); border-color: rgba(253, 186, 116, 0.48); }

.step2-story-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.step2-story-card[data-story-tone="competitor"] .step2-story-badge { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.step2-story-card[data-story-tone="social"] .step2-story-badge { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.step2-story-card[data-story-tone="promo"] .step2-story-badge { background: rgba(16, 185, 129, 0.12); color: #059669; }
.step2-story-card[data-story-tone="caution"] .step2-story-badge { background: rgba(245, 158, 11, 0.14); color: #b45309; }

.step2-story-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.55rem;
}

.step2-story-copy {
  font-size: 0.83rem;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 0.72rem;
}

.step2-story-meta {
  display: grid;
  gap: 0.2rem;
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 700;
}

.step2-story-grid {
  display: contents;
}

.step2-story-card-loading {
  pointer-events: none;
}

.ai-skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.ai-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.68), transparent);
  animation: loadingShimmer 1.6s linear infinite;
}

.ai-skeleton-pill {
  width: 7rem;
  height: 1.6rem;
  margin-bottom: 0.9rem;
}

.ai-skeleton-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.ai-skeleton-title {
  height: 1.1rem;
  border-radius: 10px;
  margin-bottom: 0.8rem;
}

.ai-skeleton-line {
  height: 0.85rem;
  border-radius: 10px;
  margin-bottom: 0.55rem;
}

.ai-skeleton-line.short {
  width: 74%;
  margin-bottom: 1rem;
}

.ai-skeleton-meta {
  height: 2rem;
  border-radius: 12px;
}

.ai-skeleton-action-number {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.ai-skeleton-list-line {
  display: inline-flex;
  width: 100%;
  height: 0.9rem;
  border-radius: 10px;
}

.ai-loading-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.ai-loading-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #60a5fa;
  opacity: 0.35;
  animation: aiLoadingPulse 1.1s ease-in-out infinite;
}

.ai-loading-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-loading-dot:nth-child(3) {
  animation-delay: 0.3s;
}

.ai-insight-loading {
  margin: 0;
}

.cbo-issue-loading,
.cbo-action-loading {
  pointer-events: none;
}

@keyframes aiLoadingPulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.step2-analyst-card {
  align-self: start;
}

.step2-llm-status {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #e2e8f0;
  color: #475569;
}

.step2-llm-status.bg-success-subtle,
.step2-llm-status.text-success {
  background: rgba(34, 197, 94, 0.14) !important;
  color: #15803d !important;
}

.step2-analyst-selected {
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 0.85rem 0.9rem;
  color: #334155;
  font-size: 0.83rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.step2-analyst-summary {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.step2-analyst-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.step2-analyst-column {
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 0.8rem 0.88rem;
}

.step2-analyst-column-title {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.55rem;
}

.step2-analyst-list {
  padding-left: 1rem;
  margin: 0;
  display: grid;
  gap: 0.38rem;
  color: #334155;
  font-size: 0.8rem;
}

.step2-analyst-button {
  width: 100%;
  border-radius: 12px;
  font-weight: 800;
}

.step2-tip-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: #64748b;
  padding: 0 0.1rem;
}

.step2-tip-row i {
  color: #f59e0b;
}

[data-bs-theme="dark"] .step2-range-pill,
[data-bs-theme="dark"] .step2-card,
[data-bs-theme="dark"] .step2-analysis-feed,
[data-bs-theme="dark"] .step2-timeline-frame,
[data-bs-theme="dark"] .step2-story-card,
[data-bs-theme="dark"] .step2-analyst-column,
[data-bs-theme="dark"] .step2-analyst-selected,
[data-bs-theme="dark"] .step2-panel-metrics .ec-signal-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
  border-color: rgba(71, 85, 105, 0.65);
  color: #e2e8f0;
}

[data-bs-theme="dark"] .step2-card-kicker span,
[data-bs-theme="dark"] .step2-panel-subtitle,
[data-bs-theme="dark"] .step2-analysis-feed-copy,
[data-bs-theme="dark"] .step2-story-copy,
[data-bs-theme="dark"] .step2-analyst-summary,
[data-bs-theme="dark"] .step2-tip-row,
[data-bs-theme="dark"] .step2-analyst-column-title,
[data-bs-theme="dark"] .step2-panel-metrics .ec-signal-card-sub,
[data-bs-theme="dark"] .step2-panel-metrics .ec-signal-card-meta,
[data-bs-theme="dark"] .step2-panel-metrics .ec-signal-card-detail-label,
[data-bs-theme="dark"] .step2-filter-label,
[data-bs-theme="dark"] #sku-price-filter-container label {
  color: rgba(148, 163, 184, 0.84);
}

[data-bs-theme="dark"] .step2-panel-title,
[data-bs-theme="dark"] .step2-snapshot-headline,
[data-bs-theme="dark"] .step2-snapshot-value,
[data-bs-theme="dark"] .step2-story-title,
[data-bs-theme="dark"] .step2-analysis-feed-label,
[data-bs-theme="dark"] .step2-timeline-highlight-title,
[data-bs-theme="dark"] .step2-analyst-list,
[data-bs-theme="dark"] .step2-analyst-selected {
  color: #e2e8f0;
}

[data-bs-theme="dark"] .step2-inline-filter .form-select,
[data-bs-theme="dark"] #sku-price-filter-container .form-select {
  background-color: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  border-color: rgba(71, 85, 105, 0.7);
}

@media (max-width: 1199px) {
  .step2-snapshot-layout,
  .step2-bottom-grid {
    grid-template-columns: 1fr;
  }

  .step2-snapshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .step2-panel-grid {
    grid-template-columns: 1fr;
  }

  .step2-drivers-header {
    flex-direction: column;
  }

  .step2-range-pill {
    align-self: flex-start;
  }
}

@media (max-width: 767px) {
  .step2-card {
    padding: 0.9rem;
  }

  .step2-snapshot-grid,
  #event-storyline-examples,
  .step2-analyst-grid,
  .step2-panel-metrics .ec-signal-grid,
  .step2-panel-metrics .d-flex {
    grid-template-columns: 1fr !important;
  }

  .step2-timeline-meta {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .step2-timeline-meta-center {
    text-align: left;
  }

  .step2-timeline-highlight-row {
    height: 150px;
  }

  .step2-timeline-highlight {
    width: 112px;
    padding: 0.45rem 0.5rem;
  }
}

.step2-chart-wrap-with-callout {
  padding-right: 0;
}

.step2-current-gap-callout {
  position: absolute;
  top: 1rem;
  right: 0.75rem;
  width: 144px;
  border-radius: 16px;
  border: 1px solid rgba(191, 219, 254, 0.92);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 34px rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(8px);
  padding: 0.8rem 0.85rem;
  z-index: 3;
}

.step2-current-gap-callout:empty {
  display: none;
}

.step2-current-gap-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.step2-current-gap-week {
  margin-top: 0.18rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
}

.step2-current-gap-stack {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.7rem;
}

.step2-current-gap-stat {
  display: grid;
  gap: 0.12rem;
}

.step2-current-gap-stat-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.step2-current-gap-stat-label[data-tone="mass"] {
  color: #dc2626;
}

.step2-current-gap-stat-label[data-tone="prestige"] {
  color: #16a34a;
}

.step2-current-gap-stat-value {
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 900;
  color: #0f172a;
}

.step2-current-gap-stat-copy {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}

.step2-panel-metrics .ec-signal-card {
  min-height: 108px;
}

.step2-timeline-frame {
  padding: 1rem 1.1rem 1.2rem;
}

.step2-timeline-legend {
  justify-content: flex-start;
  gap: 1.1rem;
  margin-bottom: 0.9rem;
}

.step2-timeline-highlight-row {
  height: 182px;
}

.step2-timeline-highlight {
  width: 152px;
  padding: 0.58rem 0.65rem 0.62rem;
  border-radius: 14px;
  overflow: hidden;
}

.step2-timeline-highlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(148, 163, 184, 0.24);
}

.step2-timeline-highlight[data-type="competitor"]::before {
  background: #ef4444;
}

.step2-timeline-highlight[data-type="promo"]::before {
  background: #8b5cf6;
}

.step2-timeline-highlight[data-type="social"]::before {
  background: #3b82f6;
}

.step2-timeline-highlight[data-type="seasonal"]::before {
  background: #f59e0b;
}

.step2-timeline-highlight-title {
  margin-bottom: 0.22rem;
}

.step2-timeline-highlight-copy {
  min-height: 2.9em;
}

.step2-timeline-highlight-meta {
  margin-top: 0.32rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #94a3b8;
  line-height: 1.3;
}

.step2-story-card {
  position: relative;
  overflow: hidden;
  padding: 1rem 1rem 0.95rem;
}

.step2-story-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(148, 163, 184, 0.18);
}

.step2-story-card[data-story-tone="competitor"]::after {
  background: rgba(239, 68, 68, 0.45);
}

.step2-story-card[data-story-tone="social"]::after {
  background: rgba(139, 92, 246, 0.42);
}

.step2-story-card[data-story-tone="promo"]::after {
  background: rgba(16, 185, 129, 0.42);
}

.step2-story-card[data-story-tone="caution"]::after {
  background: rgba(245, 158, 11, 0.44);
}

.step2-story-meta {
  gap: 0.35rem;
}

.step2-story-meta-row {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
}

.step2-story-meta-label {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.step2-story-meta-value {
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  line-height: 1.35;
}

.step2-analyst-selected {
  padding: 1rem;
}

.step2-analyst-event-kicker {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.step2-analyst-event-title {
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 900;
  color: #0f172a;
}

.step2-analyst-event-meta {
  margin-top: 0.28rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.step2-analyst-topline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.step2-analyst-topline-item {
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.88);
  border: 1px solid rgba(191, 219, 254, 0.76);
  padding: 0.55rem 0.6rem;
}

.step2-analyst-topline-label {
  display: block;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.18rem;
}

.step2-analyst-topline-value {
  display: block;
  font-size: 0.9rem;
  line-height: 1.2;
  color: #1e293b;
}

.step2-analyst-summary {
  color: #475569;
}

[data-bs-theme="dark"] .step2-current-gap-callout,
[data-bs-theme="dark"] .step2-analyst-topline-item {
  background: rgba(15, 23, 42, 0.94);
  border-color: rgba(71, 85, 105, 0.68);
}

[data-bs-theme="dark"] .step2-current-gap-title,
[data-bs-theme="dark"] .step2-current-gap-week,
[data-bs-theme="dark"] .step2-timeline-highlight-meta,
[data-bs-theme="dark"] .step2-story-meta-label,
[data-bs-theme="dark"] .step2-analyst-event-kicker,
[data-bs-theme="dark"] .step2-analyst-event-meta,
[data-bs-theme="dark"] .step2-analyst-topline-label {
  color: rgba(148, 163, 184, 0.84);
}

[data-bs-theme="dark"] .step2-current-gap-stat-value,
[data-bs-theme="dark"] .step2-analyst-event-title,
[data-bs-theme="dark"] .step2-analyst-topline-value {
  color: #e2e8f0;
}

[data-bs-theme="dark"] .step2-story-meta-value {
  color: #cbd5e1;
}

@media (max-width: 991px) {
  .step2-current-gap-callout {
    width: 132px;
  }
}

@media (max-width: 767px) {
  .step2-current-gap-callout {
    position: static;
    width: 100%;
    margin-top: 0.85rem;
  }

  .step2-timeline-highlight-row {
    height: 206px;
  }

  .step2-timeline-highlight {
    width: 128px;
  }

  .step2-analyst-topline {
    grid-template-columns: 1fr;
  }
}
