:root {
  --bg: #0b1020;
  --card: #121a2f;
  --line: #243152;
  --text: #e8eefc;
  --muted: #93a0bd;
  --accent: #6d8cff;
  --ok: #3ecf8e;
  --err: #ff6b7a;
  --warn: #f0b429;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2450 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.auth-body { display: grid; place-items: center; padding: 24px; }
.card {
  background: rgba(18, 26, 47, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.auth-card { width: min(440px, 100%); }
h1,h2,h3 { margin: 0 0 10px; }
.alert {
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 14px;
}
.alert.ok { background: rgba(62,207,142,.12); border: 1px solid rgba(62,207,142,.35); }
.alert.err { background: rgba(255,107,122,.12); border: 1px solid rgba(255,107,122,.35); }
.alert.warn { background: rgba(240,180,41,.12); border: 1px solid rgba(240,180,41,.35); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer;
  font-weight: 600; color: #fff; background: #2a3558;
}
.btn.primary { background: linear-gradient(135deg, #5b7cfa, #7a5cff); }
.btn.danger { background: #b33b4a; }
.btn.ok { background: #1f8a57; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea {
  width: 100%;
  background: #0d1428;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 6px 0 12px;
}
label { font-size: 13px; color: var(--muted); }
.steps { color: var(--muted); line-height: 1.5; padding-left: 18px; }
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  border-right: 1px solid var(--line);
  background: rgba(10, 14, 28, .9);
  padding: 20px 16px;
}
.side .brand { font-weight: 800; letter-spacing: .04em; margin-bottom: 18px; }
.side nav a {
  display: block; padding: 10px 12px; border-radius: 10px; color: var(--text);
  margin-bottom: 6px;
}
.side nav a.active, .side nav a:hover { background: #1a2444; text-decoration: none; }
.main { padding: 22px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 14px; }
.stat .n { font-size: 28px; font-weight: 800; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge.active { background: rgba(62,207,142,.15); color: var(--ok); }
.badge.banned { background: rgba(255,107,122,.15); color: var(--err); }
.badge.expired { background: rgba(240,180,41,.15); color: var(--warn); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .form-row { grid-template-columns: 1fr; }
}
code, .mono { font-family: ui-monospace, Consolas, monospace; }
.keybox {
  background: #0d1428; border: 1px dashed var(--line); border-radius: 10px;
  padding: 10px 12px; margin: 8px 0; word-break: break-all;
}
