"use client";

import ArticlesList from "@/src/components/ArticlesList";
import MacchineTree from "@/src/components/MacchineTree";

export default function Home() {
  return (
    <div className="flex flex-col h-[calc(100vh-64px)] bg-black">
      <div className="flex-1 flex flex-col max-w-7xl mx-auto w-full px-4 py-6 overflow-hidden">
        {/* Header */}
        <div className="mb-6 flex-shrink-0">
          <h1 className="text-2xl font-bold text-white">MagRicambi</h1>
          <p className="text-sm text-zinc-500">Gestione magazzino ricambi - Trascina articoli sulle macchine per assegnarli</p>
        </div>

        {/* Contenuto principale: split 50/50 */}
        <div className="flex-1 grid grid-cols-2 gap-6 min-h-0">
          {/* Colonna sinistra: Articoli */}
          <div className="flex flex-col min-h-0 p-4 rounded-xl bg-zinc-900/50 border border-zinc-800 overflow-visible">
            <ArticlesList />
          </div>

          {/* Colonna destra: Macchine */}
          <div className="flex flex-col min-h-0 p-4 rounded-xl bg-zinc-900/50 border border-zinc-800 overflow-visible">
            <MacchineTree />
          </div>
        </div>
      </div>
    </div>
  );
}
