:root {
  --bg: #0f1216;
  --panel: #171b21;
  --panel-2: #1f242c;
  --line: #2c333d;
  --text: #e8ebef;
  --muted: #9aa4b1;
  --accent: #4f9cf9;
  --accent-ink: #07192e;
  --good: #3fb97c;
  --warn: #e5a93b;
  --bad: #ef6461;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.mark { width: 20px; height: 24px; background: var(--accent); clip-path: polygon(50% 0, 100% 16%, 100% 58%, 50% 100%, 0 58%, 0 16%); }
#who { display: flex; align-items: center; gap: 10px; min-width: 0; }
#who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); flex: none; object-fit: cover; }
main { max-width: 1040px; margin: 0 auto; padding: 28px 24px 56px; }
h1 { font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
h2 { font-size: 16px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 13px; }
.login { max-width: 420px; margin: 9vh auto 0; padding: 32px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.login h1 { margin-bottom: 8px; }
.login p { margin-bottom: 22px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); cursor: pointer; touch-action: manipulation; transition: transform 140ms var(--ease-out), border-color 150ms ease-out; }
.btn:active:not([disabled]) { transform: scale(0.97); }
.btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .55; cursor: default; }
.notice { margin-bottom: 18px; padding: 10px 14px; border: 1px solid var(--warn); border-radius: 6px; color: var(--warn); }
.list { display: grid; gap: 10px; margin-top: 18px; }
.server { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; touch-action: manipulation; transition: transform 140ms var(--ease-out), border-color 150ms ease-out; }
.server:active { transform: scale(0.99); }
.server b { display: block; overflow-wrap: anywhere; }
.icon { width: 44px; height: 44px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--panel-2); font-weight: 700; object-fit: cover; }
.grow { flex: 1; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.on::before { background: var(--good); }
.pill.off::before { background: var(--bad); }
.pill.plain::before { display: none; }
.head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); transition: color 150ms ease-out; }
.grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; min-width: 0; }
.panel { min-width: 0; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
label { display: grid; gap: 4px; min-width: 0; font-size: 13px; color: var(--muted); }
input, select { width: 100%; min-height: 38px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-size: 16px; }
.add { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 14px; }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .grow { overflow-wrap: anywhere; }
.feature { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; }
.feature.locked { color: var(--muted); }
.state { font-size: 12px; white-space: nowrap; }
.state.pending { color: var(--warn); }
.state.done { color: var(--good); }
.state.failed { color: var(--bad); }
.error { margin-top: 10px; color: var(--bad); font-size: 13px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--muted); }
  .server:hover { border-color: var(--accent); }
  .back:hover { color: var(--text); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .server { transition: border-color 150ms ease-out; }
  .btn:active:not([disabled]), .server:active { transform: none; }
}
@media (max-width: 760px) {
  .top { padding: 10px 16px; }
  main { padding: 20px 16px 40px; }
  .grid, .fields { grid-template-columns: minmax(0, 1fr); }
  .add { grid-template-columns: minmax(0, 1fr); }
  #who span { display: none; }
}
