:root {
  --brand: #0E9A3B; --brand-dark: #0B7F31; --bg: #F4F6F5; --card: #FFFFFF; --text: #1C2420;
  --muted: #66716B; --line: #E2E7E4; --red: #C8372D; --amber: #B7791F; --blue: #2F6FD6;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121614; --card: #1B201D; --text: #E6ECE8; --muted: #9AA59F; --line: #2B332E; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); }
.top { display: flex; align-items: center; gap: 24px; padding: 10px 20px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.logo { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--brand); color: #fff; font-weight: 700; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { padding: 6px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; }
nav a.active { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-weight: 600; }
.who { margin-left: auto; color: var(--muted); }
main { max-width: 1180px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; overflow-x: auto; }
.narrow { max-width: 420px; margin: 40px auto; }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); font-weight: 400; }
label { display: block; margin: 10px 0; color: var(--muted); }
input, select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.head input { width: 280px; margin: 0; }
button { white-space: nowrap; font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
button.primary:hover { background: var(--brand-dark); }
button.danger { color: var(--red); }
button.link { border: 0; background: none; color: var(--brand); padding: 0; }
form .primary { margin-top: 8px; }
.inline { display: flex; gap: 8px; }
.inline input { margin: 0; }
.grid { display: grid; grid-template-columns: 1fr 1.3fr 0.9fr auto; gap: 8px; align-items: center; }
.grid input, .grid select { margin: 0; }
.grid .primary { margin: 0; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } .head input { width: 100%; } }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.actions { text-align: right; white-space: nowrap; }
td.actions button { margin-left: 4px; padding: 4px 10px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #B8C0BB; }
.dot.on { background: var(--brand); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: var(--bg); border: 1px solid var(--line); }
.pill.ok { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.pill.warn { color: var(--amber); }
.pill.off { color: var(--red); }
.mono { font-family: ui-monospace, Consolas, monospace; }
.center { text-align: center; }
.error { color: var(--red); min-height: 1.2em; margin: 8px 0 0; }
.empty { color: var(--muted); margin: 8px 0 0; }
.notice { margin-top: 12px; padding: 12px; border-radius: 8px; background: color-mix(in srgb, var(--brand) 9%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); overflow-wrap: break-word; }
.notice code { font-family: ui-monospace, Consolas, monospace; background: var(--card); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; user-select: all; }
.qr { display: flex; justify-content: center; margin: 8px 0; }
.qr img { width: 200px; height: 200px; background: #fff; padding: 6px; border-radius: 8px; }
.steps { padding-left: 20px; color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); min-width: 320px; max-width: 90vw; }
dialog::backdrop { background: rgba(0,0,0,.35); }
.checks { max-height: 320px; overflow: auto; margin: 8px 0; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); margin: 6px 0; }
label.check input { width: auto; margin: 0; }
.row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
