/**
 * Modern Sidebar Navigation
 * Clean, beautiful design matching the new homepage aesthetic
 */

:root {
  --sidebar-width: 260px;
  --sidebar-bg: #1e1e2d;
  --sidebar-item-hover: rgba(115, 103, 240, 0.1);
  --sidebar-item-active: rgba(115, 103, 240, 0.15);
  --primary-color: #7367f0;
  --text-primary: #e7e7ff;
  --text-secondary: #a8aabc;
  --border-color: rgba(115, 103, 240, 0.15);
}

/* Sidebar Container */
.modern-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo Section */
.sidebar-logo {
  padding: 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo a {
  display: flex;
  align-items: center;
}

.sidebar-logo-text {
  font-size: 1.375rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* Menu Container */
.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 0;
}

/* Custom Scrollbar */
.sidebar-menu::-webkit-scrollbar {
  width: 6px;
}

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

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(115, 103, 240, 0.3);
  border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(115, 103, 240, 0.5);
}

/* Menu Items */
.menu-item {
  margin: 0.25rem 0.625rem;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  min-height: 42px;
}

.menu-link:hover {
  background: var(--sidebar-item-hover);
  color: var(--text-primary);
}

.menu-link:active {
  transform: scale(0.98);
}

.menu-item.active .menu-link {
  background: var(--sidebar-item-active);
  color: var(--primary-color);
  font-weight: 600;
}

.menu-item.active .menu-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary-color);
  border-radius: 0 3px 3px 0;
}

/* Menu Icons */
.menu-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.menu-item.active .menu-icon {
  color: var(--primary-color);
}

/* Menu Headers */
.menu-header {
  padding: 1rem 1.5rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(232, 232, 255, 0.5);
  margin-top: 0.5rem;
}

.menu-header:first-child {
  margin-top: 0;
}

/* Notification Dot */
.notification-dot {
  width: 8px;
  height: 8px;
  background: #00d4aa;
  border-radius: 50%;
  margin-left: auto;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* Recommended Item */
.menu-item-recommended .menu-link {
  background: linear-gradient(90deg, rgba(0, 212, 170, 0.08), transparent);
  border-left: 2px solid #00d4aa;
}

.recommended-icon {
  color: #00d4aa !important;
  animation: recommendedPulse 2s ease-in-out infinite;
}

@keyframes recommendedPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Disabled Items */
.menu-item-disabled .menu-link {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.menu-link .ti-lock {
  margin-left: auto;
  font-size: 1rem;
  opacity: 0.6;
}

/* Success Icon (Pro) */
.text-success {
  color: #28c76f !important;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.sidebar-footer .btn {
  width: 100%;
  background: rgba(0, 119, 181, 0.1);
  border: 1px solid rgba(0, 119, 181, 0.3);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.sidebar-footer .btn:hover {
  background: rgba(0, 119, 181, 0.2);
  border-color: rgba(0, 119, 181, 0.5);
}

/* Mobile Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1099;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

/* Hamburger Menu Button */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(115, 103, 240, 0.1);
  border: 1px solid rgba(115, 103, 240, 0.2);
  border-radius: 8px;
  color: var(--primary-color);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background: rgba(115, 103, 240, 0.2);
  border-color: rgba(115, 103, 240, 0.4);
  box-shadow: 0 2px 8px rgba(115, 103, 240, 0.3);
}

.sidebar-toggle:active {
  transform: scale(0.95);
}

/* Mobile/Tablet Responsive */
@media (max-width: 1199.98px) {
  .modern-sidebar {
    transform: translateX(-100%);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
  }
  
  .sidebar-toggle {
    display: flex;
  }
  
  /* When menu is open */
  body.sidebar-open .modern-sidebar {
    transform: translateX(0);
  }
  
  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }
  
  body.sidebar-open {
    overflow: hidden;
  }
}

/* Desktop - Push content */
@media (min-width: 1200px) {
  .page-content {
    margin-left: var(--sidebar-width);
  }
}

/* Smooth transitions */
.modern-sidebar,
.sidebar-overlay,
.page-content {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

