File size: 41,639 Bytes
039060f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Modern Dashboard</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">
    <link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
    <script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
    <style>
        .sidebar {
            transition: all 0.3s ease;
        }
        .sidebar.collapsed {
            width: 70px;
        }
        .sidebar.collapsed .sidebar-text {
            display: none;
        }
        .sidebar.collapsed .logo-text {
            display: none;
        }
        .sidebar.collapsed .menu-item {
            justify-content: center;
        }
        .main-content {
            transition: all 0.3s ease;
        }
        .main-content.expanded {
            margin-left: 70px;
        }
        .notification-dropdown {
            max-height: 400px;
            overflow-y: auto;
        }
        .card-gradient-1 {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .card-gradient-2 {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        }
        .card-gradient-3 {
            background: linear-gradient(135deg, #5ee7df 0%, #b490ca 100%);
        }
        .card-gradient-4 {
            background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
        }
        .chart-container {
            position: relative;
            height: 300px;
        }
        
        /* Dark Mode Styles */
        .dark .sidebar {
            background-color: #1e293b;
            border-color: #334155;
        }
        .dark .sidebar .menu-item:hover {
            background-color: #334155;
        }
        .dark .sidebar .text-indigo-300 {
            color: #94a3b8;
        }
        .dark header {
            background-color: #1e293b;
            border-color: #334155;
        }
        .dark header h1 {
            color: #f8fafc;
        }
        .dark .bg-white {
            background-color: #1e293b !important;
            border-color: #334155;
        }
        .dark .text-gray-800 {
            color: #f8fafc !important;
        }
        .dark .text-gray-500 {
            color: #94a3b8 !important;
        }
        .dark .text-gray-700 {
            color: #e2e8f0 !important;
        }
        .dark .text-gray-900 {
            color: #f8fafc !important;
        }
        .dark .bg-gray-50 {
            background-color: #334155 !important;
        }
        .dark .bg-gray-100 {
            background-color: #334155 !important;
        }
        .dark .divide-gray-200 {
            border-color: #334155 !important;
        }
        .dark .hover\:bg-gray-50:hover {
            background-color: #334155 !important;
        }
        .dark .bg-indigo-100 {
            background-color: #334155 !important;
        }
        .dark .dataTables_wrapper .dataTables_filter input {
            background-color: #334155;
            color: #f8fafc;
            border-color: #475569;
        }
        .dark .dataTables_wrapper .dataTables_length select {
            background-color: #334155;
            color: #f8fafc;
            border-color: #475569;
        }
        .dark .dataTables_wrapper .dataTables_info {
            color: #94a3b8 !important;
        }
        .dark .dataTables_wrapper .paginate_button {
            color: #e2e8f0 !important;
        }
        .dark .dataTables_wrapper .paginate_button.current {
            background-color: #475569 !important;
            border-color: #475569 !important;
        }
        .dark .dataTables_wrapper .paginate_button:hover {
            background-color: #475569 !important;
            border-color: #475569 !important;
        }
        .dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
            color: #64748b !important;
        }
    </style>
</head>
<body class="bg-gray-100 dark:bg-slate-900">
    <div class="flex h-screen overflow-hidden">
        <!-- Sidebar -->
        <div class="sidebar bg-indigo-800 dark:bg-slate-800 text-white w-64 flex-shrink-0 flex flex-col">
            <div class="p-4 flex items-center justify-between border-b border-indigo-700 dark:border-slate-700">
                <div class="flex items-center">
                    <i class="fas fa-chart-line text-2xl mr-3"></i>
                    <span class="logo-text text-xl font-bold">DashboardPro</span>
                </div>
                <button id="toggleSidebar" class="text-white focus:outline-none">
                    <i class="fas fa-bars"></i>
                </button>
            </div>
            <div class="p-4 flex-1 overflow-y-auto">
                <div class="mb-8">
                    <p class="sidebar-text text-indigo-300 dark:text-slate-400 uppercase text-xs font-semibold mb-4">Menu Principal</p>
                    <ul>
                        <li class="mb-2">
                            <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700">
                                <i class="fas fa-home mr-3"></i>
                                <span class="sidebar-text">Dashboard</span>
                            </a>
                        </li>
                        <li class="mb-2">
                            <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700">
                                <i class="fas fa-chart-bar mr-3"></i>
                                <span class="sidebar-text">Relatórios</span>
                            </a>
                        </li>
                        <li class="mb-2">
                            <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700">
                                <i class="fas fa-shopping-cart mr-3"></i>
                                <span class="sidebar-text">Vendas</span>
                            </a>
                        </li>
                        <li class="mb-2">
                            <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700">
                                <i class="fas fa-users mr-3"></i>
                                <span class="sidebar-text">Clientes</span>
                            </a>
                        </li>
                        <li class="mb-2">
                            <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700">
                                <i class="fas fa-cog mr-3"></i>
                                <span class="sidebar-text">Configurações</span>
                            </a>
                        </li>
                    </ul>
                </div>
                <div>
                    <p class="sidebar-text text-indigo-300 dark:text-slate-400 uppercase text-xs font-semibold mb-4">Suporte</p>
                    <ul>
                        <li class="mb-2">
                            <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700">
                                <i class="fas fa-question-circle mr-3"></i>
                                <span class="sidebar-text">Ajuda</span>
                            </a>
                        </li>
                        <li class="mb-2">
                            <a href="#" class="menu-item flex items-center p-2 rounded hover:bg-indigo-700 dark:hover:bg-slate-700">
                                <i class="fas fa-envelope mr-3"></i>
                                <span class="sidebar-text">Contato</span>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

        <!-- Main Content -->
        <div class="main-content flex-1 flex flex-col overflow-hidden">
            <!-- Navbar -->
            <header class="bg-white dark:bg-slate-800 shadow-sm">
                <div class="px-6 py-4 flex items-center justify-between">
                    <div class="flex items-center">
                        <button id="mobileMenuButton" class="md:hidden text-gray-500 dark:text-slate-400 focus:outline-none mr-4">
                            <i class="fas fa-bars text-xl"></i>
                        </button>
                        <h1 class="text-xl font-semibold text-gray-800 dark:text-white">Dashboard</h1>
                    </div>
                    <div class="flex items-center space-x-4">
                        <button id="darkModeToggle" class="text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-white focus:outline-none">
                            <i id="darkModeIcon" class="fas fa-moon text-xl"></i>
                        </button>
                        <div class="relative">
                            <button id="notificationButton" class="text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-white focus:outline-none relative">
                                <i class="fas fa-bell text-xl"></i>
                                <span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">6</span>
                            </button>
                            <div id="notificationDropdown" class="hidden absolute right-0 mt-2 w-80 bg-white dark:bg-slate-800 rounded-md shadow-lg z-10 notification-dropdown">
                                <div class="p-4 border-b dark:border-slate-700">
                                    <h3 class="font-semibold text-gray-800 dark:text-white">Notificações</h3>
                                </div>
                                <div class="divide-y divide-gray-100 dark:divide-slate-700">
                                    <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700">
                                        <div class="flex-shrink-0 bg-blue-100 dark:bg-slate-600 p-2 rounded-full">
                                            <i class="fas fa-shopping-cart text-blue-500 dark:text-blue-400"></i>
                                        </div>
                                        <div class="ml-3">
                                            <p class="text-sm font-medium text-gray-900 dark:text-white">Novo pedido recebido</p>
                                            <p class="text-xs text-gray-500 dark:text-slate-400">2 minutos atrás</p>
                                        </div>
                                    </a>
                                    <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700">
                                        <div class="flex-shrink-0 bg-green-100 dark:bg-slate-600 p-2 rounded-full">
                                            <i class="fas fa-user-plus text-green-500 dark:text-green-400"></i>
                                        </div>
                                        <div class="ml-3">
                                            <p class="text-sm font-medium text-gray-900 dark:text-white">Novo cliente registrado</p>
                                            <p class="text-xs text-gray-500 dark:text-slate-400">1 hora atrás</p>
                                        </div>
                                    </a>
                                    <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700">
                                        <div class="flex-shrink-0 bg-yellow-100 dark:bg-slate-600 p-2 rounded-full">
                                            <i class="fas fa-exclamation-triangle text-yellow-500 dark:text-yellow-400"></i>
                                        </div>
                                        <div class="ml-3">
                                            <p class="text-sm font-medium text-gray-900 dark:text-white">Pagamento atrasado</p>
                                            <p class="text-xs text-gray-500 dark:text-slate-400">3 horas atrás</p>
                                        </div>
                                    </a>
                                    <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700">
                                        <div class="flex-shrink-0 bg-purple-100 dark:bg-slate-600 p-2 rounded-full">
                                            <i class="fas fa-check-circle text-purple-500 dark:text-purple-400"></i>
                                        </div>
                                        <div class="ml-3">
                                            <p class="text-sm font-medium text-gray-900 dark:text-white">Pedido entregue</p>
                                            <p class="text-xs text-gray-500 dark:text-slate-400">Ontem</p>
                                        </div>
                                    </a>
                                    <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700">
                                        <div class="flex-shrink-0 bg-red-100 dark:bg-slate-600 p-2 rounded-full">
                                            <i class="fas fa-times-circle text-red-500 dark:text-red-400"></i>
                                        </div>
                                        <div class="ml-3">
                                            <p class="text-sm font-medium text-gray-900 dark:text-white">Pedido cancelado</p>
                                            <p class="text-xs text-gray-500 dark:text-slate-400">Ontem</p>
                                        </div>
                                    </a>
                                    <a href="#" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-slate-700">
                                        <div class="flex-shrink-0 bg-indigo-100 dark:bg-slate-600 p-2 rounded-full">
                                            <i class="fas fa-truck text-indigo-500 dark:text-indigo-400"></i>
                                        </div>
                                        <div class="ml-3">
                                            <p class="text-sm font-medium text-gray-900 dark:text-white">Pedido em transporte</p>
                                            <p class="text-xs text-gray-500 dark:text-slate-400">2 dias atrás</p>
                                        </div>
                                    </a>
                                </div>
                                <div class="p-3 text-center bg-gray-50 dark:bg-slate-700">
                                    <a href="#" class="text-sm font-medium text-indigo-600 dark:text-indigo-400 hover:text-indigo-500 dark:hover:text-indigo-300">Ver todas as notificações</a>
                                </div>
                            </div>
                        </div>
                        <div class="relative">
                            <button id="userMenuButton" class="flex items-center space-x-2 focus:outline-none">
                                <img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="User avatar">
                                <span class="hidden md:block text-sm font-medium text-gray-700 dark:text-white">John Doe</span>
                            </button>
                            <div id="userDropdown" class="hidden absolute right-0 mt-2 w-48 bg-white dark:bg-slate-800 rounded-md shadow-lg z-10">
                                <div class="py-1 border-b dark:border-slate-700">
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Perfil</a>
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Configurações</a>
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Relatórios</a>
                                </div>
                                <div class="py-1 border-b dark:border-slate-700">
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Login</a>
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Registrar</a>
                                </div>
                                <div class="py-1">
                                    <a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-white hover:bg-gray-100 dark:hover:bg-slate-700">Sair</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </header>

            <!-- Main Content Area -->
            <main class="flex-1 overflow-y-auto p-6">
                <!-- Cards -->
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
                    <div class="card-gradient-1 rounded-lg shadow-md p-6 text-white">
                        <div class="flex justify-between items-center">
                            <div>
                                <p class="text-sm font-medium">Orçamento</p>
                                <h3 class="text-2xl font-bold mt-2">R$ 24,780</h3>
                                <p class="text-xs mt-2 opacity-80">+12% desde o último mês</p>
                            </div>
                            <div class="bg-white bg-opacity-20 p-3 rounded-full">
                                <i class="fas fa-wallet text-xl"></i>
                            </div>
                        </div>
                    </div>
                    <div class="card-gradient-2 rounded-lg shadow-md p-6 text-white">
                        <div class="flex justify-between items-center">
                            <div>
                                <p class="text-sm font-medium">Pagos</p>
                                <h3 class="text-2xl font-bold mt-2">R$ 18,650</h3>
                                <p class="text-xs mt-2 opacity-80">+8% desde o último mês</p>
                            </div>
                            <div class="bg-white bg-opacity-20 p-3 rounded-full">
                                <i class="fas fa-check-circle text-xl"></i>
                            </div>
                        </div>
                    </div>
                    <div class="card-gradient-3 rounded-lg shadow-md p-6 text-white">
                        <div class="flex justify-between items-center">
                            <div>
                                <p class="text-sm font-medium">Cancelados</p>
                                <h3 class="text-2xl font-bold mt-2">R$ 2,340</h3>
                                <p class="text-xs mt-2 opacity-80">-3% desde o último mês</p>
                            </div>
                            <div class="bg-white bg-opacity-20 p-3 rounded-full">
                                <i class="fas fa-times-circle text-xl"></i>
                            </div>
                        </div>
                    </div>
                    <div class="card-gradient-4 rounded-lg shadow-md p-6 text-gray-800">
                        <div class="flex justify-between items-center">
                            <div>
                                <p class="text-sm font-medium">Entregues</p>
                                <h3 class="text-2xl font-bold mt-2">R$ 15,430</h3>
                                <p class="text-xs mt-2 opacity-80">+15% desde o último mês</p>
                            </div>
                            <div class="bg-gray-800 bg-opacity-10 p-3 rounded-full">
                                <i class="fas fa-truck text-xl"></i>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Charts -->
                <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
                    <div class="bg-white dark:bg-slate-800 rounded-lg shadow-md p-6">
                        <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Vendas Mensais</h2>
                        <div class="chart-container">
                            <canvas id="salesChart"></canvas>
                        </div>
                        <div class="mt-4 text-sm text-gray-500 dark:text-slate-400">
                            <p><span class="inline-block w-3 h-3 rounded-full bg-indigo-500 mr-1"></span> Vendas totais: R$ 46,340</p>
                            <p><span class="inline-block w-3 h-3 rounded-full bg-indigo-200 mr-1"></span> Meta: R$ 50,000</p>
                        </div>
                    </div>
                    <div class="bg-white dark:bg-slate-800 rounded-lg shadow-md p-6">
                        <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Distribuição de Vendas</h2>
                        <div class="chart-container">
                            <canvas id="distributionChart"></canvas>
                        </div>
                        <div class="mt-4 grid grid-cols-2 gap-4 text-sm text-gray-500 dark:text-slate-400">
                            <div><span class="inline-block w-3 h-3 rounded-full bg-indigo-500 mr-1"></span> Eletrônicos: 35%</div>
                            <div><span class="inline-block w-3 h-3 rounded-full bg-red-500 mr-1"></span> Roupas: 25%</div>
                            <div><span class="inline-block w-3 h-3 rounded-full bg-green-500 mr-1"></span> Alimentos: 20%</div>
                            <div><span class="inline-block w-3 h-3 rounded-full bg-yellow-500 mr-1"></span> Livros: 10%</div>
                            <div><span class="inline-block w-3 h-3 rounded-full bg-gray-500 mr-1"></span> Outros: 10%</div>
                        </div>
                    </div>
                </div>

                <!-- Recent Orders -->
                <div class="bg-white dark:bg-slate-800 rounded-lg shadow-md p-6">
                    <div class="flex justify-between items-center mb-6">
                        <h2 class="text-lg font-semibold text-gray-800 dark:text-white">Pedidos Recentes</h2>
                        <button class="text-sm text-indigo-600 dark:text-indigo-400 hover:text-indigo-500 dark:hover:text-indigo-300">Ver todos</button>
                    </div>
                    <div class="overflow-x-auto">
                        <table id="ordersTable" class="min-w-full divide-y divide-gray-200 dark:divide-slate-700">
                            <thead class="bg-gray-50 dark:bg-slate-700">
                                <tr>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">ID</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">Cliente</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">Data</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">Valor</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">Status</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-slate-400 uppercase tracking-wider">Ações</th>
                                </tr>
                            </thead>
                            <tbody class="bg-white dark:bg-slate-800 divide-y divide-gray-200 dark:divide-slate-700">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">#ORD-0001</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">Maria Silva</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">15/07/2023</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">R$ 1,250.00</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200">Entregue</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">
                                        <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3"><i class="fas fa-eye"></i></button>
                                        <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300"><i class="fas fa-print"></i></button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">#ORD-0002</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">João Santos</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">14/07/2023</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">R$ 890.00</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200">Em transporte</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">
                                        <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3"><i class="fas fa-eye"></i></button>
                                        <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300"><i class="fas fa-print"></i></button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">#ORD-0003</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">Ana Oliveira</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">13/07/2023</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">R$ 1,750.00</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200">Pendente</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">
                                        <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3"><i class="fas fa-eye"></i></button>
                                        <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300"><i class="fas fa-print"></i></button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">#ORD-0004</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">Carlos Pereira</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">12/07/2023</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">R$ 2,300.00</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200">Cancelado</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">
                                        <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3"><i class="fas fa-eye"></i></button>
                                        <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300"><i class="fas fa-print"></i></button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">#ORD-0005</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">Patricia Souza</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">11/07/2023</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">R$ 1,100.00</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200">Entregue</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-slate-400">
                                        <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3"><i class="fas fa-eye"></i></button>
                                        <button class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300"><i class="fas fa-print"></i></button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <script>
        // Toggle sidebar
        const toggleSidebar = document.getElementById('toggleSidebar');
        const sidebar = document.querySelector('.sidebar');
        const mainContent = document.querySelector('.main-content');
        const mobileMenuButton = document.getElementById('mobileMenuButton');

        toggleSidebar.addEventListener('click', () => {
            sidebar.classList.toggle('collapsed');
            mainContent.classList.toggle('expanded');
        });

        mobileMenuButton.addEventListener('click', () => {
            sidebar.classList.toggle('collapsed');
            mainContent.classList.toggle('expanded');
        });

        // Toggle notification dropdown
        const notificationButton = document.getElementById('notificationButton');
        const notificationDropdown = document.getElementById('notificationDropdown');

        notificationButton.addEventListener('click', () => {
            notificationDropdown.classList.toggle('hidden');
            userDropdown.classList.add('hidden');
        });

        // Toggle user dropdown
        const userMenuButton = document.getElementById('userMenuButton');
        const userDropdown = document.getElementById('userDropdown');

        userMenuButton.addEventListener('click', () => {
            userDropdown.classList.toggle('hidden');
            notificationDropdown.classList.add('hidden');
        });

        // Close dropdowns when clicking outside
        document.addEventListener('click', (event) => {
            if (!notificationButton.contains(event.target) && !notificationDropdown.contains(event.target)) {
                notificationDropdown.classList.add('hidden');
            }
            if (!userMenuButton.contains(event.target) && !userDropdown.contains(event.target)) {
                userDropdown.classList.add('hidden');
            }
        });

        // Dark Mode Toggle
        const darkModeToggle = document.getElementById('darkModeToggle');
        const darkModeIcon = document.getElementById('darkModeIcon');
        const html = document.documentElement;

        // Check for saved user preference or use OS preference
        const userPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
        const savedMode = localStorage.getItem('darkMode');

        if (savedMode === 'dark' || (!savedMode && userPrefersDark)) {
            html.classList.add('dark');
            darkModeIcon.classList.replace('fa-moon', 'fa-sun');
        }

        darkModeToggle.addEventListener('click', () => {
            const isDark = html.classList.contains('dark');
            
            if (isDark) {
                html.classList.remove('dark');
                darkModeIcon.classList.replace('fa-sun', 'fa-moon');
                localStorage.setItem('darkMode', 'light');
            } else {
                html.classList.add('dark');
                darkModeIcon.classList.replace('fa-moon', 'fa-sun');
                localStorage.setItem('darkMode', 'dark');
            }
            
            // Update charts when theme changes
            salesChart.update();
            distributionChart.update();
        });

        // Initialize DataTable
        $(document).ready(function() {
            $('#ordersTable').DataTable({
                responsive: true,
                "order": [[2, "desc"]],
                "language": {
                    "lengthMenu": "Mostrar _MENU_ registros por página",
                    "zeroRecords": "Nenhum registro encontrado",
                    "info": "Mostrando página _PAGE_ de _PAGES_",
                    "infoEmpty": "Nenhum registro disponível",
                    "infoFiltered": "(filtrado de _MAX_ registros totais)",
                    "search": "Pesquisar:",
                    "paginate": {
                        "first": "Primeiro",
                        "last": "Último",
                        "next": "Próximo",
                        "previous": "Anterior"
                    },
                }
            });
        });

        // Sales Chart
        const salesCtx = document.getElementById('salesChart').getContext('2d');
        const salesChart = new Chart(salesCtx, {
            type: 'line',
            data: {
                labels: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul'],
                datasets: [{
                    label: 'Vendas 2023',
                    data: [6500, 5900, 8000, 8100, 5600, 5500, 7200],
                    backgroundColor: 'rgba(99, 102, 241, 0.1)',
                    borderColor: 'rgba(99, 102, 241, 1)',
                    borderWidth: 2,
                    tension: 0.3,
                    fill: true
                },
                {
                    label: 'Meta',
                    data: [7000, 7000, 7000, 7000, 7000, 7000, 7000],
                    borderColor: 'rgba(99, 102, 241, 0.3)',
                    borderWidth: 1,
                    borderDash: [5, 5],
                    pointRadius: 0,
                    fill: false
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        display: false
                    },
                    tooltip: {
                        callbacks: {
                            label: function(context) {
                                return context.dataset.label + ': R$ ' + context.raw.toLocaleString('pt-BR');
                            }
                        }
                    }
                },
                scales: {
                    y: {
                        beginAtZero: true,
                        grid: {
                            drawBorder: false,
                            color: function(context) {
                                if (context.tick.value === 0) {
                                    return '#e2e8f0';
                                }
                                return html.classList.contains('dark') ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.05)';
                            }
                        },
                        ticks: {
                            color: html.classList.contains('dark') ? '#94a3b8' : '#64748b',
                            callback: function(value) {
                                return 'R$ ' + value.toLocaleString('pt-BR');
                            }
                        }
                    },
                    x: {
                        grid: {
                            display: false
                        },
                        ticks: {
                            color: html.classList.contains('dark') ? '#94a3b8' : '#64748b'
                        }
                    }
                }
            }
        });

        // Distribution Chart
        const distributionCtx = document.getElementById('distributionChart').getContext('2d');
        const distributionChart = new Chart(distributionCtx, {
            type: 'doughnut',
            data: {
                labels: ['Eletrônicos', 'Roupas', 'Alimentos', 'Livros', 'Outros'],
                datasets: [{
                    data: [35, 25, 20, 10, 10],
                    backgroundColor: [
                        'rgba(99, 102, 241, 0.8)',
                        'rgba(244, 63, 94, 0.8)',
                        'rgba(16, 185, 129, 0.8)',
                        'rgba(245, 158, 11, 0.8)',
                        'rgba(156, 163, 175, 0.8)'
                    ],
                    borderWidth: 0
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        position: 'right',
                        labels: {
                            color: html.classList.contains('dark') ? '#e2e8f0' : '#334155'
                        }
                    },
                    tooltip: {
                        callbacks: {
                            label: function(context) {
                                return context.label + ': ' + context.raw + '%';
                            }
                        }
                    },
                    cutout: '70%'
                }
            }
        });

        // Update charts when dark mode changes
        darkModeToggle.addEventListener('click', () => {
            salesChart.update();
            distributionChart.update();
        });
    </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=gallabs/dashboard-lucas" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>