// Client-side 404 for routes that don't match. An SPA serves index.html
// for every non-API path (HTTP 200), so an unknown URL would otherwise
// render blank — or, worse, silently bounce home. This surfaces a clear
// "page not found" instead. Used by the top-level router and by the
// nested /admin, /p/:projectId, and /docs route groups so an invalid
// subpath (e.g. /admin/users/allowlist/graduation) lands here too.
import { Link } from 'react-router-dom'

export default function NotFound({ message }) {
  return (
    <div className="not-found" role="alert">
      <h1 className="not-found-code">404</h1>
      <p className="not-found-message">
        {message || "We couldn't find that page."}
      </p>
      <p className="not-found-actions">
        <Link to="/">Return to the catalog</Link>
      </p>
    </div>
  )
}
