import { Shield, Users, Calendar, MapPin, BarChart3, Clock } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";

export default function Landing() {
  return (
    <div className="min-h-screen bg-background">
      {/* Hero Section */}
      <div className="relative">
        <div className="absolute inset-0 bg-gradient-to-br from-primary/10 via-background to-background" />
        <div className="relative">
          <div className="container mx-auto px-4 py-16 md:py-24">
            <div className="max-w-4xl mx-auto text-center">
              <div className="flex justify-center mb-6">
                <Shield className="h-20 w-20 text-primary" />
              </div>
              <h1 className="text-4xl md:text-6xl font-semibold mb-6">
                VigilanzaTurni
              </h1>
              <p className="text-xl md:text-2xl text-muted-foreground mb-8">
                Sistema professionale di gestione turni per istituti di vigilanza
              </p>
              <p className="text-lg text-muted-foreground mb-8 max-w-2xl mx-auto">
                Pianificazione 24/7, gestione certificazioni, controllo presenze e reportistica completa per operazioni di sicurezza
              </p>
              <Button
                size="lg"
                className="text-lg px-8 py-6"
                onClick={() => window.location.href = "/api/login"}
                data-testid="button-login"
              >
                Accedi al Sistema
              </Button>
            </div>
          </div>
        </div>
      </div>

      {/* Features Section */}
      <div className="container mx-auto px-4 py-16">
        <h2 className="text-3xl font-semibold text-center mb-12">
          Funzionalità Principali
        </h2>
        <div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-6xl mx-auto">
          <Card className="hover-elevate">
            <CardHeader>
              <Calendar className="h-8 w-8 text-primary mb-2" />
              <CardTitle>Pianificazione Turni 24/7</CardTitle>
              <CardDescription>
                Calendario avanzato con vincoli automatici per riposi, orari massimi e alternanza notte/giorno
              </CardDescription>
            </CardHeader>
          </Card>

          <Card className="hover-elevate">
            <CardHeader>
              <Users className="h-8 w-8 text-primary mb-2" />
              <CardTitle>Gestione Guardie</CardTitle>
              <CardDescription>
                Anagrafica completa con skill matrix, certificazioni porto d'armi e scadenze automatiche
              </CardDescription>
            </CardHeader>
          </Card>

          <Card className="hover-elevate">
            <CardHeader>
              <MapPin className="h-8 w-8 text-primary mb-2" />
              <CardTitle>Controllo Siti</CardTitle>
              <CardDescription>
                Gestione presidi fissi, pattugliamenti, ronde e servizi di pronto intervento
              </CardDescription>
            </CardHeader>
          </Card>

          <Card className="hover-elevate">
            <CardHeader>
              <Clock className="h-8 w-8 text-primary mb-2" />
              <CardTitle>Timbrature</CardTitle>
              <CardDescription>
                Sistema di rilevazione presenze con geolocalizzazione e controllo accessi ai siti
              </CardDescription>
            </CardHeader>
          </Card>

          <Card className="hover-elevate">
            <CardHeader>
              <BarChart3 className="h-8 w-8 text-primary mb-2" />
              <CardTitle>Reportistica</CardTitle>
              <CardDescription>
                Dashboard operativa live con KPI, ore lavorate e copertura servizi per cliente
              </CardDescription>
            </CardHeader>
          </Card>

          <Card className="hover-elevate">
            <CardHeader>
              <Shield className="h-8 w-8 text-primary mb-2" />
              <CardTitle>Compliance</CardTitle>
              <CardDescription>
                Gestione permessi granulari, audit trail completo e conformità GDPR
              </CardDescription>
            </CardHeader>
          </Card>
        </div>
      </div>

      {/* Footer */}
      <div className="border-t mt-16">
        <div className="container mx-auto px-4 py-8">
          <p className="text-center text-sm text-muted-foreground">
            © 2025 VigilanzaTurni - Sistema Gestione Turni Professionale
          </p>
        </div>
      </div>
    </div>
  );
}
