{{-- Vista lista tickets per caricamento AJAX --}}
<div class="card">
    <div class="card-header d-flex justify-content-between align-items-center">
        <h5 class="mb-0">
            <i class="fas fa-ticket-simple me-2"></i>Gestione Tickets
        </h5>
        <button class="btn btn-primary btn-sm" onclick="showCreateTicketForm()">
            <i class="fas fa-plus me-2"></i>Nuovo Ticket
        </button>
    </div>
    <div class="card-body">
        <div class="alert alert-warning">
            <i class="fas fa-exclamation-triangle me-2"></i>
            <strong>3 Tickets Urgenti!</strong> Richiede attenzione immediata.
        </div>
        
        <div class="row mb-3">
            <div class="col-md-3">
                <div class="card bg-danger text-white">
                    <div class="card-body text-center">
                        <h3>1</h3>
                        <small>Urgenti</small>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="card bg-warning text-white">
                    <div class="card-body text-center">
                        <h3>2</h3>
                        <small>In Corso</small>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="card bg-info text-white">
                    <div class="card-body text-center">
                        <h3>5</h3>
                        <small>In Attesa</small>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="card bg-success text-white">
                    <div class="card-body text-center">
                        <h3>12</h3>
                        <small>Risolti</small>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="table-responsive">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>Titolo</th>
                        <th>Stabile</th>
                        <th>Stato</th>
                        <th>Priorità</th>
                        <th>Data</th>
                        <th>Azioni</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td><span class="badge bg-primary">#001</span></td>
                        <td>
                            <strong>Perdita acqua ascensore</strong>
                            <br><small class="text-muted">Segnalazione infiltrazione piano terra</small>
                        </td>
                        <td>Condominio Via Roma 123</td>
                        <td><span class="badge bg-danger">Urgente</span></td>
                        <td><span class="badge bg-danger">Alta</span></td>
                        <td>16/07/2025</td>
                        <td>
                            <div class="btn-group btn-group-sm">
                                <button class="btn btn-outline-primary" title="Visualizza">
                                    <i class="fas fa-eye"></i>
                                </button>
                                <button class="btn btn-outline-warning" title="Modifica">
                                    <i class="fas fa-edit"></i>
                                </button>
                                <button class="btn btn-outline-success" title="Chiudi">
                                    <i class="fas fa-check"></i>
                                </button>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td><span class="badge bg-primary">#002</span></td>
                        <td>
                            <strong>Riparazione citofono</strong>
                            <br><small class="text-muted">Citofono appartamento 5A non funzionante</small>
                        </td>
                        <td>Condominio Via Roma 123</td>
                        <td><span class="badge bg-warning">In Corso</span></td>
                        <td><span class="badge bg-warning">Media</span></td>
                        <td>15/07/2025</td>
                        <td>
                            <div class="btn-group btn-group-sm">
                                <button class="btn btn-outline-primary" title="Visualizza">
                                    <i class="fas fa-eye"></i>
                                </button>
                                <button class="btn btn-outline-warning" title="Modifica">
                                    <i class="fas fa-edit"></i>
                                </button>
                                <button class="btn btn-outline-success" title="Chiudi">
                                    <i class="fas fa-check"></i>
                                </button>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td><span class="badge bg-primary">#003</span></td>
                        <td>
                            <strong>Pulizia scale condominiali</strong>
                            <br><small class="text-muted">Richiesta pulizia straordinaria</small>
                        </td>
                        <td>Condominio Via Roma 123</td>
                        <td><span class="badge bg-info">In Attesa</span></td>
                        <td><span class="badge bg-info">Bassa</span></td>
                        <td>14/07/2025</td>
                        <td>
                            <div class="btn-group btn-group-sm">
                                <button class="btn btn-outline-primary" title="Visualizza">
                                    <i class="fas fa-eye"></i>
                                </button>
                                <button class="btn btn-outline-warning" title="Modifica">
                                    <i class="fas fa-edit"></i>
                                </button>
                                <button class="btn btn-outline-success" title="Chiudi">
                                    <i class="fas fa-check"></i>
                                </button>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>

{{-- Script per funzioni placeholder --}}
<script>
window.showCreateTicketForm = function() {
    alert('Form creazione ticket in sviluppo');
};
</script>
