Spaces:
Running

File size: 21,295 Bytes
1f7dee1
 
 
 
 
379eab6
1f7dee1
 
 
379eab6
 
1f7dee1
 
379eab6
 
 
 
 
 
 
 
1f7dee1
379eab6
 
 
 
1f7dee1
379eab6
 
 
 
 
 
1f7dee1
379eab6
 
1f7dee1
 
 
379eab6
 
 
1f7dee1
379eab6
 
 
1f7dee1
 
379eab6
 
1f7dee1
 
 
 
379eab6
 
 
 
 
 
 
1f7dee1
379eab6
 
1f7dee1
 
379eab6
 
 
 
 
 
 
1f7dee1
379eab6
 
 
 
 
1f7dee1
379eab6
 
 
 
 
1f7dee1
379eab6
 
 
 
 
1f7dee1
379eab6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1f7dee1
379eab6
 
 
 
1f7dee1
 
 
 
379eab6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1f7dee1
 
379eab6
 
 
1f7dee1
379eab6
 
 
 
 
 
 
1f7dee1
379eab6
 
 
 
 
 
 
 
 
 
 
1f7dee1
379eab6
 
 
1f7dee1
 
379eab6
1f7dee1
379eab6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1f7dee1
379eab6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1f7dee1
 
379eab6
 
 
 
 
 
1f7dee1
379eab6
1f7dee1
 
 
379eab6
 
 
1f7dee1
379eab6
 
 
 
 
 
 
 
 
 
 
1f7dee1
379eab6
 
 
 
 
 
 
 
 
1f7dee1
379eab6
 
 
1f7dee1
379eab6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1f7dee1
 
379eab6
 
 
 
 
 
 
 
 
 
 
 
1f7dee1
379eab6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1f7dee1
379eab6
 
 
1f7dee1
379eab6
 
 
 
 
1f7dee1
379eab6
 
 
 
 
 
