/* ========== Capability Risk Report — Overrides & Additions ========== */
/* Inherits dark theme from dashboard.css via body.dashboard-page       */

/* ========== Report Container ========== */
.report {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 3rem;
  padding-left: calc(var(--sidebar-w) + 2.5rem);
}

/* ========== Report Header ========== */
.report-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.report-classification {
  display: inline-block;
  padding: 0.3rem 1.6rem;
  background: rgba(255,207,51,.12);
  border: 1px solid rgba(255,207,51,.35);
  border-radius: 4px;
  color: #ffcf33;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.report-header h1 {
  font-size: 2rem;
  margin: 0.5rem 0 0.3rem;
}
.report-header h2 {
  font-size: 1.15rem;
  margin: 0 0 0.8rem;
}
.report-meta {
  color: #556678;
  font-size: 0.82rem;
  margin: 0;
}

/* ========== Report Sections ========== */
.report-section {
  margin-bottom: 3rem;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  color: #e0e6f0;
  margin-bottom: 0.5rem;
}
.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(15,155,255,.12);
  color: #0f9bff;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
}
.section-narrative {
  color: #6b7a8d;
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  max-width: 720px;
}

/* ========== Heatmap Table ========== */
.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.heatmap-table th {
  background: rgba(255,255,255,.05);
  color: #6b7a8d;
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.heatmap-table th.hm-dim {
  text-align: center;
  min-width: 80px;
}
.heatmap-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.heatmap-table tbody tr:hover td {
  background: rgba(255,255,255,.03);
}
.hm-row-num {
  color: #556678;
  font-variant-numeric: tabular-nums;
  text-align: center;
  width: 36px;
}
.hm-activity {
  color: #e0e6f0;
  font-weight: 600;
  max-width: 380px;
}

/* Heatmap cells */
.heatmap-cell {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-radius: 4px;
}
.hm-green {
  background: rgba(95,217,154,.12);
  color: var(--rag-green);
}
.hm-amber {
  background: rgba(255,207,51,.12);
  color: var(--rag-amber);
}
.hm-red {
  background: rgba(255,59,85,.15);
  color: var(--rag-red);
}
.hm-grey {
  background: transparent;
  color: #555;
}

/* Worst column */
.hm-worst {
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ========== Geographic Concentration ========== */
.geo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.geo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.4rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  opacity: 0;
  animation: fade-up 0.5s ease-out forwards;
}
.geo-card:nth-child(1)  { animation-delay: 0s; }
.geo-card:nth-child(2)  { animation-delay: 0.06s; }
.geo-card:nth-child(3)  { animation-delay: 0.12s; }
.geo-card:nth-child(4)  { animation-delay: 0.18s; }
.geo-card:nth-child(5)  { animation-delay: 0.24s; }
.geo-card:nth-child(6)  { animation-delay: 0.30s; }
.geo-card:nth-child(7)  { animation-delay: 0.36s; }
.geo-card:nth-child(8)  { animation-delay: 0.42s; }
.geo-card:nth-child(9)  { animation-delay: 0.48s; }
.geo-card:nth-child(10) { animation-delay: 0.54s; }

.geo-code {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.geo-rag {
  margin-bottom: 0.15rem;
}
.geo-stat {
  font-size: 0.78rem;
  color: #6b7a8d;
  text-align: center;
}
.geo-stat strong {
  color: #b0bec5;
  font-weight: 700;
}

/* ========== Overall Exposure Stat ========== */
.stat-overall {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.stat-overall.sov-green { color: var(--rag-green); }
.stat-overall.sov-amber { color: var(--rag-amber); }
.stat-overall.sov-red   { color: var(--rag-red); }
.stat-overall.sov-grey  { color: #555; }

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
  .geo-card {
    opacity: 1;
    animation: none;
  }
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .report {
    padding: 1.5rem 1rem;
    padding-left: calc(var(--sidebar-w) + 1rem);
  }
  .heatmap-table {
    font-size: 0.78rem;
  }
  .heatmap-table th.hm-dim {
    min-width: 60px;
  }
  .hm-activity {
    max-width: 200px;
    font-size: 0.78rem;
  }
  .geo-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}
