/* =========================================
   1. CONFIGURAÇÕES GLOBAIS (Login)
   ========================================= */

:root {
    --primary-color: #005A9C;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #333;
    --text-light: #6c757d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-image: url('https://images.unsplash.com/photo-1570129477492-45c003edd2be?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 0;
    
    /* Garante que o body possa conter o toast posicionado */
    overflow-x: hidden; 
}

/* =========================================
   2. CONTAINER DE LOGIN
   ========================================= */

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.login-box {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    position: relative; /* Contexto para o toast */
    z-index: 10;
}

.login-logo {
    text-align: center;
    margin-bottom: 1rem;
}
.login-logo strong {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.login-box h2 {
    text-align: center;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

/* =========================================
   3. FORMULÁRIO DE LOGIN
   ========================================= */

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #555;
}

.login-form .form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.login-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.15);
}

.btn-login {
    width: 100%;
    padding: 0.85rem;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}
.btn-login:hover {
    background-color: #004a80;
}

/* =========================================
   4. LINKS
   ========================================= */

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.login-footer a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}
.login-footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* =========================================
   5. NOTIFICAÇÃO TOAST (CENTRALIZADA)
   ========================================= */

.toast-notification {
    position: fixed; /* Flutua na tela */
    z-index: 1001; /* Acima de tudo */
    
    /* Centralizado no Topo */
    top: 20px;
    left: 50%;
    
    background-color: #f8d7da; /* Vermelho de erro */
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    
    display: flex;
    align-items: center;
    gap: 1rem;
    
    /* Animação */
    opacity: 0;
    /* Começa fora da tela (em cima) e centralizado */
    transform: translate(-50%, -150%); 
    transition: all 0.4s ease-in-out;
}

/* Classe 'show' que o JS vai adicionar */
.toast-notification.show {
    opacity: 1;
    /* Desliza para a posição (centralizado) */
    transform: translate(-50%, 0); 
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.7rem; /* Tamanho do 'X' */
    line-height: 1;
    color: #721c24;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 0 0 1rem;
}
.toast-close:hover {
    opacity: 1;
}

/* =========================================
   6. RESPONSIVIDADE
   ========================================= */
@media (max-width: 500px) {
    body {
        background-image: none;
        background-color: var(--light-gray);
        align-items: flex-start;
        padding: 1rem 0;
    }
    .login-container {
        padding: 0 1rem;
    }
    .login-box {
        padding: 2rem 1.5rem;
        box-shadow: none;
        border: none;
    }
    
    /* Em telas pequenas, faz o toast ocupar a largura */
    .toast-notification {
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        border: none;
        border-bottom: 2px solid #f5c6cb;
        transform: translate(0, -100%); /* Ajusta a animação para 0% no X */
    }
    .toast-notification.show {
        transform: translate(0, 0); /* Ajusta a animação para 0% no X */
    }
}