/* InfraTrack v2.3.4.1 Sidebar/Layout Repair
   Restores sidebar logo/header visibility while keeping sidebar scrollable. */

@media (min-width: 851px) {
  .side,
  .sidebar,
  aside.side {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 80 !important;
    background: #fff !important;
  }

  .side .brand,
  .sidebar .brand,
  aside.side .brand {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 2 !important;
    margin-bottom: 22px !important;
  }

  .side nav,
  .sidebar nav,
  aside.side nav {
    margin-top: 20px !important;
    padding-bottom: 38px !important;
  }

  .appbar,
  .topbar,
  header.appbar {
    position: fixed !important;
    left: 260px !important;
    right: 0 !important;
    top: 0 !important;
    height: 70px !important;
    z-index: 50 !important;
  }

  .main,
  main.main {
    margin-left: 260px !important;
    padding-top: 100px !important;
    min-height: 100vh !important;
  }
}

.side::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
aside.side::-webkit-scrollbar {
  width: 7px;
}
.side::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
aside.side::-webkit-scrollbar-track {
  background: transparent;
}
.side::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
aside.side::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--primary, #0b84ff) 35%, #cbd5e1);
  border-radius: 999px;
}

@media (max-width: 850px) {
  .side,
  .sidebar,
  aside.side {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    z-index: 1 !important;
  }

  .appbar,
  .topbar,
  header.appbar {
    position: relative !important;
    left: 0 !important;
    right: auto !important;
    top: auto !important;
    height: auto !important;
    z-index: 2 !important;
  }

  .main,
  main.main {
    margin-left: 0 !important;
    padding-top: 20px !important;
  }
}
