:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel2: #1e222b;
  --line: #2a2f3a;
  --text: #e8eaf0;
  --muted: #8b93a5;
  --accent: #4f8cff;
  --accent2: #3a6fd8;
  --ok: #34c77b;
  --warn: #f0b429;
  --bad: #ef5350;
  --radius: 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
button, input, select {
  font: inherit; color: inherit;
}
button {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
button:hover:not(:disabled) { border-color: #3d4554; background: #252a35; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover:not(:disabled) { background: var(--accent2); }
button.danger { color: var(--bad); }
input[type=text], input[type=password], input[type=number] {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
input:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); margin-right: 6px; vertical-align: 1px; }
.dot.on { background: var(--ok); }
.dot.wait { background: var(--warn); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.4); z-index: 100; max-width: calc(100% - 32px);
}
.toast.bad { border-color: var(--bad); }
