File size: 50,494 Bytes
03cade2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
<!DOCTYPE html>
<html dir="rtl" lang="ar">
<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 href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        body {
            font-family: 'Cairo', sans-serif;
            background-color: #fafafa;
        }
        .status-badge {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }
        .pending {
            background-color: #FFF3E0;
            color: #E65100;
        }
        .confirmed {
            background-color: #E3F2FD;
            color: #0D47A1;
        }
        .shipping {
            background-color: #EDE7F6;
            color: #4A148C;
        }
        .delivered {
            background-color: #E8F5E9;
            color: #1B5E20;
        }
        .cancelled {
            background-color: #FFEBEE;
            color: #B71C1C;
        }
        .channel-icon {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
        }
        .whatsapp {
            background-color: #25D366;
        }
        .instagram {
            background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D, #F56040, #F77737, #FCAF45, #FFDC80);
        }
        .facebook {
            background-color: #1877F2;
        }
        .manual {
            background-color: #1976D2;
        }
        .product-preview {
            background-color: #f5f5f5;
            border-radius: 4px;
            padding: 4px 8px;
            font-size: 12px;
        }
        .dropdown-content {
            display: none;
            position: absolute;
            left: 0;
            background-color: white;
            min-width: 160px;
            box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
            z-index: 1;
            border-radius: 4px;
        }
        .dropdown:hover .dropdown-content {
            display: block;
        }
        @media (max-width: 768px) {
            .hidden-mobile {
                display: none;
            }
        }
    </style>
