:root {
  --bg: #050506;
  --side: #07070a;
  --panel: #0e0e12;
  --panel-2: #14141a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: #9a9aa3;
  --red: #ff2424;
  --red-dim: rgba(255, 36, 36, 0.14);
  --ok: #3dd68c;
  --warn: #ffb020;
  --blue: #4ea1ff;
  --violet: #b56cff;
  --pink: #ff5d9a;
  --radius: 18px;
  --radius-sm: 14px;
  --radius-xs: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Sora, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(circle at top, rgba(255, 36, 36, 0.18), transparent 34%),
    var(--bg);
}

.gate-card {
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  background: #000;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.gate-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border-radius: 999px;
  background: #5865f2;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 0 rgba(88, 101, 242, 0.45);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.discord-btn svg {
  width: 22px;
  height: 22px;
}

.discord-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.gate-fallback {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.gate-fallback summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  list-style: none;
}

.gate-fallback summary::-webkit-details-marker { display: none; }

.gate-fallback form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.gate-logo {
  width: 100%;
  height: 92px;
  object-fit: contain;
  margin-bottom: 8px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  background: #08080a;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
}

textarea { height: auto; min-height: 96px; padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(255, 36, 36, 0.55); }

.primary, .ghost, .danger, .soft {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
}

.primary { background: var(--red); color: #fff; }
.primary:hover { filter: brightness(1.08); }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.danger { background: var(--red-dim); color: #ff8d8d; border: 1px solid rgba(255, 36, 36, 0.35); }
.soft { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.hint, .form-error { margin: 0; font-size: 13px; color: var(--muted); }
.form-error { color: #ff8d8d; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 12px;
  padding: 12px;
  background:
    radial-gradient(circle at top right, rgba(255,36,36,0.08), transparent 28%),
    var(--bg);
}

.side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  background: linear-gradient(180deg, #09090d, #050507);
  border: 1px solid var(--line);
  border-radius: 22px;
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  overflow: auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 6px;
}

.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand strong {
  display: block;
  font-family: "Chakra Petch", sans-serif;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.brand span, .profile span, .nav-label, .meta { color: var(--muted); font-size: 12px; }

.quick-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #0a0a0e;
  color: var(--muted);
  font-size: 13px;
}

.quick-search kbd {
  font: 500 11px/1 "JetBrains Mono", monospace;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #111116;
}

.nav-block { display: grid; gap: 8px; }
.nav-block.grow { flex: 1; }
.nav-label {
  margin: 0;
  padding: 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}

.side nav { display: grid; gap: 4px; }
.side nav button, .side-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #d7d7de;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.side nav button:hover, .side-link:hover { background: rgba(255,255,255,0.04); }
.side nav button.active {
  background: linear-gradient(90deg, rgba(255,36,36,0.22), rgba(255,36,36,0.06));
  color: #fff;
  box-shadow: inset 2px 0 0 var(--red);
}
.side nav button em {
  font-style: normal;
  margin-left: 8px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(78,161,255,0.18);
  color: #9cc8ff;
}

.server-chip-list {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}
.server-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #0c0c10;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.server-chip:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #101018;
}
.server-chip.active {
  border-color: rgba(61, 214, 140, 0.45);
  background: #0e1412;
}
.server-nav { padding-left: 8px; }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  display: inline-block;
}
.dot.on { background: var(--ok); box-shadow: 0 0 10px rgba(61,214,140,0.55); }

.side-foot { display: grid; gap: 8px; margin-top: auto; }
.profile {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0b0f;
}
.profile img { width: 34px; height: 34px; object-fit: contain; border-radius: 10px; }
.profile strong { display: block; font-size: 14px; }

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(10, 10, 14, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  min-height: calc(100vh - 24px);
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background: linear-gradient(90deg, rgba(255, 176, 32, 0.18), rgba(255, 36, 36, 0.12));
  border-bottom: 1px solid rgba(255, 176, 32, 0.35);
  color: #ffd28a;
  font-size: 13px;
}
.demo-banner[hidden] { display: none !important; }
.demo-banner strong {
  letter-spacing: 0.08em;
  color: #ffb020;
}
.demo-banner .soft {
  margin-left: auto;
}
body.demo-mode .side-foot #logout { display: none; }

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 24px 8px;
  flex-wrap: wrap;
}

