{{--
========================================
DASHBOARD PRINCIPALE NETGESCON
========================================
LINUX-INDEX: File principale dashboard - NON CANCELLARE MAI
========================================
--}}

<x-layout.universal 
    pageTitle="Dashboard NetGesCon"
    showSearch="true"
    showNotifications="true"
    showUserMenu="true"
    showSidebar="true"
    showBreadcrumb="false"
>

{{-- Dashboard Content --}}
<div class="dashboard-content">
    
    {{-- Header Dashboard --}}
    <div class="d-flex justify-content-between align-items-center mb-4">
        <div>
            <h1 class="h3 mb-0">Dashboard</h1>
            <p class="text-muted mb-0">Panoramica generale del sistema</p>
        </div>
        <div class="d-flex gap-2">
            <button class="btn btn-primary">
                <i class="fas fa-plus me-2"></i>Nuovo
            </button>
            <button class="btn btn-outline-secondary">
                <i class="fas fa-sync me-2"></i>Aggiorna
            </button>
        </div>
    </div>

    {{-- Statistics Cards Row --}}
    <div class="row g-3 mb-4">
        <div class="col-xl-3 col-md-6">
            <div class="card stats-card border-0 shadow-sm">
                <div class="card-body">
                    <div class="d-flex align-items-center">
                        <div class="stat-icon bg-primary bg-gradient me-3">
                            <i class="fas fa-building"></i>
                        </div>
                        <div class="flex-grow-1">
                            <h6 class="text-muted mb-1">Stabili Gestiti</h6>
                            <h3 class="mb-0">24</h3>
                            <small class="text-success">
                                <i class="fas fa-arrow-up me-1"></i>+2 questo mese
                            </small>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-xl-3 col-md-6">
            <div class="card stats-card border-0 shadow-sm">
                <div class="card-body">
                    <div class="d-flex align-items-center">
                        <div class="stat-icon bg-success bg-gradient me-3">
                            <i class="fas fa-users"></i>
                        </div>
                        <div class="flex-grow-1">
                            <h6 class="text-muted mb-1">Condomini</h6>
                            <h3 class="mb-0">127</h3>
                            <small class="text-success">
                                <i class="fas fa-arrow-up me-1"></i>+5 questo mese
                            </small>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-xl-3 col-md-6">
            <div class="card stats-card border-0 shadow-sm">
                <div class="card-body">
                    <div class="d-flex align-items-center">
                        <div class="stat-icon bg-warning bg-gradient me-3">
                            <i class="fas fa-exclamation-triangle"></i>
                        </div>
                        <div class="flex-grow-1">
                            <h6 class="text-muted mb-1">Tickets Aperti</h6>
                            <h3 class="mb-0">7</h3>
                            <small class="text-warning">
                                <i class="fas fa-clock me-1"></i>3 urgenti
                            </small>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-xl-3 col-md-6">
            <div class="card stats-card border-0 shadow-sm">
                <div class="card-body">
                    <div class="d-flex align-items-center">
                        <div class="stat-icon bg-info bg-gradient me-3">
                            <i class="fas fa-calendar-check"></i>
                        </div>
                        <div class="flex-grow-1">
                            <h6 class="text-muted mb-1">Assemblee</h6>
                            <h3 class="mb-0">0</h3>
                            <small class="text-muted">
                                <i class="fas fa-calendar me-1"></i>Questo mese
                            </small>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    {{-- Main Content Row --}}
    <div class="row g-3">
        
        {{-- Azioni Rapide --}}
        <div class="col-lg-6">
            <div class="card border-0 shadow-sm h-100">
                <div class="card-header bg-transparent border-0 pb-0">
                    <h5 class="card-title mb-0">
                        <i class="fas fa-bolt text-primary me-2"></i>Azioni Rapide
                    </h5>
                </div>
                <div class="card-body">
                    <div class="row g-3">
                        <div class="col-md-6">
                            <div class="action-card text-center p-3 rounded border">
                                <div class="action-icon mb-2">
                                    <i class="fas fa-user-plus fa-2x text-primary"></i>
                                </div>
                                <h6 class="mb-1">Nuovo Condomino</h6>
                                <p class="text-muted small mb-2">Registra un nuovo condomino nel sistema</p>
                                <button class="btn btn-outline-primary btn-sm">
                                    <i class="fas fa-plus me-1"></i>Aggiungi
                                </button>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="action-card text-center p-3 rounded border">
                                <div class="action-icon mb-2">
                                    <i class="fas fa-calendar-alt fa-2x text-success"></i>
                                </div>
                                <h6 class="mb-1">Nuova Assemblea</h6>
                                <p class="text-muted small mb-2">Pianifica una nuova assemblea condominiale</p>
                                <button class="btn btn-outline-success btn-sm">
                                    <i class="fas fa-calendar-plus me-1"></i>Pianifica
                                </button>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="action-card text-center p-3 rounded border">
                                <div class="action-icon mb-2">
                                    <i class="fas fa-euro-sign fa-2x text-warning"></i>
                                </div>
                                <h6 class="mb-1">Gestione Rate</h6>
                                <p class="text-muted small mb-2">Configura e gestisci le rate condominiali</p>
                                <button class="btn btn-outline-warning btn-sm">
                                    <i class="fas fa-cog me-1"></i>Configura
                                </button>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="action-card text-center p-3 rounded border">
                                <div class="action-icon mb-2">
                                    <i class="fas fa-file-invoice fa-2x text-info"></i>
                                </div>
                                <h6 class="mb-1">Fatturazione</h6>
                                <p class="text-muted small mb-2">Gestisci fatture e documenti fiscali</p>
                                <button class="btn btn-outline-info btn-sm">
                                    <i class="fas fa-file-alt me-1"></i>Gestisci
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        {{-- Tickets e Attività --}}
        <div class="col-lg-6">
            <div class="card border-0 shadow-sm h-100">
                <div class="card-header bg-transparent border-0 pb-0">
                    <div class="d-flex justify-content-between align-items-center">
                        <h5 class="card-title mb-0">
                            <i class="fas fa-ticket-alt text-danger me-2"></i>Tickets Aperti
                        </h5>
                        <span class="badge bg-danger">7</span>
                    </div>
                </div>
                <div class="card-body">
                    <div class="list-group list-group-flush">
                        <div class="list-group-item d-flex justify-content-between align-items-start border-0 px-0">
                            <div class="me-auto">
                                <div class="d-flex align-items-center mb-1">
                                    <span class="badge bg-danger me-2">URGENTE</span>
                                    <small class="text-muted">Stabile Milano Centro</small>
                                </div>
                                <h6 class="mb-1">Perdita d'acqua al 3° piano</h6>
                                <p class="mb-1 small text-muted">Richieste in corso: 3</p>
                            </div>
                            <small class="text-muted">2h fa</small>
                        </div>
                        
                        <div class="list-group-item d-flex justify-content-between align-items-start border-0 px-0">
                            <div class="me-auto">
                                <div class="d-flex align-items-center mb-1">
                                    <span class="badge bg-warning me-2">MEDIA</span>
                                    <small class="text-muted">Stabile Roma Nord</small>
                                </div>
                                <h6 class="mb-1">Manutenzione ascensore</h6>
                                <p class="mb-1 small text-muted">In attesa tecnico</p>
                            </div>
                            <small class="text-muted">5h fa</small>
                        </div>
                        
                        <div class="list-group-item d-flex justify-content-between align-items-start border-0 px-0">
                            <div class="me-auto">
                                <div class="d-flex align-items-center mb-1">
                                    <span class="badge bg-info me-2">BASSA</span>
                                    <small class="text-muted">Stabile Torino Centro</small>
                                </div>
                                <h6 class="mb-1">Richiesta informazioni</h6>
                                <p class="mb-1 small text-muted">Documenti assemblea</p>
                            </div>
                            <small class="text-muted">1g fa</small>
                        </div>
                    </div>
                    
                    <div class="text-center mt-3">
                        <button class="btn btn-outline-primary btn-sm">
                            <i class="fas fa-eye me-1"></i>Vedi tutti i tickets
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</x-layout.universal>
