.toggle-sidebar {
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
}

.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links .simplebar-wrapper .simplebar-mask .simplebar-content-wrapper .simplebar-content>li .sidebar-link.active i{
        color: var(--theme-default);
}
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links .simplebar-wrapper .simplebar-mask .simplebar-content-wrapper .simplebar-content>li.sidebar-list:hover>a i {
    color: var(--theme-default);
}

/* Fix: Theme overrides make .offcanvas position: unset and always visible.
   Restore proper Bootstrap behavior for our create-offcanvas only. */
#createOffcanvas {
    position: fixed !important; /* override theme */
    visibility: hidden;         /* hidden until shown */
    z-index: 1045;              /* above content */
    background: var(--bs-body-bg, #fff);
    transition: 0.3s ease-in-out;
}
#createOffcanvas.show {
    visibility: visible;
    transition: 0.3s ease-in-out;
}
.error{
    margin: 10px 0 ;
}
.alert-success{
    background: #43a53a;
}
.page-body-wrapper div.sidebar-wrapper .logo-wrapper img{
    max-width:150px ;
}
.profile-box {
    height: 296px;
}

/* ===== MODERN SELECT2 STYLING ===== */
/* CSS Custom Properties for consistent theming */
:root {
    --select2-primary: #e53935;
    --select2-primary-dark: #d32f2f;
    --select2-primary-darker: #b71c1c;
    --select2-primary-light: rgba(229, 57, 53, 0.1);
    --select2-primary-bg: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    --select2-primary-bg-hover: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    --select2-border: #e9ecef;
    --select2-border-focus: #e53935;
    --select2-bg: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    --select2-bg-focus: #ffffff;
    --select2-text: #495057;
    --select2-text-muted: #6c757d;
    --select2-shadow: 0 2px 8px rgba(0,0,0,0.06);
    --select2-shadow-focus: 0 0 0 3px rgba(229, 57, 53, 0.1), 0 4px 12px rgba(0,0,0,0.15);
    --select2-shadow-hover: 0 3px 10px rgba(0,0,0,0.1);
    --select2-shadow-dropdown: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    --select2-radius: 12px;
    --select2-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Modern Select2 Styling */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: var(--select2-bg) !important;
    border: 2px solid var(--select2-border) !important;
    border-radius: var(--select2-radius) !important;
    padding: 8px 16px !important;
    min-height: 52px !important;
    box-shadow: var(--select2-shadow) !important;
    transition: var(--select2-transition) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--select2-border-focus) !important;
    box-shadow: var(--select2-shadow-focus) !important;
    background: var(--select2-bg-focus) !important;
    transform: translateY(-1px);
}

.select2-container--default:hover .select2-selection--single,
.select2-container--default:hover .select2-selection--multiple {
    border-color: var(--select2-primary-dark) !important;
    box-shadow: var(--select2-shadow-hover) !important;
}

/* Single Select Arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 12px !important;
    top: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #6c757d transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 6px 6px 0 6px !important;
    height: 0 !important;
    left: 50% !important;
    margin-left: -6px !important;
    margin-top: -3px !important;
    position: absolute !important;
    top: 50% !important;
    width: 0 !important;
    transition: all 0.3s ease !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #6c757d transparent !important;
    border-width: 0 6px 6px 6px !important;
}

/* Placeholder and Selected Text */
.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--select2-text) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    padding-left: 4px !important;
}

/* Multiple Select Styling */
.select2-container--default .select2-selection--multiple {
    padding: 6px 12px !important;
    min-height: 52px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--select2-primary-bg) !important;
    border: none !important;
    border-radius: 20px !important;
    color: white !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin: 4px 6px 4px 0 !important;
    padding: 6px 12px !important;
    box-shadow: 0 2px 4px rgba(229, 57, 53, 0.2) !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice:hover {
    background: var(--select2-primary-bg-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(229, 57, 53, 0.3) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255,255,255,0.8) !important;
    font-weight: bold !important;
    margin-right: 6px !important;
    margin-left: 8px !important;
    border: none !important;
    background: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: white !important;
    background: rgba(255,255,255,0.1) !important;
    border-radius: 50% !important;
}

/* Dropdown Styling */
.select2-dropdown {
    border: none !important;
    border-radius: var(--select2-radius) !important;
    box-shadow: var(--select2-shadow-dropdown) !important;
    margin-top: 4px !important;
    background: white !important;
    overflow: hidden !important;
}

.select2-container--default .select2-results__option {
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--select2-text) !important;
    transition: all 0.2s ease !important;
    border-bottom: 1px solid #f8f9fa !important;
}

.select2-container--default .select2-results__option:last-child {
    border-bottom: none !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%) !important;
    color: #c62828 !important;
    font-weight: 600 !important;
}

.select2-container--default .select2-results__option--selected {
    background: var(--select2-primary-bg) !important;
    color: white !important;
    font-weight: 600 !important;
}

.select2-container--default .select2-results__option--selected .select2-results__option--highlighted {
    background: var(--select2-primary-bg-hover) !important;
}

/* Search Box in Dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 2px solid var(--select2-border) !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    margin: 8px !important;
    width: calc(100% - 16px) !important;
    background: #f8f9fa !important;
    transition: all 0.3s ease !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--select2-border-focus) !important;
    box-shadow: 0 0 0 3px var(--select2-primary-light) !important;
    background: white !important;
}

/* Loading and No Results */
.select2-container--default .select2-results__option--load-more {
    background: #f8f9fa !important;
    text-align: center !important;
    font-style: italic !important;
    color: var(--select2-text-muted) !important;
}

