/* ============================================================
   StrataHub — Custom Design System
   ============================================================ */

/* ── Brand palette ── */
:root {
  --sh-teal:        #4AABB8;
  --sh-teal-dark:   #357f8a;
  --sh-teal-light:  #e8f6f8;
  --sh-coral:       #E8A898;
  --sh-coral-dark:  #c97d6a;
  --sh-slate:       #2a4365;
  --sh-slate-light: #f0f4f8;

  /* Override Bootstrap semantic colours */
  --bs-primary:          #4AABB8;
  --bs-primary-rgb:      74, 171, 184;
  --bs-link-color:       #357f8a;
  --bs-link-hover-color: #2a6570;

  /* Legacy Bootstrap "success" green (#198754) is off-brand — remap to
     brand teal so success badges (.bg-success / .text-success) render teal. */
  --bs-success:          #4AABB8;
  --bs-success-rgb:      74, 171, 184;
}

/* ── Typography ── */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
}

.form-label {
  font-weight: 500;
}

/* ── Primary button — teal ── */
.btn-primary {
  background-color: var(--sh-teal);
  border-color: var(--sh-teal);
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  background-color: var(--sh-teal-dark);
  border-color: var(--sh-teal-dark);
  color: #fff;
}

/* ── Outline-primary — teal ── */
.btn-outline-primary {
  color: var(--sh-teal);
  border-color: var(--sh-teal);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--sh-teal);
  border-color: var(--sh-teal);
  color: #fff;
}

/* ── Success button — teal ──
   Bootstrap 5.3 hardcodes #198754 in .btn-success's own scoped CSS vars
   (it does not read --bs-success), so remap those vars to brand teal here.
   Colour only — structure, size, and placement are untouched. */
.btn-success {
  --bs-btn-bg:                   var(--sh-teal);
  --bs-btn-border-color:         var(--sh-teal);
  --bs-btn-hover-bg:             var(--sh-teal-dark);
  --bs-btn-hover-border-color:   var(--sh-teal-dark);
  --bs-btn-active-bg:            var(--sh-teal-dark);
  --bs-btn-active-border-color:  var(--sh-teal-dark);
  --bs-btn-disabled-bg:          var(--sh-teal);
  --bs-btn-disabled-border-color: var(--sh-teal);
}

/* ── Outline-success — teal ── */
.btn-outline-success {
  --bs-btn-color:                var(--sh-teal);
  --bs-btn-border-color:         var(--sh-teal);
  --bs-btn-hover-bg:             var(--sh-teal);
  --bs-btn-hover-border-color:   var(--sh-teal);
  --bs-btn-active-bg:            var(--sh-teal);
  --bs-btn-active-border-color:  var(--sh-teal);
}

/* ── Navbar ── */
.navbar-stratahub {
  background-color: var(--sh-slate-light);
  border-bottom: 1px solid #dde3ea;
}
.navbar-stratahub .nav-link,
.navbar-stratahub .navbar-brand {
  color: var(--sh-slate) !important;
}
.navbar-stratahub .nav-link:hover,
.navbar-stratahub .nav-link:focus {
  color: var(--sh-teal-dark) !important;
}
.navbar-stratahub .nav-link.active {
  color: var(--sh-teal-dark) !important;
  font-weight: 600;
}
.navbar-stratahub .dropdown-menu {
  background-color: #fff;
  border: 1px solid #dde3ea;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.navbar-stratahub .dropdown-item {
  color: var(--sh-slate);
}
.navbar-stratahub .dropdown-item:hover,
.navbar-stratahub .dropdown-item:focus {
  background-color: var(--sh-slate-light);
  color: var(--sh-slate);
}
.navbar-stratahub .dropdown-item.active {
  background-color: var(--sh-teal);
  color: #fff;
}

/* ── Page header ── */
.page-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.page-header h1,
.page-header h2 {
  margin-bottom: 0;
  font-size: 1.5rem;
  color: var(--sh-slate);
}

