/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 250px;
  background-color: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
  overflow-y: auto;
  z-index: 50;
  transition: transform 0.3s ease, width 0.3s ease;
  display: none; /* Hidden by default */
}

/* Show sidebar only on mobile when opened */
@media (max-width: 767px) {
  .sidebar.open {
    display: block;
    transform: translateX(0);
  }

  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid hsl(var(--border));
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.sidebar-logo img {
  width: 2rem;
  height: 2rem;
}

.sidebar-close {
  background: transparent;
  border: none;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-close:hover {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.sidebar-content {
  padding: 1rem 0;
}

.sidebar-section {
  margin-bottom: 1rem;
}

.sidebar-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.05em;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item {
  padding: 0;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: background-color 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
}

.sidebar-nav-link:hover {
  background-color: hsl(var(--muted) / 0.5);
}

.sidebar-nav-link.active {
  background-color: hsla(var(--primary) / 0.15);
  color: hsl(var(--primary));
  font-weight: 600;
}

.sidebar-nav-link i {
  margin-right: 0.75rem;
  width: 1rem;
  height: 1rem;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
  margin-top: auto;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 40;
  display: none;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Main content adjustments */
#main-content {
  transition: margin-left 0.3s ease, width 0.3s ease;
  width: 100%;
  margin-left: 0;
}

/* Dark mode adjustments */
.dark .sidebar {
  background-color: hsl(var(--card));
  border-color: hsl(var(--border));
}

.dark .sidebar-header,
.dark .sidebar-footer {
  border-color: hsl(var(--border));
}

.dark .sidebar-close:hover {
  background-color: hsl(var(--muted));
}

.dark .sidebar-nav-link:hover {
  background-color: hsl(var(--muted) / 0.5);
}

.dark .sidebar-nav-link.active {
  background-color: hsla(var(--primary) / 0.15);
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .sidebar {
    width: 280px;
  }
}
