<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Inventory Report</title>
    <style>
        body { font-family: DejaVu Sans, sans-serif; font-size: 12px; }
        h1 { color: #1a936f; text-align: center; }
        table { width: 100%; border-collapse: collapse; margin-top: 20px; }
        th, td { border: 1px solid #ccc; padding: 6px 8px; text-align: left; }
        th { background: #e9ecef; color: #114b5f; }
        tr:nth-child(even) { background: #f8f9fa; }
    </style>
</head>
<body>
    <h1>Inventory Report</h1>
    <table>
        <thead>
            <tr>
                <th>Item Name</th>
                <th>Category</th>
                <th>Current Stock</th>
                <th>Min Stock</th>
                <th>Unit Price (UGX)</th>
                <th>Total Value (UGX)</th>
                <th>Status</th>
                <th>Supplier</th>
            </tr>
        </thead>
        <tbody>
        @foreach($items as $item)
            <tr>
                <td>{{ $item->name }}</td>
                <td>{{ $item->category }}</td>
                <td>{{ $item->quantity }}</td>
                <td>{{ $item->min_stock }}</td>
                <td>{{ number_format($item->unit_price, 0) }}</td>
                <td>{{ number_format($item->quantity * $item->unit_price, 0) }}</td>
                <td>
                    @if($item->quantity > $item->min_stock)
                        In Stock
                    @elseif($item->quantity == 0)
                        Out of Stock
                    @else
                        Low Stock
                    @endif
                </td>
                <td>{{ $item->supplier }}</td>
            </tr>
        @endforeach
        </tbody>
    </table>
</body>
</html>
