<div class="row justify-content-center"><div class="col-lg-8"><div class="card">
    <div class="card-header"><h5 class="mb-0"><?= lang('adv_finance.create_refund') ?></h5></div>
    <div class="card-body">
        <form method="POST" action="/advanced-finance/refunds/store" data-ajax="true">
            <?= csrf_field() ?>
            <div class="row g-3">
                <div class="col-md-6"><label class="form-label">Member <span class="text-danger">*</span></label><select name="member_id" class="form-select select2-ajax" data-url="/advanced-finance/api/member-search" required></select><div class="invalid-feedback" data-field="member_id"></div></div>
                <div class="col-md-3"><label class="form-label">Amount <span class="text-danger">*</span></label><input type="number" name="refund_amount" class="form-control" step="0.01" required><div class="invalid-feedback" data-field="refund_amount"></div></div>
                <div class="col-md-3"><label class="form-label">Method <span class="text-danger">*</span></label><select name="refund_method_id" class="form-select" required><?php foreach($methods as $m): ?><option value="<?= $m['id'] ?>"><?= e($m['name_en']) ?></option><?php endforeach; ?></select></div>
                <div class="col-12"><label class="form-label">Reason <span class="text-danger">*</span></label><textarea name="reason" class="form-control" rows="3" required></textarea><div class="invalid-feedback" data-field="reason"></div></div>
                <div class="col-12"><label class="form-label">Notes</label><textarea name="notes" class="form-control" rows="2"></textarea></div>
            </div>
            <div class="mt-4 d-flex gap-2"><button type="submit" class="btn btn-primary"><i class="fas fa-save me-1"></i><?= lang('common.save') ?></button><a href="/advanced-finance/refunds" class="btn btn-secondary"><?= lang('common.cancel') ?></a></div>
        </form>
    </div>
</div></div></div>
<?php $__view->push('scripts') ?><script>document.addEventListener('DOMContentLoaded',function(){AdvFinance.initMemberSelect('.select2-ajax');});</script><?php $__view->endPush() ?>