:root {
  --qux-sidebar-width: 16rem;
  --qux-sidebar-height: 100vh;
  --qux-sidebar-navbar-height: 5rem;
  --qux-sidebar-background-color: rgb(240, 241, 244);
  --qux-sidebar-accent-color: #198754;
  --qux-sidebar-accent-light: rgba(25, 135, 84, 0.08);
  --qux-sidebar-hover-color: rgba(25, 135, 84, 0.12);
  --qux-sidebar-text-color: #2d3748;
  --qux-sidebar-icon-color: #718096;
}
@media screen and (max-width: 767px) {
  :root {
    --qux-sidebar-height: var(--qux-sidebar-navbar-height);
  }
}
.sidebar {
  align-items: center;
  --bs-navbar-padding-y: 0;
}
.sidebar-brand-and-button {
  height: var(--qux-sidebar-navbar-height);
}
.sidebar .container-fluid {
  align-items: stretch;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}
.sidebar .navbar-brand {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.sidebar .navbar-nav li.hover {
  transition: all 0.2s ease;
  border-radius: 0.375rem;
  margin: 0 0.25rem;
}
.sidebar .navbar-nav li.hover:hover {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 0.375rem;
  transform: translateX(2px);
}
.sidebar .navbar-nav li.hover:hover .btn-toggle i:first-child,
.sidebar .navbar-nav li.hover:hover a i:first-child {
  color: var(--qux-sidebar-accent-color);
}
@media screen and (min-width: 768px) {
  .sidebar {
    flex-direction: column;
  }
  .sidebar .container-fluid {
    box-shadow: none !important
  }
  .sidebar-navbar {
    border: 0;
  }
  #nav {
    width: var(--qux-sidebar-width);
    height: var(--qux-sidebar-height);
    background-color: var(--qux-sidebar-background-color);
  }
  .navbar.sidebar > .container-fluid {
    flex-direction: column;
    align-items: start !important;
  }
  .sidebar .dropup .dropdown-menu.show {
    position: absolute !important;
  }
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  margin-bottom: 0;
  list-style: none;
}
@media screen and (min-width: 768px) {
  .sidebar-expand-md {
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .sidebar-expand-md .navbar-toggler {
    display: none;
  }
  .sidebar-expand-md .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    align-items: stretch;
  }
}
#nav-top-left {
  border: none;
}
.navbar-brand {
  display: flex !important;
  align-items: center !important;
  white-space: nowrap !important;
}
.qux-rightside {
  overflow: hidden;
  padding-left: 1rem;
  padding-right: 1rem;
}
/* .qux-rightside-header alignment handled by media query */
.qux-rightside-header-title {
  display: flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
  font-size: 1.25em;
  font-weight: 700;
}
@media screen and (max-width: 767px) {
  .qux-rightside-header {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem;
  }
  .qux-rightside-header-title {
    margin-bottom: 1.25rem;
  }
}
@media screen and (min-width: 768px) {
  .qux-rightside-header-title {
    height: 80px !important;
    margin-bottom: -4px;
  }
}

/* Reconstructed styles for .btn-toggle based on visual evidence */
.btn-toggle {
  display: inline-flex;
  align-items: center;
  padding: .5rem;
  font-weight: 600;
  font-size: .925rem; /* Reduced font size */
  color: rgba(0, 0, 0, .65);
  background-color: transparent;
  border: 0;
}
.btn-toggle:hover,
.btn-toggle:focus {
  color: rgba(0, 0, 0, .85);
  background-color: transparent; /* hovering handled by li.hover */
}
.btn-toggle[data-bs-toggle="collapse"]::before {
  width: 1.25em;
  line-height: 0;
  content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
  transition: transform .35s ease;
  transform-origin: .5em 50%;
}
.btn-toggle[aria-expanded="true"] {
  color: rgba(0, 0, 0, .85);
}
.btn-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}
.btn-toggle-nav a {
  display: inline-flex;
  padding: .1875rem .5rem;
  margin-top: .125rem;
  margin-left: 1.25rem;
  text-decoration: none;
  color: rgba(0, 0, 0, .65);
}
.btn-toggle-nav a:hover,
.btn-toggle-nav a:focus {
  background-color: rgba(0, 0, 0, .05);
  border-radius: .25rem;
  color: rgba(0, 0, 0, .85);
}

/* ========================================
   Navbar Visual Enhancements
   ======================================== */

/* Section Headers with subtle green accent */
.nav-section-header {
  position: relative;
  margin-top: 0.25rem;
  margin-bottom: 0.125rem;
}
.nav-section-header small {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b !important;
  font-weight: 600 !important;
}
.nav-section-header small::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: var(--qux-sidebar-accent-color);
  border-radius: 2px;
}

/* Active nav item indicator */
.sidebar .navbar-nav li.nav-item.active {
  position: relative;
  background: var(--qux-sidebar-accent-light);
  border-radius: 0.375rem;
  margin: 0 0.25rem;
}
.sidebar .navbar-nav li.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--qux-sidebar-accent-color);
  border-radius: 0 2px 2px 0;
}
.sidebar .navbar-nav li.nav-item.active .btn-toggle,
.sidebar .navbar-nav li.nav-item.active a {
  color: var(--qux-sidebar-accent-color) !important;
  font-weight: 600;
}
.sidebar .navbar-nav li.nav-item.active i:first-child {
  color: var(--qux-sidebar-accent-color) !important;
}

/* Gradient dividers instead of plain hr */
.sidebar .navbar-nav .nav-divider hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(0, 0, 0, 0.1) 15%,
    rgba(0, 0, 0, 0.1) 85%,
    transparent
  );
  margin: 0.5rem 0.75rem;
}

/* Default icon color for nav items */
.sidebar .navbar-nav .nav-item .btn-toggle i:first-child,
.sidebar .navbar-nav .nav-item a i:first-child {
  color: var(--qux-sidebar-icon-color);
  transition: color 0.2s ease;
}

/* Admin menu - red icon styling */
.sidebar .navbar-nav .nav-item .btn-toggle.text-danger i:first-child {
  color: #dc3545 !important;
}

/* Account menu - green icon styling */
.sidebar .navbar-nav .nav-item .btn-toggle i.fa-circle-user {
  color: var(--qux-sidebar-accent-color) !important;
}

/* Favorites star icon - keep warning color */
.sidebar .navbar-nav .nav-item i.fa-star.text-warning {
  color: #f59e0b !important;
}

/* Enhanced btn-toggle transitions */
.btn-toggle i {
  transition: transform 0.2s ease, color 0.2s ease;
}
.sidebar .navbar-nav li.hover:hover .btn-toggle i.fa-chevron-down {
  transform: translateY(1px);
}

/* Subtle shadow for sidebar on desktop */
@media screen and (min-width: 768px) {
  #nav {
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
  }
}