.select2-container--default .select2-results__message {
    padding: 20px 16px !important;
    text-align: center !important;
    color: var(--select2-text-muted) !important;
    font-style: italic !important;
}

/* Clear Button */
.select2-container--default .select2-selection__clear {
    color: var(--select2-text-muted) !important;
    cursor: pointer !important;
    float: right !important;
    font-weight: bold !important;
    margin-right: 30px !important;
    margin-top: 2px !important;
    padding: 2px 5px !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-selection__clear:hover {
    color: var(--select2-primary) !important;
    background: var(--select2-primary-light) !important;
    border-radius: 4px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .select2-container--default .select2-selection--single,
    .select2-container--default .select2-selection--multiple {
        font-size: 16px !important; /* Prevent zoom on iOS */
        min-height: 48px !important;
    }

    .select2-container--default .select2-results__option {
        padding: 14px 16px !important;
        font-size: 16px !important;
    }
}

/* Enhanced Accessibility and Focus Management */
.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--multiple:focus {
    outline: none !important;
}

/* Better focus ring for keyboard navigation */
.select2-container--default.select2-container--focus .select2-selection--single::before,
.select2-container--default.select2-container--focus .select2-selection--multiple::before {
    content: '' !important;
    position: absolute !important;
    top: -2px !important;
    left: -2px !important;
    right: -2px !important;
    bottom: -2px !important;
    border: 2px solid var(--select2-border-focus) !important;
    border-radius: 14px !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Smooth animations for better UX */
.select2-container--default .select2-selection__choice {
    animation: choiceFadeIn 0.3s ease-out !important;
}

@keyframes choiceFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading state styling */
.select2-container--default.select2-container--disabled .select2-selection--single,
.select2-container--default.select2-container--disabled .select2-selection--multiple {
    background: #f8f9fa !important;
    color: var(--select2-text-muted) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* Custom scrollbar for dropdown */
.select2-results__options::-webkit-scrollbar {
    width: 6px !important;
}

.select2-results__options::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 3px !important;
}

.select2-results__options::-webkit-scrollbar-thumb {
    background: #c1c1c1 !important;
    border-radius: 3px !important;
}

.select2-results__options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8 !important;
}

/* Animation for dropdown appearance */
.select2-dropdown {
    animation: select2FadeIn 0.2s ease-out !important;
}

@keyframes select2FadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.close_icon .logo-wrapper img, .logo-icon-wrapper img {
    width: auto !important;
    max-height: 15px !important;
    transform: scale(1.9)!important;
}
@media only screen and (max-width: 991.98px) {
    .page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .logo-wrapper .toggle-sidebar {
        display: none !important;
    }
}
@media (max-width: 767.98px) {
    .logo-wrapper img {
        max-height: 40px !important;
        transform: scale(1.7);
        padding: 0 0 0 25px;
    }
}

@media (min-width: 991.98px) {
    .page-wrapper.compact-wrapper .page-header .header-wrapper .logo-wrapper, .page-wrapper.compact-wrapper .page-header .header-wrapper .toggle-sidebar {
        display: none!important;
    }
}

@media (min-width: 200.98px) {
    .header-logo-wrapper a .img-fluid{
        display: none!important;
    }
}

.custom-input .form-check .form-check-input:valid ~ .form-check-label{
    color: var(--theme-default) !important;
}
.custom-input .form-check .form-check-input:valid {
    border-color: var(--theme-default) !important;
}
.custom-input .form-check .form-check-input:checked {
    background-color: var(--theme-default) !important;
}

 .btn-top-red {
        background-color: #fff !important;
        border: 1px solid #E3463B !important;
        color: #E3463B !important;
}
.btn-top-red:hover,
.btn-top-red:focus {
    background-color: #E3463B !important;
    color: #fff !important;
    border-color: #E3463B !important;
    box-shadow: none !important;
}

.basic-wizard .stepper-horizontal .step .step-bar-left, .basic-wizard .stepper-horizontal .step .step-bar-right{
    background-color: #e2e8f0 ;
    border-color: #e2e8f0;
}
.basic-wizard .stepper-horizontal .step.editing .step-circle{
    border-color: #E3463B !important;
}
.basic-wizard .stepper-horizontal .step.done .step-circle:before{
    font-family: "Font Awesome 6 Pro" !important;
    color: #E3463B !important;
}
.basic-wizard .stepper-horizontal .step.done .step-circle{
    border-color: #E3463B ;
    color: #E3463B;
}

.social-profile .card-header-right-icon{
    position: absolute;
    right: 20px;
    top: 15px;
}
.pagination-section .active>.page-link, .page-link.active{
    background-color: #E3463B !important;
    border-color: #E3463B !important;
}
.pagination-section .page-link {
    color: #E3463B ;
}
.pagination-section .active>.page-link{
    color: #fff !important;
}

.switcher.btn-group .table-btn{
    border-color: #E3463B;
    color: #838383;
}
.switcher.btn-group .card-btn{
    border-color: #E3463B;
    color: #838383;
}
.switcher.btn-group .btn.active {
    background-color: #E3463B;
    color: white;
    border-color: #E3463B;
}