<?= $this->extend('layout/template') ?>

<?= $this->section('content') ?>
<div class="container-fluid">
    <div class="d-flex justify-content-between align-items-center mb-4">
        <div>
            <h1 class="h3 mb-1 text-gray-800 fw-bold">Buat Jadwal Baru</h1>
            <p class="mb-0 text-muted">Buka periode pengisian laporan kinerja</p>
        </div>
        <a href="<?= base_url('jadwal') ?>" class="btn btn-secondary shadow-sm">
            <i class="fas fa-arrow-left fa-sm text-white-50 me-1"></i> Kembali
        </a>
    </div>

    <div class="card shadow-sm border-0 mb-4 rounded-3">
        <div class="card-body">
            <form action="<?= base_url('jadwal/store') ?>" method="post">
                <div class="row">
                    <div class="col-md-6">
                        <div class="mb-3">
                            <label for="tahun" class="form-label fw-bold text-secondary">Tahun Anggaran <span class="text-danger">*</span></label>
                            <input type="number" class="form-control" id="tahun" name="tahun" value="<?= date('Y') ?>" required>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="mb-3">
                            <label for="triwulan" class="form-label fw-bold text-secondary">Triwulan <span class="text-danger">*</span></label>
                            <select class="form-select" id="triwulan" name="triwulan" required>
                                <option value="1">Triwulan 1 (Jan - Mar)</option>
                                <option value="2">Triwulan 2 (Apr - Jun)</option>
                                <option value="3">Triwulan 3 (Jul - Sep)</option>
                                <option value="4">Triwulan 4 (Okt - Des)</option>
                            </select>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-6">
                        <div class="mb-3">
                            <label for="tanggal_mulai" class="form-label fw-bold text-secondary">Tanggal Mulai <span class="text-danger">*</span></label>
                            <input type="date" class="form-control" id="tanggal_mulai" name="tanggal_mulai" required>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="mb-3">
                            <label for="tanggal_selesai" class="form-label fw-bold text-secondary">Tanggal Selesai <span class="text-danger">*</span></label>
                            <input type="date" class="form-control" id="tanggal_selesai" name="tanggal_selesai" required>
                        </div>
                    </div>
                </div>

                <div class="mb-3">
                    <label for="keterangan" class="form-label fw-bold text-secondary">Keterangan Tambahan</label>
                    <textarea class="form-control" id="keterangan" name="keterangan" rows="3" placeholder="Contoh: Harap mengisi tepat waktu..."></textarea>
                </div>

                <div class="alert alert-info">
                    <i class="fas fa-info-circle me-2"></i>
                    Dengan menyimpan jadwal ini, sistem akan otomatis mengirimkan notifikasi kepada seluruh akun OPD.
                </div>

                <hr>
                <div class="d-flex justify-content-end">
                    <button type="submit" class="btn btn-primary px-4"><i class="fas fa-paper-plane me-1"></i> Simpan & Kirim Notifikasi</button>
                </div>
            </form>
        </div>
    </div>
</div>
<?= $this->endSection() ?>
