:root {
  --bg: #0b1220; --panel: #131c2e; --panel2: #1a2540; --line: #253255;
  --text: #e8edf7; --muted: #8fa0c0; --accent: #22c1a4;
  --excellent: #22c55e; --good: #4ade80; --watch: #f59e0b; --critical: #ef4444; --nm: #64748b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, sans-serif; }
#app { max-width: 1500px; margin: 0 auto; padding: 16px; }
h2 { font-size: 15px; font-weight: 700; margin-bottom: 10px; letter-spacing: .2px; }
.muted { color: var(--muted); font-weight: 400; font-size: 12px; }
.mt { margin-top: 18px; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; background: linear-gradient(135deg, #0f5132, #0b1220); border: 1px solid var(--line); border-radius: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 10px; background: var(--accent); color: #04231c; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.brand-title { font-size: 17px; font-weight: 800; }
.brand-sub { color: #b8c6e0; font-size: 12px; }
.topbar-right { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { background: rgba(255,255,255,.08); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; font-size: 12px; }
.pill.cov { background: rgba(34,193,164,.15); border-color: rgba(34,193,164,.4); }

.hero { display: grid; grid-template-columns: 220px 1fr 1.4fr; gap: 16px; margin-top: 16px; }
.score-ring { width: 200px; height: 200px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) var(--deg, 0deg), #1c2740 0); }
.ring-inner { width: 160px; height: 160px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; text-align: center; align-content: center; border: 1px solid var(--line); }
.ring-score { font-size: 42px; font-weight: 800; line-height: 1; }
.ring-max { color: var(--muted); font-size: 12px; }
.ring-status { margin-top: 6px; font-size: 13px; font-weight: 700; }

.dims, .perf-cards { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.dim { margin-bottom: 12px; }
.dim:last-child { margin-bottom: 0; }
.dim-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.bar { height: 9px; background: #1c2740; border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; }
.perf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pc { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.pc .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.pc .v { font-size: 19px; font-weight: 800; margin-top: 4px; }

.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 16px; }
.grid .card { margin-top: 0; }
.span2 { grid-column: 1 / 2; }
.table-wrap { overflow: auto; max-height: 340px; }
.table-wrap.tall { max-height: 460px; }
.table-wrap.short { max-height: 260px; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { position: sticky; top: 0; background: var(--panel2); text-align: left; padding: 8px 10px; color: var(--muted); font-weight: 600; white-space: nowrap; z-index: 1; }
td { padding: 7px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
tbody tr:hover { background: rgba(255,255,255,.03); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.t-excellent { background: rgba(34,197,94,.18); color: var(--excellent); }
.t-good { background: rgba(74,222,128,.16); color: var(--good); }
.t-watch { background: rgba(245,158,11,.16); color: var(--watch); }
.t-critical { background: rgba(239,68,68,.16); color: var(--critical); }
.t-nm { background: rgba(100,116,139,.2); color: var(--nm); }

.flag-summary { display: flex; gap: 10px; margin-bottom: 10px; }
.flag-summary .f { flex: 1; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.flag-summary .f b { display: block; font-size: 20px; }
.insights { list-style: none; display: grid; gap: 8px; }
.insights li { background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.insights li.sev-RED { border-left-color: var(--critical); }
.insights li.sev-AMBER { border-left-color: var(--watch); }
.dq { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.dq .k { color: var(--muted); }
#footer { color: var(--muted); font-size: 11.5px; text-align: center; padding: 18px 0 6px; }

/* SE Contribution (AIL) */
.card.contribution { border-color: rgba(34,193,164,.35); background: linear-gradient(180deg, rgba(34,193,164,.06), var(--panel)); }
.sec-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sec-title { font-size: 17px; font-weight: 800; }
.sec-title .muted { font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.stat .v { font-size: 19px; font-weight: 800; margin-top: 4px; }
.cbar { height: 5px; background: #1c2740; border-radius: 4px; overflow: hidden; margin-top: 5px; min-width: 90px; }
.cbar > i { display: block; height: 100%; border-radius: 4px; }
.insights li.sev-GREEN { border-left-color: var(--excellent); }
.sbu-wrap { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,.08); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.sbu-label { color: var(--muted); font-size: 12px; }
.sbu-select { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sbu-select:focus { outline: none; border-color: var(--accent); }
.pos { color: var(--excellent); font-weight: 600; }
.neg { color: var(--critical); font-weight: 600; }
@media (max-width: 1100px) { .hero { grid-template-columns: 1fr; } .grid { grid-template-columns: 1fr; } .span2 { grid-column: auto; } .stat-grid { grid-template-columns: repeat(2, 1fr); } }