</head>
<body class="text-right">
    <div class="container mx-auto px-4 py-6">
        <!-- Header Section -->
        <div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6 gap-4">
            <div>
                <h1 class="text-2xl font-bold text-gray-800">نظرة عامة على الطلبات</h1>
                <p class="text-gray-500 text-sm">إدارة وعرض جميع الطلبات في مكان واحد</p>
            </div>
            <div class="flex flex-wrap gap-2">
                <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center gap-2">
                    <i class="fas fa-plus"></i>
                    <span>إضافة طلب يدوي</span>
                </button>
                <button class="border border-gray-300 hover:bg-gray-50 text-gray-700 px-4 py-2 rounded-lg flex items-center gap-2">
                    <i class="fas fa-file-export"></i>
                    <span>تصدير البيانات</span>
                </button>
                <button class="border border-gray-300 hover:bg-gray-50 text-gray-700 p-2 rounded-lg">
                    <i class="fas fa-sync-alt"></i>
                </button>
            </div>
        </div>

        <!-- Date Range Selector -->
        <div class="flex flex-wrap gap-2 mb-6">
            <button class="bg-blue-100 text-blue-700 px-3 py-1 rounded-lg text-sm">اليوم</button>
            <button class="hover:bg-gray-100 text-gray-700 px-3 py-1 rounded-lg text-sm">الأسبوع</button>
            <button class="hover:bg-gray-100 text-gray-700 px-3 py-1 rounded-lg text-sm">الشهر</button>
            <button class="hover:bg-gray-100 text-gray-700 px-3 py-1 rounded-lg text-sm">مخصص</button>
        </div>

        <!-- Filter Section -->
        <div class="bg-white rounded-lg shadow-sm p-4 mb-6">
            <div class="flex flex-col md:flex-row gap-4 mb-4">
                <div class="relative flex-grow">
                    <input type="text" placeholder="البحث في الطلبات..." class="w-full border border-gray-300 rounded-lg pl-10 pr-4 py-2 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>
                <select class="border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                    <option value="">كل الحالات</option>
                    <option value="pending">معلق</option>
                    <option value="confirmed">مؤكد</option>
                    <option value="shipping">قيد الشحن</option>
                    <option value="delivered">تم التسليم</option>
                    <option value="cancelled">ملغي</option>
                </select>
                <select class="border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                    <option value="">كل القنوات</option>
                    <option value="whatsapp">واتساب</option>
                    <option value="instagram">انستغرام</option>
                    <option value="facebook">فيسبوك</option>
                    <option value="manual">يدوي</option>
                </select>
            </div>
            <div class="flex flex-col md:flex-row gap-4">
                <div class="flex items-center gap-2">
                    <span class="text-gray-600 text-sm">من:</span>
                    <input type="date" class="border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                </div>
                <div class="flex items-center gap-2">
                    <span class="text-gray-600 text-sm">إلى:</span>
                    <input type="date" class="border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                </div>
                <div class="flex items-center gap-2">
                    <span class="text-gray-600 text-sm">المبلغ:</span>
                    <input type="number" placeholder="الحد الأدنى" class="border border-gray-300 rounded-lg px-4 py-2 w-24 focus:outline-none focus:ring-2 focus:ring-blue-500">
                    <span class="text-gray-400">-</span>
                    <input type="number" placeholder="الحد الأقصى" class="border border-gray-300 rounded-lg px-4 py-2 w-24 focus:outline-none focus:ring-2 focus:ring-blue-500">
                </div>
                <button class="text-blue-600 hover:text-blue-800 text-sm flex items-center gap-1 mr-auto">
                    <span>فلتر متقدم</span>
                    <i class="fas fa-chevron-down"></i>
                </button>
            </div>
        </div>

        <!-- Statistics Cards -->
        <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
            <div class="bg-white rounded-lg shadow-sm p-4">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500 text-sm">إجمالي الطلبات</p>
                        <p class="text-2xl font-bold text-gray-800">1,248</p>
                    </div>
                    <div class="bg-blue-100 text-blue-700 rounded-full p-2">
                        <i class="fas fa-shopping-cart"></i>
                    </div>
                </div>
                <div class="mt-2">
                    <span class="text-green-500 text-sm flex items-center gap-1">
                        <i class="fas fa-arrow-up"></i>
                        <span>12 اليوم</span>
                    </span>
                </div>
            </div>
            <div class="bg-white rounded-lg shadow-sm p-4">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500 text-sm">الطلبات المعلقة</p>
                        <p class="text-2xl font-bold text-gray-800">42</p>
                    </div>
                    <div class="bg-orange-100 text-orange-700 rounded-full p-2">
                        <i class="fas fa-clock"></i>
                    </div>
                </div>
                <div class="mt-2">
                    <span class="text-red-500 text-sm flex items-center gap-1">
                        <i class="fas fa-exclamation-circle"></i>
                        <span>5 طلبات عاجلة</span>
                    </span>
                </div>
            </div>
            <div class="bg-white rounded-lg shadow-sm p-4">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500 text-sm">المبيعات اليوم</p>
                        <p class="text-2xl font-bold text-gray-800">$3,450</p>
                    </div>
                    <div class="bg-green-100 text-green-700 rounded-full p-2">
                        <i class="fas fa-chart-line"></i>
                    </div>
                </div>
                <div class="mt-2">
                    <span class="text-green-500 text-sm flex items-center gap-1">
                        <i class="fas fa-arrow-up"></i>
                        <span>8% عن الأمس</span>
                    </span>
                </div>
            </div>
            <div class="bg-white rounded-lg shadow-sm p-4">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500 text-sm">معدل التحويل</p>
                        <p class="text-2xl font-bold text-gray-800">24%</p>
                    </div>
                    <div class="bg-purple-100 text-purple-700 rounded-full p-2">
                        <i class="fas fa-percentage"></i>
                    </div>
                </div>
                <div class="mt-2">
                    <span class="text-green-500 text-sm flex items-center gap-1">
                        <i class="fas fa-arrow-up"></i>
                        <span>2% عن الأسبوع الماضي</span>
                    </span>
                </div>
            </div>
        </div>

        <!-- Bulk Actions (hidden by default) -->
        <div id="bulkActions" class="bg-blue-50 border border-blue-200 rounded-lg p-3 mb-4 hidden">
            <div class="flex flex-wrap items-center justify-between gap-3">
                <div class="flex items-center gap-2">
                    <span class="text-blue-700 font-medium">3 طلبات محددة</span>
                </div>
                <div class="flex flex-wrap gap-2">
                    <button class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded-lg text-sm flex items-center gap-1">
                        <i class="fas fa-truck"></i>
                        <span>إرسال للشحن</span>
                    </button>
                    <button class="bg-white hover:bg-gray-50 text-gray-700 border border-gray-300 px-3 py-1 rounded-lg text-sm flex items-center gap-1">
                        <i class="fas fa-sync-alt"></i>
                        <span>تحديث الحالة</span>
                    </button>
                    <button class="bg-white hover:bg-gray-50 text-gray-700 border border-gray-300 px-3 py-1 rounded-lg text-sm flex items-center gap-1">
                        <i class="fas fa-file-export"></i>
                        <span>تصدير المحدد</span>
                    </button>
                    <button class="bg-white hover:bg-gray-50 text-red-600 border border-gray-300 px-3 py-1 rounded-lg text-sm flex items-center gap-1">
                        <i class="fas fa-trash"></i>
                        <span>حذف المحدد</span>
                    </button>
                </div>
            </div>
        </div>

        <!-- Orders Table -->
        <div class="bg-white rounded-lg shadow-sm overflow-hidden">
            <div class="overflow-x-auto">
                <table class="min-w-full divide-y divide-gray-200">
                    <thead class="bg-gray-50">
                        <tr>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
                                <input type="checkbox" class="rounded text-blue-600 focus:ring-blue-500" onclick="toggleSelectAll(this)">
                            </th>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100" onclick="sortTable(1)">
                                <div class="flex items-center justify-end gap-1">
                                    <span>رقم الطلب</span>
                                    <i class="fas fa-sort text-gray-400"></i>
                                </div>
                            </th>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider hidden-mobile">
                                العميل
                            </th>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100 hidden-mobile" onclick="sortTable(3)">
                                <div class="flex items-center justify-end gap-1">
                                    <span>التاريخ</span>
                                    <i class="fas fa-sort text-gray-400"></i>
                                </div>
                            </th>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
                                الحالة
                            </th>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider hidden-mobile">
                                القناة
                            </th>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100 hidden-mobile" onclick="sortTable(6)">
                                <div class="flex items-center justify-end gap-1">
                                    <span>المبلغ</span>
                                    <i class="fas fa-sort text-gray-400"></i>
                                </div>
                            </th>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider hidden-mobile">
                                المنتجات
                            </th>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider hidden-mobile">
                                الشحن
                            </th>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
                                الإجراءات
                            </th>
                        </tr>
                    </thead>
                    <tbody class="bg-white divide-y divide-gray-200">
                        <!-- Order 1 -->
                        <tr class="hover:bg-gray-50">
                            <td class="px-6 py-4 whitespace-nowrap">
                                <input type="checkbox" class="row-checkbox rounded text-blue-600 focus:ring-blue-500" onchange="updateBulkActions()">
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <a href="#" class="text-blue-600 hover:text-blue-800 font-medium">ORD-2024-001</a>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="flex items-center justify-end">
                                    <div class="ml-4">
                                        <div class="text-sm font-medium text-gray-900">أحمد محمد</div>
                                        <div class="text-sm text-gray-500">+970591234567</div>
                                    </div>
                                    <div class="flex-shrink-0 h-10 w-10 rounded-full bg-gray-200 flex items-center justify-center">
                                        <i class="fas fa-user text-gray-600"></i>
                                    </div>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm text-gray-900">15/01/2024</div>
                                <div class="text-sm text-gray-500">12:30 م</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="status-badge pending">
                                    <i class="fas fa-clock mr-1"></i>
                                    معلق
                                </span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="channel-icon whatsapp">
                                    <i class="fab fa-whatsapp"></i>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm font-medium text-gray-900">$150.00</div>
                                <div class="text-sm text-gray-500">مدفوع</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="product-preview">2 منتجات</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm text-gray-900">رام الله</div>
                                <div class="text-sm text-gray-500">لم يتم الشحن</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <div class="dropdown relative">
                                    <button class="text-gray-400 hover:text-gray-600 p-1 rounded-full hover:bg-gray-100">
                                        <i class="fas fa-ellipsis-v"></i>
                                    </button>
                                    <div class="dropdown-content absolute mt-1 left-0">
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">عرض التفاصيل</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تعديل الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إرسال للشحن</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إلغاء الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تكرار الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">طباعة الفاتورة</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        
                        <!-- Order 2 -->
                        <tr class="hover:bg-gray-50">
                            <td class="px-6 py-4 whitespace-nowrap">
                                <input type="checkbox" class="row-checkbox rounded text-blue-600 focus:ring-blue-500" onchange="updateBulkActions()">
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <a href="#" class="text-blue-600 hover:text-blue-800 font-medium">ORD-2024-002</a>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="flex items-center justify-end">
                                    <div class="ml-4">
                                        <div class="text-sm font-medium text-gray-900">سارة خالد</div>
                                        <div class="text-sm text-gray-500">+970592345678</div>
                                    </div>
                                    <div class="flex-shrink-0 h-10 w-10 rounded-full bg-gray-200 flex items-center justify-center">
                                        <i class="fas fa-user text-gray-600"></i>
                                    </div>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm text-gray-900">14/01/2024</div>
                                <div class="text-sm text-gray-500">03:45 م</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="status-badge confirmed">
                                    <i class="fas fa-check mr-1"></i>
                                    مؤكد
                                </span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="channel-icon instagram">
                                    <i class="fab fa-instagram"></i>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm font-medium text-gray-900">$89.50</div>
                                <div class="text-sm text-gray-500">مدفوع</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="product-preview">1 منتج</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm text-gray-900">غزة</div>
                                <div class="text-sm text-gray-500">في انتظار الشحن</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <div class="dropdown relative">
                                    <button class="text-gray-400 hover:text-gray-600 p-1 rounded-full hover:bg-gray-100">
                                        <i class="fas fa-ellipsis-v"></i>
                                    </button>
                                    <div class="dropdown-content absolute mt-1 left-0">
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">عرض التفاصيل</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تعديل الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إرسال للشحن</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إلغاء الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تكرار الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">طباعة الفاتورة</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        
                        <!-- Order 3 -->
                        <tr class="hover:bg-gray-50">
                            <td class="px-6 py-4 whitespace-nowrap">
                                <input type="checkbox" class="row-checkbox rounded text-blue-600 focus:ring-blue-500" onchange="updateBulkActions()">
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <a href="#" class="text-blue-600 hover:text-blue-800 font-medium">ORD-2024-003</a>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="flex items-center justify-end">
                                    <div class="ml-4">
                                        <div class="text-sm font-medium text-gray-900">محمد علي</div>
                                        <div class="text-sm text-gray-500">+970593456789</div>
                                    </div>
                                    <div class="flex-shrink-0 h-10 w-10 rounded-full bg-gray-200 flex items-center justify-center">
                                        <i class="fas fa-user text-gray-600"></i>
                                    </div>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm text-gray-900">13/01/2024</div>
                                <div class="text-sm text-gray-500">10:15 ص</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="status-badge shipping">
                                    <i class="fas fa-truck mr-1"></i>
                                    قيد الشحن
                                </span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="channel-icon facebook">
                                    <i class="fab fa-facebook-f"></i>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm font-medium text-gray-900">$245.75</div>
                                <div class="text-sm text-gray-500">مدفوع</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="product-preview">3 منتجات</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm text-gray-900">الخليل</div>
                                <div class="text-sm text-gray-500">TRK123456789</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <div class="dropdown relative">
                                    <button class="text-gray-400 hover:text-gray-600 p-1 rounded-full hover:bg-gray-100">
                                        <i class="fas fa-ellipsis-v"></i>
                                    </button>
                                    <div class="dropdown-content absolute mt-1 left-0">
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">عرض التفاصيل</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تعديل الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إرسال للشحن</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إلغاء الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تكرار الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">طباعة الفاتورة</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        
                        <!-- Order 4 -->
                        <tr class="hover:bg-gray-50">
                            <td class="px-6 py-4 whitespace-nowrap">
                                <input type="checkbox" class="row-checkbox rounded text-blue-600 focus:ring-blue-500" onchange="updateBulkActions()">
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <a href="#" class="text-blue-600 hover:text-blue-800 font-medium">ORD-2024-004</a>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="flex items-center justify-end">
                                    <div class="ml-4">
                                        <div class="text-sm font-medium text-gray-900">ليلى أحمد</div>
                                        <div class="text-sm text-gray-500">+970594567890</div>
                                    </div>
                                    <div class="flex-shrink-0 h-10 w-10 rounded-full bg-gray-200 flex items-center justify-center">
                                        <i class="fas fa-user text-gray-600"></i>
                                    </div>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm text-gray-900">12/01/2024</div>
                                <div class="text-sm text-gray-500">05:20 م</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="status-badge delivered">
                                    <i class="fas fa-check-circle mr-1"></i>
                                    تم التسليم
                                </span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="channel-icon manual">
                                    <i class="fas fa-store"></i>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm font-medium text-gray-900">$320.00</div>
                                <div class="text-sm text-gray-500">مدفوع</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="product-preview">5 منتجات</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm text-gray-900">بيت لحم</div>
                                <div class="text-sm text-gray-500">تم التسليم</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <div class="dropdown relative">
                                    <button class="text-gray-400 hover:text-gray-600 p-1 rounded-full hover:bg-gray-100">
                                        <i class="fas fa-ellipsis-v"></i>
                                    </button>
                                    <div class="dropdown-content absolute mt-1 left-0">
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">عرض التفاصيل</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تعديل الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إرسال للشحن</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إلغاء الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تكرار الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">طباعة الفاتورة</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        
                        <!-- Order 5 -->
                        <tr class="hover:bg-gray-50">
                            <td class="px-6 py-4 whitespace-nowrap">
                                <input type="checkbox" class="row-checkbox rounded text-blue-600 focus:ring-blue-500" onchange="updateBulkActions()">
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <a href="#" class="text-blue-600 hover:text-blue-800 font-medium">ORD-2024-005</a>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="flex items-center justify-end">
                                    <div class="ml-4">
                                        <div class="text-sm font-medium text-gray-900">يوسف عمر</div>
                                        <div class="text-sm text-gray-500">+970595678901</div>
                                    </div>
                                    <div class="flex-shrink-0 h-10 w-10 rounded-full bg-gray-200 flex items-center justify-center">
                                        <i class="fas fa-user text-gray-600"></i>
                                    </div>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm text-gray-900">11/01/2024</div>
                                <div class="text-sm text-gray-500">02:10 م</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="status-badge cancelled">
                                    <i class="fas fa-times mr-1"></i>
                                    ملغي
                                </span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="channel-icon whatsapp">
                                    <i class="fab fa-whatsapp"></i>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm font-medium text-gray-900">$75.25</div>
                                <div class="text-sm text-gray-500">غير مدفوع</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="product-preview">1 منتج</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap hidden-mobile">
                                <div class="text-sm text-gray-900">نابلس</div>
                                <div class="text-sm text-gray-500">ملغي</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <div class="dropdown relative">
                                    <button class="text-gray-400 hover:text-gray-600 p-1 rounded-full hover:bg-gray-100">
                                        <i class="fas fa-ellipsis-v"></i>
                                    </button>
                                    <div class="dropdown-content absolute mt-1 left-0">
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">عرض التفاصيل</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تعديل الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إرسال للشحن</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إلغاء الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تكرار الطلب</a>
                                        <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">طباعة الفاتورة</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <!-- Pagination -->
            <div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
                <div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
                    <div>
                        <p class="text-sm text-gray-700">
                            عرض
                            <span class="font-medium">1</span>
                            إلى
                            <span class="font-medium">5</span>
                            من
                            <span class="font-medium">1248</span>
                            طلبات
                        </p>
                    </div>
                    <div>
                        <nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
                            <a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
                                <span class="sr-only">السابق</span>
                                <i class="fas fa-chevron-right"></i>
                            </a>
                            <a href="#" aria-current="page" class="z-10 bg-blue-50 border-blue-500 text-blue-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
                                1
                            </a>
                            <a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
                                2
                            </a>
                            <a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
                                3
                            </a>
                            <span class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">
                                ...
                            </span>
                            <a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
                                25
                            </a>
                            <a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
                                <span class="sr-only">التالي</span>
                                <i class="fas fa-chevron-left"></i>
                            </a>
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Mobile Order Cards (hidden on desktop) -->
    <div class="container mx-auto px-4 py-6 md:hidden">
        <div class="grid grid-cols-1 gap-4">
            <!-- Mobile Order Card 1 -->
            <div class="bg-white rounded-lg shadow-sm p-4">
                <div class="flex justify-between items-start mb-3">
                    <div>
                        <a href="#" class="text-blue-600 hover:text-blue-800 font-medium">ORD-2024-001</a>
                        <div class="text-sm text-gray-500 mt-1">15/01/2024 - 12:30 م</div>
                    </div>
                    <span class="status-badge pending">
                        <i class="fas fa-clock mr-1"></i>
                        معلق
                    </span>
                </div>
                
                <div class="flex justify-between items-center mb-3">
                    <div class="flex items-center">
                        <div class="channel-icon whatsapp mr-2">
                            <i class="fab fa-whatsapp"></i>
                        </div>
                        <div>
                            <div class="text-sm font-medium">أحمد محمد</div>
                            <div class="text-xs text-gray-500">+970591234567</div>
                        </div>
                    </div>
                    <div class="text-sm font-medium">$150.00</div>
                </div>
                
                <div class="flex justify-between items-center">
                    <div class="product-preview">2 منتجات</div>
                    <div class="text-xs text-gray-500">رام الله</div>
                </div>
                
                <div class="mt-3 pt-3 border-t border-gray-100">
                    <div class="flex justify-between">
                        <button class="text-blue-600 text-sm flex items-center">
                            <i class="fas fa-eye mr-1"></i>
                            التفاصيل
                        </button>
                        <div class="dropdown relative">
                            <button class="text-gray-400 hover:text-gray-600 p-1">
                                <i class="fas fa-ellipsis-v"></i>
                            </button>
                            <div class="dropdown-content absolute bottom-full left-0 mb-1">
                                <div class="bg-white shadow-lg rounded-md py-1 w-40">
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تعديل الطلب</a>
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إرسال للشحن</a>
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إلغاء الطلب</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Mobile Order Card 2 -->
            <div class="bg-white rounded-lg shadow-sm p-4">
                <div class="flex justify-between items-start mb-3">
                    <div>
                        <a href="#" class="text-blue-600 hover:text-blue-800 font-medium">ORD-2024-002</a>
                        <div class="text-sm text-gray-500 mt-1">14/01/2024 - 03:45 م</div>
                    </div>
                    <span class="status-badge confirmed">
                        <i class="fas fa-check mr-1"></i>
                        مؤكد
                    </span>
                </div>
                
                <div class="flex justify-between items-center mb-3">
                    <div class="flex items-center">
                        <div class="channel-icon instagram mr-2">
                            <i class="fab fa-instagram"></i>
                        </div>
                        <div>
                            <div class="text-sm font-medium">سارة خالد</div>
                            <div class="text-xs text-gray-500">+970592345678</div>
                        </div>
                    </div>
                    <div class="text-sm font-medium">$89.50</div>
                </div>
                
                <div class="flex justify-between items-center">
                    <div class="product-preview">1 منتج</div>
                    <div class="text-xs text-gray-500">غزة</div>
                </div>
                
                <div class="mt-3 pt-3 border-t border-gray-100">
                    <div class="flex justify-between">
                        <button class="text-blue-600 text-sm flex items-center">
                            <i class="fas fa-eye mr-1"></i>
                            التفاصيل
                        </button>
                        <div class="dropdown relative">
                            <button class="text-gray-400 hover:text-gray-600 p-1">
                                <i class="fas fa-ellipsis-v"></i>
                            </button>
                            <div class="dropdown-content absolute bottom-full left-0 mb-1">
                                <div class="bg-white shadow-lg rounded-md py-1 w-40">
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">تعديل الطلب</a>
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إرسال للشحن</a>
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">إلغاء الطلب</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Mobile Pagination -->
        <div class="mt-4 flex justify-between items-center">
            <button class="bg-white border border-gray-300 rounded px-3 py-1 text-sm">
                السابق
            </button>
            <span class="text-sm text-gray-700">الصفحة 1 من 25</span>
            <button class="bg-white border border-gray-300 rounded px-3 py-1 text-sm">
                التالي
            </button>
        </div>
    </div>

    <script>
        // Toggle select all checkboxes
        function toggleSelectAll(source) {
            const checkboxes = document.querySelectorAll('.row-checkbox');
            checkboxes.forEach(checkbox => {
                checkbox.checked = source.checked;
            });
            updateBulkActions();
        }

        // Show/hide bulk actions based on selected rows
        function updateBulkActions() {
            const checkboxes = document.querySelectorAll('.row-checkbox');
            const selectedCount = Array.from(checkboxes).filter(cb => cb.checked).length;
            const bulkActions = document.getElementById('bulkActions');
            
            if (selectedCount > 0) {
                bulkActions.classList.remove('hidden');
                bulkActions.querySelector('span').textContent = `${selectedCount} طلبات محددة`;
            } else {
                bulkActions.classList.add('hidden');
            }
        }

        // Simple table sorting (for demo purposes)
        function sortTable(columnIndex) {
            alert(`Sorting by column ${columnIndex} would be implemented here`);
        }

        // Mobile dropdown functionality
        document.addEventListener('click', function(e) {
            // Close all dropdowns when clicking outside
            if (!e.target.closest('.dropdown')) {
                document.querySelectorAll('.dropdown-content').forEach(dropdown => {
                    dropdown.style.display = 'none';
                });
            }
        });
    </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=alkobr55/secondproject" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>