/* css/cadastro.css — Split-screen Desktop | Card Mobile — MakeSolutions */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ======================================================
   KEYFRAMES
====================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(224,123,0,0.55); }
    50%       { box-shadow: 0 0 0 6px rgba(224,123,0,0); }
}
@keyframes checkBounce {
    0%   { transform: scale(0) rotate(-12deg); opacity: 0; }
    60%  { transform: scale(1.2) rotate(4deg);  opacity: 1; }
    100% { transform: scale(1) rotate(0); }
}
@keyframes leftFadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ======================================================
   BODY (reset para o layout de tela cheia no desktop)
====================================================== */
html, body { height: 100%; }

body.cadastro-page {
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    color: #4a5568;
    -webkit-font-smoothing: antialiased;
    background: #1a2a3a;
    min-height: 100vh;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Oswald', sans-serif; }

/* ======================================================
   LAYOUT PRINCIPAL — DESKTOP SPLIT
   [LEFT 420px fixed] [RIGHT flex-1 scroll]
====================================================== */
.cad-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: 100vh;
}

/* ======================================================
   PAINEL ESQUERDO — só desktop
====================================================== */
.cad-left {
    background: linear-gradient(160deg, #131f2b 0%, #1e3040 45%, #152b1f 100%);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 64px 52px 44px;
    overflow: hidden;
    animation: leftFadeIn 0.6s ease both;
}

/* Detalhe decorativo no canto */
.cad-left::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(224,123,0,0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.cad-left::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(24,138,69,0.14) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cad-left-content { position: relative; z-index: 1; }

.cad-brand-logo {
    font-family: 'Oswald', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 18px;
}
.cad-brand-logo span { color: #E07B00; }
.cad-brand-logo:hover { text-decoration: none; color: #fff; }

.cad-brand-tagline {
    font-size: 17px;
    color: rgba(255,255,255,0.70);
    line-height: 1.65;
    margin-bottom: 40px;
    font-weight: 300;
}

.cad-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 44px;
}

.cad-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255,255,255,0.80);
    font-size: 14px;
}

.cad-features li i {
    font-size: 16px;
    color: #E07B00;
    width: 18px;
    flex-shrink: 0;
}

.cad-divider {
    height: 1px;
    background: rgba(255,255,255,0.10);
    margin-bottom: 32px;
}

.cad-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cad-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 16px 10px;
    text-align: center;
}

.cad-stat-item strong {
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #E07B00;
    line-height: 1;
    margin-bottom: 4px;
}

