:root {
  color-scheme: dark;
  font: 16px/1.55 system-ui, sans-serif;
  background: #0b0e14;
  color: #e7eaf1;
  --muted: #b6bdcb;
  --edge: #39435a;
  --blue: #7fa5ff;
  --gold: #f0b90b;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% 0, #202d4c 0, #0b0e14 52%); }
button, input { font: inherit; }
a { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.frame { max-width: 460px; margin: 0 auto; padding: clamp(24px, 9vh, 88px) 18px 40px; }
.frame--wide { max-width: 1260px; padding-top: clamp(24px, 6vh, 60px); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; font-weight: 750; letter-spacing: .11em; text-decoration: none; white-space: nowrap; }
.brand b { color: var(--gold); }
.languages { display: flex; gap: 4px; }
.languages a { padding: 8px 6px; border-radius: 6px; color: var(--muted); font-size: .82rem; font-weight: 700; text-decoration: none; }
.languages a[aria-current] { background: #283755; color: #e7eaf1; }

h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.35rem); }
h2 { font-size: 1.28rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 16px; }
.muted, .footnote { color: var(--muted); }
.footnote { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--edge); font-size: .88rem; }
.under-card { display: inline-block; margin-top: 14px; padding: 8px 0; }
.card { min-width: 0; border: 1px solid var(--edge); border-radius: 18px; padding: clamp(16px, 4vw, 27px); background: #131722; box-shadow: 0 12px 32px #0003; }
.stack { display: grid; gap: 8px; margin-top: 18px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row input { flex: 1 1 15rem; }
input:not([type="hidden"]), button { min-height: 44px; padding: 9px 12px; border: 1px solid var(--edge); border-radius: 8px; background: #0e1320; color: inherit; }
input:not([type="hidden"]) { display: block; width: 100%; min-width: 0; }
button { cursor: pointer; font-weight: 650; }
button:hover { border-color: #7fa5ff; }
button.primary { margin-top: 6px; background: #7fa5ff; border-color: #7fa5ff; color: #0b1428; }
button.primary:hover { background: #a9c2ff; }
button.quiet { color: #ffb3b7; white-space: nowrap; }
.error, .notice { padding: 10px 12px; border-radius: 9px; }
.error { background: #43242e; color: #ffbcc4; }
.notice { background: #1b342e; color: #a6ebd6; }
.issued { margin-top: 20px; padding: 14px; border: 1px solid #3b7868; border-radius: 9px; background: #172c28; }
.issued p { margin: 8px 0 0; font-size: .88rem; }
.key { font-family: ui-monospace, monospace; letter-spacing: .01em; white-space: nowrap; }
.admin-grid { display: grid; gap: 16px; margin-top: 20px; align-items: start; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem; }
th, td { padding: 10px 8px; border-bottom: 1px solid #333a4c; vertical-align: middle; }
tbody th { overflow-wrap: anywhere; }
thead th, time, .status { white-space: nowrap; }
thead th, .status { color: var(--muted); }
.status--active { color: #78dfc1; }
.action { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (min-width: 980px) {
  .admin-grid { grid-template-columns: minmax(300px, .78fr) minmax(0, 1.65fr); }
}