.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.crumbs .sep { opacity: 0.5; }
.crumbs strong { color: var(--text); }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.status.on { color: var(--ok); background: rgba(61,214,140,0.08); }
.status.off { color: #ff8d8d; background: rgba(255,36,36,0.08); }

.range {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0a0a0e;
}
.range button {
  border: 0;
  background: transparent;
  color: var(--muted);
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
}
.range button.active { background: var(--red); color: #fff; }

#view {
  padding: 8px 24px 28px;
  min-width: 0;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: 32px;
  letter-spacing: 0.01em;
}
.page-head p { margin: 6px 0 0; color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--red-dim);
  color: #ff9a9a;
  font-size: 13px;
  font-weight: 600;
  margin-left: 10px;
  vertical-align: middle;
}

.toolbar, .filters, .card, .kpi, .player-card, .feature-card, .config-card {
  background: rgba(14,14,18,0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toolbar, .filters {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.toolbar .grow, .filters .grow { flex: 1; min-width: 220px; }
.check-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
}
.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  font-size: 13px;
}
.check-row input { width: auto; height: auto; }

.grid-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.kpi { padding: 16px; }
.kpi span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.kpi strong {
  display: block;
  margin-top: 8px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 30px;
}

.ov-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.ov-head h1 {
  margin: 0 0 6px;
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -0.02em;
}
.ov-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.ov-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.ov-kpi {
  padding: 18px;
  background: linear-gradient(180deg, rgba(22, 24, 34, 0.95), rgba(12, 13, 18, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 132px;
}
.ov-kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.ov-kpi-top span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.ov-ico {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #c9c9d1;
  flex: 0 0 auto;
}
.ov-ico svg { width: 18px; height: 18px; }
.ov-ico.ok { color: var(--ok); background: rgba(61, 214, 140, 0.1); }
.ov-ico.off { color: #ff8e8e; background: var(--red-dim); }
.ov-kpi strong {
  display: block;
  font-family: "Chakra Petch", sans-serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.ov-kpi strong.ok { color: var(--ok); }
.ov-kpi strong.off { color: #ff8e8e; }
.ov-kpi em {
  display: block;
  margin-top: 10px;
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}
.ov-kpi em.up { color: var(--ok); }

.ov-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}
.ov-panel {
  padding: 18px;
  background: rgba(14, 14, 18, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 320px;
}
.ov-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.ov-panel-head h2 {
  margin: 0 0 4px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 18px;
}
.ov-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.ov-servers {
  display: grid;
  gap: 10px;
}
.ov-server {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ov-server:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}
.ov-server-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ov-server-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(78, 161, 255, 0.1);
  color: var(--blue);
}
.ov-server-icon svg { width: 18px; height: 18px; }
.ov-server strong {
  font-size: 15px;
}
.ov-server > span {
  color: var(--muted);
  font-size: 12px;
}
.ov-pill {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #ff9a9a;
  background: var(--red-dim);
}
.ov-pill.on {
  color: var(--ok);
  background: rgba(61, 214, 140, 0.12);
}

.ov-empty {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  min-height: 220px;
  padding: 28px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.015);
}
.ov-empty.slim { min-height: 240px; }
.ov-empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #d0d0d8;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 4px;
}
.ov-empty-icon svg { width: 24px; height: 24px; }
.ov-empty-icon.pulse {
  color: var(--blue);
  background: rgba(78, 161, 255, 0.1);
}
.ov-empty strong { font-size: 15px; }
.ov-empty p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  max-width: 280px;
  line-height: 1.45;
}

.ov-activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.ov-activity li {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.ov-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}
.ov-activity-dot.ban { background: var(--red); }
.ov-activity-dot.kick { background: var(--warn); }
.ov-activity-dot.log { background: var(--blue); }
.ov-activity strong {
  display: block;
  font-size: 13px;
}
.ov-activity span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.card { padding: 16px; }
.card h2, .config-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-family: "Chakra Petch", sans-serif;
}
.card .sub, .config-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

.chart-wrap { width: 100%; overflow: hidden; }
.chart-wrap svg { width: 100%; height: 220px; display: block; }
.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 6px;
}

