<div class="grid md:grid-cols-2 gap-5">
    <div class="md:col-span-2">
        <label class="text-sm font-medium">Question</label>
        <input name="question" value="{{ old('question', $faq->question ?? '') }}" class="w-full mt-1 rounded border-gray-300" required>
        @error('question') <p class="text-xs text-red-600 mt-1">{{ $message }}</p> @enderror
    </div>

    <div class="md:col-span-2">
        <label class="text-sm font-medium">Answer</label>
        <textarea name="answer" rows="5" class="w-full mt-1 rounded border-gray-300" required>{{ old('answer', $faq->answer ?? '') }}</textarea>
        @error('answer') <p class="text-xs text-red-600 mt-1">{{ $message }}</p> @enderror
    </div>

    <div>
        <label class="text-sm font-medium">Sort order</label>
        <input type="number" min="0" name="sort_order" value="{{ old('sort_order', $faq->sort_order ?? 0) }}" class="w-full mt-1 rounded border-gray-300">
        @error('sort_order') <p class="text-xs text-red-600 mt-1">{{ $message }}</p> @enderror
    </div>

    <div>
        <label class="inline-flex items-center gap-2 mt-7 text-sm">
            <input type="checkbox" name="is_active" value="1" {{ old('is_active', $faq->is_active ?? true) ? 'checked' : '' }}>
            Active
        </label>
    </div>
</div>
