/* Root variables for easy theming */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Floating particles background */
.particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; overflow: hidden; }
.particle { position: absolute; background-color: rgba(255, 255, 255, 0.5); border-radius: 50%; pointer-events: none; }

/* Login container */
.login-container {
    position: relative; z-index: 2; width: 400px; background-color: white; border-radius: 20px;
    box-shadow: var(--shadow); overflow: hidden; transform: scale(0.95); opacity: 0;
    animation: fadeIn 0.5s 0.2s forwards;
    padding-bottom: 3rem; /* Espaço para o novo rodapé */
}

@keyframes fadeIn { to { transform: scale(1); opacity: 1; } }

/* Header section */
.header { background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); color: white; padding: 2rem; text-align: center; position: relative; }
.header h1 { font-weight: 600; margin-bottom: 0.5rem; font-size: 1.8rem; }
.header p { opacity: 0.9; font-size: 0.9rem; }

.logo {
    width: 80px; height: 80px; background-color: white; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    margin: 0 auto 1rem; color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); padding: 5px;
}
.logo img { max-width: 100%; height: auto; border-radius: 50%; }

/* Form section */
.form-container { padding: 2rem; }
.input-group { margin-bottom: 1.5rem; position: relative; }
.input-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--dark-color); font-size: 0.9rem; }
.input-group input { width: 100%; padding: 0.8rem 1rem 0.8rem 2.5rem; border: 2px solid #e9ecef; border-radius: 8px; outline: none; transition: var(--transition); font-size: 0.95rem; }
.input-group input:focus { border-color: var(--primary-color); }
.input-group i { position: absolute; left: 1rem; top: 2.4rem; color: #adb5bd; transition: var(--transition); }
.input-group input:focus + i { color: var(--primary-color); }

/* Password visibility toggle */
.password-toggle { position: absolute; right: 1rem; top: 2.4rem; color: #adb5bd; cursor: pointer; transition: var(--transition); }
.password-toggle:hover { color: var(--dark-color); }

/* Remember me & forgot password */
.options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; font-size: 0.9rem; }
.remember-me { display: flex; align-items: center; }
.remember-me input { margin-right: 0.5rem; accent-color: var(--primary-color); }
.forgot-password a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
.forgot-password a:hover { color: var(--secondary-color); text-decoration: underline; }

/* Submit button */
.submit-btn { width: 100%; padding: 0.8rem; background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: var(--transition); margin-bottom: 1.5rem; display: flex; justify-content: center; align-items: center; }
.submit-btn:hover { background: linear-gradient(to right, var(--secondary-color), var(--primary-color)); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3); }
.submit-btn i { margin-left: 0.5rem; }

/* Footer */
.footer { text-align: center; padding: 1rem 2rem 0; font-size: 0.85rem; color: #6c757d; }
.footer a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
.footer a:hover { text-decoration: underline; }

/* --- CÓDIGO NOVO ADICIONADO --- */
.dev-credit {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #999;
    background-color: #f8f9fa;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}
/* --- FIM DO CÓDIGO NOVO --- */

/* Mensagem de erro para validação do JavaScript */
.error-message { color: #dc3545; font-size: 0.8rem; margin-top: 0.3rem; display: none; }

/* Design Responsivo */
@media (max-width: 480px) { .login-container { width: 90%; } .header { padding: 1.5rem; } .form-container { padding: 1.5rem; } }

/* Ripple Effect */
.ripple { position: absolute; background: rgba(255, 255, 255, 0.4); border-radius: 50%; transform: scale(0); pointer-events: none; animation: ripple 0.6s linear; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* Flask flash messages */
.alert { padding: 1rem; margin-bottom: 1rem; border-radius: 8px; text-align: center; font-size: 0.9rem; }
.alert-danger { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
