import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { Eye, EyeOff, User, Lock, ArrowRight, Building2, CalendarClock, Users, FileCheck2, ShieldCheck } from 'lucide-react'; import { useToast, ToastContainer } from '../../components/UI/Toast'; const features = [ { icon: CalendarClock, label: 'Schedule batches across every branch from one calendar' }, { icon: Users, label: 'Track trainer availability, attendance, and performance' }, { icon: FileCheck2, label: 'Auto-generate GST-ready invoices and certificates' }, ]; const stats = [ { value: '500+', label: 'Batches managed' }, { value: '50+', label: 'Active trainers' }, { value: '12k+', label: 'Students trained' }, ]; const Login = () => { const navigate = useNavigate(); const toast = useToast(); const [showPassword, setShowPassword] = useState(false); const [isLoading, setIsLoading] = useState(false); const [formData, setFormData] = useState({ username: '', password: '', rememberMe: false, }); const handleInputChange = (field: string, value: any) => { setFormData((prev) => ({ ...prev, [field]: value })); }; const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); // Basic validation if (!formData.username || !formData.password) { toast.error('Please fill in all fields'); return; } setIsLoading(true); // Simulate API call setTimeout(() => { setIsLoading(false); // Store authentication token if (formData.rememberMe) { localStorage.setItem('authToken', 'demo-token-12345'); } else { sessionStorage.setItem('authToken', 'demo-token-12345'); } toast.success('Login successful!'); navigate('/dashboard'); // Redirect to dashboard or home }, 1500); }; return ( <>
{/* LEFT - Brand panel (hidden below lg) */}
{/* Decorative network pattern */} {/* Top: logo + copy */}
UpSkill365

Run your training business from a single screen.

Branches, batches, trainers, and billing — one ERP built specifically for training organizations.

    {features.map((f, i) => { const Icon = f.icon; return (
  • {f.label}
  • ); })}
{/* Bottom: stats */}
{stats.map((s, i) => (
{s.value}
{s.label}
))}
{/* RIGHT - Form panel */}
{/* Mobile-only logo (brand panel is hidden below lg) */}

UpSkill365

Welcome back

Sign in to your UpSkill365 account to continue

{/* Username Field */}
handleInputChange('username', e.target.value)} placeholder="Enter your username" className="w-full pl-9 pr-4 py-2 border border-gray-200 rounded-lg text-sm text-gray-700 bg-white focus:outline-none focus:border-primary focus:ring-4 focus:ring-primary/10 transition-all" disabled={isLoading} />
{/* Password Field */}
handleInputChange('password', e.target.value)} placeholder="Enter your password" className="w-full pl-9 pr-11 py-2 border border-gray-200 rounded-lg text-sm text-gray-700 bg-white focus:outline-none focus:border-primary focus:ring-4 focus:ring-primary/10 transition-all" disabled={isLoading} />
{/* Remember Me */} {/* Login Button */} {/* Terms */}

By signing in, you agree to our{' '} {' '} &{' '}

{/* Demo Credentials Note */}
Demo: admin / password123

© {new Date().getFullYear()} UpSkill365. All rights reserved.

); }; export default Login;