.table-wrap { overflow: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
}
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.tag.ban, .tag.permanent { background: rgba(255,36,36,0.16); color: #ff8d8d; }
.tag.kick { background: rgba(255,176,32,0.16); color: #ffd27a; }
.tag.log, .tag.temporary { background: rgba(78,161,255,0.16); color: #9cc8ff; }
.tag.warn, .tag.expired { background: rgba(181,108,255,0.16); color: #d5b2ff; }
.tag.owner { background: rgba(255,36,36,0.2); color: #ff9a9a; }
.perm {
  display: inline-flex;
  margin: 2px 4px 2px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  font-size: 11px;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.player-card {
  padding: 14px;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.player-card:hover {
  border-color: rgba(255,36,36,0.45);
  transform: translateY(-1px);
}
.player-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.player-ident {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255,36,36,0.35), rgba(255,255,255,0.08));
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  flex: 0 0 auto;
}
.player-ident strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.player-ident span, .muted { color: var(--muted); font-size: 12px; }
.metrics {
  display: grid;
  gap: 4px;
  text-align: right;
  font-size: 12px;
}
.metrics .threat { color: #ff8d8d; font-weight: 700; }
.health {
  display: grid;
  gap: 6px;
  margin: 12px 0 8px;
}
.health span { font-size: 12px; color: var(--muted); }
.bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ok);
}
.bar.mid i { background: var(--warn); }
.bar.low i { background: var(--red); }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.pager .btns { display: flex; gap: 8px; align-items: center; }

.empty {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  padding: 64px 20px;
  color: var(--muted);
}
.empty strong { color: var(--text); font-size: 18px; }

.lookup-hero {
  max-width: 920px;
  margin: 24px auto 0;
  text-align: center;
}
.lookup-hero h1 { margin-bottom: 8px; }
.lookup-search {
  margin: 24px auto 28px;
  max-width: 720px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}
.feature-card { padding: 18px; }
.feature-card h3 { margin: 0 0 8px; font-family: "Chakra Petch", sans-serif; }
.feature-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.config-tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.config-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 2px solid transparent;
}
.config-tabs button.active {
  color: #fff;
  border-bottom-color: var(--red);
}
.config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.config-card { padding: 16px; }
.toggle-list { display: grid; gap: 8px; }
.toggle-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row span { font-size: 13px; }
.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}
.switch input { position: absolute; opacity: 0; }
.switch i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #2a2a33;
  transition: .15s ease;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: .15s ease;
}
.switch input:checked + i { background: var(--red); }
.switch input:checked + i::after { transform: translateX(18px); }

.console {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100vh - 140px);
  background: #050507;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.console-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.console-body {
  padding: 14px 16px;
  overflow: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  background: #030305;
}
.console-line { white-space: pre-wrap; word-break: break-word; }
.lvl-INFO { color: var(--ok); }
.lvl-WARN { color: var(--warn); }
.lvl-ERROR, .lvl-BAN, .lvl-KICK { color: #ff8d8d; }
.lvl-ANTICHEAT { color: var(--blue); }
.lvl-CHAT { color: var(--violet); }
.console-input {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #08080c;
}
.console-input span {
  color: var(--red);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}
.console-input input {
  border: 0;
  background: transparent;
  height: 36px;
  padding: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(860px, 92vh);
  overflow: auto;
  background: #0c0c10;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.modal-head h2 { margin: 0; font-family: "Chakra Petch", sans-serif; }
.modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.modal-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #09090d;
}
.modal-grid span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.modal-grid strong { font-size: 15px; }
.modal-map {
  height: 220px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #081018;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}
.modal-map #player-mini-map {
  width: 100%;
  height: 100%;
}
.modal-shot {
  margin-bottom: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: #08080c;
  min-height: 80px;
}
.modal-shot img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #000;
}
.modal-shot .shot-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.modal-status {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.modal-status.watching { color: #ff9a9a; }
.modal-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.modal-actions .danger {
  border: 1px solid rgba(255,36,36,0.45);
}

.map-page {
  position: relative;
  height: calc(100vh - 110px);
  min-height: 560px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a1520;
}
#gtamap {
  width: 100%;
  height: 100%;
  background: #0a1520;
}
.map-panel {
  position: absolute;
  top: 14px;
  z-index: 500;
  width: min(320px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(8, 8, 12, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.map-panel.left { left: 14px; }
.map-panel.right { right: 14px; width: min(360px, calc(100% - 28px)); }
.map-panel h2 {
  margin: 0 0 4px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 18px;
}
.map-panel .sub { margin-bottom: 12px; }
.watch-callout {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,36,36,0.35);
  background: rgba(255,36,36,0.12);
  color: #ffc9c9;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.watch-callout.active {
  border-color: var(--ok);
  background: rgba(61,214,140,0.12);
  color: #b9f5d5;
}
.map-slider {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}
.map-slider input[type="range"] {
  width: 100%;
  height: 6px;
  padding: 0;
  accent-color: var(--red);
  background: transparent;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}
.chip {
  border: 1px solid var(--line);
  background: #121218;
  color: var(--muted);
  border-radius: 999px;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}
.chip.on {
  color: #fff;
  border-color: rgba(255,36,36,0.45);
  background: rgba(255,36,36,0.18);
}
.map-list {
  display: grid;
  gap: 6px;
}
.map-list-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  text-align: left;
  color: inherit;
  width: 100%;
}
.map-list-item:hover, .map-list-item.active {
  border-color: rgba(255,36,36,0.4);
  background: rgba(255,36,36,0.1);
}
.map-list-item strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-list-item .threat { color: #ff8d8d; font-weight: 700; font-size: 12px; }
.map-list-item .meta-cell { color: var(--muted); font-size: 11px; text-align: right; }
.player-marker {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.35), 0 8px 18px rgba(0,0,0,0.35);
  position: relative;
}
.player-marker .hp {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  overflow: hidden;
}
.player-marker .hp i {
  display: block;
  height: 100%;
  background: var(--ok);
}
.player-marker.threat-high { background: #ff2424; }
.player-marker.threat-mid { background: #ff7a1a; }
.player-marker.threat-low { background: #2f9e5d; }
.player-marker.dead { background: #4b5563; }
.loc-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  background: rgba(0,0,0,0.78);
  border: 1px solid rgba(255,36,36,0.45);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}
.fs-player-icon, .fs-loc-icon {
  background: transparent !important;
  border: none !important;
}
.leaflet-container { background: #0a1520; font: inherit; }
.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
}
.leaflet-control-zoom a {
  background: #121218 !important;
  color: #fff !important;
  border-color: var(--line) !important;
}
.zone-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.zone-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  font-size: 12px;
}
.zone-item strong { display: block; }
.zone-item .muted { font-size: 11px; }
.map-alert {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,36,36,0.4);
  background: rgba(255,36,36,0.12);
  color: #ffc9c9;
  font-size: 12px;
}

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  z-index: 50;
}
.toast {
  min-width: 220px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #121218;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  box-shadow: var(--shadow);
}

@media (max-width: 1200px) {
  .player-grid, .config-grid, .feature-grid, .grid-kpis, .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .ov-split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 10px; gap: 10px; }
  .side { position: static; height: auto; border-radius: 18px; }
  .workspace { min-height: auto; border-radius: 18px; }
  .player-grid, .config-grid, .feature-grid, .grid-kpis, .ov-kpis, .modal-grid, .modal-actions {
    grid-template-columns: 1fr;
  }
}
