:root {
  --bg: #0f1216; --panel: #181c22; --line: #2a3039; --text: #e6e9ee; --muted: #8b95a3;
  --accent: #4f8cff; --good: #2fb36b; --bad: #e5484d; --warn: #e5a73b;
  color-scheme: dark;
}
* { 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); text-decoration: none; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; } h2 { font-size: 1.1rem; margin: 0; }
main { max-width: 1100px; margin: 0 auto; padding: 1.25rem 16px 3rem; }
main.narrow { max-width: 420px; padding-top: 3rem; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 16px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.brand { color: var(--text); font-weight: 600; font-size: 1.05rem; }
nav { display: flex; gap: .5rem; align-items: center; }
form { margin: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.card.danger { border-color: #4a2427; }
.empty { text-align: center; padding: 2.5rem 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.grid .card { margin: 0; }
.row { display: flex; align-items: center; gap: .75rem; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: .85rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
@media (max-width: 640px) { .cols { grid-template-columns: 1fr; } .grid { grid-template-columns: 1fr; } }
dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; margin: .8rem 0; font-size: .9rem; }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; color: var(--muted); }
label.inline { flex-direction: row; align-items: center; gap: .45rem; color: var(--text); }
small { color: var(--muted); font-size: .8rem; }
input, select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: .55rem .65rem; font: inherit; width: 100%; min-width: 0; }
input[type=checkbox] { width: auto; }
input[type=time] { width: auto; }
textarea { font-family: ui-monospace, monospace; font-size: .85rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: .5rem; }
legend { color: var(--muted); font-size: .85rem; padding: 0 .3rem; }
.btn { display: inline-block; background: #232933; color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: .45rem .85rem; font: inherit; font-size: .9rem; cursor: pointer; }
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.go { border-color: var(--good); }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; align-self: flex-start; }
.btn.ghost { background: transparent; }
.badge { font-size: .8rem; padding: .15rem .55rem; border-radius: 99px; background: #2a3039; color: var(--muted); white-space: nowrap; }
.badge[data-v=active] { background: #173d2a; color: #6fe0a2; }
.badge[data-v=failed] { background: #4a1f22; color: #ff9da0; }
.badge[data-v=updating], .badge[data-v=activating], .badge[data-v=deactivating] { background: #4a3a17; color: #f5cf7c; }
.error { background: #4a1f22; color: #ffc2c4; padding: .6rem .8rem; border-radius: 7px; }
.presets { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: 1rem; color: var(--muted); }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: .25rem .7rem; color: var(--text); font-size: .85rem; }
.chip.on { border-color: var(--accent); background: #1d2a44; }
.tabs { display: flex; gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: .75rem; flex-wrap: wrap; }
.tabs a { padding: .5rem 0; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--text); border-color: var(--accent); }
.tabs label { margin-left: auto; }
.log { background: #090b0e; border: 1px solid var(--line); border-radius: 8px; padding: .8rem; margin: 0;
  height: calc(100vh - 220px); min-height: 300px; overflow: auto; font: 12.5px/1.45 ui-monospace, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere; }
code { font-size: .8rem; overflow-wrap: anywhere; }
