body {
    background-color: rgb(241 244 246); /* #fbfbfb;*/
}
.toast-center {
    z-index: 1060 !important; /* Ensure the toast appears above all elements */
    pointer-events: auto;      /* Allow interaction with the toast */
    position: fixed !important; /* Stay fixed in the viewport */
    top: 50%;                  /* Vertically center */
    left: 50%;                 /* Horizontally center */
    transform: translate(-50%, -50%) !important; /* Perfect center alignment */
    width: auto;
    max-width: 350px;          /* Optional max width */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Optional for better visibility */
}

.customLargeModal {
    z-index:  1050 !important; /* Higher than the first modal */
}
.customMediumModal {
    z-index: 1051 !important; /* Higher than the first modal */
}
.customSmallModal {
    z-index: 1052 !important; /* Higher than the first modal */
    /*pointer-events: none;*/
}

#modalDataTableId {
    position: relative;
    z-index: 1065; /* Set this higher than the modal's z-index */

    display: block; /* Ensure it is displayed */
    visibility: visible; /* Ensure it is visible */
}

#modalContainerId {
    z-index: 9998; /* Set this higher than the modal's z-index */
}
#smallModalContainerId {
    z-index: 9998; /* Set this higher than the modal's z-index */
}
.custom-default-color{

    color: #007bff; /*rgb(5, 74, 166) !important;*/
}

.eqas-header-navbar {
    position: relative;
}

.eqas-dashboard-greeting {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    max-width: min(42rem, calc(100vw - 2rem));
    pointer-events: none;
    text-align: center;
}

.eqas-dashboard-greeting__line {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.35rem 0.9rem;
    line-height: 1.2;
    font-weight: 600;
    color: #1f2d3d;
    white-space: normal;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 0.35rem 0.9rem rgba(11, 61, 145, 0.08);
}

.eqas-dashboard-greeting__name {
    color: #063c85;
}

.eqas-dashboard-greeting__date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: rgba(6, 60, 133, 0.08);
    color: #063c85;
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
}

.eqas-dashboard-greeting__date i {
    color: #063c85;
}

.fa-ellipsis-v{
    color: #054AA6FF;
}

.progress {
    position: relative;
    height: 30px;
}
.progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-weight: bold;
    color: #000;
    top: 50%;
    transform: translateY(-50%);
}
.progress-percent {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Styles for the progress bar container */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px; /* Adjust height as needed */
    background-color: #f0f0f0; /* Background color of the progress bar container */
    z-index: 9999; /* Ensure the progress bar is above other content */
    overflow: hidden; /* Hide overflowing elements */
    pointer-events: none; /* Disallow clicking on the background */
}

/* Styles for the progress bar */
.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #007bff; /* Color of the progress bar */
    transition: width 0.2s ease; /* Smooth transition for width changes */
}
/* Styles for the loading spinner container */
.spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background color */
    z-index: 9999; /* Ensure the spinner is above other content */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Disallow clicking on the background */
}

/* Styles for the loading spinner */
.spinner {
    border: 4px solid #f3f3f3; /* Light grey border */
    border-top: 4px solid #3498db; /* Blue border */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite; /* Rotate animation */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.btn-app {
    border-radius: 15px;
    background-color: #f8f9fa;
    border: 1px solid #d9d8d8;
    color: #6c757d;
    height: 175px;
    width: 290px;
    margin: 15px;
    padding: 5px;
    position: relative;
    text-align: center;
    box-shadow: 0 1rem 3rem rgba(51, 51, 51, 0.37) !important;
}
.btn-app-text{
    color: #0b3d91;
    font-size:  1.5rem !important;
    text-transform:capitalize!important
}

.btn-app-icon{
    color: #0b3d91;
    padding: 15px;
    font-size:  4rem !important;
}

.btn-app > .fa, .btn-app > .fab, .btn-app > .fad, .btn-app > .fal, .btn-app > .far, .btn-app > .fas, .btn-app > .ion, .btn-app > .svg-inline--fa {
    display: block;
    font-size: 40px;
}

.btn-app:hover {
    border-color: #aaa;
    color: #ffffff;
    transform: scale(1.15);
    box-shadow: 0 1rem 3rem rgb(6, 60, 133) !important;
}

.btn-app:active, .btn-app:focus {
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125)
}

.ml-5 {
    margin-left: 5px;
}

.ml-10 {
    margin-left: 10px;
}

.ml-15 {
    margin-left: 15px;
}

.ml-20 {
    margin-left: 20px;
}

