/* ── Base ──────────────────────────────────────────────────────────────── */
:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1e2530;
  --border: #30363d;
  --c2024: #3b82f6;
  --c2025: #a78bfa;
  --c2026: #34d399;
  --cgrow: #f59e0b;
}

body {
  background: var(--bg);
  color: #e6edf3;
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
}

/* ── Navbar ────────────────────────────────────────────────────────────── */
.bi-navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
}

/* ── Status dot ────────────────────────────────────────────────────────── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-ok      { background: #22c55e; }
.status-loading { background: #f59e0b; animation: pulse 1.2s infinite; }
.status-error   { background: #ef4444; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.card-header {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  border-radius: 12px 12px 0 0 !important;
  padding: 0.75rem 1rem;
}

/* ── KPI Cards ─────────────────────────────────────────────────────────── */
.kpi-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s;
}
.kpi-card:hover { transform: translateY(-2px); }

.kpi-accent {
  height: 3px;
  width: 100%;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0.25rem 0;
  line-height: 1.2;
}

.kpi-sub {
  font-size: 0.75rem;
  color: #8b949e;
}

/* ── Insight cards ─────────────────────────────────────────────────────── */
.insight-card {
  border-radius: 10px;
  border-left: 3px solid;
  background: var(--surface);
  padding: 0.9rem 1rem;
  font-size: 0.875rem;
}
.insight-card.success { border-color: #22c55e; }
.insight-card.danger  { border-color: #ef4444; }
.insight-card.info    { border-color: #3b82f6; }
.insight-card.warning { border-color: #f59e0b; }

.insight-card .insight-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

/* ── Chart containers ──────────────────────────────────────────────────── */
.chart-container {
  position: relative;
  height: 280px;
}

/* ── Table ─────────────────────────────────────────────────────────────── */
.table {
  color: #e6edf3;
  margin: 0;
}

.table thead th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b949e;
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0.9rem;
  white-space: nowrap;
}

.table tbody td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #21262d;
  vertical-align: middle;
  font-size: 0.875rem;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tfoot td {
  padding: 0.65rem 0.9rem;
  border-top: 2px solid var(--border);
  font-size: 0.875rem;
}

.pct-col { min-width: 110px; }

.font-mono { font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: 0.85rem; }

.badge-up   { color: #22c55e; font-size: 0.8rem; }
.badge-down { color: #ef4444; font-size: 0.8rem; }
.badge-neu  { color: #8b949e; font-size: 0.8rem; }

/* ── AI content ────────────────────────────────────────────────────────── */
.ai-content {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text);
}
.ai-section-title {
  color: #f59e0b;
  font-weight: 700;
  font-size: .95rem;
  margin-top: 1.25rem;
  margin-bottom: .4rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid var(--border);
}
.ai-list {
  padding-left: 1.25rem;
  margin: .4rem 0;
}
.ai-list li { margin-bottom: .25rem; }

/* ── Section title ─────────────────────────────────────────────────────── */
.section-title {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding-top: .25rem;
  border-top: 1px solid var(--border);
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
