<?php
// ============================================
// pwa_head.php
// أضف هذا السطر داخل <head> في كل صفحة أدمين:
// <?php include __DIR__ . '/pwa_head.php'; >
?>
<!-- PWA Meta Tags -->
<meta name="theme-color" content="#4f46e5">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Neo Link Admin">
<link rel="apple-touch-icon" href="/admin/Uploads/logos/icon-192.png">

<!-- Service Worker -->
<script>
  if ('serviceWorker' in navigator) {
    window.addEventListener('load', function () {
      navigator.serviceWorker.register('/admin/sw.js')
        .then(reg => console.log('✅ PWA ready:', reg.scope))
        .catch(err => console.error('❌ SW Error:', err));
    });
  }
</script>
