:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2330; --muted: #667085; --line: #e4e7ec;
  --accent: #c2185b; --ok: #1b7f4b; --warn: #b54708; --bad: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111318; --card: #1a1d24; --text: #e6e8ec; --muted: #98a2b3; --line: #2c313b; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, Segoe UI, sans-serif; }
a { color: var(--accent); }
header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
header .brand { font-weight: 700; text-decoration: none; color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
main { max-width: 1040px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; overflow-x: auto; }
.card.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.card.danger { border-color: var(--bad); }
h1 { font-size: 1.35rem; margin: 0 0 8px; } h2 { font-size: 1.1rem; margin: 0 0 8px; } h3 { font-size: 1rem; margin: 16px 0 6px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kv th { width: 160px; color: var(--muted); font-weight: 500; }
label { display: block; margin: 8px 0; }
input, select { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
input[type=checkbox] { width: auto; }
input.short { width: 9em; display: inline-block; }
.grid2, .grid3 { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
button, .button { display: inline-block; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font: inherit; cursor: pointer; text-decoration: none; }
button.small { padding: 3px 9px; font-size: .9em; }
button.secondary { background: transparent; color: var(--accent); margin-top: 8px; }
button.danger { background: var(--bad); border-color: var(--bad); }
button.link { background: none; border: none; color: var(--accent); padding: 0; }
form.inline { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; background: #e8f5ee; color: var(--ok); }
.flash.error { background: #fdecea; color: var(--bad); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .85em; background: var(--line); }
.pill.state-running { background: #e8f5ee; color: var(--ok); }
.pill.state-paused { background: #fff4e5; color: var(--warn); }
.pill.state-down { background: #fdecea; color: var(--bad); }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px; overflow-x: auto; white-space: pre; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; word-break: break-all; }
