html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.zoom-controls {
    display: flex;
    align-items: center;
    padding: 2px 5px;
    border-radius: 4px;
}

.zoom-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    border: none;
    background-color: #343a40;
    color: white;
    border-radius: 3px;
}

    .zoom-btn:hover {
        background-color: #28a745;
    }

.zoom-input {
    width: 50px;
    text-align: center;
    border: 1px solid #454d55;
    border-radius: 3px;
    margin: 0 5px;
    padding: 2px;
    background-color: #343a40;
    color: white;
}

/* Base styling for all radio tab buttons */
.btn-group .btn-check + .btn.btn-success {
    background-color: #1e5631; /* Darker green for inactive tabs */
    border-color: #28a745;
    opacity: 0.75;
    position: relative;
    transition: all 0.2s ease;
}

/* Active tab styling */
.btn-group .btn-check:checked + .btn.btn-success {
    background-color: #28a745; /* Brighter green for active tab */
    border-color: #28a745;
    opacity: 1;
    font-weight: 600;
    z-index: 1;
}

/* Hover state for all tabs */
.btn-group .btn-check + .btn.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    opacity: 0.9;
}

/* First and last button border radius preservation */
.btn-group .btn-check + .btn.btn-success:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.btn-group .btn-check + .btn.btn-success:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* Common styles for all checkboxes */
.form-check-input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    border-width: 2px;
    position: relative;
    cursor: pointer;
}

/* Dark mode styling */
.form-check-input[type="checkbox"] {
    background-color: #343a40;
    border-color: #adb5bd;
}

.form-check-input[type="checkbox"]:checked {
    background-color: #28a745;
    border-color: #28a745;
    position: relative;
}

/* Hover styles */
.form-check-input[type="checkbox"]:hover {
    border-color: #28a745;
}

/* Focus styles */
.form-check-input[type="checkbox"]:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* Style for checkboxes in datatables */
table.dataTable .form-check-input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
}

/* Add checkmark on hover for better UX indication */
.form-check-input[type="checkbox"]:not(:checked):hover::before {
    content: '';
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    top: 50%;
    left: 50%;
    background: rgba(40, 167, 69, 0.3);
    border-radius: 2px;
    transform: translate(-50%, -50%);
}

/* Add a label highlight when hovering over checkbox label */
.form-check:hover .form-check-label {
    color: #28a745;
}

/* For DataTables internal checkbox controls */
table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody th.select-checkbox::before {
    border: 2px solid #adb5bd !important;
    background-color: #343a40 !important;
    width: 16px !important;
    height: 16px !important;
}

table.dataTable tr.selected td.select-checkbox::after,
table.dataTable tr.selected th.select-checkbox::after {
    color: #28a745 !important;
}

/* For certain select-row implementations */
.selected-row .form-check-input[type="checkbox"],
tr.selected .form-check-input[type="checkbox"] {
    background-color: #28a745;
    border-color: #28a745;
}

/* Apply purple styling only to buttons NOT in these specific contexts */
.btn-light:not(.col-md-6.mb-3.d-flex.align-items-end .btn-light):not(.form-floating + .btn-light):not(.d-flex.align-items-end > .btn-light):not(.d-flex .form-floating ~ .btn-light),
.btn-dark:not(.col-md-6.mb-3.d-flex.align-items-end .btn-dark):not(.form-floating + .btn-dark):not(.d-flex.align-items-end > .btn-dark):not(.d-flex .form-floating ~ .btn-dark) {
    background-color: #9370DB; /* Medium Purple */
    color: #ffffff;
    border: none;
}

    /* Hover and focus states */
    .btn-light:not(.col-md-6.mb-3.d-flex.align-items-end .btn-light):not(.form-floating + .btn-light):not(.d-flex.align-items-end > .btn-light):not(.d-flex .form-floating ~ .btn-light):hover,
    .btn-light:not(.col-md-6.mb-3.d-flex.align-items-end .btn-light):not(.form-floating + .btn-light):not(.d-flex.align-items-end > .btn-light):not(.d-flex .form-floating ~ .btn-light):focus,
    .btn-dark:not(.col-md-6.mb-3.d-flex.align-items-end .btn-dark):not(.form-floating + .btn-dark):not(.d-flex.align-items-end > .btn-dark):not(.d-flex .form-floating ~ .btn-dark):hover,
    .btn-dark:not(.col-md-6.mb-3.d-flex.align-items-end .btn-dark):not(.form-floating + .btn-dark):not(.d-flex.align-items-end > .btn-dark):not(.d-flex .form-floating ~ .btn-dark):focus {
        background-color: #7B68EE; /* Medium Slate Blue */
        color: #ffffff;
        border: none;
    }

