moisesarnaldo commited on
Commit
ddddf6d
·
verified ·
1 Parent(s): 33965e0

tirar a opcao de adicionar outro autor e colocar um campo para comparsas

Browse files
Files changed (2) hide show
  1. README.md +8 -4
  2. index.html +804 -19
README.md CHANGED
@@ -1,10 +1,14 @@
1
  ---
2
- title: Undefined
3
- emoji: 🚀
4
- colorFrom: pink
5
  colorTo: purple
 
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
1
  ---
2
+ title: undefined
3
+ colorFrom: purple
 
4
  colorTo: purple
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://deepsite.hf.co).
14
+
index.html CHANGED
@@ -1,19 +1,804 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="pt-BR">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Web Denúncia</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script>
11
+ tailwind.config = {
12
+ theme: {
13
+ extend: {
14
+ colors: {
15
+ primary: '#4F46E5',
16
+ secondary: '#10B981',
17
+ dark: '#1E1E2C',
18
+ glass: 'rgba(255, 255, 255, 0.15)'
19
+ },
20
+ backdropBlur: {
21
+ xs: '2px',
22
+ },
23
+ }
24
+ }
25
+ }
26
+ </script>
27
+ <style>
28
+ body {
29
+ background: #000;
30
+ min-height: 100vh;
31
+ color: #000;
32
+ }
33
+ .glass-card {
34
+ background: rgba(0, 0, 0, 0.3);
35
+ backdrop-filter: blur(10px);
36
+ -webkit-backdrop-filter: blur(10px);
37
+ border: 1px solid rgba(255, 255, 255, 0.2);
38
+ }
39
+ .input-glass {
40
+ background: rgba(255, 255, 255, 0.15);
41
+ backdrop-filter: blur(5px);
42
+ -webkit-backdrop-filter: blur(5px);
43
+ border: 1px solid rgba(255, 255, 255, 0.2);
44
+ color: #fff;
45
+ }
46
+ .input-glass:focus {
47
+ background: rgba(255, 255, 255, 0.25);
48
+ border-color: rgba(255, 255, 255, 0.4);
49
+ }
50
+ .crime-tag {
51
+ transition: all 0.3s ease;
52
+ }
53
+ .crime-tag:hover {
54
+ transform: translateY(-2px);
55
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
56
+ }
57
+ .add-btn {
58
+ transition: all 0.3s ease;
59
+ }
60
+ .add-btn:hover {
61
+ transform: scale(1.05);
62
+ }
63
+ </style>
64
+ </head>
65
+ <body class="text-gray-100 font-sans">
66
+ <div class="container mx-auto px-4 py-12 max-w-4xl">
67
+ <div class="glass-card rounded-xl shadow-2xl overflow-hidden">
68
+ <!-- Header -->
69
+ <div class="bg-white bg-opacity-10 px-6 py-4">
70
+ <div class="flex items-center justify-between">
71
+ <div class="flex items-center space-x-3">
72
+ <i data-feather="alert-circle" class="w-8 h-8"></i>
73
+ <h1 class="text-2xl font-bold">Denúncia Anônima</h1>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ <p class="mt-2 text-sm opacity-80">Sua identidade será preservada</p>
78
+ <!-- Emergency Warning -->
79
+ <div class="mt-3 bg-yellow-500 bg-opacity-20 text-yellow-200 px-4 py-2 rounded-lg flex items-center space-x-2">
80
+ <i data-feather="alert-triangle" class="w-5 h-5"></i>
81
+ <span class="text-sm font-semibold">Se estiver correndo risco de vida ligue 190</span>
82
+ </div>
83
+ </div>
84
+ <!-- Form -->
85
+ <form class="p-6 space-y-6">
86
+ <!-- Section 1: Crime Type -->
87
+ <div class="space-y-4">
88
+ <h2 class="text-xl font-semibold border-b border-yellow-400 border-opacity-60 pb-2 text-yellow-400">
89
+ <i data-feather="alert-triangle" class="inline mr-2 w-5 h-5"></i>
90
+ Tipo de Crime *
91
+ </h2>
92
+ <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3">
93
+ <label class="crime-tag cursor-pointer">
94
+ <input type="radio" name="crimeType" value="Tráfico de Drogas" class="hidden peer" required>
95
+ <div class="bg-dark peer-checked:bg-yellow-400 peer-checked:text-black rounded-lg p-4 text-center border border-white border-opacity-20 flex flex-col items-center justify-center min-h-[100px] sm:min-h-[120px]">
96
+ <i data-feather="package" class="w-8 h-8 mb-2"></i>
97
+ <span class="text-sm sm:text-base font-medium">Tráfico de Drogas</span>
98
+ </div>
99
+ </label>
100
+ <label class="crime-tag cursor-pointer">
101
+ <input type="radio" name="crimeType" value="Porte Ilegal de Armas" class="hidden peer">
102
+ <div class="bg-dark peer-checked:bg-yellow-400 peer-checked:text-black rounded-lg p-4 text-center border border-white border-opacity-20 flex flex-col items-center justify-center min-h-[100px] sm:min-h-[120px]">
103
+ <i data-feather="zap" class="w-8 h-8 mb-2"></i>
104
+ <span class="text-sm sm:text-base font-medium">Porte Ilegal de Armas</span>
105
+ </div>
106
+ </label>
107
+ <label class="crime-tag cursor-pointer">
108
+ <input type="radio" name="crimeType" value="Autor de Homicídio" class="hidden peer">
109
+ <div class="bg-dark peer-checked:bg-yellow-400 peer-checked:text-black rounded-lg p-4 text-center border border-white border-opacity-20 flex flex-col items-center justify-center min-h-[100px] sm:min-h-[120px]">
110
+ <i data-feather="activity" class="w-8 h-8 mb-2"></i>
111
+ <span class="text-sm sm:text-base font-medium">Autor de Homicídio</span>
112
+ </div>
113
+ </label>
114
+ <label class="crime-tag cursor-pointer">
115
+ <input type="radio" name="crimeType" value="Roubo/Furto" class="hidden peer">
116
+ <div class="bg-dark peer-checked:bg-yellow-400 peer-checked:text-black rounded-lg p-4 text-center border border-white border-opacity-20 flex flex-col items-center justify-center min-h-[100px] sm:min-h-[120px]">
117
+ <i data-feather="shield" class="w-8 h-8 mb-2"></i>
118
+ <span class="text-sm sm:text-base font-medium">Roubo/Furto</span>
119
+ </div>
120
+ </label>
121
+ <label class="crime-tag cursor-pointer">
122
+ <input type="radio" name="crimeType" value="Procurado pela Justiça" class="hidden peer">
123
+ <div class="bg-dark peer-checked:bg-yellow-400 peer-checked:text-black rounded-lg p-4 text-center border border-white border-opacity-20 flex flex-col items-center justify-center min-h-[100px] sm:min-h-[120px]">
124
+ <i data-feather="eye" class="w-8 h-8 mb-2"></i>
125
+ <span class="text-sm sm:text-base font-medium">Procurado pela Justiça</span>
126
+ </div>
127
+ </label>
128
+ </div>
129
+ </div>
130
+
131
+ <!-- Dynamic Fields for Drug Trafficking -->
132
+ <div id="drugFields" class="space-y-4 hidden">
133
+ <h3 class="text-lg font-medium border-b border-white border-opacity-20 pb-1">Detalhes sobre Tráfico</h3>
134
+
135
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
136
+ <div>
137
+ <label class="block text-sm font-medium mb-1">Horário que ocorre</label>
138
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: 20h-23h">
139
+ </div>
140
+ <div>
141
+ <label class="block text-sm font-medium mb-1">Possui armas de fogo?</label>
142
+ <select class="w-full bg-gray-500 text-white rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
143
+ <option value="">Selecione...</option>
144
+ <option value="yes">Sim</option>
145
+ <option value="no">Não</option>
146
+ <option value="unknown">Não sei</option>
147
+ </select>
148
+ </div>
149
+ </div>
150
+ <div>
151
+ <label class="block text-sm font-medium mb-1">Tipo de Droga</label>
152
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: Cocaína, Maconha, etc">
153
+ </div>
154
+ <div>
155
+ <label class="block text-sm font-medium mb-1">Tipo de Arma</label>
156
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: Pistola, Fuzil, etc">
157
+ </div>
158
+ <div>
159
+ <label class="block text-sm font-medium mb-1">Local que Esconde a Arma</label>
160
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: Sob o sofá, dentro do carro, etc">
161
+ </div>
162
+ <div>
163
+ <label class="block text-sm font-medium mb-1">Local do Esconderijo das Drogas</label>
164
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Descreva o local">
165
+ </div>
166
+ <div>
167
+ <label class="block text-sm font-medium mb-1">Endereço que está ocorrendo o tráfico</label>
168
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Descreva o local">
169
+ </div>
170
+ </div>
171
+
172
+ <!-- Dynamic Fields for Weapons -->
173
+ <div id="weaponsFields" class="space-y-4 hidden">
174
+ <h3 class="text-lg font-medium border-b border-white border-opacity-20 pb-1">Detalhes sobre Porte Ilegal de Armas</h3>
175
+ <div>
176
+ <label class="block text-sm font-medium mb-1">Tipo de Arma</label>
177
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: Pistola, Fuzil, etc">
178
+ </div>
179
+ <div>
180
+ <label class="block text-sm font-medium mb-1">Local onde esconde a arma</label>
181
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Descreva o local">
182
+ </div>
183
+ </div>
184
+
185
+ <!-- Dynamic Fields for Homicide -->
186
+ <div id="homicideFields" class="space-y-4 hidden">
187
+ <h3 class="text-lg font-medium border-b border-white border-opacity-20 pb-1">Detalhes sobre Homicídio</h3>
188
+ <div>
189
+ <label class="block text-sm font-medium mb-1">Nome da Vítima</label>
190
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Nome completo">
191
+ </div>
192
+ <div>
193
+ <label class="block text-sm font-medium mb-1">Data do Fato</label>
194
+ <input type="date" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
195
+ </div>
196
+ </div>
197
+
198
+ <!-- Dynamic Fields for Theft -->
199
+ <div id="theftFields" class="space-y-4 hidden">
200
+ <h3 class="text-lg font-medium border-b border-white border-opacity-20 pb-1">Detalhes sobre Roubo/Furto</h3>
201
+ <div>
202
+ <label class="block text-sm font-medium mb-1">Local do Crime</label>
203
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Endereço ou descrição do local">
204
+ </div>
205
+ <div>
206
+ <label class="block text-sm font-medium mb-1">Data do Crime</label>
207
+ <input type="date" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
208
+ </div>
209
+ </div>
210
+ <!-- Section 2: Author Info -->
211
+ <div id="authorSection" class="space-y-4">
212
+ <h2 class="text-xl font-semibold border-b border-white border-opacity-20 pb-2">
213
+ <i data-feather="user" class="inline mr-2 w-5 h-5"></i>
214
+ Informações do Autor Principal
215
+ </h2>
216
+ <div class="space-y-4 border border-white border-opacity-20 rounded-lg p-4">
217
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
218
+ <div>
219
+ <label class="block text-sm font-medium mb-1">Nome do Indivíduo (se souber)</label>
220
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
221
+ </div>
222
+ <div>
223
+ <label class="block text-sm font-medium mb-1">Vulgo/Apelido (se souber)</label>
224
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
225
+ </div>
226
+ </div>
227
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
228
+ <div>
229
+ <label class="block text-sm font-medium mb-1">Rede Social (se souber)</label>
230
+ <input type="url" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="https://instagram.com/...">
231
+ </div>
232
+ <div>
233
+ <label class="block text-sm font-medium mb-1">Documento (se souber)</label>
234
+ <input type="text" class="flex-1 input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="RG, CPF, CNH...">
235
+ </div>
236
+ </div>
237
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
238
+ <div>
239
+ <label class="block text-sm font-medium mb-1">Rua *</label>
240
+ <input type="text" required class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
241
+ </div>
242
+ <div>
243
+ <label class="block text-sm font-medium mb-1">Número *</label>
244
+ <input type="text" required class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
245
+ </div>
246
+ <div>
247
+ <label class="block text-sm font-medium mb-1">Bairro *</label>
248
+ <input type="text" required class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
249
+ </div>
250
+ <div>
251
+ <label class="block text-sm font-medium mb-1">Cidade *</label>
252
+ <input type="text" required class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
253
+ </div>
254
+ </div>
255
+ <div>
256
+ <label class="block text-sm font-medium mb-1">Características do Local (se souber)</label>
257
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: Casa com muro alto, câmeras, etc.">
258
+ </div>
259
+ <div>
260
+ <label class="block text-sm font-medium mb-1">Características do Autor (se souber)</label>
261
+ <textarea rows="3" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Tatuagens, sinais, altura, cor dos olhos, etc."></textarea>
262
+ </div>
263
+ <div>
264
+ <label class="block text-sm font-medium mb-1">Veículo (se souber)</label>
265
+ <div class="vehicleContainer">
266
+ <div class="flex space-x-2">
267
+ <input type="text" class="flex-1 input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Modelo, Cor, Placa">
268
+ <button type="button" onclick="addVehicleField(this)" class="add-btn bg-yellow-400 bg-opacity-80 hover:bg-opacity-100 text-black px-3 rounded-lg flex items-center">
269
+ <i data-feather="plus" class="w-5 h-5"></i>
270
+ </button>
271
+ </div>
272
+ </div>
273
+ </div>
274
+ </div>
275
+ </div>
276
+
277
+ <!-- Section 3: Accomplices Info -->
278
+ <div id="accomplicesSection" class="space-y-4">
279
+ <h2 class="text-xl font-semibold border-b border-white border-opacity-20 pb-2">
280
+ <i data-feather="users" class="inline mr-2 w-5 h-5"></i>
281
+ Comparsas (se houver)
282
+ </h2>
283
+ <div>
284
+ <label class="block text-sm font-medium mb-1">Número de comparsas (se souber)</label>
285
+ <input type="number" min="0" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Quantidade">
286
+ </div>
287
+ <div>
288
+ <label class="block text-sm font-medium mb-1">Apelidos ou características (se souber)</label>
289
+ <textarea rows="3" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Descreva os comparsas, se souber nomes, apelidos ou características físicas"></textarea>
290
+ </div>
291
+ </div>
292
+ <!-- Dynamic Fields for Drug Trafficking -->
293
+ <div id="drugFields" class="space-y-4 hidden">
294
+ <h3 class="text-lg font-medium border-b border-white border-opacity-20 pb-1">Detalhes sobre Tráfico</h3>
295
+
296
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
297
+ <div>
298
+ <label class="block text-sm font-medium mb-1">Horário que ocorre</label>
299
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: 20h-23h">
300
+ </div>
301
+ <div>
302
+ <label class="block text-sm font-medium mb-1">Possui armas de fogo?</label>
303
+ <select class="w-full bg-black text-white rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
304
+ <option value="">Selecione...</option>
305
+ <option value="yes">Sim</option>
306
+ <option value="no">Não</option>
307
+ <option value="unknown">Não sei</option>
308
+ </select>
309
+ </div>
310
+ </div>
311
+ <div>
312
+ <label class="block text-sm font-medium mb-1">Tipo de Droga</label>
313
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: Cocaína, Maconha, etc">
314
+ </div>
315
+ <div>
316
+ <label class="block text-sm font-medium mb-1">Tipo de Arma</label>
317
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: Pistola, Fuzil, etc">
318
+ </div>
319
+ <div>
320
+ <label class="block text-sm font-medium mb-1">Local que Esconde a Arma</label>
321
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: Sob o sofá, dentro do carro, etc">
322
+ </div>
323
+ <div>
324
+ <label class="block text-sm font-medium mb-1">Local do Esconderijo das Drogas</label>
325
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Descreva o local">
326
+ </div>
327
+ </div>
328
+
329
+ <!-- Dynamic Fields for Weapons -->
330
+ <div id="weaponsFields" class="space-y-4 hidden">
331
+ <h3 class="text-lg font-medium border-b border-white border-opacity-20 pb-1">Detalhes sobre Porte Ilegal de Armas</h3>
332
+ <div>
333
+ <label class="block text-sm font-medium mb-1">Tipo de Arma</label>
334
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: Pistola, Fuzil, etc">
335
+ </div>
336
+ <div>
337
+ <label class="block text-sm font-medium mb-1">Local onde esconde a arma</label>
338
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Descreva o local">
339
+ </div>
340
+ </div>
341
+
342
+ <!-- Dynamic Fields for Homicide -->
343
+ <div id="homicideFields" class="space-y-4 hidden">
344
+ <h3 class="text-lg font-medium border-b border-white border-opacity-20 pb-1">Detalhes sobre Homicídio</h3>
345
+ <div>
346
+ <label class="block text-sm font-medium mb-1">Nome da Vítima</label>
347
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Nome completo">
348
+ </div>
349
+ <div>
350
+ <label class="block text-sm font-medium mb-1">Data do Fato</label>
351
+ <input type="date" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
352
+ </div>
353
+ </div>
354
+
355
+ <!-- Dynamic Fields for Theft -->
356
+ <div id="theftFields" class="space-y-4 hidden">
357
+ <h3 class="text-lg font-medium border-b border-white border-opacity-20 pb-1">Detalhes sobre Roubo/Furto</h3>
358
+ <div>
359
+ <label class="block text-sm font-medium mb-1">Local do Crime</label>
360
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Endereço ou descrição do local">
361
+ </div>
362
+ <div>
363
+ <label class="block text-sm font-medium mb-1">Data do Crime</label>
364
+ <input type="date" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
365
+ </div>
366
+ </div>
367
+ <!-- Section 4: Photos -->
368
+ <div class="space-y-4">
369
+ <h2 class="text-xl font-semibold border-b border-white border-opacity-20 pb-2">
370
+ <i data-feather="image" class="inline mr-2 w-5 h-5"></i>
371
+ Fotos
372
+ </h2>
373
+
374
+ <div id="photosContainer">
375
+ <div class="flex space-x-2">
376
+ <input type="file" accept="image/*,video/*" class="flex-1 input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-yellow-400 file:text-black hover:file:bg-opacity-80">
377
+ <button type="button" onclick="addPhotoField()" class="add-btn bg-yellow-400 bg-opacity-80 hover:bg-opacity-100 text-black px-3 rounded-lg flex items-center">
378
+ <i data-feather="plus" class="w-5 h-5"></i>
379
+ </button>
380
+ </div>
381
+ </div>
382
+ <p class="text-xs opacity-60">Máx. 5 arquivos (10MB cada)</p>
383
+ </div>
384
+ <!-- Section 5: Description -->
385
+ <div class="space-y-4">
386
+ <h2 class="text-xl font-semibold border-b border-white border-opacity-20 pb-2">
387
+ <i data-feather="edit" class="inline mr-2 w-5 h-5"></i>
388
+ Descrição da Denúncia *
389
+ </h2>
390
+
391
+ <textarea required rows="5" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Descreva com detalhes os fatos, comportamentos suspeitos, frequência, etc."></textarea>
392
+ </div>
393
+
394
+ <!-- Section 6: Contact -->
395
+ <div class="space-y-4">
396
+ <h2 class="text-xl font-semibold border-b border-white border-opacity-20 pb-2">
397
+ <i data-feather="phone" class="inline mr-2 w-5 h-5"></i>
398
+ Contato (Opcional)
399
+ </h2>
400
+
401
+ <div>
402
+ <label class="block text-sm font-medium mb-1">Telefone para contato posterior</label>
403
+ <input type="tel" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="(DDD) 99999-9999">
404
+ <p class="text-xs opacity-60 mt-1">Este campo é opcional. Seu número será mantido em sigilo absoluto.</p>
405
+ </div>
406
+ </div>
407
+ <!-- Submit -->
408
+ <div class="pt-4">
409
+ <button id="submitBtn" type="submit" class="w-full bg-yellow-400 bg-opacity-60 hover:bg-opacity-80 text-black font-medium py-3 px-4 rounded-lg transition duration-300 flex items-center justify-center space-x-2">
410
+ <i data-feather="send" class="w-5 h-5"></i>
411
+ <span>Enviar Denúncia</span>
412
+ </button>
413
+ <div id="loadingBar" class="hidden mt-4">
414
+ <div class="bg-yellow-400 bg-opacity-20 rounded-full h-2">
415
+ <div class="bg-yellow-400 h-2 rounded-full animate-pulse" style="width: 0%" id="progressBar"></div>
416
+ </div>
417
+ <p class="text-center text-yellow-400 mt-2 text-sm">Enviando denúncia...</p>
418
+ </div>
419
+ <div id="successMessage" class="hidden mt-4 text-center">
420
+ <div class="bg-green-500 bg-opacity-20 border border-green-400 rounded-lg p-4">
421
+ <i data-feather="check-circle" class="w-8 h-8 text-green-400 mx-auto"></i>
422
+ <p class="text-green-400 text-lg font-semibold mt-2">Denúncia enviada com sucesso!</p>
423
+ </div>
424
+ </div>
425
+ <p class="text-xs text-center mt-2 opacity-70">Todas as informações serão tratadas com sigilo</p>
426
+ <p class="text-xs text-center mt-2 text-yellow-200 font-semibold">
427
+ Esta página não substitui os canais oficiais:
428
+ <a href="https://www.webdenuncia.sp.gov.br/cidadao/denuncie" target="_blank" class="underline">Web Denúncia</a> ou 181
429
+ </p>
430
+ </div>
431
+ </form>
432
+ </div>
433
+ </div>
434
+
435
+ <script>
436
+ // Initialize feather icons
437
+ feather.replace();
438
+ // Show/hide dynamic fields based on crime type
439
+ document.querySelectorAll('input[name="crimeType"]').forEach(radio => {
440
+ radio.addEventListener('change', function() {
441
+ // Hide all dynamic sections
442
+ document.getElementById('drugFields').classList.add('hidden');
443
+ document.getElementById('weaponsFields').classList.add('hidden');
444
+ document.getElementById('homicideFields').classList.add('hidden');
445
+ document.getElementById('theftFields').classList.add('hidden');
446
+ // Show relevant section
447
+ if (this.value === 'Tráfico de Drogas') {
448
+ document.getElementById('drugFields').classList.remove('hidden');
449
+ } else if (this.value === 'Porte Ilegal de Armas') {
450
+ document.getElementById('weaponsFields').classList.remove('hidden');
451
+ } else if (this.value === 'Autor de Homicídio') {
452
+ document.getElementById('homicideFields').classList.remove('hidden');
453
+ } else if (this.value === 'Roubo/Furto') {
454
+ document.getElementById('theftFields').classList.remove('hidden');
455
+ }
456
+ // Author section always visible
457
+ document.getElementById('authorSection').classList.remove('hidden');
458
+ });
459
+ });
460
+ // Add vehicle field (generic)
461
+ function addVehicleField(button) {
462
+ const container = button.parentElement.parentElement;
463
+ const div = document.createElement('div');
464
+ div.className = 'flex space-x-2 mt-2';
465
+ div.innerHTML = `
466
+ <input type="text" class="flex-1 input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Modelo, Cor, Placa">
467
+ <button type="button" onclick="this.parentElement.remove()" class="bg-yellow-400 bg-opacity-80 hover:bg-opacity-100 text-black px-3 rounded-lg flex items-center">
468
+ <i data-feather="x" class="w-5 h-5"></i>
469
+ </button>
470
+ `;
471
+ container.appendChild(div);
472
+ feather.replace();
473
+ }
474
+
475
+ // Add photo field
476
+ function addPhotoField() {
477
+ const container = document.getElementById('photosContainer');
478
+ const div = document.createElement('div');
479
+ div.className = 'flex space-x-2 mt-2';
480
+ div.innerHTML = `
481
+ <input type="file" accept="image/*,video/*" class="flex-1 input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-yellow-400 file:text-black hover:file:bg-opacity-80">
482
+ <button type="button" onclick="this.parentElement.remove()" class="bg-yellow-400 bg-opacity-80 hover:bg-opacity-100 text-black px-3 rounded-lg flex items-center">
483
+ <i data-feather="x" class="w-5 h-5"></i>
484
+ </button>
485
+ `;
486
+ // Limit to 5 files
487
+ if (container.querySelectorAll('input[type="file"]').length < 5) {
488
+ container.appendChild(div);
489
+ feather.replace();
490
+ } else {
491
+ alert('Máximo de 5 arquivos atingido');
492
+ }
493
+ }
494
+ </script>
495
+ <script>
496
+ // Initialize feather icons
497
+ feather.replace();
498
+ // Generate protocol number
499
+ function generateProtocolNumber() {
500
+ const now = new Date();
501
+ const day = String(now.getDate()).padStart(2, '0');
502
+ const month = String(now.getMonth() + 1).padStart(2, '0');
503
+ const year = String(now.getFullYear());
504
+ // Simple sequential number simulation (could be replaced with server-side logic)
505
+ const seq = String(Math.floor(Math.random() * 999) + 1).padStart(3, '0');
506
+ return `DD${seq}${day}${month}${year}`;
507
+ }
508
+ // Collect all form data
509
+ async function collectFormData() {
510
+ const formData = new FormData();
511
+ // Basic info
512
+ const now = new Date();
513
+ const protocol = generateProtocolNumber();
514
+ formData.append('numero_protocolo', protocol);
515
+ formData.append('tipo_crime', document.querySelector('input[name="crimeType"]:checked')?.value || '');
516
+ formData.append('datahora_elaboracao', now.toISOString());
517
+ // Dynamic fields based on crime type
518
+ const crimeType = document.querySelector('input[name="crimeType"]:checked')?.value;
519
+ switch(crimeType) {
520
+ case 'Tráfico de Drogas':
521
+ const drugInputs = document.querySelectorAll('#drugFields input, #drugFields select');
522
+ drugInputs.forEach(input => {
523
+ if (input.value) {
524
+ formData.append(`drogas_${input.parentElement.querySelector('label')?.textContent?.trim()}`, input.value);
525
+ }
526
+ });
527
+ break;
528
+ case 'Porte Ilegal de Armas':
529
+ const weaponsInputs = document.querySelectorAll('#weaponsFields input');
530
+ weaponsInputs.forEach(input => {
531
+ if (input.value) {
532
+ formData.append(`armas_${input.parentElement.querySelector('label')?.textContent?.trim()}`, input.value);
533
+ }
534
+ });
535
+ break;
536
+ case 'Autor de Homicídio':
537
+ const homicideInputs = document.querySelectorAll('#homicideFields input');
538
+ homicideInputs.forEach(input => {
539
+ if (input.value) {
540
+ formData.append(`homicidio_${input.parentElement.querySelector('label')?.textContent?.trim()}`, input.value);
541
+ }
542
+ });
543
+ break;
544
+ case 'Roubo/Furto':
545
+ const theftInputs = document.querySelectorAll('#theftFields input');
546
+ theftInputs.forEach(input => {
547
+ if (input.value) {
548
+ formData.append(`roubo_${input.parentElement.querySelector('label')?.textContent?.trim()}`, input.value);
549
+ }
550
+ });
551
+ break;
552
+ }
553
+ // Authors info with (se souber) label
554
+ const authorsBlocks = document.querySelectorAll('.author-block');
555
+ authorsBlocks.forEach((block, index) => {
556
+ const inputs = block.querySelectorAll('input, textarea');
557
+ inputs.forEach(input => {
558
+ const label = input.parentElement.querySelector('label')?.textContent?.trim() || '';
559
+ const isRequired = !label.includes('(se souber)') && !label.includes('(Opcional)');
560
+
561
+ let fieldLabel = label;
562
+ if (!isRequired && !label.includes('se souber')) {
563
+ const cleanLabel = label.replace('*', '').trim();
564
+ fieldLabel = `${cleanLabel} (se souber)`;
565
+ }
566
+
567
+ if (input.value || !isRequired) {
568
+ formData.append(`autor_${index + 1}_${fieldLabel}`, input.value || '');
569
+ }
570
+ });
571
+ });
572
+ // Photos and videos as base64
573
+ const files = document.querySelectorAll('input[type="file"]');
574
+ let fileCount = 0;
575
+ for (const fileInput of files) {
576
+ if (fileInput.files.length > 0) {
577
+ const file = fileInput.files[0];
578
+ const base64 = await fileToBase64(file);
579
+ formData.append(`arquivo_${fileCount}`, base64);
580
+ formData.append(`arquivo_${fileCount}_nome`, file.name);
581
+ formData.append(`arquivo_${fileCount}_tipo`, file.type);
582
+ fileCount++;
583
+ }
584
+ }
585
+ // Description
586
+ const description = document.querySelector('textarea[placeholder*="Descreva com detalhes"]');
587
+ if (description?.value) {
588
+ formData.append('descricao', description.value);
589
+ }
590
+
591
+ // Contact
592
+ const contact = document.querySelector('input[type="tel"]');
593
+ if (contact?.value) {
594
+ formData.append('telefone_contato', contact.value);
595
+ }
596
+
597
+ return formData;
598
+ }
599
+
600
+ // Form submission
601
+ document.querySelector('form').addEventListener('submit', async (e) => {
602
+ e.preventDefault();
603
+
604
+ const submitBtn = document.getElementById('submitBtn');
605
+ const loadingBar = document.getElementById('loadingBar');
606
+ const successMessage = document.getElementById('successMessage');
607
+ const protocolNumber = document.getElementById('protocolNumber');
608
+ const progressBar = document.getElementById('progressBar');
609
+
610
+ // Disable submit button
611
+ submitBtn.disabled = true;
612
+ submitBtn.classList.add('opacity-50', 'cursor-not-allowed');
613
+ loadingBar.classList.remove('hidden');
614
+
615
+ // Animate progress bar
616
+ let progress = 0;
617
+ const interval = setInterval(() => {
618
+ progress += Math.random() * 10;
619
+ if (progress > 90) progress = 90;
620
+ progressBar.style.width = `${progress}%`;
621
+ }, 100);
622
+ try {
623
+ const formData = await collectFormData();
624
+
625
+ const response = await fetch('https://n8n.mohena.xyz/webhook/dadoswebDD', {
626
+ method: 'POST',
627
+ body: formData
628
+ });
629
+ if (response.ok) {
630
+ clearInterval(interval);
631
+ progressBar.style.width = '100%';
632
+
633
+ setTimeout(() => {
634
+ loadingBar.classList.add('hidden');
635
+ successMessage.classList.remove('hidden');
636
+
637
+ // Reset form
638
+ document.querySelector('form').reset();
639
+ document.getElementById('authorsSection').classList.add('hidden');
640
+ document.getElementById('drugFields').classList.add('hidden');
641
+ document.getElementById('weaponsFields').classList.add('hidden');
642
+ document.getElementById('homicideFields').classList.add('hidden');
643
+ document.getElementById('theftFields').classList.add('hidden');
644
+
645
+ // Clean extra fields
646
+ document.querySelectorAll('.author-block:not(:first-child)').forEach(block => block.remove());
647
+
648
+ }, 500);
649
+ } else {
650
+ throw new Error('Erro ao enviar denúncia');
651
+ }
652
+
653
+ } catch (error) {
654
+ alert('Erro ao enviar denúncia. Por favor, tente novamente.');
655
+ console.error('Error:', error);
656
+ submitBtn.disabled = false;
657
+ submitBtn.classList.remove('opacity-50', 'cursor-not-allowed');
658
+ loadingBar.classList.add('hidden');
659
+ clearInterval(interval);
660
+ }
661
+ });
662
+ // Show/hide dynamic fields based on crime type
663
+ document.querySelectorAll('input[name="crimeType"]').forEach(radio => {
664
+ radio.addEventListener('change', function() {
665
+ // Hide all dynamic sections
666
+ document.getElementById('drugFields').classList.add('hidden');
667
+ document.getElementById('weaponsFields').classList.add('hidden');
668
+ document.getElementById('homicideFields').classList.add('hidden');
669
+ document.getElementById('theftFields').classList.add('hidden');
670
+ // Show relevant section
671
+ if (this.value === 'Tráfico de Drogas') {
672
+ document.getElementById('drugFields').classList.remove('hidden');
673
+ } else if (this.value === 'Porte Ilegal de Armas') {
674
+ document.getElementById('weaponsFields').classList.remove('hidden');
675
+ } else if (this.value === 'Autor de Homicídio') {
676
+ document.getElementById('homicideFields').classList.remove('hidden');
677
+ } else if (this.value === 'Roubo/Furto') {
678
+ document.getElementById('theftFields').classList.remove('hidden');
679
+ }
680
+ // Authors section always visible
681
+ document.getElementById('authorsSection').classList.remove('hidden');
682
+ });
683
+ });
684
+ // Add author field
685
+ function addAuthorField() {
686
+ const container = document.getElementById('authorsContainer');
687
+ const authorCount = container.querySelectorAll('.author-block').length + 1;
688
+ const div = document.createElement('div');
689
+ div.className = 'author-block space-y-4 border border-white border-opacity-20 rounded-lg p-4 mt-4';
690
+ div.innerHTML = `
691
+ <div class="flex justify-between items-center">
692
+ <h3 class="text-lg font-medium">Autor ${authorCount}</h3>
693
+ <button type="button" onclick="this.parentElement.parentElement.remove()" class="bg-yellow-400 bg-opacity-80 hover:bg-opacity-100 text-black px-3 py-1 rounded-lg flex items-center text-sm">
694
+ <i data-feather="x" class="w-4 h-4 mr-1"></i> Remover
695
+ </button>
696
+ </div>
697
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
698
+ <div>
699
+ <label class="block text-sm font-medium mb-1">Nome do Indivíduo (se souber)</label>
700
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
701
+ </div>
702
+ <div>
703
+ <label class="block text-sm font-medium mb-1">Vulgo/Apelido (se souber)</label>
704
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
705
+ </div>
706
+ </div>
707
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
708
+ <div>
709
+ <label class="block text-sm font-medium mb-1">Rede Social (se souber)</label>
710
+ <input type="url" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="https://instagram.com/...">
711
+ </div>
712
+ <div>
713
+ <label class="block text-sm font-medium mb-1">Documento (se souber)</label>
714
+ <input type="text" class="flex-1 input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="RG, CPF, CNH...">
715
+ </div>
716
+ </div>
717
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
718
+ <div>
719
+ <label class="block text-sm font-medium mb-1">Rua *</label>
720
+ <input type="text" required class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
721
+ </div>
722
+ <div>
723
+ <label class="block text-sm font-medium mb-1">Número *</label>
724
+ <input type="text" required class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
725
+ </div>
726
+ <div>
727
+ <label class="block text-sm font-medium mb-1">Bairro *</label>
728
+ <input type="text" required class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
729
+ </div>
730
+ <div>
731
+ <label class="block text-sm font-medium mb-1">Cidade *</label>
732
+ <input type="text" required class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
733
+ </div>
734
+ </div>
735
+ <div>
736
+ <label class="block text-sm font-medium mb-1">Características do Local (se souber)</label>
737
+ <input type="text" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Ex: Casa com muro alto, câmeras, etc.">
738
+ </div>
739
+ <div>
740
+ <label class="block text-sm font-medium mb-1">Características do Autor (se souber)</label>
741
+ <textarea rows="3" class="w-full input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Tatuagens, sinais, altura, cor dos olhos, etc."></textarea>
742
+ </div>
743
+ <div>
744
+ <label class="block text-sm font-medium mb-1">Veículo (se souber)</label>
745
+ <div class="vehicleContainer">
746
+ <div class="flex space-x-2">
747
+ <input type="text" class="flex-1 input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Modelo, Cor, Placa">
748
+ <button type="button" onclick="addVehicleField(this)" class="add-btn bg-secondary bg-opacity-80 hover:bg-opacity-100 text-white px-3 rounded-lg flex items-center">
749
+ <i data-feather="plus" class="w-5 h-5"></i>
750
+ </button>
751
+ </div>
752
+ </div>
753
+ </div>
754
+ `;
755
+ container.appendChild(div);
756
+ feather.replace();
757
+ }
758
+
759
+ // Add vehicle field (generic)
760
+ function addVehicleField(button) {
761
+ const container = button.parentElement.parentElement;
762
+ const div = document.createElement('div');
763
+ div.className = 'flex space-x-2 mt-2';
764
+ div.innerHTML = `
765
+ <input type="text" class="flex-1 input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary" placeholder="Modelo, Cor, Placa">
766
+ <button type="button" onclick="this.parentElement.remove()" class="bg-yellow-400 bg-opacity-80 hover:bg-opacity-100 text-black px-3 rounded-lg flex items-center">
767
+ <i data-feather="x" class="w-5 h-5"></i>
768
+ </button>
769
+ `;
770
+ container.appendChild(div);
771
+ feather.replace();
772
+ }
773
+
774
+ // Add photo field
775
+ function addPhotoField() {
776
+ const container = document.getElementById('photosContainer');
777
+ const div = document.createElement('div');
778
+ div.className = 'flex space-x-2 mt-2';
779
+ div.innerHTML = `
780
+ <input type="file" accept="image/*,video/*" class="flex-1 input-glass rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-yellow-400 file:text-black hover:file:bg-opacity-80">
781
+ <button type="button" onclick="this.parentElement.remove()" class="bg-yellow-400 bg-opacity-80 hover:bg-opacity-100 text-black px-3 rounded-lg flex items-center">
782
+ <i data-feather="x" class="w-5 h-5"></i>
783
+ </button>
784
+ `;
785
+ // Limit to 5 files
786
+ if (container.querySelectorAll('input[type="file"]').length < 5) {
787
+ container.appendChild(div);
788
+ feather.replace();
789
+ } else {
790
+ alert('Máximo de 5 arquivos atingido');
791
+ }
792
+ }
793
+ // Helper: convert file to base64
794
+ function fileToBase64(file) {
795
+ return new Promise((resolve, reject) => {
796
+ const reader = new FileReader();
797
+ reader.readAsDataURL(file);
798
+ reader.onload = () => resolve(reader.result);
799
+ reader.onerror = error => reject(error);
800
+ });
801
+ }
802
+ </script>
803
+ </body>
804
+ </html>