/* Wizard de alta del sandbox (Portal Cliente). Sin estilos inline. */
.sandbox-body {
    min-height: 100vh;
}

.sandbox-wizard {
    width: 100%;
    max-width: 540px;
}

/* Stepper */
.stepper {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.stepper__item {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #3D5084;
}

.stepper__link,
.stepper__static {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

.stepper__dot {
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #3D5084;
    background: #FFFFFF;
    border: 2px solid #CBD5E1;
}

.stepper__item--done .stepper__dot {
    background: #5060D0;
    border-color: #5060D0;
    color: #FFFFFF;
}

.stepper__item--current .stepper__dot {
    border-color: #5060D0;
    color: #5060D0;
    box-shadow: 0 0 0 4px rgba(80, 96, 208, 0.15);
}

.stepper__item--done .stepper__label {
    color: #5060D0;
    font-weight: 700;
}

.stepper__item--current .stepper__label {
    color: #1F2A50;
    font-weight: 700;
}

.stepper__count {
    margin: 0 0 18px;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: #3D5084;
}

/* Resumen de errores (enfocable) */
.resumen-errores {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #F0C2C2;
    background: #FCEBEB;
    border-radius: 12px;
    color: #8A2B2B;
    font-size: 13px;
}

.resumen-errores:focus {
    outline: 2px solid #B42318;
    outline-offset: 2px;
}

.resumen-errores h2 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
}

.resumen-errores ul {
    margin: 0;
    padding-left: 18px;
}

.campo-error {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #B42318;
}

/* Aviso de exito */
.aviso-ok {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #C7E0C7;
    background: #EEF9EE;
    border-radius: 12px;
    color: #215B21;
    font-size: 13px;
}

.aviso-ok h2 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 800;
}

.aviso-ok p {
    margin: 0;
}

/* Acciones del paso */
.wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.wizard-actions .btn-primary,
.wizard-actions .btn-secundario {
    flex: 1;
}

.btn-secundario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    background: #FFFFFF;
    color: #1F2A50;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.btn-secundario:hover {
    background: #F4F6F9;
}

.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Resumen del emisor (contexto en pasos 2+) */
.emisor-resumen {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #E2E8F0;
    background: #EEF0FB;
    border-radius: 12px;
    font-size: 13px;
    color: #3D5084;
}

.emisor-resumen strong {
    color: #1F2A50;
}

/* Key mostrada una vez */
.api-key-caja {
    display: block;
    margin: 8px 0 14px;
    padding: 14px 16px;
    background: #0F172A;
    color: #6EE7E7;
    border-radius: 12px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
}

.foco-visible:focus-visible,
.stepper__link:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid #5060D0;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .stepper__label {
        font-size: 11px;
    }
    .wizard-actions {
        flex-direction: column-reverse;
    }
    .wizard-actions .btn-primary,
    .wizard-actions .btn-secundario {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade-up {
        animation: none !important;
        transition: none !important;
    }
}
