/* Global Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 1.2em;
    height: 1.2em;
    top: 50%;
    left: 50%;
    margin-top: -0.6em;
    margin-left: -0.6em;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* Form Validation Styles */
.input-error {
    border-color: #ef4444 !important; /* Tailwind red-500 */
    background-color: #fef2f2 !important; /* Tailwind red-50 */
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.input-error + .error-message {
    display: block;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    border-left: 4px solid;
}

.toast.show {
    transform: translateX(0);
}

.toast-success { border-left-color: #10b981; } /* emerald-500 */
.toast-error { border-left-color: #ef4444; } /* red-500 */
.toast-info { border-left-color: #3b82f6; } /* blue-500 */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9; 
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* Modern Dashboard Styles */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sidebar-active {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid #818cf8;
}

.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.modern-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
