/* ========================================
   REGISTRO PERSONA - CSS COMPLETO
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #0a2647;
    overflow-y: auto !important;
}

/* ========================================
   PÁGINA COMPLETA CON IMAGEN UNIFICADA
   ======================================== */
.page-wrapper {
    width: 100%;
    min-height: 100vh;
    background: url('../img/fondo2026.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 20px 40px;  /* 🔥 CAMBIADO: antes era 150px 20px 40px */
    position: relative;
}

/* ========================================
   LOGO Y TÍTULO INSTITUCIONAL
   ======================================== */
.header-form {
    text-align: center;
    padding: 10px 0 8px 0;
    width: 100%;
}

.header-form .logo-saren {
    max-width: 175px;
    height: auto;
    display: inline-block;
}

.header-form .titulo-form {
    font-size: 26px !important;
    font-weight: 700;
    color: #1a3a5c;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 3px 0 0 0;
    font-family: 'Arial', sans-serif;
}

.header-form .subtitulo-form {
    font-size: 13px;
    color: #4a5568;
    font-weight: 400;
    margin: 0;
}

/* ========================================
   CONTENEDOR DEL FORMULARIO
   ======================================== */
.register-container {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 1100px;
    padding: 0;
    margin: 0 auto;
}

.register-wrapper {
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(2px);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    padding: 0;
    margin-top: 120px;
}

/* ========================================
   CUERPO DEL FORMULARIO
   ======================================== */
.form-body {
    padding: 18px 30px 28px;
}

/* ========================================
   ALERTAS
   ======================================== */
.alert {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-danger {
    background: #fde8e8;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}

.alert i {
    font-size: 0.9rem;
}

/* ========================================
   BLOQUEO DE FORMULARIO
   ======================================== */
.form-disabled {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
    transition: all 0.3s ease;
}

.form-disabled .btn,
.form-disabled button,
.form-disabled input,
.form-disabled select,
.form-disabled .btn-documento {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed !important;
}

.form-enabled {
    opacity: 1;
    pointer-events: all;
    user-select: auto;
    transition: all 0.3s ease;
}

.form-enabled .btn,
.form-enabled button,
.form-enabled input,
.form-enabled select,
.form-enabled .btn-documento {
    opacity: 1;
    pointer-events: all;
    cursor: pointer !important;
}

/* ========================================
   MENSAJE DE OBLIGACIÓN
   ======================================== */
.obligacion-msg {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: #856404;
}

.obligacion-msg i {
    font-size: 1.1rem;
    color: #ffc107;
}

.obligacion-msg strong {
    color: #856404;
}

/* ========================================
   WIZARD STEPS
   ======================================== */
.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 18px;
    position: relative;
    counter-reset: step;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    cursor: default;
}

.step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 3px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 5px;
    font-weight: 700;
    font-size: 0.75rem;
    color: #a0aec0;
    transition: all 0.3s;
}

.step-item.active .step-circle {
    background: #2a5f7a;
    border-color: #2a5f7a;
    color: white;
}

.step-item.completed .step-circle {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.step-label {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #a0aec0;
    transition: all 0.3s;
    letter-spacing: 0.3px;
}

.step-item.active .step-label {
    color: #2a5f7a;
}

.step-item.completed .step-label {
    color: #28a745;
}

/* ========================================
   PANELES DE PASOS
   ======================================== */
.step-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   FORMULARIO
   ======================================== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 10px;
}

.form-row-full {
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #4a5568;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.form-group label .required {
    color: #dc3545;
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 9px 14px;
    font-size: 0.85rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
    background: #fafbfc;
    color: #1a202c;
    font-family: inherit;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: #2a5f7a;
    box-shadow: 0 0 0 3px rgba(42, 95, 122, 0.1);
    background: #ffffff;
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-control:disabled,
.form-control[readonly] {
    background: #f1f3f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-control::placeholder {
    color: #a0aec0;
    font-size: 0.78rem;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.6rem;
    margin-top: 3px;
}

.invalid-feedback.show {
    display: block;
}

.text-muted {
    font-size: 0.6rem;
    color: #6c757d;
    margin-top: 3px;
    display: block;
}

/* ========================================
   BOTONES DE DOCUMENTO
   ======================================== */
.btn-group-documento {
    display: flex;
    gap: 8px;
}

.btn-documento {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.78rem;
    text-align: center;
    color: #4a5568;
    font-family: inherit;
}

.btn-documento:hover {
    border-color: #2a5f7a;
    background: #f0f4f8;
}

.btn-documento.active {
    border-color: #2a5f7a;
    background: #e8f0fe;
    color: #1a3a5c;
}

.btn-documento i {
    margin-right: 5px;
}

/* ========================================
   BOTONES UNIFORMES - MISMO TAMAÑO
   ======================================== */
.btn {
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    font-family: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 44px !important;
    min-width: 140px !important;
    text-align: center !important;
    text-decoration: none !important;
}

/* Botón Primario (Siguiente) */
.btn-primary {
    background: #2a5f7a !important;
    color: white !important;
    border: none !important;
}

.btn-primary:hover:not(:disabled) {
    background: #1a3a5c !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(42, 95, 122, 0.3) !important;
}

/* Botón Secundario (Anterior) - Color Warning */
.btn-secondary {
    background: #f39c12 !important;
    color: white !important;
    border: none !important;
}

.btn-secondary:hover:not(:disabled) {
    background: #d68910 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4) !important;
}

/* Botón de Envío (Submit) */
.btn-submit {
    width: 100% !important;
    padding: 12px !important;
    border: none !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #1a3a5c 0%, #2a5f7a 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    font-family: inherit !important;
    min-height: 48px !important;
    min-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(42, 95, 122, 0.3) !important;
}

.btn-submit:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.btn-submit .spinner {
    display: none !important;
}

.btn-submit.loading .spinner {
    display: inline-block !important;
}

.btn-submit.loading .btn-text {
    opacity: 0.8 !important;
}

/* Botón de Búsqueda */
.btn-search {
    padding: 0 14px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-left: none !important;
    background: #2a5f7a !important;
    color: white !important;
    border-radius: 0 8px 8px 0 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-size: 0.85rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    min-height: 38px !important;
}

.btn-search:hover {
    background: #1a3a5c !important;
}

.btn-search:active {
    transform: scale(0.95) !important;
}

/* Contenedor de botones en fila */
.btn-group-row {
    display: flex !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: 15px !important;
}

.btn-group-row .btn {
    flex: 1 !important;
}

/* ========================================
   FILE INPUT
   ======================================== */
.custom-file-input {
    padding: 6px !important;
    cursor: pointer;
}

.custom-file-input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.file-name-display {
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
    word-break: break-all;
}

.file-name-display.success {
    color: #28a745;
}

.file-name-display.error {
    color: #dc3545;
}

/* ========================================
   EMAIL NOTICE
   ======================================== */
.email-notice {
    background: #f0f7ff;
    border-radius: 8px;
    padding: 8px 14px;
    margin-top: 6px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-left: 3px solid #2a5f7a;
}

.email-notice i {
    color: #2a5f7a;
    font-size: 0.85rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.email-notice span {
    font-size: 0.72rem;
    color: #2d3748;
    line-height: 1.3;
}

.email-notice strong {
    color: #1a3a5c;
}

/* ========================================
   CAPTCHA
   ======================================== */
.captcha-wrapper {
    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    margin-top: 8px;
}

.captcha-header {
    background: #f8fafc;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8edf2;
    flex-wrap: wrap;
    gap: 6px;
}

.captcha-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.75rem;
    color: #1a3a5c;
}

.captcha-header-left i {
    color: #2a5f7a;
    font-size: 0.9rem;
}

.captcha-header-right .captcha-hint {
    font-size: 0.6rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 10px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.captcha-body {
    padding: 14px 18px 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.captcha-code-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.captcha-code {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8edf2 100%);
    border-radius: 8px;
    padding: 6px 16px;
    min-width: 140px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dce3eb;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.captcha-code::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(42, 95, 122, 0.04) 3px, rgba(42, 95, 122, 0.04) 4px),
        repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(42, 95, 122, 0.04) 3px, rgba(42, 95, 122, 0.04) 4px);
    pointer-events: none;
}

.captcha-text {
    font-family: 'Courier New', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: #1a3a5c;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.captcha-text span {
    display: inline-block;
    transition: all 0.2s;
}

.captcha-refresh {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #dce3eb;
    background: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: #f0f4f8;
    border-color: #2a5f7a;
    color: #2a5f7a;
    transform: rotate(45deg);
}

.captcha-refresh:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.captcha-input-container {
    flex: 1;
    min-width: 180px;
}

.captcha-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #dce3eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: border-color 0.3s;
}

