/* --- Configuração Global e Variáveis --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #0d47a1;
    --accent-color: #1976d2;
    --content-bg: #f4f7fa;
    --border-color: #e0e0e0;
    --shadow-medium: 0 4px 10px rgba(0, 0, 0, 0.1);
    --success-color: #2e7d32;
    --danger-color: #d32f2f;
    --warning-color: #ffa500; 
    --white: #ffffff; 
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

/* DEPOIS */
.login-body {
    background-color: #292929; /* <-- MUDE AQUI */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

/* DEPOIS */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0; 
    background-color: transparent; /* <-- MUDE AQUI */
    animation: fadeIn 3s ease-out; /* <-- MUDANÇA: Mais lento */
}

/* --- Cartão de Login --- */
.login-card {
    background: rgb(35, 35, 35);
    backdrop-filter: blur(1px); 
    border: transparent;
    
    padding: 40px;
    padding-top: 80px; 
    border-radius: 12px;
    box-shadow: none;
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative; 
    z-index: 1;

    /* --- ADICIONE ESTAS 5 LINHAS --- */
    opacity: 0; /* Começa invisível */
    animation-name: fadeIn; /* Usa a mesma animação de zoom do fundo */
    animation-duration: 1.2s; /* Duração (pode ajustar) */
    animation-fill-mode: forwards; /* Mantém o estado final */
    animation-delay: 0.2s; /* Começa logo depois do fundo */
}

/* Estilos para o container do ícone de perfil */
.profile-icon-container {
    position: absolute;
    top: -40px; 
    left: 50%;
    transform: translateX(-50%); 
    width: 80px; 
    height: 80px;
    background-color:rgb(35, 35, 35);; 
    border-radius: 50%; 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2; 

    /* MUDANÇA: Animação estática e lenta para o ícone */
    opacity: 0; 
    animation-name: fadeInStatic;
    animation-duration: 2s;
    animation-fill-mode: forwards; 
    animation-delay: 0.5s;
}

/* MUDANÇA: Regra para <img> em vez de <i> */
.profile-icon-container img {
    width: -100px; 
    height: 100px;
    border-radius: 50%; 
    object-fit: cover; 
    border: transparent; 
}

/* --- Grupos de Input (Usuário/Senha) --- */
.input-group {
    position: relative;
    margin-bottom: 20px;
    margin-top: 30px; 
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white); 
    font-size: 1.2rem;
    z-index: 2;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 13px 50px;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    background-color: transparent; 
    color: var(--white); 
}

.input-group input:focus {
    outline: none;
    border-color: #f7cb08;
    box-shadow: none;
    padding: 15px 15px 13px 50px; 
}

/* Corrige o fundo branco do Auto-fill do navegador */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active  {
    -webkit-box-shadow: 0 0 0 30px #000000 inset !important;
    -webkit-text-fill-color: var(--white) !important;
    border: 1px solid #f7cb08;
}


/* --- Estilos do Floating Label --- */
.input-group.floating {
    position: relative;
}
.input-group.floating label {
    position: absolute;
    left: 50px; 
    top: 50%;
    transform: translateY(-50%);
    color: var(--white); 
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.2s ease-out;
    padding: 0 4px;
    z-index: 1; 
}

.input-group.floating input:focus + label,
.input-group.floating input:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 0.8rem;
    color: #f7cb08;
    background-color: transparent;
    z-index: 3;
}

/* --- Estilo do Toggle de Senha --- */
#toggle-password {
    position: absolute;
    right: 15px;
    left: auto; 
    top: 50%;
    transform: translateY(-50%);
    color: var(--white); 
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 2;
}
#toggle-password:hover {
    color: #f7cb08;
}

/* --- Botão de Login --- */
.login-button {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #292929;
    color: #f7cb08;
    margin-top: 10px;
    position: relative; 
    min-height: 54px; 
}
.login-button:hover {
    background-color: #f7cb08;
    color: #000000;
}

/* --- Estilo do Botão em Loading --- */
.login-button.loading {
    color: transparent;
    pointer-events: none;
}
.login-button.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -12px;
    margin-top: -12px;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-top-color: var(--white); 
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Animação de Shake (para login.js) --- */
.login-card.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

/* --- Notificações de Toast (para login.js) --- */
.toast-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    z-index: 2000;
    transition: bottom 0.5s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white); 
    font-weight: 600;
    max-width: 90%;
}
.toast-notification.success {
    background-color: var(--success-color);
}
.toast-notification.error {
    background-color: var(--warning-color); 
}

.toast-notification .toast-gif {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.toast-notification i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-notification.error i {
    display: none;
}

.toast-notification.show {
    bottom: 30px;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9); /* Começa menor */
    }
    to {
        opacity: 1;
        transform: scale(1);   /* Termina no tamanho normal */
    }
}

/* --- ADICIONADO: Estilo da Imagem de Fundo --- */
.background-logo-img {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0; /* Fica no mesmo nível das partículas */
    width: 70%; 
    max-width: 600px;     
    user-select: none;
    pointer-events: none;
}

/* --- ADICIONADO: Animação estática para o ícone --- */
@keyframes fadeInStatic {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}