:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #121a2e;
  --panel-2: #182238;
  --line: #26334d;
  --text: #edf2ff;
  --muted: #94a3bd;
  --blue: #4f8cff;
  --green: #2dd4a3;
  --red: #fb7185;
  --amber: #fbbf24;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top left, #172554 0, var(--bg) 38%); color: var(--text); font: 14px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; min-height: 100vh; }
a { color: #8bb5ff; text-decoration: none; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 52px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.brand { font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.panel { background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 16px 45px #0004; }
.login { width: min(440px, calc(100% - 32px)); margin: 12vh auto; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 16px 0; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 13px; padding: 15px; }
.stat strong { display: block; font-size: 25px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.grow { flex: 1 1 220px; }
label { display: grid; gap: 6px; color: var(--muted); font-weight: 650; }
input, select, button { font: inherit; }
input, select { width: 100%; color: var(--text); background: #0e1628; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #4f8cff22; }
button, .button { border: 0; border-radius: 10px; background: var(--blue); color: white; padding: 10px 14px; font-weight: 750; cursor: pointer; display: inline-block; }
button.secondary, .secondary { background: #27344f; }
button.danger { background: #9f2743; }
table { width: 100%; border-collapse: collapse; margin-top: 14px; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 11px 9px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-flex; border-radius: 999px; padding: 3px 8px; background: #27344f; font-size: 12px; font-weight: 700; }
.badge.active { color: var(--green); background: #0f3a34; }
.badge.unused { color: #8bb5ff; background: #18355d; }
.badge.revoked, .badge.expired { color: #ff9aaa; background: #4a1f2a; }
.flash { border-radius: 11px; padding: 11px 13px; margin: 12px 0; background: #123c34; color: #7ef0ca; border: 1px solid #21584b; }
.flash.error { background: #461d29; color: #ffacb9; border-color: #713043; }
.actions { display: flex; gap: 7px; }
.actions form { margin: 0; }
.actions button { padding: 6px 9px; font-size: 12px; }
.keys { font: 15px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; background: #080d18; border: 1px solid var(--line); border-radius: 12px; padding: 16px; word-break: break-all; }
.section { margin-top: 18px; }
@media (max-width: 800px) { .grid { grid-template-columns: repeat(2, 1fr); } table { display: block; overflow-x: auto; } }

