@media (min-width: 768px) {
  #sidebarMenu.col-md-4 {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 200px;
  }
  #sidebarMenu.col-md-4.sidebar-locked {
    flex: 0 0 var(--sidebar-w) !important;
    width: var(--sidebar-w) !important;
    min-width: var(--sidebar-w) !important;
    max-width: var(--sidebar-w) !important;
  }
  #sidebarMenu.sidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 54px !important;
    left: auto !important;
    height: calc(100vh - 54px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-top: 0.5rem !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    align-self: flex-start !important;
    -webkit-overflow-scrolling: touch;
  }
  [data-bs-theme='dark'] #sidebarMenu.sidebar.bg-light {
    background: #18181b !important;
  }
  [data-bs-theme='dark'] #sidebarMenu .sbb-sep {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
  }
  #sidebarMenu .nav-link,
  #sidebarMenu .sidebar-heading,
  #sidebarMenu h6 {
    white-space: nowrap;
  }
  main[class*='col-md-8'] {
    flex: 1 1 0% !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    min-width: 0 !important;
  }
}
@media (min-width: 992px) {
  main[class*='col-md-8'].py-lg-5 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}
@supports (overscroll-behavior: contain) {
  @media (min-width: 768px) {
    #sidebarMenu.sidebar {
      overscroll-behavior: contain !important;
    }
  }
}
main > h1:first-of-type,
main > h2:first-of-type,
main > div:first-of-type > h1:first-of-type,
main > div:first-of-type > h2:first-of-type,
main > div:first-of-type > div h1:first-of-type,
main > div:first-of-type > div h2:first-of-type {
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 0 1rem 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}
main > h1:first-of-type i,
main > h2:first-of-type i,
main > div:first-of-type > h1:first-of-type i,
main > div:first-of-type > h2:first-of-type i,
main > div:first-of-type > div h1:first-of-type i,
main > div:first-of-type > div h2:first-of-type i {
  font-size: 1.1em;
  color: #6c757d;
}

@media (max-width: 767.98px) {
  #sidebarMenu {
    display: none !important;
  }
  #sidebarMenu.show {
    display: block !important;
  }
}

.sidebar-top-groups ul {
  margin: 0 !important;
  padding: 0 !important;
}
.sidebar-top-groups .sbb-row .sbb-main {
  text-decoration: none;
}
.sidebar-top-groups .sbb-row .sbb-main:hover {
  text-decoration: none;
}
.sidebar-top-groups + .sidebar-bottom-buttons {
  margin-top: 0;
}
#sbgAccordion > ul.nav > li.nav-item > a.nav-link {
  color: #495057;
  background: transparent;
  border-radius: 0;
}
#sbgAccordion > ul.nav > li.nav-item > a.nav-link:hover {
  background: #d0cdcb;
  color: #000;
}
#sbgAccordion > ul.nav > li.nav-item > a.nav-link.active {
  background: #fde4c2;
  color: #7c2d12;
  box-shadow: inset 3px 0 0 #ea7c1c;
}
#sbgAccordion > ul.nav > li.nav-item > a.nav-link.active:hover {
  background: #fbcd84;
  color: #7c2d12;
}
#sidebarMenu .sbb-row .sbb-chev {
  position: relative;
  z-index: 2;
}

[data-bs-theme='dark'] #sbgAccordion > ul.nav > li.nav-item > a.nav-link {
  color: #a1a1aa;
  background: transparent;
}
[data-bs-theme='dark'] #sbgAccordion > ul.nav > li.nav-item > a.nav-link:hover {
  background: #3f3f46;
  color: #fafafa;
}
[data-bs-theme='dark'] #sbgAccordion > ul.nav > li.nav-item > a.nav-link.active {
  background: rgba(234, 124, 28, 0.18);
  color: #fdba74;
  box-shadow: inset 3px 0 0 #ea7c1c;
}
[data-bs-theme='dark'] #sbgAccordion > ul.nav > li.nav-item > a.nav-link.active:hover {
  background: rgba(234, 124, 28, 0.26);
  color: #fed7aa;
}

