/* ---- Fundo desfocado ---- */
body.authentication-bg {
    background: #0f141e;
    min-height: 100vh;
}

.sa-bg {
    position: fixed;
    inset: -40px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(30px) brightness(.55);
    z-index: -3;
}

/* Mídia inteira, sem corte, na área à esquerda do formulário — mesmo enquadramento fixo do Login/EsqueciSenha, independente da largura do card */
.sa-media {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 520px;
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 85%, transparent 100%);
    z-index: -2;
}

.sa-bg-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(270deg, rgba(10, 14, 22, .7) 0%, rgba(10, 14, 22, .35) 25%, rgba(10, 14, 22, 0) 40%);
    z-index: -1;
}

/* ---- Container central ---- */
.sa-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem clamp(16px, 5vw, 64px);
}

@media (max-width: 991px) {
    .sa-media {
        right: 0;
    }

    .sa-bg-overlay {
        background: rgba(10, 14, 22, .6);
    }

    .sa-wrapper {
        justify-content: center;
    }
}

.sa-container {
    width: 100%;
    max-width: 820px;
    background: var(--ct-secondary-bg, #fff);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    padding: 2rem 2.25rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .25s ease, transform .25s ease;
}

.sa-container.xrm-entering {
    opacity: 1;
    transform: none;
}

.sa-container.xrm-leaving {
    opacity: 0;
    transform: translateY(16px);
}

@media (prefers-reduced-motion: reduce) {
    .sa-container {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.sa-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.sa-header h3 {
    font-weight: 700;
    color: var(--ct-emphasis-color, #1e293b);
    margin-bottom: 0.25rem;
}

.sa-header p {
    color: var(--ct-secondary-color, #6b7280);
    margin-bottom: 0;
}

/* ---- Indicador de etapas ---- */
.wizard-steps {
    display: flex;
    margin: 1.75rem 0 2rem;
}

.wizard-step {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: flex 0.3s;
}

.wizard-step.wizard-step-hidden {
    display: none;
}

.wizard-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--ct-border-color, #d7dce3);
    z-index: 0;
}

.wizard-step.line-active:not(:last-child)::after {
    background: #3b82f6;
}

.wizard-step-number {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    background: var(--ct-secondary-bg, #fff);
    border: 2px solid var(--ct-border-color, #d7dce3);
    color: var(--ct-secondary-color, #94a3b8);
    transition: all 0.2s;
}

.wizard-step.active .wizard-step-number {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.wizard-step.completed .wizard-step-number {
    background: var(--ct-secondary-bg, #fff);
    border-color: #3b82f6;
    color: #3b82f6;
}

.wizard-step-label {
    font-size: 12px;
    color: var(--ct-secondary-color, #94a3b8);
    margin-top: 8px;
    padding: 0 4px;
    max-width: 140px;
}

.wizard-step.active .wizard-step-label {
    color: #3b82f6;
    font-weight: 600;
}

/* ---- Card ---- */
.sa-card {
    padding-top: 0.25rem;
}

.sa-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.sa-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--ct-primary-bg-subtle, #eff6ff);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sa-section-title h5 {
    margin: 0;
    font-weight: 700;
    color: var(--ct-emphasis-color, #1e293b);
}

.sa-section-desc {
    color: var(--ct-secondary-color, #6b7280);
    font-size: 13.5px;
    margin: 0.25rem 0 1.25rem;
}

.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
}

/* ---- Cards de Ramo ---- */
.tipo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tipo-card {
    position: relative;
    flex: 1 1 110px;
    min-width: 100px;
    border: 1px solid var(--ct-border-color, #e2e8f0);
    border-radius: 10px;
    padding: 16px 8px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    background: var(--ct-secondary-bg, #fff);
}

.tipo-card:hover {
    border-color: #93c5fd;
}

.tipo-card.selected {
    border-color: #3b82f6;
    background: var(--ct-primary-bg-subtle, #eff6ff);
}

.tipo-radio {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 15px;
    height: 15px;
    border: 2px solid var(--ct-border-color, #cbd5e1);
    border-radius: 50%;
    background: var(--ct-secondary-bg, #fff);
}

.tipo-card.selected .tipo-radio {
    border-color: #3b82f6;
    background: #3b82f6;
    box-shadow: inset 0 0 0 3px var(--ct-secondary-bg, #fff);
}

.tipo-card i {
    display: block;
    font-size: 22px;
    color: var(--ct-secondary-color, #64748b);
    margin: 6px 0 8px;
}

.tipo-card.selected i {
    color: #3b82f6;
}

.tipo-card span.tipo-label {
    font-size: 12.5px;
    color: var(--ct-body-color, #374151);
    font-weight: 500;
}

.tipo-card.selected span.tipo-label {
    color: #3b82f6;
}

.sa-info-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ct-primary-bg-subtle, #eff6ff);
    border: 1px solid var(--ct-border-color, #dbeafe);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 13.5px;
    color: #3b82f6;
    margin-top: 1rem;
}

/* ---- Upload de documentos ---- */
.upload-dropzone {
    border: 2px dashed var(--ct-border-color, #cbd5e1);
    border-radius: 10px;
    padding: 1.75rem 1rem;
    text-align: center;
    background: var(--ct-tertiary-bg, #f8fafc);
    transition: all 0.15s;
}

.upload-dropzone.dragover {
    border-color: #3b82f6;
    background: var(--ct-primary-bg-subtle, #eff6ff);
}

.upload-dropzone i {
    font-size: 28px;
    color: var(--ct-secondary-color, #94a3b8);
}

.upload-file-list {
    margin-top: 0.75rem;
}

.upload-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ct-tertiary-bg, #f8fafc);
    border: 1px solid var(--ct-border-color, #e2e8f0);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    margin-bottom: 6px;
}

.field-status {
    font-size: 12px;
    margin-top: 4px;
}

.field-status.success {
    color: #16a34a;
}

.field-status.error {
    color: #ef4444;
}

/* ---- OTP ---- */
.otp-input-group {
    display: flex;
    gap: 8px;
}

.otp-input-group input {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    border: 2px solid var(--ct-border-color, #d1d5db);
    border-radius: 8px;
    transition: border-color 0.2s;
    background: var(--ct-secondary-bg, #fff);
    color: var(--ct-body-color, #333);
}

.otp-input-group input:focus {
    border-color: #3b82f6;
    outline: none;
}

#otp-section {
    display: none;
}

.otp-timer {
    font-size: 13px;
    color: var(--ct-secondary-color, #6b7280);
    margin-top: 0.5rem;
}

/* ---- Revisao ---- */
.review-card {
    background: var(--ct-tertiary-bg, #f8fafc);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.review-card h6 {
    color: #3b82f6;
    margin-bottom: 0.5rem;
    font-size: 14px;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

.review-item .label {
    color: var(--ct-secondary-color, #6b7280);
}

.review-item .value {
    font-weight: 500;
    text-align: right;
    color: var(--ct-body-color, #333);
}

/* ---- Sucesso ---- */
.success-container {
    text-align: center;
    padding: 2rem 1rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--ct-success-bg-subtle, #f0fdf4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon i {
    font-size: 40px;
    color: #22c55e;
}

.sa-footer-nav {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.75rem;
}

.sa-cep-input {
    min-width: 120px;
    flex: 1 1 auto;
}

/* ---- Modal E-mail existente ---- */
.sa-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ct-primary-bg-subtle, #eff6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.25rem auto 1.25rem;
}

.sa-modal-icon i {
    font-size: 32px;
    color: #3b82f6;
}

.sa-modal-body {
    text-align: center;
    padding: 1rem 1.75rem 1.5rem;
}

.sa-modal-body h5 {
    margin-bottom: 0.75rem;
}

.sa-modal-body p {
    color: var(--ct-body-color, #374151);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.sa-modal-body .sa-modal-email {
    font-weight: 600;
    color: var(--ct-emphasis-color, #1e293b);
    word-break: break-all;
}

.sa-modal-body .sa-modal-subtext {
    color: var(--ct-secondary-color, #6b7280);
    font-size: 13.5px;
    margin-bottom: 0;
}

/* ---- Dark mode (Hyper) ---- */
html[data-bs-theme=dark] .field-status.success {
    color: #6ce2c1;
}

html[data-bs-theme=dark] .field-status.error {
    color: #fc9db0;
}
