﻿/* Estilos Compactos y Responsive */
.course-info-card {
    background: linear-gradient(79deg, rgba(25, 40, 84, 1) 0%, rgba(0, 49, 84, 1) 57%);
    border-radius: 10px;
    padding: 10px 12px;
    color: white;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.course-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 10px;
}

.course-title {
    font-weight: bold;
    font-size: 0.95rem;
    color: #bbd000;
}

.course-meta .badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.65rem;
}

/* Progress Steps Compactos */
.progress-container {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.progress-steps {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    transition: all 0.3s;
}

.step-item.active .step-circle {
    background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 50%);
    color: white;
    transform: scale(1.05);
}

.step-item.completed .step-circle {
    background: #bbd000;
    color: white;
}

.step-label {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 500;
    color: #666;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 3px;
}

.progress-bar-modern {
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(25deg, rgba(187, 208, 0, 1) 0%, rgba(25, 40, 84, 1) 50%);
    transition: width 0.3s ease;
}

/* Form Steps - CON ALTURA FIJA PARA TODOS LOS PASOS */
.form-step {
    display: none;
    flex-direction: column;
    height: 320px; /* Altura FIJA para TODOS los pasos */
    position: relative;
    overflow-x: hidden; /* OCULTA CUALQUIER DESBORDAMIENTO HORIZONTAL */
    width: 100%;
    box-sizing: border-box;
}

    .form-step.active {
        display: flex !important;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header fijo arriba */
.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
    flex-shrink: 0; /* No se encoge */
    height: 35px; /* Altura fija del header */
}
/* Footer fijo abajo - SIEMPRE EN LA MISMA POSICIÓN */
.step-footer {
    margin-top: 0; /* Quitamos el margin-top auto */
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0; /* No se encoge */
    height: 45px; /* Altura fija del footer */
    background: white; /* Fondo blanco para que no se vea el scroll detrás */
    position: relative;
    bottom: 0;
    width: 100%;
}

.step-title {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
}

.step-badge {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 9px;
    color: #666;
}

.step-content {
    flex: 1 1 auto;
    overflow-y: auto; /* Scroll vertical si es necesario */
    overflow-x: hidden; /* NO scroll horizontal */
    padding: 0 4px 0 0; /* Solo padding derecho para el scroll, sin padding izquierdo */
    margin: 0 0 5px 0;
    max-height: calc(320px - 80px); /* 320px altura total - (header + footer) */
    width: 100%;
    box-sizing: border-box;
}
/* Contenedor del contenido del paso - OCUPA EL ESPACIO RESTANTE */
.step-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Importante para que funcione el overflow */
}

/* Form Groups Compactos */
.form-group-modern {
    margin-bottom: 0.4rem;
}

.form-label {
    font-weight: 500;
    color: #555;
    font-size: 0.7rem;
    margin-bottom: 2px;
}

.form-control-sm, .form-select-sm {
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    height: 32px;
}

    .form-control-sm:focus, .form-select-sm:focus {
        border-color: #4993cc;
        box-shadow: 0 0 0 2px rgba(73, 147, 204, 0.1);
    }

/* BOTONES UNIFORMES PARA TODOS LOS PASOS */
.btn-uniform {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 34px;
}

    .btn-uniform.btn-primary {
        background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 50%);
        color: white;
        box-shadow: 0 2px 5px rgba(102, 126, 234, 0.2);
    }

        .btn-uniform.btn-primary:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
        }

        .btn-uniform.btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

    .btn-uniform.btn-secondary {
        background: #f0f0f0;
        color: #666;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

        .btn-uniform.btn-secondary:hover {
            background: #e0e0e0;
            transform: translateY(-1px);
        }

    .btn-uniform.btn-success {
        background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 50%);
        color: white;
        box-shadow: 0 2px 5px rgba(40, 167, 69, 0.2);
    }

        .btn-uniform.btn-success:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
        }

        .btn-uniform.btn-success:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

/* BOTÓN DE BÚSQUEDA */
.btn-search {
    background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 50%);
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    padding: 0 15px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    height: 32px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-search:hover:not(:disabled) {
        background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 50%);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    }

    .btn-search:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* Estilos para Select2 */
