/* Stunning Professional Navigation Sidebar Styling */

/* ============================
   MAIN SIDEBAR CONTAINER
   ============================ */

.nav-sidebar {
  /* Core Layout & Positioning */
  background: #fff !important;
  border-right: none !important;
  width: 70px !important;
  min-width: 70px !important;
  max-width: 240px !important;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box !important;
  border-right: 1px solid rgba(226, 232, 240, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  /* Enhanced visibility */
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1000 !important;
  
  /* Smooth transitions */
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  
  /* Positioning */
  position: fixed !important;
  left: 0;
  top: 0;  height: 100vh !important;
  max-height: 100vh !important;
  overflow: visible !important;

  /* Force border-box model */
  box-sizing: border-box !important;
}

.nav-sidebar.expanded {
  width: 240px !important;
}

.nav-sidebar > * {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Subtle glass effect overlay */
.nav-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(248, 250, 252, 0.8) 50%,
    rgba(241, 245, 249, 0.7) 100%
  );
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
}

/* Elegant border accent */
.nav-sidebar::after {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 0;
  width: 3px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    #3b82f6 20%,
    #6366f1 50%,
    #8b5cf6 80%,
    transparent 100%
  );
  border-radius: 0 2px 2px 0;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.nav-sidebar:hover::after {
  opacity: 1;
}

/* ============================
   LOGO CONTAINER STYLING
   ============================ */

.nav-sidebar .logo-container {
  position: relative;
  padding: 1.75rem 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(248, 250, 252, 0.9) 100%
  );
  border-bottom: 1px solid rgba(226, 232, 240, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Enhanced full logo styling when expanded */
.nav-sidebar .full-logo {
  min-height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  overflow: visible !important;
  padding: 0 16px !important;
}

/* Brand name component styling in expanded sidebar */
.nav-sidebar .brand-logo-expanded {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: scale(1) !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
  overflow: visible !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

/* Enhanced brand name hover effects */
.nav-sidebar .brand-logo-expanded:hover {
  transform: scale(1.05) !important;
  filter: brightness(1.1) !important;
}

/* Brand name animation keyframes */
@keyframes brandLogoFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Apply animation when sidebar expands */
.nav-sidebar.expanded .brand-logo-expanded {
  animation: brandLogoFadeIn 0.4s ease-out forwards;
  animation-delay: 0.1s;
}

/* Elegant logo backdrop */
.nav-sidebar .logo-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.05) 0%,
    rgba(59, 130, 246, 0.02) 50%,
    transparent 100%
  );
  border-radius: 50%;
  z-index: -1;
}

/* Enhanced Small Logo */
.nav-sidebar .small-logo {
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #3b82f6) !important;
  color: white !important;
  border-radius: 16px !important;
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 22px !important;
  box-shadow: 
    0 8px 24px rgba(79, 70, 229, 0.25),
    0 4px 12px rgba(79, 70, 229, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  visibility: visible !important;
  opacity: 1 !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  position: relative;
  overflow: hidden;
}

/* Magical hover effect for logo */
.nav-sidebar .small-logo::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.nav-sidebar .small-logo:hover::before {
  transform: translateX(100%);
}

.nav-sidebar .small-logo:hover {
  transform: scale(1.08) rotate(3deg) !important;
  box-shadow: 
    0 12px 32px rgba(79, 70, 229, 0.35),
    0 6px 16px rgba(79, 70, 229, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* Small logo text styling */
.nav-sidebar .small-logo span {
  color: white !important;
  font-weight: 800 !important;
  font-size: 22px !important;
  font-family: 'Inter', sans-serif !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  line-height: 1 !important;
}

/* Full logo styling when expanded */
.nav-sidebar .full-logo {
  width: 100% !important;
  text-align: center !important;
  display: flex !important;
  justify-content: center !important;
  overflow: visible !important;
  filter: drop-shadow(0 2px 6px rgba(79, 70, 229, 0.15));
}

.nav-sidebar .brand-testenzia {
  transform: scale(0.95) !important;
  transition: all 0.3s ease !important;
}

/* ============================
   NAVIGATION ITEMS STYLING
   ============================ */

.nav-sidebar nav {
  padding: 0 0.75rem;
  height: calc(100vh - 200px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin-bottom: 100px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(79, 70, 229, 0.2) transparent;
}

/* Custom scrollbar styling */
.nav-sidebar nav::-webkit-scrollbar {
  width: 4px;
}

.nav-sidebar nav::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
}

.nav-sidebar nav::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    rgba(79, 70, 229, 0.3),
    rgba(124, 58, 237, 0.3)
  );
  border-radius: 10px;
  transition: background 0.3s ease;
}

.nav-sidebar nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    to bottom,
    rgba(79, 70, 229, 0.5),
    rgba(124, 58, 237, 0.5)
  );
}

/* Navigation list styling */
.nav-sidebar nav ul {
  padding: 0.5rem 0;
  space-y: 0.375rem;
}

