<div class="container-fluid">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card border-0 shadow-sm" style="border-radius: 15px;">
                <div class="card-header bg-success text-white border-0 pt-4 px-4">
                    <h5 class="mb-0"><i class="bi bi-check-circle me-2"></i>Proses Permohonan Surat</h5>
                </div>
                <div class="card-body px-4 pb-4">
                    
                    <!-- Info Permohonan -->
                    <div class="alert alert-light border mb-4">
                        <h6>Detail Permohonan:</h6>
                        <table class="table table-borderless table-sm mb-0">
                            <tr>
                                <td width="30%">Nama</td>
                                <td>: <?php echo isset($warga->nama_lengkap) ? $warga->nama_lengkap : '-'; ?></td>
                            </tr>
                            <tr>
                                <td>NIK</td>
                                <td>: <?php echo isset($warga->nik) ? $warga->nik : '-'; ?></td>
                            </tr>
                            <tr>
                                <td>Jenis Surat</td>
                                <td>: <?php echo isset($jenis_surat->nama_surat) ? $jenis_surat->nama_surat : '-'; ?></td>
                            </tr>
                            <tr>
                                <td>Keperluan</td>
                                <td>: <?php echo isset($permohonan->keperluan) ? $permohonan->keperluan : '-'; ?></td>
                            </tr>
                        </table>
                    </div>

                    <form action="<?php echo base_url('surat/proses/'.$permohonan->id); ?>" method="post">
                        <div class="mb-3">
                            <label class="form-label">Nomor Surat <span class="text-danger">*</span></label>
                            <input type="text" name="nomor_surat" class="form-control" placeholder="Contoh: SKTM/001/RT/02/2024" required>
                            <small class="text-muted">Kosongkan untuk generate otomatis</small>
                        </div>

                        <div class="d-flex justify-content-between">
                            <a href="<?php echo base_url('surat'); ?>" class="btn btn-secondary">Kembali</a>
                            <button type="submit" class="btn btn-success">
                                <i class="bi bi-check-circle me-2"></i>Proses & Selesaikan
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>