/* Cashback V36.7.102 — exact cascade repair for Backup & Update.
   Root cause: V36.7.92 styles every active .admin-pane with a white glass surface.
   V36.7.99 and V36.7.101 used less-specific selectors, so their dark/transparent
   overrides lost to .admin-pane.active:not(#admin-pane-users).

   Fix: make only #admin-pane-backups a layout wrapper in every mode, keep the
   four tabs independent, and give the selected Backup tab's actual content its
   own .admin-card surface. Manual/Remote/Restore already contain their own cards.
*/

/* 1) Override the generic V36.7.92 active-pane surface with higher specificity.
      This affects the Backup & Update pane only, not other Admin subpages. */
html.theme-bootstrap-light body #tab-admin > .admin-card > #admin-pane-backups.admin-pane.active:not(#admin-pane-users),
html body.default-light-mode #tab-admin > .admin-card > #admin-pane-backups.admin-pane.active:not(#admin-pane-users),
html.theme-bootstrap-default:not(.theme-bootstrap-light) body #tab-admin > .admin-card > #admin-pane-backups.admin-pane.active:not(#admin-pane-users),
html body.default-dark-mode #tab-admin > .admin-card > #admin-pane-backups.admin-pane.active:not(#admin-pane-users),
html body.theme-halloween:not(.default-light-mode) #tab-admin > .admin-card > #admin-pane-backups.admin-pane.active:not(#admin-pane-users),
html body.theme-winter:not(.default-light-mode) #tab-admin > .admin-card > #admin-pane-backups.admin-pane.active:not(#admin-pane-users),
html body.theme-ocean:not(.default-light-mode) #tab-admin > .admin-card > #admin-pane-backups.admin-pane.active:not(#admin-pane-users),
html body[class*="theme-"]:not(.default-light-mode):not(.theme-default):not(.theme-halloween):not(.theme-winter):not(.theme-ocean) #tab-admin > .admin-card > #admin-pane-backups.admin-pane.active:not(#admin-pane-users) {
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
  overflow: visible !important;
}

/* 2) The tab panel itself is also only a layout wrapper. The content surface
      belongs to the selected panel's inner card, not to a frame around all tabs. */
html body #tab-admin > .admin-card > #admin-pane-backups.admin-pane.active > .backup-update-panel.active {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

/* 3) The Backup tab now has one real content card. Keep it theme-aware. */
html body #tab-admin #admin-pane-backups .backup-content-card {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* 4) Light theme tabs were inheriting the dark --surface token from V36.7.100.
      Give inactive tabs a readable light surface and keep the active accent. */
html.theme-bootstrap-light body #tab-admin #admin-pane-backups .backup-update-tab-btn,
html body.default-light-mode #tab-admin #admin-pane-backups .backup-update-tab-btn {
  color: #475569 !important;
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  opacity: 1 !important;
}
html.theme-bootstrap-light body #tab-admin #admin-pane-backups .backup-update-tab-btn:hover,
html body.default-light-mode #tab-admin #admin-pane-backups .backup-update-tab-btn:hover {
  color: #334155 !important;
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}
html.theme-bootstrap-light body #tab-admin #admin-pane-backups .backup-update-tab-btn.active,
html body.default-light-mode #tab-admin #admin-pane-backups .backup-update-tab-btn.active {
  color: #5b21b6 !important;
  background: #ede9fe !important;
  border-color: #a78bfa !important;
  box-shadow: inset 0 0 0 1px rgba(139,92,246,.12), 0 3px 10px rgba(91,33,182,.10) !important;
}

/* 5) Default dark mode: retain dark text/surfaces inside content, never the
      pale generic active-pane surface. This reinforces the dedicated 7.99
      table/card palette without touching seasonal themes. */
html.theme-bootstrap-default:not(.theme-bootstrap-light) body #tab-admin #admin-pane-backups .backup-content-card,
html body.default-dark-mode #tab-admin #admin-pane-backups .backup-content-card {
  color: #e8eef9 !important;
  background: linear-gradient(145deg, rgba(23,35,56,.96), rgba(11,19,34,.97)) !important;
  border: 1px solid rgba(137,158,190,.30) !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.06) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
}

/* Small screens: preserve a compact card inset without recreating an outer frame. */
@media (max-width: 640px) {
  html body #tab-admin #admin-pane-backups .backup-content-card {
    padding: 16px !important;
  }
}
