
/* Cashback Pro V36.7.1 — responsive sidebar groups, dashboard visibility and seasonal glass balance. */

/* Group labels and separators must be visible in both portrait and landscape drawers. */
#app-sidebar #main-tabs-nav .nav-section-heading {
  display:flex !important;
  flex:0 0 auto !important;
  align-items:center !important;
  min-height:32px !important;
  width:auto !important;
  margin:13px 4px 4px !important;
  padding:9px 9px 7px !important;
  border-top:1px solid rgba(130,150,180,.34) !important;
  color:var(--text-muted, #718096) !important;
  font-size:11px !important;
  font-weight:850 !important;
  letter-spacing:.09em !important;
  line-height:1.25 !important;
  text-transform:uppercase !important;
  white-space:normal !important;
  background:transparent !important;
  opacity:1 !important;
  visibility:visible !important;
}
#app-sidebar #main-tabs-nav .nav-section-heading:first-child {
  margin-top:2px !important;
  padding-top:5px !important;
  border-top:0 !important;
}
#app-sidebar #main-tabs-nav .nav-section-heading.nav-admin-heading {
  border-top:1px dashed rgba(130,150,180,.42) !important;
}
#app-sidebar #main-tabs-nav {
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:5px !important;
  min-width:0 !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  -webkit-overflow-scrolling:touch !important;
  scrollbar-width:thin !important;
}
#app-sidebar #main-tabs-nav > .tab-btn {
  flex:0 0 auto !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}

/* Never leave the overview/dashboard visible underneath another selected destination.
   The sidebar is a separate persistent element, so hiding this section does not hide navigation. */
html body.dashboard-tab-mode #seasonal-dashboard.dashboard-away,
html body #seasonal-dashboard.dashboard-away {
  display:none !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

/* Short landscape: reserve the sidebar rail, then size the dashboard and every KPI
   to the remaining viewport. This avoids unequal intrinsic-width cards and right clipping. */
@media (orientation:landscape) and (max-height:820px) {
  html body.dashboard-home main.main-container,
  html body.dashboard-home.sidebar-expanded main.main-container {
    display:block !important;
    width:calc(100% - var(--v40-sidebar-width,188px) - 46px) !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 12px 0 calc(var(--v40-sidebar-width,188px) + 28px) !important;
    padding:12px 8px 24px !important;
    box-sizing:border-box !important;
    overflow-x:clip !important;
  }
  html body.dashboard-home.sidebar-collapsed main.main-container {
    width:calc(100% - 20px) !important;
    max-width:none !important;
    margin:0 10px !important;
    padding:12px 8px 24px !important;
  }
  html body.dashboard-home #seasonal-dashboard:not(.dashboard-away) {
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
    box-sizing:border-box !important;
    overflow:visible !important;
  }
  html body.dashboard-home #seasonal-dashboard > .seasonal-main {
    display:flex !important;
    flex-direction:column !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }
  html body.dashboard-home #seasonal-dashboard .seasonal-kpis {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    align-items:stretch !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    gap:10px !important;
    box-sizing:border-box !important;
  }
  html body.dashboard-home #seasonal-dashboard .seasonal-kpi {
    display:flex !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
  }
  html body.dashboard-home #seasonal-dashboard .seasonal-kpi > div {
    min-width:0 !important;
    overflow-wrap:anywhere !important;
  }
  html body.dashboard-home #seasonal-dashboard > .seasonal-right {
    display:none !important;
  }
  html body.dashboard-tab-mode main.main-container {
    width:auto !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 12px 0 calc(var(--v40-sidebar-width,188px) + 28px) !important;
    padding:12px 10px 24px !important;
    box-sizing:border-box !important;
  }
  html body.dashboard-tab-mode.sidebar-collapsed main.main-container {
    margin-left:10px !important;
    margin-right:10px !important;
  }
}

/* Theme menus share a consistent, less transparent glass surface.
   Alpha is intentionally high enough to keep dashboard text from bleeding through. */
body.theme-halloween #app-sidebar.app-sidebar {
  background:rgba(35,20,54,.92) !important;
  background-image:linear-gradient(145deg,rgba(74,39,99,.22),rgba(22,14,40,.10)) !important;
  border:1px solid rgba(211,177,255,.34) !important;
  -webkit-backdrop-filter:blur(14px) saturate(125%) !important;
  backdrop-filter:blur(14px) saturate(125%) !important;
}
body.theme-winter #app-sidebar.app-sidebar {
  background:rgba(8,29,55,.92) !important;
  background-image:linear-gradient(145deg,rgba(42,105,151,.20),rgba(5,20,43,.12)) !important;
  border:1px solid rgba(157,215,255,.34) !important;
  -webkit-backdrop-filter:blur(14px) saturate(125%) !important;
  backdrop-filter:blur(14px) saturate(125%) !important;
}
body.theme-ocean #app-sidebar.app-sidebar {
  background:rgba(4,35,45,.92) !important;
  background-image:linear-gradient(145deg,rgba(14,111,123,.20),rgba(3,24,38,.12)) !important;
  border:1px solid rgba(112,231,229,.32) !important;
  -webkit-backdrop-filter:blur(14px) saturate(125%) !important;
  backdrop-filter:blur(14px) saturate(125%) !important;
}
body.theme-halloween #app-sidebar #main-tabs-nav,
body.theme-winter #app-sidebar #main-tabs-nav,
body.theme-ocean #app-sidebar #main-tabs-nav {
  background:transparent !important;
  opacity:1 !important;
}
body.theme-halloween #app-sidebar .sidebar-heading,
body.theme-winter #app-sidebar .sidebar-heading,
body.theme-ocean #app-sidebar .sidebar-heading,
body.theme-halloween #app-sidebar .sidebar-foot,
body.theme-winter #app-sidebar .sidebar-foot,
body.theme-ocean #app-sidebar .sidebar-foot {
  background:transparent !important;
}
