<div class="content-wrapper">
    <div class="container-fluid mt-4">
        <div class="row">
            <div class="col-lg-12">
                <div class="card shadow-sm mb-4 border-0">
                    <div class="card-header bg-success text-white py-2 px-3">
                        <h6 class="mb-0"><i class="fas fa-edit me-2"></i> Hadia Dadus Karta Tama</h6>
                    </div>

                    <div class="card-body p-4">
                        <form method="post" action="<?= base_url('kartatama/atualiza/'.$kartatama->numeru_kartatama); ?>">

                            <div class="row">
                                <div class="col-md-6 form-group mb-3">
                                    <label class="small font-weight-bold text-muted">Hatoba</label>
                                    <input type="text" name="hatoba" class="form-control" value="<?= htmlspecialchars($kartatama->hatoba); ?>" required>
                                </div>
                                <div class="col-md-6 form-group mb-3">
                                    <label class="small font-weight-bold text-muted">Asuntu</label>
                                    <input type="text" name="asuntu" class="form-control" value="<?= htmlspecialchars($kartatama->asuntu); ?>" required>
                                </div>
                            </div>

                            <div class="form-group mb-3">
                                <label class="small font-weight-bold text-muted">Deskrisaun</label>
                                <textarea name="deskrisaun" class="form-control" rows="3" required><?= htmlspecialchars($kartatama->deskrisaun); ?></textarea>
                            </div>

                            <div class="row">
                                <div class="col-md-6 form-group mb-3">
                                    <label class="small font-weight-bold text-muted">Data Tama</label>
                                    <input type="date" name="data_tama" class="form-control" value="<?= htmlspecialchars($kartatama->data_tama); ?>" required>
                                </div>
                                <div class="col-md-6 form-group mb-3">
                                    <label class="small font-weight-bold text-muted">Simu Husi</label>
                                    <input type="text" name="simu_husi" class="form-control" value="<?= htmlspecialchars($kartatama->simu_husi); ?>" required>
                                </div>
                            </div>

                            <hr>

                            <div class="d-flex gap-2 mt-3">
                                <button type="submit" class="btn btn-success px-4">
                                    <i class="fas fa-save me-1"></i> Simpan
                                </button>
                                <a href="<?= base_url('kartatama'); ?>" class="btn btn-secondary px-4">
                                    <i class="fas fa-times me-1"></i> Batal
                                </a>
                            </div>

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

<style>
    .content-wrapper {
        margin-left: 230px; 
        padding: 20px;
    }
</style>