:root {
  --bg-deep: #0a0f1e;
  --bg-card: #111827;
  --bg-card2: #162032;
  --bg-card3: #0e1a2e;
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.15);
  --text-primary: #e8f0fe;
  --text-secondary: #8fa8c8;
  --text-muted: #4a6080;
  --accent-blue: #4d9de0;
  --accent-green: #2dd4a0;
  --accent-yellow: #f5a623;
  --accent-red: #e05c5c;
  --accent-cyan: #38bdf8;
  --pill-bg: rgba(255, 255, 255, 0.07);
  --pill-border: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: "Barlow", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle background orbs */
body::before {
  content: "";
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(29, 78, 138, 0.18) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(13, 55, 100, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

/* ── TOP HEADER BAR ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1d4e8a 0%, #2563eb 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.brand-text .label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.brand-text .title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

/* Dropdown pills */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select-wrap {
  position: relative;
}

.filter-select {
  appearance: none;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: var(--text-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 7px 32px 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
  min-width: 110px;
}
.filter-select:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.28);
}
.filter-select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.filter-select-wrap::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-secondary);
  pointer-events: none;
}

.filter-select option,
optgroup {
  background: #1a2640;
  color: #e8f0fe;
}

/* Confidential badge */
.conf-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

/* ── MAIN TITLE SECTION ── */
.main-title-area {
  margin-bottom: 28px;
}

.main-title {
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.main-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ── KPI CARDS ROW ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 860px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.kpi-card:hover {
  border-color: var(--border-bright);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card-accent, rgba(77, 157, 224, 0.4));
  border-radius: 14px 14px 0 0;
}

.kpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.kpi-card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.kpi-card-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.kpi-value {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 44px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.kpi-status {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}

.kpi-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.kpi-bar-bg {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.kpi-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--bar-color, var(--accent-blue));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-bar-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
}

.kpi-note {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── ACTIVITY VOLUME PANEL ── */
.volume-panel {
  background: var(--bg-card3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
}

.volume-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.volume-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vol-icon {
  width: 34px;
  height: 34px;
  background: rgba(77, 157, 224, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.vol-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.vol-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.data-cut-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.data-cut-badge span {
  color: var(--text-muted);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

.stat-cell {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: background 0.2s;
}
.stat-cell:hover {
  background: rgba(255, 255, 255, 0.07);
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.stat-value {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

/* ── SLIDE 2: KPI GRID ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-title {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.interp-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 860px) {
  .kpi-grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .kpi-grid-6 {
    grid-template-columns: 1fr;
  }
}

.kpi6-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px 16px;
  position: relative;
}

.kpi6-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.kpi6-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: "Barlow Condensed", sans-serif;
}

.kpi6-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.badge-inband {
  background: rgba(45, 212, 160, 0.15);
  color: var(--accent-green);
}
.badge-below {
  background: rgba(224, 92, 92, 0.15);
  color: var(--accent-red);
}
.badge-above {
  background: rgba(77, 157, 224, 0.15);
  color: var(--accent-cyan);
}
.badge-exc {
  background: rgba(245, 166, 35, 0.15);
  color: var(--accent-yellow);
}

.kpi6-value {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 2px;
}

.kpi6-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.kpi6-icon-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.kpi6-icon {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.kpi6-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.kpi6-bar-bg {
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.kpi6-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.status-label {
  font-size: 10px;
  color: var(--text-muted);
}
.status-val {
  font-size: 11px;
  font-weight: 700;
}

/* ── EXECUTIVE READ PANEL ── */
.exec-panel {
  background: rgba(77, 157, 224, 0.06);
  border: 1px solid rgba(77, 157, 224, 0.2);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

.exec-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: rgba(77, 157, 224, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.exec-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}
.exec-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── GAUGE SECTION ── */
.gauge-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 860px) {
  .gauge-section {
    grid-template-columns: 1fr;
  }
}

.gauge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.gauge-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.gauge-current {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 12px;
}

canvas.gauge-canvas {
  width: 100% !important;
}

.gauge-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gauge-meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.gauge-meta-cell {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.gmc-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.gmc-value {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 20px;
  font-weight: 800;
}

/* ── CPS DRIVERS ── */
.drivers-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.driver-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.driver-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.driver-name {
  font-size: 12px;
  font-weight: 700;
}
.driver-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
}

.driver-bar-bg {
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
}
.driver-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.driver-note {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── CHARTS ROW ── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 860px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.chart-card-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}
.chart-card-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.chart-badge {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
}

/* ── RADAR SECTION ── */
.radar-section {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 860px) {
  .radar-section {
    grid-template-columns: 1fr;
  }
}

.kpi-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.kpi-table-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}
.kpi-table-sub {
  font-size: 11px;
  color: var(--accent-yellow);
  font-weight: 600;
  margin-bottom: 16px;
}

.kpi-row-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.kri-name {
  font-size: 12px;
  color: var(--text-secondary);
}
.kri-vals {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
}
.kri-my {
  color: var(--accent-green);
}
.kri-eu {
  color: var(--accent-red);
}
.vs-sep {
  color: var(--text-muted);
  margin: 0 4px;
}

/* ── FOOTER ── */
.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.footer-right {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── LOADING / TRANSITION ── */
.dashboard-body {
  transition: opacity 0.3s ease;
}
.dashboard-body.loading {
  opacity: 0.4;
  pointer-events: none;
}

/* ── SECTION DIVIDER ── */
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0 24px;
}

.section-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-meta::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
