/* ─── Theme tokens ────────────────────────────────────────────── */
:root {
  /* Dark theme (default) — charcoal, easier on the eyes than near-black */
  --bg:           #1a1d27;
  --bg-aurora:    radial-gradient(900px 600px at 12% 8%,  rgba(199,70,52,0.16), transparent 60%),
                  radial-gradient(900px 600px at 88% 92%, rgba(95,182,229,0.10), transparent 55%),
                  radial-gradient(700px 500px at 70% 20%, rgba(110,162,255,0.08), transparent 60%);
  --panel:        rgba(40,44,56,0.55);
  --panel-strong: rgba(40,44,56,0.78);
  --panel-input:  rgba(22,25,33,0.55);
  --border:       rgba(255,255,255,0.07);
  --border-strong:rgba(255,255,255,0.13);
  --text:         #d8dce5;
  --muted:        #8b95a8;
  --accent:       #c74634;
  --accent-hover: #d65a48;
  --accent-soft:  rgba(199,70,52,0.15);
  --crit: #ff3e57; --high: #ff8b1a; --med: #ffc83d; --low: #6abf69; --info: #5fb6e5;
  --shadow:       0 4px 22px rgba(0,0,0,0.28), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-lg:    0 12px 36px rgba(0,0,0,0.36), 0 1px 0 rgba(255,255,255,0.05) inset;
  --blur:         saturate(160%) blur(22px);
  --row-hover:    rgba(255,255,255,0.035);
  --badge-text-dark: #1a1a1a;
}

[data-theme="light"] {
  /* Light theme — warm paper, not blinding pure white */
  --bg:           #e9e6df;
  --bg-aurora:    radial-gradient(900px 600px at 12% 8%,  rgba(199,70,52,0.10), transparent 60%),
                  radial-gradient(900px 600px at 88% 92%, rgba(95,182,229,0.10), transparent 55%),
                  radial-gradient(700px 500px at 70% 20%, rgba(110,162,255,0.07), transparent 60%);
  --panel:        rgba(255,253,248,0.62);
  --panel-strong: rgba(255,253,248,0.85);
  --panel-input:  rgba(255,253,248,0.75);
  --border:       rgba(0,0,0,0.09);
  --border-strong:rgba(0,0,0,0.16);
  --text:         #2a2e38;
  --muted:        #6a7385;
  --accent:       #c74634;
  --accent-hover: #d65a48;
  --accent-soft:  rgba(199,70,52,0.10);
  --shadow:       0 4px 16px rgba(20,30,55,0.07), 0 1px 0 rgba(255,255,255,0.55) inset;
  --shadow-lg:    0 10px 32px rgba(20,30,55,0.10), 0 1px 0 rgba(255,255,255,0.65) inset;
  --row-hover:    rgba(0,0,0,0.035);
  --badge-text-dark: #1a1a1a;
}

/* ─── Reset + base ───────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--bg-aurora);
  background-attachment: fixed;
  background-size: cover;
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace; font-size: 12px; }

/* ─── Glass mixin (applied to surfaces) ──────────────────────── */
.glass,
.card, .stat-tile, .ids-panel, .player-hero, .watch-panel,
.note, table, .auth-card, .finding,
.ingest-edit, .backup-codes, .msg, .msg-ok, .msg-err, .err {
  background-color: var(--panel);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* ─── Topbar ─────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 10px 24px;
  position: sticky; top: 0; z-index: 50;
  background-color: var(--panel-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 18px; color: var(--accent); letter-spacing: -0.01em; }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
  color: var(--text); padding: 6px 10px; border-radius: 8px;
  transition: background 0.15s ease;
}
.topbar nav a:hover { background: var(--row-hover); text-decoration: none; }
.topbar .user { color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* Theme toggle button */
.theme-toggle {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px; border-radius: 8px; cursor: pointer; font-size: 14px;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--border-strong); transform: translateY(-1px); }