.nav-sidebar nav ul li {
  margin-bottom: 0.5rem;
  position: relative;
}

/* Navigation item containers */
.nav-sidebar nav ul li a div {
  border-radius: 16px !important;
  margin: 0.25rem 0 !important;
  padding: 0.875rem 1rem !important;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Elegant hover animation preparation */
.nav-sidebar nav ul li a div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(79, 70, 229, 0.08) 0%,
    rgba(124, 58, 237, 0.05) 50%,
    transparent 100%
  );
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  z-index: -1;
}

/* Stunning hover effects */
.nav-sidebar nav ul li a div:hover {
  transform: translateY(-2px) translateX(3px) !important;
  box-shadow: 
    0 12px 24px rgba(79, 70, 229, 0.12),
    0 6px 12px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(248, 250, 252, 0.8) 100%
  ) !important;
  border-color: rgba(79, 70, 229, 0.15) !important;
}

.nav-sidebar nav ul li a div:hover::before {
  width: 100%;
}

/* Active navigation item styling */
.nav-sidebar nav ul li a div.bg-blue-50,
.nav-sidebar nav ul li a div[class*="bg-blue-50"],
.nav-sidebar nav ul li a div.active-nav-item {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.12) 0%,
    rgba(59, 130, 246, 0.08) 50%,
    rgba(124, 58, 237, 0.06) 100%
  ) !important;
  border: 1px solid rgba(79, 70, 229, 0.2) !important;
  box-shadow: 
    0 8px 20px rgba(79, 70, 229, 0.15),
    0 4px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  position: relative;
  transform: translateY(-1px) !important;
}

/* Active item glow indicator */
.nav-sidebar nav ul li a div.bg-blue-50::after,
.nav-sidebar nav ul li a div[class*="bg-blue-50"]::after,
.nav-sidebar nav ul li a div.active-nav-item::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 
    0 0 8px rgba(79, 70, 229, 0.6),
    0 0 4px rgba(79, 70, 229, 0.4);
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { 
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  50% { 
    opacity: 0.7;
    transform: translateY(-50%) scale(1.2);
  }
}

/* Navigation icons enhancement */
.nav-sidebar nav ul li a div svg {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.nav-sidebar nav ul li a div:hover svg {
  transform: scale(1.1) rotate(-2deg) !important;
  filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.3));
}

/* Navigation text styling */
.nav-sidebar nav ul li a div span {
  font-weight: 500 !important;
  letter-spacing: -0.02em !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  transition: all 0.3s ease !important;
}

.nav-sidebar nav ul li a div:hover span {
  font-weight: 600 !important;
  transform: translateX(2px) !important;
}

/* ============================
   USER PROFILE SECTION
   ============================ */

.nav-sidebar .fixed.bottom-0,
.nav-sidebar .absolute.bottom-0 {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 1) 70%,
    rgba(255, 255, 255, 0.95) 90%,
    rgba(255, 255, 255, 0) 100%
  ) !important;
  border-top: 1px solid rgba(226, 232, 240, 0.5) !important;
  box-shadow: 
    0 -8px 24px rgba(0, 0, 0, 0.04),
    0 -4px 12px rgba(0, 0, 0, 0.02) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 100 !important;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  padding-top: 20px !important;
}

/* User avatar styling */
.nav-sidebar .w-10.h-10.bg-blue-500,
.nav-sidebar .w-10.h-10.bg-gradient-to-br {
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #3b82f6) !important;
  box-shadow: 
    0 6px 20px rgba(79, 70, 229, 0.3),
    0 3px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  position: relative;
  overflow: hidden;
}

/* Avatar shimmer effect */
.nav-sidebar .w-10.h-10.bg-blue-500::before,
.nav-sidebar .w-10.h-10.bg-gradient-to-br::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: translateX(-100%) rotate(45deg);
  transition: transform 0.6s ease;
}

.nav-sidebar .w-10.h-10.bg-blue-500:hover::before,
.nav-sidebar .w-10.h-10.bg-gradient-to-br:hover::before {
  transform: translateX(100%) rotate(45deg);
}

.nav-sidebar .w-10.h-10.bg-blue-500:hover,
.nav-sidebar .w-10.h-10.bg-gradient-to-br:hover {
  transform: scale(1.08) rotate(-2deg) !important;
  box-shadow: 
    0 8px 28px rgba(79, 70, 229, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* ============================
   LOGOUT BUTTON STYLING
   ============================ */

.nav-sidebar [aria-label="Logout"],
.nav-sidebar [role="button"] {
  border-radius: 16px !important;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  overflow: hidden !important;
  position: relative !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Elegant logout hover effect */
.nav-sidebar [aria-label="Logout"]::before,
.nav-sidebar [role="button"]::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(
    to top,
    rgba(239, 68, 68, 0.08) 0%,
    rgba(239, 68, 68, 0.04) 50%,
    transparent 100%
  );
  transition: height 0.3s ease;
  z-index: -1;
  border-radius: 16px;
}

.nav-sidebar [aria-label="Logout"]:hover::before,
.nav-sidebar [role="button"]:hover::before {
  height: 100%;
}

.nav-sidebar [aria-label="Logout"]:hover,
.nav-sidebar [role="button"]:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(254, 242, 242, 0.8) 100%
  ) !important;
  transform: translateY(-2px) translateX(2px) !important;
  box-shadow: 
    0 8px 20px rgba(239, 68, 68, 0.15),
    0 4px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(239, 68, 68, 0.15) !important;
}

