.register-steps-bar {
    margin: 0 auto 30px auto;
    max-width: 700px;
    margin-top: 20px;
}

.steps-bar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 8px;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #bfcbe6;
    /* azul claro */
    color: #fff;
    /* número blanco */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.8em;
    border: 3px solid #bfcbe6;
    transition: background 0.2s, color 0.2s, border 0.2s, opacity 0.2s;
}

.custom-control-input:checked,
.form-check-input:checked {
    background-color: #4e70a4;
    border-color: #4e70a4;
}

.step-circle.active {

    border: 3px solid #5a6cae;
    opacity: 1;
    background: #5a6cae;
    color: #fff;
    border: 3px solid #5a6cae;
    opacity: 1;
}

/* Mantener pasos realizados sin opacidad (mismo estilo que activo) */
.step-circle.completed {
    background: #5a6cae;
    color: #fff;
    border: 3px solid #5a6cae;
    opacity: 1;
}

.step-line {
    width: 150px;
    height: 4px;
    background: #bfcbe6;
    /* base azul claro */
}

.steps-bar-container .step-circle {
    flex: 0 0 auto;
}

.steps-bar-container .step-line {
    flex: 1 1 auto;
    width: auto;
    min-width: 12px;
}

.step-line.completed {
    background: #5a6cae;
}

.steps-labels-container {
    position: relative;
    height: 34px;
    /* espacio para las etiquetas */
    font-size: 1.1em;
    color: #5a6cae;
    max-width: 700px;
    margin: 0 auto;
}

.step-label {
    position: absolute;
    left: 0;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
    text-align: center;
    font-weight: bold;
    opacity: 0.45;
    /* difuso por defecto */
    transition: opacity 0.2s, text-decoration 0.2s;
}

.step-label.active {
    opacity: 1;
}

.step-label.completed {
    opacity: 1;
    text-decoration: none;
}

/* Título de la página en este template */
.erk-page-title {
    color: #5a6cae;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

.register-section {
    margin-bottom: 28px;
}

.register-section-title {
    font-size: 1.15em;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
    border-bottom: 2px solid #222;
    padding-bottom: 2px;
    letter-spacing: 0.5px;
}

.register-fields-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 10px;
}

.register-field {
    flex: 1 1 1px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.register-field label {
    font-weight: 500;
    color: #222;
    margin-bottom: 2px;
}

.register-field input,
.register-field select {
    border: 1.5px solid #cfd6e6;
    border-radius: 6px;
    font-size: 0.8em;
    background: #f8faff;
    transition: border 0.2s;
}

.register-field textarea {
    border: 1.5px solid #cfd6e6;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.9em;
    background: #f8faff;
    transition: border 0.2s;
    resize: vertical;
    max-width: 100% !important;
    min-width: 100% !important;
}

.register-field textarea:focus {
    border-color: #5a6cae;
    outline: none;
}

.char-counter {
    margin-top: 4px;
    font-size: 0.85em;
    color: #8aa0c9;
}

.register-field input:focus,
.register-field select:focus {
    border-color: #5a6cae;
    outline: none;
}

.register-field.file-field input[type="file"] {
    display: none;
    /* ocultamos el input nativo */
}

/* Custom select (estilo como el de archivo) */
.custom-select {
    position: relative;
    display: flex;
    width: 100%;
    align-items: stretch;
    background: #e6eaf7;
    border: 1.5px solid #cfd6e6;
    border-radius: 6px;
    /* alinear con inputs y file */
    /* el select cubrirá todo y reservará espacio interno para el botón */
}

.custom-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    padding: 5px 10px;
    /* misma sangría que file */
    width: 100%;

    color: #5a6cae;
    cursor: pointer;
}

.custom-select select:disabled {
    color: #8aa0c9;
}

.custom-select:focus-within {
    outline: 0px solid #5a6cae55;
}

.custom-select-caret {
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    background: #4e70a4;
    color: #fff;
    border-radius: 6px;
    border-top-left-radius: 0px !important;
    border-bottom-left-radius: 0px !important;
    padding: 10px 11px;
    /* alinear con botón de file */
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    /* el click pasa al select */
}

/* Componente de archivo personalizado */
.custom-file {
    width: 100%;
}

.custom-file-ui {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #e6eaf7;
    /* banda gris-azulada */
    border: 1.5px solid #cfd6e6;
    color: #5a6cae;
    border-radius: 6px;
    /* alinear con select */
    padding: 0px 0px 0px 10px;
    /* misma sangría que select */
    cursor: pointer;
}

