/* Sfondo animato come la dashboard */
body {
    background: linear-gradient(45deg, #fff, #ffb6c1, #f0e68c, #7fffd4, #1e90ff);
    background-size: 600% 600%;
    animation: gradient 10s ease infinite;
    font-family: 'Inter', sans-serif;
    height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particles.js full background */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Contenitore login */
.login-container {
    background-color: #FFFFFF;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
    max-width: 400px;
    width: 100%;
    z-index: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Logo */
.logo-img {
    display: block;
    margin: 0 auto 2rem;
    max-width: 280px;
}

/* Etichette e input */
form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

form input[type="text"],
form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    padding-right: 40px; /* Spazio per l'occhio */
}

/* Checkbox */
form label input[type="checkbox"] {
    margin-right: 8px;
}

/* Bottone login */
button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #1e90ff;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #0073e6;
}

/* Wrapper per la password e toggle visibilità */
.input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1rem;
    color: #888;
    padding: 4px;
    z-index: 2;
}

/* Messaggi */
.success-message,
.error-message {
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: center;
}

.success-message {
    background-color: #e0f7e9;
    color: #2e7d32;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }

    .toggle-password {
        right: 8px;
    }
}
