/* Animations */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes underlineExpand {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes progressBar {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Toast Notifications */
.toast { 
    animation: slideIn 0.3s ease-out; 
}

.toast.hide { 
    animation: slideOut 0.3s ease-out; 
}

.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #ef4444;
    animation: underlineExpand 0.3s ease-out forwards;
}

/* Spinner Dots */
.spinner-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.spinner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    animation: bounce 1.4s infinite ease-in-out both;
}

.spinner-dot:nth-child(1) { 
    animation-delay: -0.32s; 
}

.spinner-dot:nth-child(2) { 
    animation-delay: -0.16s; 
}

/* Input Fields */
.input-field {
    transition: all 0.3s ease;
}

.input-field:focus {
    transform: translateY(-2px);
}

/* Login Container */
.login-container {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Top Bar Preloader */
.top-bar-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(168, 85, 247, 0.1);
    overflow: hidden;
    z-index: 9999;
}

.top-bar-preloader-progress {
    height: 100%;
    background: linear-gradient(90deg, #a855f7, #ec4899, #a855f7);
    background-size: 200% 100%;
    width: 40%;
    animation: progressBar 1.5s ease-in-out infinite;
}

.top-bar-preloader.hide {
    animation: fadeOut 0.5s ease-out forwards;
}