/* Cashback V36.7.93 — compact equal Admin navigation + clean rounded shell + split audit cards.
   Keeps the existing DOM order and Admin actions. Presentation-only patch. */

/* 1) The Admin navigation wrapper is the only outer shell. Remove leftover
   square surfaces/pseudo layers from the old .admin-card and .admin-subnav. */
html body #tab-admin > .admin-card,
html body #tab-admin > .admin-card::before,
html body #tab-admin > .admin-card::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  content: none !important;
}
html body #tab-admin > .admin-card > .admin-subnav {
  position: relative !important;
  isolation: isolate !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  align-content: flex-start !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 22px !important;
  padding: 16px !important;
  border: 1px solid rgba(148, 163, 184, .34) !important;
  border-radius: 28px !important;
  outline: 0 !important;
  background: rgba(255, 255, 255, .74) !important;
  background-color: rgba(255, 255, 255, .74) !important;
  background-image: none !important;
  background-clip: padding-box !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12), inset 0 1px 0 rgba(255,255,255,.32) !important;
  -webkit-backdrop-filter: blur(14px) saturate(126%) !important;
  backdrop-filter: blur(14px) saturate(126%) !important;
  overflow: hidden !important;
}
html body #tab-admin > .admin-card > .admin-subnav::before,
html body #tab-admin > .admin-card > .admin-subnav::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Category headings stay full-width and in their original DOM order. */
html body #tab-admin > .admin-card > .admin-subnav > .admin-nav-section-label {
  display: block !important;
  box-sizing: border-box !important;
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 24px !important;
  height: auto !important;
  margin: 9px 0 0 !important;
  padding: 5px 7px 2px !important;
  line-height: 1.3 !important;
}
html body #tab-admin > .admin-card > .admin-subnav > .admin-nav-section-label:first-child {
  margin-top: 0 !important;
}

/* Equal tiles: no flex-grow, so a final/odd item never stretches to a full row.
   Every button has the same height, width basis, padding, icon and label scale. */
html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  flex: 0 0 calc((100% - 10px) / 2) !important;
  width: calc((100% - 10px) / 2) !important;
  min-width: 0 !important;
  max-width: calc((100% - 10px) / 2) !important;
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  border-radius: 16px !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 10px !important;
  white-space: normal !important;
  text-align: left !important;
  line-height: 1.2 !important;
  font-size: clamp(13px, 3.35vw, 15px) !important;
  overflow: hidden !important;
}
html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn .admin-nav-icon {
  flex: 0 0 22px !important;
  width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn .admin-nav-icon svg {
  width: 22px !important;
  height: 22px !important;
}
html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn .admin-nav-label {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
  line-height: 1.2 !important;
}

/* Same rounded shell palette in each theme; the content is clipped to the
   rounded edge so no square translucent rectangle can show behind it. */
html body.default-light-mode #tab-admin > .admin-card > .admin-subnav {
  color: #26364c !important;
  background: rgba(255, 255, 255, .84) !important;
  border-color: rgba(148, 163, 184, .42) !important;
  box-shadow: 0 12px 30px rgba(51, 65, 85, .08), inset 0 1px 0 rgba(255,255,255,.92) !important;
}
html body.theme-halloween:not(.default-light-mode) #tab-admin > .admin-card > .admin-subnav {
  color: #f5edff !important;
  background: linear-gradient(145deg, rgba(53, 34, 75, .72), rgba(24, 18, 43, .78)) !important;
  border-color: rgba(205, 174, 245, .36) !important;
  box-shadow: 0 14px 34px rgba(8, 5, 20, .22), inset 0 1px 0 rgba(255,255,255,.10) !important;
}
html body.theme-winter:not(.default-light-mode) #tab-admin > .admin-card > .admin-subnav {
  color: #edf6ff !important;
  background: linear-gradient(145deg, rgba(30, 68, 108, .72), rgba(9, 34, 65, .78)) !important;
  border-color: rgba(160, 205, 245, .36) !important;
  box-shadow: 0 14px 34px rgba(3, 15, 35, .24), inset 0 1px 0 rgba(255,255,255,.10) !important;
}
html body.theme-ocean:not(.default-light-mode) #tab-admin > .admin-card > .admin-subnav {
  color: #e9fbff !important;
  background: linear-gradient(145deg, rgba(8, 67, 84, .72), rgba(3, 39, 58, .78)) !important;
  border-color: rgba(132, 225, 228, .38) !important;
  box-shadow: 0 14px 34px rgba(0, 16, 29, .24), inset 0 1px 0 rgba(255,255,255,.10) !important;
}

