:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface2: #243044;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --danger: #ef4444;
  --warn: #f59e0b;
  --ok: #22c55e;
  --border: #2d3a4f;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 0.9rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.55rem 1rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); cursor: pointer; font-size: 0.95rem;
}
.btn:hover { background: #2f3f57; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.btn-icon { background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }
.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert-error { background: #3f1d1d; color: #fecaca; border: 1px solid #7f1d1d; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem;
}
.login-card h1 { margin: 0 0 0.25rem; }
.login-card label { display: block; margin: 1rem 0 0.35rem; color: var(--muted); font-size: 0.9rem; }
.login-card input {
  width: 100%; padding: 0.65rem 0.75rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.login-card button { width: 100%; margin-top: 1.25rem; }
input, select, textarea {
  width: 100%; padding: 0.6rem 0.75rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
textarea { font-family: ui-monospace, monospace; }
label { display: block; margin-bottom: 0.35rem; color: var(--muted); }
.hidden { display: none !important; }
