:root {
  --bg: #0f1115;
  --panel: #191c23;
  --panel-2: #222631;
  --line: #2e3340;
  --text: #f3f4f6;
  --muted: #9aa3b2;
  --accent: #22c55e;
  --accent-ink: #052e12;
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #60a5fa;
  --gold: #facc15;
  --radius: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button {
  border: 0;
  border-radius: 10px;
  padding: 0.6em 1em;
  background: var(--panel-2);
  cursor: pointer;
  min-height: 44px;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
button.danger { background: var(--danger); color: #fff; font-weight: 600; }
button.warn { background: var(--warn); color: #241400; font-weight: 600; }
button.ghost { background: transparent; border: 1px solid var(--line); }
input, select, textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55em 0.75em;
  min-height: 44px;
  width: 100%;
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.25rem; }
.muted { color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: 0.35em;
  padding: 0.2em 0.65em; border-radius: 999px; font-size: 0.85rem;
  background: var(--panel-2); white-space: nowrap;
}
.pill.ok { background: #14532d; color: #bbf7d0; }
.pill.bad { background: #7f1d1d; color: #fecaca; }
.pill.wait { background: #78350f; color: #fde68a; }
.pill.live { background: var(--danger); color: #fff; font-weight: 700; }
.toast {
  position: fixed; left: 50%; bottom: 1rem; transform: translate(-50%, 200%);
  background: var(--panel-2); border: 1px solid var(--line); padding: 0.75em 1em;
  border-radius: 10px; max-width: 92vw; transition: transform 0.2s; z-index: 1000;
}
.toast.show { transform: translate(-50%, 0); }
.toast.error { border-color: var(--danger); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
[hidden] { display: none !important; }
