<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>
<div class="page-header"><div><h1><i class="bi bi-qr-code me-2"></i>QR Code — <?= esc($asset['asset_code']) ?></h1></div><a href="<?= base_url('asset-register/view/'.$asset['id']) ?>" class="btn btn-fm-outline btn-sm">← Back</a></div>
<div class="row justify-content-center"><div class="col-md-4 text-center">
<div class="fm-card"><div class="fm-card-body">
  <img src="<?= $qrUrl ?>" alt="QR Code" class="img-fluid mb-3" style="max-width:200px">
  <div class="fw-bold"><?= esc($asset['asset_code']) ?></div>
  <div class="small text-muted"><?= esc($asset['name']) ?></div>
  <a href="<?= $qrUrl ?>" download="<?= $asset['asset_code'] ?>-qr.png" class="btn btn-fm-primary btn-sm mt-3"><i class="bi bi-download me-1"></i>Download QR</a>
  <a href="javascript:window.print()" class="btn btn-fm-outline btn-sm mt-3"><i class="bi bi-printer me-1"></i>Print</a>
</div></div>
</div></div>
<?= $this->endSection() ?>
