:root {
    --primary: #0f172a; /* Blu notte moderno */
    --accent: #3b82f6;  /* Blu brillante per testo interattivo */
    --bg: #f1f5f9;
    --text: #334155;
    --white: #ffffff;
    
    /* Nuovi Colori Pulsanti */
    --btn-login: #16a34a; /* Verde */
    --btn-login-hover: #15803d;
    --btn-login-shadow: rgba(22, 163, 74, 0.3);
    
    --btn-register: #f97316; /* Arancione */
    --btn-register-hover: #ea580c;
    --btn-register-shadow: rgba(249, 115, 22, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg);
    font-family: 'Inter', sans-serif;
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.main-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 45px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.5);
    transition: all 0.3s ease;
}

.brand-section { text-align: center; margin-bottom: 35px; }

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo span { color: var(--accent); }

.subtitle { color: #64748b; font-size: 0.9rem; margin-top: 5px; }

.input-field { margin-bottom: 20px; }

.input-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-field input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.input-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Stili per l'icona della password (Spostati dal PHP) */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px; /* Lascia spazio a destra per l'icona */
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #475569;
}

.toggle-password svg {
    display: block;
}

/* Pulsante Login (Verde) */
.btn-primary {
    width: 100%;
    background-color: var(--btn-login);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    background-color: var(--btn-login-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px var(--btn-login-shadow);
}

/* Pulsante Registrazione (Arancione) */
.btn-secondary {
    display: block;
    width: 100%;
    background-color: var(--btn-register);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
    text-decoration: none;
    text-align: center;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.btn-secondary:hover {
    background-color: var(--btn-register-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px var(--btn-register-shadow);
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #fee2e2;
    font-weight: 600;
}

.footer-links { text-align: center; margin-top: 30px; }

.footer-links hr { border: 0; border-top: 1px solid #e2e8f0; margin: 20px 0; }

.forgot-pwd {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    transition: color 0.2s ease;
}

.forgot-pwd:hover {
    color: var(--primary);
}

.footer-links p { 
    font-size: 0.85rem; 
    color: #64748b; 
    margin-bottom: 5px;
    font-weight: 500;
}

/* ==========================================================================
   RESPONSIVE (Tablet e Smartphone)
   ========================================================================== */
@media screen and (max-width: 480px) {
    .main-wrapper {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 14px;
        font-size: 0.95rem;
    }
    
    .input-field input {
        padding: 12px 14px;
    }
}