<?php $__env->startSection('title', 'Dashboard Amil'); ?>
<?php $__env->startSection('topbar_title', 'Assalamu\'alaikum, Amil'); ?>

<?php $__env->startSection('content'); ?>

<div class="page-header" style="margin-bottom: 24px;">
    <div class="page-header-left">
        <h1 style="font-size: 24px;">Assalamu'alaikum, Amil</h1>
    </div>
</div>


<div style="display:grid; grid-template-columns: repeat(4, 1fr); gap:16px; margin-bottom:24px;">

    
    <div class="card" style="padding:20px; display:flex; flex-direction:column; justify-content:space-between;">
        <div style="display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:12px;">
            <div style="font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.5px;">Penerimaan Zakat<br>Hari Ini</div>
            <div style="background:#fff7ed; color:#ea580c; width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:16px;">
                <i class="bi bi-wallet2"></i>
            </div>
        </div>
        <div>
            <div style="font-size:26px; font-weight:800; color:var(--green-primary); margin-bottom:4px; line-height:1;">
                Rp <?php echo e(number_format($penerimaanHariIni, 0, ',', '.')); ?>

            </div>
            <div style="font-size:11.5px; color:var(--text-muted); font-weight:500;">
                <i class="bi bi-graph-up-arrow" style="color:var(--green-primary);"></i> Real-time hari ini
            </div>
        </div>
    </div>

    
    <div class="card" style="padding:20px; display:flex; flex-direction:column; justify-content:space-between;">
        <div style="display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:12px;">
            <div style="font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.5px;">Distribusi Bulan<br>Ini</div>
            <div style="background:#fff7ed; color:#ea580c; width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:16px;">
                <i class="bi bi-box-arrow-up-right"></i>
            </div>
        </div>
        <div>
            <div style="font-size:26px; font-weight:800; color:var(--text-dark); margin-bottom:4px; line-height:1;">
                Rp <?php echo e(number_format($distribusiBulanIni, 0, ',', '.')); ?>

            </div>
            <div style="font-size:11.5px; color:var(--text-muted); font-weight:500;">
                <?php echo e($programAktif); ?> program aktif berjalan
            </div>
        </div>
    </div>

    
    <div class="card" style="padding:20px; display:flex; flex-direction:column; justify-content:space-between; background:#fffdf5; border-color:#fef08a;">
        <div style="display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:12px;">
            <div style="font-size:11px; font-weight:700; color:#b45309; text-transform:uppercase; letter-spacing:0.5px;">Mustahik Menunggu<br>Verifikasi</div>
            <div style="background:#fef3c7; color:#d97706; width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:16px;">
                <i class="bi bi-clipboard-check"></i>
            </div>
        </div>
        <div>
            <div style="font-size:26px; font-weight:800; color:#b45309; margin-bottom:4px; line-height:1;">
                <?php echo e($mustahikPending); ?> <span style="font-size:14px; font-weight:600; color:#d97706;">pengajuan</span>
            </div>
            <a href="<?php echo e(url('/amil/verifikasi')); ?>" style="font-size:11.5px; color:#d97706; font-weight:600; text-decoration:none;">
                Tinjau sekarang <i class="bi bi-arrow-right"></i>
            </a>
        </div>
    </div>

    
    <div class="card" style="padding:20px; display:flex; flex-direction:column; justify-content:space-between;">
        <div style="display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:12px;">
            <div style="font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.5px;">Total Mustahik<br>Aktif</div>
            <div style="background:var(--green-light); color:var(--green-primary); width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:16px;">
                <i class="bi bi-people-fill"></i>
            </div>
        </div>
        <div>
            <div style="font-size:26px; font-weight:800; color:var(--text-dark); margin-bottom:4px; line-height:1;">
                <?php echo e($totalMustahik); ?> <span style="font-size:14px; font-weight:500; color:var(--text-muted);">Kepala Keluarga</span>
            </div>
            <div style="font-size:11.5px; color:var(--text-muted); font-weight:500;">
                Telah terverifikasi
            </div>
        </div>
    </div>

</div>


<div class="card">
    <div style="display:flex; align-items:center; justify-content:space-between; padding: 18px 20px 0;">
        <div style="display:flex; align-items:center; gap:8px;">
            <i class="bi bi-receipt" style="color:var(--green-primary); font-size:18px;"></i>
            <div style="font-size:16px; font-weight:700;">Penerimaan Terbaru</div>
        </div>
        <a href="<?php echo e(url('/amil/penerimaan')); ?>" style="font-size:12.5px; color:var(--green-primary); font-weight:600; text-decoration:none;">
            Lihat Semua
        </a>
    </div>
    <div style="margin-top:14px;">
        <table class="data-table">
            <thead>
                <tr>
                    <th>Penyetor</th>
                    <th>Jenis Zakat</th>
                    <th>Jumlah</th>
                    <th>Metode</th>
                    <th>Waktu</th>
                    <th>Status</th>
                </tr>
            </thead>
            <tbody>
                <?php $__empty_1 = true; $__currentLoopData = $penerimaanTerbaru; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr>
                    <td style="font-weight:600;"><?php echo e($p->nama_penyetor); ?></td>
                    <td style="font-size:13px;"><?php echo e(ucfirst($p->jenis_zakat === 'uang' ? 'Zakat Fitrah (Uang)' : 'Zakat Maal / Beras')); ?></td>
                    <td style="font-weight:600;">
                        <?php echo e($p->jenis_zakat === 'uang' ? 'Rp ' . number_format($p->total_bayar, 0, ',', '.') : $p->total_bayar . ' Kg'); ?>

                    </td>
                    <td style="font-size:13px; text-transform:capitalize;">
                        <i class="bi <?php echo e($p->metode_pembayaran === 'transfer' ? 'bi-bank' : ($p->metode_pembayaran === 'qris' ? 'bi-qr-code-scan' : 'bi-cash')); ?>" style="color:var(--text-muted); margin-right:4px;"></i>
                        <?php echo e($p->metode_pembayaran); ?>

                    </td>
                    <td style="font-size:12.5px; color:var(--text-muted);">
                        <?php echo e($p->created_at->diffForHumans()); ?>

                    </td>
                    <td>
                        <span class="badge-pill badge-green" style="font-size:11px;">Selesai</span>
                    </td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr>
                    <td colspan="6" style="text-align:center; padding:32px; color:var(--text-muted);">
                        <i class="bi bi-inbox" style="font-size:28px; display:block; margin-bottom:8px;"></i>
                        Belum ada penerimaan zakat terbaru.
                    </td>
                </tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.amil', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\Skripsi\zakat-masjid\resources\views/amil/dashboard.blade.php ENDPATH**/ ?>