
/* Prevent SVGs intercepting clicks */
button svg, a svg, [onclick] svg { pointer-events: none; }
/* ── Inline SVG icon system — guaranteed fallback ── */
.bi { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; fill: currentColor; pointer-events: none; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BRAND TOKEN — swap --primary to rebrand
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --primary:       #2563EB;
  --primary-fg:    #ffffff;
  --primary-rgb:   37, 99, 235;
  --bs-primary:    var(--primary);
  --bs-font-sans-serif: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --nav-h:   60px;
  --bar-h:   66px;
  --sidebar-w: 230px;
  --safe-b:  env(safe-area-inset-bottom, 0px);
}

/* Override Bootstrap primary */
.btn-primary, .bg-primary { background-color: var(--primary) !important; border-color: var(--primary) !important; color: var(--primary-fg) !important; }
.text-primary { color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.btn-outline-primary { color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-outline-primary:hover { background-color: var(--primary) !important; color: var(--primary-fg) !important; }
.form-control:focus, .form-select:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb),.15) !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BASE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  font-family: 'DM Sans', system-ui, sans-serif; overflow-x: hidden;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  #sidebar, #topbar, #app { transition: none !important; }
  .page { animation: none !important; }
}
/* ── High Contrast mode ── */
html.high-contrast {
  --hc-border: 2px solid currentColor;
}
/* Light high contrast */
html.high-contrast[data-bs-theme="light"] {
  --bs-body-color:        #000000;
  --bs-body-bg:           #ffffff;
  --bs-secondary-color:   #1a1a1a;
  --bs-border-color:      #000000;
  --bs-tertiary-bg:       #f0f0f0;
  --bs-secondary-bg:      #e0e0e0;
  --primary:              #000000;
  --primary-rgb:          0,0,0;
  --primary-fg:           #ffffff;
}
/* Dark high contrast */
html.high-contrast[data-bs-theme="dark"] {
  --bs-body-color:        #ffffff;
  --bs-body-bg:           #000000;
  --bs-secondary-color:   #e0e0e0;
  --bs-border-color:      #ffffff;
  --bs-tertiary-bg:       #1a1a1a;
  --bs-secondary-bg:      #2a2a2a;
  --primary:              #ffffff;
  --primary-rgb:          255,255,255;
  --primary-fg:           #000000;
}
/* Dark high contrast: invert logo mark */
html.high-contrast[data-bs-theme="dark"] .topbar-logo-mark {
  background: #ffffff !important;
}
html.high-contrast[data-bs-theme="dark"] .topbar-logo-mark svg {
  fill: #000000 !important;
}
/* Enforce borders on interactive elements */
html.high-contrast .card,
html.high-contrast .more-card { border-width: 2px !important; }
html.high-contrast .btn { border-width: 2px !important; font-weight: 700 !important; }
html.high-contrast .nav-pills .nav-link.active { outline: 2px solid var(--primary); outline-offset: -2px; }
html.high-contrast .form-control,
html.high-contrast .form-select { border-width: 2px !important; }
html.high-contrast .nav-item-btn.active { outline: 2px solid var(--primary); outline-offset: -2px; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  transition-duration: .01ms !important; animation-duration: .01ms !important;
}
html.reduce-motion #sidebar, html.reduce-motion #topbar, html.reduce-motion #app {
  transition: none !important;
}
html.reduce-motion .page { animation: none !important; }

/* Skip link */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  background: var(--primary); color: #fff; padding: .5rem 1rem;
  border-radius: 0 0 6px 6px; font-weight: 700; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* Page fade-in */
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.page { display: none; animation: pageIn .2s ease; }
.page.active { display: block; }

/* ── All buttons and form controls: 44px touch target ── */
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
/* Form selects and inputs */
.form-control, .form-select { min-height: 44px; font-size: 16px; }
.form-control-sm, .form-select-sm { min-height: 44px; font-size: 16px; }
/* Checkboxes and radio inputs — expand via padding on their label */
.form-check-label { min-height: 44px; padding-top: 0; padding-bottom: 0; }

/* ── Nav pills + page header share hero background ── */
.nav-pills.bg-body,
.page-header { background-color: var(--bs-tertiary-bg) !important; }

