/* ==========================================
   PROFESSIONAL SAAS/BI UI/UX STYLES
   High-performance 60fps animations
   ========================================== */

:root {
    /* Professional Color Palette */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    
    /* Success Colors */
    --success-50: #ecfdf5;
    --success-500: #10b981;
    --success-600: #059669;
    
    /* Error Colors */
    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    
    /* Warning Colors */
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    
    /* Neutral Colors */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    /* Animation Curves - Professional Easing */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==========================================
   SKELETON LOADING - SHIMMER EFFECT
   ========================================== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--slate-100) 0%,
        var(--slate-200) 50%,
        var(--slate-100) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin: 0.5rem 0;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-card {
    height: 8rem;
    border-radius: 1rem;
}

/* ==========================================
   STAGGERED FADE-IN ANIMATION
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stagger-animate {
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out-expo) forwards;
}

.stagger-delay-1 { animation-delay: 0.05s; }
.stagger-delay-2 { animation-delay: 0.1s; }
.stagger-delay-3 { animation-delay: 0.15s; }
.stagger-delay-4 { animation-delay: 0.2s; }
.stagger-delay-5 { animation-delay: 0.25s; }
.stagger-delay-6 { animation-delay: 0.3s; }
.stagger-delay-7 { animation-delay: 0.35s; }
.stagger-delay-8 { animation-delay: 0.4s; }
.stagger-delay-9 { animation-delay: 0.45s; }
.stagger-delay-10 { animation-delay: 0.5s; }

/* ==========================================
   SCALE-UP HOVER EFFECTS
   ========================================== */
.hover-scale-up {
    transition: all 0.4s var(--ease-out-expo);
}

.hover-scale-up:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15),
                0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   DROP ZONE PULSE EFFECT
   ========================================== */
.drop-zone-active {
    animation: pulseBorder 2s var(--ease-in-out-quart) infinite;
}

@keyframes pulseBorder {
    0%, 100% {
        transform: scale(1);
        border-color: var(--primary-400);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        transform: scale(1.02);
        border-color: var(--primary-600);
        box-shadow: 0 0 0 15px rgba(99, 102, 241, 0);
    }
}

.drop-zone-pulse {
    animation: dropZonePulse 0.6s var(--ease-spring);
}

@keyframes dropZonePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ==========================================
   UPLOAD QUEUE SLIDE-IN
   ========================================== */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.queue-item {
    animation: slideInLeft 0.5s var(--ease-out-expo) forwards;
}

/* ==========================================
   PROGRESS RING ANIMATION
   ========================================== */
.progress-ring {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 0.5s var(--ease-out-expo);
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.progress-pulse {
    animation: progressPulse 2s var(--ease-in-out-quart) infinite;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(calc(100% + 2rem));
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(calc(100% + 2rem));
    }
}

.toast-slide-in {
    animation: slideInRight 0.5s var(--ease-out-expo) forwards;
}

.toast-slide-out {
    animation: slideOutRight 0.5s var(--ease-out-expo) forwards;
}

.toast-bounce {
    animation: toastBounce 0.6s var(--ease-spring);
}

@keyframes toastBounce {
    0% { transform: translateX(100%); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

/* ==========================================
   STATS COUNTER ANIMATION
   ========================================== */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-animate {
    animation: countUp 0.8s var(--ease-out-expo) forwards;
}

/* ==========================================
   CHART CONTAINER ANIMATION
   ========================================== */
@keyframes chartGrow {
    from {
        opacity: 0;
        transform: scaleY(0);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

.chart-animate {
    animation: chartGrow 1.2s var(--ease-out-expo) forwards;
    transform-origin: bottom;
}

/* ==========================================
   MODAL SPRING ANIMATION
   ========================================== */
@keyframes modalSpring {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    50% {
        transform: scale(1.02) translateY(-5px);
    }
    70% {
        transform: scale(0.98) translateY(3px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-spring {
    animation: modalSpring 0.6s var(--ease-spring) forwards;
}

/* ==========================================
   IMAGE LAZY LOAD FADE-IN
   ========================================== */
@keyframes imageFadeIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.image-loaded {
    animation: imageFadeIn 0.8s var(--ease-out-expo) forwards;
}

/* ==========================================
   BUTTON RIPPLE EFFECT
   ========================================== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ==========================================
   SCROLLBAR CUSTOMIZATION
   ========================================== */
.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: var(--slate-300) var(--slate-100);
}

.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: var(--slate-100);
    border-radius: 10px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 10px;
    transition: background 0.3s;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* ==========================================
   GLASSMORPHISM EFFECT
   ========================================== */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================
   GRADIENT TEXT
   ========================================== */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   SHADOW UTILITIES
   ========================================== */
.shadow-glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.shadow-glow-hover:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

/* ==========================================
   LOADING SPINNER
   ========================================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.transition-all {
    transition: all 0.3s var(--ease-out-expo);
}

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}
