.main-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--pgs-surface, #ffffff);
  border-right: 1px solid var(--pgs-border, #e7e7e7);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

@media (max-width: 767px) {
  .main-sidebar {
    top: 56px;
    height: calc(100vh - 56px);
  }
}

#navbar-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .main-sidebar {
    width: 25%;
  }
}

@media (min-width: 992px) {
  .main-sidebar {
    width: 16.666667%;
  }
}

.nav-wrapper {
  flex: 1;
  overflow-y: auto;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 0px;
  padding-right: 0px;
  min-height: 0;
}

.sidebar-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--pgs-border, #e7e7e7);
  padding-bottom: 0.5rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}

#client-select {
  align-items: center;
  margin-left: 15px;
  margin-right: 15px;
  overflow-x: hidden;
  max-width: calc(100% - 30px);
  margin-bottom: 7px;
}

#client-select:disabled {
  color: #6c757d !important;
  opacity: 0.65;
}

@media (max-width: 991.98px) {
  /* Hide legacy sidebar header nav (prevents stray divider/gap on small screens). */
  .main-sidebar .main-navbar .navbar-nav.border-left {
    display: none !important;
  }
}

.submenu {
  display: none;
}

.nav-item.is-open .submenu {
  display: block;
}

.nav-link.dropdown-toggle::after {
  content: none;
}

.nav-item.has-submenu .dropdown-toggle i {
  display: inline-block;
  transform: rotate(0deg);
}

.nav-item.has-submenu.is-open .dropdown-toggle i {
  transform: rotate(180deg);
}

.pgs-nav-item-row {
  display: flex;
  align-items: center;
}

.pgs-nav-item-row .nav-link {
  flex: 1;
}

.pgs-pulse-nav-item .nav-link {
  cursor: pointer;
}

.pgs-pulse-nav-item .nav-link .pgs-pulse-label {
  font-weight: 700;
  font-size: 15px;
}

.pgs-pulse-nav-item .nav-link:hover .pgs-pulse-label {
  text-decoration: underline;
}

#pgs-pulse-access-modal .modal-body p {
  font-size: 16px;
  line-height: 1.55;
}

#pgs-pulse-access-modal .modal-body a.pgs-sales-link {
  font-weight: 700;
  text-decoration: underline;
}

.modal-body a.pgs-sales-link:hover {
  text-decoration-thickness: 2px;
}

.pgs-access-lock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  border-radius: 999px;
  border: 1px solid var(--pgs-border, #e7e7e7);
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.pgs-access-lock-btn:hover {
  background: rgba(2, 6, 23, 0.04);
  color: #0f172a;
}

.pgs-nav-item-row .nav-link.active + .pgs-access-lock-btn {
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
}

.pgs-nav-item-row .nav-link.active + .pgs-access-lock-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.pgs-access-lock-btn i {
  font-size: 18px;
}

.pgs-modal-close {
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 0.25rem;
  cursor: pointer;
  line-height: 1;
}

.pgs-modal-close:hover {
  color: #0f172a;
}

@media (max-width: 767px) {
  .mobile-logout {
    padding: 1rem;
    color: #6c757d;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 1rem;
    margin-bottom: 0;
  }

  .mobile-logout:hover {
    border-left: 3px solid #dc3545 !important;
    border-right: none !important;
    background-color: #f8f9fa;
  }

  .mobile-logout .icon {
    display: flex;
    align-items: center;
    size: 1rem;
    margin-right: 0.8rem;
    margin-left: 0.8rem;
    margin-bottom: 0.2rem;
  }
}
