.sidebar-custom {
  animation: slideInLeft 0.5s ease-out;
}

.sidebar-logo {
  animation: slideInLeft 0.6s ease-out 0.1s both;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo:hover {
  transform: translateX(5px);
}

.sidebar-logo img {
  animation: scaleIn 0.5s ease-out 0.2s both;
  transition: transform 0.3s ease;
}

.sidebar-logo:hover img {
  transform: scale(1.1) rotate(5deg);
}

.sidebar-brand-text {
  animation: slideInLeft 0.7s ease-out 0.3s both;
}

.brand-main {
  animation: slideInRight 0.6s ease-out 0.3s both;
  font-weight: 700;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.brand-sub {
  animation: slideInRight 0.7s ease-out 0.4s both;
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

/* Nav Items with Stagger */
.nav-item {
  animation: slideInLeft 0.5s ease-out;
  animation-fill-mode: both;
}

.nav-item:nth-child(1) {
  animation-delay: 0.2s;
}
.nav-item:nth-child(2) {
  animation-delay: 0.3s;
}
.nav-item:nth-child(3) {
  animation-delay: 0.4s;
}
.nav-item:nth-child(4) {
  animation-delay: 0.5s;
}
.nav-item:nth-child(5) {
  animation-delay: 0.6s;
}
.nav-item:nth-child(6) {
  animation-delay: 0.7s;
}
.nav-item:nth-child(7) {
  animation-delay: 0.8s;
}

.nav-link {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left 0.3s ease;
  z-index: -1;
}

.nav-link:hover::before {
  left: 0;
}

.nav-link:hover {
  padding-left: 25px;
  transform: translateX(5px);
  box-shadow: inset 3px 0 0 #2c58a0;
}

.nav-link i {
  transition: all 0.3s ease;
  display: inline-block;
}

.nav-link:hover i {
  animation: bounce 0.4s ease;
  transform: scale(1.2);
}

.nav-link.active {
  animation: glow 0.5s ease;
  box-shadow: inset 3px 0 0 #2c58a0;
  background-color: rgba(44, 88, 160, 0.1);
}

.nav-link.active i {
  animation: rotate 0.5s ease;
}

/* ===== HEADER ANIMATIONS ===== */

.user-header-badge {
  animation: slideDown 0.5s ease-out;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.user-header-badge:hover {
  transform: scale(1.02);
}

.user-info {
  animation: slideInRight 0.6s ease-out 0.1s both;
  transition: all 0.3s ease;
}

.user-info:hover {
  animation: glow 0.4s ease;
}

.user-info .name {
  animation: slideInRight 0.7s ease-out 0.15s both;
  font-weight: 600;
  transition: color 0.3s ease;
}

.user-info .role {
  animation: slideInRight 0.8s ease-out 0.2s both;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.user-avatar {
  animation: scaleIn 0.5s ease-out 0.25s both;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #2c58a0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(44, 88, 160, 0.2);
}

.user-avatar:hover {
  transform: scale(1.1) rotate(-10deg);
  box-shadow: 0 4px 16px rgba(44, 88, 160, 0.3);
}

/* ===== LOGOUT BUTTON ANIMATION ===== */

.btn-logout {
  transition: all 0.3s ease;
  position: relative;
}

.btn-logout:hover {
  animation: slideInRight 0.3s ease;
  transform: translateX(5px);
}

.btn-logout::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #dc3545;
  transition: width 0.3s ease;
}

.btn-logout:hover::after {
  width: 100%;
}

/* ===== SEARCH/FILTER ANIMATIONS ===== */

.search-box,
.filter-box {
  animation: slideInRight 0.5s ease-out;
  transition: all 0.3s ease;
}

.search-box:focus-within,
.filter-box:focus-within {
  animation: glow 0.4s ease;
  transform: scale(1.02);
}

/* ===== NOTIFICATION ANIMATIONS ===== */

.notification-badge {
  animation: pulse 1s ease-in-out infinite;
  display: inline-block;
}

.notification-badge:hover {
  animation: bounce 0.4s ease;
}

/* ===== BREADCRUMB ANIMATIONS ===== */

.breadcrumb {
  animation: slideDown 0.5s ease-out;
}

.breadcrumb-item {
  animation: fadeIn 0.4s ease-out;
  animation-fill-mode: both;
}

.breadcrumb-item:nth-child(1) {
  animation-delay: 0.2s;
}
.breadcrumb-item:nth-child(2) {
  animation-delay: 0.4s;
}
.breadcrumb-item:nth-child(3) {
  animation-delay: 0.6s;
}
.breadcrumb-item:nth-child(4) {
  animation-delay: 0.8s;
}

/* ===== RESPONSIVE ANIMATIONS ===== */

@media (max-width: 768px) {
  .sidebar-custom {
    animation: slideInLeft 0.4s ease-out;
  }

  .nav-link:hover {
    padding-left: 20px;
  }

  .user-avatar {
    width: 40px;
    height: 40px;
  }
}
