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

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 50px auto 80px;
    padding: 0 25px;
    width: 100%;
}

.hero-formulario {
    text-align: center;
    margin-bottom: 40px;
}

.titulo-principal {
    font-size: 2.8rem;
    color: #02416D;
    margin-bottom: 15px;
    font-weight: 700;
}

.subtitulo {
    font-size: 1.2rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

.card-formulario {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.6s ease forwards;
    border: 1px solid rgba(2, 65, 109, 0.05);
}

.formulario {
    width: 100%;
}

.grupo-formulario {
    margin-bottom: 25px;
}

.grupo-formulario label {
    display: block;
    font-size: 1.05rem;
    color: #02416D;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.grupo-formulario label span {
    color: #dc2626;
}

.campo-entrada,
.campo-textarea {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #333;
}

.campo-entrada::placeholder,
.campo-textarea::placeholder {
    color: #9ca3af;
}

.campo-entrada:focus,
.campo-textarea:focus {
    border-color: #02416D;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(2, 65, 109, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.campo-textarea {
    height: 150px;
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.botao-enviar {
    width: 100%;
    background: linear-gradient(135deg, #02416D, #0268A6);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.botao-enviar:hover {
    background: linear-gradient(135deg, #0268A6, #02416D);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(2, 65, 109, 0.2);
}

.botao-enviar:active {
    transform: translateY(-1px);
}

.alerta {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.alerta.erro {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.alerta.sucesso {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.info-formulario {
    font-size: 0.95rem;
    color: #6b7280;
    margin-top: -10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
}

.info-formulario i {
    color: #02416D;
}

.grupo-duplo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

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

@media (max-width: 768px) {
    .container {
        margin: 30px auto 60px;
        padding: 0 20px;
    }
    
    .titulo-principal {
        font-size: 2.2rem;
    }
    
    .subtitulo {
        font-size: 1.1rem;
    }
    
    .card-formulario {
        padding: 30px 25px;
    }
    
    .grupo-duplo {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 20px auto 50px;
        padding: 0 15px;
    }
    
    .titulo-principal {
        font-size: 1.9rem;
    }
    
    .subtitulo {
        font-size: 1rem;
    }
    
    .card-formulario {
        padding: 25px 20px;
        border-radius: 12px;
    }
    
    .campo-entrada,
    .campo-textarea {
        padding: 12px;
    }
    
    .botao-enviar {
        padding: 14px;
        font-size: 1rem;
    }
}

.campo-entrada:invalid:not(:placeholder-shown),
.campo-textarea:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
    background: #fef2f2;
}

.campo-entrada:valid:not(:placeholder-shown),
.campo-textarea:valid:not(:placeholder-shown) {
    border-color: #10b981;
    background: #f0fdf4;
}

.contador-caracteres {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
    margin-top: 4px;
    font-family: monospace;
    transition: color 0.3s ease;
}

.contador-caracteres.quase-cheio {
    color: #f59e0b;
    font-weight: bold;
}

.contador-caracteres.cheio {
    color: #dc2626;
    font-weight: bold;
}

.grupo-formulario {
    position: relative;
    margin-bottom: 20px;
}