import React, { useState } from 'react'; import { useAuth } from '../context/AuthContext'; import { User, Lock, ArrowRight } from 'lucide-react'; export default function Login() { const [email, setEmail] = useState('patricia_admin@gmail.com'); const [password, setPassword] = useState('patricia2026@mtz'); const [error, setError] = useState(''); const [loading, setLoading] = useState(false); const { login } = useAuth(); const handleSubmit = (e) => { e.preventDefault(); setError(''); setLoading(true); setTimeout(() => { const res = login(email.trim(), password); if (!res.success) { setError(res.message); setLoading(false); } }, 400); }; return (
{/* Title matching exact screenshot */}

Mi Empresa

ACCESO AL SISTEMA

{error && (
{error}
)}
setEmail(e.target.value)} placeholder="Escribe tu usuario..." style={{ width: '100%', padding: '0.75rem 1rem 0.75rem 2.8rem', borderRadius: '25px', // Exact pill shape inputs from screenshot border: '1px solid #e2e8f0', outline: 'none', fontSize: '0.9rem', color: '#4a5568', backgroundColor: '#ffffff' }} />
setPassword(e.target.value)} placeholder="••••••••" style={{ width: '100%', padding: '0.75rem 1rem 0.75rem 2.8rem', borderRadius: '25px', // Exact pill shape inputs from screenshot border: '1px solid #e2e8f0', outline: 'none', fontSize: '0.9rem', color: '#4a5568', backgroundColor: '#ffffff' }} />
© 2026 - Mi Empresa
); }