<?= $this->extend('layouts/main') ?>

<?= $this->section('title') ?>
    Konfirmasi Data Pegawai
<?= $this->endSection() ?>

<?= $this->section('page_title') ?>
    Konfirmasi Identitas Pegawai
<?= $this->endSection() ?>

<?= $this->section('content') ?>
<div class="row">
    <div class="col-lg-10 mx-auto">
        
        <!-- Confirmation Notice -->
        <div class="alert alert-info border-info border-opacity-25 rounded-4 px-4 py-3 mb-4" role="alert">
            <div class="d-flex">
                <i class="bi bi-info-circle-fill fs-4 text-info me-3"></i>
                <div>
                    <div class="fw-bold mb-1">Cari Data Berhasil!</div>
                    <div class="small">Silakan periksa data Anda di bawah ini sebelum melanjutkan pengusulan berkas. Data ini diambil langsung dari database SIASN.</div>
                </div>
            </div>
        </div>

        <div class="glass-card mb-4" style="border-top: 5px solid #4361ee;">
            <div class="row align-items-center mb-4">
                <div class="col-md-2 text-center">
                    <div class="bg-primary bg-opacity-10 rounded-circle d-flex align-items-center justify-content-center mx-auto shadow-sm" style="width: 100px; height: 100px;">
                        <i class="bi bi-person-fill text-primary display-4"></i>
                    </div>
                </div>
                <div class="col-md-10">
                    <h3 class="mb-0 text-gradient"><?= strtoupper($pegawai['nama']) ?></h3>
                    <p class="text-secondary fw-bold mb-0">NIP: <?= $pegawai['nip_baru'] ?></p>
                    <span class="badge bg-primary bg-opacity-25 text-primary rounded-pill px-3 py-1">Pangkat/Gol: <?= $pegawai['gol_akhir'] ?></span>
                </div>
            </div>

            <hr class="opacity-10 my-4">

            <div class="row g-4">
                <div class="col-md-6">
                    <div class="small text-secondary fw-bold mb-1">JABATAN</div>
                    <div class="fw-medium"><?= $pegawai['jabatan'] ?></div>
                </div>
                <div class="col-md-6">
                    <div class="small text-secondary fw-bold mb-1">UNIT KERJA</div>
                    <div class="fw-medium small"><?= $pegawai['unor'] ?></div>
                </div>
                <div class="col-md-6">
                    <div class="small text-secondary fw-bold mb-1">LOKASI KERJA</div>
                    <div class="fw-medium"><?= $pegawai['lokasi_kerja'] ?></div>
                </div>
                <div class="col-md-6">
                    <div class="small text-secondary fw-bold mb-1">INSTANSI</div>
                    <div class="fw-medium small"><?= $pegawai['instansi_kerja'] ?></div>
                </div>
            </div>
        </div>

        <div class="alert alert-secondary border-0 rounded-4 px-4 py-3 mb-4 bg-light shadow-sm" role="alert">
            <div class="row align-items-center">
                <div class="col-md-8">
                    <div class="small fw-bold">Usulan Anda:</div>
                    <div class="small text-primary fw-bold">Kenaikan Pangkat: <?= $pengajuan['jenis_kp'] ?> - Periode <?= $pengajuan['periode'] ?> <?= $pengajuan['tahun'] ?></div>
                </div>
                <div class="col-md-4 text-end">
                    <button type="submit" form="finalForm" class="btn btn-primary rounded-pill px-4 py-2 font-weight-bold shadow-sm">
                        BENAR, LANJUTKAN <i class="bi bi-chevron-right ms-1"></i>
                    </button>
                    <form id="finalForm" action="<?= base_url('user/pengajuan/submit') ?>" method="POST"></form>
                </div>
            </div>
        </div>

        <div class="text-center">
            <a href="<?= base_url('user/pengajuan') ?>" class="text-secondary small text-decoration-none"><i class="bi bi-arrow-left me-1"></i> Kembali & Pilih Ulang</a>
        </div>
    </div>
</div>
<?= $this->endSection() ?>
