/* V36.7.161 — Keep Activity Log filters anchored, theme its dark table,
   and make the history viewport directly touch-scrollable on mobile. */
html body #tab-admin #admin-pane-audit.active {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  height: calc(100dvh - 190px) !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 190px) !important;
  overflow: hidden !important;
  gap: 10px !important;
  overscroll-behavior: contain !important;
}
html body #tab-admin #admin-pane-audit .audit-pane-heading {
  flex: 0 0 auto !important;
  min-width: 0 !important;
}
/* The filter card remains anchored above the history area. It does not join
   the table's scrolling surface or drift when the history is swiped. */
html body #tab-admin #admin-pane-audit .audit-filter-bar {
  position: relative !important;
  inset: auto !important;
  z-index: 3 !important;
  flex: 0 0 auto !important;
  min-height: max-content !important;
  max-height: none !important;
  overflow: visible !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: end !important;
  touch-action: pan-y !important;
  overscroll-behavior: contain !important;
}
html body #tab-admin #admin-pane-audit .audit-filter-bar label,
html body #tab-admin #admin-pane-audit .audit-filter-bar input,
html body #tab-admin #admin-pane-audit .audit-filter-bar select {
  min-width: 0 !important;
  max-width: 100% !important;
}
html body #tab-admin #admin-pane-audit .audit-log-frame {
  display: flex !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-height: 120px !important;
  max-height: none !important;
  overflow: hidden !important;
}
html body #tab-admin #admin-pane-audit .audit-log-scroll {
  display: block !important;
  position: relative !important;
  flex: 1 1 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-x pan-y !important;
  pointer-events: auto !important;
  scrollbar-gutter: stable;
}
html body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table {
  min-width: 760px !important;
  width: 100% !important;
  margin: 0 !important;
}
html body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 4 !important;
}
/* Dark default palette: override the pale gray row fills inherited from the
   shared split-glass admin stylesheet. */
html body.default-dark-mode #tab-admin #admin-pane-audit .audit-log-scroll .custom-table,
html.theme-bootstrap-default:not(.theme-bootstrap-light) body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table {
  color: #e7efff !important;
  background: rgba(10, 22, 42, .34) !important;
}
html body.default-dark-mode #tab-admin #admin-pane-audit .audit-log-scroll .custom-table th,
html.theme-bootstrap-default:not(.theme-bootstrap-light) body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table th {
  color: #edf4ff !important;
  background: linear-gradient(105deg, rgba(35, 76, 119, .96), rgba(62, 54, 105, .96)) !important;
  border-color: rgba(145, 174, 215, .22) !important;
}
html body.default-dark-mode #tab-admin #admin-pane-audit .audit-log-scroll .custom-table td,
html.theme-bootstrap-default:not(.theme-bootstrap-light) body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table td {
  color: #dce8fa !important;
  background: rgba(16, 31, 54, .88) !important;
  border-color: rgba(137, 158, 190, .20) !important;
}
html body.default-dark-mode #tab-admin #admin-pane-audit .audit-log-scroll .custom-table tbody tr:nth-child(even) td,
html.theme-bootstrap-default:not(.theme-bootstrap-light) body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table tbody tr:nth-child(even) td {
  background: rgba(25, 43, 69, .90) !important;
}
html body.default-dark-mode #tab-admin #admin-pane-audit .audit-log-scroll .custom-table tbody tr:hover td,
html.theme-bootstrap-default:not(.theme-bootstrap-light) body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table tbody tr:hover td {
  background: rgba(54, 77, 112, .78) !important;
}
html body.default-dark-mode #tab-admin #admin-pane-audit .audit-log-load-status,
html.theme-bootstrap-default:not(.theme-bootstrap-light) body #tab-admin #admin-pane-audit .audit-log-load-status {
  color: #b9c9e0 !important;
  background: rgba(15, 29, 50, .88) !important;
  border-color: rgba(137, 158, 190, .20) !important;
}
@media (max-width: 900px) {
  html body #tab-admin #admin-pane-audit.active {
    height: calc(100dvh - 155px) !important;
    max-height: calc(100dvh - 155px) !important;
  }
  html body #tab-admin #admin-pane-audit .audit-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    padding: 11px !important;
  }
}
@media (max-width: 560px) {
  html body #tab-admin #admin-pane-audit.active {
    height: calc(100dvh - 145px) !important;
    max-height: calc(100dvh - 145px) !important;
    gap: 8px !important;
  }
  html body #tab-admin #admin-pane-audit .audit-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 9px !important;
  }
  html body #tab-admin #admin-pane-audit .audit-filter-bar label {
    gap: 4px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
  }
  html body #tab-admin #admin-pane-audit .audit-filter-bar input,
  html body #tab-admin #admin-pane-audit .audit-filter-bar select {
    min-height: 39px !important;
    padding: 7px 8px !important;
    font-size: 12px !important;
  }
  html body #tab-admin #admin-pane-audit .audit-filter-actions {
    grid-column: 1 / -1 !important;
  }
  html body #tab-admin #admin-pane-audit .audit-log-frame {
    min-height: 110px !important;
  }
  html body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table {
    min-width: 650px !important;
  }
}
@media (orientation: landscape) and (max-height: 620px) {
  html body #tab-admin #admin-pane-audit.active {
    height: calc(100dvh - 115px) !important;
    max-height: calc(100dvh - 115px) !important;
  }
  html body #tab-admin #admin-pane-audit .audit-filter-bar {
    grid-template-columns: repeat(3, minmax(110px, 1fr)) !important;
    gap: 6px !important;
    padding: 7px !important;
  }
  html body #tab-admin #admin-pane-audit .audit-filter-bar input,
  html body #tab-admin #admin-pane-audit .audit-filter-bar select {
    min-height: 34px !important;
    padding: 5px 7px !important;
  }
}
