/* Enhanced Sidebar Styles - Beautiful Design */
.sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
  backdrop-filter: blur(20px);
  border-right: 2px solid var(--border-light);
  z-index: var(--z-modal);
  transition: var(--transition-all);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

.sidebar.show {
  left: 0;
}

.sidebar.mobile-hidden {
  left: -320px;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-all);
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Enhanced Sidebar Header */
.sidebar-header {
  padding: var(--space-8);
  border-bottom: 2px solid var(--border-light);
  background: linear-gradient(135deg, var(--surface-elevated) 0%, var(--surface) 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: var(--space-8);
  right: var(--space-8);
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

/* Beautiful Brand Section */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex: 1;
}

.brand-logo {
  position: relative;
}

.logo-chart {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  padding: 8px;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
  position: relative;
  overflow: hidden;
}

.logo-chart::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
  animation: logoShimmer 3s ease-in-out infinite;
}

.logo-icon {
  width: 64px;
  height: 64px;
  background: transparent;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  color: white;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
  animation: logoFloat 4s ease-in-out infinite !important;
  transition: var(--transition-all);
}
.logo-icon {
  width: 64px;
  height: 64px;
  background: transparent !important;
  box-shadow: none !important;
  
  padding: 0;
  }
  .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  }
@keyframes logoFloat {
  0%, 100% { 
      transform: translateY(0px);
      box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
  }
  50% { 
      transform: translateY(-8px);
      box-shadow: 0 16px 48px rgba(99, 102, 241, 0.3);
  }
}

.logo-icon:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
}

.logo-text {
  font-size: var(--text-3xl);
  font-weight: var(--font-black);
  letter-spacing: -0.05em;
  color: var(--text-primary);
}

@keyframes logoShimmer {
  0%,
  100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

.chart-bar {
  width: 4px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  animation: chartPulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

@keyframes chartPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.2);
  }
}

.brand-text {
  flex: 1;
}

.brand-name {
  font-size: var(--text-xl);
  font-weight: var(--font-black);
  letter-spacing: -0.025em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-1);
}

.brand-version {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--surface);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  display: inline-block;
}

.sidebar-close {
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  padding: var(--space-3);
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--radius-lg);
  transition: var(--transition-all);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: relative;
  overflow: hidden;
}

.sidebar-close::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: var(--transition-all);
}

.sidebar-close:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.sidebar-close:hover::before {
  left: 100%;
}

/* Enhanced Sidebar Content */
.sidebar-nav {
  padding: var(--space-6) var(--space-4);
  height: calc(100vh - 140px);
  overflow-y: auto;
  position: relative;
}

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

.sidebar-nav::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: var(--radius-full);
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--border-medium);
}

/* Enhanced Navigation */
.nav-section {
  margin-bottom: var(--space-8);
}

.nav-section-title {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 var(--space-4) var(--space-3);
  margin-bottom: var(--space-4);
  position: relative;
}

.nav-section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 1px;
  background: var(--border-light);
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: var(--space-2);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-xl);
  transition: var(--transition-all);
  font-weight: var(--font-medium);
  font-size: var(--text-base);
  position: relative;
  overflow: hidden;
  margin: 0 var(--space-2);
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: var(--transition-all);
}

.nav-link:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  transform: translateX(4px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link.active {
  background: var(--gradient-primary);
  color: white;
  font-weight: var(--font-semibold);
  box-shadow: var(--shadow-lg);
  transform: translateX(4px);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.nav-link:active {
  transform: translateX(2px) scale(0.98);
}

.nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: var(--transition-all);
}

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

.nav-link.active .nav-icon {
  transform: scale(1.15);
}

/* Responsive Design */
@media (min-width: 1025px) {
  .sidebar {
    position: fixed;
    left: 0;
  }

  .sidebar.show {
    left: 0;
  }

  .sidebar-overlay {
    display: none;
  }
}

@media (max-width: 1024px) {
  .sidebar {
    width: 100%;
    max-width: 320px;
    left: -100%;
  }

  .sidebar.show {
    left: 0;
  }

  .sidebar.mobile-hidden {
    left: -100%;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    max-width: none;
  }

  .sidebar-header {
    padding: var(--space-6);
  }

  .nav-link {
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-lg);
  }

  .nav-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 640px) {
  .sidebar-header {
    padding: var(--space-4);
  }

  .nav-link {
    padding: var(--space-3) var(--space-4);
  }
}

/* Enhanced Accessibility */
.nav-link:focus {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Enhanced High Contrast Mode */
@media (prefers-contrast: high) {
  .sidebar {
    border-right-width: 3px !important;
    border-right-color: var(--text-primary) !important;
  }

  .nav-link.active {
    background: var(--text-primary) !important;
    color: var(--background) !important;
  }

  .nav-section-title::after {
    background: var(--text-primary) !important;
    height: 2px !important;
  }
}

/* Enhanced Print Styles */
@media print {
  .sidebar,
  .sidebar-overlay {
    display: none !important;
  }
}

/* Enhanced Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .nav-link,
  .nav-icon,
  .chart-bar,
  .logo-chart::before {
    transition: none !important;
    animation: none !important;
  }

  .nav-link:hover {
    transform: none !important;
  }
}
