/*
=================================================================
    EMPLOYEE PORTAL - CUSTOM STYLESHEET
    -------------------------------------------------------------
    This file contains all custom styles for the application,
    organized into logical sections.
=================================================================
*/

/* --- 1. General Body & Typography --- */
body {
    background-color: #f8f9fa; /* A light, neutral background */
    overflow-x: hidden; /* Prevents horizontal scrollbars */
}

/* --- 2. Main Layout & Wrapper --- */
#wrapper {
    position: relative;
    display: flex;
}

#page-content-wrapper {
    width: 100%;
    transition: margin-left 0.4s ease;
}

/* Add padding to the bottom of the main content to avoid overlap with the mobile footer */
main {
    padding-bottom: 85px; /* Slightly more than footer height */
}

/* --- 3. Collapsible Sidebar (Mobile-First) --- */
#sidebar-wrapper {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030; /* High z-index to appear above content */
    margin-left: -250px; /* Hidden off-screen by default */
    background-color: #ffffff;
    border-right: 1px solid #dee2e6;
    transition: margin-left 0.4s ease;
}

/* --- Toggled State (when sidebar is active) --- */
#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

/* --- Sidebar Overlay for Mobile --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1020; /* Below sidebar, above content */
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Show the overlay when the sidebar is toggled */
#wrapper.toggled .sidebar-overlay {
    display: block;
    opacity: 1;
}

/* --- Desktop Styles (768px and up) --- */
@media (min-width: 768px) {
    /* By default on desktop, the sidebar is visible */
    #sidebar-wrapper {
        margin-left: 0;
    }

    /* Main content has a margin to make space for the sidebar */
    #page-content-wrapper {
        margin-left: 250px;
    }

    /* When TOGGLED on desktop, the sidebar hides */
    #wrapper.toggled #sidebar-wrapper {
        margin-left: -250px;
    }

    /* And the main content expands to fill the space */
    #wrapper.toggled #page-content-wrapper {
        margin-left: 0;
    }

    /* The overlay is not needed on desktop */
    #wrapper.toggled .sidebar-overlay {
        display: none;
    }
}

/* --- 4. Cards (Statistics & Forms) --- */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px); /* Lift card on hover */
}

.card .card-body {
    padding: 1.25rem;
}

.card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 700;
}

/* --- 5. Form Styles --- */
.form-control,
.form-select {
    border-radius: 0.5rem;
}

.btn {
    border-radius: 0.5rem;
}


/*
=================================================================
    BULLETPROOF FOOTER NAVIGATION FIX
    (Uses !important to override any conflicting styles)
=================================================================
*/

/* --- The Main Footer Container --- */
.footer-nav {
    /* --- Positioning & Appearance --- */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    z-index: 1000;
    background-color: #ffffff;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.08);
    padding: 0; /* Reset any inherited padding */

    /* --- THE CRITICAL FIX: Forcing Flexbox Layout --- */
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
}

/* --- Each Individual Link/Button --- */
.footer-link {
    /* --- Sizing: Forcing all items to share space equally --- */
    flex: 1 !important;
    width: 20% !important; /* Explicitly set width for 5 items */

    /* --- Internal Layout (for the icon and text) --- */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;

    /* --- Appearance --- */
    color: #858796;
    text-decoration: none;
    font-size: 0.7rem;
    text-align: center;
    transition: color 0.2s ease-in-out;
}

/* --- The Icon inside the link --- */
.footer-link i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

/* --- Style for the currently ACTIVE link --- */
.footer-link.active {
    color: #0d6efd;
    font-weight: 500;
}

/* --- Special styling for the central "Create" button --- */
#footer-create-link i {
    font-size: 2.2rem;
    color: #0d6efd;
}

#footer-create-link span {
    display: none;
}




/* --- 7. Utility Classes (for stat cards) --- */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.text-xs {
    font-size: 0.7rem;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}