:root { --bg: #0e0e11; --card: #17171c; --line: #2a2a31; --ink: #f2efe6; --muted: #9a978f; --red: #e5372a; --green: #39b56a; --amber: #e0a63a; --blue: #5b9be6; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--blue); }
button { font: inherit; cursor: pointer; border: 0; border-radius: 9px; padding: 8px 14px; background: var(--ink); color: var(--bg); font-weight: 600; }
button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
button.danger { background: transparent; color: #ff8a80; box-shadow: inset 0 0 0 1px #5a2622; }
button.sm { padding: 5px 10px; font-size: 13px; }
button.armed { background: var(--red); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; background: rgba(14,14,17,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--red); color: #fff; font-weight: 800; }
.tag { color: var(--muted); font-size: 13px; }
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; min-width: 0; }
.login { max-width: 420px; margin: 8vh auto 0; display: grid; gap: 10px; }
.login h1 { margin: 0; font-size: 26px; }
.login form { display: grid; gap: 10px; }
input { font: inherit; padding: 11px 12px; border-radius: 9px; border: 1px solid var(--line); background: #0b0b0e; color: var(--ink); }
input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.muted { color: var(--muted); }
.msg { min-height: 1.4em; margin: 0; color: var(--muted); }
.msg.err { color: #ff8a80; }
.loading { color: var(--muted); text-align: center; padding: 60px 0; }
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
@media (max-width: 420px) { .two { grid-template-columns: 1fr; } }
.kpi .v { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; display: flex; justify-content: space-between; gap: 8px; }
h2 .count { color: var(--ink); }
.section { margin-top: 14px; }
.bar { display: grid; grid-template-columns: 116px 1fr auto; align-items: center; gap: 10px; margin: 7px 0; font-size: 14px; }
.bar .track { height: 10px; border-radius: 6px; background: #24242b; overflow: hidden; }
.bar .fill { height: 100%; background: var(--red); border-radius: 6px; width: 0; }
.bar .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 72px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scroll { overflow-x: auto; }
.empty { color: var(--muted); font-size: 14px; margin: 4px 0; }
.item { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.item:last-child { border-bottom: 0; }
.item .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #24242b; color: var(--ink); }
.pill.red { background: #3b1715; color: #ff8a80; } .pill.amber { background: #3a2c12; color: #f3c56b; } .pill.green { background: #13311f; color: #7ee2a3; }
.err-text { color: #ff8a80; font-size: 13px; word-break: break-word; }
.copy { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: #0b0b0e; border-radius: 8px; padding: 8px; white-space: pre-wrap; word-break: break-word; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.meter { height: 8px; border-radius: 6px; background: #24242b; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--green); width: 0; }
.meter i.hot { background: var(--amber); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 5; max-width: calc(100vw - 32px); }
.foot { color: var(--muted); font-size: 12px; margin-top: 20px; text-align: center; }
.actions input { flex: 1; min-width: 220px; }
