Spaces:
Running

File size: 80,758 Bytes
ab0677f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Digital Karnet - Credit Management System</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue@3.2.47/dist/vue.global.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .coke-red {
            background-color: #F40009;
        }
        .coke-red-text {
            color: #F40009;
        }
        .coke-dark-red {
            background-color: #D7000F;
        }
        .coke-dark-red-text {
            color: #D7000F;
        }
        .coke-white {
            background-color: #FFFFFF;
        }
        .coke-white-text {
            color: #FFFFFF;
        }
        .coke-black {
            background-color: #000000;
        }
        .coke-black-text {
            color: #000000;
        }
        .coke-silver {
            background-color: #A7A8AA;
        }
        .coke-silver-text {
            color: #A7A8AA;
        }
        
        .sidebar {
            transition: all 0.3s ease;
        }
        
        .sidebar.collapsed {
            width: 70px;
        }
        
        .sidebar.collapsed .nav-text {
            display: none;
        }
        
        .sidebar.collapsed .logo-text {
            display: none;
        }
        
        .sidebar.collapsed .nav-item {
            justify-content: center;
        }
        
        .page-enter-active,
        .page-leave-active {
            transition: opacity 0.2s ease;
        }
        
        .page-enter-from,
        .page-leave-to {
            opacity: 0;
        }
        
        .fade-enter-active,
        .fade-leave-active {
            transition: opacity 0.3s ease;
        }
        
        .fade-enter-from,
        .fade-leave-to {
            opacity: 0;
        }
        
        .slide-fade-enter-active {
            transition: all 0.3s ease-out;
        }
        
        .slide-fade-leave-active {
            transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
        }
        
        .slide-fade-enter-from,
        .slide-fade-leave-to {
            transform: translateX(20px);
            opacity: 0;
        }
        
        .status-badge {
            padding: 0.25rem 0.5rem;
            border-radius: 0.375rem;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .status-paid {
            background-color: #D1FAE5;
            color: #065F46;
        }
        
        .status-partial {
            background-color: #FEF3C7;
            color: #92400E;
        }
        
        .status-unpaid {
            background-color: #FEE2E2;
            color: #B91C1C;
        }
        
        .scrollbar-hide::-webkit-scrollbar {
            display: none;
        }
        
        .scrollbar-hide {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
    </style>
</head>
<body class="bg-gray-50">
    <div id="app">
        <!-- Mobile Sidebar Overlay -->
        <div v-if="mobileSidebarOpen" @click="mobileSidebarOpen = false" class="fixed inset-0 z-20 bg-black bg-opacity-50 lg:hidden"></div>
        
        <!-- Sidebar -->
        <aside class="sidebar fixed inset-y-0 left-0 z-30 flex flex-col w-64 bg-white border-r border-gray-200 transition-all duration-300 ease-in-out" :class="{ 'collapsed': sidebarCollapsed, '-translate-x-full lg:translate-x-0': !mobileSidebarOpen }">
            <!-- Logo -->
            <div class="flex items-center justify-between px-4 py-3 border-b border-gray-200">
                <div class="flex items-center">
                    <div class="w-10 h-10 rounded-full coke-red flex items-center justify-center">
                        <i class="fas fa-receipt text-white text-xl"></i>
                    </div>
                    <span class="logo-text ml-3 text-xl font-bold coke-dark-red-text">Digital Karnet</span>
                </div>
                <button @click="toggleSidebar" class="p-1 rounded-md text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
                    <i class="fas fa-bars"></i>
                </button>
            </div>
            
            <!-- User Profile -->
            <div class="flex items-center px-4 py-3 border-b border-gray-200">
                <div class="w-10 h-10 rounded-full bg-gray-300 flex items-center justify-center">
                    <i class="fas fa-user text-gray-600"></i>
                </div>
                <div class="ml-3">
                    <p class="text-sm font-medium text-gray-900">Merchant Name</p>
                    <p class="text-xs text-gray-500">Premium Account</p>
                </div>
            </div>
            
            <!-- Navigation -->
            <nav class="flex-1 overflow-y-auto">
                <div class="px-2 py-4">
                    <div class="space-y-1">
                        <router-link to="/" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'">
                            <i class="fas fa-home mr-3 flex-shrink-0" :class="currentRoute === '/' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i>
                            <span class="nav-text">Dashboard</span>
                        </router-link>
                        
                        <router-link to="/clients" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/clients' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'">
                            <i class="fas fa-users mr-3 flex-shrink-0" :class="currentRoute === '/clients' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i>
                            <span class="nav-text">Clients</span>
                        </router-link>
                        
                        <router-link to="/credits" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/credits' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'">
                            <i class="fas fa-file-invoice-dollar mr-3 flex-shrink-0" :class="currentRoute === '/credits' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i>
                            <span class="nav-text">Credits</span>
                        </router-link>
                        
                        <router-link to="/payments" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/payments' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'">
                            <i class="fas fa-money-bill-wave mr-3 flex-shrink-0" :class="currentRoute === '/payments' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i>
                            <span class="nav-text">Payments</span>
                        </router-link>
                        
                        <router-link to="/notifications" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/notifications' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'">
                            <i class="fas fa-bell mr-3 flex-shrink-0" :class="currentRoute === '/notifications' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i>
                            <span class="nav-text">Notifications</span>
                        </router-link>
                    </div>
                    
                    <div class="mt-8">
                        <h3 class="px-3 text-xs font-semibold text-gray-500 uppercase tracking-wider">Reports</h3>
                        <div class="mt-1 space-y-1">
                            <router-link to="/reports" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/reports' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'">
                                <i class="fas fa-chart-bar mr-3 flex-shrink-0" :class="currentRoute === '/reports' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i>
                                <span class="nav-text">Analytics</span>
                            </router-link>
                            
                            <router-link to="/debtors" class="nav-item group flex items-center px-2 py-2 text-sm font-medium rounded-md" :class="currentRoute === '/debtors' ? 'bg-red-50 text-red-700' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'">
                                <i class="fas fa-exclamation-triangle mr-3 flex-shrink-0" :class="currentRoute === '/debtors' ? 'text-red-500' : 'text-gray-400 group-hover:text-gray-500'"></i>
                                <span class="nav-text">Top Debtors</span>
                            </router-link>
                        </div>
                    </div>
                </div>
            </nav>
            
            <!-- Bottom Section -->
            <div class="px-4 py-3 border-t border-gray-200">
                <button @click="logout" class="group flex items-center w-full px-2 py-2 text-sm font-medium text-gray-600 rounded-md hover:bg-gray-50 hover:text-gray-900">
                    <i class="fas fa-sign-out-alt mr-3 text-gray-400 group-hover:text-gray-500"></i>
                    <span class="nav-text">Logout</span>
                </button>
            </div>
        </aside>
        
        <!-- Main Content -->
        <div class="lg:ml-64 flex flex-col min-h-screen" :class="{ 'lg:ml-20': sidebarCollapsed }">
            <!-- Top Navigation -->
            <header class="sticky top-0 z-10 flex-shrink-0 flex h-16 bg-white shadow">
                <button @click="mobileSidebarOpen = true" class="border-r border-gray-200 px-4 text-gray-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-red-500 lg:hidden">
                    <span class="sr-only">Open sidebar</span>
                    <i class="fas fa-bars"></i>
                </button>
                
                <div class="flex-1 px-4 flex justify-between">
                    <div class="flex-1 flex">
                        <div class="flex w-full md:ml-0">
                            <div class="relative w-full text-gray-400 focus-within:text-gray-600">
                                <div class="absolute inset-y-0 left-0 flex items-center pointer-events-none">
                                    <i class="fas fa-search"></i>
                                </div>
                                <input id="search-field" class="block w-full h-full pl-8 pr-3 py-2 border-transparent text-gray-900 placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-0 focus:border-transparent sm:text-sm" placeholder="Search" type="search" name="search">
                            </div>
                        </div>
                    </div>
                    
                    <div class="ml-4 flex items-center md:ml-6">
                        <button type="button" class="bg-white p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
                            <span class="sr-only">View notifications</span>
                            <i class="fas fa-bell"></i>
                        </button>
                        
                        <!-- Profile dropdown -->
                        <div class="ml-3 relative">
                            <div>
                                <button @click="profileDropdownOpen = !profileDropdownOpen" type="button" class="max-w-xs bg-white flex items-center text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
                                    <span class="sr-only">Open user menu</span>
                                    <div class="w-8 h-8 rounded-full bg-gray-300 flex items-center justify-center">
                                        <i class="fas fa-user text-gray-600"></i>
                                    </div>
                                </button>
                            </div>
                            
                            <transition enter-active-class="transition ease-out duration-100" enter-from-class="transform opacity-0 scale-95" enter-to-class="transform opacity-100 scale-100" leave-active-class="transition ease-in duration-75" leave-from-class="transform opacity-100 scale-100" leave-to-class="transform opacity-0 scale-95">
                                <div v-show="profileDropdownOpen" class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem" tabindex="-1" id="user-menu-item-0">Your Profile</a>
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem" tabindex="-1" id="user-menu-item-1">Settings</a>
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem" tabindex="-1" id="user-menu-item-2">Sign out</a>
                                </div>
                            </transition>
                        </div>
                    </div>
                </div>
            </header>
            
            <!-- Page Content -->
            <main class="flex-1">
                <div class="py-6">
                    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                        <!-- Page Header -->
                        <div class="md:flex md:items-center md:justify-between mb-6">
                            <div class="flex-1 min-w-0">
                                <h1 class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:truncate">
                                    <span v-if="currentRoute === '/'">Dashboard</span>
                                    <span v-if="currentRoute === '/clients'">Clients</span>
                                    <span v-if="currentRoute === '/credits'">Credits</span>
                                    <span v-if="currentRoute === '/payments'">Payments</span>
                                    <span v-if="currentRoute === '/notifications'">Notifications</span>
                                    <span v-if="currentRoute === '/reports'">Reports</span>
                                    <span v-if="currentRoute === '/debtors'">Top Debtors</span>
                                </h1>
                            </div>
                            <div class="mt-4 flex md:mt-0 md:ml-4">
                                <button v-if="currentRoute === '/clients'" @click="showAddClientModal = true" type="button" class="ml-3 inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white coke-red hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
                                    <i class="fas fa-plus mr-2"></i> Add Client
                                </button>
                                <button v-if="currentRoute === '/credits'" @click="showAddCreditModal = true" type="button" class="ml-3 inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white coke-red hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
                                    <i class="fas fa-plus mr-2"></i> Add Credit
                                </button>
                                <button v-if="currentRoute === '/payments'" @click="showAddPaymentModal = true" type="button" class="ml-3 inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white coke-red hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
                                    <i class="fas fa-plus mr-2"></i> Record Payment
                                </button>
                            </div>
                        </div>
                        
                        <!-- Router View -->
                        <div class="bg-white shadow rounded-lg p-6">
                            <transition name="fade" mode="out-in">
                                <router-view></router-view>
                            </transition>
                        </div>
                    </div>
                </div>
            </main>
        </div>
        
        <!-- Add Client Modal -->
        <div v-if="showAddClientModal" class="fixed z-50 inset-0 overflow-y-auto">
            <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
                <div class="fixed inset-0 transition-opacity" aria-hidden="true">
                    <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
                </div>
                
                <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
                
                <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
                    <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
                        <div class="sm:flex sm:items-start">
                            <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10">
                                <i class="fas fa-user-plus text-red-600"></i>
                            </div>
                            <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
                                <h3 class="text-lg leading-6 font-medium text-gray-900">Add New Client</h3>
                                <div class="mt-2">
                                    <form class="space-y-4">
                                        <div>
                                            <label for="client-name" class="block text-sm font-medium text-gray-700">Full Name</label>
                                            <input type="text" id="client-name" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
                                        </div>
                                        <div>
                                            <label for="client-phone" class="block text-sm font-medium text-gray-700">Phone Number</label>
                                            <input type="tel" id="client-phone" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
                                        </div>
                                        <div>
                                            <label for="client-address" class="block text-sm font-medium text-gray-700">Address (Optional)</label>
                                            <textarea id="client-address" rows="3" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"></textarea>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
                        <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 coke-red text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm">
                            Save Client
                        </button>
                        <button @click="showAddClientModal = false" type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
                            Cancel
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Add Credit Modal -->
        <div v-if="showAddCreditModal" class="fixed z-50 inset-0 overflow-y-auto">
            <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
                <div class="fixed inset-0 transition-opacity" aria-hidden="true">
                    <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
                </div>
                
                <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
                
                <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
                    <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
                        <div class="sm:flex sm:items-start">
                            <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10">
                                <i class="fas fa-file-invoice-dollar text-red-600"></i>
                            </div>
                            <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
                                <h3 class="text-lg leading-6 font-medium text-gray-900">Add New Credit</h3>
                                <div class="mt-2">
                                    <form class="space-y-4">
                                        <div>
                                            <label for="credit-client" class="block text-sm font-medium text-gray-700">Client</label>
                                            <select id="credit-client" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md">
                                                <option>Select a client</option>
                                                <option>Amina El Khattabi</option>
                                                <option>Mohammed Benali</option>
                                                <option>Fatima Zahra</option>
                                            </select>
                                        </div>
                                        <div>
                                            <label for="credit-amount" class="block text-sm font-medium text-gray-700">Amount (MAD)</label>
                                            <input type="number" id="credit-amount" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
                                        </div>
                                        <div>
                                            <label for="credit-due-date" class="block text-sm font-medium text-gray-700">Due Date</label>
                                            <input type="date" id="credit-due-date" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
                                        </div>
                                        <div>
                                            <label for="credit-description" class="block text-sm font-medium text-gray-700">Description</label>
                                            <textarea id="credit-description" rows="3" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="Items purchased, terms, etc."></textarea>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
                        <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 coke-red text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm">
                            Save Credit
                        </button>
                        <button @click="showAddCreditModal = false" type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
                            Cancel
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Add Payment Modal -->
        <div v-if="showAddPaymentModal" class="fixed z-50 inset-0 overflow-y-auto">
            <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
                <div class="fixed inset-0 transition-opacity" aria-hidden="true">
                    <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
                </div>
                
                <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
                
                <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
                    <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
                        <div class="sm:flex sm:items-start">
                            <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10">
                                <i class="fas fa-money-bill-wave text-red-600"></i>
                            </div>
                            <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
                                <h3 class="text-lg leading-6 font-medium text-gray-900">Record Payment</h3>
                                <div class="mt-2">
                                    <form class="space-y-4">
                                        <div>
                                            <label for="payment-client" class="block text-sm font-medium text-gray-700">Client</label>
                                            <select id="payment-client" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md">
                                                <option>Select a client</option>
                                                <option>Amina El Khattabi</option>
                                                <option>Mohammed Benali</option>
                                                <option>Fatima Zahra</option>
                                            </select>
                                        </div>
                                        <div>
                                            <label for="payment-amount" class="block text-sm font-medium text-gray-700">Amount (MAD)</label>
                                            <input type="number" id="payment-amount" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
                                        </div>
                                        <div>
                                            <label for="payment-date" class="block text-sm font-medium text-gray-700">Payment Date</label>
                                            <input type="date" id="payment-date" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md">
                                        </div>
                                        <div>
                                            <label for="payment-method" class="block text-sm font-medium text-gray-700">Payment Method</label>
                                            <select id="payment-method" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md">
                                                <option>Cash</option>
                                                <option>Bank Transfer</option>
                                                <option>Mobile Payment</option>
                                                <option>Check</option>
                                            </select>
                                        </div>
                                        <div>
                                            <label for="payment-notes" class="block text-sm font-medium text-gray-700">Notes</label>
                                            <textarea id="payment-notes" rows="2" class="mt-1 focus:ring-red-500 focus:border-red-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="Any additional notes"></textarea>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
                        <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 coke-red text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm">
                            Record Payment
                        </button>
                        <button @click="showAddPaymentModal = false" type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
                            Cancel
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        const { createApp, ref, computed } = Vue;
        
        // Define routes
        const routes = {
            '/': {
                template: `
                    <div>
                        <div class="grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4 mb-6">
                            <!-- Total Clients Card -->
                            <div class="bg-white overflow-hidden shadow rounded-lg">
                                <div class="px-4 py-5 sm:p-6">
                                    <div class="flex items-center">
                                        <div class="flex-shrink-0 bg-red-500 rounded-md p-3">
                                            <i class="fas fa-users text-white"></i>
                                        </div>
                                        <div class="ml-5 w-0 flex-1">
                                            <dt class="text-sm font-medium text-gray-500 truncate">Total Clients</dt>
                                            <dd class="flex items-baseline">
                                                <div class="text-2xl font-semibold text-gray-900">142</div>
                                                <div class="ml-2 flex items-baseline text-sm font-semibold text-green-600">
                                                    <i class="fas fa-arrow-up text-xs"></i>
                                                    <span class="sr-only">Increased by</span>
                                                    12%
                                                </div>
                                            </dd>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <!-- Active Credits Card -->
                            <div class="bg-white overflow-hidden shadow rounded-lg">
                                <div class="px-4 py-5 sm:p-6">
                                    <div class="flex items-center">
                                        <div class="flex-shrink-0 bg-red-500 rounded-md p-3">
                                            <i class="fas fa-file-invoice-dollar text-white"></i>
                                        </div>
                                        <div class="ml-5 w-0 flex-1">
                                            <dt class="text-sm font-medium text-gray-500 truncate">Active Credits</dt>
                                            <dd class="flex items-baseline">
                                                <div class="text-2xl font-semibold text-gray-900">87</div>
                                                <div class="ml-2 flex items-baseline text-sm font-semibold text-red-600">
                                                    <i class="fas fa-arrow-up text-xs"></i>
                                                    <span class="sr-only">Increased by</span>
                                                    5%
                                                </div>
                                            </dd>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <!-- Total Outstanding Card -->
                            <div class="bg-white overflow-hidden shadow rounded-lg">
                                <div class="px-4 py-5 sm:p-6">
                                    <div class="flex items-center">
                                        <div class="flex-shrink-0 bg-red-500 rounded-md p-3">
                                            <i class="fas fa-money-bill-wave text-white"></i>
                                        </div>
                                        <div class="ml-5 w-0 flex-1">
                                            <dt class="text-sm font-medium text-gray-500 truncate">Total Outstanding</dt>
                                            <dd class="flex items-baseline">
                                                <div class="text-2xl font-semibold text-gray-900">24,560 MAD</div>
                                                <div class="ml-2 flex items-baseline text-sm font-semibold text-green-600">
                                                    <i class="fas fa-arrow-down text-xs"></i>
                                                    <span class="sr-only">Decreased by</span>
                                                    3.2%
                                                </div>
                                            </dd>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <!-- Overdue Payments Card -->
                            <div class="bg-white overflow-hidden shadow rounded-lg">
                                <div class="px-4 py-5 sm:p-6">
                                    <div class="flex items-center">
                                        <div class="flex-shrink-0 bg-red-500 rounded-md p-3">
                                            <i class="fas fa-exclamation-triangle text-white"></i>
                                        </div>
                                        <div class="ml-5 w-0 flex-1">
                                            <dt class="text-sm font-medium text-gray-500 truncate">Overdue Payments</dt>
                                            <dd class="flex items-baseline">
                                                <div class="text-2xl font-semibold text-gray-900">12</div>
                                                <div class="ml-2 flex items-baseline text-sm font-semibold text-red-600">
                                                    <i class="fas fa-arrow-up text-xs"></i>
                                                    <span class="sr-only">Increased by</span>
                                                    2
                                                </div>
                                            </dd>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Recent Activity -->
                        <div class="bg-white shadow rounded-lg mb-6">
                            <div class="px-4 py-5 sm:px-6 border-b border-gray-200">
                                <h3 class="text-lg leading-6 font-medium text-gray-900">Recent Activity</h3>
                            </div>
                            <div class="bg-white overflow-hidden">
                                <ul class="divide-y divide-gray-200">
                                    <li v-for="activity in recentActivities" :key="activity.id" class="px-4 py-4 sm:px-6">
                                        <div class="flex items-center">
                                            <div class="min-w-0 flex-1 flex items-center">
                                                <div class="flex-shrink-0">
                                                    <div class="h-10 w-10 rounded-full flex items-center justify-center" :class="activity.type === 'payment' ? 'bg-green-100' : 'bg-red-100'">
                                                        <i :class="activity.type === 'payment' ? 'fas fa-money-bill-wave text-green-600' : 'fas fa-file-invoice-dollar text-red-600'"></i>
                                                    </div>
                                                </div>
                                                <div class="min-w-0 flex-1 px-4">
                                                    <div>
                                                        <p class="text-sm font-medium text-gray-900 truncate">{{ activity.client }}</p>
                                                        <p class="text-sm text-gray-500 truncate">{{ activity.description }}</p>
                                                    </div>
                                                </div>
                                            </div>
                                            <div>
                                                <p class="text-sm font-medium" :class="activity.type === 'payment' ? 'text-green-600' : 'text-red-600'">{{ activity.amount }} MAD</p>
                                                <p class="text-xs text-gray-500">{{ activity.date }}</p>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        
                        <!-- Top Debtors -->
                        <div class="bg-white shadow rounded-lg">
                            <div class="px-4 py-5 sm:px-6 border-b border-gray-200">
                                <h3 class="text-lg leading-6 font-medium text-gray-900">Top Debtors</h3>
                            </div>
                            <div class="overflow-hidden">
                                <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-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</th>
                                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Phone</th>
                                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Total Credit</th>
                                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Paid</th>
                                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Balance</th>
                                        </tr>
                                    </thead>
                                    <tbody class="bg-white divide-y divide-gray-200">
                                        <tr v-for="debtor in topDebtors" :key="debtor.id" class="hover:bg-gray-50">
                                            <td class="px-6 py-4 whitespace-nowrap">
                                                <div class="flex items-center">
                                                    <div class="flex-shrink-0 h-10 w-10">
                                                        <div class="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>
                                                    <div class="ml-4">
                                                        <div class="text-sm font-medium text-gray-900">{{ debtor.name }}</div>
                                                        <div class="text-sm text-gray-500">{{ debtor.lastPayment }}</div>
                                                    </div>
                                                </div>
                                            </td>
                                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ debtor.phone }}</td>
                                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ debtor.totalCredit }} MAD</td>
                                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ debtor.paid }} MAD</td>
                                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium" :class="debtor.balance > 0 ? 'text-red-600' : 'text-green-600'">{{ debtor.balance }} MAD</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                `,
                setup() {
                    const recentActivities = ref([
                        { id: 1, type: 'payment', client: 'Amina El Khattabi', description: 'Payment received', amount: 400, date: '2 hours ago' },
                        { id: 2, type: 'credit', client: 'Mohammed Benali', description: 'New credit created', amount: 1200, date: '5 hours ago' },
                        { id: 3, type: 'payment', client: 'Fatima Zahra', description: 'Partial payment received', amount: 200, date: '1 day ago' },
                        { id: 4, type: 'credit', client: 'Karim Alami', description: 'New credit created', amount: 800, date: '2 days ago' },
                        { id: 5, type: 'payment', client: 'Leila Mansouri', description: 'Full payment received', amount: 1500, date: '3 days ago' }
                    ]);
                    
                    const topDebtors = ref([
                        { id: 1, name: 'Amina El Khattabi', phone: '+212 612 345 678', totalCredit: 1500, paid: 600, balance: 900, lastPayment: '5 days ago' },
                        { id: 2, name: 'Mohammed Benali', phone: '+212 678 901 234', totalCredit: 2500, paid: 1200, balance: 1300, lastPayment: '2 weeks ago' },
                        { id: 3, name: 'Karim Alami', phone: '+212 699 123 456', totalCredit: 1800, paid: 500, balance: 1300, lastPayment: '1 week ago' },
                        { id: 4, name: 'Fatima Zahra', phone: '+212 633 456 789', totalCredit: 1200, paid: 400, balance: 800, lastPayment: '3 days ago' },
                        { id: 5, name: 'Leila Mansouri', phone: '+212 644 789 012', totalCredit: 2000, paid: 1500, balance: 500, lastPayment: 'Yesterday' }
                    ]);
                    
                    return { recentActivities, topDebtors };
                }
            },
            '/clients': {
                template: `
                    <div>
                        <!-- Client Search and Filters -->
                        <div class="mb-6">
                            <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between">
                                <div class="relative w-full sm:w-64 mb-4 sm:mb-0">
                                    <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                        <i class="fas fa-search text-gray-400"></i>
                                    </div>
                                    <input type="text" class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-red-500 focus:border-red-500 sm:text-sm" placeholder="Search clients...">
                                </div>
                                <div class="flex space-x-3">
                                    <select class="block w-full sm:w-40 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md">
                                        <option>All Status</option>
                                        <option>Active</option>
                                        <option>Inactive</option>
                                    </select>
                                    <button class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
                                        <i class="fas fa-filter mr-2"></i> Filter
                                    </button>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Clients Table -->
                        <div class="overflow-hidden border border-gray-200 rounded-lg">
                            <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-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Phone</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Credits</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Balance</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
                                        <th scope="col" class="relative px-6 py-3">
                                            <span class="sr-only">Actions</span>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody class="bg-white divide-y divide-gray-200">
                                    <tr v-for="client in clients" :key="client.id" class="hover:bg-gray-50">
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <div class="flex items-center">
                                                <div class="flex-shrink-0 h-10 w-10">
                                                    <div class="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>
                                                <div class="ml-4">
                                                    <div class="text-sm font-medium text-gray-900">{{ client.name }}</div>
                                                    <div class="text-sm text-gray-500">{{ client.address }}</div>
                                                </div>
                                            </div>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ client.phone }}</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ client.credits }}</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium" :class="client.balance > 0 ? 'text-red-600' : 'text-green-600'">{{ client.balance }} MAD</td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full" :class="client.status === 'active' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'">
                                                {{ client.status === 'active' ? 'Active' : 'Inactive' }}
                                            </span>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                            <button class="text-red-600 hover:text-red-900 mr-3">
                                                <i class="fas fa-eye"></i>
                                            </button>
                                            <button class="text-red-600 hover:text-red-900">
                                                <i class="fas fa-ellipsis-v"></i>
                                            </button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        
                        <!-- Pagination -->
                        <div class="flex items-center justify-between mt-4">
                            <div class="flex-1 flex justify-between sm:hidden">
                                <button class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                    Previous
                                </button>
                                <button class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                    Next
                                </button>
                            </div>
                            <div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
                                <div>
                                    <p class="text-sm text-gray-700">
                                        Showing
                                        <span class="font-medium">1</span>
                                        to
                                        <span class="font-medium">10</span>
                                        of
                                        <span class="font-medium">42</span>
                                        results
                                    </p>
                                </div>
                                <div>
                                    <nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
                                        <button 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">Previous</span>
                                            <i class="fas fa-chevron-left"></i>
                                        </button>
                                        <button aria-current="page" class="z-10 bg-red-50 border-red-500 text-red-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
                                            1
                                        </button>
                                        <button 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
                                        </button>
                                        <button 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
                                        </button>
                                        <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>
                                        <button 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">
                                            8
                                        </button>
                                        <button 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">Next</span>
                                            <i class="fas fa-chevron-right"></i>
                                        </button>
                                    </nav>
                                </div>
                            </div>
                        </div>
                    </div>
                `,
                setup() {
                    const clients = ref([
                        { id: 1, name: 'Amina El Khattabi', phone: '+212 612 345 678', address: 'Casablanca', credits: 2, balance: 900, status: 'active' },
                        { id: 2, name: 'Mohammed Benali', phone: '+212 678 901 234', address: 'Rabat', credits: 3, balance: 1300, status: 'active' },
                        { id: 3, name: 'Fatima Zahra', phone: '+212 633 456 789', address: 'Marrakech', credits: 1, balance: 800, status: 'active' },
                        { id: 4, name: 'Karim Alami', phone: '+212 699 123 456', address: 'Tangier', credits: 2, balance: 1300, status: 'active' },
                        { id: 5, name: 'Leila Mansouri', phone: '+212 644 789 012', address: 'Fes', credits: 1, balance: 500, status: 'active' },
                        { id: 6, name: 'Youssef Chraibi', phone: '+212 655 234 567', address: 'Agadir', credits: 0, balance: 0, status: 'inactive' },
                        { id: 7, name: 'Nadia Bensaid', phone: '+212 677 890 123', address: 'Meknes', credits: 2, balance: 750, status: 'active' },
                        { id: 8, name: 'Hassan El Fassi', phone: '+212 622 345 678', address: 'Oujda', credits: 1, balance: 400, status: 'active' },
                        { id: 9, name: 'Samira Khouribga', phone: '+212 688 901 234', address: 'Khouribga', credits: 0, balance: 0, status: 'inactive' },
                        { id: 10, name: 'Omar Tazi', phone: '+212 611 234 567', address: 'Tetouan', credits: 3, balance: 1500, status: 'active' }
                    ]);
                    
                    return { clients };
                }
            },
            '/credits': {
                template: `
                    <div>
                        <!-- Credit Search and Filters -->
                        <div class="mb-6">
                            <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between">
                                <div class="relative w-full sm:w-64 mb-4 sm:mb-0">
                                    <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                        <i class="fas fa-search text-gray-400"></i>
                                    </div>
                                    <input type="text" class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-red-500 focus:border-red-500 sm:text-sm" placeholder="Search credits...">
                                </div>
                                <div class="flex space-x-3">
                                    <select class="block w-full sm:w-40 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md">
                                        <option>All Status</option>
                                        <option>Paid</option>
                                        <option>Partial</option>
                                        <option>Unpaid</option>
                                    </select>
                                    <select class="block w-full sm:w-40 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md">
                                        <option>All Clients</option>
                                        <option>Amina El Khattabi</option>
                                        <option>Mohammed Benali</option>
                                        <option>Fatima Zahra</option>
                                    </select>
                                    <button class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
                                        <i class="fas fa-filter mr-2"></i> Filter
                                    </button>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Credits Table -->
                        <div class="overflow-hidden border border-gray-200 rounded-lg">
                            <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-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Due Date</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Paid</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
                                        <th scope="col" class="relative px-6 py-3">
                                            <span class="sr-only">Actions</span>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody class="bg-white divide-y divide-gray-200">
                                    <tr v-for="credit in credits" :key="credit.id" class="hover:bg-gray-50">
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <div class="flex items-center">
                                                <div class="flex-shrink-0 h-10 w-10">
                                                    <div class="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>
                                                <div class="ml-4">
                                                    <div class="text-sm font-medium text-gray-900">{{ credit.client }}</div>
                                                    <div class="text-sm text-gray-500">{{ credit.phone }}</div>
                                                </div>
                                            </div>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">{{ credit.amount }} MAD</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ credit.dueDate }}</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ credit.paid }} MAD</td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <span class="status-badge" :class="credit.status === 'paid' ? 'status-paid' : credit.status === 'partial' ? 'status-partial' : 'status-unpaid'">
                                                {{ credit.status === 'paid' ? 'Paid' : credit.status === 'partial' ? 'Partial' : 'Unpaid' }}
                                            </span>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                            <button class="text-red-600 hover:text-red-900 mr-3">
                                                <i class="fas fa-eye"></i>
                                            </button>
                                            <button class="text-red-600 hover:text-red-900">
                                                <i class="fas fa-ellipsis-v"></i>
                                            </button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        
                        <!-- Pagination -->
                        <div class="flex items-center justify-between mt-4">
                            <div class="flex-1 flex justify-between sm:hidden">
                                <button class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                    Previous
                                </button>
                                <button class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                    Next
                                </button>
                            </div>
                            <div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
                                <div>
                                    <p class="text-sm text-gray-700">
                                        Showing
                                        <span class="font-medium">1</span>
                                        to
                                        <span class="font-medium">10</span>
                                        of
                                        <span class="font-medium">87</span>
                                        results
                                    </p>
                                </div>
                                <div>
                                    <nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
                                        <button 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">Previous</span>
                                            <i class="fas fa-chevron-left"></i>
                                        </button>
                                        <button aria-current="page" class="z-10 bg-red-50 border-red-500 text-red-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
                                            1
                                        </button>
                                        <button 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
                                        </button>
                                        <button 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
                                        </button>
                                        <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>
                                        <button 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">
                                            9
                                        </button>
                                        <button 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">Next</span>
                                            <i class="fas fa-chevron-right"></i>
                                        </button>
                                    </nav>
                                </div>
                            </div>
                        </div>
                    </div>
                `,
                setup() {
                    const credits = ref([
                        { id: 1, client: 'Amina El Khattabi', phone: '+212 612 345 678', amount: 1000, dueDate: '2025-07-10', paid: 600, status: 'partial' },
                        { id: 2, client: 'Mohammed Benali', phone: '+212 678 901 234', amount: 2500, dueDate: '2025-08-15', paid: 1200, status: 'partial' },
                        { id: 3, client: 'Fatima Zahra', phone: '+212 633 456 789', amount: 1200, dueDate: '2025-06-30', paid: 400, status: 'partial' },
                        { id: 4, client: 'Karim Alami', phone: '+212 699 123 456', amount: 1800, dueDate: '2025-07-25', paid: 500, status: 'partial' },
                        { id: 5, client: 'Leila Mansouri', phone: '+212 644 789 012', amount: 2000, dueDate: '2025-05-20', paid: 2000, status: 'paid' },
                        { id: 6, client: 'Youssef Chraibi', phone: '+212 655 234 567', amount: 800, dueDate: '2025-09-05', paid: 0, status: 'unpaid' },
                        { id: 7, client: 'Nadia Bensaid', phone: '+212 677 890 123', amount: 1500, dueDate: '2025-07-18', paid: 750, status: 'partial' },
                        { id: 8, client: 'Hassan El Fassi', phone: '+212 622 345 678', amount: 400, dueDate: '2025-06-10', paid: 0, status: 'unpaid' },
                        { id: 9, client: 'Samira Khouribga', phone: '+212 688 901 234', amount: 1200, dueDate: '2025-08-22', paid: 1200, status: 'paid' },
                        { id: 10, client: 'Omar Tazi', phone: '+212 611 234 567', amount: 3000, dueDate: '2025-07-05', paid: 1500, status: 'partial' }
                    ]);
                    
                    return { credits };
                }
            },
            '/payments': {
                template: `
                    <div>
                        <!-- Payment Search and Filters -->
                        <div class="mb-6">
                            <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between">
                                <div class="relative w-full sm:w-64 mb-4 sm:mb-0">
                                    <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                        <i class="fas fa-search text-gray-400"></i>
                                    </div>
                                    <input type="text" class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-red-500 focus:border-red-500 sm:text-sm" placeholder="Search payments...">
                                </div>
                                <div class="flex space-x-3">
                                    <select class="block w-full sm:w-40 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md">
                                        <option>All Methods</option>
                                        <option>Cash</option>
                                        <option>Bank Transfer</option>
                                        <option>Mobile Payment</option>
                                    </select>
                                    <select class="block w-full sm:w-40 pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-red-500 focus:border-red-500 sm:text-sm rounded-md">
                                        <option>All Clients</option>
                                        <option>Amina El Khattabi</option>
                                        <option>Mohammed Benali</option>
                                        <option>Fatima Zahra</option>
                                    </select>
                                    <button class="inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
                                        <i class="fas fa-filter mr-2"></i> Filter
                                    </button>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Payments Table -->
                        <div class="overflow-hidden border border-gray-200 rounded-lg">
                            <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-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Method</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Credit</th>
                                        <th scope="col" class="relative px-6 py-3">
                                            <span class="sr-only">Actions</span>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody class="bg-white divide-y divide-gray-200">
                                    <tr v-for="payment in payments" :key="payment.id" class="hover:bg-gray-50">
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <div class="flex items-center">
                                                <div class="flex-shrink-0 h-10 w-10">
                                                    <div class="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>
                                                <div class="ml-4">
                                                    <div class="text-sm font-medium text-gray-900">{{ payment.client }}</div>
                                                    <div class="text-sm text-gray-500">{{ payment.phone }}</div>
                                                </div>
                                            </div>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-green-600">{{ payment.amount }} MAD</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ payment.date }}</td>
                                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                            <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">
                                                {{ payment.method }}
                                            </span>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap">
                                            <div class="text-sm text-gray-900">{{ payment.creditAmount }} MAD</div>
                                            <div class="text-sm text-gray-500">Due {{ payment.dueDate }}</div>
                                        </td>
                                        <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                            <button class="text-red-600 hover:text-red-900 mr-3">
                                                <i class="fas fa-eye"></i>
                                            </button>
                                            <button class="text-red-600 hover:text-red-900">
                                                <i class="fas fa-ellipsis-v"></i>
                                            </button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        
                        <!-- Pagination -->
                        <div class="flex items-center justify-between mt-4">
                            <div class="flex-1 flex justify-between sm:hidden">
                                <button class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                    Previous
                                </button>
                                <button class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                    Next
                                </button>
                            </div>
                            <div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
                                <div>
                                    <p class="text-sm text-gray-700">
                                        Showing
                                        <span class="font-medium">1</span>
                                        to
                                        <span class="font-medium">10</span>
                                        of
                                        <span class="font-medium">124</span>
                                        results
                                    </p>
                                </div>
                                <div>
                                    <nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
                                        <button 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">Previous</span>
                                            <i class="fas fa-chevron-left"></i>
                                        </button>
                                        <button aria-current="page" class="z-10
<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=ouma01/tryload" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>