<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <div class="mb-12">
        <div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-6 mb-8">
            <div class="relative">
                <div
                    class="absolute -left-3 -top-3 w-20 h-20 bg-gradient-to-br from-violet-500/10 to-indigo-600/10 rounded-full blur-xl">
                </div>
                <h1 class="text-4xl font-black tracking-tight dark:text-white relative z-10 mb-2">
                    <span class="bg-gradient-to-r from-violet-600 to-indigo-600 bg-clip-text text-transparent">
                        Tambah Kampus
                    </span>
                </h1>
                <p class="text-slate-500 dark:text-slate-400 text-sm pl-1">
                    <i data-lucide="plus-circle" class="w-4 h-4 inline mr-2"></i>
                    Tambahkan data kampus baru ke dalam sistem
                </p>
            </div>

            <div class="flex items-center gap-4">
                <a href="<?php echo e(route('kampus.index')); ?>"
                    class="px-4 py-2.5 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl text-sm font-medium text-slate-600 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-gray-700 transition-all flex items-center gap-2 shadow-sm">
                    <i data-lucide="arrow-left" class="w-4 h-4"></i>
                    <span>Kembali</span>
                </a>
            </div>
        </div>

        <!-- Main Form Card -->
        <div class="max-w-3xl mx-auto">
            <div class="group relative">
                <div
                    class="absolute -inset-1 bg-gradient-to-r from-violet-600/10 to-indigo-600/10 rounded-3xl blur opacity-0 group-hover:opacity-30 transition duration-500">
                </div>
                <div
                    class="relative bg-white dark:bg-[#1a1a2e] p-8 rounded-3xl border border-slate-200 dark:border-white/5 shadow-xl">

                    <!-- Form Header -->
                    <div class="flex items-center gap-4 mb-8 pb-6 border-b border-slate-100 dark:border-white/5">
                        <div
                            class="w-12 h-12 rounded-2xl bg-gradient-to-br from-violet-500/10 to-indigo-600/10 text-violet-500 flex items-center justify-center">
                            <i data-lucide="school" class="w-6 h-6"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-bold text-gray-900 dark:text-white">Form Tambah Kampus</h3>
                            <p class="text-sm text-slate-500 dark:text-slate-400">Isi form berikut untuk menambahkan
                                kampus baru</p>
                        </div>
                    </div>

                    <!-- Error Messages -->
                    <?php if($errors->any()): ?>
                        <div
                            class="mb-6 p-4 bg-gradient-to-r from-red-500/10 to-rose-600/10 border border-red-500/20 rounded-2xl animate-fade-in">
                            <div class="flex items-start gap-3">
                                <div
                                    class="w-10 h-10 rounded-xl bg-red-500/10 text-red-500 flex items-center justify-center flex-shrink-0">
                                    <i data-lucide="alert-triangle" class="w-5 h-5"></i>
                                </div>
                                <div class="flex-1">
                                    <h4 class="font-bold text-red-700 dark:text-red-400 mb-2">Terjadi kesalahan:</h4>
                                    <ul class="space-y-1">
                                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <li class="text-sm text-red-600 dark:text-red-300">• <?php echo e($error); ?>

                                            </li>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    <?php endif; ?>

                    <!-- Form -->
                    <form action="<?php echo e(route('kampus.store')); ?>" method="POST" class="space-y-6" id="kampusForm">
                        <?php echo csrf_field(); ?>

                        <!-- Data Utama Kampus -->
                        <div class="bg-slate-50 dark:bg-white/5 p-6 rounded-xl space-y-4">
                            <h4 class="font-semibold text-lg text-gray-900 dark:text-white flex items-center gap-2">
                                <i data-lucide="building-2" class="w-5 h-5 text-violet-500"></i>
                                Data Utama Kampus
                            </h4>

                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
                                        Nama Kampus <span class="text-red-500">*</span>
                                    </label>
                                    <input type="text" name="nama" value="<?php echo e(old('nama')); ?>"
                                        class="w-full px-4 py-3 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-transparent"
                                        placeholder="Masukkan nama kampus" required>
                                </div>

                                <div>
                                    <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
                                        Singkatan Kampus
                                    </label>
                                    <input type="text" name="singkatan" value="<?php echo e(old('singkatan')); ?>"
                                        class="w-full px-4 py-3 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-transparent"
                                        placeholder="Contoh: STES-BN">
                                </div>
                            </div>

                            <div>
                                <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
                                    Alamat
                                </label>
                                <textarea name="alamat" rows="2"
                                    class="w-full px-4 py-3 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-transparent resize-none"
                                    placeholder="Masukkan alamat kampus"><?php echo e(old('alamat')); ?></textarea>
                            </div>

                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
                                        Website
                                    </label>
                                    <input type="url" name="website" value="<?php echo e(old('website')); ?>"
                                        class="w-full px-4 py-3 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-transparent"
                                        placeholder="https://example.ac.id">
                                </div>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
                                        Email Official
                                    </label>
                                    <input type="email" name="email_official" value="<?php echo e(old('email_official')); ?>"
                                        class="w-full px-4 py-3 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-transparent"
                                        placeholder="info@example.ac.id">
                                </div>
                            </div>
                        </div>

                        <!-- Bagi Hasil Utama -->
                        <div class="bg-slate-50 dark:bg-white/5 p-6 rounded-xl space-y-4">
                            <h4 class="font-semibold text-lg text-gray-900 dark:text-white flex items-center gap-2">
                                <i data-lucide="percent" class="w-5 h-5 text-violet-500"></i>
                                Bagi Hasil Utama (%)
                            </h4>
                            <p class="text-xs text-slate-500 mb-2">Kampus + K2 + Yayasan = 100%</p>

                            <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
                                        Kampus (%)
                                    </label>
                                    <input type="number" name="bagi_hasil_kampus" id="bagiHasilKampus"
                                        value="<?php echo e(old('bagi_hasil_kampus', 70)); ?>" min="0" max="100"
                                        step="0.01"
                                        class="w-full px-4 py-3 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-transparent"
                                        oninput="hitungTotalBagiHasil()">
                                </div>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
                                        K2 (%)
                                    </label>
                                    <input type="number" name="bagi_hasil_k2" id="bagiHasilK2"
                                        value="<?php echo e(old('bagi_hasil_k2', 27.5)); ?>" min="0" max="100"
                                        step="0.01"
                                        class="w-full px-4 py-3 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-transparent"
                                        oninput="hitungTotalBagiHasil()">
                                </div>
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
                                        Yayasan (%)
                                    </label>
                                    <input type="number" name="bagi_hasil_yayasan" id="bagiHasilYayasan"
                                        value="<?php echo e(old('bagi_hasil_yayasan', 2.5)); ?>" min="0" max="100"
                                        step="0.01"
                                        class="w-full px-4 py-3 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-transparent"
                                        oninput="hitungTotalBagiHasil()">
                                </div>
                            </div>

                            <div id="totalBagiHasilInfo"
                                class="p-3 rounded-lg bg-green-100 dark:bg-green-900/20 text-green-700">
                                <p class="text-sm font-medium">
                                    Total: <span id="totalBagiHasil">100</span>%
                                </p>
                                <p class="text-xs mt-1 text-slate-500">Pastikan total = 100%</p>
                            </div>
                        </div>

                        <!-- Subsidi dari K2 -->
                        <div class="bg-slate-50 dark:bg-white/5 p-6 rounded-xl space-y-4">
                            <h4 class="font-semibold text-lg text-gray-900 dark:text-white flex items-center gap-2">
                                <i data-lucide="gift" class="w-5 h-5 text-violet-500"></i>
                                Subsidi dari K2 (%)
                            </h4>
                            <p class="text-xs text-slate-500 mb-2">Subsidi diambil dari porsi K2 (tidak mempengaruhi
                                total 100%)</p>

                            <div class="grid grid-cols-1 md:grid-cols-1 gap-4">
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
                                        Agensi (%)
                                    </label>
                                    <input type="number" name="subsidi_agensi"
                                        value="<?php echo e(old('subsidi_agensi', 2)); ?>" min="0" max="100"
                                        step="0.1"
                                        class="w-full px-4 py-3 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-transparent">
                                </div>
                            </div>
                        </div>

                        <!-- Alokasi Biaya Tetap -->
                        <div class="bg-slate-50 dark:bg-white/5 p-6 rounded-xl space-y-4">
                            <h4
                                class="font-semibold text-lg text-gray-900 dark:text-white flex items-center gap-2 mb-4">
                                <i data-lucide="wallet" class="w-5 h-5 text-violet-500"></i>
                                Alokasi Biaya Tetap
                            </h4>

                            <div id="biayaTetapContainer" class="space-y-4"></div>

                            <div class="flex justify-center pt-2">
                                <button type="button" onclick="tambahBiayaTetap()"
                                    class="px-4 py-2.5 bg-white dark:bg-gray-800 border-2 border-dashed border-violet-300 dark:border-violet-700 rounded-xl text-sm font-medium text-violet-600 dark:text-violet-400 hover:bg-violet-50 dark:hover:bg-violet-900/20 transition-all flex items-center gap-2">
                                    <i data-lucide="plus" class="w-4 h-4"></i>
                                    Tambah Biaya
                                </button>
                            </div>

                            <input type="hidden" name="biaya_tetap" id="biayaTetapInput">
                        </div>

                        <!-- Biaya Formulir Pendaftaran -->
                        <div class="bg-slate-50 dark:bg-white/5 p-6 rounded-xl space-y-4">
                            <h4
                                class="font-semibold text-lg text-gray-900 dark:text-white flex items-center gap-2 mb-4">
                                <i data-lucide="file-text" class="w-5 h-5 text-violet-500"></i>
                                Biaya Formulir Pendaftaran
                            </h4>

                            <div id="biayaFormulirContainer" class="space-y-4"></div>

                            <!-- Input Tambah Jenjang di Paling Bawah -->
                            <div class="mt-4 pt-4 border-t border-slate-200 dark:border-gray-700">
                                <div class="flex items-center justify-between gap-4">
                                    <div class="flex-1">
                                        <label
                                            class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1.5">
                                            Tambah Jenjang Baru
                                        </label>
                                        <div class="flex gap-2">
                                            <input type="text" id="jenjangBaruInput"
                                                placeholder="Contoh: S1 (RPL), S2 (RPL), Dll"
                                                class="flex-1 px-3 py-2 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-lg text-sm focus:ring-2 focus:ring-violet-500 focus:border-transparent">
                                            <button type="button" onclick="tambahJenjangFormulir()"
                                                class="px-4 py-2 bg-white dark:bg-gray-800 border-2 border-dashed border-emerald-300 dark:border-emerald-700 rounded-xl text-sm font-medium text-emerald-600 dark:text-emerald-400 hover:bg-emerald-50 dark:hover:bg-emerald-900/20 transition-all flex items-center gap-2">
                                                <i data-lucide="plus" class="w-4 h-4"></i>
                                                Tambah Jenjang
                                            </button>
                                        </div>
                                        <p class="text-xs text-slate-500 mt-1">* Kosongkan jika tidak ingin menambah
                                            jenjang</p>
                                    </div>
                                </div>
                            </div>

                            <input type="hidden" name="biaya_formulir_data" id="biayaFormulirInput">

                            <div class="mt-2 p-3 bg-green-50 dark:bg-green-900/20 rounded-lg">
                                <p class="text-xs text-green-600 dark:text-green-400">
                                    <i data-lucide="info" class="w-3 h-3 inline mr-1"></i>
                                    Biaya formulir per jenjang pendidikan. Klik icon chevron untuk collapse/expand.
                                </p>
                            </div>
                        </div>

                        <!-- Form Footer -->
                        <div class="pt-6 border-t border-slate-100 dark:border-white/5">
                            <div class="flex flex-col sm:flex-row justify-between items-center gap-4">
                                <div class="text-sm text-slate-500 dark:text-slate-400">
                                    <i data-lucide="info" class="w-4 h-4 inline mr-1"></i>
                                    Field dengan tanda <span class="text-red-500">*</span> wajib diisi
                                </div>
                                <div class="flex gap-3">
                                    <a href="<?php echo e(route('kampus.index')); ?>"
                                        class="px-4 py-2.5 bg-white dark:bg-gray-800 border border-slate-200 dark:border-gray-700 rounded-xl text-sm font-medium text-slate-600 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-gray-700 transition-all flex items-center gap-2">
                                        <i data-lucide="arrow-left" class="w-4 h-4"></i>
                                        Kembali
                                    </a>
                                    <button type="submit"
                                        class="px-4 py-2.5 bg-gradient-to-r from-violet-600 to-indigo-700 text-white rounded-xl text-sm font-medium hover:shadow-lg hover:shadow-violet-500/25 transition-all flex items-center gap-2">
                                        <i data-lucide="save" class="w-4 h-4"></i>
                                        Simpan Kampus
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <?php echo $__env->make('rnd.kampus.partials.scripts', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH C:\Users\User\Documents\K2-PROJECTS\k2-sipema\resources\views/rnd/kampus/create.blade.php ENDPATH**/ ?>