/* ── CertTracker: Executive Dark Theme ────────────────────────────────── */
:root {
  --bg-primary: #0b0e14;
  --bg-secondary: #131720;
  --bg-card: #181d28;
  --bg-card-hover: #1e2433;
  --border: #252b3a;
  --text-primary: #e8eaf0;
  --text-secondary: #8a91a4;
  --text-muted: #5a6178;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --green: #22c55e;
  --green-bg: rgba(34,197,94,0.12);
  --yellow: #eab308;
  --yellow-bg: rgba(234,179,8,0.12);
  --red: #ef4444;
  --red-bg: rgba(239,68,68,0.12);
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

* { box-sizing: border-box; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Navbar ──────────────────────────────────────────────────────────── */
.navbar-dark-custom {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem;
}
.navbar-dark-custom .navbar-brand {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
}
.navbar-dark-custom .nav-link {
  color: var(--text-secondary) !important;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  transition: color 0.15s;
}
.navbar-dark-custom .nav-link:hover,
.navbar-dark-custom .nav-link.active {
  color: var(--text-primary) !important;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────── */
.breadcrumb-custom {
  background: transparent;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
}
.breadcrumb-custom a {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumb-custom .sep {
  color: var(--text-muted);
  margin: 0 0.4rem;
}
.breadcrumb-custom .current {
  color: var(--text-secondary);
}

/* ── KPI Cards ───────────────────────────────────────────────────────── */
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  transition: border-color 0.15s;
}
.kpi-card:hover {
  border-color: var(--accent);
}
.kpi-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.2;
}

/* ── Status Colors ───────────────────────────────────────────────────── */
.status-green { color: var(--green); }
.status-yellow { color: var(--yellow); }
.status-red { color: var(--red); }
.bg-status-green { background: var(--green-bg); border-left: 3px solid var(--green); }
.bg-status-yellow { background: var(--yellow-bg); border-left: 3px solid var(--yellow); }
.bg-status-red { background: var(--red-bg); border-left: 3px solid var(--red); }

.badge-green { background: var(--green); color: #000; font-size: 0.7rem; }
.badge-yellow { background: var(--yellow); color: #000; font-size: 0.7rem; }
.badge-red { background: var(--red); color: #fff; font-size: 0.7rem; }
.badge-muted { background: var(--text-muted); color: #fff; font-size: 0.7rem; }

/* ── Cards / Panels ──────────────────────────────────────────────────── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Tables ───────────────────────────────────────────────────────────── */
.table-dark-custom {
  background: transparent;
  color: var(--text-primary);
  font-size: 0.82rem;
}
.table-dark-custom th {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  background: var(--bg-secondary);
}
.table-dark-custom td {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  vertical-align: middle;
}
.table-dark-custom tbody tr:hover {
  background: var(--bg-card-hover);
}

/* ── Progress Bars ───────────────────────────────────────────────────── */
.progress-custom {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}
.progress-custom .bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ── Forms ────────────────────────────────────────────────────────────── */
.form-control, .form-select {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  font-size: 0.85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2) !important;
}
.form-label {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-check-input {
  background-color: var(--bg-secondary);
  border-color: var(--border);
}
.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn-exec {
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.btn-exec:hover { background: var(--accent-hover); color: #fff; }

.btn-outline-exec {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  transition: all 0.15s;
}
.btn-outline-exec:hover { background: var(--accent); color: #fff; }

.btn-danger-exec {
  background: var(--red);
  color: #fff;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 6px;
}
.btn-danger-exec:hover { background: #dc2626; color: #fff; }

.btn-sm-icon {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* ── Alerts / Banners ────────────────────────────────────────────────── */
.alert-exec-red {
  background: var(--red-bg);
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
}
.alert-exec-yellow {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow);
  color: var(--yellow);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
}

/* ── Score dots ──────────────────────────────────────────────────────── */
.score-dots {
  display: flex;
  gap: 4px;
}
.score-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
}
.score-dot.filled { background: var(--accent); }

/* ── Section header ──────────────────────────────────────────────────── */
.section-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

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

/* ── Page header ─────────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0;
}
.page-header .sub {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .kpi-value { font-size: 1.3rem; }
  .panel { padding: 1rem; }
  .table-dark-custom { font-size: 0.75rem; }
}

/* ── Misc ────────────────────────────────────────────────────────────── */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
.text-muted-custom { color: var(--text-muted) !important; }
.mono { font-family: var(--font-mono); }
