File size: 31,336 Bytes
32be294
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>نظام إدارة الموظفين</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');
        
        body {
            font-family: 'Tajawal', sans-serif;
            background-color: #f5f7fa;
        }
        
        .sidebar {
            transition: all 0.3s;
        }
        
        .sidebar-item:hover {
            background-color: rgba(59, 130, 246, 0.1);
        }
        
        .active-sidebar-item {
            background-color: rgba(59, 130, 246, 0.2);
            border-right: 4px solid #3b82f6;
        }
        
        .dropdown-content {
            display: none;
            transition: all 0.3s;
        }
        
        .dropdown:hover .dropdown-content {
            display: block;
        }
        
        .employee-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
        
        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }
        
        ::-webkit-scrollbar-track {
            background: #f1f1f1;
        }
        
        ::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: #555;
        }
    </style>
</head>
<body class="flex h-screen bg-gray-50">
    <!-- Sidebar -->
    <div class="sidebar w-64 bg-white shadow-lg flex flex-col">
        <!-- Logo -->
        <div class="p-4 flex items-center justify-center border-b">
            <div class="flex items-center">
                <i class="fas fa-users-cog text-blue-500 text-2xl mr-2"></i>
                <span class="text-xl font-bold text-gray-800">إدارة الموظفين</span>
            </div>
        </div>
        
        <!-- User Profile -->
        <div class="p-4 flex items-center border-b">
            <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center">
                <i class="fas fa-user text-blue-500 text-xl"></i>
            </div>
            <div class="mr-3">
                <p class="font-medium text-gray-800">المدير العام</p>
                <p class="text-sm text-gray-500">صلاحية: مدير</p>
            </div>
        </div>
        
        <!-- Navigation -->
        <div class="flex-1 overflow-y-auto">
            <ul class="py-2">
                <li class="px-2">
                    <a href="#" class="sidebar-item active-sidebar-item flex items-center p-3 rounded-lg">
                        <i class="fas fa-users text-blue-500 ml-2"></i>
                        <span>الموظفين</span>
                    </a>
                </li>
                <li class="px-2 mt-1">
                    <div class="dropdown">
                        <a href="#" class="sidebar-item flex items-center justify-between p-3 rounded-lg">
                            <div class="flex items-center">
                                <i class="fas fa-chart-line text-blue-500 ml-2"></i>
                                <span>التقارير</span>
                            </div>
                            <i class="fas fa-chevron-down text-xs text-gray-500"></i>
                        </a>
                        <div class="dropdown-content mr-8 mt-1 bg-white rounded-lg shadow-lg py-1">
                            <a href="#" class="block px-4 py-2 text-sm hover:bg-blue-50">تقرير الحضور</a>
                            <a href="#" class="block px-4 py-2 text-sm hover:bg-blue-50">تقرير المهام</a>
                            <a href="#" class="block px-4 py-2 text-sm hover:bg-blue-50">تقرير الأداء</a>
                        </div>
                    </div>
                </li>
                <li class="px-2 mt-1">
                    <a href="#" class="sidebar-item flex items-center p-3 rounded-lg">
                        <i class="fas fa-cog text-blue-500 ml-2"></i>
                        <span>الإعدادات</span>
                    </a>
                </li>
            </ul>
        </div>
        
        <!-- Logout -->
        <div class="p-4 border-t">
            <a href="#" class="flex items-center text-red-500 p-2 rounded-lg hover:bg-red-50">
                <i class="fas fa-sign-out-alt ml-2"></i>
                <span>تسجيل الخروج</span>
            </a>
        </div>
    </div>
    
    <!-- Main Content -->
    <div class="flex-1 flex flex-col overflow-hidden">
        <!-- Top Navigation -->
        <header class="bg-white shadow-sm">
            <div class="flex items-center justify-between p-4">
                <div class="flex items-center">
                    <button class="text-gray-500 focus:outline-none lg:hidden">
                        <i class="fas fa-bars"></i>
                    </button>
                    <h1 class="text-xl font-bold text-gray-800 mr-4">قائمة الموظفين</h1>
                </div>
                <div class="flex items-center">
                    <div class="relative mr-4">
                        <input type="text" placeholder="بحث..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
                        <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
                    </div>
                    <button class="p-2 text-gray-500 hover:text-gray-700 focus:outline-none">
                        <i class="fas fa-bell"></i>
                    </button>
                </div>
            </div>
        </header>
        
        <!-- Content -->
        <main class="flex-1 overflow-y-auto p-6 bg-gray-50">
            <!-- Header and Add Button -->
            <div class="flex justify-between items-center mb-6">
                <h2 class="text-2xl font-bold text-gray-800">إدارة الموظفين</h2>
                <button onclick="openAddEmployeeModal()" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg flex items-center">
                    <i class="fas fa-plus ml-2"></i>
                    إضافة موظف جديد
                </button>
            </div>
            
            <!-- Filters -->
            <div class="bg-white p-4 rounded-lg shadow mb-6">
                <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">نوع الموظف</label>
                        <select class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                            <option value="">الكل</option>
                            <option value="manager">مدير</option>
                            <option value="branch_manager">مدير فرع</option>
                            <option value="supervisor">متابع</option>
                            <option value="representative">مندوب</option>
                            <option value="client">عميل</option>
                        </select>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">الدور</label>
                        <select class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                            <option value="">الكل</option>
                            <option value="admin">إداري</option>
                            <option value="finance">مالي</option>
                            <option value="hr">موارد بشرية</option>
                            <option value="sales">مبيعات</option>
                        </select>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">حالة الحساب</label>
                        <select class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                            <option value="">الكل</option>
                            <option value="active">نشط</option>
                            <option value="inactive">غير نشط</option>
                        </select>
                    </div>
                    <div class="flex items-end">
                        <button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg w-full">
                            تطبيق الفلتر
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- Employees Grid -->
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                <!-- Employee Card 1 -->
                <div class="employee-card bg-white rounded-lg shadow overflow-hidden transition duration-300">
                    <div class="p-4 border-b flex items-center">
                        <div class="w-16 h-16 rounded-full bg-blue-100 flex items-center justify-center">
                            <i class="fas fa-user-tie text-blue-500 text-2xl"></i>
                        </div>
                        <div class="mr-3 flex-1">
                            <h3 class="font-bold text-lg">أحمد محمد</h3>
                            <p class="text-sm text-gray-500">مدير عام</p>
                        </div>
                        <div class="dropdown relative">
                            <button class="text-gray-500 hover:text-gray-700 focus:outline-none">
                                <i class="fas fa-ellipsis-v"></i>
                            </button>
                            <div class="dropdown-content absolute left-0 mt-2 w-40 bg-white rounded-lg shadow-lg py-1 z-10 hidden">
                                <a href="#" class="block px-4 py-2 text-sm hover:bg-blue-50">تعديل</a>
                                <a href="#" class="block px-4 py-2 text-sm hover:bg-blue-50">تعطيل</a>
                                <a href="#" class="block px-4 py-2 text-sm text-red-500 hover:bg-red-50">حذف</a>
                            </div>
                        </div>
                    </div>
                    <div class="p-4">
                        <div class="flex items-center mb-2">
                            <i class="fas fa-id-card text-gray-400 ml-2"></i>
                            <span>EMP-001</span>
                        </div>
                        <div class="flex items-center mb-2">
                            <i class="fas fa-envelope text-gray-400 ml-2"></i>
                            <span>ahmed@example.com</span>
                        </div>
                        <div class="flex items-center mb-2">
                            <i class="fas fa-phone text-gray-400 ml-2"></i>
                            <span>+966501234567</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fas fa-calendar-alt text-gray-400 ml-2"></i>
                            <span>تاريخ الإضافة: 15/03/2023</span>
                        </div>
                    </div>
                    <div class="px-4 py-2 bg-gray-50 flex justify-between items-center">
                        <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">نشط</span>
                        <div class="flex space-x-2 space-x-reverse">
                            <button class="text-blue-500 hover:text-blue-700">
                                <i class="fas fa-eye"></i>
                            </button>
                            <button class="text-yellow-500 hover:text-yellow-700">
                                <i class="fas fa-edit"></i>
                            </button>
                            <button class="text-red-500 hover:text-red-700">
                                <i class="fas fa-trash"></i>
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- Employee Card 2 -->
                <div class="employee-card bg-white rounded-lg shadow overflow-hidden transition duration-300">
                    <div class="p-4 border-b flex items-center">
                        <div class="w-16 h-16 rounded-full bg-green-100 flex items-center justify-center">
                            <i class="fas fa-user-shield text-green-500 text-2xl"></i>
                        </div>
                        <div class="mr-3 flex-1">
                            <h3 class="font-bold text-lg">خالد عبدالله</h3>
                            <p class="text-sm text-gray-500">مدير فرع</p>
                        </div>
                        <div class="dropdown relative">
                            <button class="text-gray-500 hover:text-gray-700 focus:outline-none">
                                <i class="fas fa-ellipsis-v"></i>
                            </button>
                            <div class="dropdown-content absolute left-0 mt-2 w-40 bg-white rounded-lg shadow-lg py-1 z-10 hidden">
                                <a href="#" class="block px-4 py-2 text-sm hover:bg-blue-50">تعديل</a>
                                <a href="#" class="block px-4 py-2 text-sm hover:bg-blue-50">تعطيل</a>
                                <a href="#" class="block px-4 py-2 text-sm text-red-500 hover:bg-red-50">حذف</a>
                            </div>
                        </div>
                    </div>
                    <div class="p-4">
                        <div class="flex items-center mb-2">
                            <i class="fas fa-id-card text-gray-400 ml-2"></i>
                            <span>EMP-002</span>
                        </div>
                        <div class="flex items-center mb-2">
                            <i class="fas fa-envelope text-gray-400 ml-2"></i>
                            <span>khaled@example.com</span>
                        </div>
                        <div class="flex items-center mb-2">
                            <i class="fas fa-phone text-gray-400 ml-2"></i>
                            <span>+966501234568</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fas fa-calendar-alt text-gray-400 ml-2"></i>
                            <span>تاريخ الإضافة: 20/03/2023</span>
                        </div>
                    </div>
                    <div class="px-4 py-2 bg-gray-50 flex justify-between items-center">
                        <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">نشط</span>
                        <div class="flex space-x-2 space-x-reverse">
                            <button class="text-blue-500 hover:text-blue-700">
                                <i class="fas fa-eye"></i>
                            </button>
                            <button class="text-yellow-500 hover:text-yellow-700">
                                <i class="fas fa-edit"></i>
                            </button>
                            <button class="text-red-500 hover:text-red-700">
                                <i class="fas fa-trash"></i>
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- Employee Card 3 (Client) -->
                <div class="employee-card bg-white rounded-lg shadow overflow-hidden transition duration-300">
                    <div class="p-4 border-b flex items-center">
                        <div class="w-16 h-16 rounded-full bg-purple-100 flex items-center justify-center">
                            <i class="fas fa-user text-purple-500 text-2xl"></i>
                        </div>
                        <div class="mr-3 flex-1">
                            <h3 class="font-bold text-lg">شركة التقنية المحدودة</h3>
                            <p class="text-sm text-gray-500">عميل</p>
                        </div>
                        <div class="dropdown relative">
                            <button class="text-gray-500 hover:text-gray-700 focus:outline-none">
                                <i class="fas fa-ellipsis-v"></i>
                            </button>
                            <div class="dropdown-content absolute left-0 mt-2 w-40 bg-white rounded-lg shadow-lg py-1 z-10 hidden">
                                <a href="#" class="block px-4 py-2 text-sm hover:bg-blue-50">تعديل</a>
                                <a href="#" class="block px-4 py-2 text-sm hover:bg-blue-50">تعطيل</a>
                                <a href="#" class="block px-4 py-2 text-sm text-red-500 hover:bg-red-50">حذف</a>
                            </div>
                        </div>
                    </div>
                    <div class="p-4">
                        <div class="flex items-center mb-2">
                            <i class="fas fa-id-card text-gray-400 ml-2"></i>
                            <span>CLI-001</span>
                        </div>
                        <div class="flex items-center mb-2">
                            <i class="fas fa-user text-gray-400 ml-2"></i>
                            <span>المسؤول: محمد علي</span>
                        </div>
                        <div class="flex items-center mb-2">
                            <i class="fas fa-phone text-gray-400 ml-2"></i>
                            <span>+966112345678</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fas fa-map-marker-alt text-gray-400 ml-2"></i>
                            <span>الرياض - حي العليا</span>
                        </div>
                    </div>
                    <div class="px-4 py-2 bg-gray-50 flex justify-between items-center">
                        <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">نشط</span>
                        <div class="flex space-x-2 space-x-reverse">
                            <button class="text-blue-500 hover:text-blue-700">
                                <i class="fas fa-eye"></i>
                            </button>
                            <button class="text-yellow-500 hover:text-yellow-700">
                                <i class="fas fa-edit"></i>
                            </button>
                            <button class="text-red-500 hover:text-red-700">
                                <i class="fas fa-trash"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Pagination -->
            <div class="mt-8 flex justify-center">
                <nav class="flex items-center space-x-2 space-x-reverse">
                    <button class="px-3 py-1 rounded-lg border hover:bg-gray-100">
                        <i class="fas fa-chevron-right"></i>
                    </button>
                    <button class="px-3 py-1 rounded-lg bg-blue-500 text-white">1</button>
                    <button class="px-3 py-1 rounded-lg border hover:bg-gray-100">2</button>
                    <button class="px-3 py-1 rounded-lg border hover:bg-gray-100">3</button>
                    <button class="px-3 py-1 rounded-lg border hover:bg-gray-100">
                        <i class="fas fa-chevron-left"></i>
                    </button>
                </nav>
            </div>
        </main>
    </div>
    
    <!-- Add Employee Modal -->
    <div id="addEmployeeModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-lg w-full max-w-2xl max-h-screen overflow-y-auto">
            <div class="p-4 border-b flex justify-between items-center">
                <h3 class="text-lg font-bold">إضافة موظف جديد</h3>
                <button onclick="closeAddEmployeeModal()" class="text-gray-500 hover:text-gray-700">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            <div class="p-6">
                <form id="employeeForm">
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">نوع الحساب*</label>
                            <select id="accountType" name="accountType" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
                                <option value="">اختر نوع الحساب</option>
                                <option value="manager">مدير</option>
                                <option value="branch_manager">مدير فرع</option>
                                <option value="supervisor">متابع</option>
                                <option value="representative">مندوب</option>
                                <option value="client">عميل</option>
                            </select>
                        </div>
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">الدور*</label>
                            <select name="role" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
                                <option value="">اختر الدور</option>
                                <option value="admin">إداري</option>
                                <option value="finance">مالي</option>
                                <option value="hr">موارد بشرية</option>
                                <option value="sales">مبيعات</option>
                                <option value="operations">عمليات</option>
                            </select>
                        </div>
                    </div>
                    
                    <div class="mt-6">
                        <h4 class="font-medium text-gray-700 mb-3">المعلومات الأساسية</h4>
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">الاسم الأول*</label>
                                <input type="text" name="firstName" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">الاسم الأخير*</label>
                                <input type="text" name="lastName" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">البريد الإلكتروني*</label>
                                <input type="email" name="email" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">رقم الجوال*</label>
                                <input type="tel" name="phone" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Client Specific Fields (hidden by default) -->
                    <div id="clientFields" class="mt-6 hidden">
                        <h4 class="font-medium text-gray-700 mb-3">معلومات العميل</h4>
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">اسم الشركة*</label>
                                <input type="text" name="companyName" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">اسم المسؤول*</label>
                                <input type="text" name="responsiblePerson" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                            </div>
                            <div class="md:col-span-2">
                                <label class="block text-sm font-medium text-gray-700 mb-1">عنوان العميل*</label>
                                <textarea name="clientAddress" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500" rows="2"></textarea>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mt-6">
                        <h4 class="font-medium text-gray-700 mb-3">معلومات الحساب</h4>
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">اسم المستخدم*</label>
                                <input type="text" name="username" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">كلمة المرور*</label>
                                <div class="relative">
                                    <input type="password" name="password" class="w-full border rounded-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
                                    <button type="button" class="absolute left-3 top-3 text-gray-400 hover:text-gray-600" onclick="togglePassword(this)">
                                        <i class="fas fa-eye"></i>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mt-8 flex justify-end space-x-3 space-x-reverse">
                        <button type="button" onclick="closeAddEmployeeModal()" class="px-4 py-2 border rounded-lg hover:bg-gray-100">
                            إلغاء
                        </button>
                        <button type="submit" class="px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600">
                            حفظ الموظف
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    
    <script>
        // Toggle dropdown menus
        document.querySelectorAll('.dropdown button').forEach(button => {
            button.addEventListener('click', function() {
                const dropdownContent = this.nextElementSibling;
                dropdownContent.classList.toggle('hidden');
            });
        });
        
        // Close dropdowns when clicking outside
        document.addEventListener('click', function(event) {
            if (!event.target.matches('.dropdown button')) {
                document.querySelectorAll('.dropdown-content').forEach(content => {
                    content.classList.add('hidden');
                });
            }
        });
        
        // Add Employee Modal Functions
        function openAddEmployeeModal() {
            document.getElementById('addEmployeeModal').classList.remove('hidden');
        }
        
        function closeAddEmployeeModal() {
            document.getElementById('addEmployeeModal').classList.add('hidden');
        }
        
        // Toggle password visibility
        function togglePassword(button) {
            const passwordInput = button.previousElementSibling;
            if (passwordInput.type === 'password') {
                passwordInput.type = 'text';
                button.innerHTML = '<i class="fas fa-eye-slash"></i>';
            } else {
                passwordInput.type = 'password';
                button.innerHTML = '<i class="fas fa-eye"></i>';
            }
        }
        
        // Show/hide client fields based on account type
        document.getElementById('accountType').addEventListener('change', function() {
            const clientFields = document.getElementById('clientFields');
            if (this.value === 'client') {
                clientFields.classList.remove('hidden');
                
                // Make client fields required
                clientFields.querySelectorAll('input, textarea').forEach(field => {
                    field.required = true;
                });
            } else {
                clientFields.classList.add('hidden');
                
                // Remove required from client fields
                clientFields.querySelectorAll('input, textarea').forEach(field => {
                    field.required = false;
                });
            }
        });
        
        // Form submission
        document.getElementById('employeeForm').addEventListener('submit', function(e) {
            e.preventDefault();
            alert('تم حفظ بيانات الموظف بنجاح');
            closeAddEmployeeModal();
            this.reset();
        });
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Azad95/https-huggingface-co-spaces-azad95-https-huggingface-co-spaces-azad95-spaces-apps-mursal" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>