/* Cashback V36.7.91 — restore the original Admin menu flow and rounded outer shell.
   The DOM order and existing menu groups are intentionally unchanged. */

/* One rounded glass shell encloses the complete Admin navigation. */
html body #tab-admin > .admin-card > .admin-subnav {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 17px !important;
  margin: 0 0 22px !important;
  border: 1px solid rgba(148, 163, 184, .34) !important;
  border-radius: 26px !important;
  outline: 0 !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12) !important;
  -webkit-backdrop-filter: blur(12px) saturate(118%) !important;
  backdrop-filter: blur(12px) saturate(118%) !important;
  overflow: visible !important;
}

/* Every category heading starts a new full-width row. This prevents headings
   from occupying a grid cell beside a button and scrambling the old layout. */
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;
  margin: 9px 0 0 !important;
  padding: 6px 9px 3px !important;
  line-height: 1.35 !important;
}
html body #tab-admin > .admin-card > .admin-subnav > .admin-nav-section-label:first-child {
  margin-top: 0 !important;
}

/* Menu buttons follow the existing DOM order and wrap naturally:
   two columns on phones, more columns on wider screens, never reorder. */
html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  flex: 1 1 calc(50% - 5px) !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 56px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 11px 14px !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.28 !important;
}
html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn .admin-nav-icon {
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
}
html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn .admin-nav-label {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

/* Theme-specific glass color belongs to the single outer shell, not a square
   overlay. Individual buttons keep their existing theme and active states. */
html body.default-light-mode #tab-admin > .admin-card > .admin-subnav {
  background: rgba(255, 255, 255, .82) !important;
  border-color: rgba(148, 163, 184, .38) !important;
  box-shadow: 0 10px 26px rgba(51, 65, 85, .09) !important;
}
html body.theme-halloween:not(.default-light-mode) #tab-admin > .admin-card > .admin-subnav {
  background: linear-gradient(145deg, rgba(63, 39, 82, .48), rgba(29, 22, 49, .56)) !important;
  border-color: rgba(205, 174, 245, .36) !important;
}
html body.theme-winter:not(.default-light-mode) #tab-admin > .admin-card > .admin-subnav {
  background: linear-gradient(145deg, rgba(34, 75, 116, .48), rgba(10, 39, 70, .56)) !important;
  border-color: rgba(160, 205, 245, .36) !important;
}
html body.theme-ocean:not(.default-light-mode) #tab-admin > .admin-card > .admin-subnav {
  background: linear-gradient(145deg, rgba(10, 83, 99, .48), rgba(4, 43, 62, .56)) !important;
  border-color: rgba(132, 225, 228, .36) !important;
}

@media (min-width: 760px) {
  html body #tab-admin > .admin-card > .admin-subnav > .admin-subnav-btn {
    flex-basis: calc(33.333% - 7px) !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(50% - 4px) !important;
    min-width: 0 !important;
    min-height: 52px !important;
    padding: 10px 11px !important;
  }
}