/* ── Card headers ── */
.card-header {
  background-color: var(--sh-slate-light);
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
  color: var(--sh-slate);
  padding: 0.75rem 1.25rem;
}

/* ── Tables ── */
.table thead th {
  background-color: var(--sh-slate-light);
  color: var(--sh-slate);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #dee2e6;
}
.table td,
.table th {
  vertical-align: middle;
}
.table-hover tbody tr:hover {
  background-color: var(--sh-teal-light);
  cursor: default;
}

/* ── Table column wrapping (issue #331 + follow-up) ──
   The original #331 fix let *every* cell wrap to stop horizontal overflow, but
   that also broke headers and button labels mid-word ("Categ orise", "AMO UNT").

   The rule is inverted here: nothing in a table wraps by default — headers,
   amounts, dates, status badges, short codes and action buttons all stay on a
   single line and widen their column if needed. Free-text columns opt back in
   explicitly with .col-wrap, so only descriptions / notes / names / long bank
   references wrap. Those flexible columns absorb the slack, keeping the table
   inside the viewport while everything else stays unbroken.

   This lives entirely in the global stylesheet; templates only add the
   .col-wrap class to the cells that should wrap. */
.table th,
.table td {
  white-space: nowrap;
}
.table th.col-wrap,
.table td.col-wrap {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* Buttons never wrap mid-word, even if they sit in a .col-wrap cell. */
.table td .btn {
  white-space: nowrap;
}

/* ── Stat cards (dashboard KPIs) ── */
.stat-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s ease;
}
.stat-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  /* Figures must never wrap onto a second line (#329). */
  white-space: nowrap;
}
.stat-card .stat-label {
  font-size: 0.8125rem;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}
.stat-card.stat-outstanding .stat-value { color: var(--sh-teal); }
.stat-card.stat-overdue     .stat-value { color: var(--sh-coral-dark); }
.stat-card.stat-neutral     .stat-value { color: var(--sh-slate); }
.stat-card.stat-danger      .stat-value { color: var(--sh-coral-dark); }

/* Combined outstanding · overdue card (#329): one line, both figures coloured. */
.stat-card.stat-combined .stat-value {
  font-size: 1.5rem;
}
.stat-card.stat-combined .stat-outstanding-val { color: var(--sh-teal); }
.stat-card.stat-combined .stat-overdue-val { color: var(--sh-coral-dark); }
.stat-card.stat-combined .stat-label-inline {
  font-size: 0.9rem;
  font-weight: 500;
  color: #6c757d;
  text-transform: none;
  letter-spacing: 0;
}
.stat-card.stat-combined .stat-sep {
  color: #adb5bd;
  margin: 0 0.35rem;
}

/* ── Conditional action cards (dashboard #320) ──
   Each renders only when there's something to act on; the whole card is a deep
   link into its feature, with a left accent rail coloured by urgency. */
