@extends('admin.layout')

@section('title', 'Report Management')

@section('body')
<div class="shell">
    @include('admin.partials.sidebar')
    <main class="main">
        <div class="topbar">
            <div><h1>Report Management</h1><div class="crumb">Income, booking, wallet, refund and operational reports</div></div>
            @include('admin.partials.logout')
        </div>
        <section class="grid">
            @foreach ($cards as $label => $value)
                <div class="stat"><span>{{ $label }}</span><strong>{{ is_numeric($value) ? number_format((float) $value, 2) : $value }}</strong></div>
            @endforeach
        </section>
        <section class="panel">
            <h2>Booking Report</h2>
            <table>
                <tr><th>Order</th><th>Type</th><th>Status</th><th>Payment</th><th>Amount</th><th>Date</th></tr>
                @foreach ($bookings as $row)
                    <tr><td>{{ $row->booking_number }}</td><td>{{ $row->booking_type }}</td><td>{{ $row->status }}</td><td>{{ $row->payment_status }}</td><td>{{ $row->payable_total }}</td><td>{{ $row->created_at }}</td></tr>
                @endforeach
            </table>
        </section>
    </main>
</div>
@endsection