.custom-file-name {
    flex: 1;
    color: #8aa0c9;
    /* texto placeholder suave */
    font-weight: 700;
    letter-spacing: 0.5px;
}

.custom-file-button {
    background: #4e70a4;
    color: #fff;
    padding: 7px 11px;
    /* igual que caret del select */
    border-radius: 6px;
    border-top-left-radius: 0px !important;
    border-bottom-left-radius: 0px !important;
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.custom-file-ui:focus {
    outline: 2px solid #5a6cae55;
}

.custom-file-ui:hover .custom-file-button {
    background: #3d4e8c;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.input-group-text {
    background: #e6eaf7;
    border: 1.5px solid #cfd6e6;
    border-radius: 10px;
    /* 4 bordes redondeados */
    padding: 7px 10px;
    font-size: 1em;
    color: #5a6cae;
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-group {
    position: relative;
}

.password-group input {
    width: 100%;
    background: #e6eaf7;
    border: 1.5px solid #cfd6e6;
    border-radius: 6px !important;
    padding-right: 54px;
    /* espacio para el botón */
}

.password-toggle {
    position: absolute;
    right: 0px;
    top: 13px;
    transform: translateY(-50%);
    background: #4e70a4;
    color: #fff;
    border: none;
    border-radius: 6px;
    border-top-left-radius: 0px !important;
    border-bottom-left-radius: 0px !important;
    width: 38px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.password-toggle:hover {
    background: #3d4e8c;
}

.phone-group {
    gap: 14px;
}

.phone-group .input-group-text {
    box-shadow: 0 2px 6px rgba(90, 108, 174, 0.15);
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    position: relative;
    padding-right: 34px;
    min-width: 94px;
}

.phone-group .custom-select-caret.reg-tel-prefix-caret {
    right: 0;
    padding: 8px 9px;
    font-size: 12px;
}

#reg_tel_prefix {
    border: 0 !important;
    background: transparent !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0 !important;
    line-height: 1;
    min-width: 0;
    box-shadow: none;
    cursor: pointer;
    color: transparent !important;
    text-shadow: none;
    opacity: 0;
    z-index: 2;
}

#reg_tel_prefix:focus {
    outline: none;
    box-shadow: none;
}

#reg_tel_prefix_value {
    font-size: 15px;
    color: #4e70a4;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.password-strength {
    margin-top: 6px;
}

.password-strength .strength-bar {
    width: 100%;
    height: 6px;
    background: #e6eaf7;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.password-strength .strength-bar .bar-fill {
    display: block;
    height: 100%;
    width: 10%;
    background: #e53935;
    /* weak por defecto */
    transition: width 0.25s ease, background 0.25s ease;
}

.password-strength .strength-text {
    margin-top: 4px;
    font-size: 0.9em;
    color: #5a6cae;
}

.password-strength .password-hint {
    margin-top: 4px;
    font-size: 0.85em;
    color: #c43c3c;
}

.password-strength.weak .bar-fill {
    background: #e53935;
}

.password-strength.fair .bar-fill {
    background: #fb8c00;
}

.password-strength.good .bar-fill {
    background: #fbc02d;
}

.password-strength.strong .bar-fill {
    background: #2e7d32;
}

.phone-group input {
    border-radius: 6px !important;
    /* independiente del prefijo */
}

.form-check-input {
    margin-right: 8px;
}

/* Estilo de checkboxes para paso 3 similar a términos/newsletter */
.option-check {
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.option-check .form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #cfd6e6;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    position: relative;
}

.option-check .form-check-input:checked {
    background-color: #5a6cae;
    border-color: #5a6cae;
}

.option-check .form-check-input:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 0px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.option-check .form-check-label {
    color: #5a6cae;
    letter-spacing: 0.2px;
}

.privacy-details {
    background: #f5f7fc;
    border: 1px solid #e1e6f3;
    border-radius: 8px;
    padding: 8px 12px;
}

.privacy-details summary {
    cursor: pointer;
    color: #5a6cae;
    font-weight: 700;
}

.privacy-text {
    color: #222;
    font-weight: 400;
    text-transform: none;
}

.optin-benefits {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 6px;
    color: #5a6cae;
    font-size: 0.95em;
}

