/* ============================================================
   AUTH.CSS - Páginas de Autenticação
   (Login, Cadastro, Esqueci Senha, Redefinir Senha)
   ============================================================ */

/* Container principal com fundo */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem 1.5rem;
    background: var(--color-forest-deep);
    position: relative;
    overflow: hidden;
}

/* Imagem de fundo */
.auth-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?auto=format&fit=crop&q=80&w=2000') no-repeat center center/cover;
    opacity: 0.15;
    z-index: 0;
}

/* Overlay escuro */
.auth-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 44, 33, 0.7);
    z-index: 1;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 2;
}

/* Card de autenticação */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease forwards;
}

/* Cabeçalho */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--color-text-headings);
}

.auth-header h2::before {
    display: none;
}

.auth-header p {
    color: var(--color-text-main);
    font-size: 0.95rem;
}

/* Formulário */
.auth-form .form-group {
    margin-bottom: 1.2rem;
}

.auth-form .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-headings);
    margin-bottom: 0.4rem;
}

.auth-form .form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-slate-200);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    background: var(--color-white);
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--color-impact-green);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.auth-form .form-control:disabled {
    background: var(--color-bg-light);
    cursor: not-allowed;
}

/* Botão full width */
.btn-full {
    width: 100%;
    justify-content: center;
    padding: 0.9rem;
    font-size: 1rem;
}

.btn-full:hover {
    transform: translateY(-2px);
}

/* Rodapé */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-slate-200);
    font-size: 0.9rem;
    color: var(--color-text-main);
}

.auth-footer a {
    color: var(--color-impact-green);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--color-forest-accent);
    text-decoration: underline;
}

/* Grid de 2 colunas para formulários grandes */
.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

.auth-grid .form-group {
    margin-bottom: 1rem;
}

.auth-grid .form-group-full {
    grid-column: 1 / -1;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-main);
}

.radio-label input[type="radio"] {
    accent-color: var(--color-impact-green);
    width: 16px;
    height: 16px;
}

/* Campos do aluno (toggle) */
.campos-aluno {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--color-bg-light);
    border-radius: 8px;
    border: 1px solid var(--color-slate-200);
}

.campos-aluno h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--color-text-headings);
    margin-bottom: 1rem;
}

/* Flash messages no auth */
.auth-section .flash-sucesso,
.auth-section .flash-erro,
.auth-section .flash-aviso {
    position: relative;
    z-index: 2;
    max-width: 480px;
    margin: 0 auto 1rem auto;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .campos-aluno {
        padding: 0.8rem;
    }
}