@extends('admin::layouts.master')

@section('title', 'User Details')

@section('content')
    <div class="flex justify-between items-center mb-6">
        <h1 class="text-2xl font-bold">User Details</h1>
        <div class="space-x-2">
            <a href="{{ route('admin.users.edit', $user->id) }}" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">Edit</a>
            <a href="{{ route('admin.users.index') }}" class="bg-gray-500 text-white px-4 py-2 rounded hover:bg-gray-600">Back</a>
        </div>
    </div>

    <div class="bg-white rounded-lg shadow p-6 max-w-lg">
        <table class="w-full">
            <tr class="border-b">
                <td class="py-3 font-medium text-gray-600">ID</td>
                <td class="py-3">{{ $user->id }}</td>
            </tr>
            <tr class="border-b">
                <td class="py-3 font-medium text-gray-600">Name</td>
                <td class="py-3">{{ $user->name }}</td>
            </tr>
            <tr class="border-b">
                <td class="py-3 font-medium text-gray-600">Email</td>
                <td class="py-3">{{ $user->email }}</td>
            </tr>
            <tr class="border-b">
                <td class="py-3 font-medium text-gray-600">Created</td>
                <td class="py-3">{{ $user->created_at->format('Y-m-d H:i') }}</td>
            </tr>
            <tr>
                <td class="py-3 font-medium text-gray-600">Updated</td>
                <td class="py-3">{{ $user->updated_at->format('Y-m-d H:i') }}</td>
            </tr>
        </table>
    </div>
@endsection
