:root {
  --bg: #f6f6f4; --surface: #ffffff; --border: #e6e4e1; --text: #191617; --muted: #69625f;
  --brand: #dc2e45; --accent: #b81d33; --soft: #fde3e6; --good: #1f7a45; --ink: #121011;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0909; --surface: #151314; --border: #282425; --text: #f4f1f0; --muted: #a69e9b;
    --brand: #e5394f; --accent: #ff8391; --soft: #4a1c25; --good: #5fcf8e;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, system-ui, sans-serif; }
header { display: flex; align-items: center; gap: 10px; padding: 14px 24px; background: var(--ink); color: #f4f1f0; flex-wrap: wrap; }
header b { font-size: 19px; }
header b span { color: #ff8391; }
header h1 { font-size: 13px; font-weight: 500; margin: 0 auto 0 12px; color: #a69e9b; text-transform: uppercase; letter-spacing: 0.08em; }
header small { color: #a69e9b; }
main { max-width: 1400px; margin: 0 auto; padding: 24px; }
h2 { font-size: 19px; margin: 28px 0 12px; }
h3 { font-size: 11px; margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
#alert { background: var(--soft); border: 1px solid var(--brand); border-radius: 10px; padding: 12px 16px; font-weight: 600; margin: 0; }
.cards, .columns { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.columns { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
article, .table { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
article { padding: 16px; min-width: 0; }
article strong { display: block; font-size: 27px; margin: 4px 0; }
article small, li small { color: var(--muted); display: block; }
meter { width: 100%; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
th, td { padding: 9px 9px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
tbody tr:last-child td { border-bottom: 0; }
.badge { padding: 2px 9px; border-radius: 99px; border: 1px solid var(--border); font-size: 12px; font-weight: 600; }
.badge.good { color: var(--good); border-color: currentColor; }
.badge.bad { color: var(--accent); border-color: currentColor; background: var(--soft); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; margin: 8px 0 0; }
li { padding: 8px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
code { font-family: ui-monospace, Consolas, monospace; color: var(--muted); }
.empty { padding: 16px; color: var(--muted); margin: 0; }
.title { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; gap: 12px; }
.title h2 { margin: 0; }
button { font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; padding: 8px 16px; }
button:disabled { opacity: 0.5; cursor: wait; }
button.ghost { background: transparent; color: inherit; border-color: var(--border); padding: 3px 10px; font-size: 12px; }
header button.ghost { border-color: #ffffff33; }
button.danger { background: transparent; color: var(--accent); }
#result:empty { display: none; }
body.login { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 16px; }
.login form { width: min(360px, 100%); background: var(--surface); border-radius: 16px; padding: 32px; display: grid; gap: 14px; justify-items: stretch; }
.login img { justify-self: center; }
.login h1 { margin: 0; text-align: center; font-size: 24px; }
.login h1 span { color: var(--brand); }
.login p { margin: 0; text-align: center; color: var(--muted); }
.login p.error { color: var(--accent); font-weight: 600; }
.login label { display: grid; gap: 4px; font-weight: 600; }
.login input { font: inherit; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
svg { width: 100%; height: 60px; margin: 4px 0; }
polyline { fill: none; stroke: var(--brand); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
pre { background: var(--ink); color: #f4f1f0; border-radius: 12px; padding: 14px; max-height: 420px; overflow: auto; font: 12px/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
#logs .title label { margin-left: auto; }
.cards .empty, .columns .empty { grid-column: 1 / -1; }
header a.account { color: #a69e9b; font-size: 12px; }
