/* ==========================================================================
   1. VARIÁVEIS E RESET (Essencial para manter a identidade visual)
   ========================================================================== */
:root {
    /* Cores principais */
    --primary-blue: #1a73e8;
    --primary-blue-light: #4285f4;
    --primary-blue-dark: #1557b0;
    
    /* Backgrounds */
    --bg-main: #e8e8e8;
    --bg-white: #ffffff;
    
    /* Texto */
    --text-primary: #333;
    --text-secondary: #666;
    
    /* Bordas e Sombras */
    --border-input: #e8eaed;
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.1);
    
    /* Feedback */
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --error-border: #f5c6cb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
}

/* ==========================================================================
   2. ESTRUTURA DE LOGIN
   ========================================================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--bg-main);
}

.login-box {
    background: var(--bg-main);
    padding: 40px;
    border-radius: 16px;
    border: 2px solid rgba(26, 115, 232, 0.2);
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(10px); /* Efeito moderno */
    position: relative;
}

/* Efeito Glassmorphism de fundo */
.login-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    z-index: -1;
}

.login-box h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 30px;
}

/* ==========================================================================
   3. ELEMENTOS VISUAIS (Logo e Textos)
   ========================================================================== */
.logo-container {
    margin-bottom: 25px;
}

.logo-aia-login {
    width: 120px;
    height: 120px;
    background-image: url('logo_aia.png'); /* Certifique-se que a imagem existe */
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    margin: 0 auto 15px;
    display: block;
}

.platform-text-modern {
    font-size: 13px;
    color: var(--primary-blue);
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.4;
    margin: 0;
    font-style: italic;
    opacity: 0.9;
}

/* ==========================================================================
   4. FORMULÁRIO E INPUTS
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-input);
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.8);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.95);
}

/* Acessibilidade */
.form-input:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* ==========================================================================
   5. BOTÕES
   ========================================================================== */
.login-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: white;
    margin-top: 10px;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    transform: translateY(-1px);
    opacity: 0.9;
}

.login-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

/* ==========================================================================
   6. MENSAGENS E FOOTER
   ========================================================================== */
.error-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
    display: none; /* Oculto por padrão, JS mostra */
}

.loading {
    display: none;
    margin-top: 15px;
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 14px;
}

.powered-by-login {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(26, 115, 232, 0.2);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.powered-by-login strong {
    color: var(--primary-blue);
    font-weight: 600;
    margin-left: 5px;
}

/* ==========================================================================
   7. RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .logo-aia-login {
        width: 90px;
        height: 90px;
    }
    
    .login-box h2 {
        font-size: 24px;
    }
}