/* ── Nav pills use brand primary ── */
.nav-pills { justify-content: center; padding: 6px 8px !important; border-bottom: 1px solid var(--bs-border-color); background-color: var(--bs-tertiary-bg); }
@media (min-width: 900px) { .nav-pills { justify-content: flex-start; } }
.nav-pills .nav-link {
  color: var(--bs-secondary-color);
  border-radius: 50rem;
  padding: 5px 14px;
  margin: 4px 3px;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}
.nav-pills .nav-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background-color: rgba(var(--primary-rgb),.05);
}
.nav-pills .nav-link.active {
  color: var(--primary) !important;
  background-color: rgba(var(--primary-rgb),.08) !important;
  border-color: var(--primary) !important;
  font-weight: 600;
}
.nav-pills .nav-link.active .badge { background-color: var(--primary) !important; color: var(--primary-fg) !important; }

/* ── Range slider thumb uses brand primary ── */
input[type="range"] {
  accent-color: var(--primary);
}
.form-range::-webkit-slider-thumb { background: var(--primary) !important; }
.form-range::-moz-range-thumb { background: var(--primary) !important; }
.form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 .2rem rgba(var(--primary-rgb),.25) !important; }
.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), .2) !important;
  border-color: var(--primary) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOPBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background-color: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1rem; z-index: 1030;
  transition: background-color .2s, border-color .2s;
}

.topbar-logo {
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none; flex-shrink: 0;
}
.topbar-logo-mark {
  width: 32px; height: 32px; background: var(--primary); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.topbar-logo-mark svg { width: 18px; height: 18px; fill: #fff; }
.topbar-logo-text { line-height: 1; }
.topbar-logo-text strong { font-size: 15px; font-weight: 700; color: var(--bs-body-color); display: block; }
.topbar-logo-text small { font-size: 9px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--bs-secondary-color); }

.topbar-search {
  flex: 1; max-width: 520px; position: relative;
}
.topbar-search svg,
.topbar-search i {
  position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
  color: var(--bs-secondary-color); font-size: 14px; pointer-events: none;
  width: 14px; height: 14px;
}
.topbar-search input {
  width: 100%; padding: .45rem .75rem .45rem 2rem;
  background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color);
  border-radius: 6px; font-size: 13px; color: var(--bs-body-color);
  font-family: inherit; outline: none; transition: border-color .15s, background .15s;
}
.topbar-search input:focus {
  border-color: var(--primary); background: var(--bs-body-bg);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.12);
}
.topbar-search input::placeholder { color: var(--bs-secondary-color); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SIDEBAR (desktop) / BOTTOM NAV (mobile)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Mobile: bottom nav */
#sidebar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--bar-h) + var(--safe-b));
  background-color: var(--bs-body-bg);
  border-top: 1px solid var(--bs-border-color);
  display: flex; align-items: flex-start; padding-top: 8px;
  z-index: 1030; transition: background-color .2s, border-color .2s;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOUCH TARGETS — 44x44px minimum (WCAG 2.5.8)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nav-item-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 4px 6px; background: none; border: none;
  color: var(--bs-secondary-color); font-family: inherit;
  font-size: 10px; font-weight: 500; cursor: pointer;
  transition: color .15s; white-space: nowrap; position: relative;
  min-height: 44px;
}
.nav-item-btn i {
  font-size: 22px; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; flex-shrink: 0;
}
.nav-item-btn.active { color: var(--primary); }
.nav-item-btn.active::after {
  content: ''; position: absolute; bottom: -8px; left: 50%;
  transform: translateX(-50%); width: 4px; height: 4px;
  background: var(--primary); border-radius: 50%;
}
.nav-item-btn:hover:not(.active) { color: var(--bs-body-color); }

/* ── Topbar user avatar ── */
.topbar-user-wrap { position: relative; flex-shrink: 0; }

/* ── Theme rows in dropdown ── */
.tum-theme-row {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem 1rem; background: none; border: none;
  width: 100%; text-align: left; cursor: pointer; transition: background .12s;
}
.tum-theme-row:hover { background: var(--bs-tertiary-bg); }
.tum-theme-row.selected { border-color: var(--primary) !important; color: var(--primary) !important; font-weight: 600; }

