:root {
    --titulo1: #ef4502;
    --titulo2: #ff7b33;
    --texto1: #333333;
    --texto2: #666666;
    --bg-light: #f8f9fa;
    --border-light: #e9ecef;
    --shadow: 0 4px 20px rgba(239, 69, 2, 0.15);
    --success: #28a745;
    --error: #dc3545;
    --muted: #666;
}

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

body {
    font-family: 'Comfortaa', sans-serif;
    background: linear-gradient(135deg, #fff9f5 0%, #f8f9fa 100%);
    color: var(--texto1);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, var(--titulo1) 0%, var(--titulo2) 100%);
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-family: 'Lexend', sans-serif;
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

/* ── PROGRESS BAR ─────────────────────────────────────────── */
.progress-bar {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.progress-step { text-align: center; position: relative; flex: 1; }

.step-number {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--border-light);
    color: var(--texto2);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px;
    font-weight: 600; font-size: 14px;
}

.step-label { font-size: 12px; color: var(--texto2); font-weight: 500; }

.progress-step.active .step-number { background: var(--titulo1); color: white; }
.progress-step.active .step-label  { color: var(--titulo1); font-weight: 600; }

/* ── SEÇÕES ───────────────────────────────────────────────── */
.form-section { padding: 30px; display: none; }
.form-section.active { display: block; animation: fadeIn 0.5s ease-in-out; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── GRUPOS (BAIRROS / NÍVEL) ─────────────────────────────── */
.groups { display: grid; gap: 12px; }

.group {
    background: var(--card, #fff);
    border: 2px solid var(--border-light);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.group-header {
    display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
    padding: 6px 4px; cursor: pointer;
}

.group-left { display: flex; align-items: center; gap: 10px; }

.toggle-btn {
    background: transparent; border: 0; padding: 6px;
    border-radius: 6px; display: inline-flex; align-items: center;
    cursor: pointer; color: var(--accent, #ef4502);
}

.chev { width: 18px; height: 14px; transition: transform .18s ease; }
.chev path { stroke: var(--accent, #ef4502); }
.collapsed .chev { transform: rotate(0deg); }
.expanded  .chev { transform: rotate(180deg); }

.items {
    margin-top: 10px; padding-top: 8px;
    display: flex; flex-direction: column; gap: 8px;
}

.item-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border, #e6e6e6);
}

.item-row label { font-weight: 500; color: var(--item-color, #ff7b33); }

.desc {
    font-size: 13px; color: var(--desc, #333333);
    margin-top: 4px;
    font-family: 'Lexend', 'Comfortaa', sans-serif;
}

input[type="checkbox"] { accent-color: var(--accent, #ef4502); width: 18px; height: 18px; }

.hidden { display: none; }

/* ── RADIO CUSTOM ─────────────────────────────────────────── */
.item-radio { display: none; }

.radio-container {
    display: flex; align-items: center; cursor: pointer;
    position: relative; padding-left: 30px; margin-bottom: 8px;
    font-weight: 500; color: var(--item-color); user-select: none;
}

.radio-checkmark {
    position: absolute; top: 0; left: 0;
    height: 22px; width: 22px;
    background-color: white;
    border: 2px solid var(--titulo2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.radio-container:hover .radio-checkmark { border-color: var(--titulo1); transform: scale(1.1); }
.radio-container input:checked ~ .radio-checkmark { background-color: var(--titulo1); border-color: var(--titulo1); animation: radioPop 0.4s ease; }

.radio-checkmark:after {
    content: ""; position: absolute; display: none;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 8px; height: 8px; border-radius: 50%; background: white;
}

.radio-container input:checked ~ .radio-checkmark:after { display: block; animation: radioDot 0.3s ease; }

@keyframes radioPop {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(239,69,2,.4); }
    50%  { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(239,69,2,.1); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(239,69,2,0); }
}

@keyframes radioDot {
    0%   { transform: translate(-50%,-50%) scale(0); }
    70%  { transform: translate(-50%,-50%) scale(1.2); }
    100% { transform: translate(-50%,-50%) scale(1); }
}

/* ── ENDEREÇO ─────────────────────────────────────────────── */
.endereco-line { display: flex; gap: 15px; margin-bottom: 15px; }
.cep-field     { width: 25%; }
.endereco-oficial-field { width: 75%; background-color: #f8f9fa; }

/* ── INPUTS ───────────────────────────────────────────────── */
.section-title {
    font-family: 'Lexend', sans-serif;
    color: var(--titulo1); font-size: 22px;
    margin-bottom: 25px; padding-bottom: 15px;
    border-bottom: 2px solid var(--titulo2);
    display: inline-block;
}

.input-group { margin-bottom: 20px; }

.input-group label {
    display: block; margin-bottom: 8px;
    font-weight: 600; color: var(--texto1); font-size: 14px;
}

.input-field {
    width: 100%; padding: 14px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-family: 'Comfortaa', sans-serif;
    font-size: 16px; transition: all 0.3s ease; background: white;
}

.input-field:focus {
    outline: none; border-color: var(--titulo2);
    box-shadow: 0 0 0 3px rgba(255,123,51,.2);
}

/* ── TABELA DE DISPONIBILIDADE ────────────────────────────── */
.schedule-instruction {
    margin-bottom: 20px; color: var(--texto2);
    font-style: italic; text-align: center; font-size: 16px;
}

.schedule-table { width: 100%; border-collapse: collapse; margin-top: 15px; }

.schedule-table th {
    background: var(--bg-light); padding: 12px; text-align: center;
    font-weight: 600; color: var(--texto1);
    border: 1px solid var(--border-light);
    font-family: 'Lexend', sans-serif;
}

.schedule-table td { padding: 12px; text-align: center; border: 1px solid var(--border-light); vertical-align: middle; }
.schedule-table tr:nth-child(even) { background: var(--bg-light); }
.day-header { font-weight: 600; color: var(--titulo1); background: white !important; }

.schedule-checkbox {
    appearance: none; -webkit-appearance: none;
    width: 24px; height: 24px;
    border: 2px solid var(--titulo2); border-radius: 4px;
    background-color: white; cursor: pointer;
    position: relative; transition: all 0.3s ease;
}

.schedule-checkbox:hover   { border-color: var(--titulo1); transform: scale(1.1); }
.schedule-checkbox:checked { background-color: var(--titulo1); border-color: var(--titulo1); animation: checkboxPop 0.3s ease; }
.schedule-checkbox:checked::before { content: "✓"; position: absolute; color: white; font-size: 16px; font-weight: bold; top: 50%; left: 50%; transform: translate(-50%,-50%); }

@keyframes checkboxPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ── TOGGLE SWITCH ────────────────────────────────────────── */
.toogle { display: flex; align-items: center; gap: 10px; font-family: Arial, sans-serif; }
.toogle label { font-size: 16px; font-weight: 500; }
.toogle label:last-child { color: orange; }

.toggle-switch { position: relative; display: inline-block; width: 50px; height: 24px; }
.toggle-switch input { display: none; }

.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: 0.3s; border-radius: 24px;
}

.slider:before {
    position: absolute; content: "";
    height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white; transition: 0.3s; border-radius: 50%;
}

.toggle-switch input:checked + .slider              { background-color: orange; }
.toggle-switch input:checked + .slider:before       { transform: translateX(26px); }

/* ── DROPDOWN DISCIPLINAS ─────────────────────────────────── */
.dropdown { position: relative; width: 100%; margin-bottom: 20px; }

.dropdown-btn {
    width: 100%; padding: 14px;
    border: 2px solid var(--border-light); border-radius: 12px;
    font-family: 'Comfortaa', sans-serif; font-size: 16px;
    background: white; cursor: pointer; text-align: left; transition: all 0.3s ease;
}

.dropdown-content {
    display: none; position: absolute; top: 100%; left: 0;
    width: 100%; background-color: #fff;
    border: 1px solid var(--border-light); border-radius: 12px;
    max-height: 200px; overflow-y: auto;
    z-index: 1000; box-shadow: var(--shadow); padding: 10px;
}

.dropdown-btn:hover { border-color: var(--titulo2); }

.dropdown-content label {
    display: block; padding: 8px 12px; cursor: pointer;
    border-radius: 6px; margin: 2px 0; transition: background-color 0.2s;
}

.dropdown-content label:hover  { background-color: var(--bg-light); }
.dropdown-content input[type="checkbox"] { margin-right: 8px; }

/* ── EXPERIÊNCIA ──────────────────────────────────────────── */
.experience-group { margin-bottom: 25px; }
.experience-group .toggle-switch { margin-top: 8px; }
.experience-group textarea { margin-top: 12px; }
.textarea-field { min-height: 100px; resize: vertical; }

/* ── BOTÕES ───────────────────────────────────────────────── */
.nav-buttons {
    display: flex; justify-content: space-between;
    margin-top: 30px; padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.btn {
    padding: 14px 28px; border: none; border-radius: 12px;
    font-family: 'Comfortaa', sans-serif; font-size: 16px;
    font-weight: 600; cursor: pointer; transition: all 0.3s ease;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.btn-prev { background: var(--bg-light); color: var(--texto1); }
.btn-prev:hover { background: #e9ecef; }

.btn-next, .btn-submit {
    background: linear-gradient(135deg, var(--titulo1) 0%, var(--titulo2) 100%);
    color: white; box-shadow: 0 4px 15px rgba(239,69,2,.3);
}

.btn-next:hover, .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239,69,2,.4);
}

.btn-submit { width: 100%; padding: 16px; font-size: 18px; }

/* ── CHECKBOX DOS TERMOS ──────────────────────────────────── */
.checkbox-container {
    display: flex; align-items: flex-start;
    cursor: pointer; font-size: 14px;
    user-select: none; gap: 10px;
    margin-bottom: 10px;
}

.checkbox-container input { display: none; }

.checkmark {
    flex-shrink: 0; width: 22px; height: 22px;
    border: 2px solid var(--titulo1); border-radius: 4px;
    display: inline-block; position: relative;
    background-color: #fff; margin-top: 1px;
}

.checkbox-container input:checked ~ .checkmark { background-color: var(--titulo1); border-color: var(--titulo1); }

.checkbox-container input:checked ~ .checkmark:after {
    content: "✓"; position: absolute;
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    color: white; font-size: 14px; font-weight: bold;
}

.checkbox-container a { color: var(--titulo1); text-decoration: underline; }

/* ── FASE 1 TAREFA 6: CONSENTIMENTOS LGPD ────────────────── */
.lgpd-consents {
    margin-top: 16px; padding: 16px;
    background: #f0f7ee;
    border-radius: 12px;
    border-left: 3px solid #28a745;
    display: flex; flex-direction: column; gap: 10px;
}

.lgpd-titulo {
    font-family: 'Lexend', sans-serif;
    font-size: 12px; font-weight: 700;
    color: #1a7a3c; margin: 0 0 4px;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.lgpd-info {
    font-size: 12px; color: var(--texto2);
    line-height: 1.6; margin: 4px 0 0;
    padding-top: 10px;
    border-top: 1px dashed var(--border-light);
}

.lgpd-info a { color: var(--titulo1); text-decoration: none; font-weight: 600; }

/* ── FASE 1 TAREFA 6: MODAL DOS TERMOS ───────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}

.modal-box {
    background: white; border-radius: 16px;
    width: 100%; max-width: 720px; height: 85vh;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.modal-header h3 {
    font-family: 'Lexend', sans-serif;
    color: var(--titulo1); font-size: 18px; margin: 0;
}

.modal-close {
    background: none; border: none;
    font-size: 20px; cursor: pointer;
    color: var(--texto2); padding: 4px 8px; border-radius: 6px;
}

.modal-close:hover { background: var(--bg-light); color: var(--texto1); }

.modal-body { flex: 1; overflow: hidden; }
.modal-body embed { display: block; border: none; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex; justify-content: flex-end;
    flex-shrink: 0;
}

/* ── CPF MESSAGE ──────────────────────────────────────────── */
.cpf-message        { font-size: 13px; font-weight: 600; }
.cpf-message.success { color: var(--success); }
.cpf-message.error   { color: var(--error); }

/* ── SUCESSO ──────────────────────────────────────────────── */
.success-section { text-align: center; padding: 40px 30px; }
.success-title   { font-family: 'Lexend', sans-serif; color: var(--success); font-size: 28px; margin-bottom: 20px; }
.success-message { font-size: 18px; line-height: 1.6; margin-bottom: 25px; color: var(--texto1); }

/* ── APRESENTAÇÃO ─────────────────────────────────────────── */
.introduction { line-height: 1.6; color: var(--texto1); font-size: 16px; }
.introduction p { margin-bottom: 15px; }
.introduction a { color: var(--titulo1); text-decoration: none; font-weight: 600; }
.introduction a:hover { text-decoration: underline; }

/* ── RESPONSIVO ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .header h1    { font-size: 20px; }
    .section-title { font-size: 20px; }
    .schedule-table { font-size: 12px; }
    .modal-box    { height: 95vh; }
}

@media (max-width: 480px) {
    .progress-step { flex: none; width: 25%; font-size: 10px; }
    .step-number   { width: 28px; height: 28px; font-size: 12px; }
    .step-label    { font-size: 10px; }
    .schedule-checkbox { width: 20px; height: 20px; }
    .schedule-checkbox:checked::before { font-size: 14px; }
    .endereco-line { flex-direction: column; }
    .cep-field, .endereco-oficial-field { width: 100%; }
}

/* reCAPTCHA info — Fase 3 */
.recaptcha-info {
    font-size: 11px;
    color: var(--texto2);
    text-align: center;
    margin: 8px 0 16px;
    line-height: 1.5;
}
.recaptcha-info a {
    color: var(--titulo1);
    text-decoration: none;
}
.recaptcha-info a:hover { text-decoration: underline; }