import { Suspense } from "react";
import { Anchor } from "lucide-react";
import { LoginForm } from "./login-form";
import type { Metadata } from "next";

export const metadata: Metadata = { title: "Sign in" };

export default function LoginPage() {
  return (
    <div className="min-h-screen bg-neutral-50 flex items-center justify-center p-4">
      <div className="w-full max-w-sm">
        <div className="bg-white rounded-xl shadow-sm border border-neutral-200 p-8">
          <div className="flex items-center gap-3 mb-8">
            <div className="flex h-10 w-10 items-center justify-center rounded-lg bg-primary-600">
              <Anchor className="h-5 w-5 text-white" />
            </div>
            <div>
              <h1 className="text-lg font-semibold text-neutral-900">PPMS</h1>
              <p className="text-xs text-neutral-500">Pelagia Payment Management System</p>
            </div>
          </div>

          <h2 className="text-xl font-semibold text-neutral-900 mb-6">Sign in</h2>

          <Suspense>
            <LoginForm />
          </Suspense>
        </div>

        <p className="mt-4 text-center text-xs text-neutral-400">
          Contact your administrator if you need access.
        </p>
      </div>
    </div>
  );
}
