:root {
  --bg-page: #F7F6F2;
  --bg-surface: #FFFFFF;
  --bg-muted: #F1EFE8;
  --bg-sidebar: #FAFAF7;
  --text-primary: #1A1A17;
  --text-secondary: #5F5E5A;
  --text-tertiary: #888780;
  --border: #E5E3DC;
  --border-strong: #CBC8BD;
  --primary: #185FA5;
  --primary-hover: #0C447C;
  --primary-light: #E6F1FB;
  --danger: #A32D2D;
  --danger-bg: #FCEBEB;
  --warning: #854F0B;
  --warning-bg: #FAEEDA;
  --success: #27500A;
  --success-bg: #EAF3DE;
  --accent: #BA7517;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --sidebar-width: 232px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  z-index: 10;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 20px;
  margin-bottom: 12px;
}
.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.logo-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  padding: 16px 8px 6px;
  font-weight: 500;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--primary-light);
  color: var(--primary-hover);
  font-weight: 500;
}
.nav-item-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.nav-item svg { flex-shrink: 0; opacity: 0.8; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-top: 1px solid var(--border);
  margin: 0 -4px;
  padding-top: 16px;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #E0E9F5;
  color: var(--primary-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.user-info { min-width: 0; }
.user-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-role {
  font-size: 11px;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== MAIN ==================== */
.main {
  margin-left: var(--sidebar-width);
  padding: 28px 36px 60px;
  min-height: 100vh;
  max-width: 1200px;
}
.main-narrow { max-width: 820px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 16px;
}
.page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}
.topbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
}
.btn:hover {
  background: var(--bg-muted);
  border-color: var(--text-tertiary);
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-muted);
  border-color: var(--border);
}
.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

/* ==================== TABS ==================== */
.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text-primary); }
.tab.active {
  color: var(--primary-hover);
  border-bottom-color: var(--primary);
}

/* ==================== HERO ==================== */
.hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.hero-score {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.score-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.score-product {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.score-value-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}
.score-value {
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--text-primary);
}
.score-over {
  font-size: 18px;
  color: var(--text-tertiary);
  font-weight: 400;
}
.score-trend {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
  margin-bottom: 10px;
}
.trend-up { background: var(--warning-bg); color: var(--warning); }
.trend-down { background: var(--success-bg); color: var(--success); }
.trend-flat { background: var(--bg-muted); color: var(--text-secondary); }
.score-niveau {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 8px;
}
.hero-narration {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}
.narration-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}
.narration-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
  flex: 1;
  margin-bottom: 16px;
}
.narration-text strong { font-weight: 600; }
.narration-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==================== SECTIONS ==================== */
.section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.1px;
}
.components { margin-bottom: 32px; }
.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.component-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.12s;
}
.component-card:hover {
  border-color: var(--text-tertiary);
  transform: translateY(-1px);
}
.component-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.component-score {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.component-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.component-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ==================== KPIs ==================== */
.kpis { margin-bottom: 32px; }
.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.kpi-card {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.kpi-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.kpi-value {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.kpi-delta {
  font-size: 11px;
  font-weight: 500;
}

/* ==================== CHART ==================== */
.chart-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 32px;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.chart-header .section-title { margin-bottom: 0; }
.chart-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.chart-wrapper {
  position: relative;
  height: 240px;
  width: 100%;
}

/* ==================== INSIGHTS ==================== */
.insights { margin-bottom: 32px; }
.insights-list {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.insight-row {
  display: flex;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.55;
  align-items: flex-start;
}
.insight-row:last-child { border-bottom: none; }
.insight-time {
  flex-shrink: 0;
  width: 70px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  padding-top: 1px;
}
.insight-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
}
.insight-content { flex: 1; }
.insight-content strong { font-weight: 600; }
.insight-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  margin-left: 6px;
  font-weight: 500;
}

/* ==================== SOURCES ==================== */
.sources-footer {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
}
.footer-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 12px;
}
.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.source-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.source-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.source-name { font-weight: 500; }
.source-age { color: var(--text-tertiary); margin-left: auto; font-size: 11px; }

/* ==================== BULLETIN EMAIL PREVIEW ==================== */
.email-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
}
.email-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.email-from-name {
  font-weight: 600;
  font-size: 14px;
}
.email-from-email {
  font-size: 12px;
  color: var(--text-tertiary);
}
.email-meta {
  text-align: right;
  font-size: 12px;
  color: var(--text-tertiary);
}
.email-to {
  font-size: 11px;
  margin-top: 2px;
}
.email-subject {
  padding: 14px 22px;
  background: var(--bg-muted);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.email-body {
  padding: 20px 22px 18px;
}
.email-intro {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.email-intro strong { color: var(--text-primary); font-weight: 600; }

.email-product {
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.alert-red { border-left-color: var(--danger); }
.alert-amber { border-left-color: var(--accent); }
.alert-green { border-left-color: var(--success); }
.alert-blue { border-left-color: var(--primary); }

.product-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 12px;
}
.product-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}
.product-context {
  font-size: 12px;
  color: var(--text-tertiary);
}
.product-score-block {
  text-align: right;
  flex-shrink: 0;
}
.product-score {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1;
}
.product-trend {
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 10px;
  display: inline-block;
}
.product-trend.up { background: var(--warning-bg); color: var(--warning); }
.product-trend.down { background: var(--success-bg); color: var(--success); }
.product-trend.flat { background: var(--bg-muted); color: var(--text-secondary); }

.product-narration {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.product-components {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.comp-pill {
  background: var(--bg-muted);
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.comp-pill span { color: var(--text-tertiary); }
.comp-pill strong { font-weight: 600; font-size: 12px; }

.product-action {
  padding: 8px 12px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
}
.action-red { background: var(--danger-bg); color: var(--danger); }
.action-blue { background: var(--primary-light); color: var(--primary-hover); }

.email-footer-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}
.footer-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.footer-btn {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.footer-btn:hover { text-decoration: underline; }
.footer-sources {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.6;
}
.footer-unsub { font-size: 10px; }

/* ==================== NOTE DOCUMENT ==================== */
.note-document {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  max-width: 720px;
  margin: 0 auto;
  font-family: 'Source Serif Pro', Georgia, serif;
}
.note-header {
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--text-primary);
}
.note-classification {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--danger);
  font-weight: 600;
  margin-bottom: 12px;
}
.note-h1 {
  font-family: 'Source Serif Pro', serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.note-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 18px;
}
.note-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text-secondary);
}
.note-meta > div { display: flex; flex-direction: column; gap: 2px; }
.note-meta span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.note-section { margin-bottom: 28px; }
.note-h2 {
  font-family: 'Source Serif Pro', serif;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}
