<?php $__template->layout('Layout.main'); ?>
<?php $__template->section('title'); ?>تعديل الخدمة: <?= e($service->name_ar) ?><?php $__template->endSection(); ?>
<?php $__template->section('content'); ?>
<form method="POST" action="/catalog/<?= (int) $service->id ?>">
    <?= csrf_field() ?>
    <div class="card" style="padding:20px;">
        <table style="width:100%;font-size:14px;margin-bottom:20px;">
            <tr><td style="padding:6px 0;color:#6B7280;width:30%;">كود الخدمة</td><td><code><?= e($service->service_code) ?></code></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">الاسم</td><td><?= e($service->name_ar) ?></td></tr>
            <tr><td style="padding:6px 0;color:#6B7280;">نوع السعر</td><td><?= e($service->price_type) ?></td></tr>
        </table>
        <div style="display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;">
            <div class="form-group">
                <label class="form-label">المبلغ الأساسي (ج.م)</label>
                <input type="number" name="base_amount" value="<?= e($service->base_amount ?? '') ?>" class="form-input" step="0.01" min="0">
            </div>
            <div class="form-group">
                <label class="form-label">النسبة (%)</label>
                <input type="number" name="percentage" value="<?= e($service->percentage ?? '') ?>" class="form-input" step="0.01" min="0" max="100">
            </div>
            <div class="form-group">
                <label class="form-label">المبلغ السنوي (ج.م)</label>
                <input type="number" name="annual_amount" value="<?= e($service->annual_amount ?? '') ?>" class="form-input" step="0.01" min="0">
            </div>
        </div>
    </div>
    <button type="submit" class="btn btn-primary" style="margin-top:20px;">حفظ</button>
    <a href="/catalog" class="btn btn-outline" style="margin-top:20px;">إلغاء</a>
</form>
<?php $__template->endSection(); ?>