body { background: #f6f7f9; }
.kpi-card { transition: transform .15s ease, box-shadow .15s ease; }
a:hover .kpi-card { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
table.sortable thead th { user-select: none; }
table.sortable thead th:hover { background-color: #e9ecef; }

/* Frozen column headers: keep the header row visible while scrolling a long
   list. They stick just under the sticky navbar (--arma-navh is measured in
   base.html). Opaque background so scrolling rows don't show through; z-index
   stays below the navbar (1020) so the bar slides under it, not over it. */
table.sortable thead th,
table.sticky-head thead th {
  position: sticky;
  top: var(--arma-navh, 56px);
  background-color: #eef1f4;
  z-index: 3;
  box-shadow: inset 0 -1px 0 #dee2e6;   /* keep the bottom border when stuck */
}
/* A .table-responsive wrapper has overflow-x:auto, which forces overflow-y to
   compute to 'auto' — that turns it into a scroll container, so the header
   above sticks to the WRAPPER instead of the viewport and floats mid-table.
   Inside such a wrapper, fall back to a normal (non-sticky) header. */
.table-responsive table.sortable thead th,
.table-responsive table.sticky-head thead th {
  position: static;
}
.card { border: 1px solid #e3e6eb; }
.list-group-item-action { cursor: pointer; }
.navbar-brand { letter-spacing: 0.5px; }
/* Keep navbar single-line and prevent awkward wrapping; long labels can
   ellipsize rather than push the rest of the bar onto a second row. */
.navbar .navbar-nav .nav-link { white-space: nowrap; }
.navbar-collapse { flex-wrap: nowrap; }
code { color: #6f42c1; }
.list-group { border-radius: 0; }

/* Row numbering — a CSS counter so the # column stays 1,2,3… even after sort. */
table.numbered tbody { counter-reset: rownum; }
table.numbered tbody tr { counter-increment: rownum; }
table.numbered tbody tr td.row-num::before { content: counter(rownum); }
table.numbered thead th.row-num,
table.numbered tbody td.row-num {
  width: 1%;
  text-align: right;
  color: #6c757d;
  white-space: nowrap;
  padding-right: .75rem;
}
