body {
    background-image: linear-gradient(rgba(10, 40, 120, 0.65), rgba(10, 40, 120, 0.65)), url('bg-formulario.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: #1a3a6b;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* BOTÃO VOLTAR */
.btn-voltar {
    position: fixed;
    top: 16px;
    right: 20px;
    background-color: rgba(255,255,255,0.92);
    color: #185FA5;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid rgba(24,95,165,0.3);
    z-index: 100;
    transition: background 0.2s;
}

.btn-voltar:hover {
    background-color: #ffffff;
    border-color: #185FA5;
}

/* LOGO */
.logo {
    display: block;
    margin: 32px auto 6px auto;
    height: auto;
    max-width: 380px;
    width: 100%;
    filter: drop-shadow(0 0 12px rgba(46, 204, 113, 0.4))
            drop-shadow(0 0 24px rgba(24, 95, 165, 0.3))
            drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    animation: logobrilho 3s ease-in-out infinite;
}

@keyframes logobrilho {
    0%, 100% {
        filter: drop-shadow(0 0 12px rgba(46, 204, 113, 0.4))
                drop-shadow(0 0 24px rgba(24, 95, 165, 0.3))
                drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(46, 204, 113, 0.7))
                drop-shadow(0 0 40px rgba(24, 95, 165, 0.5))
                drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    }
}

/* TOPO */
.perfil-selector {
    text-align: center;
    padding: 10px 20px 0;
}

.perfil-selector h2 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 10px;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    text-align: center;
}

.perfil-selector p {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.perfil-selector p::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ecc71;
    flex-shrink: 0;
}

/* TABS */
.perfil-botoes {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0 auto;
    max-width: 680px;
    background: #fff;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    border-bottom: 1px solid #e5e7eb;
}

.btn-perfil {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #fff;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 14px 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
}

.btn-perfil:hover {
    color: #185FA5;
    background: #f8faff;
}

.btn-perfil.ativo {
    color: #185FA5;
    border-bottom: 2px solid #185FA5;
    background: #f8faff;
}

.btn-perfil svg {
    flex-shrink: 0;
}

/* FORM — escopo correto para não vazar */
.form-perfil {
    width: 100%;
    max-width: 680px;
    margin: 0 auto 40px;
    padding: 32px 40px;
    border: none;
    border-radius: 0 0 14px 14px;
    box-sizing: border-box;
    background: #ffffff;
    text-align: left;
}

/* TÍTULO DO FORM — escopo correto */
.form-perfil h2 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    text-align: left;
}

/* FRASE DESTAQUE */
.frase-destaque {
    text-align: left;
    color: #9ca3af;
    font-size: 12px;
    margin: 0 0 20px;
    font-weight: 400;
}

/* FIELDSET */
.form-perfil fieldset {
    border: none;
    padding: 0;
    margin: 0 0 16px;
    background: transparent;
}

.form-perfil legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #185FA5;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding: 0;
    width: 100%;
}

.form-perfil legend::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 2px;
    background: #2ecc71;
    border-radius: 2px;
    flex-shrink: 0;
}

/* LABELS */
.form-perfil label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 5px;
}

/* INPUTS */
.form-perfil input[type="text"],
.form-perfil input[type="email"],
.form-perfil input[type="password"],
.form-perfil input[type="date"],
.form-perfil input[type="number"],
.form-perfil select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 13px;
    color: #374151;
    background: #fff;
    margin-bottom: 14px;
    outline: none;
    font-family: Arial, sans-serif;
}

.form-perfil input[type="text"]:focus,
.form-perfil input[type="email"]:focus,
.form-perfil input[type="number"]:focus {
    border-color: #185FA5;
    box-shadow: 0 0 0 3px rgba(24,95,165,0.1);
}

/* RADIO E CHECKBOX */
.form-perfil input[type="radio"],
.form-perfil input[type="checkbox"] {
    width: auto;
    margin: 0;
    padding: 0;
}

/* OPÇÕES */
.opcoes {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.opcoes label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 7px 14px;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 400;
}

.opcoes label:has(input:checked) {
    border-color: #185FA5;
    background: #f0f7ff;
    color: #185FA5;
}

/* BOTÃO ENVIAR */
.botao-enviar {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: bold;
    font-family: inherit;
    background-color: #185FA5;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.botao-enviar:hover {
    background-color: #0c447c;
}

/* LGPD */
.lgpd {
    background: #f9fafb;
    padding: 14px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 13px;
    border: 1px solid #e5e7eb;
}

.lgpd label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
}

/* ERRO */
.erro {
    color: red;
    margin-bottom: 15px;
    font-weight: bold;
}

/* RESPONSIVO */
@media (max-width: 720px) {
    .logo { max-width: 220px; }
    .form-perfil { padding: 20px 18px; max-width: 100%; }
    .perfil-botoes { max-width: 100%; }
    .form-perfil h2 { font-size: 15px; }
    .btn-perfil { font-size: 11px; padding: 12px 4px; gap: 4px; }
    .opcoes { flex-direction: column; gap: 8px; }
    .btn-voltar { position: static; display: block; margin: 10px auto; text-align: center; width: fit-content; }
}