.select2-container {
    z-index: 9999;
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 32px !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 22px !important;
        font-size: 0.8rem !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 30px !important;
    }

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: linear-gradient(135deg, #4993cc 0%, #192854 100%) !important;
}

.select2-dropdown {
    border: 1.5px solid #4993cc !important;
    border-top: none !important;
    border-radius: 0 0 6px 6px !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1) !important;
}

.select2-search__field {
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 4px !important;
    font-size: 0.8rem !important;
}

    .select2-search__field:focus {
        border-color: #4993cc !important;
        outline: none !important;
        box-shadow: 0 0 0 2px rgba(73, 147, 204, 0.1) !important;
    }

/* Estilos para búsqueda de participante */
#cuiInput {
    border: 1.5px solid #e0e0e0;
    border-radius: 6px 0 0 6px;
    padding: 0 8px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    font-family: monospace;
    height: 32px;
}

    #cuiInput:focus {
        border-color: #4993cc;
        box-shadow: 0 0 0 2px rgba(73, 147, 204, 0.1);
        outline: none;
    }

    #cuiInput.error {
        border-color: #dc3545;
        background-color: #fff8f8;
    }

.input-group {
    display: flex;
    align-items: center;
}

.input-group-text {
    height: 32px;
    border-radius: 6px 0 0 6px;
    background: #f8f9fa;
}

/* Botón de registro como enlace */
.btn-outline-success {
    border: 1px solid #bbd000;
    color: #bbd000;
    background: white;
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .btn-outline-success:hover {
        background: #bbd000;
        color: #192854;
        text-decoration: none;
    }

/* ========== PASO 3 - COHORTE MEJORADO Y CENTRADO ========== */
/* ========== PASO 3 - COHORTE MEJORADO Y CENTRADO ========== */

/* Contenedor principal del grid - CENTRADO VERTICALMENTE */
.cohortes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 480px)); /* Ancho controlado: mínimo 220px, máximo 480px */
    gap: 12px;
    max-height: 220px; /* Altura máxima fija */
    overflow-y: auto;
    padding: 8px 4px;
    margin: 10px auto; /* Centrado horizontal automático */
    width: 100%;
    justify-content: center; /* Centra las cards cuando hay pocas */
}

/* Para centrar el grid cuando hay pocos elementos */
#step3 .step-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
}

#step3 .cohortes-grid {
    width: auto;
    max-width: 900px; /* Ancho máximo para evitar que se estire demasiado */
    margin: 0 auto;
}

/* Wrapper para cada card */
.cohorte-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px; /* Ancho máximo para cada card */
    margin: 0 auto; /* Centra la card si es la única */
}

/* Ocultar el radio input original pero mantenerlo accesible */
.cohorte-radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Estilo base de la card */
.cohorte-card {
    display: block;
    position: relative;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 14px 14px 14px 45px; /* Más espacio para la animación del check */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Transición suave */
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    height: 100%;
}

    /* Check con animación */
    .cohorte-card .cohorte-check {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%) scale(0.8);
        color: #bbd000;
        font-size: 1.3rem;
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

/* Check cuando está seleccionado - con animación de rebote suave */
.cohorte-radio-input:checked + .cohorte-card .cohorte-check {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    animation: checkPop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkPop {
    0% {
        transform: translateY(-50%) scale(0.4);
        opacity: 0;
    }

    60% {
        transform: translateY(-50%) scale(1.15);
    }

    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

/* Hover effect */
.cohorte-card:hover {
    border-color: #4993cc;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(73, 147, 204, 0.2);
}

/* Estado seleccionado */
.cohorte-radio-input:checked + .cohorte-card {
    border-color: #bbd000;
    background: linear-gradient(to bottom right, #ffffff, #f0fff4);
    box-shadow: 0 6px 14px rgba(187, 208, 0, 0.2);
    transform: translateY(-2px);
}

/* Header de la card */
.cohorte-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cohorte-codigo {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    letter-spacing: 0.3px;
}

.cohorte-badge {
    background: linear-gradient(135deg, #4993cc 0%, #192854 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* Contenedor de información */
.cohorte-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #555;
    font-size: 0.75rem;
    line-height: 1.4;
}

    .info-item i {
        color: #4993cc;
        width: 14px;
        font-size: 0.75rem;
        margin-top: 3px;
    }

.info-text {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.info-label {
    font-weight: 600;
    color: #666;
    min-width: 65px;
}

/* Scroll personalizado */
.cohortes-grid::-webkit-scrollbar {
    width: 6px;
}

.cohortes-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cohortes-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4993cc 0%, #192854 100%);
    border-radius: 10px;
}

    .cohortes-grid::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #192854 0%, #4993cc 100%);
    }

/* Media queries */
@media (max-width: 768px) {
    .cohortes-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 240px));
        max-height: 240px;
        gap: 10px;
    }

    .cohorte-card-wrapper {
        max-width: 240px;
    }

    .cohorte-card {
        padding: 12px 12px 12px 40px;
    }

        .cohorte-card .cohorte-check {
            transform: translateY(-50%) scale(0.5);
        }
}

