/**
 * SIDEBAR NAVIGATION STYLES
 * Dark theme matching madgicx.com structure
 */

.app-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: rgba(20, 27, 45, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

.app-sidebar::-webkit-scrollbar {
  width: 6px;
}

.app-sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Header */
.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.2;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 0.5rem;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

.nav-section-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-section-header.active {
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid #6366F1;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.section-arrow {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease;
}

.nav-section-content {
  padding: 0.5rem 0;
}

/* Navigation Items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem 0.75rem 2.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-left-color: rgba(99, 102, 241, 0.5);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.1);
  color: #818CF8;
  border-left-color: #6366F1;
}

.nav-icon {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.nav-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Subsection */
.nav-subsection {
  margin-top: 0.25rem;
}

.nav-subsection-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem 0.75rem 2.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

.nav-subsection-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.subsection-arrow {
  margin-left: auto;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease;
}

.nav-subsection-content {
  padding: 0.25rem 0;
  display: none;
}

.nav-subsection-content.active {
  display: block;
}

.nav-item-sub {
  display: block;
  padding: 0.625rem 1.5rem 0.625rem 4rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  font-size: 0.875rem;
}

.nav-item-sub:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-left-color: rgba(99, 102, 241, 0.5);
}

.nav-item-sub.active {
  background: rgba(99, 102, 241, 0.1);
  color: #818CF8;
  border-left-color: #6366F1;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-footer-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.sidebar-footer-link:hover {
  color: #818CF8;
}

/* Responsive */
@media (max-width: 1024px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .dashboard-main,
  #root {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* Mobile Menu Toggle */
.sidebar-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  background: rgba(20, 27, 45, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  display: none;
}

.sidebar-toggle:hover {
  background: rgba(20, 27, 45, 1);
}

@media (max-width: 1024px) {
  .sidebar-toggle {
    display: block;
  }
}