/* Desktop: left sidebar */
@media (min-width: 900px) {
  :root { --sidebar-w: 230px; --sidebar-collapsed-w: 56px; }

  #sidebar {
    top: var(--nav-h); bottom: 0; right: auto;
    width: var(--sidebar-w); height: auto; min-height: calc(100vh - var(--nav-h));
    flex-direction: column; align-items: stretch;
    padding: 0; border-top: none;
    border-right: 1px solid var(--bs-border-color);
    overflow-y: auto; overflow-x: hidden;
    transition: width .22s ease;
  }
  #sidebar.collapsed { width: var(--sidebar-collapsed-w); }

  #topbar { left: 0; padding-left: 0; transition: none; }
  #app    { margin-left: var(--sidebar-w); transition: margin-left .22s ease; }

  /* ── Topbar sidebar-head slot (logo + toggle) ── */
  .topbar-sidebar-head {
    display: flex; align-items: center; gap: .5rem;
    width: var(--sidebar-w); height: 100%; flex-shrink: 0;
    padding: 0 .75rem 0 1rem; overflow: hidden;
    border-right: 1px solid var(--bs-border-color);
    transition: width .22s ease;
  }
  body.sidebar-collapsed .topbar-sidebar-head { width: var(--sidebar-collapsed-w); padding: 0; justify-content: center; gap: 0; }
  body.sidebar-collapsed #app { margin-left: var(--sidebar-collapsed-w); }
  .topbar-logo-text { line-height: 1; overflow: hidden; transition: opacity .15s, width .22s, margin .22s; white-space: nowrap; }
  body.sidebar-collapsed .topbar-logo-text { opacity: 0; width: 0; margin: 0; }

  /* ── Collapse toggle nav item ── */
  .sidebar-collapse-item { border-bottom: 1px solid var(--bs-border-color); }
  .sidebar-collapse-item:hover { background: var(--bs-tertiary-bg); }
  .sidebar-collapse-icon { transition: transform .22s ease; }
  body.sidebar-collapsed .sidebar-collapse-icon { transform: scaleX(-1); }
  body.sidebar-collapsed .sidebar-collapse-item { justify-content: center; }

  /* ── Nav items ── */
  .nav-item-btn {
    flex: 0 0 auto; flex-direction: row; justify-content: flex-start;
    gap: .7rem; padding: .6rem 1.1rem; font-size: .84rem;
    border-radius: 0; text-align: left; width: 100%; overflow: hidden;
  }
  .nav-item-btn i { font-size: 18px; width: 18px; height: 18px; }
  .nav-item-btn .nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .15s, width .22s; }
  #sidebar.collapsed .nav-item-btn .nav-label { opacity: 0; width: 0; display: none; }
  #sidebar.collapsed .nav-item-btn { justify-content: center; padding: .6rem 0; }

  .nav-item-btn.active { background: rgba(var(--primary-rgb), .08); color: var(--primary); }
  .nav-item-btn.active::after {
    position: absolute; left: 0; top: 20%; bottom: 20%;
    width: 3px; height: auto; border-radius: 0 3px 3px 0;
    transform: none; background: var(--primary);
  }
  .nav-item-btn:hover:not(.active) { background: var(--bs-tertiary-bg); }

  .topbar-logo { display: none; }
  #nav-more { display: none !important; }
  .nav-desktop-only { display: flex !important; }
  .nav-mobile-only  { display: none !important; }

  /* Section labels + dividers */
  .nav-section-lbl {
    font-size: .6rem; font-weight: 700; letter-spacing: .09em;
    text-transform: uppercase; color: var(--bs-secondary-color);
    padding: 0 1.1rem; display: flex; align-items: center; min-height: 36px;
    white-space: nowrap; overflow: hidden;
    transition: opacity .15s;
  }
  #sidebar.collapsed .nav-section-lbl { opacity: 0; height: .5rem; padding: 0; }
  #sidebar.collapsed .sidebar-upstream-section { display: none !important; }
  .sidebar-footer-item {
    align-items: center; min-height: 36px; padding: 0 1.1rem;
    font-size: .6rem; font-weight: 700; letter-spacing: .09em;
    text-transform: uppercase; color: var(--bs-secondary-color);
    background: none; border: none; text-align: left; cursor: pointer; width: 100%;
  }
  .sidebar-copyright { justify-content: space-between; }
  .nav-divider { height: 1px; background: var(--bs-border-color); margin: .25rem .75rem; }
  #sidebar.collapsed .nav-divider { margin: .3rem .5rem; }

  /* Tooltip on collapsed */
  #sidebar.collapsed .nav-item-btn { position: relative; }
  #sidebar.collapsed .nav-item-btn[aria-label]:hover::after {
    content: attr(aria-label);
    position: absolute; left: calc(100% + 8px); top: 50%;
    transform: translateY(-50%);
    background: var(--bs-emphasis-color); color: var(--bs-body-bg);
    font-size: .72rem; font-weight: 500; padding: .3rem .6rem;
    border-radius: 5px; white-space: nowrap; z-index: 2000;
    pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.18);
  }
}

