/* ── Base ────────────────────────────────────────────────── */
body {
  font-size: 0.875rem;
}

/* ── Dark mode ───────────────────────────────────────────── */
[data-bs-theme="dark"] {
  color-scheme: dark;
}

[data-bs-theme="dark"] body {
  background-color: #212529;
  color: #dee2e6;
}

[data-bs-theme="dark"] .card {
  background-color: #2b2f33;
  border-color: #495057;
  color: #dee2e6;
}

[data-bs-theme="dark"] .card-header {
  background-color: #343a40;
  border-color: #495057;
  color: #dee2e6;
}

[data-bs-theme="dark"] .card-body {
  background-color: #2b2f33;
}

[data-bs-theme="dark"] .list-group-item {
  background-color: #2b2f33;
  border-color: #495057;
  color: #dee2e6;
}

[data-bs-theme="dark"] .table {
  --bs-table-bg: #212529;
  --bs-table-striped-bg: #2c3034;
  --bs-table-hover-bg: #32383e;
  --bs-table-border-color: #495057;
  color: #dee2e6;
  border-color: #495057;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #2b2f33;
  border-color: #495057;
  color: #dee2e6;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #2b2f33;
  color: #dee2e6;
}

[data-bs-theme="dark"] .input-group-text {
  background-color: #343a40;
  border-color: #495057;
  color: #dee2e6;
}

[data-bs-theme="dark"] .dropdown-menu {
  background-color: #343a40;
  border-color: #495057;
}

[data-bs-theme="dark"] .dropdown-item {
  color: #dee2e6;
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background-color: #495057;
  color: #fff;
}

[data-bs-theme="dark"] .alert-danger {
  background-color: #4a1f1f;
  border-color: #842029;
  color: #f8d7da;
}

/* ── Status badges ───────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 0.2em 0.55em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  text-transform: capitalize;
}

.status-identified  { background: #dbeafe; color: #1e40af; }
.status-scoping     { background: #fef9c3; color: #854d0e; }
.status-in_progress { background: #dcfce7; color: #166534; }
.status-ingested    { background: #bbf7d0; color: #14532d; }
.status-blocked     { background: #fee2e2; color: #991b1b; }
.status-deprecated  { background: #f1f5f9; color: #64748b; }

/* ── Priority score ──────────────────────────────────────── */
.priority-score        { font-weight: 700; font-size: 0.85rem; }
.score-high            { color: #16a34a; }
.score-medium          { color: #d97706; }
.score-low             { color: #dc2626; }

/* ── Theme-adaptive table header ────────────────────────── */
.dsr-thead th {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-emphasis-color);
  border-color: var(--bs-border-color);
}

/* ── Compact extras ──────────────────────────────────────── */
.btn-xs {
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.4;
  border-radius: 0.2rem;
}

.x-small { font-size: 0.75rem; }

.form-label-sm { font-size: 0.8rem; font-weight: 500; margin-bottom: 0.2rem; }

/* Required asterisk */
label.required::after,
.required::after { content: " *"; color: #dc2626; }

/* ── Inline status select in table ───────────────────────── */
.status-inline {
  min-width: 115px;
  font-size: 0.78rem;
  padding: 0.15rem 0.4rem;
}

/* ── Notes pre-block ─────────────────────────────────────── */
.notes-pre {
  font-family: inherit;
  font-size: 0.82rem;
  white-space: pre-wrap;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border-radius: 4px;
}

/* ── Activity feed ───────────────────────────────────────── */
.list-group-item .x-small { color: #6c757d; }

/* ── Navbar active link ──────────────────────────────────── */
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover { color: #fff !important; }