.sidebar-bottom-buttons ul {
  margin: 0 !important;
  padding: 0 !important;
}
.sidebar-bottom-buttons .sbb-sep {
  margin: 0 !important;
  border-top-color: rgba(0, 0, 0, 0.12);
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-sep {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.sidebar-bottom-buttons .sbb-row {
  display: flex;
  align-items: stretch;
  padding: 0;
  border-radius: 0;
  background: #f7f8f9;
  transition: background 0.15s ease;
}
.sidebar-bottom-buttons .sbb-row .sbb-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding-right: 0.5rem;
  color: #495057;
  border-radius: 0;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}
.sidebar-bottom-buttons .sbb-row .sbb-chev {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  border: none;
  background: transparent;
  color: #adb5bd;
  cursor: pointer;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0;
  border-radius: 0;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.sidebar-bottom-buttons .sbb-row .sbb-chev i {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}

.sidebar-bottom-buttons .sbb-row:hover {
  background: #d0cdcb;
}
.sidebar-bottom-buttons .sbb-row:hover .sbb-main {
  color: #000;
}
.sidebar-bottom-buttons .sbb-row:hover .sbb-chev {
  color: #000;
}
.sidebar-bottom-buttons .sbb-row .sbb-chev:hover {
  background: #d0cdcb;
  color: #000;
}
.sidebar-bottom-buttons .sbb-row .sbb-chev:not(.collapsed) {
  background: #d0cdcb;
  color: #000;
}
.sidebar-bottom-buttons .sbb-row .sbb-chev:not(.collapsed) i {
  transform: rotate(180deg);
}

.sidebar-bottom-buttons .sbb-row.active:hover {
  background: #d0cdcb;
}
.sidebar-bottom-buttons .sbb-row.active:hover .sbb-main {
  color: #000;
}
.sidebar-bottom-buttons .sbb-row.active:hover .sbb-chev {
  color: #000;
}

.sidebar-bottom-buttons .sbb-row.active {
  background: #f7f8f9;
}
.sidebar-bottom-buttons .sbb-row.active .sbb-main {
  color: #495057;
}
.sidebar-bottom-buttons .sbb-row.active .sbb-chev {
  color: #adb5bd;
  border-left-color: rgba(0, 0, 0, 0.06);
}
.sidebar-bottom-buttons .sbb-row.active .sbb-chev:hover {
  background: #d0cdcb;
  color: #000;
}
.sidebar-bottom-buttons .sbb-row.active .sbb-chev:not(.collapsed) {
  background: #d0cdcb;
  color: #000;
}

.sidebar-bottom-buttons .sbb-drop {
  background: #f3f3f2;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.sidebar-bottom-buttons .sbb-drop .nav-link {
  color: #000;
  font-size: 0.86rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
.sidebar-bottom-buttons .sbb-drop .nav-link:hover {
  background: #d0cdcb;
  color: #000;
  border-radius: 0;
}
.sidebar-bottom-buttons .sbb-drop .nav-link.active,
.sidebar-bottom-buttons .sbb-drop .nav-link.sbb-sub-active {
  background: #fde4c2;
  color: #7c2d12;
  box-shadow: inset 3px 0 0 #ea7c1c;
  border-radius: 0;
}
.sidebar-bottom-buttons .sbb-drop .nav-link.active:hover,
.sidebar-bottom-buttons .sbb-drop .nav-link.sbb-sub-active:hover {
  background: #fbcd84;
  color: #7c2d12;
}

.sidebar-bottom-buttons .sbb-drop.sbb-drop-active {
  background: #f3f3f2;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.sidebar-bottom-buttons .sbb-drop.sbb-drop-active .nav-link {
  color: #000;
}
.sidebar-bottom-buttons .sbb-drop.sbb-drop-active .nav-link:hover {
  background: #d0cdcb;
  color: #000;
  border-radius: 0;
}
.sidebar-bottom-buttons .sbb-drop.sbb-drop-active .nav-link.active,
.sidebar-bottom-buttons .sbb-drop.sbb-drop-active .nav-link.sbb-sub-active {
  background: #fde4c2;
  color: #7c2d12;
  box-shadow: inset 3px 0 0 #ea7c1c;
}
.sidebar-bottom-buttons .sbb-drop.sbb-drop-active .nav-link.active:hover,
.sidebar-bottom-buttons .sbb-drop.sbb-drop-active .nav-link.sbb-sub-active:hover {
  background: #fbcd84;
  color: #7c2d12;
}

[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row {
  background: #1f1f23;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row .sbb-main {
  color: #a1a1aa;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row .sbb-chev {
  border-left-color: rgba(255, 255, 255, 0.08);
  color: #52525b;
  background: transparent;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row:hover {
  background: #3f3f46;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row:hover .sbb-main,
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row:hover .sbb-chev {
  color: #fafafa;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row .sbb-chev:hover,
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row .sbb-chev:not(.collapsed) {
  background: #3f3f46;
  color: #fafafa;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row.active {
  background: #1f1f23;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row.active .sbb-main {
  color: #a1a1aa;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row.active .sbb-chev {
  background: transparent;
  color: #52525b;
  border-left-color: rgba(255, 255, 255, 0.08);
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row.active:hover {
  background: #3f3f46;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row.active:hover .sbb-main,
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row.active:hover .sbb-chev {
  color: #fafafa;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row.active .sbb-chev:hover,
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-row.active .sbb-chev:not(.collapsed) {
  background: #3f3f46;
  color: #fafafa;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-drop {
  background: #27272a;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-drop .nav-link {
  color: #f4f4f5;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-drop .nav-link:hover {
  background: #3f3f46;
  color: #fff;
  border-radius: 0;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-drop .nav-link.active,
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-drop .nav-link.sbb-sub-active {
  background: rgba(234, 124, 28, 0.18);
  color: #fdba74;
  box-shadow: inset 3px 0 0 #ea7c1c;
}
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-drop .nav-link.active:hover,
[data-bs-theme='dark'] .sidebar-bottom-buttons .sbb-drop .nav-link.sbb-sub-active:hover {
  background: rgba(234, 124, 28, 0.26);
  color: #fed7aa;
}

#favoritesPickerModal .fav-picker-row {
  cursor: pointer;
  transition: background 0.1s;
}
#favoritesPickerModal .fav-picker-row:hover {
  background: var(--bs-tertiary-bg);
}
#favoritesPickerModal .fav-picker-row input:checked ~ span {
  color: var(--bs-warning-text-emphasis, #92400e);
  font-weight: 500;
}
.sidebar-top-groups .sbb-drop.sbb-drop-active .nav-link[href*='favoritesPicker'] {
  font-style: italic;
  opacity: 0.85;
}

.fav-edit-link {
  display: inline-block;
  color: #6c757d;
  text-decoration: none;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  opacity: 0.75;
  transition:
    color 0.15s,
    background 0.15s,
    opacity 0.15s;
}
.fav-edit-link:hover {
  color: #000;
  background: #d0cdcb;
  opacity: 1;
}
.fav-edit-link i {
  font-size: 9px;
}
[data-bs-theme='dark'] .fav-edit-link {
  color: #a8a29e;
}
[data-bs-theme='dark'] .fav-edit-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

#favoritesPickerModal .fav-order-row {
  cursor: grab;
  transition:
    transform 0.1s,
    box-shadow 0.1s,
    opacity 0.1s;
}
#favoritesPickerModal .fav-order-row:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
#favoritesPickerModal .fav-order-row.dragging {
  opacity: 0.4;
  cursor: grabbing;
}
#favoritesPickerModal .fav-order-row.drag-over {
  box-shadow: inset 0 3px 0 #f59e0b;
}
