/*
 * Candidatura rápida (application/quick_apply). Mesma identidade da página pública da vaga
 * (landpage_new/job_opening.html): Manrope, creme, verde e lima.
 */
.qa-page {
    --qa-green-800: #1F3A2E;
    --qa-green-700: #2a4d3d;
    --qa-lime: #C9F26B;
    --qa-lime-soft: #E4F8B4;
    --qa-cream: #F5F2EC;
    --qa-ink: #1a1f1c;
    --qa-text: #3a4a40;
    --qa-muted: #5f665d;
    --qa-line: #E3DFD3;
    --qa-dash: #c9c3b3;

    min-height: 100vh;
    background: var(--qa-cream);
    font-family: 'Manrope', sans-serif;
    color: var(--qa-ink);
}

.qa-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Faixa verde: topo, vaga e progresso */
.qa-hero {
    background: var(--qa-green-800);
    padding-bottom: 44px;
}

.qa-topbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.qa-topbar img {
    height: 30px;
    display: block;
}

.qa-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    white-space: nowrap;
}

.qa-back:hover {
    color: #fff;
}

.qa-job {
    margin-top: 12px;
}

.qa-eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--qa-lime);
}

.qa-job h1 {
    margin: 6px 0 4px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
}

.qa-employer {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .78);
}

.qa-progress {
    margin-top: 24px;
}

.qa-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.qa-progress-count {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, .78);
}

.qa-progress-current {
    font-size: 15px;
    font-weight: 800;
    color: var(--qa-lime);
}

.qa-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.qa-step {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.qa-step-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .22);
}

.qa-step.is-done .qa-step-bar {
    background: var(--qa-lime);
}

.qa-step.is-current .qa-step-bar {
    background: linear-gradient(90deg, var(--qa-lime) 50%, rgba(255, 255, 255, .22) 50%);
}

.qa-step-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, .62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qa-step.is-done .qa-step-label {
    font-weight: 600;
    color: rgba(255, 255, 255, .78);
}

.qa-step.is-current .qa-step-label {
    font-weight: 800;
    color: #fff;
}

.qa-step-label svg {
    flex-shrink: 0;
}

/* Card do formulário, sobre a faixa verde */
.qa-body {
    margin-top: -24px;
    padding-bottom: 40px;
}

.qa-card {
    background: #fff;
    border: 1px solid var(--qa-line);
    border-radius: 18px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.qa-card form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.qa-lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--qa-text);
}

.qa-lead strong {
    color: var(--qa-ink);
}

.qa-alert {
    margin: 0;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
    background: #fef2f2;
    color: #b91c1c;
}

.qa-alert.is-success {
    background: var(--qa-lime-soft);
    color: var(--qa-green-800);
}

.qa-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Campos */
.qa-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qa-field[hidden] {
    display: none;
}

.qa-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--qa-text);
}

.qa-input {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    border: 1px solid var(--qa-line);
    border-radius: 10px;
    padding: 0 14px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--qa-ink);
}

select.qa-input {
    padding: 0 10px;
}

textarea.qa-input {
    padding: 12px 14px;
    min-height: 96px;
}

.qa-input:focus {
    outline: none;
    border-color: var(--qa-green-700);
    box-shadow: 0 0 0 3px var(--qa-lime-soft);
}

.qa-field.has-error .qa-input {
    border-color: #dc2626;
}

.qa-error {
    margin: 0;
    font-size: 12.5px;
    color: #b91c1c;
}

.qa-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-size: 14px;
    color: var(--qa-text);
    cursor: pointer;
}

.qa-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--qa-green-800);
}

.qa-code {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .4em;
    text-align: center;
}

.qa-pair {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* align-items: end mantém os inputs na mesma linha quando um rótulo quebra */
.qa-row {
    display: grid;
    gap: 10px;
    align-items: end;
}

.qa-row--uf {
    grid-template-columns: 90px minmax(0, 1fr);
}

.qa-row--year {
    grid-template-columns: minmax(0, 1fr) 120px;
}

/* Sem instituição (fundamental, médio, "outros": o JS esconde o campo), o ano ocupa a linha */
.qa-row--year:has(> [data-field="institution"][hidden]),
.qa-row--year:not(:has(> [data-field="institution"])) {
    grid-template-columns: minmax(0, 1fr);
}

.qa-section {
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.qa-section legend {
    padding: 0;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--qa-green-800);
}

.qa-section legend::before {
    content: '';
    width: 6px;
    height: 18px;
    border-radius: 3px;
    background: var(--qa-lime);
}

/* PDF: o label inteiro abre o seletor; o nome do arquivo escolhido entra no lugar da dica */
.qa-upload {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1.5px dashed var(--qa-dash);
    border-radius: 14px;
    background: var(--qa-cream);
    cursor: pointer;
}

.qa-upload:hover,
.qa-upload:focus-within {
    border-color: var(--qa-green-700);
}

.qa-upload.has-file {
    border-style: solid;
    border-color: var(--qa-green-700);
    background: var(--qa-lime-soft);
}

.qa-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.qa-upload-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--qa-line);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--qa-green-700);
}

.qa-upload-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.qa-upload-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--qa-green-800);
}

.qa-upload-hint {
    font-size: 12.5px;
    color: var(--qa-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qa-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--qa-muted);
}

.qa-divider::before,
.qa-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--qa-line);
}

/* Botões */
.qa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 10px;
    background: var(--qa-lime);
    color: var(--qa-green-800);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s;
}

.qa-btn:hover {
    filter: brightness(1.05);
}

.qa-btn:focus-visible {
    outline: 3px solid var(--qa-green-700);
    outline-offset: 2px;
}

.qa-link-btn {
    min-height: 44px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--qa-green-800);
    text-decoration: underline;
    cursor: pointer;
}

.qa-secondary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: var(--qa-muted);
}

.qa-secondary form {
    gap: 0;
}

.qa-terms {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--qa-muted);
}

.qa-card a,
.qa-footer a {
    color: var(--qa-green-800);
    font-weight: 600;
}

.qa-footer {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--qa-muted);
}

.qa-honeypot {
    display: none;
}

@media (min-width: 640px) {
    .qa-hero {
        padding-bottom: 52px;
    }

    .qa-job h1 {
        font-size: 26px;
    }

    .qa-step-label {
        font-size: 12.5px;
    }

    .qa-card {
        padding: 32px;
    }

    .qa-body {
        margin-top: -28px;
        padding-bottom: 56px;
    }
}

/* Desktop: coluna mais larga e campos em duas colunas */
@media (min-width: 900px) {
    .qa-wrap {
        max-width: 760px;
    }

    .qa-card {
        padding: 36px 40px;
    }

    .qa-pair,
    .qa-section {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
        row-gap: 14px;
        align-items: end;
    }

    /* Instituição e ano viram células da grade da seção */
    .qa-section .qa-row--year {
        display: contents;
    }

    .qa-section > .qa-field:has(.qa-check-label) {
        grid-column: 1 / -1;
    }

    .qa-card .qa-inline-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 220px;
        column-gap: 16px;
        row-gap: 14px;
        align-items: end;
    }

    .qa-card .qa-inline-form > .qa-btn {
        min-height: 46px;
    }

    .qa-card .qa-inline-form > .qa-alert {
        grid-column: 1 / -1;
    }

    /* Erro embaixo do campo não pode empurrar o botão para baixo do input */
    .qa-card .qa-inline-form > .qa-field.has-error ~ .qa-btn {
        align-self: start;
        margin-top: 25px;
    }
}
