@if(!empty($node))
<div class="inline-block align-top {{ $level > 0 ? 'mt-8' : '' }}">
    <div class="text-center">
        <div class="inline-block bg-white border-2 border-green-500 rounded-lg shadow-md p-4 min-w-[160px]">
            <div class="font-semibold text-gray-800 text-sm mb-1">{{ $node['title'] }}</div>
            @if(!empty($node['assignee']))
            <div class="text-green-600 text-xs font-medium mb-1"><i class="fas fa-user mr-1"></i>{{ $node['assignee'] }}</div>
            @else
            <div class="text-gray-400 text-xs mb-1"><i class="fas fa-user-slash mr-1"></i>Vacant</div>
            @endif
            <div class="text-gray-400 text-xs">{{ $node['hierarchy_level_label'] }}</div>
        </div>
        @if(!empty($node['children']))
        <div class="flex justify-center mt-2 pt-4 border-t-2 border-green-300">
            @foreach($node['children'] as $child)
            <div class="px-2">
                @include('organization.organogram.partials.node', ['node' => $child, 'level' => $level + 1])
            </div>
            @endforeach
        </div>
        @endif
    </div>
</div>
@endif
