.sidebar {
  display: flex;
  flex-direction: column;
  width: 10rem;
  overflow: hidden;
  text-align: center;
  /*background-color: var(--sidebar-background-color, #f3f4f6);*/
  color: var(--sidebar-color-text, #374151);
  border-radius: 0.5rem;
  transition: width 0.3s ease;
  min-height: calc(100vh - var(--header-height, 0px) - 100px) !important;
  max-height: calc(100vh - var(--header-height, 0px) - 100px) !important;
}

.sidebar--collapsed {
  width: 4rem;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.sidebar__brand-icon {
  width: 2rem;
  height: 2rem;
  fill: currentColor;
  flex-shrink: 0;
}

.sidebar__brand-text {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

.sidebar--collapsed .sidebar__brand-text {
  display: none;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.sidebar__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar__item {
  margin-top: 0.75rem;
  /*border-top: 1px solid var(--sidebar-border-color, #d1d5db);*/
  padding-top: 0.75rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;

}

.sidebar__item:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.sidebar__link {
  display: flex;
  align-items: center;
  justify-content: left;
  width: 100%;
  height: 3rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.25s;
  position: relative;
}

.sidebar__link:hover {
  background-color: var(--sidebar-hover-color, #d1d5db);
}

.sidebar__item--active .sidebar__link {
  background-color: var(--sidebar-active-color, #d1d5db);
}

.sidebar__icon {
  /*width: 1.5rem;
  height: 1.5rem;*/
  flex-shrink: 0;
}

.sidebar__text {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.sidebar--collapsed .sidebar__text {
  display: none;
}

.sidebar__badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--sidebar-badge-color, #6366f1);
  border-radius: 9999px;
}

.sidebar__bottom {
  background-color: var(--sidebar-bottom-background, #e5e7eb);
  border-radius: 0.5rem;
}

.sidebar__bottom .sidebar__link:hover {
  background-color: var(--sidebar-bottom-hover, #d1d5db);
}

/* Desktop expanded view */
@media (min-width: 768px) {
  .sidebar {
    width: 10rem;
  }
  
  .sidebar--collapsed {
    width: 4rem;
  }
}

/* Mobile responsive */
@media (max-width: 767px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 85%;
    max-width: 20rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar--open {
    transform: translateX(0);
  }
}
