<?php $__env->startSection('title', 'Edit Kategori'); ?>

<?php $__env->startSection('content'); ?>
<div class="max-w-2xl mx-auto space-y-6">

    <!-- Header -->
    <div>
        <h2 class="text-2xl font-bold text-gray-800">Edit Kategori</h2>
        <p class="text-gray-500 mt-1">Perbarui nama kategori</p>
    </div>

    <!-- Card/Form Container -->
    <div class="bg-white border border-gray-200 rounded-2xl shadow-sm p-6">

        <!-- Error Alert -->
        <?php if($errors->any()): ?>
            <div class="mb-4 px-4 py-3 bg-red-50 border border-red-200 text-red-700 rounded-xl">
                <ul class="list-disc list-inside text-sm space-y-1">
                    <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <li><?php echo e($error); ?></li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </ul>
            </div>
        <?php endif; ?>

        <form action="<?php echo e(route('kategoris.update', $kategori->id)); ?>" method="POST" class="space-y-5">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>

            <!-- Input -->
            <div>
                <label class="block text-sm font-medium text-gray-700 mb-1">
                    Nama Kategori
                </label>
                <input type="text"
                       name="nama"
                       value="<?php echo e(old('nama', $kategori->nama)); ?>"
                       class="w-full px-4 py-2.5 rounded-xl border border-gray-300 focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500 outline-none transition"
                       required>
            </div>

            <!-- Actions -->
            <div class="flex items-center justify-between gap-3 pt-4 border-t border-gray-100">

                <a href="<?php echo e(route('kategoris.index')); ?>" 
                   class="px-4 py-2.5 text-gray-600 hover:text-gray-800 transition">
                    ← Kembali
                </a>

                <button type="submit" 
                        class="inline-flex items-center gap-2 px-5 py-2.5 bg-gradient-to-r from-amber-400 to-amber-500 hover:from-amber-500 hover:to-amber-600 text-white font-medium rounded-xl shadow-lg shadow-amber-500/25 hover:shadow-amber-500/40 transition-all duration-200 transform hover:-translate-y-0.5">
                    <i class="bi bi-save"></i>
                    Update
                </button>

            </div>

        </form>

    </div>

</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\Toko-miftah\resources\views/kategoris/edit.blade.php ENDPATH**/ ?>