:root {
  color-scheme: light dark;
  --bg: #fbfbfd;
  --fg: #1d1d1f;
  --muted: #86868b;
  --line: #d2d2d7;
  --panel: #fff;
  --accent: #0071e3;
  --danger: #d70015;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --fg: #f5f5f7; --muted: #86868b; --line: #38383a; --panel: #1c1c1e; --accent: #2997ff; --danger: #ff453a; }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 400 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.center { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
p { margin: 0; color: var(--muted); }
button {
  height: 32px; padding: 0 16px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font: inherit; font-weight: 500;
}
button.quiet { background: transparent; color: var(--accent); padding: 0 8px; }
button.danger { background: transparent; color: var(--danger); padding: 0 8px; }
button:disabled { opacity: .5; cursor: default; }
input {
  height: 32px; width: 100%; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--fg); font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
code {
  display: block; max-width: 640px; padding: 10px 12px; border-radius: 8px; background: var(--panel);
  border: 1px solid var(--line); font: 12px/1.5 ui-monospace, Menlo, monospace; word-break: break-all; text-align: left; user-select: all;
}
.error { color: var(--danger); min-height: 1.4em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 24px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.bar div { display: flex; gap: 8px; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); }
td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.actions { text-align: right; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: 1px; }
.dot.on { background: #30d158; }
dialog {
  border: 0; border-radius: 14px; padding: 20px; width: min(420px, calc(100vw - 32px));
  background: var(--panel); color: var(--fg); box-shadow: 0 12px 48px rgba(0, 0, 0, .3);
}
dialog::backdrop { background: rgba(0, 0, 0, .4); }
dialog h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
dialog .fields { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
dialog .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
