body, html { margin: 0; padding: 0; height: 100%; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-base); color: var(--text-main); }
        
/* Fundo original restaurado com link online correto e degradê imersivo */
.bg-image { 
    background-image: linear-gradient(rgba(22, 23, 27, 0.85), rgba(22, 23, 27, 0.95)), url("../img/backgrounds/bg-login-sala.webp"); 
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed; 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
}
        
.login-container { width: 100%; max-width: 400px; text-align: center; }
.logo { width: 300px; margin-bottom: 30px; }
        
/* O cartão do formulário: vidro sobre a foto, no escuro e no claro (a logo, a foto e o fundo ficam como estão). */
.login-card {
    background-color: rgba(33, 34, 41, 0.72);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 28px 28px 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: left;
}
html.light-mode .login-card { background-color: rgba(255, 255, 255, 0.82); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08); }

.form-group { text-align: left; margin-bottom: 18px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 8px; color: var(--text-muted); }

/* Os campos: mais altos, cantos mais suaves e o anel laranja no foco */
.form-group input {
    width: 100%;
    padding: 13px 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-strong);
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.form-group input:hover { border-color: rgba(234, 96, 16, 0.45); }
.form-group input:focus {
    outline: none;
    border-color: var(--accent-orange);
    background-color: var(--bg-panel);
    box-shadow: 0 0 0 3px rgba(234, 96, 16, 0.18);
}

/* O botão de entrar: cheio, no laranja do MILO */
.btn-submit {
    width: 100%;
    padding: 13px;
    background-color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(234, 96, 16, 0.28);
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 8px;
}
.btn-submit:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(234, 96, 16, 0.35);
}
.btn-submit:active {
    transform: translateY(0);
}
.btn-submit:focus-visible { outline: 2px solid var(--accent-orange); outline-offset: 2px; }

/* Links utilitários e rodapé */
.btn-esqueci {
    display: block;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    margin: 18px auto 0;
    transition: color 0.2s;
}
.btn-esqueci:hover { color: var(--accent-orange); text-decoration: underline; }
        
.footer-text { 
    color: var(--text-muted); 
    font-size: 11px; 
    margin-top: 40px; 
    font-weight: 400;
}
        
/* Mensagens de Alerta padronizadas */
.error-msg { background-color: rgba(255, 75, 75, 0.15); color: #ff4b4b; padding: 12px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; border: 1px solid #ff4b4b; text-align: left; }
.success-msg { background-color: rgba(16, 185, 129, 0.15); color: #10b981; padding: 12px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; border: 1px solid #10b981; text-align: left; }

/* Badge MILO Animado (Selo Premium) */
.milo-badge {
    background-color: var(--bg-input); 
    border: 1px solid rgba(234, 96, 16, 0.3); 
    padding: 6px 16px; 
    border-radius: 20px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default; /* Mantém a setinha normal, pois não é um link clicável */
}
        
/* Efeito ao passar o mouse */
.milo-badge:hover {
    border-color: var(--accent-orange);
    background-color: rgba(234, 96, 16, 0.05); /* Leve fundo alaranjado */
    box-shadow: 0 4px 15px rgba(234, 96, 16, 0.15); /* Glow (brilho) externo */
    transform: translateY(-1px); /* Dá uma leve levantada */
}
        
.milo-badge .badge-text {
    font-size: 10px; 
    color: var(--text-main); 
    font-weight: 600; 
    letter-spacing: 0.5px; 
    text-transform: uppercase;
    transition: color 0.3s ease;
}
        
/* Acende o texto para branco no hover */
.milo-badge:hover .badge-text {
    color: var(--text-strong);
}

/* No tema claro, o véu sobre a foto fica claro, com as cores do tema do MILO (assets/css/tema.css). */
html.light-mode .bg-image { background-image: linear-gradient(rgba(243, 244, 246, 0.88), rgba(243, 244, 246, 0.96)), url("../img/backgrounds/bg-login-sala.webp"); }

/* O botão de tema da entrada, no canto, como no portal. */
.login-tema { position: fixed; top: 20px; right: 20px; z-index: 10; }

/* Ao entrar, a tela fica até o portal estar pronto: o botão mostra "Entrando…" girando, e a troca é um fade do
   navegador (a mesma regra está no portal.css). Navegador sem essa transição troca de tela do jeito normal. */
.btn-submit .btn-girando { display: none; }
.btn-submit.carregando { display: flex; align-items: center; justify-content: center; gap: 10px; pointer-events: none; }
.btn-submit.carregando .btn-girando {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: milo-gira 0.7s linear infinite;
}
@keyframes milo-gira { to { transform: rotate(360deg); } }

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.4s; }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    .btn-submit.carregando .btn-girando { animation-duration: 1.6s; }
}