/* Light mode styles */
body.light-mode .zoom-btn {
    background-color: #8bcf9e;
    color: #212529;
}

    body.light-mode .zoom-btn:hover {
        background-color: #28a745;
        color: white;
    }

body.light-mode .zoom-input {
    background-color: #8bcf9e;
    color: #212529;
    border-color: #6c757d;
}

/* Light mode styles */
body.light-mode .zoom-btn {
    background-color: #8bcf9e;
    color: #212529;
}

    body.light-mode .zoom-btn:hover {
        background-color: #28a745;
        color: white;
    }

body.light-mode .zoom-input {
    background-color: #8bcf9e;
    color: #212529;
    border-color: #6c757d;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.dataTables_filter {
    margin-bottom: 20px;
}

div:nth-child(1) > div.dt-layout-cell.dt-layout-start > div > label {
    margin-left: 10px;
}

div:nth-child(1) > div.dt-layout-cell.dt-layout-end > div > label {
    margin-right: 10px;
}

.swal2-popup {
    background-color: #212529 !important; /* Bootstrap dark background */
    color: #ffffff !important; /* White text */
}

.swal2-confirm.btn-success {
    background-color: #28a745 !important;
    color: white !important;
    margin-right: 10px; /* Add space between buttons */
}

.swal2-confirm.btn-danger {
    background-color: #dc3545 !important;
    color: white !important;
    margin-right: 10px; /* Add space between buttons */
}

.swal2-confirm.btn-warning {
    margin-right: 10px; /* Add space between buttons */
}

.swal2-cancel.btn-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

body.light-mode {
    background-color: #c1e1c1 !important;
}

body.light-mode header .navbar {
    background-color: #28a745;
    /*    color: #212529 !important;*/
    /*    border-top: 1px solid #dee2e6;*/
}

/* Organization name color fix */
body.light-mode .navbar-brand,
body.light-mode .organization-name {
    color: #212529;
}

body.light-mode .organization-name:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body.light-mode #navbarDropdown,
body.light-mode ul .nav-link,
body.light-mode #btnSwitch {
    color: #212529 !important;
}

/* Reports nav light styling */
body.light-mode .reports-nav {
    background-color: #8bcf9e !important;
    /*    border-bottom: 1px solid #f2f5f8;*/
}

body.light-mode .reports-nav .nav-link {
    color: #212529 !important;
}

body.light-mode .reports-nav .nav-link:hover,
body.light-mode .reports-nav .nav-link:focus {
    background-color: rgba(40, 167, 69, 0.1); /* Light green background */
    /*    color: #28a745 !important;*/
}

/* Dropdown menu light mode */
body.light-mode .dropdown-menu {
    background-color: #8bcf9e;
    /*    border: 1px solid rgba(0, 0, 0, 0.15);*/
}

body.light-mode .dropdown-item {
    color: #212529 !important;
}

    /*body.light-mode .dropdown-item:hover,
body.light-mode .dropdown-item:focus {
    background-color: #28a745 !important;
    color: #fff !important;
}*/

/* Submenu arrow color fix */
body.light-mode .dropdown-submenu > a.dropdown-item::after {
    color: #212529;
}

    /*body.light-mode .dropdown-submenu > a.dropdown-item:hover::after {
    color: #fff;
}*/


    /* Sidebar color changes */
body.light-mode #sidebar {
    background-color: #8bcf9e !important;
    /*    border-right: 1px solid #dee2e6;*/
}

/* Sidebar Toggle Button */
body.light-mode .sidebar-toggle {
    background: #f8f9fa;
    color: #212529;
    /*    border: 1px solid #dee2e6;*/
}

body.light-mode .sidebar-toggle:hover {
    background: #28a745;
    color: white;
}

body.light-mode #sidebar .accordion-item,
body.light-mode #sidebar .list-group-item {
    border-color: #ffffff !important;
}

body.light-mode #sidebar .accordion-button {
    background-color: #8bcf9e !important;
    color: #212529 !important;
}

body.light-mode #sidebar .list-group-item {
    background-color: #8bcf9e !important;
    color: #212529 !important;
}

body.light-mode #sidebar .accordion-body {
    background-color: #8bcf9e !important;
}

    /*body.light-mode .accordion-button:focus {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}
*/

/* Highlight selected item in light mode - with increased specificity */
body.light-mode #sidebar #mainAccordion .list-group-item.active-green,
body.light-mode .accordion-body .list-group .list-group-item.active-green {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
    z-index: 2; /* Ensure it's above other elements */
}

