/* ==========================================================================
   CSS de Autenticação Administrativa (Azure Scholar Theme) - Audit V6 (2026)
   Centraliza e modulariza a identidade visual das telas públicas de entrada.
   ========================================================================== */

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* Container de Autenticação */
.login-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(19, 109, 133, 0.08);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(19, 109, 133, 0.03);
    padding: 2.5rem;
    transition: all 0.3s ease;
}

/* Botões do Seletor de Papéis (login.php) */
.role-btn { 
    transition: all 0.3s; 
    font-weight: 600;
}

.role-btn.active { 
    transform: scale(1.05); 
}

.btn-role-professor {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-role-professor:hover, 
.btn-role-professor.active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.btn-role-pesquisador {
    color: var(--teal);
    border-color: var(--teal);
}

.btn-role-pesquisador:hover, 
.btn-role-pesquisador.active {
    background-color: var(--teal) !important;
    border-color: var(--teal) !important;
    color: white !important;
}

.btn-role-admin {
    color: var(--accent);
    border-color: var(--accent);
}

.btn-role-admin:hover, 
.btn-role-admin.active {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #1a1a1a !important; /* Alto contraste para acessibilidade */
    font-weight: bold;
}

/* Botão Submit Premium (Azure-Teal Gradient) */
.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--teal));
    color: white !important;
    border: none;
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(19, 109, 133, 0.35);
    background: linear-gradient(135deg, var(--teal), var(--primary));
    color: white !important;
}

/* Controles de Formulário e Inputs */
.form-control {
    border-radius: 12px;
    border: 1px solid rgba(7, 33, 26, 0.15);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 0.25rem rgba(15, 88, 108, 0.15);
}

/* Específico para Cadastro (register.php) */
.form-control-register:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(19, 109, 133, 0.15);
}

/* Elementos Específicos do Fluxo 2FA */
.form-control-2fa {
    border-radius: 16px;
    border: 2px solid rgba(19, 109, 133, 0.15);
    padding: 0.75rem 1rem;
    font-size: 2rem; 
    letter-spacing: 0.5rem;
    text-align: center;
    font-weight: 700;
    color: var(--primary);
    transition: all 0.3s ease;
}

.form-control-2fa:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(19, 109, 133, 0.15);
    outline: 0;
}

.alert-custom-warning {
    background-color: rgba(181, 128, 0, 0.08);
    border: 1px solid rgba(181, 128, 0, 0.15);
    color: var(--accent);
    border-radius: 16px;
    padding: 1rem;
}

/* Alertas Globais Premium Unificados (Azure Scholar Theme) */
.alert {
    border-radius: 14px;
    border: none;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.08);
    border: 1px solid rgba(40, 167, 69, 0.15);
    color: #155724;
}

.alert-success::before {
    content: "\f058"; /* check-circle in FontAwesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.75rem;
    font-size: 1.2rem;
    color: #28a745;
    flex-shrink: 0;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.15);
    color: #721c24;
}

.alert-danger::before {
    content: "\f06a"; /* exclamation-circle in FontAwesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.75rem;
    font-size: 1.2rem;
    color: #dc3545;
    flex-shrink: 0;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.15);
    color: #856404;
}

.alert-warning::before {
    content: "\f071"; /* exclamation-triangle in FontAwesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.75rem;
    font-size: 1.2rem;
    color: #ffc107;
    flex-shrink: 0;
}

/* Configuração Geral do Card 2FA de Setup */
.login-card-2fa-setup {
    max-width: 600px;
    margin: 50px auto;
}

/* ==========================================================================
   Responsividade Móvel de Alta Estética
   ========================================================================== */

@media (max-width: 576px) {
    .container {
        margin-top: 1.5rem !important;
        padding-top: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .login-card {
        padding: 1.75rem !important;
        border-radius: 20px !important;
    }
    
    .login-card-2fa-setup {
        margin: 15px auto !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    /* Empilhamento de papéis no celular para ergonomia de toque */
    .btn-group {
        flex-direction: column !important;
        gap: 6px;
        background-color: transparent !important;
        box-shadow: none !important;
    }
    
    .role-btn {
        width: 100% !important;
        border-radius: 12px !important;
        border: 1px solid rgba(19, 109, 133, 0.15) !important;
        padding: 0.6rem !important;
    }
    
    .role-btn.active {
        transform: scale(1.02) !important;
    }
    
    /* QR Code Responsivo */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Input de 2FA Ajustado para celulares estreitos */
    .form-control-2fa {
        font-size: 1.6rem !important;
        letter-spacing: 0.3rem !important;
        padding: 0.5rem !important;
    }
}
