/* Admin dashboard. Served from /admin/admin.css; the pages carry no inline styles or scripts. */
:root {
  --canvas: #f8fafc; --surface: #ffffff; --surface-2: #f1f5f9; --line: #e2e8f0; --ink: #0f172a;
  --muted: #475569; --accent: #0f766e; --on-accent: #ffffff; --accent-soft: #ccfbf1;
  --danger: #b91c1c; --danger-soft: #fee2e2; --warn: #92400e;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0a0f18; --surface: #111827; --surface-2: #0b101b; --line: #1f293d; --ink: #f1f5f9;
    --muted: #94a3b8; --accent: #2dd4bf; --on-accent: #04201d; --accent-soft: rgb(45 212 191 / 0.12);
    --danger: #f87171; --danger-soft: rgb(248 113 113 / 0.12); --warn: #fbbf24;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 24px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 24px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 24px; }
h2 { font-size: 16px; margin: 32px 0 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .hint, td .hint { color: var(--muted); font-size: 13px; }
input[type="number"] { width: 7em; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: 0; }
td.wrap { white-space: normal; word-break: break-all; }
.empty { padding: 24px; color: var(--muted); text-align: center; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.live { background: var(--accent-soft); color: var(--accent); }
.pill.premium { border: 1px solid var(--accent); color: var(--accent); }
.pill.free, .pill.retired, .pill.expired, .pill.deleted { background: var(--surface-2); color: var(--muted); }

form.inline { display: inline; margin: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; min-height: 42px; min-width: 0;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button {
  font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 9px 14px; min-height: 42px; cursor: pointer;
  background: var(--surface-2); color: var(--ink);
}
button.primary { background: var(--accent); color: var(--on-accent); }
button.danger { background: var(--danger-soft); color: var(--danger); }
button.small { min-height: 34px; padding: 5px 10px; font-size: 13px; }
label.check { color: var(--muted); font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }

.flash { border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-weight: 600; }
.flash.ok { background: var(--accent-soft); color: var(--accent); }
.flash.error { background: var(--danger-soft); color: var(--danger); }

.login { max-width: 380px; margin: 10vh auto; padding: 0 16px; }
.login .card { padding: 24px; overflow: visible; }
.login label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.login input { width: 100%; }
.login button { width: 100%; margin-top: 20px; }
.muted { color: var(--muted); }
.card.spaced { margin-top: 12px; }
