:root {
  color-scheme: dark;
  --bg: #191a1c;
  --panel: #202123;
  --raised: #2b2c30;
  --line: #2e3035;
  --ink: #eeeef1;
  --text: #c9cad1;
  --muted: #8b8d97;
  --accent: #009dff;
  --green: #22a06b;
  --red: #e5484d;
  --amber: #f59e0b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.5 Inter, system-ui, sans-serif; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 16px; }
/* Grid items would otherwise grow to the table's width and scroll the whole page. */
main > * { min-width: 0; }
header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 22px; color: var(--ink); font-weight: 600; }
h2 { margin: 0 0 12px; font-size: 15px; color: var(--ink); font-weight: 600; }
.muted { color: var(--muted); margin: 4px 0 0; }
.small { font-size: 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; overflow-x: auto; }
.row { display: flex; gap: 8px; margin-top: 6px; }
.actions { display: flex; gap: 8px; align-items: center; }
label { color: var(--muted); font-size: 12px; }
input, select { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; height: 32px; padding: 0 8px; font: inherit; }
input[type=password] { flex: 1; min-width: 0; }
button { height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: #06121c; }
button.link { background: none; border: 0; padding: 0; height: auto; color: var(--muted); text-decoration: underline; }
button:disabled { opacity: .4; cursor: default; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; 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; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: var(--raised); color: var(--muted); }
.pill.on { color: var(--green); }
.pill.wait { color: var(--amber); }
.bar { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.bar > div { height: 100%; background: var(--accent); transition: width .3s; }
.error { color: var(--red); margin: 8px 0 0; }
ol { margin: 0; padding-left: 18px; max-height: 260px; overflow-y: auto; }
li { margin: 2px 0; }
li time { color: var(--muted); margin-right: 6px; }
@media (prefers-reduced-motion: reduce) { .bar > div { transition: none; } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .form-grid > label { color: var(--muted); font-size: 12px; padding: 0; }
.form-grid { display: grid; grid-template-columns: minmax(160px, 1fr) auto auto auto; gap: 16px; align-items: start; }
.form-grid > label { display: grid; gap: 6px; }
.form-grid > button { margin-top: 20px; }
.pair { display: flex; gap: 6px; margin-top: 6px; }
.check { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--text); font-size: 12px; }
.check input { height: auto; }
select:disabled { opacity: .45; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } .form-grid > button { margin-top: 0; } }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-between h2 { margin: 0; }
