<div class="hub-period-chip">
    <i class="ri-calendar-line"></i>
    {{ \Carbon\Carbon::parse($date_from)->format('M j, Y') }}
    —
    {{ \Carbon\Carbon::parse($date_to)->format('M j, Y') }}
</div>
<div class="hub-table-wrap">
    <div class="table-responsive">
        <table class="table table-hover align-middle mb-0">
            <thead>
                <tr>
                    <th>Item</th>
                    <th class="text-end">Qty. IN</th>
                    <th class="text-end">Qty. OUT</th>
                    <th class="text-end">Pur. Qty.</th>
                    <th class="text-end">Pur. Amt.</th>
                    <th class="text-end">Sale Qty.</th>
                    <th class="text-end">Sale Amt.</th>
                    <th class="text-end">Closing Qty.</th>
                    <th class="text-end">Closing Amt.</th>
                </tr>
            </thead>
            <tbody>
                @forelse($rows as $row)
                    <tr>
                        <td>{{ $row['item'] }}</td>
                        <td class="text-end">{{ $row['qty_in'] }}</td>
                        <td class="text-end">{{ $row['qty_out'] }}</td>
                        <td class="text-end">{{ $row['pur_qty'] }}</td>
                        <td class="text-end hub-amount">₹ {{ number_format($row['pur_amt'], 2) }}</td>
                        <td class="text-end">{{ $row['sale_qty'] }}</td>
                        <td class="text-end hub-amount">₹ {{ number_format($row['sale_amt'], 2) }}</td>
                        <td class="text-end">{{ $row['closing_qty'] }}</td>
                        <td class="text-end hub-amount">₹ {{ number_format($row['closing_amt'], 2) }}</td>
                    </tr>
                @empty
                    <tr>
                        <td colspan="9" class="text-center text-muted py-4">No tracked inventory items found.</td>
                    </tr>
                @endforelse
            </tbody>
        </table>
    </div>
</div>
