#balance {
    display: inline;
    padding: .2em .6em .3em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25em;
    padding: 0.4em 0.6em !important;
    background-color: #5bc0de;
}

/* Mobile balance dropdown improvements */
@media (max-width: 991.98px) {
    #page-header-user-dropdown {
        padding: 0.5rem 0.5rem !important;
    }
    
    #balance .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.5em;
    }
    
    #page-header-user-dropdown .mdi-chevron-down {
        font-size: 14px;
        opacity: 0.8;
    }
}

/* Ensure dropdown icon is always visible with proper spacing */
#page-header-user-dropdown .mdi-chevron-down {
    transition: transform 0.2s ease;
}

#page-header-user-dropdown[aria-expanded="true"] .mdi-chevron-down {
    transform: rotate(180deg);
}

/* Select2 Dark Theme Styling */
.select2-container .select2-choice {
    background-color: #32394e !important;
    background-image: none !important;
    border: 1px solid #464f60 !important;
    border-radius: 0.375rem !important;
    color: #adb5bd !important;
    height: 38px !important;
    line-height: 36px !important;
    padding: 0 12px !important;
}

.select2-container .select2-choice:hover,
.select2-container .select2-choice:focus {
    border-color: #556ee6 !important;
    box-shadow: 0 0 0 0.2rem rgba(85, 110, 230, 0.25) !important;
}

.select2-container-active .select2-choice {
    border-color: #556ee6 !important;
    box-shadow: 0 0 0 0.2rem rgba(85, 110, 230, 0.25) !important;
}

.select2-container .select2-choice .select2-chosen {
    color: #adb5bd !important;
}

/* Hide the real dropdown arrow completely and any duplicate arrows */
.select2-container .select2-choice .select2-arrow {
    display: none !important;
}

/* Remove any duplicate dropdown icons from Bootstrap */
.select2-container + .form-select::after,
.form-select.select2-offscreen::after {
    display: none !important;
}

/* Hide the original select elements that are duplicated */
.form-select.select2-offscreen,
select.select2-offscreen {
    display: none !important;
    position: absolute !important;
    left: -10000px !important;
}

/* Ensure Select2 containers replace original selects completely */
.select2-container {
    position: relative !important;
    z-index: 1 !important;
}

/* Hide any remaining duplicate select elements */
.select2-container ~ .form-select,
.select2-container ~ select {
    display: none !important;
    visibility: hidden !important;
}

/* Ensure Select2 container takes full width */
.select2-container {
    width: 100% !important;
    display: block !important;
}

/* Create a custom dropdown arrow that matches the theme */
.select2-container .select2-choice::after {
    content: "" !important;
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border-color: #adb5bd transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 5px 4px 0 4px !important;
    height: 0 !important;
    width: 0 !important;
    pointer-events: none !important;
}

/* Ensure only one dropdown arrow appears */
.select2-container .select2-choice .select2-arrow b {
    display: none !important;
}

.select2-container .select2-choice div {
    display: none !important;
}

/* Select2 Dropdown Menu */
.select2-drop {
    background-color: #32394e !important;
    border: 1px solid #464f60 !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    margin-top: 1px !important;
}

/* Fix the search input in dropdown */
.select2-drop .select2-search {
    padding: 8px !important;
    background-color: #32394e !important;
}