.cad-stat-item span {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cad-left-foot {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}

.cad-left-foot a {
    color: #E07B00;
    font-weight: 700;
    text-decoration: none;
    margin-left: 5px;
}
.cad-left-foot a:hover { text-decoration: underline; }

/* ======================================================
   PAINEL DIREITO — formulário
====================================================== */
.cad-right {
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px 60px 72px;
    overflow-y: auto;
    animation: fadeIn 0.5s ease both 0.1s;
}

/* Cabeçalho do formulário (desktop) */
.cad-form-head {
    margin-bottom: 28px;
}
.cad-form-head h2 {
    font-size: 26px;
    font-weight: 800;
    color: #1a2530;
    margin-bottom: 6px;
}
.cad-form-head p {
    font-size: 14px;
    color: #a0aec0;
}

/* Cabeçalho mobile — oculto no desktop */
.cad-mbl-top { display: none; }

/* Footer mobile — oculto no desktop */
.cad-mbl-foot { display: none; }

/* ======================================================
   PROGRESS STEPS
====================================================== */
.cad-progress {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.cad-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.cad-step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #edf2f7;
    color: #a0aec0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 13px;
    transition: background 0.35s, color 0.35s, box-shadow 0.35s;
}

.cad-step-label {
    font-size: 11px;
    color: #a0aec0;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.35s;
    white-space: nowrap;
}

.cad-step.active .cad-step-num {
    background: #E07B00;
    color: #fff;
    animation: pulse 1.6s ease infinite;
}
.cad-step.active .cad-step-label { color: #E07B00; font-weight: 700; }

.cad-step.done .cad-step-num {
    background: #188A45;
    color: #fff;
    animation: none;
}
.cad-step.done .cad-step-label { color: #188A45; }

.cad-step-line {
    flex: 1;
    height: 2px;
    background: #edf2f7;
    margin: 0 10px 18px;
    transition: background 0.4s;
}
.cad-step-line.done { background: #188A45; }

/* ======================================================
   MENSAGEM SERVIDOR
====================================================== */
.cad-alerta-erro {
    background: rgba(231,76,60,0.07);
    border-left: 3px solid #e74c3c;
    color: #c0392b;
    border-radius: 7px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.55;
    animation: fadeInUp 0.3s ease both;
}
.cad-alerta-ok {
    background: rgba(24,138,69,0.07);
    border-left: 3px solid #188A45;
    color: #155d2e;
    border-radius: 7px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.55;
    animation: fadeInUp 0.3s ease both;
}

/* ======================================================
   STEP CONTENT — ANIMAÇÕES
====================================================== */
.cad-step-content { display: none; }

.cad-step-content.active {
    display: block;
    animation: slideInRight 0.36s cubic-bezier(.22,.68,0,1.1) both;
}

.cad-step-content.active.slide-back {
    animation: slideInLeft 0.36s cubic-bezier(.22,.68,0,1.1) both;
}

/* ======================================================
   STEP TITLES
====================================================== */
.step-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}
.step-desc {
    font-size: 13px;
    color: #a0aec0;
    margin-bottom: 22px;
}

/* ======================================================
   STEP 1 — TIPO CARDS
====================================================== */
.tipo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.tipo-card {
    position: relative;
    border: 2px solid #edf2f7;
    border-radius: 12px;
    padding: 28px 18px 22px;
    cursor: pointer;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s, background 0.25s;
    text-align: center;
    user-select: none;
    background: #fafbfc;
}
.tipo-card:hover {
    border-color: #E07B00;
    background: rgba(224,123,0,0.03);
    transform: translateY(-3px);
    box-shadow: 0 8px 26px rgba(224,123,0,0.18);
}
.tipo-card.selected {
    border-color: #E07B00;
    background: rgba(224,123,0,0.06);
    box-shadow: 0 8px 26px rgba(224,123,0,0.22);
    transform: translateY(-2px);
}
.tipo-check {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 17px;
    color: #E07B00;
    display: none;
    animation: checkBounce 0.4s ease both;
}
.tipo-card.selected .tipo-check { display: block; }

.tipo-icon {
    font-size: 36px;
    color: #cbd5e0;
    margin-bottom: 12px;
    transition: color 0.25s, transform 0.3s;
}
.tipo-card:hover .tipo-icon,
.tipo-card.selected .tipo-icon {
    color: #E07B00;
    transform: scale(1.1);
}
.tipo-nome {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 7px;
}
.tipo-desc {
    font-size: 12px;
    color: #718096;
    line-height: 1.55;
}

/* ======================================================
   FORM FIELDS
====================================================== */
.form-group-cad { margin-bottom: 18px; }

.form-group-cad label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #718096;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 7px;
}
.form-group-cad label i {
    color: #E07B00;
    width: 14px;
    margin-right: 3px;
}

.cad-input {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    font-size: 14px !important;
    color: #2d3748 !important;
    height: auto !important;
    box-shadow: none !important;
    width: 100%;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
}
.cad-input:focus {
    border-color: #E07B00 !important;
    box-shadow: 0 0 0 3px rgba(224,123,0,0.13) !important;
    outline: none !important;
    background: #fff !important;
}
.cad-input.input-ok  { border-color: #188A45 !important; }
.cad-input.input-err { border-color: #e74c3c !important; background: #fff9f9 !important; }

/* Olho da senha */
.cad-input-icon { position: relative; }
.cad-input-icon .cad-input { padding-right: 46px !important; }

.btn-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    line-height: 1;
}
.btn-eye:hover { color: #E07B00; }

/* 2 colunas: fone + nasc */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Toggle CPF/CNPJ */
.tipo-pessoa-toggle { display: flex; gap: 10px; }
.tpbtn {
    flex: 1;
    padding: 10px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fafbfc;
    color: #a0aec0;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.tpbtn:hover { border-color: #E07B00; color: #E07B00; background: rgba(224,123,0,0.04); }
.tpbtn.active {
    border-color: #E07B00;
    background: rgba(224,123,0,0.09);
    color: #E07B00;
}

/* ======================================================
   FORÇA DA SENHA
====================================================== */
.strength-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 7px;
    overflow: hidden;
}
.strength-bar div {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.4s ease, background 0.4s ease;
}
.strength-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 4px;
    display: block;
}

/* ======================================================
   ERROS INLINE
====================================================== */
.cad-error {
    display: block;
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    min-height: 16px;
}

/* ======================================================
   BOTÕES DE NAVEGAÇÃO
====================================================== */
.cad-nav { margin-top: 24px; }
.cad-nav-split { display: flex; gap: 12px; align-items: stretch; }

.btn-cad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.22s ease;
    border: none;
    white-space: nowrap;
}
.btn-cad-primary {
    background: #E07B00;
    color: #fff;
    flex: 1;
}
.btn-cad-primary:hover:not(:disabled) {
    background: #c96e00;
    box-shadow: 0 5px 18px rgba(224,123,0,0.38);
    transform: translateY(-1px);
}
.btn-cad-primary:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.btn-cad-primary:disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
}
.btn-cad-outline {
    background: transparent;
    color: #718096;
    border: 1.5px solid #e2e8f0;
    padding: 11px 16px;
    flex-shrink: 0;
}
.btn-cad-outline:hover { border-color: #a0aec0; color: #4a5568; background: #f8fafc; }

/* ======================================================
   reCAPTCHA + TERMOS
====================================================== */
.g-recaptcha { transform-origin: left top; }

.cad-termos {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 14px;
    line-height: 1.65;
}
.cad-termos a { color: #E07B00; text-decoration: none; }
.cad-termos a:hover { text-decoration: underline; }

/* ======================================================
   TELA DE SUCESSO
====================================================== */
.cad-success {
    text-align: center;
    padding: 20px 0 10px;
    animation: fadeInUp 0.5s ease both;
}
.cad-success-icon {
    font-size: 64px;
    color: #188A45;
    margin-bottom: 22px;
    animation: checkBounce 0.6s cubic-bezier(.22,.68,0,1.2) both;
    display: block;
}
.cad-success h3 {
    font-size: 26px;
    color: #1a2530;
    margin-bottom: 12px;
}
.cad-success p {
    font-size: 14px;
    color: #718096;
    line-height: 1.75;
    margin-bottom: 28px;
}
.cad-redirect-bar {
    height: 3px;
    background: #e2e8f0;
    border-radius: 2px;
    margin: 0 auto 12px;
    max-width: 280px;
    overflow: hidden;
}
.cad-redirect-fill {
    height: 100%;
    background: #188A45;
    width: 0%;
    transition: width 3.8s linear;
    border-radius: 2px;
}
.cad-success small { font-size: 12px; color: #a0aec0; }

/* ======================================================
   TABLET  992px → card centralizado
====================================================== */
@media (max-width: 991px) {

    body.cadastro-page {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 28px 16px 56px;
        background: linear-gradient(140deg, #1a2a3a 0%, #2c3e50 55%, #1a3a2a 100%);
    }

    .cad-layout {
        display: block;
        width: 100%;
        max-width: 520px;
        background: #fff;
        border-radius: 18px;
        box-shadow: 0 28px 72px rgba(0,0,0,0.45);
        overflow: hidden;
        animation: fadeInUp 0.50s cubic-bezier(.22,.68,0,1.2) both;
    }

    /* Esconde painel esquerdo */
    .cad-left { display: none; }

    /* Painel direito vira card */
    .cad-right {
        min-height: 0;
        padding: 0;
        justify-content: flex-start;
        overflow: visible;
        animation: none;
    }

    /* Cabeçalho mobile aparece */
    .cad-mbl-top {
        display: block;
        text-align: center;
        padding: 28px 32px 20px;
        border-bottom: 1px solid #edf2f7;
        background: #fafbfc;
    }

    .cad-logo-sm {
        font-family: 'Oswald', sans-serif;
        font-size: 26px;
        font-weight: 800;
        color: #2c3e50;
        letter-spacing: 1px;
        text-decoration: none;
        display: block;
        margin-bottom: 4px;
    }
    .cad-logo-sm span { color: #E07B00; }
    .cad-logo-sm:hover { text-decoration: none; color: #2c3e50; }

    .cad-subtitle-sm { font-size: 13px; color: #a0aec0; margin: 0; }

    /* Cabeçalho desktop oculto */
    .cad-form-head { display: none; }

    /* Progress dentro do padding do card */
    .cad-progress { padding: 22px 32px 0; }

    /* Alertas servidor */
    .cad-alerta-erro,
    .cad-alerta-ok { margin: 14px 32px 0; }

    /* Área do formulário */
    .cad-form-area { padding: 20px 32px 8px; }

    /* Footer mobile aparece */
    .cad-mbl-foot {
        display: block;
        text-align: center;
        padding: 16px 32px;
        border-top: 1px solid #edf2f7;
        background: #f8fafc;
        font-size: 13px;
        color: #a0aec0;
    }
    .cad-mbl-foot a {
        color: #E07B00;
        font-weight: 700;
        text-decoration: none;
        margin-left: 5px;
    }
    .cad-mbl-foot a:hover { text-decoration: underline; }
}

/* ======================================================
   MOBILE  ≤ 480px
====================================================== */
@media (max-width: 480px) {

    body.cadastro-page {
        padding: 0;
        background: #fff;
        align-items: flex-start;
    }

    .cad-layout {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        background: #fff;
    }

    .cad-mbl-top { padding: 22px 20px 16px; }
    .cad-logo-sm  { font-size: 22px; }
    .cad-progress { padding: 18px 20px 0; }
    .cad-form-area { padding: 18px 20px 8px; }
    .cad-mbl-foot { padding: 14px 20px; }

    .cad-alerta-erro,
    .cad-alerta-ok  { margin: 12px 20px 0; }

    /* Tipo cards em coluna no mobile pequeno */
    .tipo-grid { grid-template-columns: 1fr; gap: 12px; }

    /* WhatsApp + Nasc em coluna */
    .form-row-2 { grid-template-columns: 1fr; gap: 0; }

    /* Step label some em telas muito pequenas */
    .cad-step-line { margin: 0 6px 18px; }

    /* Botões maiores para toque */
    .btn-cad { padding: 14px 20px; font-size: 15px; }
    .cad-input { padding: 13px 15px !important; font-size: 15px !important; }

    /* reCAPTCHA escala */
    .g-recaptcha { transform: scale(0.88); transform-origin: left top; }
}

/* ======================================================
   MUITO PEQUENO  ≤ 350px
====================================================== */
@media (max-width: 350px) {
    .cad-step-label { font-size: 10px; }
    .cad-brand-logo, .cad-logo-sm { font-size: 20px; }
}
