

<?php $__env->startSection('header-title', 'Yeni Kategori Oluştur'); ?>

<?php $__env->startSection('content'); ?>
<style>
    .page-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 32px;
        flex-wrap: wrap;
        gap: 16px;
    }
    .page-title {
        font-size: 24px;
        font-weight: 800;
        color: #1f2937;
    }
    .page-subtitle {
        font-size: 14px;
        color: #6b7280;
        margin-top: 4px;
    }
    .page-subtitle a {
        color: #3b82f6;
        text-decoration: none;
    }
    .page-subtitle a:hover {
        text-decoration: underline;
    }

    .card {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        max-width: 640px;
    }
    .card-body {
        padding: 28px;
    }

    .alert-error {
        background: #fef2f2;
        border: 1px solid #fecaca;
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 24px;
        color: #dc2626;
        font-size: 14px;
        max-width: 640px;
    }
    .alert-error ul {
        margin: 8px 0 0 20px;
    }

    .form-group {
        margin-bottom: 20px;
    }
    .form-label {
        display: block;
        font-weight: 600;
        font-size: 14px;
        color: #374151;
        margin-bottom: 6px;
    }
    .required {
        color: #ef4444;
    }
    .form-control {
        width: 100%;
        padding: 10px 14px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        font-size: 14px;
        font-family: inherit;
        outline: none;
        transition: all 0.2s;
    }
    .form-control:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    textarea.form-control {
        resize: vertical;
        min-height: 80px;
    }
    .form-control-sm {
        width: 200px;
    }

    .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }

    .form-actions {
        display: flex;
        gap: 12px;
        padding-top: 8px;
    }
    .btn {
        padding: 10px 24px;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        transition: all 0.2s;
    }
    .btn-primary {
        background: #3b82f6;
        color: white;
    }
    .btn-primary:hover {
        background: #2563eb;
    }
    .btn-secondary {
        background: #f3f4f6;
        color: #374151;
    }
    .btn-secondary:hover {
        background: #e5e7eb;
    }
</style>

<div class="page-header">
    <div>
        <h1 class="page-title">📚 Yeni Kategori Oluştur</h1>
        <p class="page-subtitle"><a href="<?php echo e(route('admin.interview-categories.index')); ?>">← Kategoriler</a></p>
    </div>
</div>

<?php if($errors->any()): ?>
    <div class="alert-error">
        <strong>Hata:</strong>
        <ul>
            <?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; ?>

<div class="card">
    <div class="card-body">
        <form method="POST" action="<?php echo e(route('admin.interview-categories.store')); ?>">
            <?php echo csrf_field(); ?>

            <div class="form-group">
                <label class="form-label" for="name">İsim <span class="required">*</span></label>
                <input 
                    type="text" 
                    id="name" 
                    name="name" 
                    value="<?php echo e(old('name')); ?>" 
                    required 
                    class="form-control"
                    placeholder="Örn: KPSS Genel Kültür"
                >
            </div>

            <div class="form-group">
                <label class="form-label" for="slug">Slug <span class="required">*</span></label>
                <input 
                    type="text" 
                    id="slug" 
                    name="slug" 
                    value="<?php echo e(old('slug')); ?>" 
                    required 
                    class="form-control"
                    placeholder="kpss-genel-kultur"
                >
            </div>

            <div class="form-group">
                <label class="form-label" for="description">Açıklama</label>
                <textarea 
                    id="description" 
                    name="description" 
                    rows="3" 
                    class="form-control"
                    placeholder="Kategori açıklaması..."
                ><?php echo e(old('description')); ?></textarea>
            </div>

            <div class="form-row">
                <div class="form-group">
                    <label class="form-label" for="icon">İkon (Emoji)</label>
                    <input 
                        type="text" 
                        id="icon" 
                        name="icon" 
                        value="<?php echo e(old('icon')); ?>"
                        class="form-control"
                        placeholder="📚"
                    >
                </div>
                <div class="form-group">
                    <label class="form-label" for="color">Renk</label>
                    <input 
                        type="text" 
                        id="color" 
                        name="color" 
                        value="<?php echo e(old('color')); ?>"
                        class="form-control"
                        placeholder="#3b82f6"
                    >
                </div>
            </div>

            <div class="form-group">
                <label class="form-label" for="time_limit">Süre Limiti (dakika)</label>
                <input 
                    type="number" 
                    id="time_limit" 
                    name="time_limit" 
                    value="<?php echo e(old('time_limit', 30)); ?>" 
                    min="1" 
                    max="180"
                    class="form-control form-control-sm"
                >
            </div>

            <div class="form-actions">
                <button type="submit" class="btn btn-primary">
                    <svg style="width:18px;height:18px" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
                    </svg>
                    Kategori Oluştur
                </button>
                <a href="<?php echo e(route('admin.interview-categories.index')); ?>" class="btn btn-secondary">
                    İptal
                </a>
            </div>
        </form>
    </div>
</div>

<?php $__env->startSection('scripts'); ?>
<script>
document.querySelector('[name="name"]').addEventListener('input', function() {
    const slug = this.value.toLowerCase()
        .replace(/ğ/g,'g').replace(/ü/g,'u').replace(/ş/g,'s')
        .replace(/ı/g,'i').replace(/ö/g,'o').replace(/ç/g,'c')
        .replace(/[^a-z0-9\s-]/g, '').trim().replace(/\s+/g, '-');
    document.querySelector('[name="slug"]').value = slug;
});
</script>
<?php $__env->stopSection(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\askeribilgiler\resources\views\admin\interview-categories\create.blade.php ENDPATH**/ ?>