/* Modern Sidebar Redesign */

/* Sidebar Container */
.layout-menu {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12) !important;
}

/* App Brand / Logo Section */
.app-brand {
  padding: 24px 20px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px !important;
}

.app-brand-text {
  color: white !important;
  font-weight: 700 !important;
  font-size: 1.3rem !important;
  letter-spacing: 0.5px;
}

.layout-menu-toggle {
  color: white !important;
  transition: all 0.3s ease;
}

.layout-menu-toggle:hover {
  transform: scale(1.1);
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Menu Headers */
.menu-header {
  padding: 16px 20px 8px !important;
  margin-top: 12px !important;
}

.menu-header-text {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
}

/* Menu Items */
.menu-item {
  margin: 4px 12px !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
}

.menu-item .menu-link {
  padding: 12px 16px !important;
  border-radius: 12px !important;
  color: rgba(255, 255, 255, 0.8) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  position: relative !important;
  overflow: hidden !important;
}

.menu-item .menu-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.menu-item .menu-link:hover {
  background: rgba(102, 126, 234, 0.15) !important;
  color: white !important;
  transform: translateX(4px);
}

.menu-item .menu-link:hover::before {
  transform: scaleY(1);
}

/* Active Menu Item */
.menu-item.active > .menu-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
  font-weight: 600 !important;
}

.menu-item.active > .menu-link::before {
  display: none;
}

.menu-item.active > .menu-link i {
  color: white !important;
}

/* Menu Icons */
.menu-item .menu-link i {
  font-size: 20px !important;
  color: rgba(255, 255, 255, 0.7) !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
}

.menu-item .menu-link:hover i {
  color: white !important;
  transform: scale(1.1);
}

.menu-item.active .menu-link i {
  color: white !important;
}

/* Menu Text */
.menu-item .menu-link div {
  font-size: 14px !important;
  font-weight: 500 !important;
  flex-grow: 1 !important;
}

/* Badges */
.menu-item .badge {
  padding: 4px 10px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  animation: pulse 2s infinite !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
  box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4) !important;
}

.badge.bg-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4) !important;
}

.badge.bg-success {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
  box-shadow: 0 2px 8px rgba(67, 233, 123, 0.4) !important;
}

/* Submenu */
.menu-sub {
  padding-left: 20px !important;
  margin-top: 4px !important;
}

.menu-sub .menu-item {
  margin: 2px 0 !important;
}

.menu-sub .menu-link {
  padding: 10px 16px !important;
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.menu-sub .menu-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  margin-left: 8px;
  transition: all 0.3s ease;
}

.menu-sub .menu-link:hover::before {
  background: #667eea;
  transform: translateY(-50%) scale(1.3);
}

.menu-sub .menu-item.active > .menu-link {
  background: rgba(102, 126, 234, 0.2) !important;
  color: white !important;
}

.menu-sub .menu-item.active > .menu-link::before {
  background: #667eea;
}

/* Menu Toggle Arrow */
.menu-toggle::after {
  color: rgba(255, 255, 255, 0.6) !important;
  transition: all 0.3s ease !important;
}

.menu-item.open > .menu-toggle::after {
  transform: rotate(90deg) !important;
  color: white !important;
}

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

.menu-inner::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.menu-inner::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.5);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.menu-inner::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.8);
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Hover Effects */
.menu-item:hover {
  transform: scale(1.02);
}

/* Menu Inner Shadow */
.menu-inner-shadow {
  display: none !important;
}

/* Responsive */
@media (max-width: 1199px) {
  .layout-menu:not(.layout-menu-expanded) .menu-item .menu-link {
    justify-content: center;
  }
  
  .layout-menu:not(.layout-menu-expanded) .menu-item .menu-link div {
    display: none;
  }
  
  .layout-menu:not(.layout-menu-expanded) .badge {
    position: absolute;
    top: 8px;
    right: 8px;
  }
}

/* Special styling for Organization Hierarchy */
.menu-item .menu-link[href*="organizationHierarchy"] {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.menu-item .menu-link[href*="organizationHierarchy"]:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
  border-color: rgba(102, 126, 234, 0.5);
}