.select2-drop .select2-search input,
.select2-drop .select2-search .select2-input,
#select2-drop .select2-search input,
#select2-drop .select2-search .select2-input,
.select2-input,
.select2-search .select2-input,
.select2-container .select2-search .select2-input,
.select2-container-active .select2-search .select2-input,
.select2-dropdown .select2-search .select2-input,
input.select2-input[class] {
    background-color: #32394e !important;
    background: #32394e !important;
    border: 1px solid #464f60 !important;
    color: #adb5bd !important;
    border-radius: 0.375rem !important;
    padding: 8px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.select2-drop .select2-search input:focus,
.select2-drop .select2-search .select2-input:focus,
#select2-drop .select2-search input:focus,
#select2-drop .select2-search .select2-input:focus,
.select2-input:focus {
    border-color: #556ee6 !important;
    box-shadow: 0 0 0 0.2rem rgba(85, 110, 230, 0.25) !important;
    outline: none !important;
}

.select2-drop .select2-search input::placeholder,
.select2-drop .select2-search .select2-input::placeholder,
#select2-drop .select2-search input::placeholder,
#select2-drop .select2-search .select2-input::placeholder,
.select2-input::placeholder {
    color: #6c757d !important;
}

.select2-drop .select2-results {
    background-color: #32394e !important;
    color: #adb5bd !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

.select2-drop .select2-results .select2-result {
    color: #adb5bd !important;
    padding: 8px 12px !important;
    cursor: pointer !important;
}

.select2-drop .select2-results .select2-highlighted {
    background-color: #556ee6 !important;
    color: #fff !important;
}

.select2-drop .select2-results .select2-result:hover {
    background-color: #464f60 !important;
}

/* Select2 Multi-select (for bin field) - Enhanced targeting */
.select2-container-multi .select2-choices,
.select2-container-multi.massbin .select2-choices,
#s2id_cardbin .select2-choices,
.massbin .select2-choices {
    background-color: #32394e !important;
    background-image: none !important;
    border: 1px solid #464f60 !important;
    border-radius: 0.375rem 0 0 0.375rem !important;
    min-height: 38px !important;
    cursor: text !important;
    color: #adb5bd !important;
}

.select2-container-multi .select2-choices:hover,
.select2-container-multi .select2-choices:focus-within,
.select2-container-multi.massbin .select2-choices:hover,
#s2id_cardbin .select2-choices:hover {
    border-color: #556ee6 !important;
    background-color: #32394e !important;
}

/* Target the search field input more aggressively */
.select2-container-multi .select2-choices .select2-search-field input,
.select2-container-multi .select2-choices .select2-search-field .select2-input,
.select2-search-field input,
.select2-search-field .select2-input,
#s2id_cardbin input,
#s2id_cardbin .select2-input,
.massbin input,
.massbin .select2-input {
    background-color: transparent !important;
    background-image: none !important;
    color: #adb5bd !important;
    border: none !important;
    outline: none !important;
    height: 36px !important;
    padding: 0 8px !important;
    font-family: inherit !important;
    box-shadow: none !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.select2-container-multi .select2-choices .select2-search-field input::placeholder,
.select2-container-multi .select2-choices .select2-search-field .select2-input::placeholder,
.select2-search-field input::placeholder,
.select2-search-field .select2-input::placeholder,
#s2id_cardbin input::placeholder,
.massbin input::placeholder {
    color: #6c757d !important;
}

/* Override any inline styles that might be applied */
.select2-container-multi .select2-choices[style] {
    background-color: #32394e !important;
    background-image: none !important;
    color: #adb5bd !important;
}

.select2-search-field input[style],
.select2-input[style] {
    background-color: transparent !important;
    background-image: none !important;
    color: #adb5bd !important;
}

/* Force theme colors on all Select2 elements regardless of inline styles */
.select2-container-multi .select2-choices,
.select2-container .select2-choice {
    background-color: #32394e !important;
    background-image: none !important;  
    background: #32394e !important;
    color: #adb5bd !important;
}

/* Ensure bin field specifically uses dark theme */
#s2id_cardbin .select2-choices,
.massbin .select2-choices {
    background-color: #32394e !important;
    background-image: none !important;
    background: #32394e !important;
    color: #adb5bd !important;
    border: 1px solid #464f60 !important;
}

/* Fix the bin field layout and input group */
.input-group .select2-container-multi {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 60px) !important;
}

.input-group .select2-container-multi .select2-choices {
    border-radius: 0.375rem 0 0 0.375rem !important;
    border-right: none !important;
    min-width: 120px !important;
    width: 100% !important;
}

.input-group .btn {
    border-radius: 0 0.375rem 0.375rem 0 !important;
    border-left: none !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* Ensure the bin field container stays in the grid */
.col-md-3 .input-group {
    display: flex !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
}



/* Additional cleanup for double containers */
.col-md-3 .select2-container,
.col-md-2 .select2-container {
    margin-bottom: 0 !important;
    padding: 0 !important;
    border:unset;
}

/* Hide any remaining duplicate elements */
.select2-container ~ .form-select,
.select2-container ~ select {
    display: none !important;
    visibility: hidden !important;
}

/* Prevent double containers by hiding original elements more aggressively */
.form-select.select2-offscreen,
select.select2-offscreen {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* Ensure clean layout - only one container per field */

/* Force proper layout for input groups with Select2 */

/* Ensure Select2 multi containers don't break Bootstrap grid */
.select2-container-multi {
    display: block !important;
    width: 100% !important;
}

/* Multi-select selected items styling */
.select2-container-multi .select2-choices .select2-search-choice {
    background-color: #556ee6 !important;
    border: 1px solid #556ee6 !important;
    color: #fff !important;
    border-radius: 0.25rem !important;
    padding: 2px 20px 2px 8px !important;
    margin: 3px 0 3px 5px !important;
    line-height: 1.4 !important;
}

.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close {
    color: #fff !important;
    opacity: 0.7 !important;
    font-weight: bold !important;
    cursor: pointer !important;
}

.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
    opacity: 1 !important;
}

/* Focus states */
.select2-container-multi.select2-container-active .select2-choices {
    border-color: #556ee6 !important;
    box-shadow: 0 0 0 0.2rem rgba(85, 110, 230, 0.25) !important;
}

/* Multi-select dropdown for bin field */
.select2-container-multi .select2-drop {
    background-color: #32394e !important;
    border: 1px solid #464f60 !important;
}

.select2-container-multi .select2-drop .select2-results {
    background-color: #32394e !important;
}

.select2-container-multi .select2-drop .select2-results .select2-result {
    color: #adb5bd !important;
    padding: 8px 12px !important;
}

.select2-container-multi .select2-drop .select2-results .select2-highlighted {
    background-color: #556ee6 !important;
    color: #fff !important;
}

#page-header-search-dropdown {
    display: none!important;
}

.no-display {
	display: none;
}

[class^="icheckbox_"], [class*="icheckbox_"], [class^="iradio_"], [class*="iradio_"] {
	float: left !important;
	margin: 0 5px 0 -20px !important;
}

#layout-wrapper {
	height: 100%!important;
	min-height: 100vh!important;
}