/* ===== ALIAS LOCALES A LOS TOKENS GLOBALES ===== */
.registro-page {
    --primary: var(--azul-marino-700, #1c2454);
    --primary-hover: var(--azul-marino-800, #151c41);
    --primary-soft: var(--azul-marino-50, #e9ebf1);
    --accent: var(--azul-electrico-500, #1c64f2);
    --accent-hover: var(--azul-electrico-700, #1447ac);
    --danger: var(--rojo-carmesi-500, #a70336);
    --text: var(--gris-800, #424242);
    --text-soft: var(--gris-600, #757575);
    --border-color: var(--gris-400, #bdbdbd);
    --bg-section: var(--gris-100, #f5f5f5);
    --radius: 20px;
    --radius-sm: 14px;
    --shadow: 0 20px 60px rgba(10, 26, 58, 0.25);
    --shadow-sm: 0 8px 20px -10px rgba(20, 36, 88, 0.15);
}

/* ===== RESET BÁSICO ===== */
* {
    box-sizing: border-box;
}

/* ── HEADER BANNER ── */
.header-banner {
    width: 100%;
    overflow: hidden;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-img {
    width: 100%;
    height: auto;
    max-width: 1500px;
    object-fit: contain;
    display: block;
}

/* ===== FONDO DE PÁGINA ===== */
.registro-page.page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-h, 0px));
    overflow-y: auto;
    padding: 30px 20px;
    position: relative;
    background: url('../assets/img/fondo_nuevo.jpg') center center / cover no-repeat;
}

/* ===== TARJETA PRINCIPAL ===== */
.registro-page .login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    max-height: 95vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(10, 26, 58, 0.25);
    padding: 40px 44px 32px;
    text-align: center;
}

.registro-page .login-card.login-card--paso2 {
    max-width: 980px;
}

@media (max-width: 992px) {
    .registro-page .login-card.login-card--paso2 {
        max-width: 850px;
    }
}

/* Scroll personalizado */
.registro-page .login-card::-webkit-scrollbar {
    width: 5px;
}

.registro-page .login-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.registro-page .login-card::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.registro-page .login-card::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* ===== ICONO ===== */
.registro-page .login-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 14px;
    background: #eef1fb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.registro-page .login-icon i {
    font-size: 26px;
    color: #1a1a2e;
}

/* ===== TÍTULOS ===== */
.registro-page h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.registro-page .subtitle {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
    margin-bottom: 22px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* ===== BADGE CIUDADANO / EMPRESA ===== */
.registro-page .user-info {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 999px;
    margin-bottom: 24px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.registro-page .user-info strong {
    font-weight: 700;
}

/* ===== TARJETAS DE SECCIÓN ===== */
.registro-page .form-card {
    padding: 18px 22px;
    margin-bottom: 16px;
    text-align: left;
}

.registro-page .form-card h6 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.registro-page .form-card h6 i {
    color: #1a56db;
    font-size: 14px;
}

/* ============================================================ */
/* ===== ROW - PARA DISTRIBUCIÓN EN DOS COLUMNAS ===== */
/* ============================================================ */

.registro-page .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    margin-bottom: 0;
}

.registro-page .row .form-card {
    margin-bottom: 0;
    height: 100%;
}

@media (max-width: 768px) {
    .registro-page .row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .registro-page .row .form-card {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .registro-page .row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ============================================================ */
/* ===== FILAS Y GRUPOS DE CAMPOS - DOS COLUMNAS ===== */
/* ============================================================ */

.registro-page .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

/* CORRECCIÓN: Forzar que el grupo ocupe todo el ancho disponible */
.registro-page .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    width: 100% !important;
    min-width: 0;
    /* Evita que el grid se desborde */
}

/* Ocupa toda la fila (2 columnas) */
.registro-page .form-row .form-group.full-width {
    grid-column: 1 / -1;
}

/* ===== DOCUMENTO + DÍGITO RIF ===== */
.registro-page .documento-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100% !important;
}

/* Cuando el Dígito RIF está visible, usar dos columnas */
.registro-page .documento-container:has(#dr[style*="display: block"]) {
    grid-template-columns: 1fr 120px;
}

/* Alternativa para navegadores que no soportan :has() */
.registro-page .documento-container.rif-visible {
    grid-template-columns: 1fr 120px;
}

.registro-page .documento-container .form-group {
    margin-bottom: 0;
    width: 100% !important;
}

/* ===== ETIQUETAS ===== */
.registro-page label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 7px;
    font-family: 'Segoe UI', Arial, sans-serif;
    display: block;
}

.registro-page .text-danger {
    color: #d32f2f;
}

.registro-page .small-text {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.registro-page .field-error {
    display: block;
    color: #d32f2f;
    font-size: 11px;
    margin-top: 5px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* ============================================================ */
/* ===== CAMPOS DE FORMULARIO - ESTILO LOGIN (CORREGIDO) ===== */
/* ============================================================ */

.registro-page .form-control,
.registro-page input.form-control,
.registro-page select.form-control,
.registro-page textarea.form-control {
    /* Forzar ancho completo y evitar desbordes */
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;

    /* Estilos visuales originales */
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 999px !important;
    height: 46px;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 400;
    color: #555;
    box-shadow: none !important;
    transition: border-color 0.2s ease;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.registro-page .form-control:focus {
    border-color: #2b50b6;
    outline: none;
}

/* Asegurar que el select no tenga un ancho extraño por el icono de flecha */
.registro-page select.form-control {
    cursor: pointer;
    background-color: #fff;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    padding-right: 30px !important;
}

.registro-page .form-control.error {
    border-color: #d32f2f;
    background-color: #ffebee;
}

.registro-page .form-control.error:focus {
    border-color: #d32f2f;
}

/* Fecha de nacimiento - forzar mismo estilo */
.registro-page input[type="text"].fecha_nacimiento,
.registro-page input[type="date"].fecha_nacimiento {
    font-family: 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
}

/* ===== CAPTCHA ===== */
.registro-page .captcha-image {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    max-width: 180px;
    height: auto;
}

/* ============================================================ */
/* ===== BOTONES - IDÉNTICOS A LOGIN.CSS ===== */
/* ============================================================ */

.registro-page .button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* === BOTÓN REGRESAR (igual al de login) === */
.registro-page .boton-regresar {
    background-color: #999;
    color: #fff;
    border: none;
    border-radius: 999px !important;
    height: 48px;
    padding: 0 30px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Segoe UI', Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.registro-page .boton-regresar:hover {
    background-color: #777;
}

/* === BOTÓN CONSULTAR / REGISTRAR (igual al botón Iniciar sesión) === */
.registro-page .boton-consultar,
.registro-page .btn-rose {
    background-color: #1a56db;
    color: #fff;
    border: none;
    border-radius: 999px !important;
    height: 48px;
    padding: 0 30px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-width: 140px;
}

.registro-page .boton-consultar:hover,
.registro-page .btn-rose:hover {
    background-color: #123fa8;
}

.registro-page .boton-consultar:disabled,
.registro-page .btn-rose:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* === BOTÓN REGISTRAR (versión ancha) === */
.registro-page .btn-rose {
    width: 100%;
    max-width: 260px;
    margin: 10px auto 0;
}

/* ===== ENLACES Y PIE ===== */
.registro-page .signup-text {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 18px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.registro-page .signup-text a {
    color: #2b50b6;
    font-weight: 600;
    text-decoration: none;
}

.registro-page .signup-text a:hover {
    text-decoration: underline;
    color: #123fa8;
}

.registro-page .footer-note {
    text-align: center;
    font-size: 10px;
    color: #ccc;
    margin-top: 26px;
    letter-spacing: 0.6px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* ============================================================ */
/* ===== WIZARD STYLES (CORREGIDO) ===== */
/* ============================================================ */

/* Forzar tipografía correcta en todo el wizard */
.registro-page .wizard-steps,
.registro-page .wizard-panel,
.registro-page .wizard-panel label,
.registro-page .wizard-panel input,
.registro-page .wizard-panel select,
.registro-page .wizard-panel h6,
.registro-page .wizard-buttons button {
    font-family: 'Segoe UI', Arial, sans-serif !important;
}

/* Barra de pasos */
.registro-page .wizard-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f2f5;
    border-radius: 999px;
    padding: 6px;
    margin-bottom: 24px;
    position: relative;
}

.registro-page .wizard-steps .step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    padding: 8px 16px;
    border-radius: 999px;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    cursor: default;
}

.registro-page .wizard-steps .step .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
}

/* Paso Activo (Azul) */
.registro-page .wizard-steps .step.active {
    background: #1a56db;
    color: #fff;
    box-shadow: 0 4px 10px rgba(26, 86, 219, 0.3);
}

.registro-page .wizard-steps .step.active .step-number {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Paso Completado */
.registro-page .wizard-steps .step.completed {
    color: #1a56db;
    background: #eef1fb;
}

.registro-page .wizard-steps .step.completed .step-number {
    background: #1a56db;
    color: #fff;
}

/* ===== CONTENEDOR DE PANELES (Evita el salto brusco) ===== */
.registro-page .wizard-panels-container {
    min-height: 280px;
    /* Altura mínima para que no colapse al cambiar de paso */
    position: relative;
    transition: height 0.3s ease;
}

/* Ocultar/Mostrar Paneles */
.registro-page .wizard-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.registro-page .wizard-panel.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BOTONES DEL WIZARD ===== */
.registro-page .wizard-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 0 5px;
}

/* Forzar que ambos botones tengan el mismo ancho y alto */
.registro-page .wizard-buttons .boton-regresar,
.registro-page .wizard-buttons .btn-rose {
    width: 200px !important;
    max-width: 200px !important;
    min-width: 200px !important;
    height: 48px !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}

/* Asegurar que el botón de enviar no herede el ancho completo */
.registro-page .wizard-buttons #btn-submit {
    width: 200px !important;
    max-width: 200px !important;
}

/* Eliminar la regla single-button ya que ahora todo se centra por defecto */
.registro-page .wizard-buttons.single-button {
    justify-content: center;
}

/* Si solo hay un botón (paso 1 o paso 4), se centra */
.registro-page .wizard-buttons.single-button {
    justify-content: center;
}

/* Ajuste para el botón Siguiente cuando está solo */
.registro-page .wizard-buttons .btn-rose {
    margin: 0;
    /* Quitar margen automático para que respete el flex */
}

/* ======================================== */
/* ===== RESPONSIVE ===== */
/* ======================================== */

@media (max-width: 992px) {
    .registro-page .login-card {
        max-width: 750px;
        padding: 35px 30px 28px;
    }

    .registro-page .form-row {
        gap: 10px 15px;
    }
}

@media (max-width: 768px) {
    .registro-page.page {
        padding: 20px 15px;
    }

    .registro-page .login-card {
        padding: 28px 22px 24px;
        max-width: 100%;
        max-height: 98vh;
        border-radius: 16px;
    }

    .registro-page h2 {
        font-size: 22px;
    }

    .registro-page .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .registro-page .documento-container {
        grid-template-columns: 1fr;
    }

    .registro-page .form-card {
        padding: 14px 14px;
    }

    .registro-page .form-card h6 {
        font-size: 12px;
    }

    .registro-page .button-group {
        flex-direction: column;
        align-items: center;
    }

    .registro-page .boton-regresar,
    .registro-page .boton-consultar {
        width: 100%;
        min-width: unset;
        justify-content: center;
    }

    .registro-page .btn-rose {
        max-width: 100%;
    }

    .registro-page .form-control {
        height: 42px;
        font-size: 13px;
        padding: 0 16px;
    }

    /* Ajustes Wizard Responsive */
    .registro-page .wizard-steps .step {
        font-size: 11px;
        padding: 6px 10px;
    }

    .registro-page .wizard-steps .step .step-number {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    .registro-page.page {
        padding: 15px 10px;
    }

    .registro-page .login-card {
        padding: 22px 16px 20px;
        border-radius: 14px;
    }

    .registro-page h2 {
        font-size: 20px;
    }

    .registro-page .subtitle {
        font-size: 13px;
    }

    .registro-page .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .registro-page .form-card {
        padding: 12px 12px;
    }

    .registro-page .form-card h6 {
        font-size: 11px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .registro-page .form-control {
        height: 38px;
        font-size: 12px;
        padding: 0 14px;
        border-radius: 999px !important;
    }

    .registro-page label {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .registro-page .button-group {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .registro-page .boton-regresar,
    .registro-page .boton-consultar {
        width: 100%;
        height: 44px;
        font-size: 13px;
        min-width: unset;
        padding: 0 20px;
        justify-content: center;
    }

    .registro-page .btn-rose {
        max-width: 100%;
        height: 44px;
        font-size: 13px;
        padding: 0 20px;
    }

    .registro-page .user-info {
        font-size: 12px;
        padding: 6px 16px;
    }

    .registro-page .signup-text {
        font-size: 11px;
    }

    .registro-page .footer-note {
        font-size: 9px;
        margin-top: 18px;
    }

    .registro-page .login-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 14px;
    }

    .registro-page .login-icon i {
        font-size: 22px;
    }

    .registro-page .captcha-image {
        max-width: 150px;
    }

    /* Ajustes Wizard Mobile */
    .registro-page .wizard-steps {
        flex-wrap: wrap;
        border-radius: 12px;
        gap: 4px;
    }

    .registro-page .wizard-steps .step {
        flex: 1 1 40%;
        font-size: 10px;
    }
}