/* TP Radar — Design System v2 */
/* Direction: Linear.app × warm neutrals */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Tokens ── */
:root {
  --font:         'Inter', system-ui, sans-serif;
  --bg:           #f5f2ee;
  --surface:      #ffffff;
  --border:       rgba(0,0,0,0.08);
  --border-med:   rgba(0,0,0,0.13);
  --text:         #111110;
  --text-2:       #6b6660;
  --text-3:       #a09890;
  --brand:        #141412;
  --brand-border: rgba(255,255,255,0.07);
  --critical:     #dc2626;
  --high:         #ea580c;
  --medium:       #ca8a04;
  --low:          #16a34a;
  --critical-bg:  #fef2f2;
  --high-bg:      #fff7ed;
  --medium-bg:    #fefce8;
  --low-bg:       #f0fdf4;
  --r:            6px;
  --r-pill:       20px;
  --shadow:       0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 14px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Topbar ── */
.topbar {
  background: var(--brand);
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 20px;
  border-bottom: 1px solid var(--brand-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-logo {
  font-size: 14px;
  font-weight: 600;
  color: #f0ede8;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}

.topbar-logo-icon {
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,0.12);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.1);
}

.topbar-sep {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.topbar-nav {
  display: flex;
  gap: 2px;
  flex: 1;
}

.topbar-nav a {
  font-size: 13px;
  color: rgba(240,237,232,0.45);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.1s;
  font-weight: 400;
}

.topbar-nav a.active {
  color: rgba(240,237,232,0.9);
  background: rgba(255,255,255,0.08);
  font-weight: 500;
}

.topbar-nav a:hover:not(.active) { color: rgba(240,237,232,0.65); }

.topbar-right { margin-left: auto; }

.topbar-btn {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.1);
  color: rgba(240,237,232,0.9);
  transition: background 0.1s;
}

.topbar-btn:hover { background: rgba(255,255,255,0.15); }

/* Report variant: back link + logo on right */
.topbar-back {
  font-size: 13px;
  color: rgba(240,237,232,0.45);
  text-decoration: none;
  font-family: monospace;
  letter-spacing: 0.2px;
  transition: color 0.15s;
}

.topbar-back:hover { color: rgba(240,237,232,0.7); }

.topbar-logo--right {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: rgba(240,237,232,0.35);
  letter-spacing: -0.2px;
}

/* ── Dashboard: Page header ── */
.page-header {
  padding: 28px 28px 0;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.4px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 3px;
}

.page-stats {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 4px;
  flex-wrap: wrap;
}

/* ── Stat pill ── */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  box-shadow: var(--shadow);
}

.stat-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.stat-num { font-size: 12px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--text-3); }

/* ── Dashboard: Toolbar ── */
.toolbar {
  padding: 18px 28px 16px;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.search-wrap { position: relative; }

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 14px;
  pointer-events: none;
}

.toolbar-input {
  font-family: var(--font);
  font-size: 13px;
  padding: 7px 12px 7px 32px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  outline: none;
  width: 220px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.toolbar-input::placeholder { color: var(--text-3); }

.toolbar-input:focus {
  border-color: var(--border-med);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05), var(--shadow);
}

/* ── Filter chips ── */
.filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.1s;
  user-select: none;
}

.filter-chip:hover { border-color: var(--border-med); color: var(--text); }

.filter-chip.active {
  background: var(--brand);
  color: var(--bg);
  border-color: var(--brand);
}

.chip-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.toolbar-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ── Dashboard: Grid wrapper ── */
/* Note: reports use .container (1100px). Dashboard uses .dashboard-wrap (1280px). */
.dashboard-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px 48px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

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

/* ── Dashboard: Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-med);
  transform: translateY(-1px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Risk badge (dashboard cards) ── */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
}

.risk-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.risk-badge.CRITICAL, .risk-badge.critical { background: var(--critical-bg); color: var(--critical); }
.risk-badge.HIGH,     .risk-badge.high     { background: var(--high-bg);     color: var(--high); }
.risk-badge.MEDIUM,   .risk-badge.medium   { background: var(--medium-bg);   color: var(--medium); }
.risk-badge.LOW,      .risk-badge.low      { background: var(--low-bg);      color: var(--low); }

.risk-dot.CRITICAL, .risk-dot.critical { background: var(--critical); }
.risk-dot.HIGH,     .risk-dot.high     { background: var(--high); }
.risk-dot.MEDIUM,   .risk-dot.medium   { background: var(--medium); }
.risk-dot.LOW,      .risk-dot.low      { background: var(--low); }

.score-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.card-body { display: flex; flex-direction: column; gap: 2px; }

.card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.card-group { font-size: 12px; color: var(--text-3); }

/* ── KPI tile (dashboard cards) ── */
.card-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.kpi-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px 10px;
}

.kpi-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}

