:root {
  --bg: #08090c;
  --panel: #101218;
  --panel-2: #14171f;
  --edge: rgba(255, 255, 255, 0.08);
  --text: #e8eaf0;
  --muted: #8b90a0;
  --accent: #6f7cff;
  --danger: #ff5f6d;
  --ok: #4ade80;
  --warn: #ffd166;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(70% 50% at 10% 0%, rgba(111, 124, 255, 0.10), transparent 60%),
    radial-gradient(60% 50% at 95% 10%, rgba(255, 60, 60, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
}

code { font-family: Consolas, monospace; color: var(--warn); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--edge);
  background: rgba(10, 11, 15, 0.8);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.brand { font-size: 17px; font-weight: 800; letter-spacing: 0.02em; display: flex; align-items: center; gap: 9px; }
.brand-sub { font-weight: 500; color: var(--muted); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.dot-mark { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(180deg, #ff8a8a, #ff3b3b); box-shadow: 0 0 14px rgba(255, 60, 60, 0.6); }

.top-actions { display: flex; align-items: center; gap: 12px; }
.who { color: var(--muted); font-size: 13px; }

main { padding: 26px 22px 60px; max-width: 1400px; margin: 0 auto; }

.card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 26px;
  max-width: 420px;
  margin: 60px auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.card h1 { margin: 0 0 6px; font-size: 20px; }
.muted { color: var(--muted); }
.card .muted { margin: 0 0 20px; font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 13px; }
.field span { font-size: 12.5px; color: var(--muted); }
.field input, .search {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--edge);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  outline: none;
}
.field input:focus, .search:focus { border-color: rgba(111, 124, 255, 0.7); background: rgba(111, 124, 255, 0.08); }

.primary {
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 700;
  color: #0b0d12;
  background: linear-gradient(180deg, #fff, #c9ceff);
  cursor: pointer;
  margin-top: 6px;
}
.primary[disabled] { opacity: 0.6; cursor: default; }

.ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--edge);
  color: var(--text);
  border-radius: 9px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}
.ghost:hover { background: rgba(255, 255, 255, 0.09); }

.hint { min-height: 18px; margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.hint.is-error { color: var(--danger); }
.hint.is-ok { color: var(--ok); }

.dash { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; }

.side { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 78px; align-self: start; }

.nav {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
}
.nav:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav.is-active { color: var(--text); background: rgba(111, 124, 255, 0.14); border-color: rgba(111, 124, 255, 0.35); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.search { flex: 1; }
.stat { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.panel { display: none; }
.panel.is-active { display: block; }

.grid {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  overflow: hidden;
}

.grid th, .grid td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  vertical-align: middle;
}

.grid th {
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.grid tr:last-child td { border-bottom: 0; }
.grid tr:hover td { background: rgba(255, 255, 255, 0.02); }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  border: 1px solid var(--edge);
  color: var(--muted);
}
.tag.admin { color: #c9ceff; border-color: rgba(111, 124, 255, 0.5); background: rgba(111, 124, 255, 0.12); }
.tag.banned { color: #ffb3b8; border-color: rgba(255, 95, 109, 0.5); background: rgba(255, 95, 109, 0.10); }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.mini {
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}
.mini:hover { background: rgba(255, 255, 255, 0.1); }
.mini.danger { color: #ffb3b8; border-color: rgba(255, 95, 109, 0.4); }

.empty { color: var(--muted); padding: 22px; text-align: center; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #161a23;
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  max-width: 380px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.toast.is-error { border-color: rgba(255, 95, 109, 0.5); color: #ffc4c8; }
.toast.is-ok { border-color: rgba(74, 222, 128, 0.4); color: #b9f5cd; }

@media (max-width: 860px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .side { flex-direction: row; overflow-x: auto; position: static; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  position: relative;
  background: linear-gradient(165deg, rgba(26, 29, 38, 0.95), rgba(14, 16, 21, 0.95));
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 15px 16px;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 60, 60, 0.16), transparent);
}

.stat-card span {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 27px;
  letter-spacing: -0.02em;
}

.stat-card em {
  font-style: normal;
  font-size: 11.5px;
  color: #7f8598;
}

@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}