:root {
  --bg: #0c0a10;
  --panel: #15121c;
  --panel-2: #1d1926;
  --line: #2c2638;
  --text: #ece8f4;
  --dim: #8f87a3;
  --accent: #c9a2ff;
  --ban: #ff5a6a;
  --mute: #ffb84d;
  --ok: #57d9a3;
  --radius: 14px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 500px at 85% -10%, #2a1846 0%, transparent 60%),
    radial-gradient(800px 400px at -10% 10%, #1b1030 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 'Space Grotesk', system-ui, sans-serif;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }

.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
}
.brand { font-weight: 700; letter-spacing: .02em; font-size: 18px; }
.sigil { color: var(--accent); }
.dim { color: var(--dim); font-weight: 400; }
.ghost-link {
  color: var(--dim); text-decoration: none; background: none;
  border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; cursor: pointer;
}
.ghost-link:hover { color: var(--text); border-color: var(--dim); }
.who { display: flex; gap: 12px; align-items: center; color: var(--dim); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 80px; }
.hero { padding: 56px 0 28px; }
.hero.small { padding: 28px 0 8px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.02; margin: 0 0 28px; letter-spacing: -.02em; }
.accent { color: var(--accent); }

.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; min-width: 140px;
}
.stat b { display: block; font-size: 26px; font-family: var(--mono); }
.stat span { color: var(--dim); font-size: 13px; }
.stat.ban b { color: var(--ban); }
.stat.mute b { color: var(--mute); }
.stale { margin-top: 14px; color: var(--mute); font-size: 13px; }

.controls {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin: 18px 0; position: sticky; top: 64px; z-index: 4; padding: 10px 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}
#search {
  flex: 1 1 260px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 11px 18px; outline: none;
}
#search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #c9a2ff22; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { background: none; border: 0; padding: 7px 14px; border-radius: 999px; color: var(--dim); cursor: pointer; }
.seg button.on { background: var(--panel-2); color: var(--text); }

.list { display: grid; gap: 10px; }
.row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; cursor: pointer; text-align: left; width: 100%;
  transition: border-color .15s, transform .15s;
}
.row:hover { border-color: #463d58; transform: translateY(-1px); }
.row img { width: 44px; height: 44px; border-radius: 8px; image-rendering: pixelated; background: var(--panel-2); }
.row .main { min-width: 0; }
.row .name { font-weight: 700; font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row .reason { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { text-align: right; font-size: 13px; color: var(--dim); }
.row .meta .time { font-family: var(--mono); color: var(--text); font-size: 14px; }

.tag { font: 600 11px/1 var(--mono); padding: 4px 7px; border-radius: 6px; letter-spacing: .04em; }
.tag.BAN { background: #ff5a6a1f; color: var(--ban); }
.tag.MUTE { background: #ffb84d1f; color: var(--mute); }
.tag.ip { background: #c9a2ff1a; color: var(--accent); }
.tag.status-active { background: #ff5a6a14; color: var(--ban); }
.tag.status-expired { background: #ffffff10; color: var(--dim); }
.tag.status-removed { background: #57d9a31a; color: var(--ok); }
.tag.ev { background: #ffffff10; color: var(--text); }

.empty { text-align: center; color: var(--dim); padding: 60px 0; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.pager button { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }

dialog {
  width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 18px; padding: 0;
}
dialog::backdrop { background: #000a; backdrop-filter: blur(3px); }
.d-head { display: flex; gap: 16px; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.d-head img { width: 64px; height: 64px; border-radius: 10px; image-rendering: pixelated; }
.d-head h2 { margin: 0 0 6px; font-size: 24px; }
.d-close { margin-left: auto; align-self: flex-start; background: none; border: 0; color: var(--dim); font-size: 24px; cursor: pointer; }
.d-body { padding: 20px 24px 26px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.fact { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.fact span { display: block; font-size: 12px; color: var(--dim); }
.fact b { font-weight: 500; word-break: break-word; }
.fact .mono { font-family: var(--mono); }
.reason-box { background: var(--panel-2); border-left: 3px solid var(--accent); padding: 12px 14px; border-radius: 8px; margin-bottom: 22px; white-space: pre-wrap; word-break: break-word; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin: 18px 0 10px; }
.note { background: var(--panel-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.note .by { font-size: 12px; color: var(--dim); display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.note .text { white-space: pre-wrap; word-break: break-word; }
.note .del { margin-left: auto; background: none; border: 0; color: var(--ban); cursor: pointer; font-size: 12px; }
.video { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.add { display: grid; gap: 10px; margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 16px; }
.add .row2 { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.add textarea, .add input[type=url], .login input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none;
}
.add textarea { min-height: 80px; resize: vertical; }
.add textarea:focus, .add input:focus, .login input:focus { border-color: var(--accent); }
.btn { background: var(--accent); color: #1a1026; border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 700; cursor: pointer; }
.btn:disabled { opacity: .5; }
.check { display: flex; gap: 6px; align-items: center; color: var(--dim); font-size: 14px; }
.err { color: var(--ban); min-height: 1.2em; margin: 0; font-size: 14px; }
.hint { color: var(--dim); font-size: 13px; margin: 0; }

.login { display: grid; place-items: center; padding: 80px 0; }
.login .card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 14px; }
.login h2 { margin: 0; }
.login label { display: grid; gap: 6px; color: var(--dim); font-size: 14px; }

@media (max-width: 620px) {
  .row { grid-template-columns: 40px 1fr; }
  .row .meta { grid-column: 2; text-align: left; }
  .controls { top: 60px; }
}
