:root {
  --bg: #121214;
  --panel: #161618;
  --card: #1a1a1d;
  --line: #2a2a2e;
  --text: #ececec;
  --muted: #8a8a90;
  --accent: #f70404;
  --accent-2: #ff4d4d;
  --accent-rgb: 247, 4, 4;
  --accent-dim: rgba(247, 4, 4, 0.14);
  --danger: #e11d2e;
  --ok: #3d9a5f;
  --mid: #c9a227;
  --radius: 6px;
  --sidebar: 200px;
  font-family: "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  color: var(--text);
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  background-color: transparent !important;
}
body { font-size: 12.5px; letter-spacing: 0.01em; }
button, input, select { font: inherit; }

#app {
  height: 100%;
  width: 100%;
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
}
.hidden { display: none !important; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #3a3a40; border-radius: 0; }
::-webkit-scrollbar-track { background: transparent; }

.login-wrap {
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--bg);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: none;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.login-card { width: min(360px, 92vw); display: grid; gap: 8px; }
.login-card h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-family: "IBM Plex Sans Condensed", "Segoe UI Condensed", "Arial Narrow", sans-serif;
}
label { display: grid; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 500; }
input, select, button {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #101012;
  color: var(--text);
  padding: 7px 10px;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: none;
}
button {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
button:hover { background: #d40404; border-color: #d40404; filter: none; box-shadow: none; }
button:active { transform: none; background: #b80303; }
button.ghost, button[value="cancel"] {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: none;
}
button.ghost:hover { background: #222226; border-color: #3a3a40; }
button.danger { background: var(--danger); border-color: var(--danger); }
.muted { color: var(--muted); font-size: 12px; }
.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 10px;
  margin: 0 0 2px;
  font-weight: 600;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.error { color: #ff6b6b; min-height: 1.2em; }

#shell {
  height: 100%;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  background: var(--bg);
  overflow: hidden;
  transition: grid-template-columns 0.18s ease;
}
#shell.nav-collapsed { --sidebar: 64px; }
#shell.nav-collapsed .nav-label,
#shell.nav-collapsed .brand-copy,
#shell.nav-collapsed .rank-chip,
#shell.nav-collapsed .nav-group { display: none; }
#shell.nav-collapsed nav button { justify-content: center; padding: 8px; }
#shell.nav-collapsed .brand { justify-content: center; }

aside {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  box-shadow: inset 3px 0 0 var(--accent);
}
.brand { display: flex; gap: 8px; align-items: center; padding: 2px 4px 6px; }
.brand strong {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "IBM Plex Sans Condensed", "Segoe UI Condensed", "Arial Narrow", sans-serif;
}
.brand-copy { min-width: 0; flex: 1; }
.icon-btn { padding: 5px 7px; min-width: 28px; }
.dot {
  width: 8px; height: 8px; border-radius: 1px;
  background: var(--accent);
  box-shadow: none;
  flex-shrink: 0;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.rank-chip {
  align-self: flex-start;
  margin: 0 4px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

nav { display: grid; gap: 1px; overflow-y: auto; flex: 1; min-height: 0; padding: 0 0 6px; }
.nav-group {
  margin: 10px 6px 3px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5c5c62;
  font-weight: 600;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.nav-group:first-child { margin-top: 2px; }
nav button {
  background: transparent;
  text-align: left;
  color: #b0b0b6;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 3px;
  border: 0;
  transition: background 0.1s ease, color 0.1s ease;
}
nav button:hover { background: #222226; color: #fff; filter: none; box-shadow: none; }
nav button.active {
  background: var(--accent-dim);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--accent);
}
nav button i {
  width: 13px; height: 13px;
  background: currentColor;
  opacity: 0.8;
  mask: var(--ico) center / contain no-repeat;
  -webkit-mask: var(--ico) center / contain no-repeat;
  flex-shrink: 0;
}
nav button[data-page="dash"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M3 3h8v8H3V3zm10 0h8v5h-8V3zM3 13h8v8H3v-8zm10 7h8v5h-8v-5zm0-7h8v5h-8v-5z'/></svg>"); }
nav button[data-page="map"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M12 2C8.1 2 5 5.1 5 9c0 5.2 7 13 7 13s7-7.8 7-13c0-3.9-3.1-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/></svg>"); }
nav button[data-page="watch"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M3 5h8v6H3V5zm10 0h8v6h-8V5zM3 13h8v6H3v-6zm10 0h8v6h-8v-6z'/></svg>"); }
nav button[data-page="economy"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm1 17.9V18h-2v1.9A8 8 0 0 1 4.1 13H6v-2H4.1A8 8 0 0 1 11 4.1V6h2V4.1A8 8 0 0 1 19.9 11H18v2h1.9A8 8 0 0 1 13 19.9zM11 8h2v2h-2V8zm0 4h2v4h-2v-4z'/></svg>"); }
nav button[data-page="players"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M16 11c1.7 0 3-1.3 3-3s-1.3-3-3-3-3 1.3-3 3 1.3 3 3 3zM8 11c1.7 0 3-1.3 3-3S9.7 5 8 5 5 6.3 5 8s1.3 3 3 3zm0 2c-2.3 0-7 1.2-7 3.5V19h14v-2.5C15 14.2 10.3 13 8 13zm8 0c-.3 0-.6 0-1 .1 1.2.9 2 2 2 3.4V19h6v-2.5c0-2.3-4.7-3.5-7-3.5z'/></svg>"); }
nav button[data-page="chars"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M12 12c2.7 0 5-2.3 5-5s-2.3-5-5-5-5 2.3-5 5 2.3 5 5 5zm0 2c-3.3 0-10 1.7-10 5v3h20v-3c0-3.3-6.7-5-10-5z'/></svg>"); }
nav button[data-page="staff"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M12 1 3 5v6c0 5.5 3.8 10.7 9 12 5.2-1.3 9-6.5 9-12V5l-9-4zm-1 14-4-4 1.4-1.4L11 12.2l5.6-5.6L18 8l-7 7z'/></svg>"); }
nav button[data-page="server"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M4 1h16v6H4V1zm0 8h16v6H4V9zm0 8h16v6H4v-6zM7 4h2v2H7V4zm0 8h2v2H7v-2zm0 8h2v2H7v-2z'/></svg>"); }
nav button[data-page="self"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M13 3a1 1 0 1 0-2 0v1.1A8 8 0 0 0 4.1 11H3a1 1 0 1 0 0 2h1.1A8 8 0 0 0 11 19.9V21a1 1 0 1 0 2 0v-1.1A8 8 0 0 0 19.9 13H21a1 1 0 1 0 0-2h-1.1A8 8 0 0 0 13 4.1V3zm-1 5a4 4 0 1 1 0 8 4 4 0 0 1 0-8z'/></svg>"); }
nav button[data-page="vehicles"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M5 11 6.5 6h11L19 11H5zm-2 2h18v6H3v-6zm2.5 5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM6 4 5 7H3L4.8 3h14.4L21 7h-2L18 4H6z'/></svg>"); }
nav button[data-page="inv"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M20 6h-2V4h-3.2L14 2H10L9.2 4H6v2H4l-2 14h20L20 6zM12 18c-2.2 0-4-1.8-4-4h2a2 2 0 1 0 4 0h2c0 2.2-1.8 4-4 4z'/></svg>"); }
nav button[data-page="items"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M4 4h7v7H4V4zm9 0h7v7h-7V4zM4 13h7v7H4v-7zm9 0h7v7h-7v-7z'/></svg>"); }
nav button[data-page="bans"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M12 2a10 10 0 1 0 .001 20.001A10 10 0 0 0 12 2zm5 11H7v-2h10v2z'/></svg>"); }
nav button[data-page="alerts"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22zm8-6V11a8 8 0 1 0-16 0v5L2 18v2h20v-2l-2-2z'/></svg>"); }
nav button[data-page="logs"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M4 4h16v2H4V4zm0 5h16v2H4V9zm0 5h10v2H4v-2zm0 5h7v2H4v-2z'/></svg>"); }
nav button[data-page="settings"] i { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'><path d='M19.1 12.9a7.5 7.5 0 0 0 .1-.9 7.5 7.5 0 0 0-.1-.9l2-1.5-2-3.5-2.4 1a7.4 7.4 0 0 0-1.6-.9L14.6 2h-5.2L9 4.1a7.4 7.4 0 0 0-1.6.9l-2.4-1-2 3.5 2 1.5a7.5 7.5 0 0 0-.1.9c0 .3 0 .6.1.9l-2 1.5 2 3.5 2.4-1c.5.4 1 .7 1.6.9L9.4 22h5.2l.4-2.1c.6-.2 1.1-.5 1.6-.9l2.4 1 2-3.5-2-1.5zM12 15.5A3.5 3.5 0 1 1 12 8.5a3.5 3.5 0 0 1 0 7z'/></svg>"); }

.aside-foot { display: grid; gap: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
.aside-foot .ghost { padding: 6px 8px; font-size: 11px; }

main { padding: 12px 14px; overflow: hidden; height: 100%; min-height: 0; display: flex; flex-direction: column; }
.top { display: flex; justify-content: space-between; align-items: flex-end; flex-shrink: 0; margin-bottom: 10px; gap: 10px; }
.top h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
  font-weight: 600;
  font-family: "IBM Plex Sans Condensed", "Segoe UI Condensed", "Arial Narrow", sans-serif;
}
.top-actions { display: flex; align-items: center; gap: 8px; }
.hint { color: var(--muted); font-size: 11px; font-family: "IBM Plex Mono", "Consolas", monospace; }
.live-count {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  background: transparent;
  color: var(--ok);
  border: 1px solid #2f5a3f;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

#toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  margin: 0;
  max-width: 320px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: #1a1a1d;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  color: #fff;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  overflow: hidden;
  display: grid;
  gap: 2px;
}
#toast strong { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
#toast span { font-size: 12px; color: var(--muted); }
#toast.show { opacity: 1; transform: none; }

/* Always visible — even when #app is hidden (menu closed) */
.announce-banner {
  position: fixed;
  top: 3.5vh;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 10000;
  width: min(640px, 72vw);
  margin: 0;
  padding: 12px 16px;
  display: none;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  background: rgba(18, 18, 20, 0.94);
  border: 1px solid #2a2a2e;
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.announce-banner.show {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.announce-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
#announce-text {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: #f0f0f0;
  word-break: break-word;
}
body.ingame .announce-banner.show {
  display: flex;
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.stats article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: none;
}
.stats article:hover { transform: none; border-color: var(--line); }
.stats span { color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stats b {
  display: block;
  font-size: 20px;
  margin-top: 4px;
  letter-spacing: -0.02em;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-weight: 600;
}
.stats-8 { grid-template-columns: repeat(4, 1fr); }

.dash-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.dash-watch { display: grid; gap: 4px; }
.watch-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius);
  background: #141416;
  border: 1px solid var(--line);
}
.watch-row span { flex: 1; text-transform: capitalize; }
.watch-row b { font-size: 16px; letter-spacing: -0.02em; }
.watch-row small { color: var(--muted); font-size: 11px; }
.player-mini { display: grid; gap: 6px; }
.player-mini > button,
.player-mini .mini-player-main {
  width: 100%;
  background: #141416;
  color: var(--text);
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 550;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.player-mini .mini-player-main {
  background: transparent;
  font-weight: 600;
  border: 0;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; gap: 6px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.toolbar input { flex: 1; }
.inv-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.inv-editor { display: grid; gap: 8px; align-content: start; height: fit-content; }
.inv-editor h3 { margin: 0; font-size: 14px; }
.inv-editor .row input { flex: 1; min-width: 0; }
#inv-rows tr { cursor: pointer; }
#inv-rows tr.selected td { background: var(--accent-dim); }
.inv-img { width: 32px; height: 32px; object-fit: contain; display: block; }
.alert-card { display: grid; gap: 6px; margin-bottom: 10px; }
.alert-hits { display: flex; flex-wrap: wrap; gap: 6px; }
.alert-hit {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 10, 18, 0.7);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 10px 6px 6px;
}
.alert-hit .pc-id { width: 28px; height: 28px; font-size: 11px; }
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex: 1;
  min-height: 160px;
  background: var(--card);
}
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  background: #161618;
}
tr:hover td { background: rgba(247, 4, 4, 0.06); }

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  align-content: start;
}
.player-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px 8px;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.1s ease;
}
.player-card:hover {
  border-color: var(--accent);
  transform: none;
  box-shadow: none;
}
.pc-id {
  width: 32px; height: 32px;
  border-radius: 3px;
  display: grid; place-items: center;
  background: #101012;
  color: var(--accent);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 11px;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.pc-meta { min-width: 0; }
.pc-meta strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-meta span { color: var(--muted); font-size: 11px; }
.pc-money { font-weight: 700; font-size: 12px; color: #d4d4d8; }
.pc-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.pc-actions button {
  background: rgba(8, 10, 18, 0.75);
  color: var(--text);
  font-size: 11px;
  padding: 5px 8px;
  font-weight: 600;
}
.ping { font-weight: 700; }
.ping.ok { color: var(--ok); }
.ping.mid { color: var(--mid); }
.ping.bad { color: #f87171; }

dialog { border: 0; background: transparent; color: inherit; }
dialog::backdrop { background: rgba(4, 6, 14, 0.55); }
.player-panel { width: min(560px, 92vw); display: grid; gap: 12px; padding: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel-head h3 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.action-grid { display: grid; gap: 12px; }
.modal-tabs { display: flex; gap: 6px; }
.modal-tabs button {
  flex: 1;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 10px;
  font-size: 12px;
}
.modal-tabs button.active { background: var(--accent-dim); }
.action-group { display: grid; gap: 6px; }
.action-group > span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.action-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.action-btns button {
  background: rgba(8, 10, 18, 0.75);
  color: var(--text);
  font-weight: 650;
  padding: 11px 8px;
  font-size: 12px;
}
.action-btns button:hover { background: rgba(var(--accent-rgb), 0.16); }
.action-btns button.active {
  background: var(--accent-dim);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent);
}
.action-btns button.troll-on {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.action-btns button.warn { color: #fecaca; }
.modal-extra {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.modal-field { display: grid; gap: 6px; }

.page { flex: 1; min-height: 0; overflow: auto; }
#page-map { overflow: hidden; display: flex; flex-direction: column; }
.map-wrap {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
#live-map {
  flex: 1;
  min-height: 280px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #143d6b;
}
.map-players {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 500;
  width: min(240px, 46%);
  max-height: calc(100% - 48px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-players-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.map-players-head strong { display: block; font-size: 12px; }
.map-players-head small { font-size: 10px; }
.map-players-head button { padding: 4px 8px; font-size: 11px; }
.map-players-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  min-height: 0;
  overflow: hidden;
}
#map-player-search { width: 100%; padding: 6px 8px; font-size: 12px; }
.map-player-list {
  overflow: auto;
  display: grid;
  gap: 4px;
  min-height: 0;
}
.map-player-row {
  width: 100%;
  background: rgba(8, 10, 18, 0.5);
  color: var(--text);
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 550;
}
.map-player-row:hover { background: rgba(var(--accent-rgb), 0.16); }
.map-players.collapsed {
  width: auto;
  max-height: none;
}
.map-players.collapsed .map-players-body { display: none; }
.map-players.collapsed .map-players-head { border-bottom: 0; }
.leaflet-container { background: #143d6b; font: inherit; }
.leaflet-tooltip.map-name {
  background: rgba(12, 13, 17, 0.88);
  border: 0;
  color: #fff;
  font-size: 11px;
  box-shadow: none;
  padding: 2px 6px;
}
.leaflet-tooltip.map-name::before { display: none; }
.map-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.map-legend button { padding: 4px 8px; font-size: 11px; }
#shot-img { max-width: 100%; border-radius: 8px; }
.live-card { width: min(920px, 94vw); }
#live-video {
  width: 100%;
  min-height: 280px;
  max-height: 70vh;
  object-fit: cover;
  background: #000;
  border-radius: 8px;
}

html[data-theme="light"] {
  --bg: #ececec;
  --panel: #f4f4f4;
  --card: #ffffff;
  --line: #d0d0d4;
  --text: #1a1a1a;
  --muted: #66666e;
}

body.ingame {
  display: block;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
}
body.ingame.nui-open {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
}
body.ingame:not(.nui-open) #app {
  display: none !important;
}
body.ingame #app {
  height: min(820px, 88vh);
  width: min(1180px, 94vw);
  position: relative;
  z-index: 1;
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 10px;
  overflow: hidden;
  animation: nuiIn 0.18s ease-out;
}
body.ingame #shell {
  height: 100%;
  width: 100%;
  border-radius: 10px;
  border: 1px solid #2a2a2e !important;
  outline: none !important;
  background: var(--bg);
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: hidden;
}
body.ingame .login-wrap {
  height: 100%;
  background: var(--bg) !important;
  border: 0 !important;
  border-radius: 10px;
}
body.ingame aside {
  background: var(--panel);
  border-right: 1px solid var(--line) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.ingame .aside-foot { border-top: 1px solid var(--line) !important; }
body.ingame .card,
body.ingame .stats article,
body.ingame .table-wrap,
body.ingame .player-card,
body.ingame .map-players,
body.ingame .eco-card,
body.ingame .eco-soc-card,
body.ingame dialog .card {
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.ingame input,
body.ingame select,
body.ingame button.ghost,
body.ingame .modal-tabs button,
body.ingame .action-btns button {
  border-color: var(--line) !important;
}
body.ingame th,
body.ingame td,
body.ingame .eco-soc-row,
body.ingame .map-players-head,
body.ingame .panel-head {
  border-color: var(--line) !important;
}

.mini-menu {
  display: none;
  position: fixed;
  top: 72px;
  right: 24px;
  z-index: 21;
  width: min(360px, 92vw);
  max-height: min(560px, 72vh);
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: #161618;
  border: 1px solid #2a2a2e !important;
  outline: none !important;
  border-radius: 8px;
  box-shadow: none !important;
  overflow: hidden;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.mini-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mini-head .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.25);
}
body.mini-cursor .mini-head .dot {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}
.mini-head div { flex: 1; min-width: 0; }
.mini-head strong { display: block; font-size: 13px; }
.mini-head small { display: block; color: var(--muted); font-size: 10px; }
.mini-head button { padding: 5px 8px; font-size: 11px; }
.mini-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-tools button { padding: 6px 8px; font-size: 11px; }
.mini-tabs { display: flex; gap: 6px; }
.mini-tabs button {
  flex: 1;
  border: 0;
  color: var(--text);
  padding: 6px 8px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.04);
}
.mini-tabs button.active { background: var(--accent-dim); }
#mini-pane-players, #mini-pane-dev {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}
#mini-pane-players.hidden, #mini-pane-dev.hidden { display: none !important; }
#mini-search { width: 100%; }
#mini-players {
  overflow: auto;
  min-height: 0;
  flex: 1;
  display: grid;
  gap: 6px;
}
.mini-player {
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: var(--radius);
  background: #141416;
  border: 1px solid var(--line);
}
.mini-player-main {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 2px 2px 4px;
  font-size: 12px;
}
.mini-player-name { font-weight: 600; }
.mini-player-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mini-player-acts button {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  font-size: 10px;
  background: #101012;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 3px;
}
.mini-player-acts button:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.mini-more {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #141416;
}
.mini-more summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
  user-select: none;
}
.mini-more[open] summary { margin-bottom: 4px; color: var(--text); }
.dev-coords {
  background: rgba(8, 10, 18, 0.55);
  border: 0;
  border-radius: 8px;
  padding: 8px;
}
.dev-coords code { display: block; font-size: 11px; word-break: break-all; }
.dev-form { display: flex; gap: 6px; }
.dev-form input { flex: 1; min-width: 0; padding: 6px 8px; font-size: 11px; }
.dev-form button { padding: 6px 8px; font-size: 11px; }

body.ingame.mini.nui-open {
  display: block;
  background: none !important;
}
body.mini #shell { display: none !important; }
body.ingame.mini #app { display: none !important; }
body.mini .mini-menu { display: flex; }

@keyframes nuiIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#page-economy {
  display: grid;
  align-content: start;
  gap: 12px;
}
#page-economy > * {
  min-width: 0;
  position: relative;
  z-index: 1;
}
.eco-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.eco-hero-value {
  margin: 4px 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}
.eco-hero-value b { font: inherit; }
.eco-mix { display: grid; gap: 8px; }
.eco-mix-row, .eco-soc-copy {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.eco-mix-row > span, .eco-kpis small { color: var(--muted); font-size: 11px; font-weight: 600; }
.eco-mix-row strong span { font: inherit; color: inherit; }
.eco-bar {
  height: 4px;
  border-radius: 0;
  background: #2a2a2e;
  overflow: hidden;
}
.eco-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 0;
  background: var(--accent);
  transition: width 0.2s ease;
}
.eco-bar-bank i { background: #8a8a90; }
.eco-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.eco-kpis article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.eco-kpis article > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.eco-kpis b { display: block; font-size: 22px; margin: 6px 0 4px; letter-spacing: -0.03em; }
.eco-kpis b span { font: inherit; color: inherit; }
.eco-boards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.eco-board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.eco-board-head h3 { margin: 0; }
.eco-rank-list, .eco-soc-list { display: grid; gap: 6px; }
.eco-rank {
  display: grid;
  grid-template-columns: 22px 34px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(8, 10, 18, 0.45);
}
.eco-rank:nth-child(1) .eco-place { color: #fbbf24; }
.eco-rank:nth-child(2) .eco-place { color: #cbd5e1; }
.eco-rank:nth-child(3) .eco-place { color: #fdba74; }
.eco-place { font-weight: 800; font-size: 12px; text-align: center; }
.eco-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-dim);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.eco-rank-meta { min-width: 0; }
.eco-rank-meta strong, .eco-soc-copy strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eco-rank-money { text-align: right; }
.eco-rank-money b { display: block; font-size: 13px; }
.eco-soc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 8px 4px 10px;
  border-bottom: 1px solid var(--line);
}
.eco-soc-row:last-child { border-bottom: 0; }
.eco-soc-row .eco-bar { grid-column: 1 / -1; }
.eco-soc-card.collapsed .eco-soc-row:nth-child(n+5) { display: none; }
.eco-soc-card.collapsed .eco-soc-row:nth-child(4) { border-bottom: 0; }
.eco-kind {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.watch-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
}
.watch-roster {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}
.watch-roster-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.watch-roster-head h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
#watch-cap {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 11px;
}
.watch-roster #watch-search {
  width: 100%;
}
.watch-roster #watch-roster {
  flex: 1;
  min-height: 0;
  overflow: auto;
  gap: 4px;
}
.watch-roster #watch-roster > button {
  justify-content: space-between;
  text-align: left;
  padding: 6px 8px;
  background: transparent;
  border-color: transparent;
  font-weight: 500;
}
.watch-roster #watch-roster > button:hover:not(:disabled) {
  background: var(--accent-dim);
  border-color: transparent;
}
.watch-roster #watch-roster > button:disabled {
  opacity: 0.45;
}
.watch-roster #watch-roster > button span:first-child {
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 11px;
}
.watch-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 8px;
}
.watch-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.watch-toolbar .ghost {
  padding: 4px 8px;
  font-size: 11px;
}
.watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 8px;
  overflow: auto;
  min-height: 0;
  flex: 1;
  align-content: start;
}
.watch-grid:has(.watch-tile:only-of-type),
.watch-grid.watch-grid-solo {
  grid-template-columns: 1fr;
}
.watch-grid:has(.watch-tile:only-of-type) .watch-frame,
.watch-grid.watch-grid-solo .watch-frame {
  aspect-ratio: auto;
  height: 100%;
  min-height: 420px;
}
.watch-tile {
  position: relative;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0a0c;
  min-height: 0;
}
.watch-grid.watch-grid-solo .watch-tile {
  height: 100%;
}
.watch-tile.is-live {
  border-color: #3a3a40;
}
.watch-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0a0c;
}
.watch-tile video,
#live-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0a0a0c;
  border-radius: 0;
}
.watch-chrome {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}
.watch-chrome > * { pointer-events: auto; }
.watch-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #666;
  flex-shrink: 0;
}
.watch-tile.is-live .watch-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.watch-chrome strong {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.watch-status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.watch-tile.is-live .watch-status { color: #fff; }
.watch-tile.is-error .watch-status { color: #ff8a8a; }
.watch-chrome button {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}
.watch-chrome button:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.watch-grid .watch-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  #shell { grid-template-columns: 1fr; }
  aside { display: none; }
  .stats, .grid-2, .dash-split, .stats-8, .eco-hero, .eco-boards, .eco-kpis { grid-template-columns: 1fr 1fr; }
}
