<!doctype html><html lang="ar" dir="rtl"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>تذاكر الطابور</title>
<style>
body{font-family:Tahoma,Arial,sans-serif;background:#f7f3ef;margin:0;padding:20px;color:#1f2937}.sheet{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:16px}.ticket{background:linear-gradient(180deg,#fff,#fbf7f2);border:1px solid #eadfce;border-radius:24px;padding:18px;text-align:center;box-shadow:0 10px 24px rgba(17,24,39,.05)}
.num{font-size:44px;font-weight:800;margin:12px 0;color:#5e3b23}.qr{display:flex;justify-content:center;margin-top:10px}.muted{color:#666}.shop{font-size:18px;font-weight:700}.sys{font-size:13px;color:#8b6b52}.meta{margin-top:10px;background:#fff;border:1px solid #efe4d6;border-radius:16px;padding:10px}
.price{margin-top:8px;font-weight:700;color:#5e3b23}
@media print{body{padding:0;background:#fff}.ticket{break-inside:avoid;box-shadow:none}} @media (max-width:640px){body{padding:12px}.num{font-size:38px}}
</style></head><body onload="window.print()">
<div class="sheet">
<?php foreach($tickets as $t): $link = base_url('?page=queue_public&token='.$t['public_token']); ?>
<div class="ticket">
  <div class="shop"><?= e(setting('shop_name_ar', 'فخر الأصالة العمانية')) ?></div>
  <div class="sys"><?= e(setting('system_name_ar', 'نظام فخر لإدارة التأجير والبيع والطابور')) ?></div>
  <div class="muted" style="margin-top:6px">رقم التذكرة</div>
  <div class="num"><?= e($t['ticket_no']) ?></div>
  <div class="meta">
    <div class="muted">امسح QR لمتابعة الدور</div>
    <div class="qr"><img src="https://api.qrserver.com/v1/create-qr-code/?size=160x160&data=<?= urlencode($link) ?>" alt="qr"></div>
  </div>
  <div class="price">سعر الخدمة: <?= e(number_format((float)setting('queue_ticket_price','0'),3)) ?> <?= e(setting('queue_currency','ر.ع')) ?></div>
  <div class="muted" style="margin-top:8px;font-size:12px"><?= e(date('Y-m-d H:i')) ?></div>
</div>
<?php endforeach; ?>
</div>
</body></html>
