/* Task4Today release r180 - cache-safe final UI corrections. */

/* InfoClutch / Blue dashboard active range must never inherit the retired green accent. */
html[data-site-theme="infoclutch-blue"] #dashboardView .dash-preset.active,
html[data-site-theme="infoclutch-blue"] #dashboardView .dash-preset.active:hover,
html[data-site-theme="infoclutch-blue"] #dashboardView .dash-preset.active:focus-visible,
html[data-personal-theme="blue"] #dashboardView .dash-preset.active,
html[data-personal-theme="blue"] #dashboardView .dash-preset.active:hover,
html[data-personal-theme="blue"] #dashboardView .dash-preset.active:focus-visible {
  background: #518FEE !important;
  background-color: #518FEE !important;
  background-image: none !important;
  border-color: #518FEE !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(81, 143, 238, .24) !important;
}
html[data-site-theme="infoclutch-blue"] #dashboardView .dash-preset:not(.active):hover,
html[data-site-theme="infoclutch-blue"] #dashboardView .dash-preset:not(.active):focus-visible,
html[data-personal-theme="blue"] #dashboardView .dash-preset:not(.active):hover,
html[data-personal-theme="blue"] #dashboardView .dash-preset:not(.active):focus-visible {
  background: #E7F0FF !important;
  border-color: #B8D3FF !important;
  color: #245097 !important;
  -webkit-text-fill-color: #245097 !important;
}

/* Old blue-theme CSS explicitly hid this button for Super Admin/Owner.
   The role JS remains the permission authority; these rules only prevent stale CSS from hiding it. */
body.role-superadmin .sidebar .sidebar-footer,
body.role-org-admin .sidebar .sidebar-footer,
body.role-admin .sidebar .sidebar-footer {
  display: flex !important;
  flex: 0 0 auto !important;
  width: 100% !important;
}
body.role-superadmin .sidebar #manageTeamBtn,
body.role-org-admin .sidebar #manageTeamBtn,
body.role-admin .sidebar #manageTeamBtn {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* One real scroll owner for the whole sidebar: nav -> categories -> teams -> Manage Team. */
.sidebar {
  overflow: visible !important;
  min-height: 0 !important;
}
.sidebar > .sidebar-scroll-content {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: contain !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255,255,255,.48) transparent !important;
}
.sidebar > .sidebar-scroll-content::-webkit-scrollbar { width: 5px !important; display: block !important; }
.sidebar > .sidebar-scroll-content::-webkit-scrollbar-track { background: transparent !important; }
.sidebar > .sidebar-scroll-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,.48) !important; border-radius: 999px !important; }
.sidebar > .sidebar-scroll-content::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.68) !important; }
.sidebar > .sidebar-scroll-content > .side-group,
.sidebar > .sidebar-scroll-content .project-list,
.sidebar > .sidebar-scroll-content .category-list,
.sidebar > .sidebar-scroll-content .teams-sidebar-list,
.sidebar > .sidebar-scroll-content .team-list,
.sidebar > .sidebar-scroll-content > .sidebar-footer {
  flex: 0 0 auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.sidebar > .sidebar-scroll-content > .sidebar-footer {
  order: 9999 !important;
  position: static !important;
  margin-top: 8px !important;
  padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
}
.sidebar > .sidebar-scroll-content > .compact-spacer { margin-top: 0 !important; }

/* Bell must remain a live click target above decorative layers in all themes. */
#teamRequestNotificationBtn,
.notification-top-btn {
  position: relative !important;
  z-index: 50 !important;
  pointer-events: auto !important;
}
#teamRequestNotificationBtn > *,
.notification-top-btn > * { pointer-events: none !important; }
