/* Sidebar Transitions */
#wrapper {
  overflow-x: hidden;
  display: flex;
  width: 100%;
  align-items: stretch;
}

#sidebar-wrapper {
  min-height: 100vh;
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  background-color: var(--crm-black-secondary);
  border-right: 1px solid rgba(212, 175, 55, 0.1);
  transition: margin 0.25s ease-out;
  display: flex;
  flex-direction: column;
}

#sidebar-wrapper .sidebar-heading {
  padding: 0.875rem 1.25rem;
  font-size: 1.2rem;
  color: var(--crm-gold);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

#sidebar-wrapper .list-group {
  width: var(--sidebar-width);
  padding: 10px;
}

#sidebar-wrapper .list-group-item {
  background-color: transparent;
  border: none;
  color: var(--crm-text-secondary);
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

#sidebar-wrapper .list-group-item:hover {
  background-color: rgba(212, 175, 55, 0.1);
  color: var(--crm-gold);
  padding-left: 25px; /* Slide effect */
}

#sidebar-wrapper .list-group-item.active {
  background-color: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--crm-gold);
  font-weight: 600;
  padding-left: 25px; /* Maintain the slide effect permanently for active item */
}

/* Page Content */
#page-content-wrapper {
  min-width: 100vw;
  width: 100%;
  transition: margin 0.25s ease-out;
}

/* Mobile Toggle State (Hidden Sidebar) */
body.sb-sidenav-toggled #sidebar-wrapper {
  margin-left: calc(-1 * var(--sidebar-width));
}

@media (min-width: 768px) {
  #page-content-wrapper {
    min-width: 0;
    width: 100%;
  }

  /* Desktop Toggle State (Hidden Sidebar) */
  body.sb-sidenav-toggled #sidebar-wrapper {
    margin-left: calc(-1 * var(--sidebar-width));
  }
}

/* Helper for stats card icon */
.icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
