<x-app-layout>
    <x-slot name="title">Agents</x-slot>
    <div class="mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
        <div>
            <h1 class="text-2xl font-bold text-gray-900">{{ $agent->name }}</h1>
            <p class="text-sm text-gray-500 mt-1">Agent Profile</p>
        </div>
        <div class="flex items-center gap-3">
            <a href="{{ route('agents.index') }}" class="text-gray-500 hover:text-gray-700 font-medium text-sm transition-colors">
                &larr; Back to Agents
            </a>
            <a href="{{ route('agents.edit', $agent->id) }}" class="inline-flex items-center justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-lg text-gray-700 bg-white hover:bg-gray-50">
                Edit Agent
            </a>
        </div>
    </div>

    <div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6">
        <h3 class="text-lg font-medium text-gray-900 mb-4 border-b pb-2">Agent Details</h3>
        <dl class="grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-6">
            <div>
                <dt class="text-sm font-medium text-gray-500">Name</dt>
                <dd class="mt-1 text-sm text-gray-900">{{ $agent->name }}</dd>
            </div>
            <div>
                <dt class="text-sm font-medium text-gray-500">Email</dt>
                <dd class="mt-1 text-sm text-gray-900">{{ $agent->email }}</dd>
            </div>
            <div>
                <dt class="text-sm font-medium text-gray-500">Role</dt>
                <dd class="mt-1 text-sm text-gray-900">{{ $agent->roles->pluck('name')->join(', ') }}</dd>
            </div>
        </dl>
    </div>
</x-app-layout>
