:root {
  --bg: #0b1220;
  --card: #111a2c;
  --card2: #16223a;
  --line: #1f2b44;
  --text: #e6edf7;
  --muted: #8ea0bd;
  --accent: #22d3ee;
  --accent2: #3b82f6;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; line-height: 1.45;
}
a { color: var(--accent); text-decoration: none; }
header.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,18,32,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .2px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
nav.views { display: flex; gap: 6px; flex-wrap: wrap; }
nav.views a {
  padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: 13px;
}
nav.views a.active, nav.views a:hover { color: var(--text); border-color: var(--accent); background: rgba(34,211,238,.08); }
main { max-width: 1240px; margin: 0 auto; padding: 22px 20px 60px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 22px; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-size: 26px; font-weight: 800; margin: 6px 0 2px; }
.kpi .detail { color: var(--muted); font-size: 12px; }
.kpi.good .value { color: var(--green); }
.kpi.warn .value { color: var(--amber); }
.kpi.bad .value { color: var(--red); }
.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 360px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
select, button, input {
  background: #0d1626; color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 10px; font-size: 13px; font-family: inherit;
}
button { cursor: pointer; font-weight: 700; }
button.primary { background: var(--accent); color: #04222a; border-color: var(--accent); }
button.ghost:hover { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 10px; line-height: 0; }
.icon-btn svg { display: block; }
.icon-btn.busy { opacity: .5; cursor: progress; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; background: #0f1a2e; color: var(--muted);
  text-align: right; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
thead th:first-child { text-align: left; }
tbody td { padding: 9px 12px; border-bottom: 1px solid rgba(31,43,68,.6); text-align: right; white-space: nowrap; }
tbody td:first-child { text-align: left; font-weight: 600; }
tbody tr:hover { background: rgba(34,211,238,.05); }
tbody tr.total { background: rgba(59,130,246,.10); font-weight: 800; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill.good { background: rgba(34,197,94,.15); color: var(--green); }
.pill.warn { background: rgba(245,158,11,.15); color: var(--amber); }
.pill.bad { background: rgba(239,68,68,.15); color: var(--red); }
.note { color: var(--muted); font-size: 12px; margin-top: 10px; }
.cards3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.link-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--card); }
.link-card:hover { border-color: var(--accent); }
.link-card h3 { margin: 0 0 6px; font-size: 16px; }
.link-card p { margin: 0; color: var(--muted); font-size: 13px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 16px 20px; text-align: center; margin-top: 30px; }
