<div class="container mt-4">
    <h3 class="mb-4 text-warning">✏ Edit Pendaftar Perorangan</h3>
    <form method="post" action="<?= base_url('admin/edit_perorangan/'.$perorangan->id_sdm) ?>">
        <div class="mb-3">
            <label class="form-label">NIK</label>
            <input type="text" name="nik" class="form-control" value="<?= $perorangan->nik ?>" required>
        </div>
        <div class="mb-3">
            <label class="form-label">NRK</label>
            <input type="text" name="nrk" class="form-control" value="<?= $perorangan->nrk_perorangan ?>" required>
        </div>
        <div class="mb-3">
            <label class="form-label">Nama Lengkap</label>
            <input type="text" name="nama_lengkap" class="form-control" value="<?= $perorangan->nama_lengkap ?>" required>
        </div>
        <div class="mb-3">
            <label class="form-label">Jenis Kelamin</label>
            <select name="jenis_kelamin" class="form-control" required>
                <option value="Pria" <?= ($perorangan->jenis_kelamin == 'Pria')?'selected':'' ?>>Pria</option>
                <option value="Wanita" <?= ($perorangan->jenis_kelamin == 'Wanita')?'selected':'' ?>>Wanita</option>
            </select>
        </div>
        <div class="mb-3">
            <label class="form-label">Jenis Seni</label>
            <select name="id_seni" class="form-control">
                <?php foreach($jenis_seni as $js): ?>
                    <option value="<?= $js->id_seni ?>" <?= ($perorangan->id_seni == $js->id_seni)?'selected':'' ?>><?= $js->nama_seni ?></option>
                <?php endforeach; ?>
            </select>
        </div>
        <button type="submit" class="btn btn-warning">💾 Update</button>
        <a href="<?= base_url('admin/pendaftar_perorangan') ?>" class="btn btn-secondary">⬅ Kembali</a>
    </form>
</div>