/* Sidebar Navigation Styles */
.layout-with-sidebar {
  display: flex;
  min-height: calc(100vh - 120px); /* Account for header + breadcrumb */
  position: relative;
}

.app-sidebar {
  width: 280px;
  background: #FFFFFF;
  border-right: 1px solid #E6E8EC;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 73px; /* Header height */
  left: 0;
  height: calc(100vh - 73px);
  overflow-y: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.app-sidebar.collapsed {
  width: 64px;
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #E6E8EC;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: #F3F4F6;
  color: #1F2937;
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: opacity 0.2s ease;
}

.app-sidebar.collapsed .sidebar-title {
  opacity: 0;
  pointer-events: none;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 1rem 0.5rem;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Scrollbar Styles */
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Sidebar Section */
.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
}

.sidebar-section-icon {
  font-size: 1rem;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.app-sidebar.collapsed .sidebar-section-title {
  opacity: 0;
  pointer-events: none;
}

/* Sidebar Links */
.sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  margin: 0.15rem 0;
  color: #6B7280;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.sidebar-link:hover {
  background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
  color: #1F2937;
  transform: translateX(2px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  color: #4F46E5;
  font-weight: 600;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #4F46E5 0%, #6366F1 100%);
  border-radius: 0 2px 2px 0;
}

.sidebar-link-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  transition: transform 0.2s ease;
}

.sidebar-link:hover .sidebar-link-icon {
  transform: scale(1.1);
}

.sidebar-link-text {
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.app-sidebar.collapsed .sidebar-link-text {
  opacity: 0;
  pointer-events: none;
}

.app-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 0.65rem 0.5rem;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 0.5rem;
  border-top: 1px solid #E6E8EC;
  margin-top: auto;
}

/* Main Content Adjustment */
.main-content {
  flex: 1;
  min-width: 0; /* Prevent flex item from overflowing */
  padding: 2rem;
  background: #FAFBFC;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .app-sidebar {
    position: fixed;
    top: 110px; /* Mobile header + breadcrumb */
    left: 0;
    height: calc(100vh - 110px);
    transform: translateX(0);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .app-sidebar.collapsed {
    transform: translateX(-100%);
  }

  .main-content {
    padding: 1rem;
    width: 100%;
  }

  .layout-with-sidebar {
    min-height: calc(100vh - 110px);
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .app-sidebar {
    width: 240px;
  }

  .app-sidebar.collapsed {
    width: 60px;
  }
}

/* Dark Mode Support removed - sidebar stays white always */
/* Sidebar maintains consistent light styling */
