@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #1a1a1a;
  --surface:    #222222;
  --surface-2:  #2a2a2a;
  --border:     #333333;
  --text:       #dddddd;
  --text-muted: #888888;
  --accent:     #4a9eff;
  --green:      #4caf50;
  --red:        #e05252;
  --amber:      #e0a020;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

/* ── TOP BAR ── */
.topbar {
  height: 44px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.org-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  padding-right: 16px;
  border-right: 1px solid var(--border);
}

.page-title {
  font-size: 13px;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── NAV ── */
nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  padding: 0 16px;
}

.nav-item {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  display: inline-block;
}

.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--text); border-bottom-color: var(--accent); }

/* ── LAYOUT ── */
.layout {
  display: flex;
  height: calc(100vh - 44px - 38px);
}

.sidebar {
  width: 180px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 12px 0;
}

.sidebar-section {
  padding: 0 10px;
  margin-bottom: 16px;
}

.sidebar-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 6px;
  margin-bottom: 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
}

.sidebar-item:hover { background: var(--surface-2); color: var(--text); }
.sidebar-item.active { background: var(--surface-2); color: var(--text); }

.sidebar-count {
  font-size: 11px;
  color: var(--text-muted);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* ── STAT ROW ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--surface);
}

.stat-cell {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}

.stat-cell:last-child { border-right: none; }

.stat-cell-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-cell-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.stat-cell-value.highlight { color: var(--accent); }

.stat-cell-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── PANEL ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.panel-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.panel-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── DETECTIVE STRIP ── */
.det-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.det-cell {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

.det-cell:last-child { border-right: none; }

.det-cell-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.det-cell-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ── CHARTS ── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-wrap { height: 200px; padding: 14px; }

/* ── TABLE ── */
table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: var(--surface-2);
}

th {
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}

tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

.mono { font-family: monospace; font-size: 11px; color: var(--text-muted); }
.det-link { color: var(--accent); }

.type-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
}

.tag-narc    { background: rgba(224,82,82,0.15);  color: var(--red); }
.tag-cash    { background: rgba(76,175,80,0.15);  color: var(--green); }
.tag-weapons { background: rgba(224,82,82,0.15);  color: var(--red); }
.tag-ammo    { background: rgba(224,160,32,0.15); color: var(--amber); }

/* ── SCROLLBAR ── */
.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
