<div class="row justify-content-center">
    <div class="col-lg-10">
        <div class="card shadow-sm">
            <div class="card-body">
                <h4 class="card-title">Invoice & Claim Payment</h4>
                <?php if (!empty($message)): ?>
                    <div class="alert alert-success"><?= htmlspecialchars($message) ?></div>
                <?php endif; ?>
                <?php if (!empty($error)): ?>
                    <div class="alert alert-danger"><?= htmlspecialchars($error) ?></div>
                <?php endif; ?>
                <form method="post" action="index.php?route=claim/store" enctype="multipart/form-data">
                    <?= $csrf ?>
                    <div class="row g-3">
                        <div class="col-md-6">
                            <label class="form-label">Nama Staff</label>
                            <input type="text" class="form-control" value="<?= htmlspecialchars($user['name'] ?? '') ?>" readonly>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">Jabatan</label>
                            <input type="text" name="jabatan" class="form-control" value="<?= htmlspecialchars($location ?? '') ?>" readonly>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">Tujuan Pembayaran</label>
                            <input type="text" name="tujuan" class="form-control" required>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">Amount (RM)</label>
                            <input type="number" step="0.01" name="amount" class="form-control" required>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">Upload Invoice (PDF/JPG/PNG)</label>
                            <input type="file" name="invoice" accept=".pdf,.jpg,.jpeg,.png" class="form-control" required>
                        </div>
                        <div class="col-12">
                            <label class="form-label">Catatan</label>
                            <textarea name="catatan" class="form-control" rows="3"></textarea>
                        </div>
                    </div>
                    <div class="mt-3 d-flex gap-2">
                        <button class="btn btn-primary">Submit</button>
                        <a class="btn btn-outline-secondary" href="index.php?route=dashboard">Back</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