.mt-5 {
    margin-top: 5px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.checkbox-container {
    border: 2px solid #ccc;
    width: 700px;
    height: 150px;
    overflow-y: scroll;
}

/* dropdown */
.dropdown-button {
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    color: inherit; /* Inherit text color from parent element */
    cursor: pointer; /* Indicate clickable element */
}

.dropdown-button:hover {
    border-color: #ccc; /* Change border color on hover */
}

.dropdown-menu {
    display: none; /* Hide by default */
    position: absolute;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    padding: 5px;
}

.dropdown-menu li {
    list-style: none; /* Remove default bullet points */
    padding: 5px 10px;
}

.dropdown-menu li a {
    color: #333; /* Dark text color */
    text-decoration: none; /* Remove underline */
}

.dropdown-menu li:hover {
    background-color: #054AA6FF; /* Light background on hover */
}

.dropdown:hover .dropdown-menu {
    display: block; /* Show menu on hover */
}


.loading-input {
    /* Base styles for the input field */
    padding-right: 20px; /* Make space for the spinner */
}

.loading-input::after {
    /* Style the loading spinner element */
    content: "";
    display: none; /* Initially hidden */
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 4px solid #ddd;
    border-top-color: #3498db; /* Animation color */
    animation: spin 1s linear infinite; /* Animation for spinning */
    position: absolute;
    right: 5px; /* Position the spinner inside the padding area */
    top: 50%; /* Center the spinner vertically */
    transform: translateY(-50%); /* Center the spinner vertically */
}

.loading-spinner {
    /* Styles for the spinner element */
    display: none; /* Initially hidden */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    z-index: 100; /* Ensure spinner is above other content */
    text-align: center; /* Center the spinner content */
}

.loading-spinner::after {
    /* Style the spinner element itself (optional) */
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid #ddd;
    border-top-color: #3498db; /* Animation color */
    animation: spin 1s linear infinite; /* Animation for spinning */
}

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

.select2.dark-mode {
    /* Styles for Select2 in dark mode */
    background-color: #222 !important; /* Example dark background */
    color: #fff !important; /* Example white text */
}

.select2 {
    /* Styles for Select2 in light mode (default) */
    background-color: #fff !important; /* Example light background */
    color: #333 !important; /* Example black text */
}

.bordered-div {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 20px;
    position: relative;
}
.bordered-div legend {
    font-size: 1em;
    font-weight: bold;
    color: darkgray;
    width: auto;
    padding: 0 10px;
    margin-bottom: 0;
    position: absolute;
    top: -15px;
    left: 20px;
    background: white;
}

.custom-spinner-loader {
    text-align: center;
    font-size: 0; /* Remove any default font size */
}

.spinner {
    display: inline-block;
    width: 80px;
    height: 80px;
    position: relative;
}

.spinner-item {
    width: 20px;
    height: 20px;
    background-color: #007bff; /* Spinner color */
    border-radius: 50%;
    position: absolute;
    animation: spinner-animation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-item:nth-child(1) {
    top: 0;
    left: 0;
    animation-delay: -0.45s;
}

.spinner-item:nth-child(2) {
    top: 0;
    right: 0;
    animation-delay: -0.3s;
}

.spinner-item:nth-child(3) {
    bottom: 0;
    right: 0;
    animation-delay: -0.15s;
}

.spinner-item:nth-child(4) {
    bottom: 0;
    left: 0;
    animation-delay: 0s;
}

@keyframes spinner-animation {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1);
    }
    100% {
        transform: scale(0);
    }
}

/*******  CHART     *******/
.chart-container {
    position: relative;
    width: 100% !important;
    margin-bottom: 15px;
}
.horizontal-scrollable {
    position: relative;
    overflow: auto;
    white-space: nowrap;
    width: 100% !important;
    height: 100% !important;
}
.horizontal-scrollable canvas {
    display: flex;
    width: 100%;
}

.card-header .card-tools .btn {
    margin-left: 5px;
}
.filter-button {
    position: absolute;
    bottom: 10px;
    left: 10px;
}
.card {
    position: relative;
}

table.dataTable td {
    word-wrap: break-word;
    white-space: normal;
}
table.dataTable td {
    word-wrap: break-word;
    white-space: normal;
}
table.dataTable td a {
    word-break: break-word;
}

.select2-container .select2-dropdown {
    max-height: 200px;
    overflow-y: auto;
}

.select2-selection--multiple {
    height: auto !important;
}

.select2-results__option {
    cursor: pointer;
    display: flex;
    align-items: center;
}
.select2-results__option:hover {
    background-color: #f0f0f0;
}

/* Danger Row: Red background with white text */
.danger-row {
    background-color: red;
    color: white;
}