.captcha-input-wrapper:focus-within {
    border-color: #2a5f7a;
    box-shadow: 0 0 0 3px rgba(42, 95, 122, 0.1);
}

.captcha-input-wrapper .captcha-input-icon {
    padding: 0 10px;
    color: #a0aec0;
    font-size: 0.8rem;
}

.captcha-input-wrapper .captcha-input {
    border: none !important;
    border-radius: 0 !important;
    padding: 8px 10px;
    font-size: 0.85rem;
    letter-spacing: 3px;
    font-weight: 500;
    background: transparent;
    box-shadow: none !important;
    flex: 1;
}

.captcha-input-wrapper .captcha-input:focus {
    outline: none;
    box-shadow: none !important;
}

.captcha-input-wrapper .captcha-input.is-invalid {
    background: #fff5f5;
}

.captcha-input-wrapper .captcha-verify-btn {
    padding: 8px 16px;
    border: none;
    background: #2a5f7a;
    color: white;
    font-weight: 600;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    height: 100%;
}

.captcha-input-wrapper .captcha-verify-btn:hover {
    background: #1a3a5c;
}

.captcha-input-wrapper .captcha-verify-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.captcha-input-wrapper .captcha-verify-btn.verified {
    background: #28a745;
}

.captcha-status {
    font-size: 0.7rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 18px;
}

