<?php use App\Modules\Settings\Services\BrandingService; ?>
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
    <meta charset="UTF-8">
    <title><?= $__template->yield('title', 'طباعة') ?></title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap" rel="stylesheet">
    <style>
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            padding: 30px;
            background: #fff;
            font-family: 'Cairo', 'Segoe UI', sans-serif;
            font-size: 13px;
            color: #1a2332;
            direction: rtl;
            line-height: 1.7;
        }
        .print-header {
            text-align: center;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 2px solid #1e3a5f;
        }
        .print-header h2 {
            color: #1e3a5f;
            font-size: 20px;
            font-weight: 800;
            margin: 0 0 4px;
        }
        .print-header p {
            color: #6B7280;
            font-size: 12px;
            margin: 0;
        }
        table { width: 100%; border-collapse: collapse; }
        th, td { border: 1px solid #e2e8f0; padding: 8px 12px; text-align: right; font-size: 12px; }
        th { background: #f8fafc; font-weight: 600; color: #475569; }
        @media print {
            body { padding: 0; }
        }
    </style>
</head>
<body>
    <div class="print-header">
        <?php $printLogo = BrandingService::logo(); ?>
        <?php if ($printLogo): ?>
            <img src="<?= e($printLogo) ?>" alt="Logo" style="max-height:40px;margin-bottom:8px;">
        <?php endif; ?>
        <h2><?= e(BrandingService::clubNameAr()) ?></h2>
        <p><?= arabic_date(today()) ?></p>
    </div>

    <?= $__template->yield('content', '') ?>

    <script>window.onload = function() { window.print(); }</script>
</body>
</html>
