<?php $__env->startSection('content'); ?>
    <div class="d-flex justify-content-between align-items-center mb-4">
        <div>
            <h1 class="h3 mb-1">Reports</h1>
            <p class="text-muted mb-0">Operational and revenue analytics for the card-printing platform.</p>
        </div>
        <a href="<?php echo e(route('admin.dashboard')); ?>" class="btn btn-outline-secondary">Back to Dashboard</a>
    </div>

    <div class="row g-4 mb-4">
        <div class="col-md-3"><div class="card card-soft h-100"><div class="card-body"><div class="text-muted small">Orders</div><div class="metric-number"><?php echo e($summary['orders']); ?></div></div></div></div>
        <div class="col-md-3"><div class="card card-soft h-100"><div class="card-body"><div class="text-muted small">Customers</div><div class="metric-number"><?php echo e($summary['customers']); ?></div></div></div></div>
        <div class="col-md-3"><div class="card card-soft h-100"><div class="card-body"><div class="text-muted small">Paid Revenue</div><div class="metric-number">Rs <?php echo e(number_format($summary['paid_revenue'], 2)); ?></div></div></div></div>
        <div class="col-md-3"><div class="card card-soft h-100"><div class="card-body"><div class="text-muted small">Avg Order Value</div><div class="metric-number">Rs <?php echo e(number_format($summary['avg_order_value'], 2)); ?></div></div></div></div>
    </div>

    <div class="row g-4">
        <div class="col-lg-6">
            <div class="card card-soft">
                <div class="card-body">
                    <h2 class="h5 mb-3">Order Status Breakdown</h2>
                    <?php $__currentLoopData = $statusCounts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status => $count): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="d-flex justify-content-between py-2 border-bottom">
                            <span><?php echo e(ucfirst($status)); ?></span>
                            <strong><?php echo e($count); ?></strong>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </div>
        <div class="col-lg-6">
            <div class="card card-soft">
                <div class="card-body">
                    <h2 class="h5 mb-3">Payment Status Breakdown</h2>
                    <?php $__currentLoopData = $paymentCounts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status => $count): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="d-flex justify-content-between py-2 border-bottom">
                            <span><?php echo e(ucfirst($status)); ?></span>
                            <strong><?php echo e($count); ?></strong>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </div>
    </div>

    <div class="card card-soft mt-4">
        <div class="card-body">
            <h2 class="h5 mb-3">Recent Notifications</h2>
            <div class="table-responsive">
                <table class="table align-middle">
                    <thead>
                        <tr>
                            <th>Channel</th>
                            <th>Recipient</th>
                            <th>Subject</th>
                            <th>Sent At</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $recentNotifications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $notification): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($notification->channel); ?></td>
                                <td><?php echo e($notification->recipient); ?></td>
                                <td><?php echo e($notification->subject); ?></td>
                                <td><?php echo e($notification->sent_at?->format('d M Y h:i A')); ?></td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', ['title' => 'Admin Reports | Print Cards'], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\dell\Documents\codex projects\Print Card 2\resources\views/admin/reports/index.blade.php ENDPATH**/ ?>