.note-h3 {
  font-family: 'Source Serif Pro', serif;
  font-size: 15px;
  font-weight: 600;
  margin-top: 14px;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.note-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.note-section p strong { font-weight: 600; }
.note-lead {
  font-size: 15px !important;
  color: var(--text-primary) !important;
  line-height: 1.65 !important;
}
.note-ul {
  font-family: 'Source Serif Pro', serif;
  font-size: 14px;
  line-height: 1.7;
  padding-left: 20px;
}
.note-ul li { margin-bottom: 6px; }

.note-table-wrapper { overflow-x: auto; }
.note-table {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  border-collapse: collapse;
  margin-top: 10px;
}
.note-table thead {
  border-bottom: 1.5px solid var(--text-primary);
}
.note-table th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
}
.note-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.note-table td.pos { color: var(--success); font-weight: 500; }
.note-table td.neg { color: var(--danger); font-weight: 500; }

.note-reco {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-top: 10px;
}
.note-reco p { color: var(--primary-hover) !important; }
.note-reco .note-h3 { color: var(--primary-hover); }
.note-reco strong { color: var(--primary-hover); }
.note-reco ul { color: var(--primary-hover); }

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.scenario-card {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.scenario-header {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-strong);
}
.scenario-body {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.note-disclaimer {
  background: var(--bg-muted);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-top: 32px;
}
.note-disclaimer p {
  font-size: 12px !important;
  line-height: 1.55 !important;
  color: var(--text-secondary) !important;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 1000;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 960px) {
  .sidebar { width: 64px; padding: 16px 8px; }
  .sidebar-logo .logo-text, .nav-item span:not(.logo-dot), .nav-section, .user-info { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  :root { --sidebar-width: 64px; }
  .main { padding: 20px 20px 40px; }
  .hero { grid-template-columns: 1fr; }
  .scenario-grid { grid-template-columns: 1fr; }
  .note-document { padding: 28px 24px; }
  .note-h1 { font-size: 22px; }
}
@media (max-width: 600px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .product-components { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== FORECAST PAGE ==================== */
.forecast-controls {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.forecast-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.control-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 500;
}
.horizon-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-muted);
  padding: 3px;
  border-radius: var(--radius-md);
}
.horizon-btn, .target-btn {
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
}
.horizon-btn:hover, .target-btn:hover { color: var(--text-primary); }
.horizon-btn.active, .target-btn.active {
  background: var(--bg-surface);
  color: var(--primary-hover);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.forecast-summary {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.forecast-hero {
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.forecast-hero-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}
.forecast-hero-label span {
  color: var(--text-secondary);
  font-weight: 500;
}
.forecast-hero-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.forecast-hero-value span:first-child {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1;
}
.forecast-unit {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 400;
}
.forecast-hero-delta {
  font-size: 14px;
  color: var(--warning);
  font-weight: 500;
  margin-bottom: 10px;
}
.forecast-hero-range {
  font-size: 12px;
  color: var(--text-secondary);
}
.forecast-hero-range strong {
  color: var(--text-primary);
  font-weight: 600;
}

.forecast-scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.scenario-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.scenario-bear { border-left: 3px solid var(--success); }
.scenario-central { border-left: 3px solid var(--primary); }
.scenario-bull { border-left: 3px solid var(--danger); }
.scenario-prob {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1;
  flex-shrink: 0;
  padding-top: 2px;
}
.scenario-bear .scenario-prob { color: var(--success); }
.scenario-central .scenario-prob { color: var(--primary); }
.scenario-bull .scenario-prob { color: var(--danger); }
.scenario-content { flex: 1; min-width: 0; }
.scenario-title {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
  font-weight: 500;
}
.scenario-value {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.scenario-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.chart-wrapper-large {
  height: 340px;
}

.triggers {
  margin-bottom: 32px;
}
.triggers-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}
.trigger-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.trigger-icon {
  font-size: 18px;
  flex-shrink: 0;
  padding-top: 2px;
}
.trigger-body { flex: 1; min-width: 0; }
.trigger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.trigger-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.trigger-prob {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-left: 10px;
}
.trigger-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  align-items: center;
}
.trigger-impact {
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 500;
}
.trigger-impact-bull { background: var(--danger-bg); color: var(--danger); }
.trigger-impact-bear { background: var(--success-bg); color: var(--success); }
.trigger-horizon {
  color: var(--text-tertiary);
}

.backtest-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.backtest-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
}
.backtest-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 500;
}
.backtest-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.methodology {
  margin-bottom: 32px;
}
.methodology-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.method-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.method-row:last-child { border-bottom: none; }
.method-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.method-value {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

@media (max-width: 960px) {
  .forecast-summary { grid-template-columns: 1fr; }
  .forecast-scenarios { grid-template-columns: 1fr; }
  .method-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ==================== MODAL DRILL-DOWN ==================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 23, 0.55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal-backdrop.show {
  display: flex;
  opacity: 1;
}
.modal-panel {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.2s;
  margin: auto;
}
.modal-backdrop.show .modal-panel {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.modal-header-content { flex: 1; min-width: 0; }
.modal-breadcrumb {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 6px;
}
.modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.modal-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.modal-score-pill {
  display: flex;
  align-items: baseline;
  gap: 2px;
  background: var(--bg-muted);
  padding: 6px 14px;
  border-radius: 20px;
  flex-shrink: 0;
}
.modal-score {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.modal-score-over {
  font-size: 12px;
  color: var(--text-tertiary);
}
.modal-meta {
  font-size: 13px;
  color: var(--text-secondary);
}
.modal-close {
  background: transparent;
  border: none;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s;
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}
.modal-body {
  padding: 20px 26px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}
.modal-section {
  margin-bottom: 22px;
}
.modal-section:last-child { margin-bottom: 0; }
.modal-section-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  margin-bottom: 10px;
}
.modal-narration-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-muted);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary);
}
.modal-chart-wrapper {
  position: relative;
  height: 160px;
  width: 100%;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 12px;
}
.modal-drivers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-driver {
  display: grid;
  grid-template-columns: 1fr 70px 60px;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}
.modal-driver-name {
  font-size: 13px;
  font-weight: 500;
}
.modal-driver-unit {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.modal-driver-score {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.modal-driver-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  min-width: 30px;
}
.modal-driver-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}
.modal-driver-val {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  text-align: right;
}
.modal-signals {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.modal-signal {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.modal-signal:last-child { border-bottom: none; }
.modal-signal-time {
  flex-shrink: 0;
  width: 60px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.modal-signal-content {
  flex: 1;
  line-height: 1.5;
  color: var(--text-primary);
}
.modal-sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.modal-source {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
}
.modal-source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.modal-source-info { flex: 1; min-width: 0; }
.modal-source-name {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}
.modal-source-category {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.3;
}
.modal-source-age {
  font-size: 10px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 26px;
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
}

@media (max-width: 720px) {
  .modal-backdrop { padding: 16px; }
  .modal-panel { border-radius: var(--radius-md); }
  .modal-header { padding: 16px 18px 14px; }
  .modal-body { padding: 16px 18px; max-height: calc(100vh - 180px); }
  .modal-footer { padding: 12px 18px; }
  .modal-driver { grid-template-columns: 1fr 50px; }
  .modal-driver-unit { display: none; }
}
