:root {
    --bg:#0e0919; --bg-2:#14102a; --card:#171028; --edge:#2b1e55;
    --txt:#e9e6f3; --muted:#a59dc2; --accent:#8b5cf6; --accent-2:#7c3aed;
    --ok:#22c55e; --warn:#facc15; --err:#ef4444;
    font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
}
* { box-sizing:border-box; }
html,body { margin:0; background:var(--bg); color:var(--txt); min-height:100%; }
code { background:#0004; padding:2px 6px; border-radius:6px; font-size:12.5px; }

.landing main { max-width:420px; margin:12vh auto; padding:32px; border:1px solid var(--edge); border-radius:16px; background:var(--card); text-align:center; }
.landing h1 { margin-top:0; }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:38px; padding:0 18px; border-radius:12px; border:1px solid var(--edge); background:linear-gradient(160deg,var(--accent),var(--accent-2)); color:#fff; font-weight:600; text-decoration:none; cursor:pointer; font-size:14px; }
.btn.secondary { background:transparent; }
.btn.danger, button.danger { background:transparent; color:var(--err); border:1px solid #ef444455; }
button { cursor:pointer; border:1px solid var(--edge); background:#231744; color:var(--txt); padding:5px 10px; border-radius:8px; font-size:12.5px; }
button + button { margin-left:4px; }
input { height:36px; padding:0 12px; border-radius:10px; border:1px solid var(--edge); background:#0e0919; color:var(--txt); font-size:14px; }
input:focus { outline:2px solid var(--accent); outline-offset:1px; }
label { display:flex; flex-direction:column; gap:4px; font-size:12.5px; color:var(--muted); }
label.grow { flex:1; }
.hint { color:var(--muted); font-size:12.5px; }
.error { color:var(--err); min-height:1em; }
.created { color:var(--ok); min-height:1em; }

/* Admin */
.admin { padding:28px; max-width:1200px; margin:0 auto; }
.topbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:22px; }
.topbar h1 { margin:0; font-size:22px; }
.actions { display:flex; gap:8px; }

.card { background:var(--card); border:1px solid var(--edge); border-radius:16px; padding:18px 22px; margin-bottom:18px; }
.card h2 { margin:0 0 12px; font-size:16px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.06em; }

.row-form { display:flex; gap:14px; align-items:flex-end; flex-wrap:wrap; }

table { width:100%; border-collapse:collapse; font-size:13px; }
th { text-align:left; color:var(--muted); font-weight:600; padding:8px 10px; border-bottom:1px solid var(--edge); }
td { padding:8px 10px; border-bottom:1px solid #2b1e5555; vertical-align:middle; }
td.actions { white-space:nowrap; }
tr.s-active td { }
tr.s-unused td { color:#c4b5fd; }
tr.s-expired td { color:#facc15; }
tr.s-revoked td { color:#ef4444; }

/* Login card */
#loginView form { max-width:360px; margin:16vh auto; padding:28px; background:var(--card); border:1px solid var(--edge); border-radius:16px; display:flex; flex-direction:column; gap:12px; }
#loginView h1 { margin:0 0 6px; }
