<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?= e($title ?? 'Print') ?></title>
    <style>
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { font-family: 'Segoe UI', Arial, sans-serif; font-size: 13px; color: #222; background: #fff; }
        @media print {
            body { margin: 0; }
            .no-print { display: none !important; }
            @page { margin: 10mm; }
        }
        .print-wrap { max-width: 780px; margin: 0 auto; padding: 20px; }
    </style>
</head>
<body>
<div class="print-wrap">
    <?= $content ?>
</div>
<div class="no-print" style="position:fixed;bottom:20px;right:20px;display:flex;gap:8px;z-index:999;">
    <button onclick="window.print()"
            style="background:#f97316;color:#fff;border:none;padding:10px 20px;border-radius:8px;cursor:pointer;font-size:14px;font-weight:600;">
        🖨 Print
    </button>
    <button onclick="window.close()"
            style="background:#6c757d;color:#fff;border:none;padding:10px 20px;border-radius:8px;cursor:pointer;font-size:14px;">
        ✕ Close
    </button>
</div>
</body>
</html>