/* Warning Row: Dark yellow background with readable white text */
.warning-row {
    background-color: #ffcc00; /* Dark yellow */
    color: white;
}

.custom-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999; /* High z-index to ensure it's on top */
    width: auto;
    max-width: 300px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Optional for a shadow effect */
}

#styled-table {
    width: 100%;
    border-collapse: collapse;
}

#styled-table th,
#styled-table td {
    border: 1px solid black; /* Adds a black border to each cell */
    padding: 8px; /* Adds spacing inside the cells */
    text-align: center; /* Centers text in cells */
}

#styled-table th {
    background-color: #f2f2f2; /* Light gray background for headers */
    font-weight: bold;
}

.program-header {
    text-align: left;
    font-size: 16px;
    font-weight: bold;
    background-color: #e0e0e0; /* Light gray background */
    padding: 10px;
}
.toast {
    z-index: 11000 !important; /* very high to make sure it is on top */
}
.swal2-container {
    z-index: 11000 !important;
}
.swal2-popup {
    z-index: 11001 !important; /* Ensure the popup is above the container */
}
/* Scoped only to your scanner container */
#barcodeImageViewerCtrId {
    width: 100%;
    max-width: 100vw;
    height: 400px; /* Minimum desired height */
    max-height: 100vh;
    position: relative;
    overflow: hidden;
    background: black;
}

#barcodeImageViewerCtrId video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

#barcodeImageViewerCtrId canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* ------------------------------------------------------------------------
 * Search sidebar - fixed, viewport-bounded width.
 *
 * Many "search" fragments (user, facility, panel, manufacturer, supplyChain,
 * etc.) render their filter form inside an AdminLTE <aside class="control-
 * sidebar">. That widget defaults to a fixed 250px width, but several
 * fragments previously added Bootstrap's "w-auto w-responsive" classes to
 * it, which set "width: auto !important" - overriding AdminLTE's width and
 * letting the sidebar's absolutely positioned box shrink-to-fit its widest,
 * unbroken content (e.g. a long facility formal name selected via select2).
 * Since the sidebar has no "left" anchor, this let it grow far past the
 * right edge of the viewport, hiding whatever page content ended up
 * underneath.
 *
 * Use this single shared class instead of "w-auto w-responsive" on any
 * search sidebar's <aside>: it keeps a fixed, sensible width and forces
 * long select2/label text to wrap inside it rather than overflow.
 * ------------------------------------------------------------------------ */
.control-sidebar-fixed-width {
    /* Proportional to the viewport (roughly a quarter of it on desktop) instead of a single
       hard-coded pixel value, but clamped so it never gets uncomfortably narrow on small
       screens nor absurdly wide on ultra-wide monitors. */
    width: clamp(320px, 28vw, 480px);
    max-width: 92vw;
    box-sizing: border-box;
}

.control-sidebar-fixed-width .select2-container {
    width: 100% !important;
    max-width: 100%;
}

.control-sidebar-fixed-width .select2-selection__rendered,
.control-sidebar-fixed-width .select2-selection--single,
.control-sidebar-fixed-width label {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
}

.control-sidebar-fixed-width .select2-selection--single {
    height: auto;
    min-height: calc(1.5em + 0.75rem + 2px);
    display: flex;
    align-items: center;
}

/* select2's rendered text and its dropdown arrow are both absolutely/flow positioned assuming
   a single line of text; once text wraps to multiple lines (long facility/formal names, etc.)
   the arrow - fixed at "top: 1px" - ends up floating in the middle of the wrapped text instead
   of anywhere near the top-right corner, visually overlapping it. Reserve space for the arrow
   and re-anchor it to vertically center against the (now variable-height) box instead. */
.control-sidebar-fixed-width .select2-selection__rendered {
    padding-right: 22px !important;
}

.control-sidebar-fixed-width .select2-selection__arrow {
    top: 50% !important;
    transform: translateY(-50%);
    height: 20px !important;
}

.control-sidebar-fixed-width .select2-selection__clear {
    position: relative;
    margin-right: 6px;
}

/* Bootstrap's col-md-6 breakpoint is based on VIEWPORT width, not this
   sidebar's own (much narrower, fixed) width, so paired fields would
   otherwise be squeezed into unreadable half-columns on wide screens.
   Stack them full-width instead - there's no reason to fight for
   horizontal space inside a narrow sidebar. */
.control-sidebar-fixed-width .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* On narrow/mobile viewports, let the sidebar approach full width so the widened selectors
   above don't leave it uncomfortably cramped. */
@media (max-width: 576px) {
    .control-sidebar-fixed-width {
        width: 94vw;
    }
}
