Spaces:
Running

File size: 31,267 Bytes
bb2eaf8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Jacareí Transporte Oficial</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .map-container {
            height: 300px;
            background-color: #e5e7eb;
            position: relative;
            overflow: hidden;
        }
        .map-placeholder {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            color: #6b7280;
        }
        .driver-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: 2px solid #3b82f6;
        }
        .slide-up {
            animation: slideUp 0.3s ease-out;
        }
        @keyframes slideUp {
            from { transform: translateY(100%); }
            to { transform: translateY(0); }
        }
        .pulse {
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }
    </style>
</head>
<body class="bg-gray-100 font-sans">
    <!-- Login Screen -->
    <div id="login-screen" class="min-h-screen flex flex-col justify-center items-center p-4 bg-gradient-to-b from-blue-600 to-blue-800 text-white">
        <div class="bg-white rounded-lg shadow-xl p-8 w-full max-w-md text-gray-800">
            <div class="flex justify-center mb-6">
                <img src="https://via.placeholder.com/80" alt="Prefeitura de Jacareí" class="h-20">
            </div>
            <h1 class="text-2xl font-bold text-center mb-2 text-blue-800">Jacareí Transporte Oficial</h1>
            <p class="text-center text-gray-600 mb-8">Serviço exclusivo para servidores municipais</p>
            
            <div class="mb-4">
                <label class="block text-gray-700 text-sm font-bold mb-2" for="email">E-mail Institucional</label>
                <input id="email" type="email" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="seu.email@jacarei.sp.gov.br">
            </div>
            <div class="mb-6">
                <label class="block text-gray-700 text-sm font-bold mb-2" for="password">Senha</label>
                <input id="password" type="password" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="••••••••">
            </div>
            <button onclick="login()" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
                <i class="fas fa-sign-in-alt mr-2"></i> Entrar
            </button>
            
            <div class="mt-6 text-center text-sm text-gray-500">
                <p>Problemas para acessar? Contate o <a href="#" class="text-blue-600 hover:underline">suporte TI</a></p>
            </div>
        </div>
    </div>

    <!-- Main App (hidden initially) -->
    <div id="app-container" class="hidden">
        <!-- Header -->
        <header class="bg-blue-700 text-white p-4 shadow-md">
            <div class="flex justify-between items-center">
                <div class="flex items-center">
                    <img src="https://via.placeholder.com/40" alt="Logo" class="h-10 mr-2">
                    <h1 class="font-bold text-lg">Transporte Oficial</h1>
                </div>
                <div class="flex items-center space-x-3">
                    <button id="profile-btn" class="bg-blue-600 hover:bg-blue-800 rounded-full p-2 transition">
                        <i class="fas fa-user"></i>
                    </button>
                    <button id="menu-btn" class="bg-blue-600 hover:bg-blue-800 rounded-full p-2 transition">
                        <i class="fas fa-bars"></i>
                    </button>
                </div>
            </div>
        </header>

        <!-- Main Content -->
        <main class="pb-24">
            <!-- Home Screen -->
            <div id="home-screen" class="p-4">
                <div class="bg-white rounded-xl shadow-md p-4 mb-4">
                    <h2 class="font-bold text-lg mb-3 text-gray-800">Solicitar transporte</h2>
                    
                    <div class="map-container rounded-lg mb-4">
                        <div class="map-placeholder">
                            <i class="fas fa-map-marked-alt text-4xl mb-2"></i>
                            <p>Carregando mapa...</p>
                        </div>
                    </div>
                    
                    <div class="mb-3">
                        <label class="block text-gray-700 text-sm font-bold mb-1">Local de partida</label>
                        <div class="flex items-center bg-gray-100 rounded-lg p-3">
                            <i class="fas fa-map-marker-alt text-blue-600 mr-2"></i>
                            <span id="current-location" class="text-gray-700">Minha localização atual</span>
                        </div>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-700 text-sm font-bold mb-1">Destino</label>
                        <div class="relative">
                            <input id="destination-input" type="text" class="w-full px-4 py-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Digite o destino ou selecione abaixo">
                            <button class="absolute right-3 top-3 text-gray-500">
                                <i class="fas fa-search"></i>
                            </button>
                        </div>
                    </div>
                    
                    <div class="mb-4">
                        <h3 class="text-sm font-semibold text-gray-600 mb-2">LOCAIS FREQUENTES</h3>
                        <div class="grid grid-cols-2 gap-2">
                            <button onclick="selectDestination('Prefeitura Municipal')" class="bg-gray-100 hover:bg-gray-200 rounded-lg p-3 text-left transition">
                                <i class="fas fa-landmark text-blue-600 mr-2"></i> Prefeitura
                            </button>
                            <button onclick="selectDestination('Hospital Municipal')" class="bg-gray-100 hover:bg-gray-200 rounded-lg p-3 text-left transition">
                                <i class="fas fa-hospital text-red-600 mr-2"></i> Hospital
                            </button>
                            <button onclick="selectDestination('Secretaria de Educação')" class="bg-gray-100 hover:bg-gray-200 rounded-lg p-3 text-left transition">
                                <i class="fas fa-school text-yellow-600 mr-2"></i> Educação
                            </button>
                            <button onclick="selectDestination('Secretaria de Obras')" class="bg-gray-100 hover:bg-gray-200 rounded-lg p-3 text-left transition">
                                <i class="fas fa-hard-hat text-green-600 mr-2"></i> Obras
                            </button>
                        </div>
                    </div>
                    
                    <button id="request-ride-btn" onclick="requestRide()" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 mt-2 flex items-center justify-center pulse">
                        <i class="fas fa-car mr-2"></i> Solicitar Veículo
                    </button>
                </div>
                
                <div class="bg-white rounded-xl shadow-md p-4">
                    <h2 class="font-bold text-lg mb-3 text-gray-800">Histórico recente</h2>
                    <div class="space-y-3">
                        <div class="flex items-center p-2 border-b">
                            <div class="bg-blue-100 rounded-full p-3 mr-3">
                                <i class="fas fa-car text-blue-600"></i>
                            </div>
                            <div>
                                <p class="font-medium">Prefeitura → Hospital</p>
                                <p class="text-sm text-gray-500">15/06/2023 - 14:30</p>
                            </div>
                        </div>
                        <div class="flex items-center p-2 border-b">
                            <div class="bg-green-100 rounded-full p-3 mr-3">
                                <i class="fas fa-car text-green-600"></i>
                            </div>
                            <div>
                                <p class="font-medium">Educação → Obras</p>
                                <p class="text-sm text-gray-500">14/06/2023 - 10:15</p>
                            </div>
                        </div>
                    </div>
                    <button class="text-blue-600 font-medium mt-3 w-full text-center py-2">
                        Ver histórico completo
                    </button>
                </div>
            </div>
            
            <!-- Ride Requested Screen (hidden initially) -->
            <div id="ride-requested-screen" class="hidden p-4">
                <div class="bg-white rounded-xl shadow-md p-4 mb-4">
                    <div class="text-center mb-6">
                        <div class="inline-block bg-blue-100 rounded-full p-4 mb-3">
                            <i class="fas fa-car text-blue-600 text-3xl"></i>
                        </div>
                        <h2 class="font-bold text-xl mb-1">Solicitação enviada</h2>
                        <p class="text-gray-600">Aguardando motorista disponível</p>
                    </div>
                    
                    <div class="flex justify-between items-center mb-6">
                        <div>
                            <p class="text-gray-500 text-sm">De</p>
                            <p class="font-medium">Minha localização</p>
                        </div>
                        <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center">
                            <i class="fas fa-arrow-right text-blue-600"></i>
                        </div>
                        <div>
                            <p class="text-gray-500 text-sm">Para</p>
                            <p id="destination-display" class="font-medium">Hospital Municipal</p>
                        </div>
                    </div>
                    
                    <div class="bg-gray-100 rounded-lg p-3 mb-4">
                        <div class="flex justify-between mb-2">
                            <span class="text-gray-600">Tempo estimado:</span>
                            <span class="font-medium">5-7 minutos</span>
                        </div>
                        <div class="flex justify-between">
                            <span class="text-gray-600">Distância:</span>
                            <span class="font-medium">2,3 km</span>
                        </div>
                    </div>
                    
                    <button id="cancel-ride-btn" onclick="cancelRide()" class="w-full bg-red-100 hover:bg-red-200 text-red-600 font-bold py-3 px-4 rounded-lg transition duration-200">
                        Cancelar solicitação
                    </button>
                </div>
            </div>
            
            <!-- Driver Assigned Screen (hidden initially) -->
            <div id="driver-assigned-screen" class="hidden p-4">
                <div class="bg-white rounded-xl shadow-md p-4 mb-4">
                    <div class="text-center mb-6">
                        <div class="inline-block bg-green-100 rounded-full p-4 mb-3">
                            <i class="fas fa-check-circle text-green-600 text-3xl"></i>
                        </div>
                        <h2 class="font-bold text-xl mb-1">Motorista encontrado!</h2>
                        <p class="text-gray-600">Seu veículo está a caminho</p>
                    </div>
                    
                    <div class="flex items-center justify-center mb-6">
                        <img src="https://via.placeholder.com/80" alt="Motorista" class="driver-avatar mr-4">
                        <div>
                            <p class="font-bold">João Silva</p>
                            <p class="text-gray-600">Placa: ABC-1234</p>
                            <div class="flex items-center mt-1">
                                <i class="fas fa-star text-yellow-400 mr-1"></i>
                                <span class="font-medium">4.9</span>
                                <span class="text-gray-500 text-sm ml-1">(42 avaliações)</span>
                            </div>
                        </div>
                    </div>
                    
                    <div class="map-container rounded-lg mb-4">
                        <div class="map-placeholder">
                            <i class="fas fa-car-side text-4xl mb-2 text-blue-600"></i>
                            <p>Motorista a 1,2 km de distância</p>
                        </div>
                    </div>
                    
                    <div class="bg-gray-100 rounded-lg p-3 mb-4">
                        <div class="flex justify-between mb-2">
                            <span class="text-gray-600">Tempo estimado:</span>
                            <span class="font-medium">3 minutos</span>
                        </div>
                        <div class="flex justify-between">
                            <span class="text-gray-600">Veículo:</span>
                            <span class="font-medium">Fiat Toro - Preto</span>
                        </div>
                    </div>
                    
                    <div class="flex space-x-3">
                        <button class="flex-1 bg-blue-100 hover:bg-blue-200 text-blue-600 font-medium py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
                            <i class="fas fa-phone-alt mr-2"></i> Ligar
                        </button>
                        <button onclick="cancelRide()" class="flex-1 bg-red-100 hover:bg-red-200 text-red-600 font-medium py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
                            <i class="fas fa-times mr-2"></i> Cancelar
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- Ride In Progress Screen (hidden initially) -->
            <div id="ride-in-progress-screen" class="hidden p-4">
                <div class="bg-white rounded-xl shadow-md p-4 mb-4">
                    <div class="text-center mb-6">
                        <h2 class="font-bold text-xl mb-1">Em andamento</h2>
                        <p class="text-gray-600">Você está a caminho do destino</p>
                    </div>
                    
                    <div class="map-container rounded-lg mb-4">
                        <div class="map-placeholder">
                            <i class="fas fa-route text-4xl mb-2 text-blue-600"></i>
                            <p>Rota em andamento</p>
                        </div>
                    </div>
                    
                    <div class="flex items-center justify-between mb-6 p-3 bg-gray-100 rounded-lg">
                        <div class="flex items-center">
                            <img src="https://via.placeholder.com/50" alt="Motorista" class="w-10 h-10 rounded-full mr-3">
                            <div>
                                <p class="font-bold">João Silva</p>
                                <p class="text-gray-600 text-sm">Fiat Toro - ABC-1234</p>
                            </div>
                        </div>
                        <button class="bg-blue-600 hover:bg-blue-700 text-white rounded-full p-2">
                            <i class="fas fa-phone-alt"></i>
                        </button>
                    </div>
                    
                    <div class="bg-gray-100 rounded-lg p-3 mb-4">
                        <div class="flex justify-between mb-2">
                            <span class="text-gray-600">Destino:</span>
                            <span id="current-destination" class="font-medium">Hospital Municipal</span>
                        </div>
                        <div class="flex justify-between mb-2">
                            <span class="text-gray-600">Tempo restante:</span>
                            <span class="font-medium">~2 minutos</span>
                        </div>
                        <div class="flex justify-between">
                            <span class="text-gray-600">Distância:</span>
                            <span class="font-medium">0,7 km</span>
                        </div>
                    </div>
                    
                    <button onclick="completeRide()" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
                        <i class="fas fa-flag-checkered mr-2"></i> Cheguei no destino
                    </button>
                </div>
            </div>
            
            <!-- Ride Completed Screen (hidden initially) -->
            <div id="ride-completed-screen" class="hidden p-4">
                <div class="bg-white rounded-xl shadow-md p-4 mb-4">
                    <div class="text-center mb-6">
                        <div class="inline-block bg-green-100 rounded-full p-4 mb-3">
                            <i class="fas fa-check-circle text-green-600 text-3xl"></i>
                        </div>
                        <h2 class="font-bold text-xl mb-1">Corrida finalizada</h2>
                        <p class="text-gray-600">Obrigado por utilizar o Transporte Oficial</p>
                    </div>
                    
                    <div class="bg-gray-100 rounded-lg p-3 mb-6">
                        <div class="flex justify-between mb-2">
                            <span class="text-gray-600">De:</span>
                            <span class="font-medium">Minha localização</span>
                        </div>
                        <div class="flex justify-between mb-2">
                            <span class="text-gray-600">Para:</span>
                            <span id="completed-destination" class="font-medium">Hospital Municipal</span>
                        </div>
                        <div class="flex justify-between mb-2">
                            <span class="text-gray-600">Motorista:</span>
                            <span class="font-medium">João Silva</span>
                        </div>
                        <div class="flex justify-between mb-2">
                            <span class="text-gray-600">Veículo:</span>
                            <span class="font-medium">Fiat Toro - ABC-1234</span>
                        </div>
                        <div class="flex justify-between">
                            <span class="text-gray-600">Duração:</span>
                            <span class="font-medium">7 minutos</span>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <h3 class="font-bold text-lg mb-3 text-gray-800">Avalie o serviço</h3>
                        <div class="flex justify-center space-x-2 mb-4">
                            <i class="fas fa-star text-2xl text-gray-300 hover:text-yellow-400 cursor-pointer" onmouseover="hoverStar(1)" onclick="rateStar(1)"></i>
                            <i class="fas fa-star text-2xl text-gray-300 hover:text-yellow-400 cursor-pointer" onmouseover="hoverStar(2)" onclick="rateStar(2)"></i>
                            <i class="fas fa-star text-2xl text-gray-300 hover:text-yellow-400 cursor-pointer" onmouseover="hoverStar(3)" onclick="rateStar(3)"></i>
                            <i class="fas fa-star text-2xl text-gray-300 hover:text-yellow-400 cursor-pointer" onmouseover="hoverStar(4)" onclick="rateStar(4)"></i>
                            <i class="fas fa-star text-2xl text-gray-300 hover:text-yellow-400 cursor-pointer" onmouseover="hoverStar(5)" onclick="rateStar(5)"></i>
                        </div>
                        <textarea class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Comentários (opcional)" rows="2"></textarea>
                    </div>
                    
                    <button onclick="returnHome()" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200">
                        Voltar ao início
                    </button>
                </div>
            </div>
        </main>
        
        <!-- Bottom Navigation -->
        <nav class="fixed bottom-0 left-0 right-0 bg-white shadow-lg border-t border-gray-200 flex justify-around items-center p-2">
            <button class="flex flex-col items-center p-2 text-blue-600">
                <i class="fas fa-home text-xl"></i>
                <span class="text-xs mt-1">Início</span>
            </button>
            <button class="flex flex-col items-center p-2 text-gray-500">
                <i class="fas fa-history text-xl"></i>
                <span class="text-xs mt-1">Histórico</span>
            </button>
            <button class="flex flex-col items-center p-2 text-gray-500">
                <i class="fas fa-cog text-xl"></i>
                <span class="text-xs mt-1">Configurações</span>
            </button>
            <button class="flex flex-col items-center p-2 text-gray-500">
                <i class="fas fa-question-circle text-xl"></i>
                <span class="text-xs mt-1">Ajuda</span>
            </button>
        </nav>
        
        <!-- Side Menu (hidden initially) -->
        <div id="side-menu" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden">
            <div class="absolute right-0 top-0 bottom-0 bg-white w-64 shadow-lg slide-up">
                <div class="p-4 border-b border-gray-200 flex items-center">
                    <img src="https://via.placeholder.com/40" alt="Usuário" class="rounded-full mr-3">
                    <div>
                        <p class="font-bold">Maria Oliveira</p>
                        <p class="text-sm text-gray-600">maria.oliveira@jacarei.sp.gov.br</p>
                    </div>
                </div>
                <div class="p-2">
                    <button class="w-full text-left p-3 rounded-lg hover:bg-gray-100 flex items-center">
                        <i class="fas fa-user-circle text-gray-500 mr-3 w-6 text-center"></i>
                        <span>Meu perfil</span>
                    </button>
                    <button class="w-full text-left p-3 rounded-lg hover:bg-gray-100 flex items-center">
                        <i class="fas fa-history text-gray-500 mr-3 w-6 text-center"></i>
                        <span>Histórico completo</span>
                    </button>
                    <button class="w-full text-left p-3 rounded-lg hover:bg-gray-100 flex items-center">
                        <i class="fas fa-car text-gray-500 mr-3 w-6 text-center"></i>
                        <span>Veículos disponíveis</span>
                    </button>
                    <button class="w-full text-left p-3 rounded-lg hover:bg-gray-100 flex items-center">
                        <i class="fas fa-question-circle text-gray-500 mr-3 w-6 text-center"></i>
                        <span>Ajuda e suporte</span>
                    </button>
                    <button class="w-full text-left p-3 rounded-lg hover:bg-gray-100 flex items-center">
                        <i class="fas fa-cog text-gray-500 mr-3 w-6 text-center"></i>
                        <span>Configurações</span>
                    </button>
                </div>
                <div class="absolute bottom-0 left-0 right-0 p-4 border-t border-gray-200">
                    <button onclick="logout()" class="w-full bg-red-100 hover:bg-red-200 text-red-600 font-medium py-2 px-4 rounded-lg transition duration-200 flex items-center justify-center">
                        <i class="fas fa-sign-out-alt mr-2"></i> Sair
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script>
        // App state
        let currentDestination = '';
        let currentRating = 0;
        
        // DOM elements
        const loginScreen = document.getElementById('login-screen');
        const appContainer = document.getElementById('app-container');
        const homeScreen = document.getElementById('home-screen');
        const rideRequestedScreen = document.getElementById('ride-requested-screen');
        const driverAssignedScreen = document.getElementById('driver-assigned-screen');
        const rideInProgressScreen = document.getElementById('ride-in-progress-screen');
        const rideCompletedScreen = document.getElementById('ride-completed-screen');
        const sideMenu = document.getElementById('side-menu');
        const destinationInput = document.getElementById('destination-input');
        const destinationDisplay = document.getElementById('destination-display');
        const currentDestination = document.getElementById('current-destination');
        const completedDestination = document.getElementById('completed-destination');
        
        // Login function
        function login() {
            const email = document.getElementById('email').value;
            const password = document.getElementById('password').value;
            
            // Simple validation
            if (email && password) {
                loginScreen.classList.add('hidden');
                appContainer.classList.remove('hidden');
            } else {
                alert('Por favor, preencha todos os campos.');
            }
        }
        
        // Logout function
        function logout() {
            hideSideMenu();
            appContainer.classList.add('hidden');
            loginScreen.classList.remove('hidden');
            returnHome();
        }
        
        // Show side menu
        document.getElementById('menu-btn').addEventListener('click', () => {
            sideMenu.classList.remove('hidden');
        });
        
        // Hide side menu
        function hideSideMenu() {
            sideMenu.classList.add('hidden');
        }
        
        // Click outside to close menu
        sideMenu.addEventListener('click', (e) => {
            if (e.target === sideMenu) {
                hideSideMenu();
            }
        });
        
        // Select destination from quick buttons
        function selectDestination(destination) {
            currentDestination = destination;
            destinationInput.value = destination;
        }
        
        // Request ride
        function requestRide() {
            const destination = destinationInput.value.trim();
            
            if (!destination) {
                alert('Por favor, informe o destino.');
                return;
            }
            
            currentDestination = destination;
            homeScreen.classList.add('hidden');
            rideRequestedScreen.classList.remove('hidden');
            
            // Simulate driver assignment after 3 seconds
            setTimeout(() => {
                rideRequestedScreen.classList.add('hidden');
                driverAssignedScreen.classList.remove('hidden');
                destinationDisplay.textContent = currentDestination;
                
                // Simulate ride start after 5 seconds
                setTimeout(() => {
                    driverAssignedScreen.classList.add('hidden');
                    rideInProgressScreen.classList.remove('hidden');
                    currentDestination.textContent = currentDestination;
                }, 5000);
            }, 3000);
        }
        
        // Cancel ride
        function cancelRide() {
            if (confirm('Tem certeza que deseja cancelar esta corrida?')) {
                rideRequestedScreen.classList.add('hidden');
                driverAssignedScreen.classList.add('hidden');
                rideInProgressScreen.classList.add('hidden');
                homeScreen.classList.remove('hidden');
            }
        }
        
        // Complete ride
        function completeRide() {
            rideInProgressScreen.classList.add('hidden');
            rideCompletedScreen.classList.remove('hidden');
            completedDestination.textContent = currentDestination;
        }
        
        // Return to home screen
        function returnHome() {
            rideCompletedScreen.classList.add('hidden');
            homeScreen.classList.remove('hidden');
            currentDestination = '';
            destinationInput.value = '';
        }
        
        // Star rating hover effect
        function hoverStar(num) {
            const stars = document.querySelectorAll('.fa-star');
            stars.forEach((star, index) => {
                if (index < num) {
                    star.classList.add('text-yellow-400');
                    star.classList.remove('text-gray-300');
                } else {
                    star.classList.add('text-gray-300');
                    star.classList.remove('text-yellow-400');
                }
            });
        }
        
        // Rate with stars
        function rateStar(num) {
            currentRating = num;
            const stars = document.querySelectorAll('.fa-star');
            stars.forEach((star, index) => {
                if (index < num) {
                    star.classList.add('text-yellow-400');
                    star.classList.remove('text-gray-300');
                } else {
                    star.classList.add('text-gray-300');
                    star.classList.remove('text-yellow-400');
                }
            });
        }
    </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=edulisboa/acitymob" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>