/* =====================================================
   CADASTRO — Layout moderno em 2 etapas
   ===================================================== */
#cadastrar-curriculo {
    min-height: 100vh;
    background: #f8f7ff;
    padding: 110px 0 60px;
}

.cad-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header da página */
.cad-page-header {
    text-align: center;
    margin-bottom: 32px;
}
.cad-page-header .pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #673de6, #8980f5);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
    letter-spacing: .5px;
}
.cad-page-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: #19172f;
    margin: 0 0 8px;
}
.cad-page-header p {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}
.cad-login-link {
    font-size: 14px;
    color: #6b7280;
    margin-top: 10px;
}
.cad-login-link a {
    color: #673de6;
    font-weight: 600;
    text-decoration: none;
}
.cad-login-link a:hover { text-decoration: underline; }

/* Indicador de etapas */
.cad-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}
.cad-step {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.cad-step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e9e5ff;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
    flex-shrink: 0;
}
.cad-step.ativa .cad-step-num {
    background: linear-gradient(135deg, #673de6, #8980f5);
    color: #fff;
    box-shadow: 0 4px 14px rgba(103,61,230,.35);
}
.cad-step.concluida .cad-step-num {
    background: #00b090;
    color: #fff;
}
.cad-step-label {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 600;
    transition: color .3s;
}
.cad-step.ativa .cad-step-label { color: #673de6; }
.cad-step.concluida .cad-step-label { color: #00b090; }
.cad-step-linha {
    width: 60px;
    height: 2px;
    background: #e9e5ff;
    margin: 0 12px;
    transition: background .3s;
}
.cad-step-linha.concluida { background: #00b090; }

/* Card principal */
.cad-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(103,61,230,.08);
    border: 1px solid #f0ebff;
    overflow: hidden;
}

/* Etapa 1 — Upload */
.cad-etapa-upload {
    padding: 40px;
}
.cad-upload-area {
    border: 2px dashed #c4b5fd;
    border-radius: 16px;
    padding: 40px 24px;
    text-align: center;
    background: #faf8ff;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
}
.cad-upload-area:hover,
.cad-upload-area.arrastando {
    border-color: #673de6;
    background: #f0ebff;
}
.cad-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.cad-upload-icone {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #673de6, #8980f5);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    margin-bottom: 16px;
}
.cad-upload-titulo {
    font-size: 17px;
    font-weight: 700;
    color: #19172f;
    margin-bottom: 6px;
}
.cad-upload-subtitulo {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}
.cad-upload-badge {
    display: inline-block;
    background: #f0ebff;
    color: #673de6;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}
.cad-arquivo-selecionado {
    display: none;
    align-items: center;
    gap: 12px;
    background: #f0fff8;
    border: 1.5px solid #a7f3d0;
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 16px;
    font-size: 14px;
    color: #065f46;
    font-weight: 600;
}
.cad-arquivo-selecionado i { color: #00b090; font-size: 18px; }

.cad-btn-analisar {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #673de6, #8980f5);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity .2s, transform .2s;
    box-shadow: 0 6px 20px rgba(103,61,230,.3);
}
.cad-btn-analisar:hover { opacity: .9; transform: translateY(-1px); }
.cad-btn-analisar:disabled { opacity: .5; cursor: default; transform: none; }

.cad-ia-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f0ebff;
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 13px;
    color: #4b3a8c;
    line-height: 1.5;
}
.cad-ia-info i { color: #673de6; font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* Etapa 2 — Formulário de dados */
.cad-etapa-dados {
    display: none;
}
.cad-secao {
    padding: 28px 40px;
    border-top: 1px solid #f3f4f6;
}
.cad-secao:first-child { border-top: none; }
.cad-secao-titulo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #673de6;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 20px;
}
.cad-secao-titulo i {
    width: 28px;
    height: 28px;
    background: #f0ebff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* Inputs no padrão do sistema */
.cad-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}
.cad-row:last-child { margin-bottom: 0; }
.cad-row.cols-2 { grid-template-columns: 1fr 1fr; }
.cad-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.cad-row.cols-1-2 { grid-template-columns: 1fr 2fr; }

.cad-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.cad-field label .cad-opcional {
    color: #9ca3af;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    margin-left: 4px;
}
.cad-field .input {
    position: relative;
}
.cad-field input,
.cad-field select {
    width: 100%;
    height: 46px;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    color: #19172f;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}
.cad-field input:focus,
.cad-field select:focus {
    border-color: #673de6;
    box-shadow: 0 0 0 3px rgba(103,61,230,.1);
}
.cad-field input.invalido,
.cad-field select.invalido {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}
.cad-field input.valido {
    border-color: #00b090;
}
.cad-select-wrap {
    position: relative;
}
.cad-select-wrap::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Pro';
    font-size: 11px;
    color: #9ca3af;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Toggle senha */
.cad-senha-wrap {
    position: relative;
}
.cad-senha-wrap input { padding-right: 44px; }
.cad-toggle-senha {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
    line-height: 1;
}
.cad-toggle-senha:hover { color: #673de6; }

/* Força da senha */
.cad-senha-forca {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}
.cad-forca-barra {
    flex: 1;
    height: 3px;
    background: #e5e7eb;
    border-radius: 999px;
    transition: background .3s;
}

/* Feedback inline */
.cad-msg-campo {
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
    display: block;
}
.cad-msg-campo.erro {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    margin-top: 6px;
}

.cad-msg-campo.ok {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #00b090;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    margin-top: 6px;
}

/* Upload de foto */
.cad-foto-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}
.cad-foto-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #f0ebff;
    border: 2px dashed #c4b5fd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color .2s;
}
.cad-foto-preview:hover { border-color: #673de6; }
.cad-foto-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.cad-foto-preview i { color: #c4b5fd; font-size: 30px; }
.cad-foto-info { font-size: 13px; color: #6b7280; line-height: 1.6; }
.cad-foto-info strong { display: block; color: #374151; font-size: 14px; margin-bottom: 2px; }
.cad-btn-foto {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #673de6;
    cursor: pointer;
    text-decoration: underline;
}

/* Checkboxes */
.cad-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 12px;
}
.cad-check:last-child { margin-bottom: 0; }
.cad-check input[type="checkbox"] {
    position: relative;
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: none !important;
    background: transparent;
    flex-shrink: 0;
    margin-top: 1px;
}
.cad-check input[type="checkbox"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #fff;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    transition: background .15s ease, border-color .15s ease;
    cursor: pointer;
}
.cad-check input[type="checkbox"]:checked::after {
    background: #673de6;
    border-color: #673de6;
}
.cad-check input[type="checkbox"]::before {
    content: '';
    position: absolute;
    z-index: 1;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity .15s ease;
}
.cad-check input[type="checkbox"]:checked::before {
    opacity: 1;
}
.cad-check a { color: #673de6; font-weight: 600; }

/* Botão finalizar */
.cad-btn-finalizar {
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, #673de6, #8980f5);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity .2s, transform .2s;
    box-shadow: 0 8px 28px rgba(103,61,230,.35);
}
.cad-btn-finalizar:hover { opacity: .9; transform: translateY(-1px); }

/* =====================================================
   DESKTOP — Layout em 2 colunas para telas >= 768px
   ===================================================== */
@media (min-width: 768px) {

    /* Etapa 1: upload à esquerda + painel informativo à direita */
    .cad-etapa-upload {
        display: grid;
        grid-template-columns: 1fr 340px;
        grid-template-rows: auto auto auto;
        gap: 0 40px;
        padding: 48px;
        align-items: start;
    }

    .cad-upload-area         { grid-column: 1; grid-row: 1; }
    .cad-arquivo-selecionado { grid-column: 1; grid-row: 2; }
    .cad-btn-analisar        { grid-column: 1; grid-row: 3; margin-top: 16px; }

    /* Painel lateral de benefícios */
    .cad-upload-lateral {
        grid-column: 2;
        grid-row: 1 / span 3;
        background: linear-gradient(160deg, #0d0821 0%, #1a0d40 100%);
        border-radius: 16px;
        padding: 28px 24px;
        align-self: stretch;
    }

    /* Seções do formulário com padding maior */
    .cad-secao { padding: 32px 48px; }

    /* 4 colunas disponíveis para grids maiores */
    .cad-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

    /* ia-info some no desktop — info está no painel lateral */
    .cad-ia-info { display: none; }
}

/* Mobile */
@media (max-width: 767px) {
    .cad-etapa-upload,
    .cad-secao { padding: 24px 20px; }
    .cad-row.cols-2,
    .cad-row.cols-3,
    .cad-row.cols-1-2 { grid-template-columns: 1fr; }
    .cad-step-label { display: none; }
    .cad-step-linha { width: 32px; }
    .cad-upload-lateral { display: none; }
}
