/* ═══════════════════════════════════════════════════════
   ANIMATIONS — Micro-animations & Transitions
   ═══════════════════════════════════════════════════════ */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.animate-fadeIn { animation: fadeIn .4s ease both; }
.animate-fadeInUp { animation: fadeInUp .5s ease both; }
.animate-fadeInDown { animation: fadeInDown .4s ease both; }
.animate-fadeInLeft { animation: fadeInLeft .4s ease both; }
.animate-scaleIn { animation: scaleIn .3s cubic-bezier(.34,1.56,.64,1) both; }
.animate-slideInRight { animation: slideInRight .3s ease both; }
.animate-pulse { animation: pulse 2s ease infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 1s ease infinite; }

.delay-1 { animation-delay: .05s; }
.delay-2 { animation-delay: .1s; }
.delay-3 { animation-delay: .15s; }
.delay-4 { animation-delay: .2s; }
.delay-5 { animation-delay: .25s; }
.delay-6 { animation-delay: .3s; }

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

/* ─── Page Loader ─── */
.page-loader {
    position: fixed; inset: 0;
    background: var(--bg-body);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    transition: opacity .3s ease;
}
.page-loader.hide { opacity: 0; pointer-events: none; }

/* ─── Notification Toast ─── */
.toast-container {
    position: fixed; top: 20px; right: 20px;
    z-index: var(--z-toast);
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 12px;
    min-width: 300px; max-width: 420px;
    animation: slideInRight .3s ease both;
    border-left: 4px solid var(--color-primary);
}
.toast.toast-success { border-left-color: var(--color-success); }
.toast.toast-error   { border-left-color: var(--color-danger); }
.toast.toast-warning { border-left-color: var(--color-warning); }
.toast-title { font-weight: var(--fw-semibold); font-size: var(--font-sm); }
.toast-message { font-size: var(--font-xs); color: var(--text-secondary); }
.toast-close {
    margin-left: auto; cursor: pointer;
    color: var(--text-muted); font-size: 18px;
}

/* ─── Online Pulse ─── */
.online-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--color-success);
    position: relative;
}
.online-dot::after {
    content: ''; position: absolute; inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--color-success);
    animation: pulse 2s ease infinite;
    opacity: 0.5;
}