@media (max-width: 576px) {
    .cohortes-grid {
        grid-template-columns: minmax(200px, 220px);
        max-height: 220px;
    }

    .cohorte-card-wrapper {
        max-width: 220px;
    }

    .cohorte-card {
        padding: 10px 10px 10px 35px;
    }

    .cohorte-codigo {
        font-size: 0.85rem;
    }

    .info-item {
        font-size: 0.7rem;
    }
}

#cohorteContainer {
    min-height: 80px; /* evita el salto */
    transition: all 0.3s ease;
}

/* ================================
   CONTENEDOR FIJO (CLAVE)
================================ */
#mensajeCohorteWrapper {
    min-height: 42px; /* reserva espacio SIEMPRE */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

/* ================================
   MENSAJE
================================ */
.mensaje-cohorte {
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.25s ease;
    pointer-events: none;
    background: linear-gradient(135deg, #fff3cd, #fff9e6);
    border-left: 4px solid #bbd000;
    border-radius: 8px;
    color: #856404;
    font-size: 0.8rem;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    /* ACTIVO */
    .mensaje-cohorte.activo {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }










/* Ajustes específicos para cada paso */

/* PASO 0 - Participante */
#step0 .step-content {
    padding: 5px 0;
}

/* PASO 1 - Laboral */
#step1 .step-content {
    padding: 5px 0;
}

/* PASO 2 - Ubicación */
#step2 .step-content {
    padding: 5px 0;
}

/* PASO 3 - Cohorte */
#step3 .step-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

#step3 .cohortes-grid {
    max-height: 180px; /* Ajustado para que quepa con header y footer */
    overflow-y: auto;
}

/* Para pantallas pequeñas */
@media (max-width: 576px) {
    .form-step {
        height: 360px; /* Un poco más alto en móviles */
    }

    .step-content {
        max-height: calc(360px - 80px);
    }
}



/**/
.modal-header {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #4993cc, #192854);
    border-image-slice: 1;
    padding: 1rem 1.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 15px;
}

    .modal-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #4993cc, #192854, #4993cc);
        background-size: 200% 100%;
        animation: gradientMove 3s ease infinite;
    }

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0; /* Permite que el texto se contraiga si es necesario */
}

/* Icono animado - más compacto */
.modal-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4993cc 0%, #192854 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(73, 147, 204, 0.3);
    animation: iconPulse 2s ease infinite;
    position: relative;
    flex-shrink: 0; /* Evita que el icono se encoja */
}

    .modal-icon::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: inherit;
        opacity: 0.5;
        z-index: -1;
        animation: iconRipple 2s ease infinite;
    }

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes iconRipple {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Contenedor del texto del título */
.modal-title-content {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Permite que el texto se contraiga */
    flex: 1;
}

/* Fila superior del título */
.modal-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2px;
}

