<section class="border-b border-gray-300 p-2 shrink-0 bg-control-panel">
  <span class="text-sm font-bold text-gray-700">재고 현황</span>
</section>
<div class="border border-gray-300 overflow-auto mt-2">
  <table class="w-full data-table">
    <thead>
      <tr>
        <th class="w-16">번호</th>
        <th>봉투코드</th>
        <th>봉투명</th>
        <th>현재재고(낱장)</th>
        <th>최종갱신</th>
      </tr>
    </thead>
    <tbody class="text-right">
      <?php foreach ($list as $row): ?>
      <tr>
        <td class="text-center"><?= esc($row->bi_idx) ?></td>
        <td class="text-center font-mono"><?= esc($row->bi_bag_code) ?></td>
        <td class="text-left pl-2"><?= esc($row->bi_bag_name) ?></td>
        <td class="font-bold"><?= number_format((int) $row->bi_qty) ?></td>
        <td class="text-center"><?= esc($row->bi_updated_at) ?></td>
      </tr>
      <?php endforeach; ?>
      <?php if (empty($list)): ?>
      <tr><td colspan="5" class="text-center text-gray-400 py-4">등록된 재고가 없습니다.</td></tr>
      <?php endif; ?>
    </tbody>
  </table>
</div>
