:root {
  --bg: #0c1117;
  --bg-alt: #131a22;
  --panel: #171f29;
  --panel-soft: #1d2733;
  --border: #2a3645;
  --text: #eef4fa;
  --muted: #90a0b6;
  --accent: #4cc9f0;
  --accent-soft: rgba(76, 201, 240, 0.12);
  --ok: #39d98a;
  --warn: #ffb020;
  --bad: #ff5d73;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(76, 201, 240, 0.08), transparent 22%),
    linear-gradient(180deg, #0b1016, #0e141b 35%, #0b1016);
  color: var(--text);
  font: 14px/1.5 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  padding: 28px 20px;
  border-right: 1px solid var(--border);
  background: rgba(8, 12, 16, 0.76);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand h1 { margin: 6px 0 10px; font-size: 1.55rem; }
.brand p, .metric-sub, .muted, .empty-state { color: var(--muted); }
.brand-kicker, .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
}
.nav { display: grid; gap: 8px; margin: 28px 0; }
.nav-link {
  border: 1px solid transparent;
  padding: 11px 14px;
  border-radius: 14px;
  color: var(--muted);
  transition: 160ms ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  border-color: var(--border);
  background: var(--panel);
}
.sidebar-card, .card {
  background: linear-gradient(180deg, rgba(26, 34, 44, 0.98), rgba(18, 24, 31, 0.98));
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.sidebar-card { padding: 16px; margin-bottom: 14px; }
.content { padding: 28px; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-header h2 { margin: 6px 0 0; font-size: 2rem; }
.header-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { padding: 18px; }
.card-title {
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: #c4d0df;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.metric-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.metric-value { margin-top: 8px; font-size: 2rem; font-weight: 700; }
.metric-value.small { font-size: 1.25rem; }
.stat + .stat { margin-top: 12px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.badge-ok { background: rgba(57, 217, 138, 0.16); color: var(--ok); }
.badge-warn { background: rgba(255, 176, 32, 0.16); color: var(--warn); }
.badge-bad { background: rgba(255, 93, 115, 0.16); color: var(--bad); }
.badge-dim { background: rgba(144, 160, 182, 0.12); color: var(--muted); }
.list, .kv-list { display: grid; gap: 10px; }
.list-row, .kv-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
}
.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.room-card { padding: 14px; border-radius: 16px; background: var(--panel-soft); border: 1px solid var(--border); }
.room-name { font-weight: 700; margin-bottom: 8px; }
.room-meta { color: var(--muted); font-size: 0.9rem; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.quick-link {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  transition: 160ms ease;
}
.quick-link:hover, .table-link:hover, .copy-button:hover {
  border-color: rgba(76, 201, 240, 0.45);
  background: var(--accent-soft);
}
.toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search, .select {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(7, 10, 13, 0.78);
  color: var(--text);
  padding: 0 14px;
}
.search { min-width: 300px; flex: 1; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.copy-button, .table-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: 160ms ease;
}
.topic-count {
  display: inline-flex;
  min-width: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
}
.code-block {
  margin: 0;
  white-space: pre-wrap;
  padding: 14px;
  border-radius: 16px;
  background: rgba(5, 8, 11, 0.9);
  border: 1px solid var(--border);
}
.hidden { display: none !important; }
@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .content { padding: 18px; }
  .page-header { flex-direction: column; align-items: start; }
}
