:root {
  --bg: #0b0f14;
  --bg-elev: #121820;
  --bg-panel: #0e141c;
  --border: #1e2a38;
  --border-strong: #2a3a4d;
  --text: #e6edf5;
  --text-dim: #8b9bb0;
  --text-mute: #5c6b7e;
  --accent: #3d9cf0;
  --accent-soft: rgba(61, 156, 240, 0.14);
  --success: #3ecf8e;
  --warn: #e6b84d;
  --danger: #f07178;
  --radius: 12px;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45; }
button, input { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61, 156, 240, 0.15), transparent),
    var(--bg);
}

.auth-card {
  width: min(400px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.auth-card h1 { margin: 0 0 0.25rem; font-size: 1.35rem; }
.auth-card .sub { margin: 0 0 1.25rem; color: var(--text-mute); font-size: 0.85rem; }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.85rem; }
.field span { font-size: 0.8rem; color: var(--text-dim); font-weight: 500; }
.field input {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 0.95rem; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); cursor: pointer; font-weight: 500;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: #1a2430; border-color: #3a4d64; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent-soft); border-color: rgba(61,156,240,0.45); color: var(--accent); width: 100%; }
.btn-primary:hover { background: rgba(61,156,240,0.22); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn-danger { color: var(--danger); border-color: rgba(240,113,120,0.35); }
.user-locked td:first-child strong { color: var(--danger); }
.user-timeout td:first-child strong { color: var(--warn); }

.error {
  background: rgba(240,113,120,0.1);
  border: 1px solid rgba(240,113,120,0.3);
  color: var(--danger);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
}
.warn-box {
  background: rgba(230,184,77,0.1);
  border: 1px solid rgba(230,184,77,0.35);
  color: var(--warn);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
}
.success-box {
  background: rgba(62,207,142,0.1);
  border: 1px solid rgba(62,207,142,0.35);
  color: var(--success);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
}

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #121a24, var(--bg-panel));
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.brand-mark {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 0.75rem;
}
.brand h1 { margin: 0; font-size: 1rem; font-weight: 600; }
.brand p { margin: 0; font-size: 0.72rem; color: var(--text-mute); }
.nav { display: flex; gap: 0.25rem; margin-left: auto; }
.nav button {
  border: none; background: transparent; color: var(--text-mute);
  padding: 0.45rem 0.75rem; border-radius: 8px; cursor: pointer; font-weight: 500;
}
.nav button:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav button.active { color: var(--accent); background: var(--accent-soft); }
.top-right { display: flex; align-items: center; gap: 0.5rem; color: var(--text-dim); font-size: 0.85rem; }

.main { flex: 1; padding: 1.25rem; max-width: 1200px; width: 100%; margin: 0 auto; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.stat .n { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.stat .l { font-size: 0.75rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.15rem; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.85rem; flex-wrap: wrap;
}
.toolbar h2 { margin: 0; font-size: 1.05rem; }
.muted { color: var(--text-mute); font-size: 0.85rem; }

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.85rem;
}

.site-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.site-card.inactive { opacity: 0.72; border-style: dashed; }
.site-card.admin-card { border-color: rgba(61,156,240,0.35); }

.site-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
}
.site-head h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.site-head .host { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }
.site-desc { margin: 0; color: var(--text-dim); font-size: 0.85rem; }

.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.badge {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.18rem 0.45rem; border-radius: 999px;
  background: rgba(255,255,255,0.06); color: var(--text-dim);
}
.badge.ok { color: var(--success); background: rgba(62,207,142,0.12); }
.badge.bad { color: var(--danger); background: rgba(240,113,120,0.12); }
.badge.warn { color: var(--warn); background: rgba(230,184,77,0.12); }
.badge.off { color: var(--text-mute); }

.details {
  font-family: var(--mono); font-size: 0.75rem; color: var(--text-dim);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.6rem 0.7rem; white-space: pre-wrap; word-break: break-word;
}
.details dt { color: var(--text-mute); display: inline; }
.details dd { display: inline; margin: 0 0 0 0.35rem; color: var(--text); }
.details .row { margin-bottom: 0.2rem; }

.site-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: auto;
  padding-top: 0.35rem;
}

/* Toggle switch */
.toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  cursor: pointer; user-select: none;
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track {
  width: 40px; height: 22px; border-radius: 999px;
  background: #2a3544; position: relative; transition: background 0.15s;
  border: 1px solid var(--border-strong);
}
.toggle .track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #c5d0de;
  transition: transform 0.15s;
}
.toggle input:checked + .track { background: rgba(62,207,142,0.35); border-color: rgba(62,207,142,0.5); }
.toggle input:checked + .track::after { transform: translateX(18px); background: var(--success); }
.toggle input:disabled + .track { opacity: 0.45; cursor: not-allowed; }
.toggle .label { font-size: 0.8rem; color: var(--text-dim); font-weight: 500; }