/* Hide desktop-only items on mobile */
.nav-desktop-only { display: none; }
.nav-mobile-only  { display: flex; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGE LAYOUT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#app {
  padding-top: var(--nav-h);
  padding-bottom: calc(var(--bar-h) + var(--safe-b) + 4px);
  overflow-x: hidden;
  min-height: 100vh;
}
@media (min-width: 900px) {
  #app { margin-left: var(--sidebar-w); padding-bottom: 2rem; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION HEADERS & PAGE HEADERS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* ── Back button (mobile More -> page) ── */
#back-btn {
  display: none;
  align-items: center; gap: .35rem;
  padding: .5rem 1rem; background: var(--bs-body-bg);
  border: none; border-bottom: 1px solid var(--bs-border-color);
  width: 100%; text-align: left; font-family: inherit;
  font-size: .82rem; font-weight: 600; color: var(--primary);
  cursor: pointer; min-height: 44px;
}
#back-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
#back-btn.visible { display: flex; }
@media (min-width: 900px) { #back-btn { display: none !important; } }

.page-header {
  color: var(--bs-body-color);
  padding: 1.5rem 1.25rem 1.25rem;
}
.page-header h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .2rem; color: var(--bs-body-color); }
.page-header p  { font-size: .8rem; color: var(--bs-secondary-color); margin: 0; }
@media (max-width: 899.98px) { .page-header { text-align: center; } }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STAT CARDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.stat-card {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.stat-card-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--primary-rgb),.1); color: var(--primary);
  font-size: 18px; flex-shrink: 0;
}
.stat-card-val {
  font-size: 1.5rem; font-weight: 700; font-family: var(--font-mono);
  color: var(--bs-body-color); line-height: 1.2;
}
.stat-card-lbl {
  font-size: .75rem; color: var(--bs-secondary-color); margin-top: 2px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DATA ROWS (list items for accounts, verifications, etc.)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.data-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color); border-radius: 8px;
  margin-bottom: .5rem; transition: border-color .15s;
}
.data-row:hover { border-color: var(--primary); }
.data-row-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.data-row-name { font-size: .875rem; font-weight: 500; color: var(--bs-body-color); }
.data-row-sub  { font-size: .72rem; color: var(--bs-secondary-color); }
.data-row-end  { text-align: right; flex-shrink: 0; }
.data-row-val  { font-family: var(--font-mono); font-size: .8rem; font-weight: 500; color: var(--bs-body-color); }
.data-row-lbl  { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOOLBAR (search/filter bar)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.listing-toolbar {
  background: var(--bs-tertiary-bg);
  border-bottom: 1px solid var(--bs-border-color);
  overflow: visible;
}
.listing-toolbar-row {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem;
}
.toolbar-search {
  flex: 1; position: relative;
}
.toolbar-search i {
  position: absolute; left: .65rem; top: 50%; transform: translateY(-50%);
  color: var(--bs-secondary-color); font-size: 14px; pointer-events: none;
}
.toolbar-search input {
  width: 100%; padding: .5rem .75rem .5rem 2rem;
  background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
  border-radius: 50rem; font-size: .82rem; color: var(--bs-body-color);
  font-family: inherit; outline: none; min-height: 40px;
}
.toolbar-search input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.1);
}
.toolbar-search input::placeholder { color: var(--bs-secondary-color); }
.toolbar-select {
  padding: .35rem .65rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
  border-radius: 50rem; font-size: .75rem; font-weight: 500; color: var(--bs-body-color);
  cursor: pointer; min-height: 44px; font-family: inherit; appearance: none;
  -webkit-appearance: none; flex-shrink: 0; white-space: nowrap;
}
.toolbar-select:hover { border-color: var(--primary); color: var(--primary); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOAST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#toast-wrap {
  position: fixed; bottom: calc(var(--bar-h) + var(--safe-b) + 12px);
  left: 50%; transform: translateX(-50%); z-index: 2000; pointer-events: none;
}
@media (min-width: 900px) { #toast-wrap { bottom: 1.5rem; } }
.toast-msg {
  background: var(--bs-emphasis-color); color: var(--bs-body-bg);
  padding: .55rem 1.1rem; border-radius: 6px; font-size: .82rem;
  font-weight: 500; white-space: nowrap; opacity: 0;
  transition: opacity .25s, transform .25s; transform: translateY(8px);
}
.toast-msg.show { opacity: 1; transform: translateY(0); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MISC UTILITIES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-hdr { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1rem .6rem; }
.section-ttl { font-size: 1.1rem; font-weight: 700; color: var(--bs-body-color); margin: 0; }
.section-cnt { font-size: .75rem; color: var(--bs-secondary-color); font-weight: 400; margin-left: .35rem; }
.section-link { font-size: .8rem; color: var(--bs-secondary-color); text-decoration: none; cursor: pointer; font-weight: 500; background: none; border: none; padding: 0; font-family: inherit; }
.section-link:hover { color: var(--primary); }

/* Nav tab buttons */
.nav-pills .nav-link { min-height: 44px; display: inline-flex; align-items: center; }

/* ── Theme-aware table head/foot ── */
.thead-themed th, .thead-themed td {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MORE PAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.more-section-lbl {
  font-size: .7rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--bs-secondary-color);
  padding: 1.25rem 1rem .4rem; margin: 0;
}
.more-card { border: 1px solid var(--bs-border-color) !important; border-radius: 8px !important; overflow: hidden; margin: 0 1rem .25rem; }
.more-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .8rem 1rem; background: var(--bs-body-bg);
  border: none; width: 100%; text-align: left; font-family: inherit;
  cursor: pointer; transition: background .12s; position: relative;
  min-height: 44px;
}
.more-row + .more-row::before {
  content: ''; position: absolute; top: 0; left: 1rem; right: 1rem;
  height: 1px; background: var(--bs-border-color);
}
.more-row:hover { background: var(--bs-tertiary-bg); }
.more-row.no-action { cursor: default; }
.more-row.no-action:hover { background: var(--bs-body-bg); }
.more-row-icon {
  width: 30px; height: 30px;
  background: rgba(var(--primary-rgb), .1);
  border: 1px solid rgba(var(--primary-rgb), .2);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.more-row-icon i   { font-size: 14px; color: var(--primary); }
.more-row-lbl  { font-size: .875rem; font-weight: 500; color: var(--bs-body-color); }
.more-row-sub  { font-size: .73rem; color: var(--bs-secondary-color); margin-top: 1px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACTIVITY LIST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.activity-item {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px;
}
.activity-text { font-size: .82rem; color: var(--bs-body-color); }
.activity-time { font-size: .7rem; color: var(--bs-secondary-color); margin-top: 2px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE UTILITIES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (min-width: 900px) {
  .section-hdr { padding-left: 1.5rem; padding-right: 1.5rem; }
  .listing-toolbar-row { padding-left: 1.5rem; padding-right: 1.5rem; }
  .page-header { padding: 2rem 1.5rem 1.5rem; }
  .more-section-lbl { padding-left: 1.5rem; padding-right: 1.5rem; }
  .more-card { margin-left: 1.5rem; margin-right: 1.5rem; }
  #page-more { max-width: 640px; }
}

/* Focus ring */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DARK MODE CONTRAST FIXES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
[data-bs-theme="dark"] .stat-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.4); }
[data-bs-theme="dark"] .tum-signout { color: #ef4444; }
