 /* Forzar scroll interno del cuerpo del modal de cotización */
    #cotizacionModal .modal-body {
        max-height: calc(100vh - 12rem);
        overflow-y: auto;
    }
    /* Evitar scroll en el header/footer y mantener la cabecera fija */
     .modal-header,
    .modal-footer {
        position: sticky;
        top: 0;
        bottom: 0;
        z-index: 1;
        background: var(--bs-body-bg);
    }
 .modal-footer { top: auto; bottom: 0; }

    /* Scroll en dropdowns de Select2 dentro del modal de cotización */
 .select2-container .select2-results > .select2-results__options {
        max-height: 240px;
        overflow-y: auto;
    }
    /* Garantizar que el dropdown de Select2 se muestre por encima del contenido del modal */
 .select2-container .select2-dropdown {
        z-index: 1061;
    }

    /* Scroll en dropdowns de Select2 del formulario de búsqueda (cliente) */
   .select2-container .select2-results > .select2-results__options {
        max-height: 240px;
        overflow-y: auto;
    }

    /* Mejora de presentación y accesibilidad para Select2 (tema bootstrap-5) */
    /* Selección: bordes, altura y foco amigable */
    .select2-container--bootstrap-5 .select2-selection--single {
        border: 1px solid #ced4da !important;
        border-radius: .5rem;
        min-height: 2.5rem; /* ~40px */
        display: flex;
        align-items: center;
        padding: .25rem .75rem;
        background-color: #fff;
        transition: box-shadow .15s ease, border-color .15s ease;
    }
    .select2-container--bootstrap-5.select2-container--focus .select2-selection--single {
        border-color: #86b7fe !important;
        box-shadow: 0 0 0 .25rem rgba(13,110,253,.25);
        outline: 0;
    }

    /* Estado hover para Select2 */
    .select2-container--bootstrap-5 .select2-selection--single:hover {
        border-color: #adb5bd !important;
    }
    .select2-container--bootstrap-5 .select2-selection__rendered {
        line-height: 1.5;
        font-size: .95rem;
        color: #212529;
    }
    .select2-container--bootstrap-5 .select2-selection__placeholder {
        color: #6c757d;
        opacity: .9;
    }
    .select2-container--bootstrap-5 .select2-selection__arrow {
        height: 100%;
    }

    /* Dropdown: borde suave, sombra y esquinas redondeadas */
    .select2-container--bootstrap-5 .select2-dropdown {
        border-radius: .5rem;
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
        overflow: hidden;
        border-color: #dee2e6;
    }
    .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
        padding: .5rem .75rem;
        border-radius: .375rem;
        border: 1px solid #ced4da;
    }

    /* Opciones: padding amigable y estados de hover/teclado/seleccionado */
    .select2-container--bootstrap-5 .select2-results__options {
        padding: .25rem 0;
    }
    .select2-container--bootstrap-5 .select2-results__option {
        padding: .5rem .75rem;
        cursor: pointer;
    }
    /* Hover con mouse */
    .select2-container--bootstrap-5 .select2-results__option:hover {
        background-color: #f1f5ff;
        color: #0d6efd;
    }
    /* Navegación con teclado (highlighted) */
    .select2-container--bootstrap-5 .select2-results__option--highlighted {
        background-color: #e7f1ff !important;
        color: #0d6efd !important;
    }
    /* Opción seleccionada marcada en azul y con check */
    .select2-container--bootstrap-5 .select2-results__option[aria-selected="true"] {
        background-color: #0d6efd !important;
        color: #fff !important;
        position: relative;
    }
    .select2-container--bootstrap-5 .select2-results__option[aria-selected="true"]::before {
        content: "\2713"; /* ✓ */
        position: absolute;
        left: .5rem;
        color: #fff;
        font-weight: 700;
    }
    /* Añade sangría para que no tape el check */
    .select2-container--bootstrap-5 .select2-results__option {
        padding-left: 1.75rem;
    }

    /* Específicos del modal de cotización (mismos estilos, pero dentro del scope del modal) */
    #cotizacionModal .select2-container--bootstrap-5 .select2-selection--single {
        border: 1px solid #ced4da !important;
        border-radius: .5rem;
        min-height: 2.5rem;
        padding: .25rem .75rem;
    }
    #cotizacionModal .select2-container--bootstrap-5.select2-container--focus .select2-selection--single {
        border-color: #86b7fe !important;
        box-shadow: 0 0 0 .25rem rgba(13,110,253,.25);
    }
    
    /* Estado hover para Select2 dentro del modal */
    #cotizacionModal .select2-container--bootstrap-5 .select2-selection--single:hover {
        border-color: #adb5bd !important;
    }

    /* ===================== */
    /* Compatibilidad Modo Oscuro */
    /* Aplica cuando el sitio use Bootstrap 5.3 con data-bs-theme="dark" o clases comunes de dark mode */
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-dropdown {
        background-color: var(--bs-body-bg, #212529);
        color: var(--bs-body-color, #e9ecef);
        border-color: var(--bs-border-color, #495057);
    }
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-results__option {
        color: var(--bs-body-color, #e9ecef);
    }
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-results__option:hover {
        background-color: rgba(13,110,253,.20);
        color: #fff;
    }
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-results__option--highlighted {
        background-color: #0d6efd !important;
        color: #fff !important;
    }
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-results__option[aria-selected="true"] {
        background-color: #0d6efd !important;
        color: #fff !important;
    }
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-selection--single {
        background-color: var(--bs-body-bg, #212529);
        color: var(--bs-body-color, #e9ecef);
        border: 1px solid var(--bs-border-color, #495057) !important;
    }
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-selection__rendered {
        color: var(--bs-body-color, #e9ecef);
    }
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-selection__placeholder {
        color: #adb5bd;
    }
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-selection__clear {
        color: #ced4da;
    }
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-selection__clear:hover {
        color: #fff;
    }
    :where([data-bs-theme='dark'], .dark, .dark-mode, [data-theme='dark']) .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
        background-color: var(--bs-body-bg, #212529);
        color: var(--bs-body-color, #e9ecef);
        border-color: var(--bs-border-color, #495057);
    }
    /* ===================== */  
