/* login_rappresentanti.css */
/* Stili unificati per Login e Recupero Credenziali */
/* ====================================================== */

/* --- Stili per il Form di Login --- */

.login-form {
    padding: 1.5rem 2rem 2rem;
}

.input-group {
    margin-bottom: 1.8rem;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.1rem;
    z-index: 1;
}

.login-form input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(45, 45, 45, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background: rgba(50, 50, 50, 0.9);
}

.btn-login {
    width: 100%;
    padding: 1.2rem;
    background-image: linear-gradient(to right, #007bff 0%, #0062cc 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.btn-login i {
    font-size: 1.2em;
}

/* Stile per il link 'Hai dimenticato le credenziali?' */
.forgot-password-container {
    text-align: right;  /* Allinea a destra */
    margin-top: 1rem;  /* Aggiunge spazio sopra */
    padding-right: 5px; /* Leggero padding per non toccare il bordo */
}

.forgot-password-container a {
    color: #007bff;
    font-size: 0.9rem;
    text-decoration: underline; /* Sottolineato SEMPRE */
    transition: color 0.2s ease-in-out; /* Aggiungiamo una transizione sul colore */
}

.forgot-password-container a:hover {
    color: #0056b3; /* Cambia colore al passaggio del mouse */
}

/* --- Stili per il Form di Recupero (NUOVI) --- */

#recupero-credenziali .form-group {
    margin-bottom: 1.5rem;
}

#recupero-credenziali .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #e0e0e0;
}

#recupero-credenziali .form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(45, 45, 45, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cccccc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
}

#recupero-credenziali .form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background-color: rgba(50, 50, 50, 0.9);
}

#recupero-credenziali .form-group select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#recupero-credenziali .btn-recovery {
    width: 100%;
    padding: 1.2rem;
    background-image: linear-gradient(to right, #007bff 0%, #0062cc 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

#recupero-credenziali .btn-recovery:disabled {
    background-image: none;
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

#recupero-credenziali .btn-recovery:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

#recupero-credenziali #message-area {
    margin-top: 1.5rem;
    text-align: center;
    padding: 1rem;
    border-radius: 5px;
    display: none;
    line-height: 1.5;
}

#recupero-credenziali .back-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}


/* --- Stili Condivisi (Alerts) --- */

.alert-message.error-message,
#recupero-credenziali .message-error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
    padding: 0.8rem;
    margin-top: 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: fadeIn 0.3s ease;
}

#recupero-credenziali .message-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
    padding: 1rem;
    border-radius: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-message i {
    font-size: 1.2em;
}


/* --- Responsive Design --- */

@media (max-width: 768px) {
    #rappresentanti .policy-container,
    #recupero-credenziali .policy-container {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .login-form,
    #recupero-credenziali .scrollable-content {
        padding: 1.5rem !important;
    }

    .login-form input {
        padding-left: 2.8rem;
        font-size: 0.95rem;
    }

    .input-icon {
        left: 0.8rem;
        font-size: 1rem;
    }

    .btn-login,
    #recupero-credenziali .btn-recovery {
        padding: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    #rappresentanti .policy-container,
    #recupero-credenziali .policy-container {
        margin: 0.5rem;
        border-radius: 6px;
    }

    .scrollable-content {
        padding: 1rem !important;
    }

    .login-form input {
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
    }
}