function Skeleton({ className }: { className?: string }) {
  return (
    <div className={`animate-pulse bg-gray-100 rounded-lg ${className ?? ""}`} />
  );
}

export default function PlanDetailLoading() {
  return (
    <div className="max-w-[1400px] mx-auto py-10 space-y-12">

      {/* Header skeleton */}
      <div className="space-y-3">
        <Skeleton className="h-12 w-2/3 rounded-xl" />
        <Skeleton className="h-5 w-1/2" />
      </div>

      {/* Executive Summary Bento skeleton */}
      <section className="grid grid-cols-1 md:grid-cols-4 lg:grid-cols-6 gap-6">

        {/* SAP Improvement card */}
        <div className="md:col-span-2 lg:col-span-2 bg-white p-7 rounded-2xl border border-gray-100 shadow-sm flex flex-col gap-5">
          <Skeleton className="h-3 w-28" />
          <div className="flex items-end gap-3">
            <div className="flex flex-col items-center gap-1.5">
              <Skeleton className="h-3 w-12" />
              <Skeleton className="h-12 w-10 rounded-lg" />
            </div>
            <Skeleton className="h-5 w-5 mb-2 rounded" />
            <div className="flex flex-col items-center gap-1.5">
              <Skeleton className="h-3 w-12" />
              <Skeleton className="h-16 w-14 rounded-lg" />
            </div>
          </div>
          <div className="space-y-1.5">
            <Skeleton className="h-3 w-full rounded-full" />
            <Skeleton className="h-3 w-full" />
          </div>
          <Skeleton className="h-4 w-40" />
        </div>

        {/* 4 stat tiles */}
        <div className="md:col-span-2 lg:col-span-4 grid grid-cols-2 gap-4">
          {[0, 1, 2, 3].map((i) => (
            <div key={i} className="bg-blue-50 p-5 rounded-xl flex flex-col justify-between gap-3 border border-blue-100">
              <Skeleton className="h-8 w-8 rounded-lg" />
              <Skeleton className="h-8 w-24 rounded-lg" />
              <Skeleton className="h-3 w-32" />
            </div>
          ))}
        </div>
      </section>

      {/* Financial + Recommendations skeleton */}
      <div className="grid grid-cols-1 lg:grid-cols-12 gap-12 items-start">

        {/* Left: Financial Overview */}
        <div className="lg:col-span-4 space-y-6">
          <Skeleton className="h-3 w-40" />
          <div className="bg-brandblue/10 p-8 rounded-2xl space-y-6">
            <div className="space-y-2">
              <Skeleton className="h-3 w-28 bg-gray-200" />
              <Skeleton className="h-12 w-40 rounded-lg bg-gray-200" />
            </div>
            <div className="pt-6 border-t border-gray-200 flex justify-between">
              <div className="space-y-2">
                <Skeleton className="h-3 w-20 bg-gray-200" />
                <Skeleton className="h-6 w-24 rounded-lg bg-gray-200" />
              </div>
            </div>
          </div>
          <div className="bg-brandlightblue rounded-xl border border-blue-100 p-5 space-y-2">
            <Skeleton className="h-3 w-36" />
            <Skeleton className="h-3 w-full" />
            <Skeleton className="h-3 w-4/5" />
            <Skeleton className="h-3 w-3/5" />
          </div>
        </div>

        {/* Right: Recommendations */}
        <div className="lg:col-span-8 space-y-8">
          <Skeleton className="h-3 w-44" />
          {[0, 1, 2, 3].map((i) => (
            <div key={i} className="bg-white rounded-xl border border-gray-100 shadow-sm p-8 space-y-4">
              <div className="flex items-center gap-5">
                <Skeleton className="h-14 w-14 rounded-full" />
                <div className="flex-1 space-y-2">
                  <Skeleton className="h-5 w-48 rounded-lg" />
                  <Skeleton className="h-3 w-64" />
                </div>
                <div className="flex gap-2">
                  <Skeleton className="h-12 w-20 rounded-lg" />
                  <Skeleton className="h-12 w-20 rounded-lg" />
                </div>
              </div>
              <Skeleton className="h-12 w-full rounded-xl" />
            </div>
          ))}
        </div>
      </div>
    </div>
  );
}