.optin-benefits .icon-info-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #5a6cae;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    font-style: normal;
    padding: 4px 11px 4px 11px;
}

.optin-benefits .benefits-text {
    line-height: 1.35;
}

.btn-primary {
    background: #5a6cae;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.1em;
    padding: 8px 32px;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #3d4e8c;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(15%);
}

.register-step {
    display: none;
}

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

.payment-method-box {
    border: 2px solid #e6eaf7;
    border-radius: 8px;
    padding: 18px 8px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8faff;
}

.payment-method-box.selected {
    border-color: #5a6cae;
    box-shadow: 0 0 8px #5a6cae33;
}

@media (max-width: 900px) {
    .register-fields-row {
        flex-direction: column;
        gap: 10px;
    }

    .steps-bar-container,
    .steps-labels-container {
        max-width: 100%;
    }
}

/* Paso: ajustes móviles para mantener círculos proporcionales y texto legible */
@media (max-width: 600px) {
    .steps-bar-container {
        gap: 0;
    }

    .step-circle {
        width: 34px;
        height: 34px;
        border-width: 2px;
        font-size: 1.5em;
    }

    .step-line {
        height: 3px;
    }

    .steps-labels-container {
        height: auto;
        font-size: 0.9em;
        text-align: center;
    }

    /* Mostrar solo la etiqueta activa, centrada y sin posicionamiento absoluto */
    .step-label {
        position: static;
        transform: none;
        display: none;
        white-space: normal;
    }

    .step-label.active {
        display: inline-block;
        opacity: 1;
        font-size: 1.8em;
    }
}

/* Ajustes de espaciado en móviles pequeños */
@media (max-width: 600px) {
    .register-section {
        margin-bottom: 18px;
    }

    .register-section-title {
        margin-bottom: 6px;
    }

    .register-fields-row {
        gap: 8px;
        margin-bottom: 6px;
    }

    /* Cada campo a ancho completo en móvil */
    .register-field {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* Sobrescribe gap inline en el bloque de step3 */
    #step3 .register-fields-row {
        gap: 8px !important;
    }

    .register-field {
        gap: 2px;
    }

    .register-field input,

    .phone-group {
        gap: 8px;
    }

    .input-group-text {
        padding: 6px 8px;
    }

    .password-toggle {
        height: 36px;
        width: 40px;
    }

    /* Reducir separación en filas de navegación con inline margin-top */
    #step2 .register-fields-row,
    #step3 .register-fields-row {
        margin-top: 16px !important;
    }

    .payment-methods-row {
        gap: 12px;
    }

    .payment-info-alert {
        padding: 8px 12px;
        margin-top: 6px;
        margin-bottom: 8px;
    }
}

/* Paso 2 estilos */
.payment-methods-row {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 18px;
}

/* Contenedor que limita el ancho de métodos y aviso al mismo tamaño */
.payment-methods-wrap {
    display: block;
    margin: 0 auto 12px auto;
    max-width: 720px;
    /* ancho cercano a 3 tarjetas */
}

.payment-method-box {
    border: 2px solid #bfcbe6;
    border-radius: 8px;
    background: #f8faff;
    padding: 24px 18px 18px 18px;
    min-width: 180px;
    max-width: 220px;
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* centrar verticalmente el contenido */
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px #e6eaf7;
}

.payment-method-box.selected {
    border-color: #5a6cae;
    box-shadow: 0 0 8px #5a6cae33;
    background: #e6eaf7;
}

.payment-method-icon img {
    height: 60px;
    margin-bottom: 10px;
}

.payment-method-label {
    text-align: center;
    font-weight: bold;
    color: #222;
    font-size: 0.8em;
    margin-top: 2px;
}

.payment-method-label-sub {
    font-weight: normal;
    font-size: 0.95em;
    color: #222;
}

.payment-info-alert {
    background: #4e70a4;
    color: #fff;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.98em;
    margin-bottom: 10px;
    margin-top: 8px;
    display: block;
    /* texto fluido, el icono se posiciona absoluto */
    position: relative;
    overflow: visible;
    font-style: italic;
    /* texto en cursiva */
    text-transform: none;
    /* sin mayúsculas forzadas */
    width: 100%;
}

.payment-info-alert .alert-text {
    display: block;
    color: #fff;
    font-weight: 500;
}

.payment-info-alert .alert-text .download-inline {
    white-space: nowrap;
    color: #fff !important;
    text-decoration: underline;
    font-weight: 800;
}

