File size: 48,635 Bytes
8a14abe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dashboard de Projetos Elétricos</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        .status-0 { background-color: #fef2f2; color: #dc2626; }
        .status-20 { background-color: #fff7ed; color: #ea580c; }
        .status-25 { background-color: #fff7ed; color: #ea580c; }
        .status-50 { background-color: #fefce8; color: #ca8a04; }
        .status-90 { background-color: #ecfdf5; color: #059669; }
        .status-100 { background-color: #ecfdf5; color: #059669; }
        .status-1000 { background-color: #d1fae5; color: #065f46; font-weight: bold; }
        
        .gantt-bar {
            height: 20px;
            border-radius: 4px;
        }
        
        .project-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }
        
        .calendar-day {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            font-size: 12px;
        }
        
        .calendar-day.today {
            background-color: #3b82f6;
            color: white;
            font-weight: bold;
        }
        
        .calendar-day.holiday {
            background-color: #f59e0b;
            color: white;
        }
        
        .calendar-day.active {
            background-color: #10b981;
            color: white;
        }
        
        .calendar-day.delayed {
            background-color: #ef4444;
            color: white;
        }
        
        .calendar-day.planned {
            background-color: #6366f1;
            color: white;
        }
    </style>
</head>
<body class="bg-gray-50">
    <div class="container mx-auto px-4 py-8">
        <!-- Header -->
        <header class="mb-8">
            <div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4 mb-6">
                <div>
                    <h1 class="text-3xl font-bold text-gray-800">PROGRAMAÇÃO DE PROJETOS ELÉTRICOS</h1>
                    <div class="flex flex-wrap gap-4 text-sm text-gray-600 mt-2">
                        <div><span class="font-medium">Elaborado:</span> T.PELINSON</div>
                        <div><span class="font-medium">Revisão:</span> 0</div>
                        <div><span class="font-medium">Data:</span> 03/04/2020</div>
                    </div>
                </div>
                <div class="flex flex-col sm:flex-row gap-4">
                    <div class="relative">
                        <select id="filter-status" class="appearance-none bg-white border border-gray-300 rounded-md py-2 pl-3 pr-8 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
                            <option value="all">Todos os Status</option>
                            <option value="0">0%</option>
                            <option value="20-25">20-25%</option>
                            <option value="50">50%</option>
                            <option value="90">90%</option>
                            <option value="100">100%</option>
                        </select>
                        <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
                            <i class="fas fa-chevron-down text-xs"></i>
                        </div>
                    </div>
                    <div class="relative">
                        <select id="filter-responsible" class="appearance-none bg-white border border-gray-300 rounded-md py-2 pl-3 pr-8 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
                            <option value="all">Todos os Responsáveis</option>
                            <option value="Lucas">Lucas</option>
                            <option value="Fabio">Fabio</option>
                            <option value="Henrique">Henrique</option>
                            <option value="Robson">Robson</option>
                            <option value="Thiago">Thiago</option>
                            <option value="Reginaldo">Reginaldo</option>
                            <option value="Emerson">Emerson</option>
                        </select>
                        <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
                            <i class="fas fa-chevron-down text-xs"></i>
                        </div>
                    </div>
                    <button id="reset-filters" class="bg-gray-200 hover:bg-gray-300 text-gray-800 py-2 px-4 rounded-md text-sm flex items-center gap-2">
                        <i class="fas fa-redo"></i> Resetar
                    </button>
                </div>
            </div>
            
            <!-- Calendar Overview -->
            <div class="bg-white rounded-lg shadow p-4 mb-6">
                <h2 class="text-lg font-semibold text-gray-700 mb-3">Linha do Tempo - Abril/2020</h2>
                <div class="overflow-x-auto">
                    <div class="flex gap-1">
                        <div class="text-center text-xs text-gray-500 font-medium" style="width: 60px;"></div>
                        <template x-for="day in 30" :key="day">
                            <div class="text-center text-xs text-gray-500 font-medium" style="width: 28px;">{{ day }}</div>
                        </template>
                    </div>
                    <div class="flex gap-1 items-center mt-1">
                        <div class="text-xs text-gray-700 font-medium" style="width: 60px;">Feriados</div>
                        <template x-for="day in 30" :key="day">
                            <div class="calendar-day" 
                                 :class="{'holiday': [10, 12, 19, 21].includes(day)}">
                                <i class="fas fa-star text-xs" x-show="[10, 12, 19, 21].includes(day)"></i>
                            </div>
                        </template>
                    </div>
                    <div class="flex gap-1 items-center mt-1">
                        <div class="text-xs text-gray-700 font-medium" style="width: 60px;">Prazos</div>
                        <template x-for="day in 30" :key="day">
                            <div class="calendar-day" 
                                 :class="{
                                    'active': [6, 14, 21, 25].includes(day),
                                    'delayed': [4, 8, 15, 18].includes(day),
                                    'planned': [20, 22, 27, 30].includes(day)
                                 }">
                                <i class="fas fa-circle" x-show="[6, 14, 21, 25, 4, 8, 15, 18, 20, 22, 27, 30].includes(day)"></i>
                            </div>
                        </template>
                    </div>
                </div>
                <div class="flex justify-end gap-4 mt-4 text-xs">
                    <div class="flex items-center gap-1">
                        <div class="w-3 h-3 rounded-full bg-blue-500"></div>
                        <span>Prazos ativos</span>
                    </div>
                    <div class="flex items-center gap-1">
                        <div class="w-3 h-3 rounded-full bg-red-500"></div>
                        <span>Prazos atrasados</span>
                    </div>
                    <div class="flex items-center gap-1">
                        <div class="w-3 h-3 rounded-full bg-indigo-500"></div>
                        <span>Prazos futuros</span>
                    </div>
                    <div class="flex items-center gap-1">
                        <div class="w-3 h-3 rounded-full bg-yellow-500"></div>
                        <span>Feriados</span>
                    </div>
                </div>
            </div>
        </header>
        
        <!-- Stats Cards -->
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
            <div class="bg-white rounded-lg shadow p-6">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500 text-sm">Total de Projetos</p>
                        <h3 class="text-2xl font-bold text-gray-800 mt-1">23</h3>
                    </div>
                    <div class="bg-blue-100 p-3 rounded-full">
                        <i class="fas fa-project-diagram text-blue-500"></i>
                    </div>
                </div>
            </div>
            
            <div class="bg-white rounded-lg shadow p-6">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500 text-sm">Concluídos</p>
                        <h3 class="text-2xl font-bold text-gray-800 mt-1">7</h3>
                    </div>
                    <div class="bg-green-100 p-3 rounded-full">
                        <i class="fas fa-check-circle text-green-500"></i>
                    </div>
                </div>
            </div>
            
            <div class="bg-white rounded-lg shadow p-6">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500 text-sm">Em Andamento</p>
                        <h3 class="text-2xl font-bold text-gray-800 mt-1">11</h3>
                    </div>
                    <div class="bg-yellow-100 p-3 rounded-full">
                        <i class="fas fa-spinner text-yellow-500"></i>
                    </div>
                </div>
            </div>
            
            <div class="bg-white rounded-lg shadow p-6">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500 text-sm">Atrasados</p>
                        <h3 class="text-2xl font-bold text-gray-800 mt-1">5</h3>
                    </div>
                    <div class="bg-red-100 p-3 rounded-full">
                        <i class="fas fa-exclamation-triangle text-red-500"></i>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- Progress Overview -->
        <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
            <div class="bg-white rounded-lg shadow p-6 lg:col-span-2">
                <h2 class="text-lg font-semibold text-gray-700 mb-4">Distribuição por Status</h2>
                <div class="h-64">
                    <canvas id="statusChart"></canvas>
                </div>
            </div>
            
            <div class="bg-white rounded-lg shadow p-6">
                <h2 class="text-lg font-semibold text-gray-700 mb-4">Distribuição por Responsável</h2>
                <div class="h-64">
                    <canvas id="responsibleChart"></canvas>
                </div>
            </div>
        </div>
        
        <!-- Projects Table -->
        <div class="bg-white rounded-lg shadow overflow-hidden mb-8">
            <div class="px-6 py-4 border-b border-gray-200 flex justify-between items-center">
                <h2 class="text-lg font-semibold text-gray-700">Lista de Projetos</h2>
                <div class="flex items-center gap-4">
                    <div class="relative">
                        <input type="text" id="search-projects" placeholder="Buscar projeto..." class="pl-8 pr-4 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
                        <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
                    </div>
                    <button id="export-data" class="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded-md text-sm flex items-center gap-2">
                        <i class="fas fa-file-export"></i> Exportar
                    </button>
                </div>
            </div>
            <div class="overflow-x-auto">
                <table class="min-w-full divide-y divide-gray-200">
                    <thead class="bg-gray-50">
                        <tr>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer sortable" data-sort="id">
                                ID <i class="fas fa-sort ml-1"></i>
                            </th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer sortable" data-sort="responsible">
                                Responsável <i class="fas fa-sort ml-1"></i>
                            </th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                                Projeto
                            </th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                                Painel/Detalhes
                            </th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer sortable" data-sort="status">
                                Status <i class="fas fa-sort ml-1"></i>
                            </th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer sortable" data-sort="deadline">
                                Prazo <i class="fas fa-sort ml-1"></i>
                            </th>
                            <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                                Timeline
                            </th>
                            <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
                                Ações
                            </th>
                        </tr>
                    </thead>
                    <tbody class="bg-white divide-y divide-gray-200" id="projects-table-body">
                        <!-- Project 1 -->
                        <tr class="project-card hover:bg-gray-50 transition duration-150 ease-in-out">
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">1</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Lucas</td>
                            <td class="px-6 py-4 text-sm text-gray-900">
                                <div class="font-medium">MB-19014-30/31/32</div>
                                <div class="text-gray-500 text-xs">JBS - MICROCANAL</div>
                            </td>
                            <td class="px-6 py-4 text-sm text-gray-500">
                                <div>Painel de controle e partida</div>
                                <div class="text-gray-500 text-xs">01 desenho - Robson</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 py-1 text-xs rounded-full status-100">100%</span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">14/04/2020</td>
                            <td class="px-6 py-4">
                                <div class="flex items-center">
                                    <div class="w-32 bg-gray-200 rounded h-2">
                                        <div class="bg-green-500 h-2 rounded" style="width: 100%"></div>
                                    </div>
                                    <span class="ml-2 text-xs text-gray-500">Concluído</span>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                <button class="text-blue-500 hover:text-blue-700 mr-3"><i class="fas fa-eye"></i></button>
                                <button class="text-green-500 hover:text-green-700"><i class="fas fa-edit"></i></button>
                            </td>
                        </tr>
                        
                        <!-- Project 2 -->
                        <tr class="project-card hover:bg-gray-50 transition duration-150 ease-in-out">
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">2</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Lucas</td>
                            <td class="px-6 py-4 text-sm text-gray-900">
                                <div class="font-medium">MB-19023-17-01/02/03/04</div>
                                <div class="text-gray-500 text-xs">BRF SEROPÉDICA</div>
                            </td>
                            <td class="px-6 py-4 text-sm text-gray-500">
                                <div>Painel de controle</div>
                                <div class="text-gray-500 text-xs">01 desenho - Henrique</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 py-1 text-xs rounded-full status-100">100%</span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10/05/2020</td>
                            <td class="px-6 py-4">
                                <div class="flex items-center">
                                    <div class="w-32 bg-gray-200 rounded h-2">
                                        <div class="bg-green-500 h-2 rounded" style="width: 100%"></div>
                                    </div>
                                    <span class="ml-2 text-xs text-gray-500">Concluído</span>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                <button class="text-blue-500 hover:text-blue-700 mr-3"><i class="fas fa-eye"></i></button>
                                <button class="text-green-500 hover:text-green-700"><i class="fas fa-edit"></i></button>
                            </td>
                        </tr>
                        
                        <!-- Project 3 -->
                        <tr class="project-card hover:bg-gray-50 transition duration-150 ease-in-out">
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">3</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Lucas</td>
                            <td class="px-6 py-4 text-sm text-gray-900">
                                <div class="font-medium">MB-19499-01-01/02/03/04</div>
                                <div class="text-gray-500 text-xs">GLP</div>
                            </td>
                            <td class="px-6 py-4 text-sm text-gray-500">
                                <div>Painel de controle e partida</div>
                                <div class="text-gray-500 text-xs">04 desenhos - Henrique</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 py-1 text-xs rounded-full status-1000">1000%</span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">21/04/2020</td>
                            <td class="px-6 py-4">
                                <div class="flex items-center">
                                    <div class="w-32 bg-gray-200 rounded h-2">
                                        <div class="bg-green-700 h-2 rounded" style="width: 100%"></div>
                                    </div>
                                    <span class="ml-2 text-xs text-gray-500">Super concluído</span>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                <button class="text-blue-500 hover:text-blue-700 mr-3"><i class="fas fa-eye"></i></button>
                                <button class="text-green-500 hover:text-green-700"><i class="fas fa-edit"></i></button>
                            </td>
                        </tr>
                        
                        <!-- Project 4 -->
                        <tr class="project-card hover:bg-gray-50 transition duration-150 ease-in-out">
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">4</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Fabio</td>
                            <td class="px-6 py-4 text-sm text-gray-900">
                                <div class="font-medium">MB-19130-05-01</div>
                                <div class="text-gray-500 text-xs">AIR LIQUIDE</div>
                            </td>
                            <td class="px-6 py-4 text-sm text-gray-500">
                                <div>Caixa de junção JB</div>
                                <div class="text-gray-500 text-xs">01 desenho - Henrique</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 py-1 text-xs rounded-full status-25">25%</span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">25/04/2020</td>
                            <td class="px-6 py-4">
                                <div class="flex items-center">
                                    <div class="w-32 bg-gray-200 rounded h-2">
                                        <div class="bg-orange-500 h-2 rounded" style="width: 25%"></div>
                                    </div>
                                    <span class="ml-2 text-xs text-gray-500">Em início</span>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                <button class="text-blue-500 hover:text-blue-700 mr-3"><i class="fas fa-eye"></i></button>
                                <button class="text-green-500 hover:text-green-700"><i class="fas fa-edit"></i></button>
                            </td>
                        </tr>
                        
                        <!-- Project 5 -->
                        <tr class="project-card hover:bg-gray-50 transition duration-150 ease-in-out">
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">5</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Lucas</td>
                            <td class="px-6 py-4 text-sm text-gray-900">
                                <div class="font-medium">MB-19041-22 - MAYEKAWA COLOMBIA</div>
                                <div class="text-gray-500 text-xs">Chiller Propano</div>
                            </td>
                            <td class="px-6 py-4 text-sm text-gray-500">
                                <div>Painel de controle e partida</div>
                                <div class="text-gray-500 text-xs">01 desenho - Henrique</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 py-1 text-xs rounded-full status-90">90%</span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">25/05/2020</td>
                            <td class="px-6 py-4">
                                <div class="flex items-center">
                                    <div class="w-32 bg-gray-200 rounded h-2">
                                        <div class="bg-green-400 h-2 rounded" style="width: 90%"></div>
                                    </div>
                                    <span class="ml-2 text-xs text-gray-500">Quase pronto</span>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                <button class="text-blue-500 hover:text-blue-700 mr-3"><i class="fas fa-eye"></i></button>
                                <button class="text-green-500 hover:text-green-700"><i class="fas fa-edit"></i></button>
                            </td>
                        </tr>
                        
                        <!-- Project 6 -->
                        <tr class="project-card hover:bg-gray-50 transition duration-150 ease-in-out">
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">6</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">?</td>
                            <td class="px-6 py-4 text-sm text-gray-900">
                                <div class="font-medium">Mypro Touch RI</div>
                            </td>
                            <td class="px-6 py-4 text-sm text-gray-500">
                                <div>Melhoria no projeto Padrão</div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 py-1 text-xs rounded-full status-50">50%</span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10/04/2020</td>
                            <td class="px-6 py-4">
                                <div class="flex items-center">
                                    <div class="w-32 bg-gray-200 rounded h-2">
                                        <div class="bg-yellow-500 h-2 rounded" style="width: 50%"></div>
                                    </div>
                                    <span class="ml-2 text-xs text-gray-500">Em andamento</span>
                                </div>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                <button class="text-blue-500 hover:text-blue-700 mr-3"><i class="fas fa-eye"></i></button>
                                <button class="text-green-500 hover:text-green-700"><i class="fas fa-edit"></i></button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="px-6 py-4 border-t border-gray-200 flex items-center justify-between">
                <div class="text-sm text-gray-500">
                    Mostrando <span class="font-medium">1</span> a <span class="font-medium">6</span> de <span class="font-medium">23</span> projetos
                </div>
                <div class="flex space-x-2">
                    <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
                        Anterior
                    </button>
                    <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-white bg-blue-500 hover:bg-blue-600">
                        1
                    </button>
                    <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
                        2
                    </button>
                    <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
                        3
                    </button>
                    <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
                        Próxima
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- Project Details Modal -->
    <div id="project-modal" class="fixed inset-0 z-50 hidden overflow-y-auto">
        <div class="flex items-center 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 px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-3xl sm:w-full sm:p-6">
                <div class="hidden sm:block absolute top-0 right-0 pt-4 pr-4">
                    <button type="button" id="close-modal" class="bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none">
                        <span class="sr-only">Close</span>
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                <div class="sm:flex sm:items-start">
                    <div class="mt-3 text-center sm:mt-0 sm:text-left w-full">
                        <h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">Detalhes do Projeto</h3>
                        <div class="mt-5 border-t border-gray-200 pt-5">
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                                <div>
                                    <h4 class="text-sm font-medium text-gray-500">Responsável</h4>
                                    <p id="modal-responsible" class="mt-1 text-sm text-gray-900">Lucas</p>
                                </div>
                                <div>
                                    <h4 class="text-sm font-medium text-gray-500">Código do Projeto</h4>
                                    <p id="modal-code" class="mt-1 text-sm text-gray-900">MB-19014-30/31/32</p>
                                </div>
                                <div>
                                    <h4 class="text-sm font-medium text-gray-500">Descrição</h4>
                                    <p id="modal-description" class="mt-1 text-sm text-gray-900">Painel de controle e partida</p>
                                </div>
                                <div>
                                    <h4 class="text-sm font-medium text-gray-500">Cliente</h4>
                                    <p id="modal-client" class="mt-1 text-sm text-gray-900">JBS - MICROCANAL</p>
                                </div>
                                <div>
                                    <h4 class="text-sm font-medium text-gray-500">Status</h4>
                                    <p id="modal-status" class="mt-1 text-sm"><span class="px-2 py-1 text-xs rounded-full status-100">100%</span></p>
                                </div>
                                <div>
                                    <h4 class="text-sm font-medium text-gray-500">Prazo</h4>
                                    <p id="modal-deadline" class="mt-1 text-sm text-gray-900">14/04/2020</p>
                                </div>
                                <div class="md:col-span-2">
                                    <h4 class="text-sm font-medium text-gray-500">Detalhes Técnicos</h4>
                                    <div id="modal-details" class="mt-1 text-sm text-gray-900">
                                        <p><strong>Tipo de Painel:</strong> Controle e partida</p>
                                        <p><strong>Desenhos:</strong> 01 desenho</p>
                                        <p><strong>Responsável técnico:</strong> Robson</p>
                                        <p><strong>Fornecedores:</strong> WEG / Danfoss</p>
                                    </div>
                                </div>
                            </div>
                            <div class="mt-6">
                                <h4 class="text-sm font-medium text-gray-500">Progresso</h4>
                                <div class="mt-2">
                                    <div class="w-full bg-gray-200 rounded h-4">
                                        <div id="modal-progress-bar" class="bg-green-500 h-4 rounded" style="width: 100%"></div>
                                    </div>
                                    <p id="modal-progress-text" class="mt-1 text-sm text-gray-500 text-right">Concluído - 100%</p>
                                </div>
                            </div>
                            <div class="mt-6">
                                <h4 class="text-sm font-medium text-gray-500">Observações</h4>
                                <div id="modal-notes" class="mt-1 text-sm text-gray-900">
                                    <p>Projeto concluído conforme especificações do cliente.</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="mt-5 sm:mt-6 sm:grid sm:grid-cols-2 sm:gap-3 sm:grid-flow-row-dense">
                    <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none sm:col-start-2 sm:text-sm">
                        Editar Projeto
                    </button>
                    <button type="button" id="cancel-modal" 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 sm:mt-0 sm:col-start-1 sm:text-sm">
                        Fechar
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script>
        // Initialize Alpine.js-like functionality (simplified)
        document.addEventListener('DOMContentLoaded', function() {
            // Initialize status chart
            const statusCtx = document.getElementById('statusChart').getContext('2d');
            const statusChart = new Chart(statusCtx, {
                type: 'doughnut',
                data: {
                    labels: ['Concluídos (100%)', 'Quase Prontos (90%)', 'Em Andamento (50%)', 'Em Início (20-25%)', 'Não Iniciados (0%)'],
                    datasets: [{
                        data: [7, 5, 3, 2, 6],
                        backgroundColor: [
                            '#10B981',
                            '#34D399',
                            '#F59E0B',
                            '#F97316',
                            '#EF4444'
                        ],
                        borderWidth: 0
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        legend: {
                            position: 'right',
                        },
                        tooltip: {
                            callbacks: {
                                label: function(context) {
                                    const label = context.label || '';
                                    const value = context.raw || 0;
                                    return `${label}: ${value} projetos`;
                                }
                            }
                        }
                    },
                    cutout: '70%'
                }
            });
            
            // Initialize responsible chart
            const responsibleCtx = document.getElementById('responsibleChart').getContext('2d');
            const responsibleChart = new Chart(responsibleCtx, {
                type: 'bar',
                data: {
                    labels: ['Lucas', 'Henrique', 'Robson', 'Fabio', 'Thiago', 'Outros'],
                    datasets: [{
                        data: [12, 7, 3, 2, 3, 2],
                        backgroundColor: [
                            '#3B82F6',
                            '#6366F1',
                            '#8B5CF6',
                            '#EC4899',
                            '#F59E0B',
                            '#10B981'
                        ],
                        borderWidth: 0
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        legend: {
                            display: false
                        },
                        tooltip: {
                            callbacks: {
                                label: function(context) {
                                    const label = context.label || '';
                                    const value = context.raw || 0;
                                    return `${label}: ${value} projetos`;
                                }
                            }
                        }
                    },
                    scales: {
                        y: {
                            beginAtZero: true,
                            ticks: {
                                precision: 0
                            }
                        }
                    }
                }
            });
            
            // Modal functionality
            const openModalButtons = document.querySelectorAll('[class*="fa-eye"]');
            const closeModalBtn = document.getElementById('close-modal');
            const cancelModalBtn = document.getElementById('cancel-modal');
            const modal = document.getElementById('project-modal');
            
            openModalButtons.forEach(button => {
                button.addEventListener('click', function() {
                    // Find the project data from the row
                    const row = this.closest('tr');
                    const projectData = {
                        id: row.querySelector('td:nth-child(1)').textContent,
                        responsible: row.querySelector('td:nth-child(2)').textContent,
                        code: row.querySelector('td:nth-child(3) div:first-child').textContent,
                        client: row.querySelector('td:nth-child(3) div:last-child').textContent,
                        description: row.querySelector('td:nth-child(4) div:first-child').textContent,
                        details: row.querySelector('td:nth-child(4) div:last-child').textContent,
                        status: row.querySelector('td:nth-child(5) span').textContent,
                        deadline: row.querySelector('td:nth-child(6)').textContent,
                        progress: row.querySelector('td:nth-child(7) div div').style.width
                    };
                    
                    // Populate modal with project data
                    document.getElementById('modal-responsible').textContent = projectData.responsible;
                    document.getElementById('modal-code').textContent = projectData.code;
                    document.getElementById('modal-client').textContent = projectData.client;
                    document.getElementById('modal-description').textContent = projectData.description;
                    document.getElementById('modal-status').innerHTML = `<span class="px-2 py-1 text-xs rounded-full ${row.querySelector('td:nth-child(5) span').className}">${projectData.status}</span>`;
                    document.getElementById('modal-deadline').textContent = projectData.deadline;
                    document.getElementById('modal-progress-bar').style.width = projectData.progress;
                    document.getElementById('modal-progress-text').textContent = projectData.progress === '100%' ? 'Concluído - 100%' : `${projectData.status} completado`;
                    
                    // Show modal
                    modal.classList.remove('hidden');
                });
            });
            
            closeModalBtn.addEventListener('click', function() {
                modal.classList.add('hidden');
            });
            
            cancelModalBtn.addEventListener('click', function() {
                modal.classList.add('hidden');
            });
            
            // Filter functionality
            const filterStatus = document.getElementById('filter-status');
            const filterResponsible = document.getElementById('filter-responsible');
            const resetFilters = document.getElementById('reset-filters');
            const projects = document.querySelectorAll('.project-card');
            
            function applyFilters() {
                const statusFilter = filterStatus.value;
                const responsibleFilter = filterResponsible.value;
                
                projects.forEach(project => {
                    const projectStatus = project.querySelector('td:nth-child(5) span').textContent.replace('%', '');
                    const projectResponsible = project.querySelector('td:nth-child(2)').textContent;
                    
                    const statusMatch = statusFilter === 'all' || 
                                       (statusFilter === '0' && projectStatus === '0') ||
                                       (statusFilter === '20-25' && (projectStatus === '20' || projectStatus === '25')) ||
                                       (statusFilter === '50' && projectStatus === '50') ||
                                       (statusFilter === '90' && projectStatus === '90') ||
                                       (statusFilter === '100' && projectStatus === '100');
                                       
                    const responsibleMatch = responsibleFilter === 'all' || 
                                           (responsibleFilter === projectResponsible);
                    
                    if (statusMatch && responsibleMatch) {
                        project.style.display = '';
                    } else {
                        project.style.display = 'none';
                    }
                });
            }
            
            filterStatus.addEventListener('change', applyFilters);
            filterResponsible.addEventListener('change', applyFilters);
            resetFilters.addEventListener('click', function() {
                filterStatus.value = 'all';
                filterResponsible.value = 'all';
                applyFilters();
            });
            
            // Search functionality
            const searchInput = document.getElementById('search-projects');
            searchInput.addEventListener('input', function() {
                const searchTerm = this.value.toLowerCase();
                
                projects.forEach(project => {
                    const projectText = project.textContent.toLowerCase();
                    
                    if (projectText.includes(searchTerm)) {
                        project.style.display = '';
                    } else {
                        project.style.display = 'none';
                    }
                });
            });
            
            // Sort functionality
            const sortButtons = document.querySelectorAll('.sortable');
            sortButtons.forEach(button => {
                button.addEventListener('click', function() {
                    const sortBy = this.getAttribute('data-sort');
                    const icon = this.querySelector('i');
                    
                    // Toggle sort direction
                    const isAsc = !this.classList.contains('asc');
                    this.classList.toggle('asc', isAsc);
                    this.classList.toggle('desc', !isAsc);
                    
                    // Update icon
                    if (isAsc) {
                        icon.classList.remove('fa-sort', 'fa-sort-down');
                        icon.classList.add('fa-sort-up');
                    } else {
                        icon.classList.remove('fa-sort', 'fa-sort-up');
                        icon.classList.add('fa-sort-down');
                    }
                    
                    // Sort table
                    sortTable(sortBy, isAsc);
                });
            });
            
            function sortTable(sortBy, isAsc) {
                const tbody = document.getElementById('projects-table-body');
                const rows = Array.from(tbody.querySelectorAll('tr'));
                
                rows.sort((a, b) => {
                    let aValue, bValue;
                    
                    switch(sortBy) {
                        case 'id':
                            aValue = parseInt(a.querySelector('td:nth-child(1)').textContent);
                            bValue = parseInt(b.querySelector('td:nth-child(1)').textContent);
                            return isAsc ? aValue - bValue : bValue - aValue;
                            
                        case 'responsible':
                            aValue = a.querySelector('td:nth-child(2)').textContent;
                            bValue = b.querySelector('td:nth-child(2)').textContent;
                            return isAsc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue);
                            
                        case 'status':
                            aValue = parseInt(a.querySelector('td:nth-child(5) span').textContent.replace('%', ''));
                            bValue = parseInt(b.querySelector('td:nth-child(5) span').textContent.replace('%', ''));
                            return isAsc ? aValue - bValue : bValue - aValue;
                            
                        case 'deadline':
                            aValue = new Date(a.querySelector('td:nth-child(6)').textContent.split('/').reverse().join('-'));
                            bValue = new Date(b.querySelector('td:nth-child(6)').textContent.split('/').reverse().join('-'));
                            return isAsc ? aValue - bValue : bValue - aValue;
                    }
                });
                
                // Remove existing rows
                while (tbody.firstChild) {
                    tbody.removeChild(tbody.firstChild);
                }
                
                // Add sorted rows
                rows.forEach(row => tbody.appendChild(row));
            }
            
            // Export functionality
            const exportBtn = document.getElementById('export-data');
            exportBtn.addEventListener('click', function() {
                // In a real application, this would generate a CSV or Excel file
                alert('Exportando dados para CSV... (funcionalidade simulada)');
            });
        });
    </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=mathmartinelli/mayekawa-eplan" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>