/* =========================================================================
   Global Animations & Dynamic Effects
   ========================================================================= */

/* 1. Base Page Load Fade-In */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: fadeIn 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* 2. Interactive Element Transitions (Buttons, Inputs, Cards) */
/* Transition globally applied to buttons and inputs for smooth state changes */
button,
.btn,
.nav-btn,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="time"],
select,
textarea {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 3. Button Hover & Active States */
button:hover,
.btn:hover,
.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

button:active,
.btn:active,
.nav-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 4. Form Inputs Glow & Focus */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25) !important;
    transform: translateY(-1px);
}

/* 5. Menu Items & Interactive Cards */
.menu-item,
.card,
.dashboard-card {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.4s ease;
    will-change: transform, box-shadow;
}

.menu-item:hover,
.card:hover,
.dashboard-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

/* 6. Links and Subtle Hovers */
a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* 7. Dialog / Modal pop-in (If any are added dynamically) */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
.modal, .dialog, .alert {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 8. Table Row Hover Highlights */
tbody tr {
    transition: background-color 0.2s ease;
}
tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}
