/* ============================================
   ANIMATIONS - Page Load, Hover, Transitions
   ============================================ */

/* Page Load Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.4s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.4s ease forwards;
}

.scale-in {
    animation: scaleIn 0.3s ease forwards;
}

/* Stagger Children */
.stagger-child > * {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.stagger-child > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-child > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-child > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-child > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-child > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-child > *:nth-child(6) { animation-delay: 0.3s; }

/* Hover Effects */
.btn-modern, .action-card, .stat-card, .card-modern {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Spinner */
.spinner-modern {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Drawer Animation */
.drawer-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer {
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Table Row Hover */
.table-modern tbody tr {
    transition: background 0.15s ease;
}

/* Modal Animation */
.modal-container {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Transition */
.content-wrapper {
    animation: fadeInUp 0.4s ease;
}