.nav-sidebar [aria-label="Logout"]:hover svg,
.nav-sidebar [role="button"]:hover svg {
  color: #ef4444 !important;
  transform: scale(1.1) rotate(-3deg) !important;
  filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.3));
}

.nav-sidebar [aria-label="Logout"] span,
.nav-sidebar [role="button"] span {
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
}

.nav-sidebar [aria-label="Logout"]:hover span,
.nav-sidebar [role="button"]:hover span {
  transform: translateX(3px) !important;
  color: #ef4444 !important;
  font-weight: 600 !important;
}

/* ============================
   RESPONSIVE DESIGN   ============================ */

/* ============================
   ENHANCED ANIMATIONS
   ============================ */

/* Entrance animation for navigation items */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.nav-sidebar.expanded nav ul li {
  animation: slideInFromLeft 0.4s ease forwards;
}

.nav-sidebar.expanded nav ul li:nth-child(1) { animation-delay: 0.1s; }
.nav-sidebar.expanded nav ul li:nth-child(2) { animation-delay: 0.15s; }
.nav-sidebar.expanded nav ul li:nth-child(3) { animation-delay: 0.2s; }
.nav-sidebar.expanded nav ul li:nth-child(4) { animation-delay: 0.25s; }

/* Floating animation for active indicator */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.nav-sidebar nav ul li a div.bg-blue-50 {
  animation: float 3s ease-in-out infinite;
}

/* ============================
   ACCESSIBILITY ENHANCEMENTS
   ============================ */

/* Focus styles for keyboard navigation */
.nav-sidebar nav ul li a div:focus,
.nav-sidebar [role="button"]:focus {
  outline: 2px solid #4f46e5 !important;
  outline-offset: 2px !important;
  box-shadow: 
    0 0 0 4px rgba(79, 70, 229, 0.1),
    0 8px 20px rgba(79, 70, 229, 0.15) !important;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .nav-sidebar,
  .nav-sidebar * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nav-sidebar {
    border-right: 2px solid #000;
    background: #fff;
  }
  
  .nav-sidebar nav ul li a div:hover,
  .nav-sidebar nav ul li a div.active-nav-item {
    background: #000 !important;
    color: #fff !important;
  }
}

/* ============================
   FINAL VISIBILITY OVERRIDES
   ============================ */

/* Ensure everything is visible with maximum specificity */
#navigation-sidebar,
.nav-sidebar,
aside.nav-sidebar {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#navigation-sidebar *,
.nav-sidebar *,
aside.nav-sidebar * {
  visibility: visible !important;
}

/* Force logo visibility */
#navigation-sidebar .small-logo,
#navigation-sidebar .logo-container,
.nav-sidebar .small-logo,
.nav-sidebar .logo-container {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Force navigation items visibility */
#navigation-sidebar nav,
#navigation-sidebar nav ul,
#navigation-sidebar nav ul li,
#navigation-sidebar nav ul li a,
.nav-sidebar nav,
.nav-sidebar nav ul,
.nav-sidebar nav ul li,
.nav-sidebar nav ul li a {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#navigation-sidebar nav ul li a div,
.nav-sidebar nav ul li a div {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Force bottom section visibility */
#navigation-sidebar .fixed.bottom-0,
#navigation-sidebar .absolute.bottom-0,
.nav-sidebar .fixed.bottom-0,
.nav-sidebar .absolute.bottom-0 {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ============================
   ENHANCED BRAND NAME FIXES
   ============================ */

/* Ensure brand name is visible in expanded sidebar */
.nav-sidebar.expanded .brand-logo-expanded {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  max-width: none !important;
  width: auto !important;
  transform: scale(1) !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

/* Brand component parts styling */
.nav-sidebar .brand-logo-expanded .brand-test,
.nav-sidebar .brand-logo-expanded .brand-enzia {
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Fix for any potential hiding by parent containers */
.nav-sidebar .full-logo,
.nav-sidebar .full-logo > div {
  overflow: visible !important;
  max-width: none !important;
  width: auto !important;
}

/* Ensure proper text rendering */
.nav-sidebar .brand-testenzia {
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}

/* ============================
   MAIN CONTENT STYLING
   ============================ */

/* Background styling restored - margin disabled to avoid conflicts with NavigationWrapper */
.main-content, main {
  background: #fff !important;
  /* margin-left: 70px !important; DISABLED - conflicts with NavigationWrapper */
  padding-left: 0 !important;
  box-shadow: none !important;
  border-left: none !important;
}
