<div class="row justify-content-center">
<div class="col-12">
<div class="card-box">

    <div class="card-box-header">
        <h5><i class="fa-solid fa-user" style="color:#7c3aed;"></i> Customer Details</h5>
        <div class="d-flex gap-2">
            <a href="<?= site_url('customer/edit/'.$row->id) ?>" class="btn btn-sm btn-edit"><i class="fa-solid fa-pen-to-square me-1"></i>Edit</a>
            <a href="<?= site_url('customer') ?>" class="btn btn-sm" style="background:#f1f5f9;color:#374151;"><i class="fa-solid fa-arrow-left me-1"></i>Back</a>
        </div>
    </div>

    <table class="table table-sm">
        <tr><td class="fw-bold text-muted" width="140">Customer Name</td><td><strong><?= htmlspecialchars($row->customer_name) ?></strong></td></tr>
        <tr><td class="fw-bold text-muted">Mobile</td><td><a href="tel:<?= $row->mobile ?>"><?= htmlspecialchars($row->mobile) ?></a></td></tr>
        <tr><td class="fw-bold text-muted">Email</td><td><?= $row->email ? '<a href="mailto:'.$row->email.'">'.htmlspecialchars($row->email).'</a>' : '—' ?></td></tr>
        <tr><td class="fw-bold text-muted">GST No</td><td><?= $row->gst_no ?: '—' ?></td></tr>
        <tr><td class="fw-bold text-muted">Address</td><td><?= nl2br(htmlspecialchars($row->address)) ?: '—' ?></td></tr>
        <tr><td class="fw-bold text-muted">Status</td><td>
            <?= $row->status==1
                ? '<span class="badge-active"><i class="fa-solid fa-circle-check me-1"></i>Active</span>'
                : '<span class="badge-inactive"><i class="fa-solid fa-circle-xmark me-1"></i>Inactive</span>' ?>
        </td></tr>
    </table>

</div>
</div>
</div>