.captcha-status.success {
    color: #28a745;
}

.captcha-status.error {
    color: #dc3545;
}

.captcha-footer {
    padding: 8px 18px 12px;
    border-top: 1px solid #f0f4f8;
}

.captcha-email-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #f0f7ff;
    border-radius: 6px;
    padding: 8px 14px;
    border-left: 3px solid #2a5f7a;
}

.captcha-email-notice i {
    color: #2a5f7a;
    font-size: 0.85rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.captcha-email-notice span {
    font-size: 0.7rem;
    color: #2d3748;
    line-height: 1.3;
}

.captcha-email-notice strong {
    color: #1a3a5c;
}

/* ========================================
   RATE LIMIT OVERLAY - SIMPLE
   ======================================== */
.rate-limit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.rate-limit-overlay.active {
    display: flex;
}

.rate-limit-modal {
    background: white;
    border-radius: 14px;
    padding: 30px 35px 35px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.rate-limit-modal .icon {
    font-size: 2.8rem;
    color: #f39c12;
    margin-bottom: 10px;
}

.rate-limit-modal h3 {
    font-size: 1.1rem;
    color: #1a202c;
    margin-bottom: 6px;
    font-weight: 600;
}

.rate-limit-modal p {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 15px;
    line-height: 1.4;
}

.rate-limit-modal .timer-display {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2a5f7a;
    font-family: 'Courier New', monospace;
    background: #f0f4f8;
    padding: 8px 20px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 12px;
    min-width: 100px;
    letter-spacing: 2px;
}

.rate-limit-modal .progress-bar-container {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.rate-limit-modal .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e67e22);
    border-radius: 2px;
    transition: width 1s linear;
    width: 100%;
}

/* ========================================
   SWEETALERT
   ======================================== */
.swal-title-custom {
    font-size: 1.3rem !important;
    color: #1a3a5c !important;
    font-weight: 700 !important;
}

.swal-confirm-btn {
    background: linear-gradient(135deg, #1a3a5c 0%, #2a5f7a 100%) !important;
    padding: 10px 35px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 15px rgba(42, 95, 122, 0.3) !important;
    transition: all 0.3s !important;
}

.swal-confirm-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 25px rgba(42, 95, 122, 0.4) !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .page-wrapper {
        padding: 15px 15px 30px;
    }
    .form-body {
        padding: 18px 22px 22px;
    }
    .header-form .titulo-form {
        font-size: 22px !important;
    }
    .header-form .logo-saren {
        max-width: 60px;
    }
    .btn {
        min-width: 120px !important;
        min-height: 40px !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 10px 10px 20px;
        background-attachment: scroll !important;
    }
    
    .form-body {
        padding: 14px 14px 18px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 8px;
    }
    .form-row-full {
        grid-column: 1;
    }
    
    .register-wrapper {
        border-radius: 10px;
    }
    
    .header-form .titulo-form {
        font-size: 18px !important;
    }
    .header-form .logo-saren {
        max-width: 50px;
    }
    .header-form .subtitulo-form {
        font-size: 11px;
    }
    
    .btn {
        min-width: 100px !important;
        min-height: 36px !important;
        font-size: 0.75rem !important;
        padding: 8px 14px !important;
    }
    
    .btn-group-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .captcha-body {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px 10px;
    }
    .captcha-code-container {
        justify-content: center;
    }
    .captcha-code {
        min-width: 120px;
        min-height: 42px;
        padding: 4px 12px;
    }
    .captcha-text {
        font-size: 1.2rem;
        letter-spacing: 3px;
    }
    .captcha-refresh {
        width: 34px;
        height: 34px;
        font-size: 0.75rem;
    }
    .captcha-input-wrapper {
        flex-wrap: wrap;
    }
    .captcha-input-wrapper .captcha-input {
        flex: 1;
        min-width: 100px;
    }
    .captcha-input-wrapper .captcha-verify-btn {
        padding: 6px 14px;
        font-size: 0.65rem;
    }
    .captcha-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 14px;
    }
    .captcha-footer {
        padding: 8px 14px 10px;
    }
    .captcha-email-notice {
        padding: 6px 10px;
        font-size: 0.65rem;
    }
    .email-notice {
        padding: 6px 10px;
        font-size: 0.65rem;
    }
    .email-notice span {
        font-size: 0.65rem;
    }
    .obligacion-msg {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
}

@media (max-width: 400px) {
    .page-wrapper {
        padding: 8px 5px 15px;
    }
    
    .form-body {
        padding: 12px 10px 14px;
    }
    .form-control {
        padding: 6px 10px;
        font-size: 0.78rem;
    }
    .header-form .titulo-form {
        font-size: 15px !important;
    }
    .header-form .logo-saren {
        max-width: 40px;
    }
    .header-form .subtitulo-form {
        font-size: 10px;
    }
    .btn {
        min-width: 80px !important;
        min-height: 32px !important;
        font-size: 0.7rem !important;
        padding: 6px 10px !important;
    }
    .btn-submit {
        min-height: 40px !important;
        font-size: 0.82rem !important;
    }
    .captcha-code {
        min-width: 100px;
        min-height: 36px;
        padding: 3px 10px;
    }
    .captcha-text {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    .obligacion-msg {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}

/* ========================================
   UTILIDADES
   ======================================== */
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.text-center { text-align: center; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.w-100 { width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #2a5f7a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #1a3a5c; }

/* ========================================
   SELECT CHECK VERDE Y ERRORES
   ======================================== */
.select-check {
    display: none;
    color: #28a745;
    font-size: 0.7rem;
    margin-top: 4px;
    animation: fadeInCheck 0.3s ease;
}

.select-check i {
    margin-right: 4px;
}

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

/* Estilo para selects válidos */
.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* Mensajes de error */
.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.7rem;
    margin-top: 4px;
}

.invalid-feedback.show {
    display: block;
}

/* Textos de ayuda */
.text-muted {
    font-size: 0.65rem;
    color: #6c757d;
    margin-top: 4px;
    display: block;
}

/* ========================================
   BOTÓN LIMPIAR (✕)
   ======================================== */
.btn-clear {
    padding: 0 12px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-left: none !important;
    background: #dc3545 !important;
    color: white !important;
    border-radius: 0 8px 8px 0 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-size: 0.85rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    min-height: 38px !important;
}

.btn-clear:hover {
    background: #c82333 !important;
    transform: scale(1.05);
}

.btn-clear:active {
    transform: scale(0.95) !important;
}

.btn-clear:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Ajuste para que los botones estén juntos */
.input-group .btn-search {
    border-radius: 0 !important;
    border-right: none !important;
}

.input-group .btn-clear {
    border-radius: 0 8px 8px 0 !important;
}

/* Cuando solo hay un botón (sin limpiar) */
.input-group .btn-search:last-child {
    border-radius: 0 8px 8px 0 !important;
    border-right: 1.5px solid #e2e8f0 !important;
}