/* Auth Forms CSS - Stili per i form di autenticazione */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-logo {
    margin-bottom: 30px;
}

.auth-logo img {
    max-width: 150px;
    height: auto;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.error {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.auth-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-links {
    margin-top: 25px;
    text-align: center;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    margin: 0 10px;
}

.auth-links a:hover {
    text-decoration: underline;
}

.divider {
    margin: 25px 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

.social-login {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-button {
    flex: 1;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-button:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

/* Input field container con icone - SOLUZIONE AL PROBLEMA DI ALLINEAMENTO */
.input-field-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: white;
    color: #333;
}

.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    color: #333;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Icona sinistra */
.left-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #9ca3af;
    pointer-events: none;
}

/* Icona destra (per password visibility) */
.right-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #9ca3af;
    transition: color 0.2s ease;
}

/* Fix specifico per l'icona dell'occhio - centra perfettamente */
.right-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

/* Override delle classi Tailwind per l'icona */
.right-icon .h-5 {
    height: 20px !important;
}

.right-icon .w-5 {
    width: 20px !important;
}

.right-icon:hover {
    color: #6b7280;
}

.right-icon:focus {
    outline: none;
    color: #3b82f6;
}

/* Padding per input con icona sinistra */
.input-with-left-icon {
    padding-left: 44px !important;
}

/* Padding per input con icona destra */
.input-with-right-icon {
    padding-right: 44px !important;
}

/* Hover e focus states per input con icone */
.input-field-container:hover .input-field {
    border-color: #d1d5db;
    background: white;
    color: #333;
}

.input-field-container:focus-within .input-field {
    border-color: #3b82f6;
    background: white;
    color: #333;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .input-field {
        font-size: 16px; /* Previene zoom su iOS */
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: #1a1a1a;
        color: white;
    }
    
    .auth-title {
        color: white;
    }
    
    .form-label {
        color: #e0e0e0;
    }
    
    .form-input {
        background: #2a2a2a;
        border-color: #404040;
        color: white;
    }
    
    .form-input:focus {
        border-color: #667eea;
    }
    
    .input-field {
        background: #2a2a2a;
        border-color: #404040;
        color: white;
    }
    
    .input-field:focus {
        background: #2a2a2a;
        border-color: #3b82f6;
        color: white;
    }
    
    .left-icon,
    .right-icon {
        color: #9ca3af;
    }
    
    .right-icon:hover {
        color: #d1d5db;
    }
}

/* =====================================================
   DISABILITAZIONE SUGGERIMENTI PASSWORD
   ===================================================== */

/* Disabilita completamente i suggerimenti di password del browser */
input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

input[type="password"]::-webkit-contacts-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

input[type="password"]::-webkit-strong-password-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Disabilita l'icona di suggerimento password in Firefox */
input[type="password"]::-moz-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Disabilita l'icona di suggerimento password in Edge */
input[type="password"]::-ms-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Disabilita l'icona di suggerimento password generica */
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-strong-password-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

/* =====================================================
   FIX ICONA OCCHIO - CENTRAGGIO PERFETTO
   ===================================================== */

/* Icona destra (per password visibility) */