/* Additional selector to target all possible nested structures */
body.light-mode #sidebar .accordion-item .accordion-body .list-group-item.active-green {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

/* Target active items in any nested accordion structure */
body.light-mode .accordion-item .accordion-collapse .accordion-body .list-group .list-group-item.active-green {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

    /*body.light-mode .accordion-button:not(.collapsed) {
    background-color: #28a745;
    color: #fff;
}

body.light-mode .accordion-button.collapsed {
    color: #212529;
}
*/
    /*
body.light-mode #sidebar .accordion-collapse {
    background-color: #8bcf9e !important;
}*/

    /* List group items - explicitly targeting sidebar items too */
    /*body.light-mode .list-group-item-action:hover,
body.light-mode .list-group-item-action:focus,
body.light-mode #sidebar .list-group-item-action:hover,
body.light-mode #sidebar .list-group-item-action:focus,*/
body.light-mode #sidebar #mainAccordion .list-group-item-action:hover,
body.light-mode #sidebar #mainAccordion .list-group-item-action:focus {
    background-color: #28a745 !important;
    color: #fff !important;
}

    /* Accordion button styles */

    /* Fix accordion nested list items */
    /*body.light-mode .accordion-item .list-group-item-action:hover,
body.light-mode .accordion-item .list-group-item-action:focus {
    background-color: #28a745 !important;
    color: #fff !important;
}*/

    /* Dropdown menu light mode */
    /*body.light-mode .dropdown-menu {
    background-color: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.15);
}*/

    /*body.light-mode .dropdown-item {
    color: #212529 !important;
}

body.light-mode .dropdown-item:hover,
body.light-mode .dropdown-item:focus {
    background-color: #28a745 !important;*/ /* Changed back to green */
    /*color: #fff !important;
}*/

    /* Submenu arrow color fix */
    /*body.light-mode .dropdown-submenu > a.dropdown-item::after {
    color: #212529;
}

body.light-mode .dropdown-submenu > a.dropdown-item:hover::after {
    color: #fff;
}*/

/* Footer light styling */
body.light-mode .footer {
    background-color: #28a745;
    color: #212529 !important;
    /*    border-top: 1px solid #dee2e6;*/
}



    /*#content,
#content .container-fluid,
#content main {
    background-color: #f8f9fa !important;
}*/

/*body.light-mode .w-100.card.border-0.p-4,
body.light-mode .card-body.border.p-4,
body.light-mode .row.mt-3 {
    background-color: #e9ecef !important;
    color: #212529 !important;*/ /* Dark text for contrast */
/*}

body.light-mode .container .card.shadow.border-0.mt-4,
body.light-mode .container .card.shadow,
body.light-mode .card.shadow.border-0 {
    background-color: #e9ecef !important;
    color: #212529 !important;
}

body.light-mode .card-body,
body.light-mode .card-body.p-4,
body.light-mode .card-body.border.p-4 {
    background-color: #e9ecef !important;
    color: #212529 !important;
    border-color: #e9ecef !important;
}

body.light-mode .form-control,
body.light-mode .form-select {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #ced4da !important;
}

body.light-mode .form-control:focus,
body.light-mode .form-select:focus {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

body.light-mode .form-floating > label {
    color: #e9ecef !important;
}

body.light-mode .card-header.bg-success.bg-gradient {
    background-color: #198754 !important;
    background-image: linear-gradient(180deg, #198754, #157347) !important;
    color: #ffffff !important;
}

body.light-mode table.dataTable {
    background-color: #ffffff !important;
    color: #212529 !important;
}

body.light-mode table.dataTable thead th {
    background-color: #e9ecef !important;
    color: #212529 !important;
    border-color: #e9ecef !important;
}

body.light-mode table.dataTable tbody td {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #e9ecef !important;
}

body.light-mode table.dataTable tbody tr:nth-of-type(odd) td {
    background-color: #f8f9fa !important;
}

body.light-mode .fixed-column,
body.light-mode td .dt-head-nowrap.sorting_1.dtfc-fixed-left,
body.light-mode table.dataTable tbody tr > .dtfc-fixed-left,
body.light-mode table.dataTable tbody tr > .dtfc-fixed-right,
body.light-mode table.dataTable thead tr > .dtfc-fixed-left,
body.light-mode table.dataTable thead tr > .dtfc-fixed-right {
    background-color: #e9ecef !important;
    color: #212529 !important;
}

body.light-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.05) !important;
}*/

body.light-mode table.dataTable tbody tr > .dtfc-fixed-left, body.light-mode table.dataTable tbody tr > .dtfc-fixed-right {
    background-color: #ffffff !important;
}