1f7dee1
 
 
 
 
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
<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AgroFácil - Dashboard para Pequenos Produtores</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>
        .dashboard-bg {
            background: linear-gradient(to bottom, #f7faf7, #e6f2e6);
        }
        .card-hover:hover {
            transform: translateY(-3px);
            transition: all 0.3s ease;
        }
        .simple-input {
            border: 1px solid #d1d5db;
            border-radius: 0.375rem;
            padding: 0.5rem 0.75rem;
            width: 100%;
        }
        .simple-input:focus {
            outline: none;
            border-color: #4ade80;
            box-shadow: 0 0 0 1px #4ade80;
        }
        .btn-primary {
            background-color: #4ade80;
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 0.375rem;
            font-weight: 500;
        }
        .btn-primary:hover {
            background-color: #22c55e;
        }
    </style>
</head>
<body class="dashboard-bg min-h-screen">
    <div class="container mx-auto px-4 py-6">
        <!-- Header Simples -->
        <header class="flex justify-between items-center mb-8">
            <div class="flex items-center space-x-3">
                <i class="fas fa-leaf text-3xl text-green-600"></i>
                <h1 class="text-2xl font-bold text-green-800">AgroFácil</h1>
            </div>
            <div class="flex items-center space-x-4">
                <div class="h-10 w-10 rounded-full bg-green-600 flex items-center justify-center text-white">
                    <i class="fas fa-user"></i>
                </div>
            </div>
        </header>

        <!-- Seção de Boas-vindas -->
        <div class="bg-white rounded-lg shadow p-6 mb-8 text-center">
            <h2 class="text-xl font-semibold text-gray-800 mb-2">Olá, Seu João!</h2>
            <p class="text-gray-600">Hoje é um bom dia para cuidar da sua produção!</p>
            <div class="mt-4 flex justify-center space-x-2">
                <div class="text-sm bg-green-100 text-green-800 px-3 py-1 rounded-full">
                    <i class="fas fa-sun mr-1"></i> Ensolarado
                </div>
                <div class="text-sm bg-blue-100 text-blue-800 px-3 py-1 rounded-full">
                    <i class="fas fa-temperature-high mr-1"></i> 28°C
                </div>
            </div>
        </div>

        <!-- Atalhos Rápidos -->
        <div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
            <button onclick="openModal('plantio')" class="bg-white rounded-lg shadow p-4 flex flex-col items-center card-hover">
                <div class="h-12 w-12 bg-green-100 rounded-full flex items-center justify-center text-green-600 mb-2">
                    <i class="fas fa-seedling text-xl"></i>
                </div>
                <span class="text-sm font-medium text-center">Registrar Plantio</span>
            </button>
            <button onclick="openModal('colheita')" class="bg-white rounded-lg shadow p-4 flex flex-col items-center card-hover">
                <div class="h-12 w-12 bg-yellow-100 rounded-full flex items-center justify-center text-yellow-600 mb-2">
                    <i class="fas fa-apple-alt text-xl"></i>
                </div>
                <span class="text-sm font-medium text-center">Registrar Colheita</span>
            </button>
            <button onclick="openModal('gasto')" class="bg-white rounded-lg shadow p-4 flex flex-col items-center card-hover">
                <div class="h-12 w-12 bg-red-100 rounded-full flex items-center justify-center text-red-600 mb-2">
                    <i class="fas fa-money-bill-wave text-xl"></i>
                </div>
                <span class="text-sm font-medium text-center">Anotar Gasto</span>
            </button>
            <button onclick="openModal('venda')" class="bg-white rounded-lg shadow p-4 flex flex-col items-center card-hover">
                <div class="h-12 w-12 bg-blue-100 rounded-full flex items-center justify-center text-blue-600 mb-2">
                    <i class="fas fa-shopping-cart text-xl"></i>
                </div>
                <span class="text-sm font-medium text-center">Registrar Venda</span>
            </button>
        </div>

        <!-- Resumo da Produção -->
        <div class="bg-white rounded-lg shadow p-6 mb-8">
            <h2 class="text-lg font-semibold text-gray-800 mb-4">Resumo da Produção</h2>
            <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                <div class="border rounded-lg p-4">
                    <h3 class="text-sm font-medium text-gray-500 mb-1">Plantado este mês</h3>
                    <p class="text-xl font-bold">2,5 ha</p>
                    <p class="text-xs text-gray-500 mt-1">Milho e Feijão</p>
                </div>
                <div class="border rounded-lg p-4">
                    <h3 class="text-sm font-medium text-gray-500 mb-1">Colhido este mês</h3>
                    <p class="text-xl font-bold">180 sacas</p>
                    <p class="text-xs text-gray-500 mt-1">Valor estimado: R$ 9.000</p>
                </div>
                <div class="border rounded-lg p-4">
                    <h3 class="text-sm font-medium text-gray-500 mb-1">Próxima colheita</h3>
                    <p class="text-xl font-bold">15 dias</p>
                    <p class="text-xs text-gray-500 mt-1">Talhão 3 - Feijão</p>
                </div>
            </div>
        </div>

        <!-- Tarefas Pendentes -->
        <div class="bg-white rounded-lg shadow p-6 mb-8">
            <div class="flex justify-between items-center mb-4">
                <h2 class="text-lg font-semibold text-gray-800">Tarefas Pendentes</h2>
                <button onclick="openModal('tarefa')" class="text-sm text-green-600 hover:text-green-800">
                    <i class="fas fa-plus mr-1"></i> Adicionar
                </button>
            </div>
            <div class="space-y-3">
                <div class="flex items-center justify-between p-3 border rounded-lg">
                    <div class="flex items-center space-x-3">
                        <input type="checkbox" class="h-5 w-5 text-green-600 rounded">
                        <div>
                            <p class="font-medium">Aplicar adubo</p>
                            <p class="text-xs text-gray-500">Talhão 2 - Amanhã</p>
                        </div>
                    </div>
                    <button class="text-red-400 hover:text-red-600">
                        <i class="fas fa-trash-alt"></i>
                    </button>
                </div>
                <div class="flex items-center justify-between p-3 border rounded-lg">
                    <div class="flex items-center space-x-3">
                        <input type="checkbox" class="h-5 w-5 text-green-600 rounded">
                        <div>
                            <p class="font-medium">Irrigação noturna</p>
                            <p class="text-xs text-gray-500">Todos os talhões - Hoje</p>
                        </div>
                    </div>
                    <button class="text-red-400 hover:text-red-600">
                        <i class="fas fa-trash-alt"></i>
                    </button>
                </div>
                <div class="flex items-center justify-between p-3 border rounded-lg">
                    <div class="flex items-center space-x-3">
                        <input type="checkbox" class="h-5 w-5 text-green-600 rounded">
                        <div>
                            <p class="font-medium">Comprar sementes</p>
                            <p class="text-xs text-gray-500">Até sexta-feira</p>
                        </div>
                    </div>
                    <button class="text-red-400 hover:text-red-600">
                        <i class="fas fa-trash-alt"></i>
                    </button>
                </div>
            </div>
        </div>

        <!-- Dicas do Dia -->
        <div class="bg-green-50 rounded-lg shadow p-6 border border-green-100">
            <div class="flex items-center mb-3">
                <i class="fas fa-lightbulb text-xl text-green-600 mr-3"></i>
                <h2 class="text-lg font-semibold text-green-800">Dica do Dia</h2>
            </div>
            <p class="text-gray-700 mb-3">Para economizar água, faça a irrigação no início da manhã ou no final da tarde, quando a evaporação é menor.</p>
            <button class="text-sm text-green-600 hover:text-green-800">
                <i class="fas fa-book mr-1"></i> Ver mais dicas
            </button>
        </div>

        <!-- Modal -->
        <div id="modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden">
            <div class="bg-white rounded-lg shadow-lg p-6 w-full max-w-md">
                <div class="flex justify-between items-center mb-4">
                    <h3 id="modal-title" class="text-lg font-semibold"></h3>
                    <button onclick="closeModal()" class="text-gray-500 hover:text-gray-700">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                <div id="modal-content">
                    <!-- Conteúdo será preenchido pelo JavaScript -->
                </div>
                <div class="mt-6 flex justify-end space-x-3">
                    <button onclick="closeModal()" class="px-4 py-2 border rounded-lg text-gray-700 hover:bg-gray-100">
                        Cancelar
                    </button>
                    <button id="modal-confirm" class="px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700">
                        Salvar
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Funções para abrir e fechar o modal
        function openModal(type) {
            const modal = document.getElementById('modal');
            const modalTitle = document.getElementById('modal-title');
            const modalContent = document.getElementById('modal-content');
            
            modal.classList.remove('hidden');
            
            switch(type) {
                case 'plantio':
                    modalTitle.textContent = 'Registrar Plantio';
                    modalContent.innerHTML = `
                        <div class="space-y-4">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Cultura</label>
                                <select class="simple-input">
                                    <option>Milho</option>
                                    <option>Feijão</option>
                                    <option>Soja</option>
                                    <option>Trigo</option>
                                    <option>Outra</option>
                                </select>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Área (ha)</label>
                                <input type="number" step="0.1" class="simple-input" placeholder="Ex: 1.5">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Talhão</label>
                                <input type="text" class="simple-input" placeholder="Ex: Talhão 1">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Data</label>
                                <input type="date" class="simple-input">
                            </div>
                        </div>
                    `;
                    break;
                    
                case 'colheita':
                    modalTitle.textContent = 'Registrar Colheita';
                    modalContent.innerHTML = `
                        <div class="space-y-4">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Cultura</label>
                                <select class="simple-input">
                                    <option>Milho</option>
                                    <option>Feijão</option>
                                    <option>Soja</option>
                                    <option>Trigo</option>
                                    <option>Outra</option>
                                </select>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Quantidade</label>
                                <div class="flex space-x-2">
                                    <input type="number" class="simple-input" placeholder="Quantidade">
                                    <select class="simple-input w-24">
                                        <option>sacas</option>
                                        <option>kg</option>
                                        <option>ton</option>
                                    </select>
                                </div>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Talhão</label>
                                <input type="text" class="simple-input" placeholder="Ex: Talhão 1">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Data</label>
                                <input type="date" class="simple-input">
                            </div>
                        </div>
                    `;
                    break;
                    
                case 'gasto':
                    modalTitle.textContent = 'Registrar Gasto';
                    modalContent.innerHTML = `
                        <div class="space-y-4">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Tipo de Gasto</label>
                                <select class="simple-input">
                                    <option>Insumos</option>
                                    <option>Mão de obra</option>
                                    <option>Manutenção</option>
                                    <option>Combustível</option>
                                    <option>Outros</option>
                                </select>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Descrição</label>
                                <input type="text" class="simple-input" placeholder="Ex: Compra de adubo">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Valor (R$)</label>
                                <input type="number" step="0.01" class="simple-input" placeholder="Ex: 150.50">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Data</label>
                                <input type="date" class="simple-input">
                            </div>
                        </div>
                    `;
                    break;
                    
                case 'venda':
                    modalTitle.textContent = 'Registrar Venda';
                    modalContent.innerHTML = `
                        <div class="space-y-4">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Produto</label>
                                <select class="simple-input">
                                    <option>Milho</option>
                                    <option>Feijão</option>
                                    <option>Soja</option>
                                    <option>Trigo</option>
                                    <option>Outro</option>
                                </select>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Quantidade</label>
                                <div class="flex space-x-2">
                                    <input type="number" class="simple-input" placeholder="Quantidade">
                                    <select class="simple-input w-24">
                                        <option>sacas</option>
                                        <option>kg</option>
                                        <option>ton</option>
                                    </select>
                                </div>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Valor (R$)</label>
                                <input type="number" step="0.01" class="simple-input" placeholder="Ex: 150.50">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Comprador</label>
                                <input type="text" class="simple-input" placeholder="Ex: Cooperativa XYZ">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Data</label>
                                <input type="date" class="simple-input">
                            </div>
                        </div>
                    `;
                    break;
                    
                case 'tarefa':
                    modalTitle.textContent = 'Adicionar Tarefa';
                    modalContent.innerHTML = `
                        <div class="space-y-4">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Tarefa</label>
                                <input type="text" class="simple-input" placeholder="Ex: Aplicar defensivo">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Local</label>
                                <input type="text" class="simple-input" placeholder="Ex: Talhão 2">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Data</label>
                                <input type="date" class="simple-input">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Observações</label>
                                <textarea class="simple-input" rows="2" placeholder="Detalhes importantes"></textarea>
                            </div>
                        </div>
                    `;
                    break;
            }
        }

        function closeModal() {
            document.getElementById('modal').classList.add('hidden');
        }

        // Configurar o botão de confirmação do modal
        document.getElementById('modal-confirm').addEventListener('click', function() {
            alert('Informações salvas com sucesso!');
            closeModal();
        });

        // Simular dados (em uma aplicação real, isso viria de um banco de dados)
        document.addEventListener('DOMContentLoaded', function() {
            // Definir a data de hoje como padrão nos campos de data
            const today = new Date().toISOString().split('T')[0];
            document.querySelectorAll('input[type="date"]').forEach(input => {
                input.value = today;
            });
        });
    </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=moosee/testeee" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>