@media (min-width: 760px) {
  html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn {
    flex-basis: calc((100% - 20px) / 3) !important;
    width: calc((100% - 20px) / 3) !important;
    max-width: calc((100% - 20px) / 3) !important;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    font-size: 14px !important;
  }
}
@media (max-width: 380px) {
  html body #tab-admin > .admin-card > .admin-subnav {
    gap: 8px !important;
    padding: 12px !important;
    border-radius: 23px !important;
  }
  html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn {
    flex-basis: calc((100% - 8px) / 2) !important;
    width: calc((100% - 8px) / 2) !important;
    max-width: calc((100% - 8px) / 2) !important;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    padding: 8px 9px !important;
    gap: 8px !important;
    font-size: 12.5px !important;
  }
  html body #tab-admin > .admin-card > .admin-subnav > .admin-nav-section-label {
    font-size: 10px !important;
  }
}

/* 2) AUDIT LOG: the filters and the table are two separate glass cards.
   v36.7.88 flattened the filter row; restore its own card instead of wrapping
   the filters and table in a single shared surface. */
html body #tab-admin #admin-pane-audit.active {
  gap: 12px !important;
  height: auto !important;
  min-height: min(720px, calc(100dvh - 150px)) !important;
  max-height: none !important;
  overflow: visible !important;
}
html body #tab-admin #admin-pane-audit .audit-pane-heading {
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 0 2px !important;
}
html body #tab-admin #admin-pane-audit .audit-pane-heading h3 {
  margin: 0 !important;
  line-height: 1.25 !important;
}
html body #tab-admin #admin-pane-audit .audit-pane-heading p {
  max-width: 850px !important;
  margin: 5px 0 0 !important;
  line-height: 1.45 !important;
  font-size: 13px !important;
}
html body #tab-admin #admin-pane-audit .audit-filter-bar {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: end !important;
  gap: 12px !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  max-height: 360px !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid rgba(148, 163, 184, .34) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, .76) !important;
  color: #26364c !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .10), inset 0 1px 0 rgba(255,255,255,.38) !important;
  -webkit-backdrop-filter: blur(13px) saturate(125%) !important;
  backdrop-filter: blur(13px) saturate(125%) !important;
}
html body #tab-admin #admin-pane-audit .audit-filter-bar label {
  display: flex !important;
  min-width: 0 !important;
  flex-direction: column !important;
  gap: 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}
html body #tab-admin #admin-pane-audit .audit-filter-bar input,
html body #tab-admin #admin-pane-audit .audit-filter-bar select {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  border-radius: 11px !important;
  padding: 9px 11px !important;
  font-size: 13px !important;
}
html body #tab-admin #admin-pane-audit .audit-filter-actions {
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  flex-wrap: wrap !important;
}
html body #tab-admin #admin-pane-audit .audit-log-frame {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 180px !important;
  margin: 0 !important;
  padding: 9px !important;
  overflow: hidden !important;
  border: 1px solid rgba(148, 163, 184, .34) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, .76) !important;
  color: #26364c !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .10), inset 0 1px 0 rgba(255,255,255,.38) !important;
  -webkit-backdrop-filter: blur(13px) saturate(125%) !important;
  backdrop-filter: blur(13px) saturate(125%) !important;
}
html body #tab-admin #admin-pane-audit .audit-log-scroll {
  min-height: 120px !important;
  border-radius: 13px !important;
  overflow: auto !important;
}
html body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table {
  min-width: 760px !important;
  margin: 0 !important;
}
html body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table th {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  background: rgba(232, 239, 248, .96) !important;
  color: #26364c !important;
  font-weight: 800 !important;
}
html body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table td {
  color: #33465d !important;
  background: rgba(255, 255, 255, .52) !important;
}
html body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table tbody tr:nth-child(even) td {
  background: rgba(241, 246, 252, .74) !important;
}
html body #tab-admin #admin-pane-audit .audit-log-load-status {
  flex: 0 0 auto !important;
  margin-top: 7px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  border-radius: 11px !important;
  background: rgba(241, 246, 252, .72) !important;
  color: #52647a !important;
  font-size: 12px !important;
}