.manage-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.manage-table th, .manage-table td {
  text-align: left; padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.manage-table th {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-mute); font-weight: 600; background: rgba(0,0,0,0.2);
}
.manage-table tr:last-child td { border-bottom: none; }
.manage-table .host { font-family: var(--mono); font-size: 0.8rem; }

.toast {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  padding: 0.75rem 1rem; border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  max-width: min(420px, calc(100vw - 2rem)); z-index: 50;
  font-size: 0.85rem;
}
.toast.error { border-color: rgba(240,113,120,0.45); }
.toast.ok { border-color: rgba(62,207,142,0.45); }

@media (max-width: 640px) {
  .manage-table { display: block; overflow-x: auto; }
  .nav { order: 3; width: 100%; }
}

/* —— Git visualization —— */
.git-section { margin-bottom: 1.5rem; }
.git-h3 { margin: 0 0 0.65rem; font-size: 0.95rem; font-weight: 600; }
.git-h3 .muted { font-weight: 400; font-size: 0.8rem; }
.git-proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.git-proj-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  border-left: 3px solid var(--proj, var(--accent));
}
.git-proj-head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}
.git-proj-head > div { flex: 1; min-width: 0; }
.git-dot {
  width: 10px; height: 10px; border-radius: 50%;
  margin-top: 0.35rem; flex-shrink: 0;
}
.git-bar-track {
  height: 4px; background: rgba(255,255,255,0.06);
  border-radius: 2px; overflow: hidden; margin-bottom: 0.5rem;
}
.git-bar { height: 100%; border-radius: 2px; min-width: 2px; }
.git-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.4rem;
}
.spark { display: block; }
.heat-row {
  display: flex; gap: 3px; flex-wrap: wrap;
  padding: 0.5rem 0;
}
.heat-cell {
  width: 12px; height: 12px; border-radius: 2px;
  background: var(--accent);
}
.git-lanes-legend {
  display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.65rem;
}
.lane-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; color: var(--text-dim);
  padding: 0.15rem 0.45rem; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.lane-pill i {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.git-graph-wrap {
  overflow-x: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.25rem;
}
.git-graph { display: block; min-width: 640px; }
.git-graph .gtext { font-family: var(--font); }
.git-commit-detail {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.git-files {
  margin: 0.45rem 0 0;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
}

.git-proj-card.open { box-shadow: 0 0 0 1px var(--proj, var(--accent)); }
.git-proj-commits { margin-top: 0.55rem; }
.git-proj-commits h4 { margin: 0 0 0.35rem; font-size: 0.75rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.04em; }
.git-commit-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; }
.git-commit-list li {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 0.4rem;
  padding: 0.3rem 0.35rem;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
}
.git-commit-list li:hover, .git-commit-list li.sel { background: rgba(255,255,255,0.05); }
.git-expand { margin-top: 0.45rem; }
.git-proj-card .mono { font-family: var(--mono); font-size: 0.78em; }

/* —— Users management —— */
.user-site-card { cursor: default; }
.user-site-card .site-actions { margin-top: 0.25rem; }
.users-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem 0 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.users-table .user-actions {
  display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center;
}
.users-create-card {
  max-width: 480px;
  margin-top: 1.5rem;
}
.temp-pw-box .temp-pw {
  margin: 0.55rem 0;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 1rem;
  letter-spacing: 0.02em;
  word-break: break-all;
  user-select: all;
}
.temp-pw-actions { display: flex; gap: 0.4rem; }
.reset-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(420px, calc(100vw - 2rem));
}
.reset-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}
.reset-dialog .auth-card {
  width: 100%;
  max-width: 400px;
}