.action-card {
  display: block;
  color: inherit;
  border: none;
  border-left: 4px solid var(--sh-slate);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.action-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
  color: inherit;
}
.action-card .action-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
}
.action-card .action-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.15rem;
  color: var(--sh-slate);
}
.action-card .action-card-meta {
  font-size: 0.8125rem;
  color: #6c757d;
  margin-top: 0.25rem;
}
.action-card--danger  { border-left-color: var(--sh-coral-dark); }
.action-card--danger  .action-card-value { color: var(--sh-coral-dark); }
.action-card--warning { border-left-color: #d9a406; }
.action-card--info    { border-left-color: var(--sh-teal); }

/* ── Dashboard body (#329) ──
   Action cards reflow in the flexible left column; the Scheme Overview panel is
   a fixed-width right-hand column (scheme state on top, unit health below). */
.dashboard-body {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}
.dashboard-actions {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Space between action cards row and activity row */
}
/* Match the global card spacing so stacked layout keeps consistent gaps. */
.dashboard-actions {
  margin-bottom: 1.5rem;
}

/* Force a matching top gap for the Activity row in the actions column. */
.dashboard-actions .activity-row {
  margin-top: 1.5rem !important; /* override Bootstrap .row defaults */
}

.dashboard-aside {
  flex: 0 0 340px;
  width: 340px;
  max-width: 100%;
}
/* The unit roster scrolls independently when the list is long. */
.dashboard-aside .dashboard-units-card .card-body {
  max-height: 28rem;
  overflow-y: auto;
}
@media (max-width: 991.98px) {
  .dashboard-aside {
    flex-basis: 100%;
    width: 100%;
  }

  /* Ensure the stacked right-hand panel has a clear gap from the actions */
  .dashboard-aside {
    margin-top: 1.5rem;
  }

  /* Ensure some vertical space between the left actions (including the
     activity card) and the stacked right-hand panel on small screens. */
  .dashboard-actions {
    margin-bottom: 2.5rem;
    padding-bottom: 0.5rem;
  }
}

/* Desktop: nudge the lower aside card so its top sits lower, matching the
   vertical rhythm of cards on the left column. */
@media (min-width: 992px) {
  .dashboard-aside .dashboard-units-card {
    margin-top: 1.5rem;
  }
}

/* ── Alerts ── */
.alert {
  margin-top: 1rem;
}

/* ── Misc ── */
.footer { margin-top: auto; }
.card { margin-bottom: 1.5rem; }
.icon-large { font-size: 1.2em; }
.duplicate-row { background: #ffeaea; }
.max-w-600 { max-width: 600px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0.5rem; }

/* ── Logo ── */
.logo-img {
  max-height: 36px;
  width: auto;
  height: auto;
}
@media (max-width: 576px) {
  .logo-img { max-height: 28px; }
  .navbar-brand { font-size: 1.2rem; }
  .footer { font-size: 0.9rem; }
}

/* Site footer styling */
.site-footer {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.site-footer-row {
  gap: 4ch; /* approx 4 characters between items */
  flex-wrap: wrap;
}
.site-footer-left { align-items: center; }
.site-footer-right { gap: 4ch; align-items: center; }

@media (max-width: 576px) {
  .site-footer-row { flex-direction: column; gap: 0.5rem; align-items: center; }
  .site-footer-right { justify-content: center; }
}
.site-footer a {
  color: var(--sh-slate);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.site-footer span.text-muted {
  color: #6c757d;
}

/* ── Topbar ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background-color: var(--sh-slate-light);
  border-bottom: 1px solid #dde3ea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 1030;
}
.topbar-brand {
  display: flex;
  align-items: center;
}
.topbar-user {
  display: flex;
  align-items: center;
}
.topbar-user-link {
  color: var(--sh-slate);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.topbar-user-link:hover {
  color: var(--sh-teal-dark);
}
.role-pill {
  font-size: 0.7rem;
  font-weight: 600;
  background-color: var(--sh-teal-light);
  color: var(--sh-teal-dark);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.sidebar-toggler {
  color: var(--sh-slate);
  border: none;
  background: transparent;
}
.sidebar-toggler:hover {
  color: var(--sh-teal-dark);
}

/* ── Sidebar — mobile base (Bootstrap offcanvas handles show/hide) ── */
.sidebar.offcanvas {
  width: 260px;
  background-color: #fff;
}
.sidebar-section {
  padding-bottom: 0.5rem;
}
.sidebar-section + .sidebar-section {
  border-top: 1px solid #eef0f3;
  padding-top: 0.25rem;
}
.sidebar-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #8d9aad;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.875rem 1.25rem 0.25rem;
}
.sidebar-link {
  display: block;
  padding: 0.45rem 1.25rem;
  color: var(--sh-slate);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.1s, color 0.1s;
}
.sidebar-link:hover {
  background-color: var(--sh-slate-light);
  color: var(--sh-teal-dark);
  text-decoration: none;
}
.sidebar-link.active {
  background-color: var(--sh-teal-light);
  color: var(--sh-teal-dark);
  font-weight: 600;
  border-left: 3px solid var(--sh-teal);
  padding-left: calc(1.25rem - 3px);
}
/* Reset browser button defaults so <button class="sidebar-link"> looks
   identical to the <a> links in the sidebar (e.g. the Sign Out item). */
button.sidebar-link {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

/* ── Page layout ── */
.page-wrapper {
  display: flex;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
}
.main-content {
  flex: 1;
  padding: 2rem;
  min-width: 0;
}

/* ── No-sidebar pages ── */
.no-sidebar-wrap {
  padding: 2rem;
}

/* ── Desktop: override offcanvas to always show sidebar ── */
@media (min-width: 992px) {
  .sidebar.offcanvas {
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    width: 260px !important;
    height: calc(100vh - 56px) !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    z-index: 1020 !important;
    border-right: 1px solid #dde3ea;
    overflow-y: auto;
    box-shadow: none;
  }
  .sidebar .offcanvas-header {
    display: none;
  }
  .main-content {
    margin-left: 260px;
  }
}

/* ── Mobile: full-width main when sidebar is offcanvas ── */
@media (max-width: 991.98px) {
  .main-content {
    margin-left: 0;
  }
}

/* ── Rich activity feed (issues #318 / #321) ─────────────────────────── */
.activity-feed-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.feed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.feed-pill {
  border: 1px solid #dde3ea;
  background: #fff;
  color: #4a5568;
  border-radius: 999px;
  padding: 0.2rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.feed-pill:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}
.feed-pill.is-active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}
.feed-scope {
  font-size: 0.8rem;
  white-space: nowrap;
}

.activity-feed-list {
  display: flex;
  flex-direction: column;
}

/* Date-section headers (TODAY / YESTERDAY / 3 JUNE 2026 …). */
.feed-date-header {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #9aa5b1;
  text-transform: uppercase;
  padding: 0.9rem 0 0.35rem;
  border-bottom: 1px solid #eef1f5;
  margin-bottom: 0.4rem;
}
.feed-date-header:first-child {
  padding-top: 0.1rem;
}

/* Each entry is a calm card with a left coloured status dot. */
.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.2rem;
}
.feed-summary {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  list-style: none;
  cursor: pointer;
}
.feed-summary::-webkit-details-marker {
  display: none;
}
.feed-dot {
  flex: 0 0 auto;
  width: 0.6rem;
  height: 0.6rem;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: #cbd2d9;
}
.feed-dot--finance        { background: #2f9e6f; }  /* green  */
.feed-dot--communications { background: #2f80c2; }  /* blue   */
.feed-dot--operations     { background: #e0922f; }  /* amber  */
.feed-dot--governance     { background: #8a94a6; }  /* grey   */
.feed-dot--admin          { background: #8257c5; }  /* purple */

.feed-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}
.feed-title {
  color: #1f2933;
  word-break: break-word;
}
.feed-verb {
  font-weight: 600;
}
.feed-primary {
  color: var(--bs-link-color);
  text-decoration: none;
}
.feed-primary:hover {
  text-decoration: underline;
}
.feed-badge {
  font-weight: 500;
  vertical-align: middle;
}
.feed-chip {
  display: inline-block;
  background: #eef1f5;
  color: #4a5568;
  border-radius: 6px;
  padding: 0.02rem 0.4rem;
  font-size: 0.78rem;
  margin-left: 0.3rem;
  text-decoration: none;
}
.feed-chip--link:hover {
  background: #e2e8f0;
}
/* Inline bold figure in the title (amounts, aggregates) and the bold contact
   name in contact-link sentences. */
.feed-figure,
.feed-name {
  font-weight: 600;
  color: #1f2933;
}
.feed-arrow {
  color: #7b8794;
  margin: 0 0.1rem;
}
.feed-meta {
  font-size: 0.8rem;
  color: #7b8794;
}
.feed-meta time {
  white-space: nowrap;
}
/* Bordered expand toggle for grouped batches; arrow flips when the group opens. */
.feed-group-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #e4e8ee;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--bs-link-color);
}
.feed-group-toggle::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.12s;
}
details.feed-group[open] .feed-group-toggle::before {
  transform: rotate(90deg);
}
.feed-group-members {
  list-style: none;
  margin: 0.35rem 0 0.4rem 1.3rem;
  padding: 0;
  border-left: 2px solid #eef1f5;
}
.feed-group-member {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.28rem 0 0.28rem 0.75rem;
  font-size: 0.86rem;
}
.feed-group-member time {
  margin-left: auto;
  color: #9aa5b1;
  font-size: 0.78rem;
  white-space: nowrap;
}
.feed-member-note {
  color: #52606d;
}
.activity-feed-sentinel {
  padding: 0.75rem 0.25rem;
  text-align: center;
  font-size: 0.85rem;
}
/* "Load older activity" button sits below the list (the load-more control). */
.activity-feed-more {
  text-align: center;
  padding: 0.4rem 0 0.2rem;
}
/* Own fixed-height scroll (e.g. embedded in a dashboard card): the feed scrolls
   and the pills/scope header sticks to the top of the scroll region. The
   sentinel (sibling of the list) then scrolls into view at the bottom, so
   infinite scroll keeps working — the IntersectionObserver roots on the feed. */
.activity-feed--scroll {
  max-height: 520px;
  overflow-y: auto;
}
.activity-feed--scroll .activity-feed-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding-bottom: 0.35rem;
}

/* ── Per-unit attention roster (issue #319) ──────────────────────────── */
/* One clean line per unit; whole row is clickable via the link's stretched
   overlay (::after). Badges sit in their own container — kept below the overlay
   for now so a click anywhere navigates, but structured so they can later be
   lifted (z-index) into per-badge quick actions. */
.unit-roster-row {
  position: relative;
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #eef1f5;
}
.unit-roster-row:last-child {
  border-bottom: none;
}
.unit-roster-row:hover {
  background: #f6f8fb;
}
.unit-roster-link {
  text-decoration: none;
  color: #1f2933;
  display: flex;
  align-items: baseline;
  flex: 1 1 auto;
  min-width: 0;
}
.unit-roster-link::after {  /* stretch the link over the whole row */
  content: "";
  position: absolute;
  inset: 0;
}
.unit-roster-name {
  font-weight: 600;
  white-space: nowrap;
}
.unit-roster-owner {
  margin-left: 0.5rem;
  color: #7b8794;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unit-roster-badges {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}
/* Muted semantic tones at normal weight, ranked by urgency. */
.unit-badge {
  display: inline-block;
  padding: 0.16rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}
.unit-badge--overdue    { background: #f6cfd2; color: #842029; }  /* danger, heaviest */
.unit-badge--resolution { background: #ffe5a0; color: #664d03; }  /* warning */
.unit-badge--poll       { background: #d4e5f7; color: #0a4a82; }  /* info, lightest  */

/* ── Sortable table columns (issue #340) ──────────────────────────────── */
th.sortable {
  white-space: nowrap;
}
th.sortable .sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  cursor: pointer;
}
th.sortable .sort-link:hover {
  text-decoration: underline;
}
.sort-ind {
  font-size: 0.85em;
  line-height: 1;
}
.sort-ind-muted {
  opacity: 0.35;
}
th.sortable:hover .sort-ind-muted {
  opacity: 0.6;
}
th.sort-active .sort-ind,
th[aria-sort="ascending"] .sort-ind,
th[aria-sort="descending"] .sort-ind {
  opacity: 1;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */
/* Override Bootstrap's bright blue active pagination color to mid-gray. */
.pagination {
  --bs-pagination-active-bg: #6C757D;
  --bs-pagination-active-border-color: #6C757D;
}

/* Ensure active page link text remains white for contrast. */
.page-link.active {
  color: #fff;
}