/* Dark theme-specific glass tints; controls/table text stay opaque and crisp. */
html body.theme-halloween:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar,
html body.theme-halloween:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-frame {
  color: #f5edff !important;
  background: rgba(43, 29, 62, .78) !important;
  border-color: rgba(205, 174, 245, .34) !important;
  box-shadow: 0 12px 30px rgba(8, 5, 20, .22), inset 0 1px 0 rgba(255,255,255,.08) !important;
}
html body.theme-halloween:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar label,
html body.theme-halloween:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-pane-heading p { color: rgba(242, 233, 255, .86) !important; }
html body.theme-halloween:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar input,
html body.theme-halloween:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar select { color: #f7efff !important; background: rgba(17, 15, 35, .78) !important; border-color: rgba(205,174,245,.28) !important; }
html body.theme-halloween:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-scroll .custom-table th { background: rgba(58, 39, 78, .98) !important; color: #f8efff !important; }
html body.theme-halloween:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-scroll .custom-table td { background: rgba(31, 22, 48, .80) !important; color: #eee6fb !important; }
html body.theme-halloween:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-scroll .custom-table tbody tr:nth-child(even) td { background: rgba(49, 34, 69, .82) !important; }
html body.theme-halloween:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-load-status { background: rgba(27, 20, 43, .76) !important; color: #d9cce9 !important; border-color: rgba(205,174,245,.22) !important; }

html body.theme-winter:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar,
html body.theme-winter:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-frame {
  color: #edf6ff !important;
  background: rgba(17, 48, 79, .80) !important;
  border-color: rgba(160, 205, 245, .34) !important;
  box-shadow: 0 12px 30px rgba(3, 15, 35, .24), inset 0 1px 0 rgba(255,255,255,.08) !important;
}
html body.theme-winter:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar label,
html body.theme-winter:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-pane-heading p { color: rgba(226, 240, 255, .88) !important; }
html body.theme-winter:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar input,
html body.theme-winter:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar select { color: #f0f7ff !important; background: rgba(7, 25, 48, .82) !important; border-color: rgba(160,205,245,.30) !important; }
html body.theme-winter:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-scroll .custom-table th { background: rgba(18, 48, 80, .98) !important; color: #eff7ff !important; }
html body.theme-winter:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-scroll .custom-table td { background: rgba(10, 35, 62, .82) !important; color: #e4f1ff !important; }
html body.theme-winter:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-scroll .custom-table tbody tr:nth-child(even) td { background: rgba(22, 52, 83, .84) !important; }
html body.theme-winter:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-load-status { background: rgba(8, 29, 54, .78) !important; color: #d1e6fa !important; border-color: rgba(160,205,245,.22) !important; }

html body.theme-ocean:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar,
html body.theme-ocean:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-frame {
  color: #e9fbff !important;
  background: rgba(5, 58, 72, .80) !important;
  border-color: rgba(132, 225, 228, .36) !important;
  box-shadow: 0 12px 30px rgba(0, 16, 29, .25), inset 0 1px 0 rgba(255,255,255,.08) !important;
}
html body.theme-ocean:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar label,
html body.theme-ocean:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-pane-heading p { color: rgba(224, 250, 252, .88) !important; }
html body.theme-ocean:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar input,
html body.theme-ocean:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-filter-bar select { color: #eaffff !important; background: rgba(2, 34, 47, .82) !important; border-color: rgba(132,225,228,.30) !important; }
html body.theme-ocean:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-scroll .custom-table th { background: rgba(5, 62, 77, .98) !important; color: #eaffff !important; }
html body.theme-ocean:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-scroll .custom-table td { background: rgba(3, 43, 58, .84) !important; color: #e2f8fb !important; }
html body.theme-ocean:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-scroll .custom-table tbody tr:nth-child(even) td { background: rgba(8, 57, 72, .86) !important; }
html body.theme-ocean:not(.default-light-mode) #tab-admin #admin-pane-audit .audit-log-load-status { background: rgba(2, 36, 49, .80) !important; color: #cff0f2 !important; border-color: rgba(132,225,228,.22) !important; }

@media (max-width: 900px) {
  html body #tab-admin #admin-pane-audit .audit-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; max-height: 44% !important; }
}
@media (max-width: 560px) {
  html body #tab-admin #admin-pane-audit.active { min-height: 640px !important; gap: 10px !important; }
  html body #tab-admin #admin-pane-audit .audit-filter-bar { grid-template-columns: minmax(0, 1fr) !important; max-height: 44% !important; padding: 12px !important; gap: 9px !important; }
  html body #tab-admin #admin-pane-audit .audit-filter-bar label { font-size: 11px !important; }
  html body #tab-admin #admin-pane-audit .audit-filter-actions { grid-column: auto !important; }
  html body #tab-admin #admin-pane-audit .audit-log-frame { min-height: 190px !important; padding: 7px !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 { min-height: 460px !important; }
  html body #tab-admin #admin-pane-audit .audit-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; max-height: 40% !important; padding: 10px !important; gap: 8px !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: 36px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn { transition: none !important; }
}
