<?php $__env->startSection('title', 'My Profile'); ?>

<?php $__env->startSection('content'); ?>
<div class="d-flex justify-content-between align-items-center mb-4">
    <div>
        <h1 class="h3 mb-1 text-gray-800 fw-bold">Profile</h1>
        <p class="text-muted small">Your public profile details</p>
    </div>
</div>

<div class="row g-5">
     
    <div class="col-lg-4">
        <div class="card shadow border-0 text-center">
            <div class="card-body p-5">
                <img src="<?php echo e(Auth::user()->profile_image_path 
                    ? asset('storage/avatar/' . Auth::user()->profile_image_path) 
                    : asset('img/undraw_profile.svg')); ?>"
                     class="rounded-circle shadow-lg mb-4"
                     style="width: 180px; height: 180px; object-fit: cover; border: 6px solid #fff;"
                     alt="Profile Picture">

                <h4 class="fw-bold text-gray-800"><?php echo e(Auth::user()->name); ?></h4>
                <p class="text-muted"><?php echo e(Auth::user()->email); ?></p>

                <div class="mt-4">
                    <?php if(Auth::user()->isLogged == 1): ?>
                        <span class="badge bg-success fs-6 px-4 py-2">Online In-Game</span>
                    <?php else: ?>
                        <span class="badge bg-secondary fs-6 px-4 py-2">Offline</span>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>

     
    <div class="col-lg-8">
        <div class="card shadow border-0">
            <div class="card-header bg-gradient-primary text-white py-3">
                <h5 class="mb-0 fw-bold">Account Information</h5>
            </div>
            <div class="card-body p-4">
                <table class="table table-borderless align-middle">
                    <tbody>
                        <tr>
                            <th width="30%" class="text-gray-700">Username</th>
                            <td><?php echo e(Auth::user()->name); ?></td>
                        </tr>
                        <tr>
                            <th>Registered Email</th>
                            <td><?php echo e(Auth::user()->email); ?></td>
                        </tr>
                        <tr>
                            <th>Join Date</th>
                            <td>
                                <?php echo e(Auth::user()->created_at?->format('d M Y, H:i') ?? 'Unknown'); ?>

                            </td>
                        </tr>
                      
                        <tr>
                            <th>Client IP Address</th>
                            <td class="text-muted">
                                <?php echo e(Auth::user()->ip ?? 'Not recorded'); ?>

                            </td>
                        </tr>
                        <tr>
                            <th>Account Status</th>
                            <td>
                                <?php if(Auth::user()->isLogged == 1): ?>
                                    <span class="text-success fw-bold">Currently In-Game</span>
                                <?php else: ?>
                                    <span class="text-muted">Offline</span>
                                <?php endif; ?>
                            </td>
                        </tr>
                    </tbody>
                </table>

                <hr class="my-4">

                <div class="d-flex gap-3 flex-wrap">
                    <a href="<?php echo e(route('admin.profile.changepassword')); ?>" 
                       class="btn btn-outline-info px-5">
                        Change Password
                    </a>

                    <a href="<?php echo e(route('admin.profile.editprofile')); ?>" 
                       class="btn btn-primary px-5 shadow-sm">
                        Edit Profile
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>


<style>
    .card:hover {
        box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
        transition: all 0.3s ease;
    }
    .bg-gradient-primary {
        background: linear-gradient(90deg, #4e73df, #224abe) !important;
    }
</style>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('manage.admin.index', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp8.2\htdocs\MCCMS\resources\views/manage/admin/profile.blade.php ENDPATH**/ ?>