/* ============================================ LOGIN — Centered card, two inputs, primary + SSO ============================================ */ function LoginScreen({ onLogin }) { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const [loading, setLoading] = useState(false); const [showPw, setShowPw] = useState(false); const [error, setError] = useState(null); const submit = async (e) => { e?.preventDefault(); setError(null); if (!/.+@.+\..+/.test(email.trim())) { setError("Enter a valid email."); return; } if (!password) { setError("Password is required."); return; } setLoading(true); try { const { token, user } = await window.API.login(email.trim(), password); window.API.setToken(token); onLogin(user); } catch (err) { setError(err.message || "Login failed."); } finally { setLoading(false); } }; return (
{/* LEFT: Decorative industrial panel */}
{/* technical grid bg */}
ORS
BHUMI JATI POWER
Operation Reference System

Ground-truth answers,
direct from your shop floor manuals.

Retrieval-augmented assistance over 4,128 indexed manuals across CNC, hydraulic, electrical, and safety domains. Every answer is citation-grounded and auditable.

{[ { k: "4,128", v: "Indexed documents" }, { k: "62 ms", v: "Median retrieval" }, { k: "99.94%", v: "Service availability" }]. map((s) =>
{s.k}
{s.v}
)}
© 2026 Bhumi Jati Power · build 2026.05.13
{/* RIGHT: Login card */}

Welcome back

Use your BJP corporate credentials to access the operation reference system.

{error && (
{error}
)}
setEmail(e.target.value)} placeholder="firstname.lastname@bjp-industries.id" style={{ paddingLeft: 36 }} />
setPassword(e.target.value)} placeholder="Enter password" style={{ paddingLeft: 36, paddingRight: 60 }} />
OR
Need access? Contact your plant administrator. Systems healthy
); } window.LoginScreen = LoginScreen;