/* Modern Login Form Styles */

/* Alert Moderno */
.modern-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 2px solid #fca5a5;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    animation: slideInDown 0.4s ease-out;
}

.modern-login-alert .alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.modern-login-alert .alert-content {
    flex: 1;
    color: #991b1b;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.modern-login-alert .alert-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
}

.modern-login-alert .alert-close:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Form Group Moderno */
.modern-form-group {
    margin-bottom: 24px;
}

.modern-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
}

.modern-form-label i {
    color: #8D3FF2;
    font-size: 16px;
}

/* Input Wrapper con Icona */
.modern-input-wrapper {
    position: relative;
}

.modern-login-input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    color: #1f2937;
    transition: all 0.3s ease;
    background: #ffffff;
}

.modern-login-input:focus {
    outline: none;
    border-color: #8D3FF2;
    box-shadow: 0 0 0 4px rgba(141, 63, 242, 0.1);
}

.modern-login-input::placeholder {
    color: #9ca3af;
}

/* Icona Validazione */
.input-validation-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #10b981;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modern-login-input:valid + .input-validation-icon {
    opacity: 1;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    background: rgba(141, 63, 242, 0.1);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: #6b7280;
    transition: fill 0.3s ease;
}

.password-toggle:hover svg {
    fill: #8D3FF2;
}

.password-toggle.active svg {
    fill: #8D3FF2;
}

/* Error Message */
.modern-error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 14px;
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
}

.modern-error-message i {
    font-size: 14px;
    flex-shrink: 0;
}

/* Remember & Forgot Section */
.modern-remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Modern Checkbox */
.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.modern-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    position: relative;
    background: #ffffff;
}

.modern-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #8D3FF2 0%, #7C3AED 100%);
    border-color: #8D3FF2;
}

.modern-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.modern-checkbox label {
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    margin: 0;
}

/* Forgot Password Link */
.modern-forgot-link {
    font-size: 14px;
    font-weight: 600;
    color: #8D3FF2;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.modern-forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #8D3FF2;
    transition: width 0.3s ease;
}

.modern-forgot-link:hover {
    color: #7C3AED;
}

.modern-forgot-link:hover::after {
    width: 100%;
}

/* Submit Button */
.modern-login-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #8D3FF2 0%, #7C3AED 100%);
    border: 2px solid #7C3AED;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(141, 63, 242, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.modern-login-btn:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    border-color: #6D28D9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(141, 63, 242, 0.4);
    color: #ffffff;
}

.modern-login-btn:active {
    transform: translateY(0);
}

.modern-login-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.modern-login-btn:hover svg {
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 576px) {
    .modern-remember-forgot {
        flex-direction: column;
        align-items: flex-start;
    }

    .modern-login-input {
        padding: 12px 45px 12px 16px;
        font-size: 14px;
    }

    .modern-login-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modern-form-group {
    animation: fadeIn 0.4s ease-out backwards;
}

.modern-form-group:nth-child(1) { animation-delay: 0.1s; }
.modern-form-group:nth-child(2) { animation-delay: 0.2s; }
.modern-form-group:nth-child(3) { animation-delay: 0.3s; }
