:root {
  --bg: #0f1419;
  --card: #171e27;
  --line: #2a3644;
  --text: #e7eef6;
  --muted: #93a4b8;
  --accent: #38bdf8;
  --ok: #14532d;
  --ok-text: #bbf7d0;
  --err: #7f1d1d;
  --err-text: #fecaca;
  --pill: #1e293b;
  font-family: system-ui, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 20px 16px 64px; }
.top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.brand { color: var(--text); font-weight: 700; text-decoration: none; }
.top nav { display: flex; gap: 12px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a.on { color: var(--text); }
.who { margin-left: auto; color: var(--muted); display: flex; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.card.narrow { max-width: 460px; }
.card h1, .card h2 { margin: 0 0 12px; font-size: 1.25rem; }
.muted { color: var(--muted); }
.row-head, .actions, .filters, .linkbox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-head { justify-content: space-between; }
.stack, .grid { display: grid; gap: 12px; }
.grid { grid-template-columns: 1fr 1fr; }
.full { grid-column: 1 / -1; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
label { display: grid; gap: 6px; font-size: .92rem; }
input, select, textarea { width: 100%; background: #0f1419; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; }
textarea { resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: auto; }
.btn, button.btn { border: 0; border-radius: 10px; padding: 10px 14px; background: #0284c7; color: white; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.secondary { background: #243140; color: var(--text); }
.btn.danger, .card.danger .btn { background: #b91c1c; }
button:disabled { opacity: .5; cursor: not-allowed; }
.flash { padding: 10px 12px; border-radius: 10px; }
.flash.ok { background: var(--ok); color: var(--ok-text); }
.flash.err { background: var(--err); color: var(--err-text); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--pill); color: var(--muted); font-size: .82rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.counts { display: flex; gap: 14px; flex-wrap: wrap; padding: 0; list-style: none; }
.log { white-space: pre-wrap; background: #0f1419; border-radius: 10px; padding: 10px; overflow: auto; color: var(--muted); }
.stat { font-size: 1.4rem; margin: 8px 0; }
.inline { display: inline; }
.linkish { background: none; border: 0; color: var(--accent); padding: 0; font: inherit; cursor: pointer; }
.top-gap { margin-top: 16px; }
code { color: #bae6fd; }
@media (max-width: 800px) {
  .grid, .split { grid-template-columns: 1fr; }
  .who { margin-left: 0; }
}
