Real-time explainable IoT security with machine learning and CTGAN-enhanced detection for resource-constrained devices