<?= $this->extend('layout/admin') ?>

<?= $this->section('content') ?>
<div class="d-flex justify-content-between align-items-center mb-4">
    <div>
        <h3 class="fw-bold text-dark mb-0">Dashboard Statistik</h3>
        <p class="text-muted mb-0">Ringkasan data laporan masuk</p>
    </div>
</div>

<div class="row g-4">
    <!-- Card Total -->
    <div class="col-md-3">
        <div class="card border-0 shadow-sm rounded-4 h-100 p-2">
            <div class="card-body d-flex justify-content-between align-items-center">
                <div>
                    <h6 class="text-muted fw-semibold mb-2">Total Laporan</h6>
                    <h2 class="fw-bold text-dark mb-0"><?= $total ?></h2>
                </div>
                <div class="bg-primary bg-opacity-10 text-primary rounded-circle d-flex align-items-center justify-content-center" style="width: 55px; height: 55px;">
                    <i class="bi bi-folder2-open fs-3"></i>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Card Baru -->
    <div class="col-md-3">
        <div class="card border-0 shadow-sm rounded-4 h-100 p-2">
            <div class="card-body d-flex justify-content-between align-items-center">
                <div>
                    <h6 class="text-muted fw-semibold mb-2">Laporan Baru</h6>
                    <h2 class="fw-bold text-dark mb-0"><?= $baru ?></h2>
                </div>
                <div class="bg-danger bg-opacity-10 text-danger rounded-circle d-flex align-items-center justify-content-center" style="width: 55px; height: 55px;">
                    <i class="bi bi-envelope-paper fs-3"></i>
                </div>
            </div>
        </div>
    </div>

    <!-- Card Tindak Lanjut -->
    <div class="col-md-3">
        <div class="card border-0 shadow-sm rounded-4 h-100 p-2">
            <div class="card-body d-flex justify-content-between align-items-center">
                <div>
                    <h6 class="text-muted fw-semibold mb-2">Ditindaklanjuti</h6>
                    <h2 class="fw-bold text-dark mb-0"><?= $ditindaklanjuti ?></h2>
                </div>
                <div class="bg-warning bg-opacity-10 text-warning rounded-circle d-flex align-items-center justify-content-center" style="width: 55px; height: 55px;">
                    <i class="bi bi-gear-wide-connected fs-3"></i>
                </div>
            </div>
        </div>
    </div>

    <!-- Card Tuntas -->
    <div class="col-md-3">
        <div class="card border-0 shadow-sm rounded-4 h-100 p-2">
            <div class="card-body d-flex justify-content-between align-items-center">
                <div>
                    <h6 class="text-muted fw-semibold mb-2">Laporan Tuntas</h6>
                    <h2 class="fw-bold text-dark mb-0"><?= $tuntas ?></h2>
                </div>
                <div class="bg-success bg-opacity-10 text-success rounded-circle d-flex align-items-center justify-content-center" style="width: 55px; height: 55px;">
                    <i class="bi bi-check2-circle fs-3"></i>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="row mt-4">
    <div class="col-md-12">
        <div class="card border-0 shadow-sm rounded-4">
            <div class="card-body p-5">
                <div class="d-flex align-items-center">
                    <div class="me-4 d-none d-md-block">
                        <img src="https://cdn-icons-png.flaticon.com/512/3135/3135715.png" alt="Admin" width="80" class="opacity-75">
                    </div>
                    <div>
                        <h4 class="fw-bold text-dark mb-2">Selamat Datang di Panel Admin!</h4>
                        <p class="text-muted mb-3 fs-6">
                            Gunakan menu di sebelah kiri untuk mengelola data pengaduan masyarakat. 
                            Saat ini terdapat <strong class="text-danger fw-bold"><?= $baru ?> laporan baru</strong> yang belum diperiksa dan menunggu untuk ditindaklanjuti.
                        </p>
                        <span class="badge bg-secondary bg-opacity-10 text-secondary border border-secondary border-opacity-25 px-3 py-2 rounded-pill">
                            <i class="bi bi-hourglass-split me-1"></i> Ditunda: <?= $ditunda ?>
                        </span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?= $this->endSection() ?>