body.light-mode table.dataTable thead tr > .dtfc-fixed-left, body.light-mode table.dataTable thead tr > .dtfc-fixed-right {
    background-color: #ffffff !important;
}

/* Light theme specific styles */
body.light-mode .swal2-popup {
    background-color: #ffffff !important;
    color: #212529 !important;
}

body.light-mode .swal2-confirm.btn-success {
    background-color: #28a745 !important;
    color: white !important;
}

body.light-mode .swal2-confirm.btn-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

body.light-mode .swal2-cancel.btn-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

/* Radio tabs light mode specific styles */
body.light-mode .btn-group .btn-check + .btn.btn-success {
    background-color: #8bcf9e; /* Lighter green for light mode */
    border-color: #28a745;
    color: #212529;
}

body.light-mode .btn-group .btn-check:checked + .btn.btn-success {
    background-color: #28a745; /* Standard green for active tab */
    color: #fff; /* White text for active tab */
    border-color: #28a745;
}

body.light-mode .btn-group .btn-check + .btn.btn-success:hover {
    background-color: #5dbb74;
}

/* Light mode styling for checkboxes */
body.light-mode .form-check-input[type="checkbox"] {
    background-color: #ffffff;
    border-color: #495057;
}

body.light-mode .form-check-input[type="checkbox"]:checked {
    background-color: #28a745;
    border-color: #28a745;
}

body.light-mode table.dataTable tbody td.select-checkbox::before,
body.light-mode table.dataTable tbody th.select-checkbox::before {
    border: 2px solid #495057 !important;
    background-color: #ffffff !important;
}







/* Dark Mode (Default) Colors */
.searchable-select-dropdown {
    background: #212529;
    border: 1px solid #495057;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
}

    /* Dark Mode (Default) Colors - with higher specificity */
    .searchable-select-dropdown .dropdown-item {
        background-color: #212529;
        color: #ffffff;
        border-bottom: none;
        transition: background-color 0.05s ease-in-out, color 0.05s ease-in-out;
    }

        .searchable-select-dropdown .dropdown-item:hover {
            background-color: #87ceeb !important;
            color: #000000 !important;
        }

        .searchable-select-dropdown .dropdown-item.highlighted {
            background-color: #87ceeb !important;
            color: #000000 !important;
        }

.dropdown-arrow {
    color: #6c757d;
}

    .dropdown-arrow:hover {
        color: #86b7fe;
    }

.searchable-select-input:focus + .dropdown-arrow {
    color: #86b7fe;
}

.searchable-select-input:focus {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Light Mode Color Overrides */
body.light-mode .searchable-select-dropdown {
    background: #ffffff;
    border-color: #ced4da;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

    body.light-mode .searchable-select-dropdown .dropdown-item {
        background-color: #ffffff;
        color: #212529;
        border-bottom: none;
        transition: background-color 0.05s ease-in-out, color 0.05s ease-in-out;
    }

        body.light-mode .searchable-select-dropdown .dropdown-item:hover {
            background-color: #316ac5 !important;
            color: #ffffff !important;
        }

        body.light-mode .searchable-select-dropdown .dropdown-item.highlighted {
            background-color: #316ac5 !important;
            color: #ffffff !important;
        }

body.light-mode .dropdown-arrow {
    color: #6c757d;
}

    body.light-mode .dropdown-arrow:hover {
        color: #86b7fe;
    }

body.light-mode .searchable-select-input:focus + .dropdown-arrow {
    color: #86b7fe;
}

body.light-mode .searchable-select-input {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #ced4da !important;
}

    body.light-mode .searchable-select-input:focus {
        background-color: #ffffff !important;
        color: #212529 !important;
        border-color: #86b7fe !important;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    }


/* Add disabled styling for the input - Dark Mode (Default) */
.searchable-select-input:disabled {
    background-color: #343a40 !important;
    opacity: 1 !important;
    color: #6c757d !important;
    cursor: default !important;
    border-color: #495057 !important;
}

/* Add disabled styling for the dropdown arrow - Dark Mode (Default) */
.dropdown-arrow.disabled {
    color: #6c757d !important;
    cursor: default !important;
    opacity: 0.65;
}

/* Light Mode disabled styling for the input */
body.light-mode .searchable-select-input:disabled {
    background-color: #e9ecef !important;
    opacity: 1 !important;
    color: #6c757d !important;
    cursor: default !important;
    border-color: #ced4da !important;
}

/* Light Mode disabled styling for the dropdown arrow */
body.light-mode .dropdown-arrow.disabled {
    color: #6c757d !important;
    cursor: default !important;
    opacity: 0.65;
}

.modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1050 !important;
    background-color: rgba(30, 30, 30, 0.6) !important;
}