<table class="data-table">
  <thead><tr>
    <th class="w-16">번호</th><th>봉투코드</th><th>봉투명</th><th>현재재고(낱장)</th><th>최종갱신</th>
  </tr></thead>
  <tbody>
  <?php if (! empty($list)): ?>
    <?php foreach ($list as $i => $row): ?>
    <tr>
      <td class="text-center"><?= $i + 1 ?></td>
      <td class="text-center"><?= esc($row->bi_bag_code ?? '') ?></td>
      <td><?= esc($row->bi_bag_name ?? '') ?></td>
      <td class="text-right"><?= number_format((int)($row->bi_qty_sheet ?? 0)) ?></td>
      <td class="text-center"><?= esc($row->bi_updated_at ?? $row->updated_at ?? '') ?></td>
    </tr>
    <?php endforeach; ?>
  <?php else: ?>
    <tr><td colspan="5" class="text-center text-gray-400 py-4">재고 데이터가 없습니다.</td></tr>
  <?php endif; ?>
  </tbody>
</table>
