@extends('layouts.dashboard')
@section('title', 'Categories')
@section('page-title', 'Categories')
@section('content')
<div class="content-card">
    <div class="content-card-header">
        <h3>Category Tree (Unlimited Nesting)</h3>
        <a href="{{ route('admin.categories.create') }}" class="btn btn-primary btn-sm">+ Add Category</a>
    </div>

    @if($tree->isEmpty())
        <p class="text-muted text-center py-4">No categories yet. Create your first one above.</p>
    @else
        <ul class="cat-tree">
            @include('admin.categories._node', ['nodes' => $tree])
        </ul>
    @endif
</div>
@endsection