/* Título con efecto degradado - más compacto */
.modal-title-text {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #333, #4993cc, #192854);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: titleGradient 5s ease infinite;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

@keyframes titleGradient {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Badge - más compacto */
.modal-badge {
    background: linear-gradient(135deg, #4993cc15 0%, #19285415 100%);
    color: #4993cc;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid #4993cc30;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .modal-badge i {
        font-size: 0.6rem;
    }

/* Subtítulo */
.modal-subtitle {
    color: #666;
    font-size: 0.7rem;
    display: block;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

/* ========== BOTÓN DE CERRAR ANIMADO ========== */
.btn-close-custom {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(73, 147, 204, 0.1);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4993cc;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    flex-shrink: 0; /* Evita que el botón se encoja */
    margin-left: auto; /* Empuja el botón hacia la derecha */
}

    .btn-close-custom::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #4993cc 0%, #192854 100%);
        border-radius: 50%;
        transform: scale(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: -1;
    }

    .btn-close-custom:hover {
        color: white;
        transform: rotate(90deg) scale(1.1);
        border-color: #4993cc;
        box-shadow: 0 4px 12px rgba(73, 147, 204, 0.4);
    }

        .btn-close-custom:hover::before {
            transform: scale(1);
        }

    .btn-close-custom:active {
        transform: rotate(180deg) scale(0.95);
    }

    .btn-close-custom i {
        transition: all 0.3s ease;
        font-size: 1rem;
    }

    .btn-close-custom:hover i {
        transform: scale(0.9);
    }

    .btn-close-custom::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .btn-close-custom:hover::after {
        opacity: 0.3;
        animation: particles 1s ease infinite;
    }

@keyframes particles {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.1;
    }
}

/* Línea decorativa inferior */
.modal-header-decoration {
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4993cc, #192854, #4993cc, transparent);
    animation: lineWidth 4s ease infinite;
}

@keyframes lineWidth {
    0%, 100% {
        left: 15%;
        right: 15%;
        opacity: 0.7;
    }

    50% {
        left: 25%;
        right: 25%;
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-header {
        padding: 0.8rem 1rem;
        gap: 10px;
    }

    .modal-title-wrapper {
        gap: 10px;
    }

    .modal-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .modal-title-text {
        font-size: 1rem;
        max-width: 180px;
    }

    .modal-badge {
        padding: 2px 6px;
        font-size: 0.6rem;
    }

    .modal-subtitle {
        font-size: 0.65rem;
        max-width: 250px;
    }

    .btn-close-custom {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .modal-title-text {
        max-width: 140px;
    }

    .modal-badge {
        display: none; /* Ocultar badge en móviles muy pequeños */
    }

    .modal-subtitle {
        max-width: 180px;
    }
}


/**/
/* ========== BOTÓN DE BÚSQUEDA MEJORADO ========== */
.btn-search-step0 {
    background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 100%);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 18px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 32px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(25, 40, 84, 0.25);
    letter-spacing: 0.3px;
}

    /* Brillo transparente */
    .btn-search-step0::before {
        content: '';
        position: absolute;
        top: 0;
        left: -120%;
        width: 60%;
        height: 100%;
        background: linear-gradient( 120deg, transparent, rgba(255, 255, 255, 0.35), transparent );
        transform: skewX(-20deg);
        transition: left 0.6s ease;
    }

    .btn-search-step0:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 12px rgba(25, 40, 84, 0.35);
    }

        .btn-search-step0:hover::before {
            left: 140%;
        }

    .btn-search-step0:active {
        transform: translateY(1px);
        box-shadow: 0 2px 4px rgba(25, 40, 84, 0.2);
    }

    .btn-search-step0:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
        filter: grayscale(0.5);
    }

    .btn-search-step0 i {
        font-size: 0.85rem;
        transition: transform 0.2s ease;
    }

    .btn-search-step0:hover i {
        transform: scale(1.1);
    }

    /* Estado de carga */
    .btn-search-step0.loading {
        pointer-events: none;
        opacity: 0.8;
    }

        .btn-search-step0.loading i {
            animation: spin 1s linear infinite;
        }

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Versión compacta para móviles */
@media (max-width: 576px) {
    .btn-search-step0 {
        min-width: 50px;
        padding: 0 12px;
    }

        .btn-search-step0 span {
            display: none; /* Ocultar texto en móviles */
        }

        .btn-search-step0 i {
            font-size: 1rem;
        }
}

/*MODAL DE REGISTRO*/
/* Asegurar que el modal esté por encima de todo */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

/* Estilos para el formulario dentro del modal */
#formRegistroRapido .form-label {
    font-weight: 500;
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 2px;
}

#formRegistroRapido .form-control {
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    height: 38px;
}

    #formRegistroRapido .form-control:focus {
        border-color: #4993cc;
        box-shadow: 0 0 0 2px rgba(73, 147, 204, 0.1);
    }

    #formRegistroRapido .form-control[readonly] {
        background-color: #f8f9fa;
        cursor: not-allowed;
    }
#btnConfirmar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.2);
}