{{-- resources/views/users/show.blade.php --}}
@extends('layouts.app')

@section('title', 'Detalles del Usuario')

@section('content')
    <div class="container">
        <h1 class="mb-4 text-white"><i class="bi bi-person-fill me-2"></i> Detalles del Usuario</h1>

        <div class="row justify-content-center">
            <div class="col-md-8">
                <div class="card bg-dark shadow-lg text-white" style="border-radius: 15px; overflow: hidden;">
                    <div class="card-body p-0">
                        <div style="background: url('https://via.placeholder.com/800x200/343a40/6c757d?Text=Perfil+Usuario') center/cover; height: 200px; display: flex; align-items: center; justify-content: center;">
                            <i class="bi bi-person-circle display-1 text-white opacity-75"></i>
                        </div>
                        <div class="p-4">
                            <h2 class="card-title mb-3 text-center">{{ $user->alias }}</h2>
                            <hr class="my-4 bg-secondary">
                            <h5 class="card-subtitle mb-3 text-white"><i class="bi bi-info-circle-fill me-1"></i> Información del Usuario</h5>

                            <div class="mb-3 text-white">
                                <i class="bi bi-person-vcard-fill me-2"></i> <strong>Nombre Completo:</strong> {{ $user->nom_ape ?? '-' }}
                            </div>

                            <div class="mb-3 text-white">
                                <i class="bi bi-envelope-fill me-2"></i> <strong>Email:</strong> {{ $user->email }}
                            </div>

                            <div class="mb-3 text-white">
                                <i class="bi bi-person-badge-fill me-2"></i> <strong>Rol:</strong> {{ $user->rol ?? '-' }}
                            </div>

                            <div class="mb-3 text-white">
                                <i class="bi bi-phone-fill me-2"></i> <strong>Celular:</strong> {{ $user->cel_user ?? '-' }}
                            </div>

                            <div class="mb-3 text-white">
                                <i class="bi bi-key-fill me-2"></i> <strong>Token:</strong> {{ $user->token ?? '-' }}
                            </div>

                            <div class="mb-3 text-white">
                                <i class="bi bi-clock-fill me-2"></i> <strong>Creado en:</strong> {{ $user->created_at ? $user->created_at->format('d/m/Y H:i') : 'No especificado' }}
                            </div>

                            <div class="mb-3 text-white">
                                <i class="bi bi-arrow-repeat me-2"></i> <strong>Actualizado en:</strong> {{ $user->updated_at ? $user->updated_at->format('d/m/Y H:i') : 'No especificado' }}
                            </div>

                            <hr class="my-4 bg-secondary">
                            <div class="d-flex justify-content-end">
                                <a href="{{ route('users.index') }}" class="btn btn-secondary btn-sm shadow-sm"><i class="bi bi-arrow-left-circle me-2"></i> Volver a la Lista</a>
                                <a href="{{ route('users.edit', $user) }}" class="btn btn-primary btn-sm ms-2 shadow-sm"><i class="bi bi-pencil-square me-2"></i> Editar Usuario</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection