/* ═══════════════════════════════════════════════════════════
   Dubai RE Strategic Dashboard — Luxury Design System
   Ported from report.html | Navy + Gold Aesthetic
   ═══════════════════════════════════════════════════════════ */

:root {
  --navy: #1a2332;
  --navy-mid: #243347;
  --gold: #c4953a;
  --gold-subtle: rgba(196, 149, 58, 0.12);
  --teal: #2c8c99;
  --steel: #607d8b;
  --bg: #f4f5f7;
  --bg-card: #f8f9fa;
  --bg-warm: #fafaf6;
  --bg-navy: #f0f3f7;
  --white: #ffffff;
  --text: #333;
  --text-muted: #777;
  --text-secondary: #555;
  --border: #e0e0e0;
  --green: #2e7d32;
  --green-bg: #e8f5e9;
  --orange: #e65100;
  --orange-bg: #fff3e0;
  --red: #c62828;
  --red-bg: #ffebee;
  --yellow: #f57f17;
  --yellow-bg: #fff8e1;
  --risk-orange: #e67e22;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* ── NAV BAR ── */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-bar::-webkit-scrollbar { display: none; }

.nav-brand {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  padding: 16px 24px 16px 0;
  border-right: 1px solid rgba(255,255,255,0.1);
  margin-right: 8px;
}

.nav-tab {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 18px 20px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s;
}

.nav-tab:hover {
  color: rgba(255,255,255,0.85);
}

.nav-tab.active {
  color: var(--gold);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--gold);
}

/* ── LAYOUT ── */
.tab-panel {
  display: none;
  padding: 32px 24px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.section-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  color: var(--navy);
  border-bottom: 3px solid var(--gold);
  padding-bottom: 10px;
  margin-bottom: 28px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.subsection-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  color: var(--navy);
  margin-top: 32px;
  margin-bottom: 14px;
}

/* ── METRIC CARDS ── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--white);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 6px 6px;
  padding: 20px 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.metric-value {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.metric-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.metric-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── SCENARIO CARDS ── */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.scenario-card {
  background: var(--white);
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-left: 4px solid var(--steel);
}

.scenario-card.loss { border-left-color: var(--red); }
.scenario-card.target { border-left-color: var(--gold); }
.scenario-card.optimistic { border-left-color: var(--green); }

.scenario-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.scenario-card.loss .scenario-label { color: var(--red); }
.scenario-card.target .scenario-label { color: var(--gold); }
.scenario-card.optimistic .scenario-label { color: var(--green); }

.scenario-value {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.scenario-detail {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── CALLOUT PANELS ── */
.callout {
  background: var(--bg-warm);
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
  padding: 18px 22px;
  margin: 20px 0;
}

.callout-navy {
  background: var(--bg-navy);
  border-left-color: var(--navy);
}

.callout-risk {
  background: #fff8f0;
  border-left-color: var(--risk-orange);
}

.callout-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.callout p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.callout p:last-child { margin-bottom: 0; }

.callout .highlight {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
}

/* ── TABLES ── */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0 28px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--white);
}

thead th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:nth-child(even) { background: var(--bg-card); }
tbody tr:hover { background: #eef2f7; }

tr.total-row td {
  font-weight: 700;
  background: #eef2f7;
  border-top: 2px solid var(--navy);
}

/* ── VERDICT BADGES ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-verified { background: var(--green-bg); color: var(--green); }
.badge-partial { background: var(--orange-bg); color: var(--orange); }
.badge-unverified { background: var(--yellow-bg); color: var(--yellow); }
.badge-false { background: var(--red-bg); color: var(--red); }
.badge-must { background: var(--green-bg); color: var(--green); }
.badge-phase2 { background: var(--yellow-bg); color: var(--yellow); }
.badge-killed { background: var(--red-bg); color: var(--red); }
.badge-go { background: var(--green-bg); color: var(--green); }
.badge-nogo { background: var(--red-bg); color: var(--red); }
.badge-conditional { background: var(--orange-bg); color: var(--orange); }

/* ── CHART CONTAINERS ── */
.chart-container {
  position: relative;
  background: var(--white);
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

.chart-container canvas {
  max-height: 360px;
}

.chart-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 16px;
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* ── PERSONA CARDS ── */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.persona-card {
  background: var(--white);
  border-radius: 6px;
  padding: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-top: 3px solid var(--navy);
}

.persona-card h4 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 4px;
}

.persona-card .persona-segment {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.persona-card .persona-detail {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.persona-card .persona-detail strong {
  color: var(--navy);
}

/* ── TIMELINE ── */
.timeline {
  padding-left: 28px;
  border-left: 2px solid var(--gold);
  margin: 24px 0 32px 12px;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
  padding-left: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--gold);
}

.timeline-period {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── SLIDER / CALCULATOR ── */
.calc-panel {
  background: var(--white);
  border-radius: 6px;
  padding: 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

.calc-panel .calc-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  color: var(--navy);
  margin-bottom: 20px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.slider-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 100px;
}

.slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--gold);
  height: 6px;
}

.slider-row .slider-value {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  min-width: 140px;
  text-align: right;
}

.calc-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.calc-result-item .calc-result-value {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

.calc-result-item .calc-result-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ── TWO COLUMN ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* ── FUNNEL ── */
.funnel {
  max-width: 500px;
  margin: 0 auto 32px;
}

.funnel-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  margin: 0 auto;
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  border-radius: 4px;
  margin-bottom: 4px;
}

.funnel-stage:nth-child(1) { background: var(--navy); width: 100%; }
.funnel-stage:nth-child(2) { background: var(--teal); width: 82%; }
.funnel-stage:nth-child(3) { background: var(--gold); width: 64%; }
.funnel-stage:nth-child(4) { background: var(--steel); width: 46%; color: var(--white); }

.funnel-label {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  margin-bottom: 12px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-brand {
    font-size: 12px;
    padding-right: 16px;
  }

  .nav-tab {
    font-size: 12px;
    padding: 14px 14px;
  }

  .tab-panel {
    padding: 20px 16px 40px;
  }

  .section-title {
    font-size: 20px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-value {
    font-size: 22px;
  }

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

  .two-col {
    grid-template-columns: 1fr;
  }

  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .persona-grid {
    grid-template-columns: 1fr;
  }

  .slider-row {
    flex-wrap: wrap;
  }

  .slider-row label {
    min-width: auto;
    width: 100%;
  }

  .slider-row .slider-value {
    min-width: auto;
  }
}

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

  .calc-results {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── UTILITY ── */
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-700 { font-weight: 700; }
.serif { font-family: Georgia, 'Times New Roman', serif; }