.kpi-key { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* ── Risk mini-list (dashboard cards) ── */
.card-risks { display: flex; flex-direction: column; gap: 0; list-style: none; }

.card-risk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.card-risk-item:last-child { border-bottom: none; }

.ritem-name {
  font-size: 12px;
  color: var(--text-2);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
}

.ritem-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.ritem-badge.CRITICAL { background: var(--critical-bg); color: var(--critical); }
.ritem-badge.HIGH     { background: var(--high-bg);     color: var(--high); }
.ritem-badge.MEDIUM   { background: var(--medium-bg);   color: var(--medium); }
.ritem-badge.LOW      { background: var(--low-bg);      color: var(--low); }

/* ── Card footer ── */
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.card-krs { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.card-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.1s;
}

.card-link:hover { color: var(--text); }

/* ── Empty card ── */
.card-empty {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  cursor: default;
  gap: 6px;
}

.card-empty:hover { transform: none; box-shadow: none; border-color: var(--border); }
.card-empty-icon  { font-size: 20px; color: var(--text-3); opacity: 0.4; line-height: 1; }
.card-empty-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.card-empty-hint  { font-size: 11px; color: var(--text-3); }

/* ── Empty state ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-3);
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,17,16,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--r);
  padding: 32px;
  max-width: 460px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(17,17,16,0.2);
  border: 1px solid var(--border);
  position: relative;
}

.modal h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.modal p {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 10px;
}

.modal code {
  font-family: var(--font);
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--text);
}

.modal-command {
  background: var(--brand);
  color: #7dd3fc;
  font-family: var(--font);
  font-size: 13px;
  padding: 12px 16px;
  border-radius: var(--r);
  margin: 12px 0;
  user-select: all;
  border-left: 3px solid rgba(255,255,255,0.15);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-3);
  background: none;
  border: none;
  line-height: 1;
  transition: color 0.15s;
  padding: 4px;
}

.modal-close:hover { color: var(--text); }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 20px 28px;
  font-size: 11px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  letter-spacing: 0.2px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════
   REPORT PAGES
   ═══════════════════════════════════════ */

/* ── Report header ── */
.report-header {
  background: var(--brand);
  color: #f5f2ee;
  padding: 36px 32px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* no dot-grid ::after — removed intentionally */

.report-header-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.report-eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(240,237,232,0.35);
  margin-bottom: 12px;
}

.report-title {
  font-size: 32px;
  font-weight: 700;
  color: #f5f2ee;
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin-bottom: 8px;
}

.report-subtitle {
  font-size: 13px;
  color: rgba(240,237,232,0.45);
  margin-bottom: 20px;
  font-weight: 400;
}

.header-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.chip {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(240,237,232,0.6);
}

.header-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(240,237,232,0.6);
}

.chip.risk-high,
.chip.risk-critical {
  background: rgba(220,38,38,0.15);
  border-color: rgba(220,38,38,0.35);
  color: #fca5a5;
  font-weight: 600;
}

.risk-chip.CRITICAL { background: var(--critical-bg); color: var(--critical); border-color: rgba(220,38,38,0.3); }
.risk-chip.HIGH     { background: var(--high-bg);     color: var(--high);     border-color: rgba(234,88,12,0.3); }
.risk-chip.MEDIUM   { background: var(--medium-bg);   color: var(--medium);   border-color: rgba(202,138,4,0.3); }
.risk-chip.LOW      { background: var(--low-bg);      color: var(--low);      border-color: rgba(22,163,74,0.3); }

/* ── Report container ── */
/* Dashboard uses .dashboard-wrap to avoid collision */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 48px;
}

/* ── Section label ── */
.section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-3);
  border-left: 3px solid var(--border-med);
  padding-left: 10px;
  margin: 40px 0 16px;
}

/* ── KPI grid (section 01) ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.kpi-card .kv {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}

.kpi-card .kl {
  font-size: 11px;
  color: var(--text-3);
}

/* ── Risk score row (section 02) ── */
.risk-score-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}

.score-card .sv {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.score-card .sl { font-size: 11px; color: var(--text-3); }

.sv.critical { color: var(--critical); }
.sv.high     { color: var(--high); }
.sv.medium   { color: var(--medium); }
.sv.low      { color: var(--low); }
.sv.neutral  { color: var(--text); }

/* ── Financial metrics (section 03) ── */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: var(--shadow);
}

.metric .mv {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}

.metric .mk { font-size: 11px; color: var(--text-3); }
.metric .mt { font-size: 10px; color: var(--text-3); opacity: 0.7; margin-top: 1px; }

.mv.ok   { color: var(--low); }
.mv.warn { color: var(--medium); }
.mv.bad  { color: var(--critical); }

/* ── Group structure (section 04) ── */
.struct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.struct-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow);
}

.flag { font-size: 20px; flex-shrink: 0; }

.struct-name { font-size: 13px; font-weight: 600; color: var(--text); }
.struct-loc  { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.struct-role { font-size: 11px; font-weight: 500; margin-top: 5px; }
.struct-role.full   { color: var(--low); }
.struct-role.major  { color: var(--medium); }
.struct-role.parent { color: var(--text-2); }

/* ── Tables ── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  overflow-x: auto; /* mobile scroll */
}

.table-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}