.payment-info-alert .alert-text .download-inline:hover {
    color: #e6eaf7;
}

.payment-info-alert .download-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-weight: 800;
    text-decoration: underline;
}

.payment-info-alert .download-inline:hover {
    color: #e6eaf7;
}

.payment-info-alert .fa-download {
    font-size: 1.05em;
}

.icon-info {
    position: absolute;
    left: -11px;
    top: -7px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #4e70a4;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2em;
    line-height: 1;
    font-style: normal;
}

.payment-section-divider {
    border: none;
    border-top: 2px dashed #bfcbe6;
    margin: 18px 0 18px 0;
}

.back-link {
    color: #5a6cae;
    font-weight: bold;
    text-decoration: underline;
    background: none;
    border: none;
    font-size: 1em;
    cursor: pointer;
    padding: 0;
}

/* Utilidades y modificadores para limpiar estilos inline del template */
.stacked {
    flex-direction: column;
    gap: 18px;
}

.stacked-10 {
    flex-direction: column;
    gap: 10px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.label-strong {
    font-weight: bold;
}

.label-subnote {
    font-weight: normal;
    font-size: 0.95em;
    font-style: italic;
    text-transform: none;
}

.row-cta {
    margin-top: 30px;
    align-items: center;
}

.flex-1 {
    flex: 1;
}

.text-right {
    text-align: right;
}

.no-margin {
    margin-left: 0;
}

.thin {
    font-size: 1em;
    font-weight: normal;
    margin-bottom: 0;
}

.text-center {
    text-align: center;
}

.mt-40 {
    margin-top: 40px;
}

.final-title {
    color: #5a6cae;
    font-weight: 800;
}

.final-subtext {
    color: #5a6cae;
    max-width: 640px;
    margin: 14px auto 24px;
}

@media (max-width: 900px) {
    .payment-methods-row {
        flex-direction: column;
        gap: 12px;
    }

    .payment-methods-wrap {
        max-width: 100%;
    }

    .payment-method-box {
        min-width: 140px;
        max-width: 100%;
    }
}

/* Mayúsculas en toda la UI del formulario (no en los valores escritos por el usuario) */
.register-steps-bar .step-label,
.register-section-title,
.register-field label,
.payment-method-label,
.payment-method-label-sub,
.btn-primary,
.back-link,
.form-check-label {
    text-transform: uppercase;
}

/* Select muestra el texto elegido en mayúsculas (valor subyacente no cambia) */
.register-field select {
    text-transform: uppercase;
}

/* Placeholders en mayúsculas, sin afectar el texto que escribe el usuario */
.register-field input::placeholder {
    text-transform: uppercase;
}

/* Compatibilidad amplia (opcional) */
.register-field input::-webkit-input-placeholder {
    text-transform: uppercase;
}

.register-field input:-ms-input-placeholder {
    text-transform: uppercase;
}

/* Validación visual (movido desde el template) */
.is-invalid {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 0.1rem rgba(229, 57, 53, .15);
}

.is-valid {
    border-color: #2e7d32 !important;
    box-shadow: 0 0 0 0.1rem rgba(46, 125, 50, .15);
}

.field-error {
    margin-top: 6px;
    color: #e53935;
    font-size: 0.85em;
}

.register-field.invalid .custom-file-ui,
.register-field.invalid .custom-select {
    border-color: #e53935;
    box-shadow: 0 0 0 0.1rem rgba(229, 57, 53, .15);
}

.group-error {
    margin-top: 8px;
    color: #e53935;
    font-size: 0.9em;
}

/* Aviso cuenta existente en paso 1 */
.existing-account-hint {
    text-align: center;
    margin-top: 16px;
    color: #444;
}

/* Utilidad de ocultación */
.hidden {
    display: none !important;
}

/* Estilos enlace descarga SEPA */
.sepa-download {
    margin: 6px 0 8px 0;
}

.sepa-download a {
    color: #5a6cae;
    font-weight: 700;
    text-decoration: underline;
}

.sepa-download a:hover {
    color: #3d4e8c;
}

/* Ajustes responsivos del badge en móviles */
@media (max-width: 600px) {

    .icon-info {
        left: -4px;
        top: -8px;
        width: 21px;
        height: 20px;
        font-size: 1.5em;
        box-shadow: 0 0 0 3px #4e70a4;
    }
}