File size: 71,496 Bytes
4416c29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
<!DOCTYPE html>
<html lang="fa" 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=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');
        
        body {
            font-family: 'Vazirmatn', sans-serif;
        }
        
        .road-progress {
            position: relative;
            height: 100px;
            margin: 40px 0;
        }
        
        .road-line {
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 8px;
            background-color: #e5e7eb;
            transform: translateY(-50%);
        }
        
        .progress-line {
            position: absolute;
            top: 50%;
            left: 0;
            width: 0%;
            height: 8px;
            background-color: #3b82f6;
            transform: translateY(-50%);
            transition: width 1s ease;
        }
        
        .car-icon {
            position: absolute;
            top: 50%;
            left: 0;
            transform: translate(-50%, -50%);
            font-size: 24px;
            color: #3b82f6;
            transition: left 1s ease;
        }
        
        .progress-point {
            position: absolute;
            top: 50%;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background-color: #e5e7eb;
            transform: translate(-50%, -50%);
        }
        
        .progress-point.active {
            background-color: #3b82f6;
        }
        
        .progress-label {
            position: absolute;
            top: 70px;
            transform: translateX(-50%);
            text-align: center;
            font-size: 14px;
            color: #6b7280;
        }
        
        .progress-label.active {
            color: #3b82f6;
            font-weight: 500;
        }
        
        .modal {
            display: none;
            position: fixed;
            z-index: 50;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
        }
        
        .modal-content {
            background-color: white;
            margin: 10% auto;
            padding: 20px;
            border-radius: 8px;
            width: 80%;
            max-width: 500px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        
        .close {
            color: #aaa;
            float: left;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }
        
        .close:hover {
            color: black;
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .tab-button.active {
            border-bottom: 2px solid #3b82f6;
            color: #3b82f6;
        }
        
        .sidebar-item.active {
            background-color: #eff6ff;
            color: #3b82f6;
            border-right: 3px solid #3b82f6;
        }
        
        .login-container {
            display: none;
            position: fixed;
            z-index: 50;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
        }
        
        .login-content {
            background-color: white;
            margin: 10% auto;
            padding: 20px;
            border-radius: 8px;
            width: 90%;
            max-width: 400px;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Header -->
    <header class="bg-white shadow-sm">
        <div class="container mx-auto px-4 py-3 flex justify-between items-center">
            <div class="flex items-center space-x-8">
                <h1 class="text-2xl font-bold text-blue-600">کارنپ</h1>
                <nav class="hidden md:flex space-x-6">
                    <a href="#" class="text-blue-600 font-medium">خانه</a>
                    <a href="#" class="text-gray-600 hover:text-blue-600">سوالات متداول</a>
                    <a href="#" class="text-gray-600 hover:text-blue-600">درباره ما</a>
                    <a href="#" class="text-gray-600 hover:text-blue-600">تماس با ما</a>
                </nav>
            </div>
            <button id="loginBtn" class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">
                ورود به حساب کاربری
            </button>
        </div>
    </header>

    <!-- Hero Section -->
    <section class="bg-white py-12">
        <div class="container mx-auto px-4 flex flex-col md:flex-row items-center">
            <div class="md:w-1/2 mb-8 md:mb-0">
                <img src="https://images.unsplash.com/photo-1583121274602-3e2820c6988f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" 
                     alt="تحویل خودرو" class="rounded-lg shadow-md w-full h-auto">
            </div>
            <div class="md:w-1/2 md:pr-8">
                <h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">تحویل خودرو با راننده - بدون دردسر، در محل شما</h2>
                <p class="text-gray-600 mb-6">راننده‌های ما خودروی شما را شخصاً می‌رانند و در محل مورد نظرتان تحویل می‌دهند</p>
                <button id="orderBtn" class="bg-blue-600 text-white px-6 py-3 rounded-md hover:bg-blue-700 transition">
                    ثبت سفارش
                </button>
            </div>
        </div>
    </section>

    <!-- Login Modal -->
    <div id="loginModal" class="login-container">
        <div class="login-content relative">
            <span class="close absolute left-4 top-2 text-2xl cursor-pointer">&times;</span>
            <h2 class="text-xl font-bold text-gray-800 mb-6 text-center">ورود به حساب کاربری</h2>
            <form id="loginForm" class="space-y-4">
                <div>
                    <label for="username" class="block text-sm font-medium text-gray-700 mb-1">نام کاربری</label>
                    <input type="text" id="username" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
                </div>
                <div>
                    <label for="password" class="block text-sm font-medium text-gray-700 mb-1">رمز عبور</label>
                    <input type="password" id="password" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
                </div>
                <button type="submit" class="w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition">
                    ورود
                </button>
            </form>
            <div id="loginError" class="mt-4 text-red-500 text-sm hidden">نام کاربری یا رمز عبور اشتباه است</div>
        </div>
    </div>

    <!-- Customer Dashboard -->
    <div id="customerDashboard" class="hidden">
        <div class="container mx-auto px-4 py-8 flex flex-col md:flex-row">
            <!-- Sidebar -->
            <div class="md:w-1/4 bg-white rounded-lg shadow-sm p-4 mb-6 md:mb-0 md:mr-6">
                <div class="space-y-2">
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="trackOrder">
                        پیگیری سفارش
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="newOrder">
                        سفارش جدید
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="orderHistory">
                        تاریخچه سفارشات
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="support">
                        پشتیبانی
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="rules">
                        قوانین
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="accounting">
                        حسابداری
                    </button>
                </div>
            </div>
            
            <!-- Main Content -->
            <div class="md:w-3/4 bg-white rounded-lg shadow-sm p-6">
                <!-- Track Order (Default Tab) -->
                <div id="trackOrder" class="tab-content active">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">پیگیری سفارش</h2>
                    <div class="road-progress">
                        <div class="road-line"></div>
                        <div class="progress-line" id="progressLine"></div>
                        <div class="car-icon" id="carIcon"><i class="fas fa-car"></i></div>
                        
                        <div class="progress-point" style="left: 0%;"></div>
                        <div class="progress-point" style="left: 25%;"></div>
                        <div class="progress-point" style="left: 75%;"></div>
                        <div class="progress-point" style="left: 100%;"></div>
                        
                        <div class="progress-label" style="left: 0%;">سفارش درحال بررسی است</div>
                        <div class="progress-label" style="left: 25%;">راننده به زودی خودرو را تحویل میگیرد</div>
                        <div class="progress-label" style="left: 75%;">راننده حرکت کرد</div>
                        <div class="progress-label" style="left: 100%;">خودرو به مقصد رسید</div>
                    </div>
                    
                    <div class="mt-8">
                        <h3 class="text-lg font-medium text-gray-800 mb-4">جزئیات سفارش</h3>
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                            <div>
                                <p class="text-gray-600">شماره سفارش: <span class="text-gray-800">CNP-2023-001</span></p>
                                <p class="text-gray-600">تاریخ ثبت سفارش: <span class="text-gray-800">1402/05/15</span></p>
                                <p class="text-gray-600">مبدا: <span class="text-gray-800">تهران</span></p>
                            </div>
                            <div>
                                <p class="text-gray-600">وضعیت سفارش: <span class="text-blue-600">در حال انجام</span></p>
                                <p class="text-gray-600">تاریخ تحویل: <span class="text-gray-800">1402/05/17</span></p>
                                <p class="text-gray-600">مقصد: <span class="text-gray-800">مشهد</span></p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- New Order -->
                <div id="newOrder" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">سفارش جدید</h2>
                    <form id="orderForm" class="space-y-4">
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                            <div>
                                <label for="origin" class="block text-sm font-medium text-gray-700 mb-1">مبدا</label>
                                <select id="origin" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
                                    <option value="">-- انتخاب کنید --</option>
                                    <option value="tehran">تهران</option>
                                    <option value="mashhad">مشهد</option>
                                    <option value="zahedan">زاهدان</option>
                                </select>
                            </div>
                            <div>
                                <label for="destination" class="block text-sm font-medium text-gray-700 mb-1">مقصد</label>
                                <select id="destination" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
                                    <option value="">-- انتخاب کنید --</option>
                                    <option value="tehran">تهران</option>
                                    <option value="mashhad">مشهد</option>
                                    <option value="zahedan">زاهدان</option>
                                </select>
                            </div>
                        </div>
                        
                        <div id="distanceResult" class="hidden bg-blue-50 p-4 rounded-md">
                            <p class="text-blue-800">فاصله بین مبدا و مقصد: <span id="distance">0</span> کیلومتر</p>
                            <p class="text-blue-800">هزینه سفر: <span id="cost">0</span> تومان</p>
                        </div>
                        
                        <div class="flex items-center mt-4">
                            <input type="checkbox" id="insurance" class="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500">
                            <label for="insurance" class="mr-2 text-sm font-medium text-gray-700">میخواهم از خدمات بیمه استفاده کنم</label>
                            <button type="button" id="insuranceInfoBtn" class="text-blue-500 hover:text-blue-700">
                                <i class="fas fa-question-circle"></i>
                            </button>
                        </div>
                        
                        <div id="finalCost" class="hidden bg-green-50 p-4 rounded-md mt-4">
                            <p class="text-green-800 font-medium">هزینه نهایی: <span id="totalCost">0</span> تومان</p>
                        </div>
                        
                        <button type="button" id="calculateBtn" class="bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 transition">
                            محاسبه هزینه
                        </button>
                        
                        <button type="button" id="paymentBtn" class="hidden bg-green-600 text-white px-6 py-2 rounded-md hover:bg-green-700 transition">
                            پرداخت وجه
                        </button>
                    </form>
                </div>
                
                <!-- Order History -->
                <div id="orderHistory" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">تاریخچه سفارشات</h2>
                    <div class="overflow-x-auto">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شماره سفارش</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مبدا</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مقصد</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاریخ</th>
                                    <th 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">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-001</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">تهران</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشهد</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/15</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">تکمیل شده</td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-002</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشهد</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">تهران</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/04/28</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">تکمیل شده</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                
                <!-- Support -->
                <div id="support" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">پشتیبانی</h2>
                    <div class="flex border-b mb-6">
                        <button class="tab-button px-4 py-2 font-medium text-gray-600 hover:text-blue-600" data-tab="supportTickets">پیگیری موارد</button>
                        <button class="tab-button px-4 py-2 font-medium text-gray-600 hover:text-blue-600" data-tab="newTicket">ثبت مورد جدید</button>
                    </div>
                    
                    <div id="supportTickets" class="tab-content active">
                        <div class="overflow-x-auto">
                            <table class="min-w-full divide-y divide-gray-200">
                                <thead class="bg-gray-50">
                                    <tr>
                                        <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">موضوع</th>
                                        <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاریخ ثبت</th>
                                        <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">وضعیت</th>
                                        <th 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">
                                    <tr>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشکل در پرداخت</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/10</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">پاسخ داده شده</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
                                            <button class="view-ticket-btn" data-ticket-id="1">مشاهده</button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">سوال درباره بیمه</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/05</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">پاسخ داده شده</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
                                            <button class="view-ticket-btn" data-ticket-id="2">مشاهده</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    
                    <div id="newTicket" class="tab-content">
                        <form id="ticketForm" class="space-y-4">
                            <div>
                                <label for="ticketSubject" class="block text-sm font-medium text-gray-700 mb-1">موضوع مشکل یا سوال</label>
                                <input type="text" id="ticketSubject" maxlength="40" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
                                <p class="text-xs text-gray-500 mt-1">حداکثر 40 حرف</p>
                            </div>
                            <div>
                                <label for="ticketDescription" class="block text-sm font-medium text-gray-700 mb-1">توضیح کامل سوال یا مشکل</label>
                                <textarea id="ticketDescription" rows="4" maxlength="500" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
                                <p class="text-xs text-gray-500 mt-1">حداکثر 500 حرف</p>
                            </div>
                            <div>
                                <label for="ticketFile" class="block text-sm font-medium text-gray-700 mb-1">بارگذاری مستندات (اختیاری)</label>
                                <input type="file" id="ticketFile" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
                                <p class="text-xs text-gray-500 mt-1">فایل‌های مجاز: عکس، ورد، پی دی اف (حداکثر 6 مگابایت)</p>
                            </div>
                            <button type="submit" class="bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 transition">
                                ثبت مورد
                            </button>
                        </form>
                    </div>
                </div>
                
                <!-- Rules -->
                <div id="rules" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">قوانین مشتری کارنپ</h2>
                    <div class="space-y-6">
                        <div>
                            <h3 class="text-lg font-medium text-gray-800 mb-2">مسئولیت اطلاعات خودرو</h3>
                            <p class="text-gray-600">اطلاعات مربوط به خودرو (شامل مدل، رنگ و پلاک) توسط مشتری ثبت می‌شود و اصالت این اطلاعات به‌عهده مشتری است.</p>
                        </div>
                        <div>
                            <h3 class="text-lg font-medium text-gray-800 mb-2">بارگذاری مدارک پس از ثبت سفارش</h3>
                            <p class="text-gray-600">پس از پرداخت اولیه، مشتری موظف است مدارک زیر را برای تأیید نهایی سفارش بارگذاری کند: کارت خودرو وکارت ملی درکنار هم دریک عکس.</p>
                        </div>
                        <div>
                            <h3 class="text-lg font-medium text-gray-800 mb-2">تأیید مدارک توسط کارشناس پشتیبانی</h3>
                            <p class="text-gray-600">تمام مدارک بارگذاری‌شده توسط تیم پشتیبانی سفارش‌ها بررسی و تأیید می‌شود. تا زمان تأیید، سفارش وارد مرحله اجرایی نمی‌شود.</p>
                        </div>
                        <div>
                            <h3 class="text-lg font-medium text-gray-800 mb-2">استفاده قانونی از خدمات</h3>
                            <p class="text-gray-600">مشتری موظف است خدمات کارنپ را تنها برای مقاصد قانونی استفاده کند. در صورت سوءاستفاده از خدمات کارنپ برای فعالیت‌های غیرقانونی (مانند جاسازی اشیای غیرمجاز)، کارنپ مجاز است خودرو و اطلاعات مرتبط را در اختیار مراجع قانونی قرار دهد و هیچ‌گونه مسئولیتی در این زمینه ندارد.</p>
                        </div>
                        <div>
                            <h3 class="text-lg font-medium text-gray-800 mb-2">لغو مأموریت</h3>
                            <p class="text-gray-600">در صورت لغو سفارش پس از تخصیص راننده، مبلغی به عنوان جریمه لغو از مبلغ پرداختی کسر خواهد شد (میزان آن بسته به شرایط مأموریت توسط کارنپ تعیین می‌شود).</p>
                        </div>
                        <div>
                            <h3 class="text-lg font-medium text-gray-800 mb-2">ثبت شکایات و بازخورد</h3>
                            <p class="text-gray-600">مشتری می‌تواند از طریق فرم‌های شکایات، نارضایتی یا تخلف راننده را اعلام کند. فرم امتیازدهی نیز شامل توضیح بازخورد است و فقط یک‌بار و غیرقابل‌ویرایش است.</p>
                        </div>
                        <div>
                            <h3 class="text-lg font-medium text-gray-800 mb-2">پرداخت خسارت در صورت بروز مشکل</h3>
                            <p class="text-gray-600">در صورتی که مشتری تقصیری در ایجاد خسارت نداشته باشد، کارنپ موظف است حداکثر ظرف ۱۹ روز پس از بررسی کارشناسی، خسارت را پرداخت نماید.</p>
                        </div>
                        <div>
                            <h3 class="text-lg font-medium text-gray-800 mb-2">عدم همکاری مستقیم با راننده</h3>
                            <p class="text-gray-600">مشتری حق ندارد خارج از بستر رسمی کارنپ با راننده همکاری مستقیم داشته باشد. در صورت تخلف، کارنپ هیچ‌گونه مسئولیتی در قبال خدمات ارائه‌شده نخواهد داشت.</p>
                        </div>
                    </div>
                </div>
                
                <!-- Accounting -->
                <div id="accounting" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">حسابداری</h2>
                    <div class="overflow-x-auto">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاریخ</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شرح</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مبلغ (تومان)</th>
                                    <th 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">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/15</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">سفارش CNP-2023-001</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">600,000</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">پرداخت شده</td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/04/28</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">سفارش CNP-2023-002</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">480,000</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">پرداخت شده</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Admin Dashboard -->
    <div id="adminDashboard" class="hidden">
        <div class="container mx-auto px-4 py-8 flex flex-col md:flex-row">
            <!-- Sidebar -->
            <div class="md:w-1/4 bg-white rounded-lg shadow-sm p-4 mb-6 md:mb-0 md:mr-6">
                <div class="space-y-2">
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminCurrentOrders">
                        سفارشات جاری
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminPastOrders">
                        سفارشات گذشته
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminCustomers">
                        مشتریان
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminVIPCustomers">
                        مشتریان وی آی پی
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminDrivers">
                        راننده ها
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminSupport">
                        پشتیبانی
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminFinancial">
                        مالی
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminReports">
                        گزارشات
                    </button>
                    <button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminStaff">
                        کارکنان
                    </button>
                </div>
            </div>
            
            <!-- Main Content -->
            <div class="md:w-3/4 bg-white rounded-lg shadow-sm p-6">
                <!-- Current Orders (Default Tab) -->
                <div id="adminCurrentOrders" class="tab-content active">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">سفارشات جاری</h2>
                    <div class="overflow-x-auto">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">کد رهگیری</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">سفارش دهنده</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تحویل گیرنده</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">پلاک خودرو</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">راننده</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاریخ تحویل</th>
                                    <th 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">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-003</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">علی محمدی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">رضا احمدی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12-345-67</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">محسن کریمی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/18</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm">
                                        <select class="border border-gray-300 rounded-md px-2 py-1">
                                            <option>کنسل شده</option>
                                            <option selected>تحویل شده</option>
                                            <option>مشکل دارد</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-004</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مریم حسینی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">سارا محمدی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">98-765-43</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">حسن رضایی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/19</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm">
                                        <select class="border border-gray-300 rounded-md px-2 py-1">
                                            <option>کنسل شده</option>
                                            <option>تحویل شده</option>
                                            <option selected>مشکل دارد</option>
                                        </select>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                
                <!-- Past Orders -->
                <div id="adminPastOrders" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">سفارشات گذشته</h2>
                    <div class="overflow-x-auto">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">کد رهگیری</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">سفارش دهنده</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تحویل گیرنده</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">پلاک خودرو</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">راننده</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاریخ تحویل</th>
                                    <th 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">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-001</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">محمد رضایی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">علی احمدی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12-345-67</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">رضا محمدی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/15</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">تحویل شده</td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-002</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">فاطمه حسینی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">زهرا محمدی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">98-765-43</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مریم کریمی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/04/28</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-red-500">کنسل شده</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                
                <!-- Customers -->
                <div id="adminCustomers" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">مشتریان</h2>
                    <div class="overflow-x-auto">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نام و نام خانوادگی</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شماره تلفن</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">کد ملی</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">آدرس</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">سفارشات</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مجموع واریزی ها</th>
                                    <th 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">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">محمد رضایی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09123456789</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1234567890</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">تهران، خیابان آزادی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">3</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1,800,000</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
                                        <button class="edit-customer-btn">ویرایش</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">فاطمه حسینی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09198765432</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">0987654321</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشهد، بلوار وکیل آباد</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1,200,000</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
                                        <button class="edit-customer-btn">ویرایش</button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                
                <!-- VIP Customers -->
                <div id="adminVIPCustomers" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">مشتریان وی آی پی</h2>
                    <div class="overflow-x-auto">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نام و نام خانوادگی</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شماره تلفن</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">کد ملی</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">آدرس</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">سفارشات</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مجموع واریزی ها</th>
                                    <th 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">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">علی محمدی</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09111111111</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1111111111</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">تهران، خیابان ولیعصر</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">6,000,000</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
                                        <button class="edit-customer-btn">ویرایش</button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                
                <!-- Drivers -->
                <div id="adminDrivers" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">راننده ها</h2>
                    <p class="text-gray-600 mb-4">این بخش در حال توسعه است و به زودی فعال خواهد شد.</p>
                </div>
                
                <!-- Admin Support -->
                <div id="adminSupport" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">پشتیبانی</h2>
                    <div class="flex border-b mb-6">
                        <button class="tab-button px-4 py-2 font-medium text-gray-600 hover:text-blue-600" data-tab="adminAnsweredTickets">تیکت های پاسخ داده شده</button>
                        <button class="tab-button px-4 py-2 font-medium text-gray-600 hover:text-blue-600" data-tab="adminNewTickets">تیکت جدید</button>
                    </div>
                    
                    <div id="adminAnsweredTickets" class="tab-content active">
                        <div class="overflow-x-auto">
                            <table class="min-w-full divide-y divide-gray-200">
                                <thead class="bg-gray-50">
                                    <tr>
                                        <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">موضوع</th>
                                        <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نام مشتری</th>
                                        <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شماره تلفن</th>
                                        <th 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">
                                    <tr>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشکل در پرداخت</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">محمد رضایی</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09123456789</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
                                            <button class="view-ticket-btn">پاسخ</button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">سوال درباره بیمه</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">فاطمه حسینی</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09198765432</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
                                            <button class="view-ticket-btn">پاسخ</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    
                    <div id="adminNewTickets" class="tab-content">
                        <div class="overflow-x-auto">
                            <table class="min-w-full divide-y divide-gray-200">
                                <thead class="bg-gray-50">
                                    <tr>
                                        <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">موضوع</th>
                                        <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نام مشتری</th>
                                        <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شماره تلفن</th>
                                        <th 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">
                                    <tr>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشکل در ثبت سفارش</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">علی محمدی</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09111111111</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
                                            <button class="view-ticket-btn">پاسخ</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                
                <!-- Financial -->
                <div id="adminFinancial" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">مالی</h2>
                    <p class="text-gray-600 mb-4">این بخش در حال توسعه است و به زودی فعال خواهد شد.</p>
                </div>
                
                <!-- Reports -->
                <div id="adminReports" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">گزارشات</h2>
                    <p class="text-gray-600 mb-4">این بخش در حال توسعه است و به زودی فعال خواهد شد.</p>
                </div>
                
                <!-- Staff -->
                <div id="adminStaff" class="tab-content">
                    <h2 class="text-xl font-bold text-gray-800 mb-6">کارکنان</h2>
                    <p class="text-gray-600 mb-4">این بخش در حال توسعه است و به زودی فعال خواهد شد.</p>
                </div>
            </div>
        </div>
    </div>

    <!-- Insurance Info Modal -->
    <div id="insuranceModal" class="modal">
        <div class="modal-content">
            <span class="close">&times;</span>
            <h3 class="text-lg font-bold text-gray-800 mb-4">اطلاعات بیمه</h3>
            <p class="text-gray-600">درصورت بروز حادثه و سانحه تا سقف ۷۰ میلیون تومان خسارت را کارنپ برعهده می‌گیرد</p>
        </div>
    </div>

    <!-- Ticket Info Modal -->
    <div id="ticketModal" class="modal">
        <div class="modal-content">
            <span class="close">&times;</span>
            <h3 class="text-lg font-bold text-gray-800 mb-4" id="ticketModalTitle">مشکل در پرداخت</h3>
            <div class="mb-4">
                <h4 class="font-medium text-gray-700 mb-1">توضیحات مشتری:</h4>
                <p class="text-gray-600" id="ticketModalDescription">نمیتوانم پرداخت را انجام دهم و خطا میگیرم</p>
            </div>
            <div class="mb-4">
                <h4 class="font-medium text-gray-700 mb-1">پاسخ پشتیبانی:</h4>
                <p class="text-gray-600">لطفاً از کارت بانکی دیگری استفاده نمایید. در صورت عدم حل مشکل، با پشتیبانی تماس بگیرید.</p>
            </div>
        </div>
    </div>

    <!-- Ticket Submitted Modal -->
    <div id="ticketSubmittedModal" class="modal">
        <div class="modal-content">
            <span class="close">&times;</span>
            <h3 class="text-lg font-bold text-gray-800 mb-4">تیکت با موفقیت ثبت شد</h3>
            <p class="text-gray-600">مشکل یا سوال شما برای پشتیبانی ارسال گردید. پاسخ آن به زودی در همین بخش نمایش داده می‌شود یا با شما تماس گرفته می‌شود.</p>
        </div>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-800 text-white py-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <h3 class="text-lg font-bold mb-4">کارنپ</h3>
                    <p class="text-gray-300">ما یک استارت اپ آنلاین مطمئن هستیم که قراره خودروی شما را با اطمینان به شما تحویل بدیم</p>
                </div>
                <div>
                    <h3 class="text-lg font-bold mb-4">دسترسی سریع</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-300 hover:text-white">پنل مشتری</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white">پنل رانندگان</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white">پنل مشتریان سازمانی</a></li>
                        <li><a href="#" class="text-gray-300 hover:text-white">نمایشگاه داران</a></li>
                        <li><button id="staffLoginBtn" class="text-gray-300 hover:text-white">پنل کارکنان</button></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-lg font-bold mb-4">تماس با ما</h3>
                    <ul class="space-y-2">
                        <li class="flex items-center">
                            <i class="fas fa-phone ml-2"></i>
                            <span>09157208247</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fas fa-envelope ml-2"></i>
                            <span>carnap.ir@gmail.com</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fas fa-map-marker-alt ml-2"></i>
                            <span>خراسان جنوبی، نهبندان، بلوار امام علی، پلاک 3</span>
                        </li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-lg font-bold mb-4">مجوزها</h3>
                    <div class="flex space-x-4">
                        <img src="https://trustseal.enamad.ir/logo.aspx?id=1234567890&p=1" alt="نماد اعتماد الکترونیکی" class="h-16">
                        <img src="https://www.zarinpal.com/trustLogo/1" alt="زرین پال" class="h-16">
                    </div>
                </div>
            </div>
            <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
                <p>© 2023 کارنپ. تمام حقوق محفوظ است.</p>
            </div>
        </div>
    </footer>

    <script>
        // Login Modal
        const loginBtn = document.getElementById('loginBtn');
        const loginModal = document.getElementById('loginModal');
        const closeLoginModal = document.querySelector('#loginModal .close');
        const loginForm = document.getElementById('loginForm');
        const loginError = document.getElementById('loginError');
        const customerDashboard = document.getElementById('customerDashboard');
        const adminDashboard = document.getElementById('adminDashboard');
        const orderBtn = document.getElementById('orderBtn');
        const staffLoginBtn = document.getElementById('staffLoginBtn');
        
        loginBtn.addEventListener('click', () => {
            loginModal.style.display = 'block';
        });
        
        closeLoginModal.addEventListener('click', () => {
            loginModal.style.display = 'none';
        });
        
        window.addEventListener('click', (e) => {
            if (e.target === loginModal) {
                loginModal.style.display = 'none';
            }
        });
        
        loginForm.addEventListener('submit', (e) => {
            e.preventDefault();
            const username = document.getElementById('username').value;
            const password = document.getElementById('password').value;
            
            if (username === 'saul' && password === 'saul') {
                // Customer login
                loginModal.style.display = 'none';
                customerDashboard.classList.remove('hidden');
                document.querySelector('.sidebar-item[data-tab="trackOrder"]').classList.add('active');
            } else if (username === 'adm' && password === 'adm') {
                // Admin login
                loginModal.style.display = 'none';
                adminDashboard.classList.remove('hidden');
                document.querySelector('.sidebar-item[data-tab="adminCurrentOrders"]').classList.add('active');
            } else {
                loginError.classList.remove('hidden');
            }
        });
        
        orderBtn.addEventListener('click', () => {
            loginModal.style.display = 'block';
        });
        
        staffLoginBtn.addEventListener('click', () => {
            loginModal.style.display = 'block';
        });
        
        // Customer Dashboard Tabs
        const customerTabButtons = document.querySelectorAll('.sidebar-item');
        customerTabButtons.forEach(button => {
            button.addEventListener('click', () => {
                // Remove active class from all buttons and tabs
                document.querySelectorAll('.sidebar-item').forEach(btn => btn.classList.remove('active'));
                document.querySelectorAll('.tab-content').forEach(tab => tab.classList.remove('active'));
                
                // Add active class to clicked button
                button.classList.add('active');
                
                // Show corresponding tab
                const tabId = button.getAttribute('data-tab');
                document.getElementById(tabId).classList.add('active');
            });
        });
        
        // Admin Dashboard Tabs
        const adminTabButtons = document.querySelectorAll('#adminDashboard .sidebar-item');
        adminTabButtons.forEach(button => {
            button.addEventListener('click', () => {
                // Remove active class from all buttons and tabs
                document.querySelectorAll('#adminDashboard .sidebar-item').forEach(btn => btn.classList.remove('active'));
                document.querySelectorAll('#adminDashboard .tab-content').forEach(tab => tab.classList.remove('active'));
                
                // Add active class to clicked button
                button.classList.add('active');
                
                // Show corresponding tab
                const tabId = button.getAttribute('data-tab');
                document.getElementById(tabId).classList.add('active');
            });
        });
        
        // Support Tabs
        const supportTabButtons = document.querySelectorAll('.tab-button');
        supportTabButtons.forEach(button => {
            button.addEventListener('click', () => {
                // Remove active class from all buttons and tabs
                document.querySelectorAll('.tab-button').forEach(btn => btn.classList.remove('active'));
                document.querySelectorAll('#support .tab-content').forEach(tab => tab.classList.remove('active'));
                
                // Add active class to clicked button
                button.classList.add('active');
                
                // Show corresponding tab
                const tabId = button.getAttribute('data-tab');
                document.getElementById(tabId).classList.add('active');
            });
        });
        
        // Admin Support Tabs
        const adminSupportTabButtons = document.querySelectorAll('#adminSupport .tab-button');
        adminSupportTabButtons.forEach(button => {
            button.addEventListener('click', () => {
                // Remove active class from all buttons and tabs
                document.querySelectorAll('#adminSupport .tab-button').forEach(btn => btn.classList.remove('active'));
                document.querySelectorAll('#adminSupport .tab-content').forEach(tab => tab.classList.remove('active'));
                
                // Add active class to clicked button
                button.classList.add('active');
                
                // Show corresponding tab
                const tabId = button.getAttribute('data-tab');
                document.getElementById(tabId).classList.add('active');
            });
        });
        
        // Insurance Info Modal
        const insuranceInfoBtn = document.getElementById('insuranceInfoBtn');
        const insuranceModal = document.getElementById('insuranceModal');
        const closeInsuranceModal = insuranceModal.querySelector('.close');
        
        insuranceInfoBtn.addEventListener('click', () => {
            insuranceModal.style.display = 'block';
        });
        
        closeInsuranceModal.addEventListener('click', () => {
            insuranceModal.style.display = 'none';
        });
        
        window.addEventListener('click', (e) => {
            if (e.target === insuranceModal) {
                insuranceModal.style.display = 'none';
            }
        });
        
        // Ticket Info Modal
        const ticketModal = document.getElementById('ticketModal');
        const closeTicketModal = ticketModal.querySelector('.close');
        const viewTicketButtons = document.querySelectorAll('.view-ticket-btn');
        
        viewTicketButtons.forEach(button => {
            button.addEventListener('click', () => {
                const ticketId = button.getAttribute('data-ticket-id');
                // Here you would normally fetch ticket data based on ticketId
                // For demo purposes, we'll just show the modal with sample data
                document.getElementById('ticketModalTitle').textContent = 'مشکل در پرداخت';
                document.getElementById('ticketModalDescription').textContent = 'نمیتوانم پرداخت را انجام دهم و خطا میگیرم';
                ticketModal.style.display = 'block';
            });
        });
        
        closeTicketModal.addEventListener('click', () => {
            ticketModal.style.display = 'none';
        });
        
        window.addEventListener('click', (e) => {
            if (e.target === ticketModal) {
                ticketModal.style.display = 'none';
            }
        });
        
        // Ticket Submitted Modal
        const ticketSubmittedModal = document.getElementById('ticketSubmittedModal');
        const closeTicketSubmittedModal = ticketSubmittedModal.querySelector('.close');
        const ticketForm = document.getElementById('ticketForm');
        
        ticketForm.addEventListener('submit', (e) => {
            e.preventDefault();
            ticketSubmittedModal.style.display = 'block';
            // Here you would normally submit the form data to the server
            // For demo purposes, we'll just show the success modal
        });
        
        closeTicketSubmittedModal.addEventListener('click', () => {
            ticketSubmittedModal.style.display = 'none';
        });
        
        window.addEventListener('click', (e) => {
            if (e.target === ticketSubmittedModal) {
                ticketSubmittedModal.style.display = 'none';
            }
        });
        
        // Order Form Calculation
        const originSelect = document.getElementById('origin');
        const destinationSelect = document.getElementById('destination');
        const distanceResult = document.getElementById('distanceResult');
        const distanceSpan = document.getElementById('distance');
        const costSpan = document.getElementById('cost');
        const insuranceCheckbox = document.getElementById('insurance');
        const finalCost = document.getElementById('finalCost');
        const totalCostSpan = document.getElementById('totalCost');
        const calculateBtn = document.getElementById('calculateBtn');
        const paymentBtn = document.getElementById('paymentBtn');
        
        // Distance between cities (in km)
        const distances = {
            'tehran-mashhad': 900,
            'tehran-zahedan': 1400,
            'mashhad-tehran': 900,
            'mashhad-zahedan': 600,
            'zahedan-tehran': 1400,
            'zahedan-mashhad': 600
        };
        
        calculateBtn.addEventListener('click', () => {
            const origin = originSelect.value;
            const destination = destinationSelect.value;
            
            if (!origin || !destination) {
                alert('لطفاً مبدا و مقصد را انتخاب کنید');
                return;
            }
            
            if (origin === destination) {
                alert('مبدا و مقصد نمی‌توانند یکسان باشند');
                return;
            }
            
            const distanceKey = `${origin}-${destination}`;
            const distance = distances[distanceKey];
            const cost = distance * 6000;
            
            distanceSpan.textContent = distance;
            costSpan.textContent = cost.toLocaleString();
            distanceResult.classList.remove('hidden');
            
            // Calculate total cost with insurance
            let totalCost = cost;
            if (insuranceCheckbox.checked) {
                totalCost += 250000;
            }
            
            totalCostSpan.textContent = totalCost.toLocaleString();
            finalCost.classList.remove('hidden');
            paymentBtn.classList.remove('hidden');
        });
        
        // Road Progress Animation
        const progressLine = document.getElementById('progressLine');
        const carIcon = document.getElementById('carIcon');
        
        // Animate progress line and car icon
        setTimeout(() => {
            progressLine.style.width = '75%';
            carIcon.style.left = '75%';
            
            // Update progress points
            document.querySelectorAll('.progress-point').forEach((point, index) => {
                if (index <= 2) {
                    point.classList.add('active');
                }
            });
            
            document.querySelectorAll('.progress-label').forEach((label, index) => {
                if (index <= 2) {
                    label.classList.add('active');
                }
            });
        }, 1000);
    </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=Saul7cold/aa" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>