<div class="col-lg-12">
    <div class="card">
        <div class="card-body">
            <div class="row">
                <div class="col card-title"><?= esc($customer['c_cname'])?></div>
                <div class="col card-title text-end">CUST-<?= str_pad($customer['cid'],5,'0',STR_PAD_LEFT) ?></div>
            </div>
            <div class="row bg-success rounded p-3 ">
                <div class="col card-title align-content-end">Stauts</div>
                <div class="col text-center align-content-center">
                    <?= esc($customer['c_status']) ?>
                    <i class="mdi mdi-alert-circle-outline icon-sm text-primary align-middle">Credit limit reached </i>

                </div>
            </div>
            
            <div class="row mt-3">
                <div class="col company-info justify-content-between p-4 rounded-2 bg-light border">
                    <p><b>VAT:</b><span>&nbsp;<?= esc($customer['c_cvat']) ?></span></p>
                    <h6>Address:</h6>
                    <?= esc($customer['c_cna']) ?>
                    <p class="mt-3"><b>City:</b><span>&nbsp;<?= esc($customer['c_ccity']) ?></span></p>
                </div>
                
                <div class="col contact-person justify-content-between p-4 bg-light rounded-2 border">
                    <div class="row justify-content-between mb-2">
                        <div class="col text-start"><b>Person Name:</b></div>
                        <div class="col text-end"><?= esc($customer['c_fname'].' '.$customer['c_lname']) ?></div>
                    </div>
                    <div class="row justify-content-between mb-2">
                        <div class="col text-start"><b>Contact Number:</b></div>
                        <div class="col text-end"><a href="tel:<?= $customer['c_mobile'] ?>"><?= esc($customer['c_mobile']) ?></a></div>
                    </div>
                    <div class="row justify-content-between mb-2">
                        <div class="col text-start"><b>email:</b></div>
                        <div class="col text-end"><a href="mailto:<?= $customer['c_email'] ?>"><?= esc($customer['c_email']) ?></a></div>
                    </div>
                </div>
            </div>
              <!-- Credit Limit -->
        <div class="row bg-light p-3 mt-2">
                <form action="" method="get">
                    <div class="form-group row ">
                        <h5>Account Status</h5>
                        <div class="col">
                            <label for="creditlimit" class="col-form-label">Credit Limit</label>
                            <select name="creditlimit" id="creditlimit" class="form-select">
                                <option value="10000">10000</option>
                                <option value="25000">25000</option>
                                <option value="50000" selected>50000</option>
                                <option value="100000">100000</option>
                            </select> 
                        </div>
                        <div class="col">
                            <label for="creditdays" class="col-form-label">Days</label>
                            <select name="creditdays" id="creditdays" class="form-select">
                                <option value="15">15 Days</option>
                                <option value="30" selected>30 Days</option>
                                <option value="60"> 60 Days</option>
                                <option value="90">90 Days</option>
                                <option value="120">120 Days</option>
                                <option value="150">150 Days</option>
                                <option value="180">180 Days</option>
                            </select>
                        </div>
                        <div class="col">
                            <label for="creditissued" class="col-form-label">Credit Issued</label>
                            <input type="text" name="creditissued" id="creditissued" class="form-control" readonly value="52,000">
                        </div>
                        <div class="col">
                            <label for="creditbalance" class="col-form-label">Credit Balance</label>
                            <input type="text" name="creditbalance" id="creditbalance" class="form-control" readonly value="-2000">
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-sm-3">
                            <select name="customerstatus" id="customerstatus" class="form-select col-4">
                                <option value="Active">Active</option>
                                <option value="Hold" selected>Hold</option>
                                <option value="Blacklist">Blacklist</option>
                            </select>
                        </div>
                        <div class="col">
                            <input type="button" value="Update" class="btn btn-success">
                        </div>
                    </div>
                </form>
            </div>
        </div>
      
    </div>
    

    <!-- Quotation History -->
    <div class="card mt-3">
        <div class="card-body">
            <div class="card-title">Quotation History</div>
            <div class="row customer-view-quotation-list">
                <table class="table table-bordered ga-table-small">
                    <thead>
                        <th>S.No</th>
                        <th>Quotation</th>
                        <th>Invoice</th>
                        <th>Validity</th>
                        <th>Status</th>
                        <th>Actions</th>
                    </thead>
                    <tbody>
                        <td>1</td>
                        <td>QN-001-260110-0123</td>
                        <td>-</td>
                        <td>05-26-2026</td>
                        <td><span class="badge badge-warning">Pending</span></td>
                        <td class="text-end"><a href="<?php echo base_url('index.php/admin/')?>viewquotes" class="btn btn-sm btn-info">View Quote</a></td>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="card mt-3">
        <div class="card-body">
            <h5>Invoice History</h5>
            <table class="table table-bordered ga-table-small">
                <thead>
                    <tr>
                        <th>S.No</th>
                        <th>Invoice Number</th>
                        <th>Amount</th>
                        <th>Stauts</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>1</td>
                        <td>Inv-001-260529-0125</td>
                        <td>70,000</td>
                        <td><i class="badge badge-danger">Unpaid</i></td>
                        <td class="text-end"><a href="mailto:info@companydomain.com" class="btn btn-sm btn-info">Send Reminder</a></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
