* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body,
html {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #ffffff;
}

.page-container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

.banner-side {
    flex: 1.2;
    background: linear-gradient(rgba(76, 37, 130, 0.35), rgba(76, 37, 130, 0.35)),
        url(../imgs/prodesp.webp) no-repeat center center;
    background-size: cover;
    border-right: 4px solid #4c2582;
    min-height: 100vh;
}

main {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 24px 32px;
    background-color: #ffffff;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-y: auto;
}

.card-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    margin: auto 0;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #777777;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    align-self: flex-start;
    padding: 4px 0;
    transition: color 0.2s, transform 0.2s;
}

.btn-back:hover {
    color: #4c2582;
    transform: translateX(-3px);
}

.btn-back svg {
    fill: currentColor;
    width: 16px;
    height: 16px;
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.prodesp-icon {
    width: 32px;
    height: 36px;
    fill: #4c2582;
}

.prodesp-text {
    font-size: 24px;
    font-weight: bold;
    font-style: italic;
    color: #4c2582;
    letter-spacing: -0.5px;
}

h1 {
    color: #555555;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    font-weight: 700;
    text-align: center;
}

/* ── BARRA DE ABAS / PASSOS ── */
.steps-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    position: relative;
    padding: 0 6px;
}

.step-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: all 0.2s;
}

.step-tab[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e6e6e6;
    color: #777777;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.25s;
    border: 2px solid transparent;
}

.step-tab.active .step-num {
    background-color: #4c2582;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(76, 37, 130, 0.2);
}

.step-tab.completed .step-num {
    background-color: #2e7d32;
    color: #ffffff;
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    color: #888888;
    white-space: nowrap;
    transition: color 0.2s;
}

.step-tab.active .step-label {
    color: #4c2582;
}

.step-tab.completed .step-label {
    color: #2e7d32;
}

.step-line {
    flex: 1;
    height: 2px;
    background-color: #e0e0e0;
    margin: 0 6px 16px 6px;
    position: relative;
    z-index: 1;
    transition: background-color 0.3s;
}

.step-line.active {
    background-color: #4c2582;
}

/* ── TEXTOS E SEÇÕES ── */
.step-instructions {
    font-size: 12.5px;
    color: #666666;
    line-height: 1.5;
    margin-bottom: 18px;
    text-align: center;
}

.step-section {
    display: flex;
    flex-direction: column;
}

/* ── FORMULÁRIOS E INPUTS ── */
form {
    display: flex;
    flex-direction: column;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

label {
    font-size: 11.5px;
    color: #666666;
    margin-bottom: 3px;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid #cccccc;
    padding: 8px 36px 8px 0;
    font-size: 14px;
    color: #333333;
    background-color: transparent;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    border-bottom-color: #4c2582;
}

#code-input {
    letter-spacing: 8px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    padding: 8px 0;
    color: #4c2582;
}

#code-input::placeholder {
    font-size: 12px !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
    color: #9ca3af !important;
    text-transform: none !important;
}

.field-feedback {
    font-size: 11px;
    margin-top: 4px;
    min-height: 16px;
}

.field-feedback.error {
    color: #d32f2f;
}

.field-feedback.success {
    color: #2e7d32;
}

/* ── BOTÃO MOSTRAR SENHA ── */
.btn-toggle-pass {
    position: absolute;
    right: 4px;
    bottom: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-pass img,
.btn-toggle-pass svg {
    width: 20px;
    height: 20px;
    object-fit: contain;
    stroke: #4c2582;
    transition: opacity 0.2s;
}

.btn-toggle-pass:hover svg {
    opacity: 0.7;
}

/* ── BADGES & BANNERS ── */
.email-badge {
    background-color: #f4f0fa;
    border: 1px solid #d9cbe8;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
    text-align: center;
    font-size: 12px;
    color: #4c2582;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dev-code-banner {
    background-color: #e8f5e9;
    border: 1px dashed #2e7d32;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 14px;
    font-size: 11.5px;
    color: #1b5e20;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dev-code-banner strong {
    font-size: 14px;
    letter-spacing: 2px;
}

/* ── PAINEL DE VERIFICAÇÃO DE SENHA ── */
.password-checklist {
    background-color: #faf9fc;
    border: 1px solid #e7e2ef;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.checklist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
    color: #4c2582;
    margin-bottom: 8px;
}

.strength-pill {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    background: #e0e0e0;
    color: #666;
    transition: all 0.25s;
}

.strength-pill.fraca {
    background-color: #ffebee;
    color: #c62828;
}

.strength-pill.media {
    background-color: #fff8e1;
    color: #f57f17;
}

.strength-pill.forte {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.strength-bar-container {
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background-color: #c62828;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.criteria-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.criterion {
    font-size: 11.5px;
    color: #777777;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.criterion.valid {
    color: #2e7d32;
    font-weight: 600;
}

.crit-icon {
    font-size: 10px;
}

.criterion.valid .crit-icon {
    color: #2e7d32;
}

/* ── BOTÕES ── */
.btn-primary {
    background-color: #4c2582;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s, opacity 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-decoration: none;
}

.btn-primary:hover:not([disabled]) {
    background-color: #3b1c66;
}

.btn-primary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-link {
    background: none;
    border: none;
    color: #4c2582;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
    transition: color 0.2s;
}

.btn-link:hover {
    color: #2e1650;
}

.step-secondary-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

/* ── ALERTA GLOBAL ── */
.alert-box {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.alert-box.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 3px solid #c62828;
}

.alert-box.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 3px solid #2e7d32;
}

/* ── TELA DE SUCESSO ── */
.success-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #e8f5e9;
    color: #2e7d32;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 14px;
}

.success-card h2 {
    color: #333333;
    font-size: 18px;
    margin-bottom: 8px;
}

.success-card p {
    font-size: 13px;
    color: #666666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.btn-success-action {
    display: inline-block;
    text-align: center;
}

/* ── RODAPÉ ── */
.form-footer-links {
    text-align: center;
    margin-top: 22px;
    font-size: 11.5px;
    line-height: 1.6;
}

.form-footer-links a {
    color: #4c2582;
    text-decoration: none;
    font-weight: 600;
}

.form-footer-links a:hover {
    text-decoration: underline;
}

/* ── SPINNER ── */
.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

[hidden] {
    display: none !important;
}

/* ── AVISO DE ISOLAMENTO GOOGLE ── */
.google-safety-notice {
    background-color: #f7f5fb;
    border: 1px solid #e2dbf0;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11px;
    color: #4c2582;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    line-height: 1.35;
}

.google-safety-notice strong {
    color: #311559;
}

.safety-subtext {
    font-size: 11px !important;
    color: #2e7d32 !important;
    margin-bottom: 16px !important;
}

@media (max-width: 900px) {
    .banner-side {
        display: none;
    }

    main {
        padding: 24px 16px;
    }

    .card-container {
        max-width: 380px;
    }
}

@media (max-width: 768px) {
    input[type="text"],
    input[type="password"],
    input[type="tel"] {
        font-size: 16px; /* Evita zoom automático no iOS Safari */
    }
}

@media (max-width: 420px) {
    main {
        padding: 16px 10px;
    }

    .card-container {
        max-width: 100%;
    }

    .step-label {
        font-size: 10px;
    }

    .step-num {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .step-line {
        margin: 0 4px 14px 4px;
    }

    .channel-notice {
        padding: 10px 12px;
    }
}
