:root {
  --bg: #f4f5f7; --card: #fff; --fg: #1b1d21; --muted: #6b7280; --line: #e3e5e9;
  --accent: #0b6bcb; --ok: #1f9d55; --err: #c0392b; --code: #f0f2f5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14161a; --card: #1d2026; --fg: #e8eaed; --muted: #9aa0a6; --line: #2c3038; --code: #262a31; --accent: #4c9be8; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { font-weight: 700; letter-spacing: .02em; }
.brand span { font-weight: 400; color: var(--muted); }
.who { color: var(--muted); }
main { max-width: 1080px; margin: 24px auto; padding: 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 22px; margin-bottom: 18px; }
.card.narrow { max-width: 420px; margin: 80px auto; }
.card.highlight { border-color: var(--ok); }
h1, h2 { margin: 0 0 12px; font-size: 1.15rem; }
h1 { font-size: 1.4rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
code, pre { background: var(--code); border-radius: 4px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .86em; }
code { padding: 1px 5px; word-break: break-all; }
pre { padding: 12px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
table.kv th { text-align: left; font-weight: 500; color: var(--muted); width: 150px; padding: 5px 12px 5px 0; vertical-align: top; }
table.kv td { padding: 5px 0; }
table.list th { text-align: left; font-weight: 500; color: var(--muted); font-size: .85rem; border-bottom: 1px solid var(--line); padding: 6px 8px; }
table.list td { border-bottom: 1px solid var(--line); padding: 8px; vertical-align: middle; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
input:not([type=checkbox]) { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); font: inherit; min-width: 0; }
button, .btn { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); font: inherit; cursor: pointer; }
button[type=submit], .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--err); }
button:hover, .btn:hover { filter: brightness(.96); text-decoration: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row input:not([type=checkbox]) { flex: 1 1 220px; }
.row.add { margin-top: 14px; }
label.inline { display: flex; gap: 6px; align-items: center; color: var(--muted); white-space: nowrap; }
.toggles { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.switch { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { border-color: var(--ok); color: var(--ok); }
.flash.err { border-color: var(--err); color: var(--err); }
.device { display: grid; grid-template-columns: 1fr 260px; gap: 24px; }
.qr svg { width: 100%; height: auto; background: #fff; border-radius: 6px; }
@media (max-width: 760px) { .device { grid-template-columns: 1fr; } table.list .ep { display: none; } }
