* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color-scheme: dark; font-family: Inter, system-ui, sans-serif; background: #0b111b; color: #e8eef7; --panel: #131d2b; --line: #263750; --muted: #a2b3cc; --accent: #76bcff; }
body { margin: 0; }
header { display: flex; align-items: center; gap: 18px; padding: 15px max(5vw, 16px); border-bottom: 1px solid var(--line); background: #101927; }
header a { color: inherit; text-decoration: none; font-size: 1.12rem; }
header strong { color: var(--accent); }
header span { margin-left: auto; font-size: .83rem; color: var(--muted); text-align: right; }
main { max-width: 1280px; margin: auto; padding: 22px clamp(14px, 4vw, 45px) 60px; }
h1 { margin: 10px 0 20px; font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: -.035em; }
h2 { margin: 0 0 12px; font-size: 1.1rem; }
article, #login { border: 1px solid var(--line); border-radius: 14px; padding: clamp(13px, 2.2vw, 23px); background: var(--panel); margin-bottom: 14px; }
#login { max-width: 420px; margin: 8vh auto; }
#login h1 { font-size: 1.55rem; }
#login button { width: 100%; margin: 10px 0; }
label { display: grid; gap: 5px; color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
input, button { font: inherit; color: inherit; border-radius: 8px; border: 1px solid var(--line); background: #0e1826; min-height: 38px; padding: 8px 12px; }
input { width: 100%; }
button { cursor: pointer; }
button:hover, button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: #99ceff; border-color: #99ceff; color: #10233c; font-weight: 670; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
nav, .row, .fields, #period { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
nav { margin-bottom: 23px; }
.row { justify-content: space-between; }
.row h2 { margin-bottom: 0; }
.resources, #jobs { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 205px),1fr)); gap: 12px; }
.resources article small, .muted, #service-count { color: var(--muted); }
.resources strong { display: block; font-size: 1.9rem; font-variant-numeric: tabular-nums; margin: 8px 0; }
progress { display: block; height: 8px; width: 100%; margin: 0 0 10px; accent-color: var(--accent); }
canvas { width: 100%; height: 230px; display: block; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .8rem; }
.legend span:nth-child(1) { color: #79bdff; }
.legend span:nth-child(2) { color: #72e6be; }
.legend span:nth-child(3) { color: #ffcb75; }
.legend span:nth-child(4) { color: #d1acff; }
.item { display: flex; gap: 10px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 9px 0; flex-wrap: wrap; overflow-wrap: anywhere; }
.group { margin: 14px 0 10px; color: var(--muted); }
.pill { background: #263750; padding: 4px 8px; border-radius: 9px; font-size: .82rem; }
.ok { color: #81e6bf; } .down,.error,.overdue { color: #ffadae; } .running,.queued { color: #ffcf8f; }
#jobs { grid-template-columns: repeat(auto-fit,minmax(min(100%, 260px),1fr)); }
#jobs p { margin: 9px 0; font-size: .86rem; overflow-wrap: anywhere; }
.fields { align-items: end; margin: 12px 0; }
.fields label { margin: 0; }
.fields input[type="number"] { width: 100px; }
.check { display: flex; align-items: center; gap: 6px; }
.check input { width: auto; }
#token-reveal { background: #17283d; padding: 12px; margin: 14px 0; }
#notice { position: fixed; right: 16px; bottom: 16px; margin-left: 16px; background: #243955; border: 1px solid var(--accent); padding: 12px; border-radius: 10px; }
#login-error { color: #ffadae; }
dialog { max-width: min(420px, 92vw); border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: inherit; padding: 22px; }
dialog::backdrop { background: #050a13ba; }
@media (max-width: 520px) { header, nav { gap: 6px; } nav button { padding-inline: 8px; } #period button { font-size: .82rem; } }
