:root {
  --bg: #07111f;
  --panel: rgba(9, 24, 41, .94);
  --panel-soft: rgba(17, 40, 64, .78);
  --line: rgba(148, 184, 216, .17);
  --text: #f4f8fc;
  --muted: #9db1c4;
  --blue: #2f8cff;
  --cyan: #36d5e7;
  --green: #35d08b;
  --amber: #ffb44c;
  --orange: #ff8b55;
  --red: #ff646d;
  --purple: #a984ff;
  --shadow: 0 22px 60px rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100%; margin: 0; color: var(--text); background: radial-gradient(circle at 18% 0%, rgba(47,140,255,.14), transparent 26%), radial-gradient(circle at 92% 8%, rgba(54,213,231,.08), transparent 24%), linear-gradient(180deg, #07111f, #0a1727 58%, #07111f); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
a { color: inherit; }
.topbar { position: sticky; top: 0; z-index: 50; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: rgba(5,14,25,.9); backdrop-filter: blur(20px); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.brand-wrap, .top-actions { display: flex; align-items: center; gap: 12px; }
.icon-button, .brand-mark, .top-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.055); }
.icon-button { width: 38px; height: 38px; border-radius: 12px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; color: var(--cyan); background: linear-gradient(145deg, rgba(47,140,255,.2), rgba(54,213,231,.08)); }
.brand-wrap strong { display: block; font-size: 15px; }
.brand-wrap span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.live-status { display: inline-flex; align-items: center; gap: 7px; color: #cbeada; font-size: 12px; }
.live-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(53,208,139,.12); }
.top-button { gap: 8px; min-height: 38px; padding: 0 13px; border-radius: 11px; text-decoration: none; cursor: pointer; }
.top-button:hover, .icon-button:hover { border-color: rgba(47,140,255,.5); background: rgba(47,140,255,.17); }
.top-button.primary { border-color: rgba(47,140,255,.6); background: rgba(47,140,255,.2); }
.dashboard-shell { width: min(1680px, calc(100% - 36px)); margin: 18px auto 40px; }
.surface, .hero-card, .kpi-card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(15,35,57,.94), rgba(7,20,35,.94)); box-shadow: var(--shadow); }
.dashboard-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 22px; border-radius: 20px; }
.eyebrow { display: block; color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.di-title-row { display: flex; align-items: center; gap: 12px; margin-top: 5px; }
h1, h2, h3, p { margin-top: 0; }
.di-title-row h1 { margin: 0; font-size: clamp(22px, 2.5vw, 32px); line-height: 1.12; }
.dashboard-toolbar p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.filter-group { width: min(340px, 100%); }
.filter-group label { display: block; margin-bottom: 7px; color: #c5d4e1; font-size: 11px; font-weight: 700; }
.select-shell, .search-shell { position: relative; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.055); }
.select-shell i, .search-shell i { position: absolute; left: 12px; color: var(--cyan); font-size: 12px; pointer-events: none; }
.select-shell select, .search-shell input { width: 100%; min-height: 43px; border: 0; outline: 0; color: var(--text); background: transparent; }
.select-shell select { padding: 0 36px 0 34px; cursor: pointer; }
select option { color: #102033; background: white; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; padding: 6px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-pill.good { color: #a7f2ce; background: rgba(53,208,139,.15); }
.status-pill.warn { color: #ffd496; background: rgba(255,180,76,.15); }
.status-pill.bad { color: #ffb0b5; background: rgba(255,100,109,.15); }
.status-pill.neutral { color: #c3d2de; background: rgba(157,177,196,.14); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 14px; margin-top: 14px; }
.hero-card { min-height: 250px; padding: 22px; border-radius: 20px; overflow: hidden; }
.iksi-hero { background: radial-gradient(circle at 84% 12%, rgba(54,213,231,.12), transparent 32%), linear-gradient(145deg, rgba(15,43,70,.98), rgba(8,23,39,.96)); }
.decision-hero { display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 90% 18%, rgba(169,132,255,.14), transparent 34%), linear-gradient(145deg, rgba(22,34,62,.98), rgba(8,23,39,.96)); }
.hero-heading, .card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.hero-heading h2, .decision-hero h2 { margin: 5px 0 0; font-size: 22px; }
.year-pill, .metric-note { color: var(--muted); font-size: 10px; }
.year-pill { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; }
.score-layout { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 22px; margin-top: 18px; }
.score-ring { --score: 0; position: relative; width: 142px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--cyan) calc(var(--score) * 1%), rgba(157,177,196,.13) 0); box-shadow: inset 0 0 35px rgba(54,213,231,.08), 0 18px 45px rgba(0,0,0,.22); }
.score-ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #0b1b2d; border: 1px solid var(--line); }
.score-ring > div { position: relative; z-index: 1; text-align: center; }
.score-ring strong { display: block; font-size: 36px; line-height: 1; }
.score-ring span { color: var(--muted); font-size: 11px; }
.score-summary p { margin: 12px 0; color: #c8d6e2; font-size: 12px; line-height: 1.55; }
.progress-line { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(157,177,196,.15); }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.score-summary small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.decision-hero > p { max-width: 700px; margin: 14px 0 20px; color: #c8d6e2; font-size: 13px; line-height: 1.65; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.action-button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: rgba(255,255,255,.045); text-decoration: none; font-size: 11px; font-weight: 700; }
.action-button.primary { border-color: rgba(47,140,255,.55); background: rgba(47,140,255,.2); }
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.kpi-card { min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 105px; padding: 15px; border-radius: 16px; }
.kpi-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; }
.kpi-icon.blue { color: #8bc0ff; background: rgba(47,140,255,.16); }
.kpi-icon.cyan { color: #91eff7; background: rgba(54,213,231,.14); }
.kpi-icon.purple { color: #c4adff; background: rgba(169,132,255,.14); }
.kpi-icon.green { color: #99edc4; background: rgba(53,208,139,.14); }
.kpi-icon.amber { color: #ffd496; background: rgba(255,180,76,.14); }
.kpi-icon.red { color: #ffb0b5; background: rgba(255,100,109,.14); }
.kpi-card span, .kpi-card small { display: block; color: var(--muted); font-size: 9px; }
.kpi-card strong { display: block; margin: 4px 0 3px; overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.analytics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.chart-card, .map-card, .priority-card, .table-card { padding: 18px; border-radius: 18px; }
.card-heading h3 { margin: 4px 0 0; font-size: 16px; }
.chart-wrap { position: relative; height: 245px; margin-top: 12px; }
.chart-wrap.doughnut { height: 220px; }
.chart-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.chart-center strong { font-size: 24px; }
.chart-center span { color: var(--muted); font-size: 9px; }
.custom-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; margin-top: 5px; }
.legend-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.legend-item span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .85fr); gap: 14px; margin-top: 14px; }
.text-link { color: var(--cyan); text-decoration: none; font-size: 10px; font-weight: 700; }
#dashboardMap { height: 430px; margin-top: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #091827; }
.map-caption { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.priority-list { display: grid; gap: 9px; margin-top: 13px; }
.priority-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); }
.priority-rank { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #ffd9dc; background: rgba(255,100,109,.14); font-size: 11px; font-weight: 800; }
.priority-item strong, .priority-item small { display: block; }
.priority-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.priority-item small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.priority-item a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; color: var(--cyan); text-decoration: none; }
.empty-state { padding: 24px 12px; color: var(--muted); text-align: center; font-size: 11px; }
.table-card { margin-top: 14px; }
.table-heading { align-items: center; }
.table-tools { display: flex; gap: 8px; }
.search-shell { min-width: 280px; }
.search-shell input { padding: 0 12px 0 34px; }
.table-tools select { min-height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: rgba(255,255,255,.055); outline: 0; }
.table-wrap { overflow: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 2; color: #c5d4e1; background: #102033; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:hover { background: rgba(47,140,255,.07); }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }
.condition-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.condition-badge.good { color: #a7f2ce; background: rgba(53,208,139,.14); }
.condition-badge.light { color: #ffe2a8; background: rgba(255,180,76,.14); }
.condition-badge.medium { color: #ffcaad; background: rgba(255,139,85,.14); }
.condition-badge.heavy { color: #ffb0b5; background: rgba(255,100,109,.14); }
.condition-badge.unknown { color: #c3d2de; background: rgba(157,177,196,.14); }
.table-action { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid rgba(47,140,255,.4); border-radius: 9px; color: #b9dcff; background: rgba(47,140,255,.12); text-decoration: none; font-size: 9px; white-space: nowrap; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; color: var(--muted); font-size: 10px; }
.table-footer button { border: 0; color: var(--cyan); background: transparent; cursor: pointer; }
.loading-overlay { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; background: rgba(5,14,25,.9); backdrop-filter: blur(12px); transition: opacity .25s ease, visibility .25s ease; }
.loading-overlay.hidden { opacity: 0; visibility: hidden; }
.loader { width: 38px; height: 38px; border: 3px solid rgba(157,177,196,.18); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-overlay strong { font-size: 12px; }
.toast { position: fixed; z-index: 120; right: 20px; bottom: 20px; max-width: 360px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: #0b1b2d; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; font-size: 11px; }
.toast.show { opacity: 1; transform: translateY(0); }
.maplibregl-popup-content { padding: 0 !important; overflow: hidden; border: 1px solid rgba(148,184,216,.25); border-radius: 13px !important; color: var(--text); background: #0b1b2d !important; box-shadow: 0 20px 45px rgba(0,0,0,.35) !important; }
.maplibregl-popup-close-button { color: white; font-size: 18px; }
.mini-popup { min-width: 210px; padding: 13px; }
.mini-popup span, .mini-popup strong, .mini-popup small { display: block; }
.mini-popup span { color: var(--cyan); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.mini-popup strong { margin-top: 4px; font-size: 12px; }
.mini-popup small { margin-top: 6px; color: var(--muted); font-size: 9px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wide-on-tablet { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .topbar { align-items: flex-start; padding: 12px 15px; }
  .top-actions .live-status, .top-button span { display: none; }
  .top-button { width: 38px; padding: 0; }
  .dashboard-shell { width: min(100% - 20px, 1680px); margin-top: 10px; }
  .dashboard-toolbar, .hero-grid, .content-grid { grid-template-columns: 1fr; }
  .dashboard-toolbar { align-items: stretch; flex-direction: column; }
  .filter-group { width: 100%; }
  .analytics-grid { grid-template-columns: 1fr; }
  .wide-on-tablet { grid-column: auto; }
  .table-heading { align-items: stretch; flex-direction: column; }
  .table-tools { flex-direction: column; }
  .search-shell { min-width: 0; }
}
@media (max-width: 620px) {
  .brand-wrap span { display: none; }
  .brand-mark { display: none; }
  .dashboard-shell { width: calc(100% - 14px); }
  .dashboard-toolbar, .hero-card, .chart-card, .map-card, .priority-card, .table-card { padding: 15px; border-radius: 16px; }
  .di-title-row { align-items: flex-start; flex-direction: column; }
  .hero-grid { display: block; }
  .hero-card + .hero-card { margin-top: 10px; }
  .score-layout { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .score-summary .status-pill { margin-inline: auto; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-card { align-items: flex-start; flex-direction: column; min-height: 125px; }
  #dashboardMap { height: 340px; }
}
@media print {
  body { color: #142033; background: #fff; }
  .topbar, .dashboard-toolbar .filter-group, .decision-actions, .table-tools, .table-footer, .map-caption { display: none !important; }
  .dashboard-shell { width: 100%; margin: 0; }
  .surface, .hero-card, .kpi-card { color: #142033; background: #fff; box-shadow: none; border-color: #d8e1ea; break-inside: avoid; }
  .eyebrow, .text-link { color: #1769e0; }
  .kpi-card span, .kpi-card small, .metric-note, .dashboard-toolbar p, .score-summary p, .score-summary small, .map-caption { color: #5b6b7c; }
  #dashboardMap { height: 320px; }
}