/* ─── Layout ─────────────────────────────────────────────────── */
main { padding: 24px 32px; max-width: 1400px; margin: 0 auto; }
h1 { color: var(--accent); margin: 0 0 16px; font-size: 24px; letter-spacing: -0.01em; }
h2 { color: var(--text); margin: 24px 0 12px; font-size: 16px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

/* ─── KPI cards / stat tiles ─────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; margin-bottom: 24px; }
.card { padding: 16px 18px; }
.card .lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; }
.card .val { font-size: 26px; font-weight: 600; margin-top: 6px; letter-spacing: -0.02em; }
.card.crit .val { color: var(--crit); }
.card.info .val { color: var(--info); }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.stat-tile { padding: 12px 14px; }
.stat-tile .stat-lbl { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; }
.stat-tile .stat-val { font-size: 22px; font-weight: 600; margin-top: 4px; letter-spacing: -0.02em; }
.stat-tile.crit { box-shadow: var(--shadow), inset 3px 0 0 var(--crit); }
.stat-tile.crit .stat-val { color: var(--crit); }

/* ─── Tables ─────────────────────────────────────────────────── */
table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
th { background: var(--panel-strong); padding: 10px 14px; text-align: left; font-size: 11px;
     color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
td { padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--row-hover); }
tr.clickable { cursor: pointer; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.sev-info     { background: var(--info); color: var(--badge-text-dark); }
.sev-low      { background: var(--low);  color: var(--badge-text-dark); }
.sev-medium   { background: var(--med);  color: var(--badge-text-dark); }
.sev-high     { background: var(--high); color: var(--badge-text-dark); }
.sev-critical { background: var(--crit); color: white; }

/* ─── Filters / forms / buttons ──────────────────────────────── */
/* ── Events page: sidebar + main split ──────────────────────────── */
.events-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 900px) { .events-layout { grid-template-columns: 1fr; } }

.events-sidebar {
  position: sticky; top: 78px;       /* under the topbar */
  align-self: start;
  background-color: var(--panel);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
@media (max-width: 900px) { .events-sidebar { position: static; max-height: none; } }
.events-sidebar form { display: flex; flex-direction: column; gap: 14px; }

.sidebar-block { display: flex; flex-direction: column; gap: 8px; }
.sidebar-label {
  color: var(--muted); font-size: 12px; font-weight: 500;
  letter-spacing: -0.005em;
}
.sidebar-actions { flex-direction: row; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 4px; }
.sidebar-count { text-align: center; padding-top: 4px; }

/* Sidebar selects look like macOS pop-ups (rounded "bubbles") */
.filter-select {
  width: 100%; padding: 7px 28px 7px 12px; font-size: 13px;
  background-color: var(--panel-input);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 9px) center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-select:hover { border-color: var(--border-strong); }
.filter-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* macOS-style toggle switch */
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track {
  flex-shrink: 0;
  width: 36px; height: 20px;
  background: var(--border-strong); border-radius: 999px;
  position: relative;
  transition: background 0.18s ease;
}
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.18s cubic-bezier(0.3, 0.9, 0.4, 1);
}
.toggle input:checked ~ .toggle-track { background: var(--low); }
.toggle input:checked ~ .toggle-track .toggle-thumb { transform: translateX(16px); }
.toggle input:focus-visible ~ .toggle-track { box-shadow: 0 0 0 3px var(--accent-soft); }
.toggle-label { color: var(--text); }

.events-main { min-width: 0; }       /* lets the table actually shrink in a grid */
.events-main table { display: table; width: 100%; }

/* Search input fills the sidebar block */
.filter-search { width: 100%; min-width: 0; }

/* Per-block selects fill width */
.filter-inline { margin: 0; font-size: 12px; color: var(--text); width: 100%; }
.filter-inline select { width: 100%; padding: 6px 8px; font-size: 12px; }
.filter-inline.checkbox { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.filter-inline.checkbox input { accent-color: var(--accent); }

/* Time-range segmented control (rounded rectangle, macOS-style) */
.chip-group {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 3px;
  background: var(--panel-input); border: 1px solid var(--border); border-radius: 8px;
}
.chip-group .chip {
  padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 12px;
  color: var(--muted); user-select: none; transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.chip-group .chip input { display: none; }
.chip-group .chip.is-on { background: var(--accent); color: white; }
.chip-group .chip:hover:not(.is-on) { background: var(--row-hover); color: var(--text); }

/* Exclude-type checkbox chip grid (in sidebar) */
.exclude-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.exclude-chip {
  padding: 3px 9px; border-radius: 999px; cursor: pointer; font-size: 11px;
  color: var(--muted); border: 1px solid var(--border);
  background: var(--panel-input); user-select: none; white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.exclude-chip input { display: none; }
.exclude-chip:hover { color: var(--text); border-color: var(--border-strong); }
.exclude-chip.is-on { background: var(--crit); border-color: var(--crit); color: white; }

/* Legacy .filters (used elsewhere) */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters input, .filters select,
input[type="text"], input[type="password"], input[type="email"], select, textarea {
  background-color: var(--panel-input);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 7px 11px;
  font: inherit;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filters input { min-width: 280px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

button, .filters button {
  background-color: var(--panel-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
  transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease;
}
button:hover { border-color: var(--border-strong); transform: translateY(-1px); }
button.primary { background: var(--accent); color: white; border-color: var(--accent); }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.mini { padding: 3px 10px; font-size: 11px; border-radius: 6px; }
button.link, .link { background: transparent; border: none; color: var(--muted); padding: 0; cursor: pointer; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
button.link:hover { color: var(--text); transform: none; }

label { display: block; margin: 12px 0; }
label > input { display: block; width: 100%; max-width: 320px; margin-top: 4px; padding: 8px 10px; }

.tag {
  display: inline-block; background: var(--panel-strong); color: var(--text);
  padding: 2px 8px; border-radius: 6px; font-size: 11px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  border: 1px solid var(--border);
}

/* Event row: type as a tag, action stacked underneath */
.event-type { line-height: 1.25; }
.event-type .tag { font-size: 10px; padding: 1px 7px; text-transform: lowercase; letter-spacing: 0.3px; }
.event-subtype { font-size: 13px; margin-top: 4px; color: var(--text); }

/* Click-to-expand event row */
.event-row { cursor: pointer; }
.event-row .chevron::before { content: '▸ '; color: var(--muted); transition: transform 0.15s ease; display: inline-block; }
.event-row.expanded .chevron::before { content: '▾ '; color: var(--accent); }
.event-row.expanded > td { background: var(--accent-soft) !important; }
.event-detail-row > td { padding: 0; border-top: 0; }
.ev-detail-panel {
  padding: 16px 24px 18px;
  background: var(--panel-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ev-detail-section { margin-bottom: 16px; }
.ev-detail-section:last-of-type { margin-bottom: 0; }
.ev-detail-section h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); margin: 0 0 8px; font-weight: 600;
  padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
.ev-detail-panel .kv-row { padding: 5px 0; }
.ev-detail-panel .kv-row:last-child { border-bottom: 0; }
.kv-multiline {
  margin: 4px 0 0; padding: 8px 10px; font-size: 12px;
  background: var(--panel-input); border: 1px solid var(--border);
  border-radius: 6px; white-space: pre-wrap; line-height: 1.4;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
.ev-desc { padding: 8px 12px; background: var(--panel-input); border-radius: 6px; border: 1px solid var(--border); }
.ev-raw-details { margin-top: 10px; }
.ev-raw-details summary {
  cursor: pointer; padding: 6px 10px; font-size: 12px; color: var(--muted);
  background: var(--panel-input); border: 1px solid var(--border); border-radius: 6px;
  user-select: none; list-style: none;
}
.ev-raw-details summary::-webkit-details-marker { display: none; }
.ev-raw-details summary::marker { display: none; }
.ev-raw-details summary:hover { color: var(--text); }
.ev-raw-details summary:before { content: '▸ '; }
.ev-raw-details[open] summary:before { content: '▾ '; }
.ev-raw-details pre {
  margin: 6px 0 0; padding: 12px 14px;
  background: var(--panel-input); border: 1px solid var(--border); border-radius: 8px;
  max-height: 380px; overflow: auto; font-size: 11px; line-height: 1.5;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.topbar-search input { width: 220px; padding: 6px 10px; font-size: 12px; }
.topbar-search input::placeholder { color: var(--muted); }

/* ─── Player profile hero + ID panel ─────────────────────────── */
.player-hero {
  padding: 22px 24px; margin-bottom: 18px;
  background-image: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--panel);
  box-shadow: var(--shadow-lg);
}
.player-hero-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.player-name { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.player-hero-meta { margin-top: 6px; }
.player-hero-cid { margin-top: 6px; }
.player-hero-cid .kv-value { display: inline-block; }

.ids-panel { padding: 12px 16px; margin-bottom: 20px; }
.kv-row {
  display: flex; align-items: center; gap: 12px; padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.kv-row:last-child { border-bottom: 0; }
.kv-label { min-width: 100px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.kv-value {
  background: var(--panel-input); padding: 3px 10px; border-radius: 6px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px;
  user-select: all; border: 1px solid var(--border);
}

/* ─── Ingests / findings / details ───────────────────────────── */
.ingests-table summary { cursor: pointer; padding: 2px 0; user-select: none; }
.ingests-table summary:hover { color: var(--accent); }
.ingests-table details[open] summary { margin-bottom: 8px; }
.ingest-edit { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; padding: 12px; border-left: 2px solid var(--accent); margin-top: 6px; border-radius: 8px; }
.ingest-edit label { margin: 4px 0; font-size: 11px; }
.ingest-edit input, .ingest-edit select { width: 100%; }
.ingest-edit .checkbox-label { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 12px; }
.ingest-edit button { grid-column: 1 / -1; justify-self: start; }
.mono-input { width: 100%; min-width: 240px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 11px; padding: 4px 8px; border-radius: 6px; }

.findings { margin-bottom: 24px; }
.finding { margin-bottom: 10px; padding: 10px 14px; }
.finding.critical { box-shadow: var(--shadow), inset 4px 0 0 var(--crit); }
.finding.high     { box-shadow: var(--shadow), inset 4px 0 0 var(--high); }
.finding.medium   { box-shadow: var(--shadow), inset 4px 0 0 var(--med); }
.finding.low      { box-shadow: var(--shadow), inset 4px 0 0 var(--low); }
.finding summary { cursor: pointer; padding: 4px 0; user-select: none; list-style: none; }
.finding summary::marker { display: none; }
.finding summary::-webkit-details-marker { display: none; }
.finding summary:before { content: '▶ '; color: var(--muted); margin-right: 6px; }
.finding[open] summary:before { content: '▼ '; }
.finding-body { padding: 8px 0 4px; }
.finding-body table { margin-top: 8px; }

.bigmoney { color: var(--high); font-weight: 600; }
.megamoney { color: var(--crit); font-weight: 700; }

.dupe-row td { background: rgba(255,62,87,0.08); }
.dupe-row:hover td { background: rgba(255,62,87,0.15) !important; }

.kv-pair { white-space: nowrap; margin-right: 12px; }
.kv-pair .muted { font-size: 11px; }

/* ─── Messages / errors ──────────────────────────────────────── */
.msg { padding: 10px 14px; margin: 8px 0; border-radius: 10px; }
.msg-ok { box-shadow: var(--shadow), inset 3px 0 0 var(--low); }
.msg-err { box-shadow: var(--shadow), inset 3px 0 0 var(--crit); }

/* ─── Login ──────────────────────────────────────────────────── */
.auth-bg { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-card { padding: 28px 32px; min-width: 360px; box-shadow: var(--shadow-lg); }
.err { padding: 10px 12px; margin-bottom: 14px; font-size: 13px; box-shadow: var(--shadow), inset 3px 0 0 var(--crit); }

/* 2FA backup codes */
.backup-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 10px; }
.backup-codes code { font-size: 14px; padding: 6px 8px; background: transparent; user-select: all; border: 0; }

/* ─── Alts page: search + cluster cards ─────────────────────── */
.alt-search { display: flex; gap: 8px; margin: 14px 0 18px; align-items: center; flex-wrap: wrap; }
.alt-search input {
  flex: 1; min-width: 320px; padding: 9px 14px; font-size: 14px;
  background-color: var(--panel-input);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border); border-radius: 999px; color: var(--text);
}
.alt-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.alt-section { margin-bottom: 28px; }
.alt-section h2 { margin-bottom: 4px; }
.alt-section p { margin-top: 0; margin-bottom: 12px; }

.alt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }

.alt-card {
  padding: 14px 16px;
  background-color: var(--panel);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.alt-card-strong { box-shadow: var(--shadow), inset 4px 0 0 var(--crit); }
.alt-card-medium { box-shadow: var(--shadow), inset 4px 0 0 var(--high); }
.alt-card-weak   { box-shadow: var(--shadow), inset 4px 0 0 var(--med); }

.alt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.alt-card-title { font-weight: 600; font-size: 14px; color: var(--text); }
.alt-count {
  display: inline-block; min-width: 22px; padding: 1px 8px;
  background: var(--accent); color: white; border-radius: 999px;
  font-weight: 700; font-size: 12px; margin-right: 4px;
}

.alt-members-row { font-size: 13px; line-height: 1.5; }
.alt-member { display: inline-block; padding: 1px 0; }

.alt-signals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.alt-signal {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 8px; border-radius: 8px; background: var(--panel-input);
}
.alt-signal .kv-value { word-break: break-all; }

.alt-card-meta { padding-top: 4px; border-top: 1px solid var(--border); }

/* ─── Watchlist + notes ──────────────────────────────────────── */
.watch-panel { padding: 12px 14px; }
.watch-panel.watching { box-shadow: var(--shadow), inset 4px 0 0 var(--high); background-image: linear-gradient(135deg, rgba(255,155,62,0.10), transparent 60%), var(--panel); }
.notes-panel { padding: 4px 0; }
.note { padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow), inset 3px 0 0 var(--border-strong); }
.note-meta { font-size: 12px; margin-bottom: 4px; }
.note-body { white-space: pre-wrap; font-size: 14px; }

/* ─── Light-theme fine tweaks ────────────────────────────────── */
[data-theme="light"] tbody tr:hover td { background: rgba(0,0,0,0.035); }
[data-theme="light"] .dupe-row td { background: rgba(255,62,87,0.10); }
[data-theme="light"] code, [data-theme="light"] .kv-value { color: var(--text); }
/* ─── Now page ─────────────────────────────────────────────────── */
.now-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px; gap: 16px; flex-wrap: wrap;
}
.now-delta {
  margin: 4px 0 0; font-size: 13px;
}
.now-section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 18px 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.now-section-header h2 { font-size: 14px; }

/* Alert cards — designed for 30-second scan */
.alert-stream { display: flex; flex-direction: column; gap: 8px; }
.alert-card {
  display: grid; gap: 6px; padding: 10px 14px;
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: 8px;
  transition: border-color 120ms ease, transform 120ms ease;
}
.alert-card:hover { border-color: var(--border-strong); transform: translateX(2px); }
.alert-card.cursor { outline: 2px solid var(--accent); outline-offset: 2px; }

.alert-card.sev-critical { border-left-color: var(--crit); animation: alert-pulse 1.5s ease-in-out infinite; }
.alert-card.sev-high     { border-left-color: var(--high); }
.alert-card.sev-medium   { border-left-color: var(--med); }
.alert-card.sev-low      { border-left-color: var(--low); }
.alert-card.sev-info     { border-left-color: var(--info); }

@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 62, 87, 0.0); }
  50%      { box-shadow: 0 0 0 4px rgba(255, 62, 87, 0.18); }
}

.alert-card__head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11px; color: var(--muted);
}
.alert-card__body { font-size: 13px; line-height: 1.4; color: var(--text); }
.alert-card__body .player-link {
  font-weight: 600; color: var(--text); margin-right: 8px;
}
.alert-card__actions { display: flex; gap: 6px; flex-wrap: wrap; }

.severity-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0; display: inline-block;
}
.severity-dot.sev-critical { background: var(--crit); box-shadow: 0 0 8px var(--crit); }
.severity-dot.sev-high     { background: var(--high); }
.severity-dot.sev-medium   { background: var(--med); }
.severity-dot.sev-low      { background: var(--low); }
.severity-dot.sev-info     { background: var(--info); }

.severity-label {
  text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em;
  font-size: 10px; color: var(--muted);
}
.alert-card.sev-critical .severity-label { color: var(--crit); }
.alert-card.sev-high     .severity-label { color: var(--high); }
.alert-card.sev-medium   .severity-label { color: var(--med); }

.claimed-pill {
  margin-left: auto; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; background: rgba(95,182,229,0.15); color: var(--info);
  border: 1px solid rgba(95,182,229,0.3);
}
.claimed-pill.mine { background: rgba(106,191,105,0.18); color: var(--low); border-color: rgba(106,191,105,0.35); }

/* Mini buttons for actions */
.btn-mini {
  background: var(--panel-strong); border: 1px solid var(--border); color: var(--text);
  padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.btn-mini:hover { background: rgba(255,255,255,0.08); border-color: var(--border-strong); }
.btn-mini--primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-mini--primary:hover { background: var(--accent-hover); }
.btn-mini--success {
  background: rgba(106,191,105,0.2); border-color: rgba(106,191,105,0.4); color: var(--low);
}

.empty-card {
  display: grid; place-items: center; padding: 36px 16px; gap: 8px;
  background: var(--panel); border: 1px dashed var(--border); border-radius: 12px;
  color: var(--muted); text-align: center;
}

/* Resolved row — compact, dim */
.resolved-row {
  display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px;
  align-items: center; padding: 6px 12px; font-size: 12px;
  border-left: 2px solid transparent; opacity: 0.75;
}
.resolved-row.sev-critical { border-left-color: var(--crit); }
.resolved-row.sev-high     { border-left-color: var(--high); }
.resolved-row.sev-medium   { border-left-color: var(--med); }
.alert-stream-resolved { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }

/* Presence pills */
.now-presence {
  display: flex; flex-wrap: wrap; gap: 6px; max-width: 50%; justify-content: flex-end;
}
.presence-pill {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
}
.presence-pill.presence-live { color: var(--low); border-color: rgba(106,191,105,0.4); }
.presence-pill.presence-idle { color: var(--muted); }

/* Bottom KPI strip — secondary info, deemphasized */
.kpi-strip {
  display: flex; gap: 16px; padding: 10px 14px;
  background: var(--panel-input); border: 1px solid var(--border); border-radius: 10px;
  margin: 24px 0; font-size: 13px; flex-wrap: wrap;
}
.kpi-strip__item { display: flex; gap: 6px; align-items: baseline; }
.kpi-strip__item strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* Collapsed nav with "more" dropdown */
.topbar nav .nav-primary { font-weight: 500; }
.topbar nav details.nav-more {
  position: relative;
}
.topbar nav details.nav-more summary {
  padding: 6px 10px; border-radius: 8px; cursor: pointer; list-style: none;
  color: var(--muted);
}
.topbar nav details.nav-more summary::-webkit-details-marker { display: none; }
.topbar nav details.nav-more summary:hover { background: var(--row-hover); color: var(--text); }
.topbar nav details.nav-more[open] summary { color: var(--text); background: var(--row-hover); }

.nav-more-list {
  position: absolute; top: 100%; right: 0; margin-top: 6px;
  min-width: 180px; background: var(--panel-strong);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; padding: 6px;
  z-index: 100;
}
.nav-more-list a {
  padding: 8px 12px; border-radius: 6px; color: var(--text); font-size: 13px;
}
.nav-more-list a:hover { background: var(--row-hover); text-decoration: none; }

/* Mobile stacking */
@media (max-width: 800px) {
  .now-header { flex-direction: column; }
  .now-presence { max-width: 100%; justify-content: flex-start; }
  .topbar { flex-wrap: wrap; padding: 8px 14px; }
  .topbar nav { width: 100%; order: 3; flex-wrap: wrap; gap: 2px; }
  .topbar nav a { flex: 1 1 auto; text-align: center; font-size: 12px; padding: 6px 4px; }
  .topbar nav .nav-primary { font-size: 13px; }
  .alert-card__head { font-size: 10px; gap: 6px; }
  .alert-card__body { font-size: 12px; }
  .btn-mini { padding: 6px 12px; font-size: 11px; min-height: 32px; }
  main { padding: 12px 14px; }
}
/* ─── Leaderboards ───────────────────────────────────────────── */
.lb-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px; gap: 16px; flex-wrap: wrap;
}
.lb-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}
.lb-card { padding: 14px 18px; }
.lb-card__header {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 8px;
}
.lb-card__header h2 { font-size: 14px; }
.lb-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.lb-row {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 6px; border-radius: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 120ms ease;
}
.lb-row:hover { background: var(--row-hover); }
.lb-row:last-child { border-bottom: 0; }
.lb-row--exploit { background: rgba(255, 62, 87, 0.08); border-left: 2px solid var(--crit); padding-left: 10px; }
.lb-rank {
  font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums;
  text-align: right; font-size: 12px;
}
.lb-row__main { min-width: 0; overflow: hidden; }
.lb-player {
  font-weight: 600; color: var(--text); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-player:hover { color: var(--info); text-decoration: underline; }
.lb-value {
  font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: 14px; color: var(--text); text-align: right; white-space: nowrap;
}
.exploit-flag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 600; color: var(--crit);
  background: rgba(255, 62, 87, 0.15); border: 1px solid rgba(255, 62, 87, 0.3);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.job-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px; margin-left: 6px;
  font-size: 10px; color: var(--muted);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.weapon-chip {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  font-size: 10px; color: var(--muted); margin-right: 4px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.lb-weapon-list { margin-top: 4px; line-height: 1.6; }
.model-name { font-size: 13px; color: var(--text); }
.lb-quick-jump {
  margin-top: 24px; padding: 10px 14px; background: var(--panel-input);
  border: 1px solid var(--border); border-radius: 8px; font-size: 12px;
}
.lb-quick-jump summary { cursor: pointer; color: var(--muted); }
.lb-quick-jump summary:hover { color: var(--text); }

@media (max-width: 600px) {
  .lb-grid { grid-template-columns: 1fr; }
  .lb-row { grid-template-columns: 20px 1fr auto; gap: 8px; padding: 6px 4px; }
  .lb-value { font-size: 13px; }
  .lb-card { padding: 12px 14px; }
}

/* ─── Comment threads on alerts ──────────────────────────────── */
.comment-thread {
  margin-top: 10px; padding: 10px 12px;
  background: var(--panel-input);
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  font-size: 12px;
}
.comment {
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.comment:last-of-type { border-bottom: 0; }
.comment-author { font-weight: 600; color: var(--accent); }
.comment-body { margin-top: 3px; color: var(--text); white-space: pre-wrap; line-height: 1.5; }
.comment-form {
  display: flex; gap: 8px; margin-top: 8px;
  align-items: flex-start;
}
.comment-form textarea {
  flex: 1; resize: vertical; min-height: 36px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 8px; color: var(--text);
  font-family: inherit; font-size: 12px;
}
.comment-form textarea:focus {
  outline: none; border-color: var(--accent);
  background: rgba(0,0,0,0.35);
}

/* ─── Live page ──────────────────────────────────────────────── */
.live-grid {
  display: grid; grid-template-columns: 280px 1fr; gap: 16px;
}
@media (max-width: 800px) { .live-grid { grid-template-columns: 1fr; } }
.live-roster { padding: 12px 14px; max-height: calc(100vh - 200px); overflow-y: auto; }
.live-roster-list { list-style: none; padding: 0; margin: 0; }
.live-roster-item {
  padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex; flex-direction: column; gap: 3px;
}
.live-roster-item:last-child { border-bottom: 0; }
.live-roster-name {
  font-weight: 600; color: var(--text); text-decoration: none;
  font-size: 13px;
}
.live-roster-name:hover { color: var(--info); }
.live-feed { padding: 12px 14px; }
.live-feed-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 200px); overflow-y: auto; }
.feed-row {
  display: grid; grid-template-columns: 12px 64px auto 1fr; gap: 8px;
  align-items: baseline; padding: 6px 4px; font-size: 12px;
  border-left: 2px solid transparent; border-radius: 4px;
}
.feed-row.sev-critical { border-left-color: var(--crit); background: rgba(255, 62, 87, 0.06); }
.feed-row.sev-high     { border-left-color: var(--high); }
.feed-row.sev-medium   { border-left-color: var(--med); }
.feed-row.sev-low      { border-left-color: var(--low); }
.feed-row__main { color: var(--text); line-height: 1.4; }
.feed-row__main .player-link { font-weight: 600; }
.feed-row:hover { background: var(--row-hover); }

/* ─── Event rows (compact, scannable) ────────────────────────── */
.ev-row {
  display: grid;
  grid-template-columns: 12px 18px 64px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 100ms ease, transform 100ms ease;
  font-size: 12.5px;
  line-height: 1.4;
}
.ev-row + .ev-row { margin-top: 2px; }
.ev-row:hover { background: var(--row-hover); transform: translateX(2px); }

.ev-row.sev-info     { border-left-color: rgba(255,255,255,0.08); }
.ev-row.sev-low      { border-left-color: var(--low); }
.ev-row.sev-medium   { border-left-color: var(--med); }
.ev-row.sev-high     { border-left-color: var(--high); }
.ev-row.sev-critical { border-left-color: var(--crit); }
.ev-row.sev-critical .severity-dot { animation: pulse-dot 1.4s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 0 var(--crit); } 50% { box-shadow: 0 0 0 4px transparent; } }

.ev-cat { font-size: 14px; line-height: 1; }
.ev-time { color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; white-space: nowrap; }
.ev-headline { color: var(--text); }
.ev-headline .ev-player {
  color: var(--text); font-weight: 600; text-decoration: none;
  margin-right: 4px;
}
.ev-headline .ev-player:hover { color: var(--info); text-decoration: underline; }
.ev-pid {
  color: var(--muted); font-size: 10px; padding: 0 4px;
  background: rgba(255,255,255,0.04); border-radius: 3px;
  margin-right: 6px;
}
.ev-action {
  color: var(--text);
}
.ev-reason {
  color: var(--muted); font-style: italic; margin-left: 6px;
  font-size: 11px;
}
.ev-meta {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}
.ev-source {
  color: var(--muted);
  font-size: 11px;
}
.ev-headline-line {
  margin-top: 4px;
  font-size: 13px;
}

/* ─── Event detail modal ─────────────────────────────────────── */
.ev-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
}
.ev-modal-backdrop[style*="flex"] { display: flex !important; }
.ev-modal-card {
  background: var(--panel-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 24px;
}
.ev-modal-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.ev-modal-body { font-size: 14px; line-height: 1.5; }
.ev-modal-player { margin-bottom: 8px; font-weight: 500; }
.ev-modal-player a { color: var(--info); }
.ev-modal-headline {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin: 6px 0;
}
.ev-modal-desc {
  margin-top: 8px; padding: 8px 10px;
  background: var(--panel-input); border-radius: 6px;
  font-size: 13px; color: var(--text);
  white-space: pre-wrap;
}
.ev-modal-section {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.ev-modal-section h3 { font-size: 13px; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ev-related { display: flex; flex-direction: column; gap: 2px; }

/* On the now page alert cards, the head should now use ev-cat too */
.alert-card__head .ev-cat { font-size: 14px; }

/* ─── Feed/event row color de-saturation ────────────────────────
 * The base severity colors (--high, --crit, --info) are tuned for
 * alarming alerts. On dense feeds where most rows are routine
 * connections/admin/etc, those bright tones create alarm fatigue.
 * Use muted versions for the AMBIENT border-left, keep the bright
 * versions for the focused dot only.
 */

/* Live feed rows */
.feed-row {
  background: transparent;
  border-left-color: transparent !important;
}
.feed-row.sev-info     { border-left-color: rgba(255,255,255,0.06) !important; }
.feed-row.sev-low      { border-left-color: rgba(106,191,105,0.35) !important; }
.feed-row.sev-medium   { border-left-color: rgba(255,200,61,0.35)  !important; }
.feed-row.sev-high     { border-left-color: rgba(255,139,26,0.35)  !important; background: transparent !important; }
.feed-row.sev-critical { border-left-color: rgba(255,62,87,0.6)    !important; background: rgba(255,62,87,0.04) !important; }

/* Same for the new ev-row used on dashboard widgets */
.ev-row.sev-info     { border-left-color: rgba(255,255,255,0.06); }
.ev-row.sev-low      { border-left-color: rgba(106,191,105,0.35); }
.ev-row.sev-medium   { border-left-color: rgba(255,200,61,0.35); }
.ev-row.sev-high     { border-left-color: rgba(255,139,26,0.35); }
.ev-row.sev-critical { border-left-color: rgba(255,62,87,0.6); background: rgba(255,62,87,0.03); }

/* The severity-dot keeps its bright color but only at small size — that's the focused signal */
.feed-row .severity-dot, .ev-row .severity-dot {
  width: 6px; height: 6px; box-shadow: none;
}
.feed-row .severity-dot.sev-info, .ev-row .severity-dot.sev-info {
  background: rgba(255,255,255,0.25);
}
.feed-row .severity-dot.sev-low, .ev-row .severity-dot.sev-low {
  background: var(--low); opacity: 0.75;
}
.feed-row .severity-dot.sev-medium, .ev-row .severity-dot.sev-medium {
  background: var(--med); opacity: 0.85;
}
.feed-row .severity-dot.sev-high, .ev-row .severity-dot.sev-high {
  background: var(--high); opacity: 0.85;
}
/* Critical keeps full intensity AND pulse */
.feed-row .severity-dot.sev-critical, .ev-row .severity-dot.sev-critical {
  background: var(--crit); box-shadow: 0 0 6px var(--crit);
  animation: pulse-dot-soft 1.6s ease-in-out infinite;
}
@keyframes pulse-dot-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 62, 87, 0.4); }
  50%      { box-shadow: 0 0 0 4px rgba(255, 62, 87, 0); }
}

/* Player links — softer on dense feeds, hover for emphasis */
.feed-row .player-link, .ev-row .ev-player {
  color: rgba(216, 220, 229, 0.95);  /* near-white, not blue */
  text-decoration: none;
  font-weight: 600;
}
.feed-row .player-link:hover, .ev-row .ev-player:hover {
  color: var(--info);
  text-decoration: underline;
}

/* Headline / action text — primary content */
.feed-row .ev-action, .ev-row .ev-action {
  color: var(--text);
}
.feed-row .ev-reason, .ev-row .ev-reason {
  color: rgba(139, 149, 168, 0.85);  /* muted grey, not blue */
}

/* The category icon was using emoji — fine, but de-emphasize a bit */
.feed-row .ev-cat, .ev-row .ev-cat {
  opacity: 0.85;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════
 * SaaS / macOS-glass polish pass
 * Tightens typography, replaces emojis with category pills,
 * refines buttons, calibrates spacing, dampens noise.
 * ═══════════════════════════════════════════════════════════════ */

/* ─── Category pill (replaces emoji icons) ─────────────────────
 * Linear/Vercel-style: tiny colored chip with 3-letter code.
 */
.cat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  min-width: 32px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  font-feature-settings: 'tnum';
  color: var(--cat-color, #7a8595);
  background: color-mix(in srgb, var(--cat-color, #7a8595) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat-color, #7a8595) 28%, transparent);
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
}

/* ─── Typography refresh ───────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
}
h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); margin: 0 0 6px; }
h2 { font-size: 13px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
h3 { font-size: 12px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }

/* SF Mono everywhere a fixed-width is used */
code, .mono, pre {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  font-size: 11.5px;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  letter-spacing: 0;
}

/* Numeric tabular figures wherever money/counts appear */
.lb-value, .lb-rank, .ev-time, .kpi-strip__item strong, .lb-row, .glass-kpi__value {
  font-feature-settings: 'tnum' 1;
  font-variant-numeric: tabular-nums;
}

/* ─── Topbar / nav refinement ──────────────────────────────────── */
.topbar {
  padding: 8px 20px;
  gap: 18px;
  background: rgba(28, 31, 41, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.brand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.brand .muted { font-weight: 400; color: var(--muted); }
.topbar nav { gap: 2px; }
.topbar nav a {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 6px 11px;
  border-radius: 7px;
  color: rgba(216, 220, 229, 0.78);
  transition: background 120ms ease, color 120ms ease;
}
.topbar nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); text-decoration: none; }
.topbar nav .nav-primary { font-weight: 500; }

/* "more" dropdown */
.topbar nav details.nav-more summary {
  font-size: 12px;
  padding: 6px 10px;
  color: var(--muted);
}
.nav-more-list {
  background: rgba(28, 31, 41, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  border-radius: 10px;
  padding: 4px;
  min-width: 180px;
}
.nav-more-list a {
  font-size: 12.5px;
  padding: 7px 11px;
  border-radius: 5px;
}
.theme-toggle {
  font-size: 11px; padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

/* ─── Cards — tighter borders, deeper translucency ────────────── */
.card, .stat-tile, .ids-panel, .player-hero, .watch-panel,
.note, table, .auth-card, .finding,
.ingest-edit, .backup-codes, .lb-card, .alert-card {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 8px 28px rgba(0, 0, 0, 0.28);
  background: rgba(40, 44, 56, 0.50);
}

/* ─── Buttons (macOS glass) ────────────────────────────────────── */
button, .btn, .glass-btn,
input[type="submit"], button.link {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
}

/* Default glass button */
.btn-mini, button.mini {
  height: 26px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(216, 220, 229, 0.95);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}
.btn-mini:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.16);
}
.btn-mini:active { transform: translateY(0.5px); }

.btn-mini--primary {
  background: linear-gradient(180deg, rgba(199, 70, 52, 0.95), rgba(170, 55, 40, 0.95));
  border-color: rgba(199, 70, 52, 0.5);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.btn-mini--primary:hover {
  background: linear-gradient(180deg, rgba(214, 90, 72, 1), rgba(180, 65, 50, 1));
}

.btn-mini--success {
  background: rgba(64, 138, 80, 0.18);
  border-color: rgba(64, 138, 80, 0.32);
  color: #8ec99a;
}
.btn-mini--success:hover {
  background: rgba(64, 138, 80, 0.28);
}

.btn-mini--danger {
  background: rgba(199, 70, 52, 0.18);
  border-color: rgba(199, 70, 52, 0.32);
  color: #f0a89c;
}

/* Larger buttons */
.btn {
  height: 32px;
  padding: 0 14px;
  font-size: 12.5px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.18); }
.btn:active { transform: translateY(0.5px); }

button.link {
  background: transparent; border: 0; color: var(--info);
  padding: 0; font-size: inherit;
}
button.link:hover { text-decoration: underline; }

/* ─── Inputs ───────────────────────────────────────────────────── */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
select, textarea {
  height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 120ms ease, background 120ms ease;
}
textarea { height: auto; padding: 8px 10px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(199, 70, 52, 0.5);
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 0 0 3px rgba(199, 70, 52, 0.12);
}

/* ─── Tables — denser, cleaner ─────────────────────────────────── */
table {
  border-radius: 8px;
  overflow: hidden;
  font-size: 12.5px;
}
thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}
tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ─── Severity treatment refinement ────────────────────────────
 * Severity dots are now smaller, more subtle. Border-left is muted
 * for ambient rows; keeps prominence only on critical.
 */
.severity-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; box-shadow: none; }
.severity-dot.sev-info     { background: rgba(255, 255, 255, 0.20); }
.severity-dot.sev-low      { background: var(--low); opacity: 0.8; }
.severity-dot.sev-medium   { background: var(--med); opacity: 0.85; }
.severity-dot.sev-high     { background: var(--high); opacity: 0.85; }
.severity-dot.sev-critical { background: var(--crit); box-shadow: 0 0 6px rgba(255, 62, 87, 0.55); }

/* ─── Event row (compact list) ─────────────────────────────────── */
.ev-row {
  grid-template-columns: 8px auto 60px 1fr auto;
  gap: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  border-radius: 6px;
  border-left: 2px solid transparent;
}
.ev-row.sev-info     { border-left-color: rgba(255, 255, 255, 0.05); }
.ev-row.sev-low      { border-left-color: rgba(106, 191, 105, 0.30); }
.ev-row.sev-medium   { border-left-color: rgba(255, 200, 61, 0.30); }
.ev-row.sev-high     { border-left-color: rgba(255, 139, 26, 0.30); }
.ev-row.sev-critical { border-left-color: rgba(255, 62, 87, 0.55); background: rgba(255, 62, 87, 0.025); }
.ev-time { color: var(--muted); font-size: 11px; font-feature-settings: 'tnum' 1; }
.ev-headline { color: var(--text); }
.ev-headline .ev-player {
  color: var(--text); font-weight: 600; text-decoration: none;
  margin-right: 4px;
}
.ev-headline .ev-player:hover { color: var(--info); text-decoration: underline; }
.ev-pid {
  color: var(--muted); font-size: 10px; padding: 1px 5px;
  background: rgba(255,255,255,0.04); border-radius: 3px;
  margin-right: 6px; font-family: ui-monospace, monospace;
}
.ev-source {
  color: var(--muted); font-size: 11px; font-family: ui-monospace, monospace;
}
.ev-reason {
  color: rgba(139, 149, 168, 0.85);
  font-size: 11px;
  font-style: italic;
  margin-left: 6px;
}

/* ─── Live feed ────────────────────────────────────────────────── */
.feed-row {
  grid-template-columns: 8px auto 60px 1fr auto;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 5px;
  border-left: 2px solid transparent;
}
.feed-row.sev-info     { border-left-color: rgba(255, 255, 255, 0.04); }
.feed-row.sev-low      { border-left-color: rgba(106, 191, 105, 0.28); }
.feed-row.sev-medium   { border-left-color: rgba(255, 200, 61, 0.28); }
.feed-row.sev-high     { border-left-color: rgba(255, 139, 26, 0.28); background: transparent; }
.feed-row.sev-critical { border-left-color: rgba(255, 62, 87, 0.5); background: rgba(255, 62, 87, 0.03); }
.feed-row .player-link { color: rgba(216, 220, 229, 0.95); font-weight: 600; text-decoration: none; }
.feed-row .player-link:hover { color: var(--info); text-decoration: underline; }

/* ─── Roster (Live page sidebar) ───────────────────────────────── */
.live-roster-name { font-size: 12.5px; }
.live-roster-item { padding: 7px 6px; }

/* ─── Alert cards (Now page) ───────────────────────────────────── */
.alert-card {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid transparent;
  background: rgba(40, 44, 56, 0.55);
  border-radius: 8px;
}
.alert-card.sev-critical { border-left-color: var(--crit); animation: alert-pulse 1.5s ease-in-out infinite; }
.alert-card.sev-high     { border-left-color: rgba(255, 139, 26, 0.55); }
.alert-card.sev-medium   { border-left-color: rgba(255, 200, 61, 0.55); }
.alert-card.sev-low      { border-left-color: rgba(106, 191, 105, 0.45); }
.alert-card.sev-info     { border-left-color: rgba(255, 255, 255, 0.06); }
.alert-card__head {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0;
}
.severity-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}
.alert-card.sev-critical .severity-label { background: rgba(255, 62, 87, 0.15); color: var(--crit); }
.alert-card.sev-high .severity-label     { background: rgba(255, 139, 26, 0.12); color: #f5c89a; }
.alert-card.sev-medium .severity-label   { background: rgba(255, 200, 61, 0.12); color: #f0d57f; }

/* Claim pill */
.claimed-pill {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(89, 144, 191, 0.12);
  color: rgba(140, 180, 215, 0.95);
  border: 1px solid rgba(89, 144, 191, 0.25);
}
.claimed-pill.mine {
  background: rgba(64, 138, 80, 0.15);
  color: #8ec99a;
  border-color: rgba(64, 138, 80, 0.32);
}

/* Headline line in alert card */
.ev-headline-line {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

/* ─── Leaderboards ─────────────────────────────────────────────── */
.lb-card { padding: 14px 16px; }
.lb-card__header { padding-bottom: 10px; margin-bottom: 8px; }
.lb-card__header h2 { border: 0; padding: 0; margin: 0; font-size: 12.5px; }
.lb-row {
  padding: 7px 4px;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.lb-row:hover { background: rgba(255, 255, 255, 0.02); }
.lb-row--exploit { background: rgba(255, 62, 87, 0.06); border-left: 2px solid var(--crit); padding-left: 8px; }
.lb-rank {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  font-feature-settings: 'tnum' 1;
}
.lb-value { font-size: 13px; font-weight: 600; }
.exploit-flag {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 62, 87, 0.12);
  color: rgba(255, 130, 145, 0.95);
  border: 1px solid rgba(255, 62, 87, 0.28);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.job-badge {
  font-size: 9.5px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.weapon-chip {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-right: 3px;
  font-family: ui-monospace, monospace;
}

/* ─── Modal (event detail) ─────────────────────────────────────── */
.ev-modal-card {
  background: rgba(28, 31, 41, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  padding: 22px 26px;
}
.ev-modal-head { gap: 8px; padding-bottom: 12px; }
.ev-modal-headline { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.ev-modal-section h3 { font-size: 10.5px; }

/* ─── Comments thread ──────────────────────────────────────────── */
.comment-thread {
  margin-top: 10px; padding: 10px 12px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 0 0 7px 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.comment-author { color: rgba(216, 220, 229, 0.95); }
.comment-body { color: rgba(216, 220, 229, 0.85); font-size: 12px; }
.comment-form textarea {
  background: rgba(0, 0, 0, 0.25);
  font-size: 12px;
}

/* ─── KPI strip / tiles ────────────────────────────────────────── */
.kpi-strip {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
}
.kpi-strip__item strong { font-size: 14px; font-weight: 600; }

.kpis .card {
  padding: 14px 16px;
}
.kpis .card .lbl {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.kpis .card .val {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  font-feature-settings: 'tnum' 1;
  margin-top: 4px;
}

/* ─── Spacing scale (consistent gaps) ──────────────────────────── */
main { padding: 20px 28px; }
section + section { margin-top: 18px; }
.alert-stream { gap: 6px; }

/* ─── Mobile refinements ───────────────────────────────────────── */
@media (max-width: 800px) {
  main { padding: 14px 16px; }
  h1 { font-size: 18px; }
  .topbar { padding: 8px 14px; gap: 12px; }
  .topbar nav a { font-size: 11.5px; padding: 6px 8px; }
  .alert-card { padding: 10px 12px; }
  .lb-grid { grid-template-columns: 1fr; }
  .ev-row, .feed-row { grid-template-columns: 6px auto 1fr; gap: 8px; }
  .ev-row .ev-meta, .feed-row .ev-source { display: none; }
}
/* ─── Now page ─────────────────────────────────────────────────── */
.now-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px; gap: 16px; flex-wrap: wrap;
}
.now-delta {
  margin: 4px 0 0; font-size: 13px;
}
.now-section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 18px 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.now-section-header h2 { font-size: 14px; }

/* Alert cards — designed for 30-second scan */
.alert-stream { display: flex; flex-direction: column; gap: 8px; }
.alert-card {
  display: grid; gap: 6px; padding: 10px 14px;
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: 8px;
  transition: border-color 120ms ease, transform 120ms ease;
}
.alert-card:hover { border-color: var(--border-strong); transform: translateX(2px); }
.alert-card.cursor { outline: 2px solid var(--accent); outline-offset: 2px; }

.alert-card.sev-critical { border-left-color: var(--crit); animation: alert-pulse 1.5s ease-in-out infinite; }
.alert-card.sev-high     { border-left-color: var(--high); }
.alert-card.sev-medium   { border-left-color: var(--med); }
.alert-card.sev-low      { border-left-color: var(--low); }
.alert-card.sev-info     { border-left-color: var(--info); }

@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 62, 87, 0.0); }
  50%      { box-shadow: 0 0 0 4px rgba(255, 62, 87, 0.18); }
}

.alert-card__head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11px; color: var(--muted);
}
.alert-card__body { font-size: 13px; line-height: 1.4; color: var(--text); }
.alert-card__body .player-link {
  font-weight: 600; color: var(--text); margin-right: 8px;
}
.alert-card__actions { display: flex; gap: 6px; flex-wrap: wrap; }

.severity-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0; display: inline-block;
}
.severity-dot.sev-critical { background: var(--crit); box-shadow: 0 0 8px var(--crit); }
.severity-dot.sev-high     { background: var(--high); }
.severity-dot.sev-medium   { background: var(--med); }
.severity-dot.sev-low      { background: var(--low); }
.severity-dot.sev-info     { background: var(--info); }

.severity-label {
  text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em;
  font-size: 10px; color: var(--muted);
}
.alert-card.sev-critical .severity-label { color: var(--crit); }
.alert-card.sev-high     .severity-label { color: var(--high); }
.alert-card.sev-medium   .severity-label { color: var(--med); }

.claimed-pill {
  margin-left: auto; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; background: rgba(95,182,229,0.15); color: var(--info);
  border: 1px solid rgba(95,182,229,0.3);
}
.claimed-pill.mine { background: rgba(106,191,105,0.18); color: var(--low); border-color: rgba(106,191,105,0.35); }

/* Mini buttons for actions */
.btn-mini {
  background: var(--panel-strong); border: 1px solid var(--border); color: var(--text);
  padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.btn-mini:hover { background: rgba(255,255,255,0.08); border-color: var(--border-strong); }
.btn-mini--primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-mini--primary:hover { background: var(--accent-hover); }
.btn-mini--success {
  background: rgba(106,191,105,0.2); border-color: rgba(106,191,105,0.4); color: var(--low);
}

.empty-card {
  display: grid; place-items: center; padding: 36px 16px; gap: 8px;
  background: var(--panel); border: 1px dashed var(--border); border-radius: 12px;
  color: var(--muted); text-align: center;
}

/* Resolved row — compact, dim */
.resolved-row {
  display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px;
  align-items: center; padding: 6px 12px; font-size: 12px;
  border-left: 2px solid transparent; opacity: 0.75;
}
.resolved-row.sev-critical { border-left-color: var(--crit); }
.resolved-row.sev-high     { border-left-color: var(--high); }
.resolved-row.sev-medium   { border-left-color: var(--med); }
.alert-stream-resolved { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }

/* Presence pills */
.now-presence {
  display: flex; flex-wrap: wrap; gap: 6px; max-width: 50%; justify-content: flex-end;
}
.presence-pill {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
}
.presence-pill.presence-live { color: var(--low); border-color: rgba(106,191,105,0.4); }
.presence-pill.presence-idle { color: var(--muted); }

/* Bottom KPI strip — secondary info, deemphasized */
.kpi-strip {
  display: flex; gap: 16px; padding: 10px 14px;
  background: var(--panel-input); border: 1px solid var(--border); border-radius: 10px;
  margin: 24px 0; font-size: 13px; flex-wrap: wrap;
}
.kpi-strip__item { display: flex; gap: 6px; align-items: baseline; }
.kpi-strip__item strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* Collapsed nav with "more" dropdown */
.topbar nav .nav-primary { font-weight: 500; }
.topbar nav details.nav-more {
  position: relative;
}
.topbar nav details.nav-more summary {
  padding: 6px 10px; border-radius: 8px; cursor: pointer; list-style: none;
  color: var(--muted);
}
.topbar nav details.nav-more summary::-webkit-details-marker { display: none; }
.topbar nav details.nav-more summary:hover { background: var(--row-hover); color: var(--text); }
.topbar nav details.nav-more[open] summary { color: var(--text); background: var(--row-hover); }

.nav-more-list {
  position: absolute; top: 100%; right: 0; margin-top: 6px;
  min-width: 180px; background: var(--panel-strong);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; padding: 6px;
  z-index: 100;
}
.nav-more-list a {
  padding: 8px 12px; border-radius: 6px; color: var(--text); font-size: 13px;
}
.nav-more-list a:hover { background: var(--row-hover); text-decoration: none; }

/* Mobile stacking */
@media (max-width: 800px) {
  .now-header { flex-direction: column; }
  .now-presence { max-width: 100%; justify-content: flex-start; }
  .topbar { flex-wrap: wrap; padding: 8px 14px; }
  .topbar nav { width: 100%; order: 3; flex-wrap: wrap; gap: 2px; }
  .topbar nav a { flex: 1 1 auto; text-align: center; font-size: 12px; padding: 6px 4px; }
  .topbar nav .nav-primary { font-size: 13px; }
  .alert-card__head { font-size: 10px; gap: 6px; }
  .alert-card__body { font-size: 12px; }
  .btn-mini { padding: 6px 12px; font-size: 11px; min-height: 32px; }
  main { padding: 12px 14px; }
}
/* ─── Leaderboards ───────────────────────────────────────────── */
.lb-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px; gap: 16px; flex-wrap: wrap;
}
.lb-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}
.lb-card { padding: 14px 18px; }
.lb-card__header {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 8px;
}
.lb-card__header h2 { font-size: 14px; }
.lb-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.lb-row {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 6px; border-radius: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 120ms ease;
}
.lb-row:hover { background: var(--row-hover); }
.lb-row:last-child { border-bottom: 0; }
.lb-row--exploit { background: rgba(255, 62, 87, 0.08); border-left: 2px solid var(--crit); padding-left: 10px; }
.lb-rank {
  font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums;
  text-align: right; font-size: 12px;
}
.lb-row__main { min-width: 0; overflow: hidden; }
.lb-player {
  font-weight: 600; color: var(--text); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-player:hover { color: var(--info); text-decoration: underline; }
.lb-value {
  font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: 14px; color: var(--text); text-align: right; white-space: nowrap;
}
.exploit-flag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 600; color: var(--crit);
  background: rgba(255, 62, 87, 0.15); border: 1px solid rgba(255, 62, 87, 0.3);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.job-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px; margin-left: 6px;
  font-size: 10px; color: var(--muted);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.weapon-chip {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  font-size: 10px; color: var(--muted); margin-right: 4px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.lb-weapon-list { margin-top: 4px; line-height: 1.6; }
.model-name { font-size: 13px; color: var(--text); }
.lb-quick-jump {
  margin-top: 24px; padding: 10px 14px; background: var(--panel-input);
  border: 1px solid var(--border); border-radius: 8px; font-size: 12px;
}
.lb-quick-jump summary { cursor: pointer; color: var(--muted); }
.lb-quick-jump summary:hover { color: var(--text); }

@media (max-width: 600px) {
  .lb-grid { grid-template-columns: 1fr; }
  .lb-row { grid-template-columns: 20px 1fr auto; gap: 8px; padding: 6px 4px; }
  .lb-value { font-size: 13px; }
  .lb-card { padding: 12px 14px; }
}

/* ─── Comment threads on alerts ──────────────────────────────── */
.comment-thread {
  margin-top: 10px; padding: 10px 12px;
  background: var(--panel-input);
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  font-size: 12px;
}
.comment {
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.comment:last-of-type { border-bottom: 0; }
.comment-author { font-weight: 600; color: var(--accent); }
.comment-body { margin-top: 3px; color: var(--text); white-space: pre-wrap; line-height: 1.5; }
.comment-form {
  display: flex; gap: 8px; margin-top: 8px;
  align-items: flex-start;
}
.comment-form textarea {
  flex: 1; resize: vertical; min-height: 36px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 8px; color: var(--text);
  font-family: inherit; font-size: 12px;
}
.comment-form textarea:focus {
  outline: none; border-color: var(--accent);
  background: rgba(0,0,0,0.35);
}

/* ─── Live page ──────────────────────────────────────────────── */
.live-grid {
  display: grid; grid-template-columns: 280px 1fr; gap: 16px;
}
@media (max-width: 800px) { .live-grid { grid-template-columns: 1fr; } }
.live-roster { padding: 12px 14px; max-height: calc(100vh - 200px); overflow-y: auto; }
.live-roster-list { list-style: none; padding: 0; margin: 0; }
.live-roster-item {
  padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex; flex-direction: column; gap: 3px;
}
.live-roster-item:last-child { border-bottom: 0; }
.live-roster-name {
  font-weight: 600; color: var(--text); text-decoration: none;
  font-size: 13px;
}
.live-roster-name:hover { color: var(--info); }
.live-feed { padding: 12px 14px; }
.live-feed-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 200px); overflow-y: auto; }
.feed-row {
  display: grid; grid-template-columns: 12px 64px auto 1fr; gap: 8px;
  align-items: baseline; padding: 6px 4px; font-size: 12px;
  border-left: 2px solid transparent; border-radius: 4px;
}
.feed-row.sev-critical { border-left-color: var(--crit); background: rgba(255, 62, 87, 0.06); }
.feed-row.sev-high     { border-left-color: var(--high); }
.feed-row.sev-medium   { border-left-color: var(--med); }
.feed-row.sev-low      { border-left-color: var(--low); }
.feed-row__main { color: var(--text); line-height: 1.4; }
.feed-row__main .player-link { font-weight: 600; }
.feed-row:hover { background: var(--row-hover); }

/* ─── Event rows (compact, scannable) ────────────────────────── */
.ev-row {
  display: grid;
  grid-template-columns: 12px 18px 64px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 100ms ease, transform 100ms ease;
  font-size: 12.5px;
  line-height: 1.4;
}
.ev-row + .ev-row { margin-top: 2px; }
.ev-row:hover { background: var(--row-hover); transform: translateX(2px); }

.ev-row.sev-info     { border-left-color: rgba(255,255,255,0.08); }
.ev-row.sev-low      { border-left-color: var(--low); }
.ev-row.sev-medium   { border-left-color: var(--med); }
.ev-row.sev-high     { border-left-color: var(--high); }
.ev-row.sev-critical { border-left-color: var(--crit); }
.ev-row.sev-critical .severity-dot { animation: pulse-dot 1.4s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 0 var(--crit); } 50% { box-shadow: 0 0 0 4px transparent; } }

.ev-cat { font-size: 14px; line-height: 1; }
.ev-time { color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; white-space: nowrap; }
.ev-headline { color: var(--text); }
.ev-headline .ev-player {
  color: var(--text); font-weight: 600; text-decoration: none;
  margin-right: 4px;
}
.ev-headline .ev-player:hover { color: var(--info); text-decoration: underline; }
.ev-pid {
  color: var(--muted); font-size: 10px; padding: 0 4px;
  background: rgba(255,255,255,0.04); border-radius: 3px;
  margin-right: 6px;
}
.ev-action {
  color: var(--text);
}
.ev-reason {
  color: var(--muted); font-style: italic; margin-left: 6px;
  font-size: 11px;
}
.ev-meta {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}
.ev-source {
  color: var(--muted);
  font-size: 11px;
}
.ev-headline-line {
  margin-top: 4px;
  font-size: 13px;
}

/* ─── Event detail modal ─────────────────────────────────────── */
.ev-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
}
.ev-modal-backdrop[style*="flex"] { display: flex !important; }
.ev-modal-card {
  background: var(--panel-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 24px;
}
.ev-modal-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.ev-modal-body { font-size: 14px; line-height: 1.5; }
.ev-modal-player { margin-bottom: 8px; font-weight: 500; }
.ev-modal-player a { color: var(--info); }
.ev-modal-headline {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin: 6px 0;
}
.ev-modal-desc {
  margin-top: 8px; padding: 8px 10px;
  background: var(--panel-input); border-radius: 6px;
  font-size: 13px; color: var(--text);
  white-space: pre-wrap;
}
.ev-modal-section {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.ev-modal-section h3 { font-size: 13px; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ev-related { display: flex; flex-direction: column; gap: 2px; }

/* On the now page alert cards, the head should now use ev-cat too */
.alert-card__head .ev-cat { font-size: 14px; }

/* ─── Feed/event row color de-saturation ────────────────────────
 * The base severity colors (--high, --crit, --info) are tuned for
 * alarming alerts. On dense feeds where most rows are routine
 * connections/admin/etc, those bright tones create alarm fatigue.
 * Use muted versions for the AMBIENT border-left, keep the bright
 * versions for the focused dot only.
 */

/* Live feed rows */
.feed-row {
  background: transparent;
  border-left-color: transparent !important;
}
.feed-row.sev-info     { border-left-color: rgba(255,255,255,0.06) !important; }
.feed-row.sev-low      { border-left-color: rgba(106,191,105,0.35) !important; }
.feed-row.sev-medium   { border-left-color: rgba(255,200,61,0.35)  !important; }
.feed-row.sev-high     { border-left-color: rgba(255,139,26,0.35)  !important; background: transparent !important; }
.feed-row.sev-critical { border-left-color: rgba(255,62,87,0.6)    !important; background: rgba(255,62,87,0.04) !important; }

/* Same for the new ev-row used on dashboard widgets */
.ev-row.sev-info     { border-left-color: rgba(255,255,255,0.06); }
.ev-row.sev-low      { border-left-color: rgba(106,191,105,0.35); }
.ev-row.sev-medium   { border-left-color: rgba(255,200,61,0.35); }
.ev-row.sev-high     { border-left-color: rgba(255,139,26,0.35); }
.ev-row.sev-critical { border-left-color: rgba(255,62,87,0.6); background: rgba(255,62,87,0.03); }

/* The severity-dot keeps its bright color but only at small size — that's the focused signal */
.feed-row .severity-dot, .ev-row .severity-dot {
  width: 6px; height: 6px; box-shadow: none;
}
.feed-row .severity-dot.sev-info, .ev-row .severity-dot.sev-info {
  background: rgba(255,255,255,0.25);
}
.feed-row .severity-dot.sev-low, .ev-row .severity-dot.sev-low {
  background: var(--low); opacity: 0.75;
}
.feed-row .severity-dot.sev-medium, .ev-row .severity-dot.sev-medium {
  background: var(--med); opacity: 0.85;
}
.feed-row .severity-dot.sev-high, .ev-row .severity-dot.sev-high {
  background: var(--high); opacity: 0.85;
}
/* Critical keeps full intensity AND pulse */
.feed-row .severity-dot.sev-critical, .ev-row .severity-dot.sev-critical {
  background: var(--crit); box-shadow: 0 0 6px var(--crit);
  animation: pulse-dot-soft 1.6s ease-in-out infinite;
}
@keyframes pulse-dot-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 62, 87, 0.4); }
  50%      { box-shadow: 0 0 0 4px rgba(255, 62, 87, 0); }
}

/* Player links — softer on dense feeds, hover for emphasis */
.feed-row .player-link, .ev-row .ev-player {
  color: rgba(216, 220, 229, 0.95);  /* near-white, not blue */
  text-decoration: none;
  font-weight: 600;
}
.feed-row .player-link:hover, .ev-row .ev-player:hover {
  color: var(--info);
  text-decoration: underline;
}

/* Headline / action text — primary content */
.feed-row .ev-action, .ev-row .ev-action {
  color: var(--text);
}
.feed-row .ev-reason, .ev-row .ev-reason {
  color: rgba(139, 149, 168, 0.85);  /* muted grey, not blue */
}

/* The category icon was using emoji — fine, but de-emphasize a bit */
.feed-row .ev-cat, .ev-row .ev-cat {
  opacity: 0.85;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════
 * SaaS / macOS-glass polish pass
 * Tightens typography, replaces emojis with category pills,
 * refines buttons, calibrates spacing, dampens noise.
 * ═══════════════════════════════════════════════════════════════ */

/* ─── Category pill (replaces emoji icons) ─────────────────────
 * Linear/Vercel-style: tiny colored chip with 3-letter code.
 */
.cat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  min-width: 32px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  font-feature-settings: 'tnum';
  color: var(--cat-color, #7a8595);
  background: color-mix(in srgb, var(--cat-color, #7a8595) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat-color, #7a8595) 28%, transparent);
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
}

/* ─── Typography refresh ───────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
}
h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); margin: 0 0 6px; }
h2 { font-size: 13px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
h3 { font-size: 12px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }

/* SF Mono everywhere a fixed-width is used */
code, .mono, pre {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  font-size: 11.5px;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  letter-spacing: 0;
}

/* Numeric tabular figures wherever money/counts appear */
.lb-value, .lb-rank, .ev-time, .kpi-strip__item strong, .lb-row, .glass-kpi__value {
  font-feature-settings: 'tnum' 1;
  font-variant-numeric: tabular-nums;
}

/* ─── Topbar / nav refinement ──────────────────────────────────── */
.topbar {
  padding: 8px 20px;
  gap: 18px;
  background: rgba(28, 31, 41, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.brand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.brand .muted { font-weight: 400; color: var(--muted); }
.topbar nav { gap: 2px; }
.topbar nav a {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 6px 11px;
  border-radius: 7px;
  color: rgba(216, 220, 229, 0.78);
  transition: background 120ms ease, color 120ms ease;
}
.topbar nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); text-decoration: none; }
.topbar nav .nav-primary { font-weight: 500; }

/* "more" dropdown */
.topbar nav details.nav-more summary {
  font-size: 12px;
  padding: 6px 10px;
  color: var(--muted);
}
.nav-more-list {
  background: rgba(28, 31, 41, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  border-radius: 10px;
  padding: 4px;
  min-width: 180px;
}
.nav-more-list a {
  font-size: 12.5px;
  padding: 7px 11px;
  border-radius: 5px;
}
.theme-toggle {
  font-size: 11px; padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

/* ─── Cards — tighter borders, deeper translucency ────────────── */
.card, .stat-tile, .ids-panel, .player-hero, .watch-panel,
.note, table, .auth-card, .finding,
.ingest-edit, .backup-codes, .lb-card, .alert-card {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 8px 28px rgba(0, 0, 0, 0.28);
  background: rgba(40, 44, 56, 0.50);
}

/* ─── Buttons (macOS glass) ────────────────────────────────────── */
button, .btn, .glass-btn,
input[type="submit"], button.link {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
}

/* Default glass button */
.btn-mini, button.mini {
  height: 26px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(216, 220, 229, 0.95);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}
.btn-mini:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.16);
}
.btn-mini:active { transform: translateY(0.5px); }

.btn-mini--primary {
  background: linear-gradient(180deg, rgba(199, 70, 52, 0.95), rgba(170, 55, 40, 0.95));
  border-color: rgba(199, 70, 52, 0.5);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.btn-mini--primary:hover {
  background: linear-gradient(180deg, rgba(214, 90, 72, 1), rgba(180, 65, 50, 1));
}

.btn-mini--success {
  background: rgba(64, 138, 80, 0.18);
  border-color: rgba(64, 138, 80, 0.32);
  color: #8ec99a;
}
.btn-mini--success:hover {
  background: rgba(64, 138, 80, 0.28);
}

.btn-mini--danger {
  background: rgba(199, 70, 52, 0.18);
  border-color: rgba(199, 70, 52, 0.32);
  color: #f0a89c;
}

/* Larger buttons */
.btn {
  height: 32px;
  padding: 0 14px;
  font-size: 12.5px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.18); }
.btn:active { transform: translateY(0.5px); }

button.link {
  background: transparent; border: 0; color: var(--info);
  padding: 0; font-size: inherit;
}
button.link:hover { text-decoration: underline; }

/* ─── Inputs ───────────────────────────────────────────────────── */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
select, textarea {
  height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 120ms ease, background 120ms ease;
}
textarea { height: auto; padding: 8px 10px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(199, 70, 52, 0.5);
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 0 0 3px rgba(199, 70, 52, 0.12);
}

/* ─── Tables — denser, cleaner ─────────────────────────────────── */
table {
  border-radius: 8px;
  overflow: hidden;
  font-size: 12.5px;
}
thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}
tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ─── Severity treatment refinement ────────────────────────────
 * Severity dots are now smaller, more subtle. Border-left is muted
 * for ambient rows; keeps prominence only on critical.
 */
.severity-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; box-shadow: none; }
.severity-dot.sev-info     { background: rgba(255, 255, 255, 0.20); }
.severity-dot.sev-low      { background: var(--low); opacity: 0.8; }
.severity-dot.sev-medium   { background: var(--med); opacity: 0.85; }
.severity-dot.sev-high     { background: var(--high); opacity: 0.85; }
.severity-dot.sev-critical { background: var(--crit); box-shadow: 0 0 6px rgba(255, 62, 87, 0.55); }

/* ─── Event row (compact list) ─────────────────────────────────── */
.ev-row {
  grid-template-columns: 8px auto 60px 1fr auto;
  gap: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  border-radius: 6px;
  border-left: 2px solid transparent;
}
.ev-row.sev-info     { border-left-color: rgba(255, 255, 255, 0.05); }
.ev-row.sev-low      { border-left-color: rgba(106, 191, 105, 0.30); }
.ev-row.sev-medium   { border-left-color: rgba(255, 200, 61, 0.30); }
.ev-row.sev-high     { border-left-color: rgba(255, 139, 26, 0.30); }
.ev-row.sev-critical { border-left-color: rgba(255, 62, 87, 0.55); background: rgba(255, 62, 87, 0.025); }
.ev-time { color: var(--muted); font-size: 11px; font-feature-settings: 'tnum' 1; }
.ev-headline { color: var(--text); }
.ev-headline .ev-player {
  color: var(--text); font-weight: 600; text-decoration: none;
  margin-right: 4px;
}
.ev-headline .ev-player:hover { color: var(--info); text-decoration: underline; }
.ev-pid {
  color: var(--muted); font-size: 10px; padding: 1px 5px;
  background: rgba(255,255,255,0.04); border-radius: 3px;
  margin-right: 6px; font-family: ui-monospace, monospace;
}
.ev-source {
  color: var(--muted); font-size: 11px; font-family: ui-monospace, monospace;
}
.ev-reason {
  color: rgba(139, 149, 168, 0.85);
  font-size: 11px;
  font-style: italic;
  margin-left: 6px;
}

/* ─── Live feed ────────────────────────────────────────────────── */
.feed-row {
  grid-template-columns: 8px auto 60px 1fr auto;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 5px;
  border-left: 2px solid transparent;
}
.feed-row.sev-info     { border-left-color: rgba(255, 255, 255, 0.04); }
.feed-row.sev-low      { border-left-color: rgba(106, 191, 105, 0.28); }
.feed-row.sev-medium   { border-left-color: rgba(255, 200, 61, 0.28); }
.feed-row.sev-high     { border-left-color: rgba(255, 139, 26, 0.28); background: transparent; }
.feed-row.sev-critical { border-left-color: rgba(255, 62, 87, 0.5); background: rgba(255, 62, 87, 0.03); }
.feed-row .player-link { color: rgba(216, 220, 229, 0.95); font-weight: 600; text-decoration: none; }
.feed-row .player-link:hover { color: var(--info); text-decoration: underline; }

/* ─── Roster (Live page sidebar) ───────────────────────────────── */
.live-roster-name { font-size: 12.5px; }
.live-roster-item { padding: 7px 6px; }

/* ─── Alert cards (Now page) ───────────────────────────────────── */
.alert-card {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid transparent;
  background: rgba(40, 44, 56, 0.55);
  border-radius: 8px;
}
.alert-card.sev-critical { border-left-color: var(--crit); animation: alert-pulse 1.5s ease-in-out infinite; }
.alert-card.sev-high     { border-left-color: rgba(255, 139, 26, 0.55); }
.alert-card.sev-medium   { border-left-color: rgba(255, 200, 61, 0.55); }
.alert-card.sev-low      { border-left-color: rgba(106, 191, 105, 0.45); }
.alert-card.sev-info     { border-left-color: rgba(255, 255, 255, 0.06); }
.alert-card__head {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0;
}
.severity-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}
.alert-card.sev-critical .severity-label { background: rgba(255, 62, 87, 0.15); color: var(--crit); }
.alert-card.sev-high .severity-label     { background: rgba(255, 139, 26, 0.12); color: #f5c89a; }
.alert-card.sev-medium .severity-label   { background: rgba(255, 200, 61, 0.12); color: #f0d57f; }

/* Claim pill */
.claimed-pill {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(89, 144, 191, 0.12);
  color: rgba(140, 180, 215, 0.95);
  border: 1px solid rgba(89, 144, 191, 0.25);
}
.claimed-pill.mine {
  background: rgba(64, 138, 80, 0.15);
  color: #8ec99a;
  border-color: rgba(64, 138, 80, 0.32);
}

/* Headline line in alert card */
.ev-headline-line {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

/* ─── Leaderboards ─────────────────────────────────────────────── */
.lb-card { padding: 14px 16px; }
.lb-card__header { padding-bottom: 10px; margin-bottom: 8px; }
.lb-card__header h2 { border: 0; padding: 0; margin: 0; font-size: 12.5px; }
.lb-row {
  padding: 7px 4px;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.lb-row:hover { background: rgba(255, 255, 255, 0.02); }
.lb-row--exploit { background: rgba(255, 62, 87, 0.06); border-left: 2px solid var(--crit); padding-left: 8px; }
.lb-rank {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  font-feature-settings: 'tnum' 1;
}
.lb-value { font-size: 13px; font-weight: 600; }
.exploit-flag {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 62, 87, 0.12);
  color: rgba(255, 130, 145, 0.95);
  border: 1px solid rgba(255, 62, 87, 0.28);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.job-badge {
  font-size: 9.5px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.weapon-chip {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-right: 3px;
  font-family: ui-monospace, monospace;
}

/* ─── Modal (event detail) ─────────────────────────────────────── */
.ev-modal-card {
  background: rgba(28, 31, 41, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  padding: 22px 26px;
}
.ev-modal-head { gap: 8px; padding-bottom: 12px; }
.ev-modal-headline { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.ev-modal-section h3 { font-size: 10.5px; }

/* ─── Comments thread ──────────────────────────────────────────── */
.comment-thread {
  margin-top: 10px; padding: 10px 12px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 0 0 7px 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.comment-author { color: rgba(216, 220, 229, 0.95); }
.comment-body { color: rgba(216, 220, 229, 0.85); font-size: 12px; }
.comment-form textarea {
  background: rgba(0, 0, 0, 0.25);
  font-size: 12px;
}

/* ─── KPI strip / tiles ────────────────────────────────────────── */
.kpi-strip {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
}
.kpi-strip__item strong { font-size: 14px; font-weight: 600; }

.kpis .card {
  padding: 14px 16px;
}
.kpis .card .lbl {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.kpis .card .val {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  font-feature-settings: 'tnum' 1;
  margin-top: 4px;
}

/* ─── Spacing scale (consistent gaps) ──────────────────────────── */
main { padding: 20px 28px; }
section + section { margin-top: 18px; }
.alert-stream { gap: 6px; }

/* ─── Mobile refinements ───────────────────────────────────────── */
@media (max-width: 800px) {
  main { padding: 14px 16px; }
  h1 { font-size: 18px; }
  .topbar { padding: 8px 14px; gap: 12px; }
  .topbar nav a { font-size: 11.5px; padding: 6px 8px; }
  .alert-card { padding: 10px 12px; }
  .lb-grid { grid-template-columns: 1fr; }
  .ev-row, .feed-row { grid-template-columns: 6px auto 1fr; gap: 8px; }
  .ev-row .ev-meta, .feed-row .ev-source { display: none; }
}

/* === Heads-up / Awareness panel (banned-license auto-rejects) === */
.awareness-stream{
  display:flex; flex-direction:column; gap:4px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 6px;
}
.awareness-row{
  display:flex; align-items:center; gap:10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.015);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
}
.awareness-row:hover{ background: rgba(255,255,255,0.04); }
.awareness-row .severity-dot{
  width:6px; height:6px; border-radius:50%;
  background:#a85a5a; flex-shrink:0;
}
.awareness-label{
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(168,90,90,0.18);
  color: #f3a5a5;
  border: 1px solid rgba(168,90,90,0.3);
}
.awareness-detail{
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.now-section-header{
  display:flex; flex-direction:column; gap:2px;
  margin: 16px 0 8px;
}


/* === /now UI: chips, repeats, watch, bulk =========================== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  backdrop-filter: var(--blur, blur(20px));
  position: sticky;
  top: 0;
  z-index: 50;
}
.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chips .chip {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--fg-muted, #aab);
  cursor: pointer;
  transition: all 120ms ease;
}
.filter-chips .chip:hover {
  background: rgba(255,255,255,0.07);
  color: var(--fg, #fff);
}
.filter-chips .chip--active {
  background: rgba(120,168,255,0.18);
  border-color: rgba(120,168,255,0.35);
  color: #cfe0ff;
}
.filter-chips .chip-count {
  font-size: 11px;
  opacity: 0.75;
  margin-left: 4px;
}
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.repeats-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255,180,80,0.15);
  color: #ffc97a;
  border: 1px solid rgba(255,180,80,0.25);
}
.watch-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255,224,80,0.16);
  color: #ffe97a;
  border: 1px solid rgba(255,224,80,0.32);
}
.alert-card.is-watched {
  outline: 1px solid rgba(255,224,80,0.35);
  outline-offset: -1px;
  box-shadow: 0 0 0 3px rgba(255,224,80,0.08);
}
.alert-card.is-grouped {
  border-left: 2px solid rgba(255,180,80,0.4);
}
.alert-check {
  margin-right: 6px;
  cursor: pointer;
  accent-color: #6aa6ff;
}


/* === Player money-flow panel ============================================ */
.wealth-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wealth-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.wealth-stats {
  display: grid;
  gap: 6px;
}
.wealth-stat-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.4fr 1.4fr;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.wealth-stat-row .ws-label {
  font-weight: 600;
  color: var(--fg, #ddd);
}
.wealth-stat-row .ws-in,
.wealth-stat-row .ws-out,
.wealth-stat-row .ws-net {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 13px;
}
.wealth-stat-row .ws-in::before  { content: 'in:  ';  color: rgba(80,180,120,0.85); }
.wealth-stat-row .ws-out::before { content: 'out: ';  color: rgba(220,90,90,0.85); }
.wealth-stat-row .ws-net {
  font-weight: 600;
  text-align: right;
}
.wealth-stat-row .ws-net::before { content: 'net: '; color: var(--fg-muted, #888); font-weight: 400; }
.wealth-stat-row .ws-net--pos { color: rgb(110,210,150); }
.wealth-stat-row .ws-net--neg { color: rgb(240,120,120); }

.wealth-chart-wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 14px 14px;
}
.wealth-chart-title {
  margin-bottom: 6px;
}
.wealth-biggest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.wealth-biggest__col {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 14px;
}
.wealth-biggest__col h3 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wealth-biggest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wealth-biggest-list li {
  display: grid;
  grid-template-columns: 110px 60px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px dashed rgba(255,255,255,0.04);
}
.wealth-biggest-list li:last-child { border-bottom: none; }
.wbig-amt { font-family: 'SF Mono', Menlo, monospace; font-weight: 600; }
.wealth-biggest__col:first-child .wbig-amt { color: rgb(110,210,150); }
.wealth-biggest__col:last-child  .wbig-amt { color: rgb(240,120,120); }
.wbig-link { font-size: 12px; opacity: 0.7; }
.wbig-link:hover { opacity: 1; }

@media (max-width: 720px) {
  .wealth-stat-row { grid-template-columns: 1fr; gap: 4px; }
  .wealth-biggest  { grid-template-columns: 1fr; }
  .wealth-biggest-list li { grid-template-columns: 100px 1fr auto; }
  .wealth-biggest-list li .wbig-kind { display: none; }
}


/* === Simple money panel ============================================== */
.wealth-simple {
  padding: 4px 0;
}
.wealth-simple__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  max-width: 460px;
}
.wsr {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  font-size: 15px;
}
.wsr-label {
  width: 80px;
  color: var(--fg-muted, #888);
}
.wsr-value {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 18px;
  font-weight: 500;
}
.wsr-change {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.wsr-change .wsr-value {
  font-size: 22px;
  font-weight: 700;
}
.wsr-pos { color: rgb(110,210,150); }
.wsr-neg { color: rgb(240,120,120); }


/* === ID pills next to player names on /live ============================ */
.id-pill {
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--fg-muted, #99a3b3);
  white-space: nowrap;
  vertical-align: middle;
}
.live-roster-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}


/* === Cash-location leaderboard kind tags ============================== */
.loc-kind {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: 1px;
  border: 1px solid rgba(255,255,255,0.10);
}
.loc-kind--player   { background: rgba(110,162,255,0.15); color: #b9d2ff; border-color: rgba(110,162,255,0.30); }
.loc-kind--stash    { background: rgba(255,180,80,0.15);  color: #ffc97a; border-color: rgba(255,180,80,0.30); }
.loc-kind--trunk    { background: rgba(180,140,255,0.15); color: #d4bcff; border-color: rgba(180,140,255,0.30); }
.loc-kind--glovebox { background: rgba(120,200,170,0.15); color: #a8dcc4; border-color: rgba(120,200,170,0.30); }
.lb-loc-name { font-size: 13px; }


/* === Economy dashboard ============================================== */
.econ-verdict {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 12px 0 18px;
  border: 1px solid rgba(255,255,255,0.10);
}
.econ-verdict__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 18px; font-weight: 700;
}
.econ-verdict__level { font-size: 18px; font-weight: 700; letter-spacing: 0.04em; }
.econ-verdict__reasons { font-size: 13px; color: var(--fg-muted, #99a3b3); margin-top: 2px; }
.econ-verdict--loading { background: rgba(255,255,255,0.03); }
.econ-verdict--good     { background: rgba(80,180,120,0.10);  border-color: rgba(80,180,120,0.30); }
.econ-verdict--good     .econ-verdict__icon { background: rgba(80,180,120,0.25);  color: rgb(110,210,150); }
.econ-verdict--warning  { background: rgba(255,190,80,0.10);  border-color: rgba(255,190,80,0.30); }
.econ-verdict--warning  .econ-verdict__icon { background: rgba(255,190,80,0.25);  color: rgb(255,210,130); }
.econ-verdict--critical { background: rgba(220,90,90,0.12);   border-color: rgba(220,90,90,0.35); }
.econ-verdict--critical .econ-verdict__icon { background: rgba(220,90,90,0.30);   color: rgb(255,140,140); }

.econ-recs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.econ-rec {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 16px;
}
.econ-rec--high     { border-left: 3px solid rgb(255,120,120); }
.econ-rec--medium   { border-left: 3px solid rgb(255,200,120); }
.econ-rec--low      { border-left: 3px solid rgb(140,170,220); }
.econ-rec__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.econ-rec__rank { font-family: monospace; color: var(--fg-muted, #99a3b3); font-size: 12px; }
.econ-rec__sev {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 4px; border: 1px solid;
}
.econ-rec__sev--high   { color: rgb(255,140,140); background: rgba(220,90,90,0.18); border-color: rgba(220,90,90,0.40); }
.econ-rec__sev--medium { color: rgb(255,210,130); background: rgba(255,190,80,0.15); border-color: rgba(255,190,80,0.40); }
.econ-rec__sev--low    { color: rgb(170,200,240); background: rgba(140,170,220,0.15); border-color: rgba(140,170,220,0.40); }
.econ-rec__title { font-weight: 600; font-size: 15px; flex: 1; }
.econ-rec__impact { font-family: monospace; color: var(--fg-muted, #99a3b3); font-size: 12px; }
.econ-rec__body { font-size: 13px; line-height: 1.5; }
.econ-rec__body strong { color: var(--fg, #fff); }
.econ-rec__why    { margin-bottom: 4px; }

.econ-supply-grid, .econ-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.econ-flow-grid { grid-template-columns: 1fr 1fr; }
.econ-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 18px;
}
.econ-card__title {
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-muted, #99a3b3); margin-bottom: 10px;
}
.econ-supply-rows { display: flex; flex-direction: column; gap: 4px; }
.econ-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.econ-row--total {
  border-top: 1px solid rgba(255,255,255,0.10);
  margin-top: 6px; padding-top: 8px;
  font-weight: 600; font-size: 14px;
}
.econ-row--pos .mono { color: rgb(110,210,150); }
.econ-row--neg .mono { color: rgb(240,120,120); }

.econ-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.econ-table th { text-align: left; font-size: 11px; letter-spacing: 0.04em; color: var(--fg-muted, #99a3b3); padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.econ-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.econ-table .right { text-align: right; }
.econ-cls-pill {
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  padding: 2px 6px; border-radius: 3px; border: 1px solid rgba(255,255,255,0.10);
}
.econ-cls-pill--faucet  { background: rgba(80,180,120,0.18);  color: rgb(110,210,150); border-color: rgba(80,180,120,0.30); }
.econ-cls-pill--sink    { background: rgba(220,90,90,0.18);   color: rgb(240,120,120); border-color: rgba(220,90,90,0.30); }
.econ-cls-pill--neutral { background: rgba(140,150,170,0.15); color: rgb(170,180,200); border-color: rgba(140,150,170,0.30); }
.econ-cls-pill--unknown { background: rgba(255,200,80,0.12);  color: rgb(255,210,130); border-color: rgba(255,200,80,0.30); }
.econ-cls-pill--store   { background: rgba(150,110,220,0.18); color: rgb(190,150,250); border-color: rgba(150,110,220,0.30); }

.econ-top-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.econ-top-list li {
  display: grid;
  grid-template-columns: 36px 1fr 130px 160px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  font-size: 13px;
}
.econ-rank { color: var(--fg-muted, #99a3b3); font-weight: 700; font-family: monospace; }
.econ-name { font-weight: 500; }
.econ-amt  { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .econ-supply-grid { grid-template-columns: 1fr; }
  .econ-flow-grid { grid-template-columns: 1fr; }
  .econ-top-list li { grid-template-columns: 36px 1fr 100px; }
  .econ-top-list li .mono.muted { display: none; }
}

/* === Inventory dashboard ============================================ */
.inv-form {
  display: flex; gap: 8px; align-items: center;
  margin: 16px 0 8px;
}
.inv-form input[type="text"] { flex: 1; padding: 8px 12px; font-size: 14px; }
.inv-form select { padding: 8px 12px; font-size: 14px; }
.inv-form button {
  padding: 8px 18px; font-size: 14px;
  background: rgba(120,168,255,0.20); color: #cfe0ff;
  border: 1px solid rgba(120,168,255,0.40); border-radius: 6px;
  cursor: pointer;
}
.inv-form button:hover { background: rgba(120,168,255,0.30); }

.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}
.inv-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-muted, #99a3b3);
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  text-transform: uppercase;
}
.inv-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.inv-table .right { text-align: right; }
.inv-table tr:hover { background: rgba(255,255,255,0.025); }

.loc-kind--house    { background: rgba(140,200,140,0.15); color: #b0e0b0; border-color: rgba(140,200,140,0.30); }
.loc-kind--backpack { background: rgba(255,150,100,0.15); color: #ffba90; border-color: rgba(255,150,100,0.30); }

.inv-detail {
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
}
.inv-detail__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.inv-detail h3 { margin: 0; font-size: 16px; }


/* === /gangs ============================================================= */
.gangs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}
@media (max-width: 1100px) { .gangs-grid { grid-template-columns: 1fr; } }

.gang-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gang-card--empty { opacity: 0.65; }
.gang-card__head h2 { margin: 0; font-size: 17px; }
.gang-card__meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-size: 12px;
  margin-top: 4px;
}
.gang-totals { color: var(--fg-muted, #99a3b3); font-variant-numeric: tabular-nums; }

.gang-roster {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.gang-roster th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--fg-muted, #99a3b3);
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-transform: uppercase;
}
.gang-roster td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.grade-num {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 5px;
  background: rgba(120,168,255,0.12);
  color: #a8c4ff;
  border: 1px solid rgba(120,168,255,0.25);
  border-radius: 3px;
}
.boss-pill {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255,180,80,0.18);
  color: #ffc97a;
  border: 1px solid rgba(255,180,80,0.32);
  margin-left: 4px;
}
.warn-pill {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255,140,80,0.18);
  color: #ffb070;
  border: 1px solid rgba(255,140,80,0.32);
}

.gang-card__storage {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}
.gang-card__storage summary {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted, #99a3b3);
  padding: 4px 0;
  user-select: none;
}
.gang-card__storage summary:hover { color: var(--fg, #fff); }

.gang-storage {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
}
.gang-storage__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}
.storage-summary { display: flex; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; font-size: 12px; }
.ssum-cash    { color: rgb(110,210,150); }
.ssum-weapons { color: rgb(220,170,120); }
.ssum-drugs   { color: rgb(200,140,220); }
.gang-storage__body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px;
  font-size: 12px;
}
.storage-item {
  display: flex; justify-content: space-between;
  padding: 2px 6px;
  background: rgba(255,255,255,0.015);
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.storage-count { color: var(--fg-muted, #99a3b3); margin-left: 6px; }
.storage-more  { padding: 6px; text-align: center; }
.gang-storage-empty {
  padding: 8px 12px;
  background: rgba(255,255,255,0.015);
  border: 1px dashed rgba(255,255,255,0.06);
  border-radius: 8px;
  margin-top: 6px;
  font-size: 12px;
}
.gang-storage-empty code {
  background: rgba(255,255,255,0.05);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}


/* === /deaths ============================================================ */
.death-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}
.death-stats__body { font-size: 14px; }
.death-total { font-size: 22px; margin-bottom: 6px; }
.death-breakdown { display: flex; gap: 14px; flex-wrap: wrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.death-breakdown span { color: var(--fg-muted, #99a3b3); }
.death-breakdown strong { color: var(--fg, #fff); }
.death-filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.death-leaderboards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
@media (max-width: 1100px) {
  .death-stats, .death-leaderboards { grid-template-columns: 1fr; }
}


/* === player session timeline ============================================ */
.player-timeline-section {
  margin-top: 24px;
}
.player-timeline-section summary {
  cursor: pointer;
  padding: 8px 0;
  user-select: none;
}
.player-timeline-section summary:hover h2 { color: #cfe0ff; }
.timeline-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.tl-row {
  display: grid;
  grid-template-columns: 110px 160px 130px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.015);
  border-left: 2px solid transparent;
  border-radius: 4px;
}
.tl-row.sev-critical { border-left-color: rgb(255,120,120); background: rgba(220,90,90,0.05); }
.tl-row.sev-high     { border-left-color: rgb(255,200,120); }
.tl-row.sev-medium   { border-left-color: rgb(220,200,140); }
.tl-row.sev-low      { border-left-color: rgb(140,170,220); }
.tl-row.sev-info     { border-left-color: rgba(140,150,170,0.30); }
.tl-row:hover { background: rgba(255,255,255,0.04); }
.tl-time { color: var(--fg-muted, #99a3b3); white-space: nowrap; }
.tl-type { font-family: monospace; font-size: 11px; color: var(--fg-muted, #99a3b3); }
.tl-source { white-space: nowrap; opacity: 0.7; }
.tl-body { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-amt { font-family: monospace; font-weight: 600; color: rgb(110,210,150); margin-left: 6px; }
.tl-reason { font-style: italic; color: var(--fg-muted, #99a3b3); margin-left: 6px; }
.tl-cp { font-size: 11px; margin-left: 6px; }
.tl-detail { font-size: 11px; opacity: 0.7; }
.tl-detail:hover { opacity: 1; }
@media (max-width: 1100px) {
  .tl-row { grid-template-columns: 90px 1fr auto; }
  .tl-row .tl-source, .tl-row .tl-type { display: none; }
}


/* === /live legend ====================================================== */
.live-legend {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 12px 0;
  padding: 10px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.live-legend__label { margin-right: 6px; }
.live-legend__pill {
  font-family: monospace;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--cat-color, #888);
  border: 1px solid var(--cat-color, #888);
  background: color-mix(in srgb, var(--cat-color, #888) 10%, transparent);
}

/* === /reports ========================================================== */
.reports-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.report-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 14px;
}
.report-card.is-open { border-left: 3px solid rgb(255,200,120); }
.report-card.is-closed { opacity: 0.65; }
.report-card__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
}
.report-card__body {
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  padding: 4px 0;
}
.report-reporter { font-weight: 500; }


/* === /invlog ============================================================ */
.invlog-controls {
  display: flex; gap: 12px; align-items: center;
  margin: 12px 0;
  flex-wrap: wrap;
}
.invlog-search {
  flex: 1;
  min-width: 220px;
  padding: 8px 12px;
  font-size: 13px;
}
.weapon-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(220,90,90,0.18);
  color: #f3a5a5;
  border: 1px solid rgba(220,90,90,0.30);
  vertical-align: 1px;
  margin-left: 2px;
}


/* === death weapon detail sub-line ====================================== */
.death-weapon-detail {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.3;
}


/* === /invlog sentence-style cleanup ==================================== */
.invlog-what {
  font-size: 13px;
  line-height: 1.5;
}
.loc-inline {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 2px;
  vertical-align: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.10);
}
.loc-inline.loc-kind--trunk    { background: rgba(180,140,255,0.18); color: #d4bcff; border-color: rgba(180,140,255,0.30); }
.loc-inline.loc-kind--glovebox { background: rgba(120,200,170,0.18); color: #a8dcc4; border-color: rgba(120,200,170,0.30); }
.loc-inline.loc-kind--stash    { background: rgba(255,180,80,0.18);  color: #ffc97a; border-color: rgba(255,180,80,0.30); }
.loc-inline.loc-kind--house    { background: rgba(140,200,140,0.18); color: #b0e0b0; border-color: rgba(140,200,140,0.30); }
.loc-inline.loc-kind--backpack { background: rgba(255,150,100,0.18); color: #ffba90; border-color: rgba(255,150,100,0.30); }
.loc-inline.loc-kind--drop     { background: rgba(140,170,220,0.18); color: #aac4ee; border-color: rgba(140,170,220,0.30); }
.loc-inline.loc-kind--player   { background: rgba(110,162,255,0.18); color: #a8c4ff; border-color: rgba(110,162,255,0.30); }
