<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>البروفايل - <?php echo e($user->name); ?></title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        .profile-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        .profile-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 20px 20px 0 0;
            padding: 2rem;
            text-align: center;
        }
        .profile-avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            border: 5px solid white;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            object-fit: cover;
        }
        .profile-info {
            padding: 2rem;
        }
        .info-item {
            padding: 1rem;
            border-bottom: 1px solid #eee;
            transition: all 0.3s ease;
        }
        .info-item:hover {
            background-color: #f8f9fa;
            transform: translateX(-5px);
        }
        .info-label {
            font-weight: 600;
            color: #495057;
            margin-bottom: 0.5rem;
        }
        .info-value {
            color: #6c757d;
        }
        .btn-edit {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 25px;
            padding: 0.75rem 2rem;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .btn-edit:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }
        .status-badge {
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.875rem;
            font-weight: 600;
        }
        .status-active {
            background-color: #d4edda;
            color: #155724;
        }
        .status-inactive {
            background-color: #f8d7da;
            color: #721c24;
        }
        .user-type-badge {
            background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.875rem;
            font-weight: 600;
        }
        .service-type-badge {
            background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.875rem;
            font-weight: 600;
        }
    </style>
</head>
<body>
    <div class="container py-5">
        <div class="row justify-content-center">
            <div class="col-lg-8">
                <div class="profile-card">
                    <!-- رأس البروفايل -->
                    <div class="profile-header">
                        <div class="mb-3">
                            <?php if($user->profile_image): ?>
                                <img src="<?php echo e(asset('storage/' . $user->profile_image)); ?>" alt="الصورة الشخصية" class="profile-avatar">
                            <?php else: ?>
                                <div class="profile-avatar d-flex align-items-center justify-content-center bg-light text-muted">
                                    <i class="fas fa-user fa-3x"></i>
                                </div>
                            <?php endif; ?>
                        </div>
                        <h2 class="mb-2"><?php echo e($user->name); ?></h2>
                        <p class="mb-0 opacity-75"><?php echo e($user->email); ?></p>
                    </div>

                    <!-- معلومات البروفايل -->
                    <div class="profile-info">
                        <!-- رسالة النجاح -->
                        <?php if(session('success')): ?>
                            <div class="alert alert-success alert-dismissible fade show" role="alert">
                                <i class="fas fa-check-circle me-2"></i>
                                <?php echo e(session('success')); ?>

                                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                            </div>
                        <?php endif; ?>

                        <!-- معلومات أساسية -->
                        <div class="row">
                            <div class="col-md-6">
                                <div class="info-item">
                                    <div class="info-label">
                                        <i class="fas fa-user me-2 text-primary"></i>
                                        الاسم
                                    </div>
                                    <div class="info-value"><?php echo e($user->name); ?></div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="info-item">
                                    <div class="info-label">
                                        <i class="fas fa-envelope me-2 text-primary"></i>
                                        البريد الإلكتروني
                                    </div>
                                    <div class="info-value"><?php echo e($user->email); ?></div>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="info-item">
                                    <div class="info-label">
                                        <i class="fas fa-phone me-2 text-primary"></i>
                                        رقم الهاتف
                                    </div>
                                    <div class="info-value">
                                        <?php echo e($user->phone ?: 'غير محدد'); ?>

                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="info-item">
                                    <div class="info-label">
                                        <i class="fas fa-calendar me-2 text-primary"></i>
                                        تاريخ التسجيل
                                    </div>
                                    <div class="info-value">
                                        <?php echo e($user->created_at->format('Y/m/d')); ?>

                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="info-item">
                                    <div class="info-label">
                                        <i class="fas fa-users me-2 text-primary"></i>
                                        نوع المستخدم
                                    </div>
                                    <div class="info-value">
                                        <?php if($user->user_type === 'admin'): ?>
                                            <span class="user-type-badge">مدير</span>
                                        <?php elseif($user->user_type === 'driver'): ?>
                                            <span class="user-type-badge">سائق</span>
                                        <?php elseif($user->user_type === 'restaurant_manager'): ?>
                                            <span class="user-type-badge">مدير مطعم</span>
                                        <?php elseif($user->user_type === 'gas_manager'): ?>
                                            <span class="user-type-badge">مدير مكتب غاز</span>
                                        <?php else: ?>
                                            <span class="user-type-badge">راكب</span>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="info-item">
                                    <div class="info-label">
                                        <i class="fas fa-cog me-2 text-primary"></i>
                                        نوع الخدمة
                                    </div>
                                    <div class="info-value">
                                        <?php if($user->service_type === 'taxi'): ?>
                                            <span class="service-type-badge">تاكسي</span>
                                        <?php elseif($user->service_type === 'restaurant'): ?>
                                            <span class="service-type-badge">مطعم</span>
                                        <?php elseif($user->service_type === 'gas'): ?>
                                            <span class="service-type-badge">غاز</span>
                                        <?php elseif($user->service_type === 'all'): ?>
                                            <span class="service-type-badge">جميع الخدمات</span>
                                        <?php else: ?>
                                            <span class="text-muted">غير محدد</span>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="info-item">
                                    <div class="info-label">
                                        <i class="fas fa-toggle-on me-2 text-primary"></i>
                                        الحالة
                                    </div>
                                    <div class="info-value">
                                        <?php if($user->status === 'active'): ?>
                                            <span class="status-badge status-active">نشط</span>
                                        <?php else: ?>
                                            <span class="status-badge status-inactive">غير نشط</span>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="info-item">
                                    <div class="info-label">
                                        <i class="fas fa-clock me-2 text-primary"></i>
                                        آخر تحديث
                                    </div>
                                    <div class="info-value">
                                        <?php echo e($user->updated_at->format('Y/m/d H:i')); ?>

                                    </div>
                                </div>
                            </div>
                        </div>

                        <?php if($user->notes): ?>
                        <div class="row">
                            <div class="col-12">
                                <div class="info-item">
                                    <div class="info-label">
                                        <i class="fas fa-sticky-note me-2 text-primary"></i>
                                        الملاحظات
                                    </div>
                                    <div class="info-value"><?php echo e($user->notes); ?></div>
                                </div>
                            </div>
                        </div>
                        <?php endif; ?>

                        <!-- أزرار الإجراءات -->
                        <div class="text-center mt-4">
                            <a href="<?php echo e(route('profile.edit')); ?>" class="btn btn-edit text-white me-3">
                                <i class="fas fa-edit me-2"></i>
                                تعديل البروفايل
                            </a>
                            <a href="<?php echo e(route('home')); ?>" class="btn btn-outline-secondary">
                                <i class="fas fa-home me-2"></i>
                                العودة للرئيسية
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
<?php /**PATH C:\wamp64\www\taxi_app\resources\views/profile/show.blade.php ENDPATH**/ ?>