.table-head h3 { font-size: 13px; font-weight: 600; color: var(--text); }
.table-head span { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

table { width: 100%; border-collapse: collapse; min-width: 400px; }

thead th {
  padding: 8px 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

thead th.r { text-align: right; }

tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

tbody td { padding: 9px 14px; font-size: 13px; color: var(--text); }
tbody td.r { text-align: right; font-variant-numeric: tabular-nums; }
tbody td.bold { font-weight: 600; }
tbody td.entity { font-weight: 600; }

.total-row { background: rgba(0,0,0,0.025) !important; }
.total-row td { font-weight: 700; border-top: 1px solid var(--border-med); }

/* ── Two-column layout ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

/* ── Risk badge (reports) ── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
}

.badge.CRITICAL { background: var(--critical-bg); color: var(--critical); }
.badge.HIGH     { background: var(--high-bg);     color: var(--high); }
.badge.MEDIUM   { background: var(--medium-bg);   color: var(--medium); }
.badge.LOW      { background: var(--low-bg);      color: var(--low); }

/* ── Risk analysis list (section 07) ── */
.risk-list { display: flex; flex-direction: column; gap: 10px; }

.risk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  box-shadow: var(--shadow);
}

.risk-stripe { width: 3px; flex-shrink: 0; }
.risk-stripe.CRITICAL { background: var(--critical); }
.risk-stripe.HIGH     { background: var(--high); }
.risk-stripe.MEDIUM   { background: var(--medium); }
.risk-stripe.LOW      { background: var(--low); }

.risk-body-inner { padding: 16px 20px; flex: 1; }

.risk-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.risk-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}

.risk-amt {
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}

.risk-desc { font-size: 13px; color: var(--text-2); line-height: 1.65; }
.risk-desc strong { color: var(--text); }

.risk-bullets { margin-top: 8px; padding-left: 16px; }
.risk-bullets li { margin-bottom: 3px; font-size: 12px; color: var(--text-2); }

.risk-rec {
  margin-top: 10px;
  border-left: 3px solid var(--border-med);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg);
  border-radius: 0 4px 4px 0;
}

/* ── Info box ── */
.info-box {
  background: var(--medium-bg);
  border: 1px solid rgba(202,138,4,0.25);
  border-left: 3px solid var(--medium);
  border-radius: var(--r);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 10px;
}

/* ── Method box ── */
.method-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 20px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.7;
}

.method-box strong { color: var(--text); }

/* ── YoY comparison table (section 01) ── */
.yoy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 20px;
  margin-bottom: 32px;
}
.yoy-table th {
  text-align: left;
  padding: 8px 14px;
  background: var(--bg);
  color: var(--text-2);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-med);
}
.yoy-table th:not(:first-child) { text-align: right; }
.yoy-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.yoy-table td:not(:first-child) { text-align: right; }
.yoy-table tr:hover td { background: var(--bg); }
.yoy-table tr.yoy-separator td {
  background: var(--bg);
  font-weight: 600;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 7px 14px;
}
.delta-pos { color: var(--low); font-weight: 600; }
.delta-neg { color: var(--critical); font-weight: 600; }
.delta-warn { color: var(--high); font-weight: 600; }
.delta-neutral { color: var(--text-2); }

/* ── Tax profile block (section 03) ── */
.tax-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-bottom: 32px;
}
.tax-metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.tax-metric .tv { font-size: 22px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.tax-metric .tk { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.tax-metric .tt { font-size: 11px; color: var(--text-3); line-height: 1.45; }
.tax-metric .tv.high  { color: var(--high); }
.tax-metric .tv.ok    { color: var(--low); }
.tax-metric .tv.warn  { color: var(--medium); }

/* ── Management report section (section 10) ── */
.mgmt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 20px;
}
.mgmt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.mgmt-card-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.mgmt-card-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}
.rf-list { margin: 0; padding: 0; list-style: none; }
.rf-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.rf-item:last-child { border-bottom: none; }
.rf-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 1px;
  text-transform: uppercase;
}
.rf-badge.HIGH     { background: var(--high-bg); color: var(--high); }
.rf-badge.MEDIUM   { background: var(--medium-bg); color: var(--medium); }
.rf-badge.CRITICAL { background: var(--critical-bg); color: var(--critical); }

/* ── Responsive ── */
@media (max-width: 680px) {
  .page-header { flex-direction: column; gap: 12px; }
  .page-stats  { flex-wrap: wrap; }
  .toolbar        { padding: 12px 16px 12px; }
  .dashboard-wrap { padding: 0 16px 32px; }
  .container      { padding: 24px 16px 32px; }
  .report-header  { padding: 24px 16px 20px; }
  .report-title { font-size: 24px; }
  .kpi-grid, .risk-score-row, .metrics-row, .struct-grid { grid-template-columns: 1fr 1fr; }
  .tax-row, .mgmt-grid { grid-template-columns: 1fr; }
  .yoy-table { font-size: 12px; }
  .yoy-table th, .yoy-table td { padding: 7px 10px; }
}
