:root {
  --bg: #0f1419;
  --panel: #171e26;
  --line: #2a3440;
  --text: #e8edf2;
  --muted: #8b98a5;
  --accent: #2f6fed;
  --ok: #2f9e6b;
  --warn: #c48a1a;
  --crit: #c4473a;
}

body { background: var(--bg); color: var(--text); font-family: "Segoe UI", system-ui, sans-serif; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: #12181f; border-right: 1px solid var(--line); padding: 20px 14px; }
.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 28px; }
.brand-mark { width: 36px; height: 36px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.brand-name { font-weight: 650; }
.brand-sub { color: var(--muted); font-size: 12px; }
.sidebar .nav-link { color: var(--muted); padding: 8px 10px; border-radius: 4px; }
.sidebar .nav-link.active { background: #1d2836; color: var(--text); }
.sidebar .nav-link.disabled { opacity: 0.45; }
.main { flex: 1; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 20px; margin: 0; }
.badge-phase { border: 1px solid var(--line); color: var(--muted); padding: 4px 8px; font-size: 12px; }
.content { padding: 24px 28px 48px; }
.panel { background: var(--panel); border: 1px solid var(--line); padding: 18px; }
.panel-title { font-weight: 650; margin-bottom: 10px; }
.muted { color: var(--muted); }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--panel); border: 1px solid var(--line); padding: 14px; }
.kpi-value { font-size: 28px; font-weight: 650; }
.kpi-label { color: var(--muted); font-size: 12px; }
.table { color: var(--text); }
.table > :not(caption) > * > * { background: transparent; color: var(--text); border-color: var(--line); }
.form-control, .form-control:focus { background: #10161c; color: var(--text); border-color: var(--line); }
.btn-primary { background: var(--accent); border: 0; }
.issue { border-left: 3px solid var(--line); padding: 8px 10px; margin-bottom: 8px; background: #12181f; }
.issue-warning { border-left-color: var(--warn); }
.issue-critical { border-left-color: var(--crit); }
.issue-info { border-left-color: var(--accent); }
.status-available { color: var(--ok); }
.status-partial { color: var(--warn); }
.status-empty { color: var(--muted); }
.session-list a { color: var(--text); text-decoration: none; }
.mapper-lead { max-width: 820px; margin-bottom: 18px; }
.mapper-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mapper-actions .btn-outline-light { border-color: var(--line); color: var(--text); }
.table-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); }
.mapper-table thead th { position: sticky; top: 0; background: #171e26; z-index: 1; }
.mapper-table td, .mapper-table th { vertical-align: middle; }
.mapper-error { color: var(--crit); }
.form-label { color: var(--muted); }
.form-check-label { color: var(--text); }
.form-check-input { background: #10161c; border-color: var(--line); }
.login-body { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(420px, calc(100% - 32px)); background: var(--panel); border: 1px solid var(--line); padding: 28px; }
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { width: 100%; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
}