/* —— Inbox —— */
.nav-count {
  display: inline-block;
  min-width: 1.15rem;
  padding: 0.05rem 0.35rem;
  margin-left: 0.15rem;
  border-radius: 999px;
  background: rgba(230, 184, 77, 0.22);
  color: var(--warn);
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.inbox-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}
.chip:hover { border-color: #3a4d64; color: var(--text); }
.chip.active {
  background: var(--accent-soft);
  border-color: rgba(61, 156, 240, 0.45);
  color: var(--accent);
}
.chip-n {
  font-family: var(--mono);
  font-size: 0.72rem;
  opacity: 0.85;
  margin-left: 0.15rem;
}
.inbox-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}
.inbox-search { margin: 0; min-width: min(260px, 100%); }
.inbox-search input {
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  outline: none;
  width: 100%;
}
.inbox-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.inbox-sort { margin: 0; }
.inbox-sort select {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  outline: none;
  min-width: 10rem;
}
.inbox-sort select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.inbox-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.inbox-bulk.hidden-bulk { display: none; }
.shell-inbox .main {
  max-width: 1480px;
}
.inbox-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.inbox-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-mute);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  user-select: none;
}
.inbox-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-mute);
  display: inline-block;
}
.inbox-live.on {
  color: var(--success);
  border-color: rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.08);
}
.inbox-live.on i {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.2);
}
.inbox-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 0.85rem;
  align-items: start;
}
@media (max-width: 900px) {
  .inbox-layout { grid-template-columns: 1fr; }
}
.inbox-list-wrap { min-width: 0; overflow-x: auto; }
.inbox-table {
  font-size: 0.88rem;
  table-layout: fixed;
  width: 100%;
}
.inbox-table .col-check { width: 2.4rem; }
.inbox-table .col-status { width: 5.2rem; }
.inbox-table .col-from { width: 12.5rem; }
.inbox-table .col-ts { width: 9rem; white-space: nowrap; color: var(--text-mute); font-size: 0.75rem; }
.inbox-table .col-preview {
  color: var(--text-dim);
  width: auto;
}
.inbox-table .preview-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.inbox-table td.col-from {
  overflow: hidden;
}
.inbox-table td.col-from .host {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-row { cursor: pointer; }
.inbox-row:hover td { background: rgba(255,255,255,0.03); }
.inbox-row.sel td { background: var(--accent-soft); }
.inbox-row.unread .col-from strong { color: var(--text); }
.inbox-row.archived { opacity: 0.75; }
.inbox-detail {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  position: sticky;
  top: 0.75rem;
  max-height: calc(100vh - 6rem);
  overflow: auto;
  min-width: 0;
}
.inbox-detail.empty-detail {
  display: grid;
  place-items: center;
  min-height: 180px;
}
.inbox-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.inbox-detail-head h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.inbox-body {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  line-height: 1.5;
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
  max-height: 40vh;
  overflow: auto;
}
.inbox-ua { font-size: 0.72rem; margin: 0 0 0.75rem; word-break: break-all; }
.inbox-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.inbox-detail-actions .active-toggle {
  background: var(--accent-soft);
  border-color: rgba(61, 156, 240, 0.45);
  color: var(--accent);
}
.inbox-json-panel {
  margin-top: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.inbox-json-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.inbox-json {
  margin: 0;
  padding: 0.7rem 0.75rem;
  background: #0a0e13;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text-dim);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 36vh;
  overflow: auto;
  tab-size: 2;
}
.inbox-json .j-key {
  color: #7ec8ff;
  font-weight: 500;
}
.inbox-json .j-str {
  color: #9ddeb0;
}
.inbox-json .j-num {
  color: #e6b84d;
}
.inbox-json .j-kw {
  color: #d4a4ff;
  font-weight: 500;
}
.inbox-json .j-punc {
  color: #5c6b7e;
}
.field select {
  font: inherit;
  color: inherit;
}

/* —— Game stats —— */
.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1rem;
  align-items: start;
}
.game-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.game-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.game-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.game-stat-grid {
  margin-bottom: 0.25rem;
}
.game-h4 {
  margin: 1rem 0 0.45rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mute);
}
.compact-table th,
.compact-table td {
  padding: 0.45rem 0.55rem;
  font-size: 0.8rem;
}
.game-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 640px) {
  .game-split { grid-template-columns: 1fr; }
}
.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  display: inline-block;
  background: var(--text-mute);
}
.live-dot.on {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.2);
}
.live-dot.off {
  background: var(--danger);
}

.audience-card { margin-bottom: 1rem; }
.usage-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}
.usage-meta {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
}
.game-card-missing {
  opacity: 0.88;
  border-style: dashed;
}
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
button.linkish {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
button.linkish:hover {
  color: var(--text);
}
.geo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(160px, 0.7fr);
  gap: 0.85rem;
  align-items: start;
}
@media (max-width: 800px) {
  .geo-layout { grid-template-columns: 1fr; }
}
.geo-map-wrap {
  position: relative;
  background: #0a1018;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-height: 320px;
}
.geo-map-leaflet {
  width: 100%;
  height: 340px;
  background: #0a1018;
  z-index: 1;
}
/* Leaflet dark-theme chrome */
.geo-map-wrap .leaflet-control-attribution {
  background: rgba(10, 16, 24, 0.85) !important;
  color: var(--text-mute) !important;
  font-size: 0.65rem !important;
}
.geo-map-wrap .leaflet-control-attribution a {
  color: var(--accent) !important;
}
.geo-map-wrap .leaflet-control-zoom a {
  background: var(--bg-elev) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.geo-map-wrap .leaflet-control-zoom a:hover {
  background: #1a2430 !important;
}
.geo-map-wrap .leaflet-popup-content-wrapper {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.geo-map-wrap .leaflet-popup-tip {
  background: var(--bg-elev);
}
.geo-map-wrap .leaflet-popup-content {
  margin: 0.55rem 0.7rem;
  font-size: 0.82rem;
}
.geo-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.geo-list {
  font-size: 0.82rem;
}
.geo-row {
  display: grid;
  grid-template-columns: 1.4rem 1fr auto;
  gap: 0.35rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--border);
}
.geo-row:last-child { border-bottom: none; }
.geo-rank { color: var(--text-mute); font-family: var(--mono); font-size: 0.75rem; }
.geo-name {
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.geo-main { font-weight: 500; }
.geo-sub {
  font-size: 0.72rem;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.geo-n { font-family: var(--mono); color: var(--accent); }
