:root {
  color-scheme: light;
  --background: #f5f6fa;
  --panel: #fff;
  --text: #192133;
  --muted: #59667b;
  --line: #e2e6ef;
  --accent: #5545ac;
  --accent-soft: #eeebfc;
  --nav: #25203b;
  font-family: system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, .button { border: 0; background: var(--accent); color: white; border-radius: 7px; padding: 9px 14px; cursor: pointer; font: inherit; }
input, select { font: inherit; color: var(--text); background: white; border: 1px solid #c9d1df; border-radius: 7px; padding: 8px; max-width: 100%; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid #8672f3; outline-offset: 3px; }
.top { min-height: 65px; padding: 0 max(24px, calc((100% - 1370px) / 2)); background: var(--nav); color: white; display: flex; align-items: center; gap: 35px; }
.brand { color: inherit; font-size: 15px; font-weight: 850; letter-spacing: .12em; white-space: nowrap; }
.brand span { color: #b6a8ff; }
.top nav, .account { display: flex; align-items: center; gap: 14px; }
.top nav a, .account a, .plain { color: #e9e5fa; font-size: 14px; }
.top nav a { padding: 9px 12px; border-radius: 7px; }
.top nav a[aria-current] { background: #483d70; color: #fff; }
.account { margin-left: auto; }
.plain { background: transparent; padding-left: 6px; padding-right: 0; }
.plain:hover { text-decoration: underline; }
main { max-width: 1420px; margin: auto; padding: 32px 26px; }
h1 { margin: 0; font-size: clamp(24px, 3vw, 37px); letter-spacing: -.04em; font-weight: 740; }
h2 { font-size: 18px; margin: 0 0 13px; letter-spacing: -.02em; }
.heading, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.heading { margin: 10px 0 20px; flex-wrap: wrap; }
.section-head { margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.filters label, .stack label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.metric { display: grid; align-content: start; gap: 6px; }
.metric span, small, .muted { color: var(--muted); font-size: 13px; }
.metric strong { font-size: clamp(16px, 2.2vw, 28px); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.muted { margin: 5px 0 0; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
thead th { background: #f7f8fb; color: var(--muted); font-weight: 650; }
tbody tr:hover { background: #fafaff; }
tbody tr:last-child td { border-bottom: 0; }
tfoot { font-weight: 700; background: #f7f8fb; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; background: var(--accent-soft); color: #48398d; border-radius: 6px; padding: 4px 8px; white-space: nowrap; font-size: 12px; }
.block { display: block; margin-top: 3px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; }
.login { width: min(100%, 400px); padding: 27px; }
.login .brand, .login .brand span { color: var(--accent); }
.login h1 { margin: 9px 0 20px; }
.stack p { margin: 0 0 13px; }
.stack input, .stack select { width: 100%; }
.stack button { margin-top: 4px; }
.login button { width: 100%; }
.form-panel { max-width: 700px; margin-top: 18px; }
.errorlist { color: #992b36; font-size: 14px; padding-left: 20px; }
@media (max-width: 820px) {
  .top { gap: 12px; padding: 13px 15px; flex-wrap: wrap; }
  .top nav { order: 3; width: 100%; gap: 3px; }
  main { padding: 18px 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .panel { padding: 13px; }
}
