<?php
$__template->layout('Layout.main');
?>
<?php $__template->section('title'); ?>إدارة شبكة حمام السباحة<?php $__template->endSection(); ?>

<?php $__template->section('content'); ?>
<div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));gap:20px;">
    <?php foreach ($facilities as $f): ?>
    <a href="/sa/pool-grid/<?= (int) $f['id'] ?>" class="card" style="text-decoration:none;color:inherit;padding:24px;transition:box-shadow .2s;">
        <div style="display:flex;align-items:center;gap:12px;margin-bottom:12px;">
            <div style="width:48px;height:48px;border-radius:12px;background:#DBEAFE;display:flex;align-items:center;justify-content:center;">
                <i data-lucide="waves" style="width:24px;height:24px;color:#2563EB;"></i>
            </div>
            <div>
                <h3 style="margin:0;font-size:18px;font-weight:600;"><?= e($f['name_ar']) ?></h3>
                <span style="color:#6B7280;font-size:13px;"><?= e($f['discipline_name'] ?? '') ?></span>
            </div>
        </div>
        <p style="margin:0;color:#6B7280;font-size:14px;"><?= e($f['location_description'] ?? 'بدون وصف') ?></p>
    </a>
    <?php endforeach; ?>
</div>
<script>if (typeof lucide !== 'undefined') lucide.createIcons();</script>
<?php $__template->endSection(); ?>
