.loader {
    /*https://www.codexworld.com/display-loading-image-while-page-loads-jquery-css/*/
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: url('../../img/loader/ispm-erp-loader.gif') 50% 50% no-repeat rgb(249, 249, 249);
    opacity: 0.8;
}

.downloader {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: url('../../img/loader/downloading.gif') 50% 50% no-repeat rgb(249, 249, 249);
    opacity: 0.8;
}

/* Filter responsive handling */
.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    border: 1px solid #d0d7de;
    background: #fff;
    color: #0d6efd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-toggle-btn:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.filter-toggle-btn i {
    font-size: 18px;
}
.filter-collapse {
    margin-bottom: 1rem;
}
.filter-collapse:not(.open) .filter-controls {
    display: none !important;
}
.filter-collapse.open .filter-controls {
    display: flex !important;
}
.filter-controls {
    display: none;
    flex-wrap: wrap;
    align-items: end;
    width: 100%;
    margin-top: 8px;
}
.filter-bar {
    gap: 12px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
}
.filter-bar input,
.filter-bar select,
.filter-bar button {
    height: 32px;
}
.filter-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.filter-controls input,
.filter-controls select,
.filter-controls button {
    min-width: 140px;
}
.heading-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
        gap: 6px;
    }
    .filter-controls input,
    .filter-controls select,
    .filter-controls button {
        min-width: 100%;
        margin-top: 4px;
        flex: 1 1 100%;
    }
    .filter-controls button.btn {
        width: 100%;
    }
    .filter-bar {
        gap: 6px;
    }
    /* force full-width fields in filter rows on mobile */
    .filter-bar .d-flex.flex-column {
        width: 100%;
    }
    /* date pairs share a row on mobile */
    .filter-bar .filter-half {
        width: calc(50% - 4px);
    }
    .filter-bar input,
    .filter-bar select,
    .filter-bar button {
        width: 100% !important;
        max-width: 100% !important;
    }
}
