hergo-7 commited on
Commit
2d628d5
·
verified ·
1 Parent(s): b200e21

Upload 3 files

Browse files
Files changed (3) hide show
  1. frontend/index.html +21 -16
  2. frontend/script.js +46 -25
  3. frontend/style.css +114 -39
frontend/index.html CHANGED
@@ -28,10 +28,15 @@
28
  <span class="icon">📄</span>
29
  <span class="brand-name">SOPDF Editor</span>
30
  </div>
31
- <ul class="nav-links">
32
- <li><a href="#" onclick="if(typeof closeTool === 'function') closeTool(); window.scrollTo(0,0); return false;" class="active">Início</a></li>
33
- <li><a href="#ferramentas" onclick="if(typeof closeTool === 'function') closeTool();">Ferramentas</a></li>
34
- </ul>
 
 
 
 
 
35
  </nav>
36
 
37
  <div id="home-view">
@@ -74,83 +79,83 @@
74
  <div class="grid-container">
75
  <!-- Excluir Páginas -->
76
  <div class="tool-card glass-card" onclick="openTool('delete')">
77
- <div class="tool-icon" style="background: #fff7ed; border: 1px solid #fed7aa;">🗑️</div>
78
  <h3>Excluir Páginas</h3>
79
  <p>Remova páginas indesejadas de um documento PDF rapidamente.</p>
80
  </div>
81
 
82
  <!-- Comprimir PDF -->
83
  <div class="tool-card glass-card" onclick="openTool('compress')">
84
- <div class="tool-icon" style="background: #e6f4ea; border: 1px solid #bbf7d0;">🗜️</div>
85
  <h3>Comprimir PDF</h3>
86
  <p>Reduza o tamanho do seu arquivo PDF com compressão inteligente em vários níveis.</p>
87
  </div>
88
 
89
  <!-- Particionar PDF -->
90
  <div class="tool-card glass-card" onclick="openTool('split')">
91
- <div class="tool-icon" style="background: #fff7ed; border: 1px solid #fed7aa;">✂️</div>
92
  <h3>Particionar Inteligente</h3>
93
  <p>Divida PDFs limitando o tamanho máximo em MB para cada arquivo gerado.</p>
94
  </div>
95
 
96
  <!-- Mesclar PDFs -->
97
  <div class="tool-card glass-card" onclick="openTool('merge')">
98
- <div class="tool-icon" style="background: #e6f4ea; border: 1px solid #bbf7d0;">🔗</div>
99
  <h3>Mesclar PDFs</h3>
100
  <p>Junte múltiplos arquivos PDF em um único documento na ordem desejada.</p>
101
  </div>
102
 
103
  <!-- Conversões -->
104
  <div class="tool-card glass-card" onclick="openTool('convert')">
105
- <div class="tool-icon" style="background: #fff7ed; border: 1px solid #fed7aa;">🔄</div>
106
  <h3>Conversões</h3>
107
  <p>Converta PDF para Word, Excel, PPTX, Imagens, ou Imagens para PDF.</p>
108
  </div>
109
 
110
  <!-- Segurança -->
111
  <div class="tool-card glass-card" onclick="openTool('security')">
112
- <div class="tool-icon" style="background: #e6f4ea; border: 1px solid #bbf7d0;">🛡️</div>
113
  <h3>Segurança AES</h3>
114
  <p>Proteja com senha ou descriptografe arquivos PDF sensíveis.</p>
115
  </div>
116
 
117
  <!-- Comparar PDFs -->
118
  <div class="tool-card glass-card" onclick="openTool('compare')">
119
- <div class="tool-icon" style="background: #fff7ed; border: 1px solid #fed7aa;">👁️</div>
120
  <h3>Comparar PDFs</h3>
121
  <p>Veja as alterações entre duas versões de um documento lado a lado.</p>
122
  </div>
123
 
124
  <!-- OCR (Texto Pesquisável) -->
125
  <div class="tool-card glass-card" onclick="openTool('ocr')">
126
- <div class="tool-icon" style="background: #e6f4ea; border: 1px solid #bbf7d0;">🔍</div>
127
  <h3>Reconhecimento de Texto (OCR)</h3>
128
  <p>Transforme PDFs digitalizados (imagens) em documentos com texto selecionável e pesquisável.</p>
129
  </div>
130
  <!-- Validar Assinaturas -->
131
  <div class="tool-card glass-card" onclick="openTool('validate_signature')">
132
- <div class="tool-icon" style="background: #fff7ed; border: 1px solid #fed7aa;">✒️</div>
133
  <h3>Validar Assinaturas</h3>
134
  <p>Verifique a integridade e detalhes de assinaturas digitais (como ICP-Brasil e gov.br) em documentos PDF.</p>
135
  </div>
136
 
137
  <!-- Reparar PDF -->
138
  <div class="tool-card glass-card" onclick="openTool('repair')">
139
- <div class="tool-icon" style="background: #e6f4ea; border: 1px solid #bbf7d0;">🩹</div>
140
  <h3>Reparar PDF</h3>
141
  <p>Recupere arquivos PDF corrompidos ou danificados reconstruindo sua estrutura original.</p>
142
  </div>
143
 
144
  <!-- Inteligência Artificial -->
145
  <div class="tool-card glass-card" onclick="openTool('ai_assistant')">
146
- <div class="tool-icon" style="background: #fff7ed; border: 1px solid #fed7aa;">🤖</div>
147
  <h3>Inteligência Artificial</h3>
148
  <p>Gere resumos inteligentes ou traduza documentos inteiros de forma automática e exporte em PDF.</p>
149
  </div>
150
 
151
  <!-- Editar PDF -->
152
  <div class="tool-card glass-card" onclick="openTool('editor')">
153
- <div class="tool-icon" style="background: #e6f4ea; border: 1px solid #bbf7d0;">📝</div>
154
  <h3>Editar Conteúdo</h3>
155
  <p>Extraia o texto de um PDF para uma caixa de edição interativa (estilo Word) e salve as alterações em um novo PDF.</p>
156
  </div>
 
28
  <span class="icon">📄</span>
29
  <span class="brand-name">SOPDF Editor</span>
30
  </div>
31
+ <div style="display: flex; align-items: center; gap: 0.8rem;">
32
+ <ul class="nav-links">
33
+ <li><a href="#" onclick="if(typeof closeTool === 'function') closeTool(); window.scrollTo(0,0); return false;" class="active">Início</a></li>
34
+ <li><a href="#ferramentas" onclick="if(typeof closeTool === 'function') closeTool();">Ferramentas</a></li>
35
+ </ul>
36
+ <button id="themeToggleBtn" class="theme-toggle-btn" onclick="toggleTheme()" title="Alternar entre Modo Claro e Modo Escuro">
37
+ 🌙 Modo Escuro
38
+ </button>
39
+ </div>
40
  </nav>
41
 
42
  <div id="home-view">
 
79
  <div class="grid-container">
80
  <!-- Excluir Páginas -->
81
  <div class="tool-card glass-card" onclick="openTool('delete')">
82
+ <div class="tool-icon icon-orange">🗑️</div>
83
  <h3>Excluir Páginas</h3>
84
  <p>Remova páginas indesejadas de um documento PDF rapidamente.</p>
85
  </div>
86
 
87
  <!-- Comprimir PDF -->
88
  <div class="tool-card glass-card" onclick="openTool('compress')">
89
+ <div class="tool-icon icon-green">🗜️</div>
90
  <h3>Comprimir PDF</h3>
91
  <p>Reduza o tamanho do seu arquivo PDF com compressão inteligente em vários níveis.</p>
92
  </div>
93
 
94
  <!-- Particionar PDF -->
95
  <div class="tool-card glass-card" onclick="openTool('split')">
96
+ <div class="tool-icon icon-orange">✂️</div>
97
  <h3>Particionar Inteligente</h3>
98
  <p>Divida PDFs limitando o tamanho máximo em MB para cada arquivo gerado.</p>
99
  </div>
100
 
101
  <!-- Mesclar PDFs -->
102
  <div class="tool-card glass-card" onclick="openTool('merge')">
103
+ <div class="tool-icon icon-green">🔗</div>
104
  <h3>Mesclar PDFs</h3>
105
  <p>Junte múltiplos arquivos PDF em um único documento na ordem desejada.</p>
106
  </div>
107
 
108
  <!-- Conversões -->
109
  <div class="tool-card glass-card" onclick="openTool('convert')">
110
+ <div class="tool-icon icon-orange">🔄</div>
111
  <h3>Conversões</h3>
112
  <p>Converta PDF para Word, Excel, PPTX, Imagens, ou Imagens para PDF.</p>
113
  </div>
114
 
115
  <!-- Segurança -->
116
  <div class="tool-card glass-card" onclick="openTool('security')">
117
+ <div class="tool-icon icon-green">🛡️</div>
118
  <h3>Segurança AES</h3>
119
  <p>Proteja com senha ou descriptografe arquivos PDF sensíveis.</p>
120
  </div>
121
 
122
  <!-- Comparar PDFs -->
123
  <div class="tool-card glass-card" onclick="openTool('compare')">
124
+ <div class="tool-icon icon-orange">👁️</div>
125
  <h3>Comparar PDFs</h3>
126
  <p>Veja as alterações entre duas versões de um documento lado a lado.</p>
127
  </div>
128
 
129
  <!-- OCR (Texto Pesquisável) -->
130
  <div class="tool-card glass-card" onclick="openTool('ocr')">
131
+ <div class="tool-icon icon-green">🔍</div>
132
  <h3>Reconhecimento de Texto (OCR)</h3>
133
  <p>Transforme PDFs digitalizados (imagens) em documentos com texto selecionável e pesquisável.</p>
134
  </div>
135
  <!-- Validar Assinaturas -->
136
  <div class="tool-card glass-card" onclick="openTool('validate_signature')">
137
+ <div class="tool-icon icon-orange">✒️</div>
138
  <h3>Validar Assinaturas</h3>
139
  <p>Verifique a integridade e detalhes de assinaturas digitais (como ICP-Brasil e gov.br) em documentos PDF.</p>
140
  </div>
141
 
142
  <!-- Reparar PDF -->
143
  <div class="tool-card glass-card" onclick="openTool('repair')">
144
+ <div class="tool-icon icon-green">🩹</div>
145
  <h3>Reparar PDF</h3>
146
  <p>Recupere arquivos PDF corrompidos ou danificados reconstruindo sua estrutura original.</p>
147
  </div>
148
 
149
  <!-- Inteligência Artificial -->
150
  <div class="tool-card glass-card" onclick="openTool('ai_assistant')">
151
+ <div class="tool-icon icon-orange">🤖</div>
152
  <h3>Inteligência Artificial</h3>
153
  <p>Gere resumos inteligentes ou traduza documentos inteiros de forma automática e exporte em PDF.</p>
154
  </div>
155
 
156
  <!-- Editar PDF -->
157
  <div class="tool-card glass-card" onclick="openTool('editor')">
158
+ <div class="tool-icon icon-green">📝</div>
159
  <h3>Editar Conteúdo</h3>
160
  <p>Extraia o texto de um PDF para uma caixa de edição interativa (estilo Word) e salve as alterações em um novo PDF.</p>
161
  </div>
frontend/script.js CHANGED
@@ -3,6 +3,27 @@ let currentFiles = [];
3
  let pageOrder = [];
4
  let currentToolMode = '';
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  function scrollToTools() {
7
  document.getElementById('ferramentas').scrollIntoView({ behavior: 'smooth' });
8
  }
@@ -267,14 +288,14 @@ function openTool(toolType) {
267
  <input type="file" id="fileInput" accept=".pdf" style="display: none;" onchange="updateFileName(this)" required>
268
  </div>
269
 
270
- <div style="display: flex; gap: 10px; margin-top: 1rem; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 8px; flex-wrap: wrap;">
271
  <button class="btn-outline" onclick="triggerAIActions('summarize', 'curto')">Resumo Curto</button>
272
  <button class="btn-outline" onclick="triggerAIActions('summarize', 'medio')">Resumo Médio</button>
273
  <button class="btn-outline" onclick="triggerAIActions('summarize', 'longo')">Resumo Longo</button>
274
 
275
- <div style="width: 1px; background: #cbd5e1; margin: 0 5px;"></div>
276
 
277
- <select id="translate-lang" style="padding: 5px 10px; border-radius: 6px; background: #ffffff; color: var(--text-primary); border: 1px solid #cbd5e1;">
278
  <option value="en">Inglês</option>
279
  <option value="es">Espanhol</option>
280
  <option value="pt" selected>Português</option>
@@ -289,7 +310,7 @@ function openTool(toolType) {
289
  <h3 style="color: var(--ceara-orange-1);">Pré-visualização</h3>
290
  <button class="btn-primary" onclick="downloadPreviewPDF('Documento_IA.pdf')">📥 Baixar PDF</button>
291
  </div>
292
- <div id="previewArea" style="background: white; color: var(--text-primary); border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; max-height: 50vh; overflow-y: auto; font-family: 'Inter', sans-serif;"></div>
293
  </div>
294
  `;
295
  break;
@@ -309,7 +330,7 @@ function openTool(toolType) {
309
 
310
  <!-- Editor Container (Oculto inicialmente) -->
311
  <div id="editor-container" style="display: none; margin-top: 2rem;">
312
- <div style="display: flex; gap: 10px; margin-bottom: 10px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 8px; flex-wrap: wrap;">
313
  <button class="btn-primary" onclick="downloadEditorPDF()">📥 Salvar Edição em PDF</button>
314
  </div>
315
 
@@ -343,7 +364,7 @@ function setupDragAndDrop() {
343
  ['dragenter', 'dragover'].forEach(eventName => {
344
  uploadBox.addEventListener(eventName, () => {
345
  uploadBox.style.borderColor = 'var(--ceara-orange-1)';
346
- uploadBox.style.background = '#fff7ed';
347
  }, false);
348
  });
349
 
@@ -378,7 +399,7 @@ function updateFileName(input) {
378
  if (input.files.length > 0) {
379
  document.getElementById('fileName').innerText = "Selecionado: " + input.files[0].name;
380
  document.getElementById('uploadBox').style.borderColor = "var(--ceara-green-1)";
381
- document.getElementById('uploadBox').style.background = "#f0fdf4";
382
  }
383
  }
384
 
@@ -388,12 +409,12 @@ function updateFileNameMultiple(input) {
388
 
389
  currentFiles = currentFiles.concat(newFiles);
390
 
391
- const fileNamesHtml = currentFiles.map(f => `<div style="background: #e6f4ea; color: #15803d; padding: 4px 10px; border-radius: 6px; display: inline-block; margin: 3px; font-size: 0.85rem; font-weight: 600; border: 1px solid #bbf7d0;">${f.name}</div>`).join('');
392
 
393
  document.getElementById('fileName').innerHTML = `<b style="display:block; margin-bottom: 8px; color: var(--text-primary);">${currentFiles.length} arquivo(s) selecionado(s):</b><div style="max-height: 120px; overflow-y: auto; padding: 4px;">${fileNamesHtml}</div>`;
394
 
395
  document.getElementById('uploadBox').style.borderColor = "var(--ceara-green-1)";
396
- document.getElementById('uploadBox').style.background = "#f0fdf4";
397
 
398
  input.value = ''; // clear so same file can be selected again
399
  }
@@ -403,7 +424,7 @@ function renderDownloadBtn(blob, filename, extraText="") {
403
  const url = window.URL.createObjectURL(blob);
404
  const resultArea = document.getElementById('resultArea');
405
  resultArea.innerHTML = `
406
- <div style="padding: 1.2rem; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; text-align: center;">
407
  <p style="color: var(--text-primary); font-weight: 600; margin-bottom: 1rem;">Processamento concluído com sucesso!</p>
408
  ${extraText ? '<p style="color: var(--ceara-orange-1); margin-bottom: 1rem; font-weight: bold;">'+extraText+'</p>' : ''}
409
  <a href="${url}" download="${filename}" class="btn-primary" style="text-decoration: none; display: inline-block;">📥 Baixar Arquivo</a>
@@ -426,10 +447,10 @@ async function loadPreviews(input, mode) {
426
  } else {
427
  fileOffset = currentFiles.length;
428
  currentFiles = currentFiles.concat(newFiles);
429
- const fileNamesHtml = currentFiles.map(f => `<div style="background: #e6f4ea; color: #15803d; padding: 4px 10px; border-radius: 6px; display: inline-block; margin: 3px; font-size: 0.85rem; font-weight: 600; border: 1px solid #bbf7d0;">${f.name}</div>`).join('');
430
  document.getElementById('fileName').innerHTML = `<b style="display:block; margin-bottom: 8px; color: var(--text-primary);">${currentFiles.length} arquivo(s) selecionado(s):</b><div style="max-height: 120px; overflow-y: auto; padding: 4px;">${fileNamesHtml}</div>`;
431
  document.getElementById('uploadBox').style.borderColor = "var(--ceara-green-1)";
432
- document.getElementById('uploadBox').style.background = "#f0fdf4";
433
  }
434
 
435
  const fd = new FormData();
@@ -569,13 +590,13 @@ async function handleValidateSignatureSubmit(e) {
569
  let html = '';
570
  if (data.total_signatures === 0) {
571
  html = `
572
- <div style="padding: 1.5rem; background: #fff7ed; border: 1px solid #fdba74; border-radius: 8px; text-align: center;">
573
- <h3 style="color: #9a3412; margin-bottom: 0.5rem;">Nenhuma Assinatura Encontrada</h3>
574
  <p style="color: var(--text-secondary);">O documento não possui assinaturas digitais embutidas detectáveis (apenas marcas de carimbo visuais não contam como assinaturas criptográficas válidas).</p>
575
  </div>
576
  `;
577
  } else {
578
- html = `<h3 style="color: var(--text-primary); margin-bottom: 1rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.5rem;">${data.total_signatures} Assinatura(s) Detectada(s)</h3>`;
579
  html += `<div style="display: flex; flex-direction: column; gap: 1rem;">`;
580
 
581
  data.signatures.forEach((sig, index) => {
@@ -590,30 +611,30 @@ async function handleValidateSignatureSubmit(e) {
590
 
591
  let badgeHtml = '';
592
  if (isIntact) {
593
- badgeHtml += `<span style="background: #e6f4ea; color: var(--ceara-green-1); border: 1px solid #bbf7d0; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold;">Documento Íntegro</span> `;
594
  } else {
595
- badgeHtml += `<span style="background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold;">Adulterado após assinado</span> `;
596
  }
597
 
598
  if (sig.trust_type === "icp") {
599
- badgeHtml += `<span style="background: #e6f4ea; color: #15803d; border: 1px solid #bbf7d0; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold;">[${sig.trust_class}] ${sig.trust_name}</span>`;
600
  } else if (sig.trust_type === "govbr") {
601
- badgeHtml += `<span style="background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold;">[${sig.trust_class}] ${sig.trust_name}</span>`;
602
  } else if (sig.trust_type === "suite") {
603
- badgeHtml += `<span style="background: #f7fee7; color: #4d7c0f; border: 1px solid #d9f99d; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold;">[${sig.trust_class}] ${sig.trust_name}</span>`;
604
  } else {
605
- badgeHtml += `<span style="background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem;">Emissor Comum/Desconhecido</span>`;
606
  }
607
 
608
  html += `
609
- <div style="padding: 1rem; background: #f8fafc; border: 1px solid #e2e8f0; border-left: 4px solid ${borderColor}; border-radius: 6px;">
610
  <div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem;">
611
  <h4 style="color: var(--text-primary); margin: 0; font-size: 1.1rem;">${index + 1}. ${sig.signer_name}</h4>
612
  </div>
613
  <div style="margin-bottom: 0.8rem;">${badgeHtml}</div>
614
  <p style="color: var(--text-secondary); margin: 0 0 0.3rem 0; font-size: 0.9rem;"><strong>Data:</strong> ${sig.date}</p>
615
  <p style="color: var(--text-secondary); margin: 0; font-size: 0.9rem; word-break: break-all;"><strong>Emissor/Autoridade:</strong> ${sig.issuer}</p>
616
- ${isError ? `<p style="color: #dc2626; margin-top: 0.5rem; font-size: 0.9rem;">${sig.validation_message}</p>` : ''}
617
  </div>
618
  `;
619
  });
@@ -789,7 +810,7 @@ async function handleSplit(e) {
789
  const jszip = new JSZip();
790
  const zip = await jszip.loadAsync(blob);
791
 
792
- let html = '<div style="padding: 1.2rem; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;">';
793
  html += '<h4 style="color: var(--text-primary); margin-bottom:10px;">Partições Geradas</h4>';
794
  html += '<ul style="list-style:none; padding:0; margin-bottom: 15px;">';
795
 
@@ -821,7 +842,7 @@ async function handleSplit(e) {
821
 
822
  const resolvedFiles = await Promise.all(filesPromises);
823
  resolvedFiles.forEach(file => {
824
- html += '<li style="display:flex; justify-content:space-between; align-items:center; padding: 6px 0; border-bottom: 1px solid #cbd5e1;">';
825
  html += '<span style="color:var(--text-primary);">' + file.name + ' <strong style="color:var(--ceara-orange-1)">(' + file.size + ' MB)</strong></span>';
826
  html += '<a href="' + file.url + '" download="' + file.name + '" class="btn-outline" style="padding: 5px 10px; font-size:0.8rem; text-decoration:none;">Baixar Parte</a>';
827
  html += '</li>';
 
3
  let pageOrder = [];
4
  let currentToolMode = '';
5
 
6
+ function updateThemeButtonLabel(isDark) {
7
+ const btn = document.getElementById('themeToggleBtn');
8
+ if (btn) {
9
+ btn.innerHTML = isDark ? '☀️ Modo Claro' : '🌙 Modo Escuro';
10
+ }
11
+ }
12
+
13
+ function toggleTheme() {
14
+ const isDark = document.body.classList.toggle('dark-mode');
15
+ localStorage.setItem('sopdf_theme', isDark ? 'dark' : 'light');
16
+ updateThemeButtonLabel(isDark);
17
+ }
18
+
19
+ (function initTheme() {
20
+ const savedTheme = localStorage.getItem('sopdf_theme');
21
+ if (savedTheme === 'dark') {
22
+ document.body.classList.add('dark-mode');
23
+ updateThemeButtonLabel(true);
24
+ }
25
+ })();
26
+
27
  function scrollToTools() {
28
  document.getElementById('ferramentas').scrollIntoView({ behavior: 'smooth' });
29
  }
 
288
  <input type="file" id="fileInput" accept=".pdf" style="display: none;" onchange="updateFileName(this)" required>
289
  </div>
290
 
291
+ <div style="display: flex; gap: 10px; margin-top: 1rem; background: var(--bg-subtle); border: 1px solid var(--bg-glass-border); padding: 10px; border-radius: 8px; flex-wrap: wrap;">
292
  <button class="btn-outline" onclick="triggerAIActions('summarize', 'curto')">Resumo Curto</button>
293
  <button class="btn-outline" onclick="triggerAIActions('summarize', 'medio')">Resumo Médio</button>
294
  <button class="btn-outline" onclick="triggerAIActions('summarize', 'longo')">Resumo Longo</button>
295
 
296
+ <div style="width: 1px; background: var(--input-border); margin: 0 5px;"></div>
297
 
298
+ <select id="translate-lang" style="padding: 5px 10px; border-radius: 6px; background: var(--input-bg); color: var(--text-primary); border: 1px solid var(--input-border);">
299
  <option value="en">Inglês</option>
300
  <option value="es">Espanhol</option>
301
  <option value="pt" selected>Português</option>
 
310
  <h3 style="color: var(--ceara-orange-1);">Pré-visualização</h3>
311
  <button class="btn-primary" onclick="downloadPreviewPDF('Documento_IA.pdf')">📥 Baixar PDF</button>
312
  </div>
313
+ <div id="previewArea" style="background: var(--bg-dark-card); color: var(--text-primary); border: 1px solid var(--bg-glass-border); border-radius: 8px; padding: 20px; max-height: 50vh; overflow-y: auto; font-family: 'Inter', sans-serif;"></div>
314
  </div>
315
  `;
316
  break;
 
330
 
331
  <!-- Editor Container (Oculto inicialmente) -->
332
  <div id="editor-container" style="display: none; margin-top: 2rem;">
333
+ <div style="display: flex; gap: 10px; margin-bottom: 10px; background: var(--bg-subtle); border: 1px solid var(--bg-glass-border); padding: 10px; border-radius: 8px; flex-wrap: wrap;">
334
  <button class="btn-primary" onclick="downloadEditorPDF()">📥 Salvar Edição em PDF</button>
335
  </div>
336
 
 
364
  ['dragenter', 'dragover'].forEach(eventName => {
365
  uploadBox.addEventListener(eventName, () => {
366
  uploadBox.style.borderColor = 'var(--ceara-orange-1)';
367
+ uploadBox.style.background = 'var(--badge-orange-bg)';
368
  }, false);
369
  });
370
 
 
399
  if (input.files.length > 0) {
400
  document.getElementById('fileName').innerText = "Selecionado: " + input.files[0].name;
401
  document.getElementById('uploadBox').style.borderColor = "var(--ceara-green-1)";
402
+ document.getElementById('uploadBox').style.background = "var(--upload-hover-bg)";
403
  }
404
  }
405
 
 
409
 
410
  currentFiles = currentFiles.concat(newFiles);
411
 
412
+ const fileNamesHtml = currentFiles.map(f => `<div style="background: var(--badge-green-bg); color: var(--badge-green-text); padding: 4px 10px; border-radius: 6px; display: inline-block; margin: 3px; font-size: 0.85rem; font-weight: 600; border: 1px solid var(--badge-green-border);">${f.name}</div>`).join('');
413
 
414
  document.getElementById('fileName').innerHTML = `<b style="display:block; margin-bottom: 8px; color: var(--text-primary);">${currentFiles.length} arquivo(s) selecionado(s):</b><div style="max-height: 120px; overflow-y: auto; padding: 4px;">${fileNamesHtml}</div>`;
415
 
416
  document.getElementById('uploadBox').style.borderColor = "var(--ceara-green-1)";
417
+ document.getElementById('uploadBox').style.background = "var(--upload-hover-bg)";
418
 
419
  input.value = ''; // clear so same file can be selected again
420
  }
 
424
  const url = window.URL.createObjectURL(blob);
425
  const resultArea = document.getElementById('resultArea');
426
  resultArea.innerHTML = `
427
+ <div style="padding: 1.2rem; background: var(--upload-hover-bg); border: 1px solid var(--badge-green-border); border-radius: 10px; text-align: center;">
428
  <p style="color: var(--text-primary); font-weight: 600; margin-bottom: 1rem;">Processamento concluído com sucesso!</p>
429
  ${extraText ? '<p style="color: var(--ceara-orange-1); margin-bottom: 1rem; font-weight: bold;">'+extraText+'</p>' : ''}
430
  <a href="${url}" download="${filename}" class="btn-primary" style="text-decoration: none; display: inline-block;">📥 Baixar Arquivo</a>
 
447
  } else {
448
  fileOffset = currentFiles.length;
449
  currentFiles = currentFiles.concat(newFiles);
450
+ const fileNamesHtml = currentFiles.map(f => `<div style="background: var(--badge-green-bg); color: var(--badge-green-text); padding: 4px 10px; border-radius: 6px; display: inline-block; margin: 3px; font-size: 0.85rem; font-weight: 600; border: 1px solid var(--badge-green-border);">${f.name}</div>`).join('');
451
  document.getElementById('fileName').innerHTML = `<b style="display:block; margin-bottom: 8px; color: var(--text-primary);">${currentFiles.length} arquivo(s) selecionado(s):</b><div style="max-height: 120px; overflow-y: auto; padding: 4px;">${fileNamesHtml}</div>`;
452
  document.getElementById('uploadBox').style.borderColor = "var(--ceara-green-1)";
453
+ document.getElementById('uploadBox').style.background = "var(--upload-hover-bg)";
454
  }
455
 
456
  const fd = new FormData();
 
590
  let html = '';
591
  if (data.total_signatures === 0) {
592
  html = `
593
+ <div style="padding: 1.5rem; background: var(--badge-orange-bg); border: 1px solid var(--badge-orange-border); border-radius: 8px; text-align: center;">
594
+ <h3 style="color: var(--badge-orange-text); margin-bottom: 0.5rem;">Nenhuma Assinatura Encontrada</h3>
595
  <p style="color: var(--text-secondary);">O documento não possui assinaturas digitais embutidas detectáveis (apenas marcas de carimbo visuais não contam como assinaturas criptográficas válidas).</p>
596
  </div>
597
  `;
598
  } else {
599
+ html = `<h3 style="color: var(--text-primary); margin-bottom: 1rem; border-bottom: 1px solid var(--bg-glass-border); padding-bottom: 0.5rem;">${data.total_signatures} Assinatura(s) Detectada(s)</h3>`;
600
  html += `<div style="display: flex; flex-direction: column; gap: 1rem;">`;
601
 
602
  data.signatures.forEach((sig, index) => {
 
611
 
612
  let badgeHtml = '';
613
  if (isIntact) {
614
+ badgeHtml += `<span style="background: var(--badge-green-bg); color: var(--badge-green-text); border: 1px solid var(--badge-green-border); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold;">Documento Íntegro</span> `;
615
  } else {
616
+ badgeHtml += `<span style="background: rgba(220, 38, 38, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold;">Adulterado após assinado</span> `;
617
  }
618
 
619
  if (sig.trust_type === "icp") {
620
+ badgeHtml += `<span style="background: var(--badge-green-bg); color: var(--badge-green-text); border: 1px solid var(--badge-green-border); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold;">[${sig.trust_class}] ${sig.trust_name}</span>`;
621
  } else if (sig.trust_type === "govbr") {
622
+ badgeHtml += `<span style="background: rgba(2, 132, 199, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold;">[${sig.trust_class}] ${sig.trust_name}</span>`;
623
  } else if (sig.trust_type === "suite") {
624
+ badgeHtml += `<span style="background: rgba(101, 163, 13, 0.15); color: #84cc16; border: 1px solid rgba(132, 204, 22, 0.3); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold;">[${sig.trust_class}] ${sig.trust_name}</span>`;
625
  } else {
626
+ badgeHtml += `<span style="background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--input-border); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem;">Emissor Comum/Desconhecido</span>`;
627
  }
628
 
629
  html += `
630
+ <div style="padding: 1rem; background: var(--bg-subtle); border: 1px solid var(--bg-glass-border); border-left: 4px solid ${borderColor}; border-radius: 6px;">
631
  <div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem;">
632
  <h4 style="color: var(--text-primary); margin: 0; font-size: 1.1rem;">${index + 1}. ${sig.signer_name}</h4>
633
  </div>
634
  <div style="margin-bottom: 0.8rem;">${badgeHtml}</div>
635
  <p style="color: var(--text-secondary); margin: 0 0 0.3rem 0; font-size: 0.9rem;"><strong>Data:</strong> ${sig.date}</p>
636
  <p style="color: var(--text-secondary); margin: 0; font-size: 0.9rem; word-break: break-all;"><strong>Emissor/Autoridade:</strong> ${sig.issuer}</p>
637
+ ${isError ? `<p style="color: #ef4444; margin-top: 0.5rem; font-size: 0.9rem;">${sig.validation_message}</p>` : ''}
638
  </div>
639
  `;
640
  });
 
810
  const jszip = new JSZip();
811
  const zip = await jszip.loadAsync(blob);
812
 
813
+ let html = '<div style="padding: 1.2rem; background: var(--upload-hover-bg); border: 1px solid var(--badge-green-border); border-radius: 10px;">';
814
  html += '<h4 style="color: var(--text-primary); margin-bottom:10px;">Partições Geradas</h4>';
815
  html += '<ul style="list-style:none; padding:0; margin-bottom: 15px;">';
816
 
 
842
 
843
  const resolvedFiles = await Promise.all(filesPromises);
844
  resolvedFiles.forEach(file => {
845
+ html += '<li style="display:flex; justify-content:space-between; align-items:center; padding: 6px 0; border-bottom: 1px solid var(--input-border);">';
846
  html += '<span style="color:var(--text-primary);">' + file.name + ' <strong style="color:var(--ceara-orange-1)">(' + file.size + ' MB)</strong></span>';
847
  html += '<a href="' + file.url + '" download="' + file.name + '" class="btn-outline" style="padding: 5px 10px; font-size:0.8rem; text-decoration:none;">Baixar Parte</a>';
848
  html += '</li>';
frontend/style.css CHANGED
@@ -8,14 +8,56 @@
8
  --ceara-orange-2: #d9530f;
9
  --ceara-yellow: #e0630e;
10
 
11
- /* Superfícies Claras */
12
  --bg-dark-base: #f4f6f8;
13
  --bg-dark-card: #ffffff;
 
14
  --bg-glass-border: #e2e8f0;
 
 
15
 
16
  /* Textos */
17
  --text-primary: #1e293b;
18
  --text-secondary: #64748b;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
20
 
21
  * {
@@ -30,20 +72,23 @@ body {
30
  color: var(--text-primary);
31
  overflow-x: hidden;
32
  min-height: 100vh;
 
33
  }
34
 
35
- /* Background Glow Effects (Ocultos no tema claro corporativo) */
36
  .glow-bg {
37
  display: none;
38
  }
39
 
40
- /* Navbar */
41
  .navbar {
42
  display: flex;
43
  justify-content: space-between;
44
  align-items: center;
45
- padding: 1rem 5%;
46
- margin: 1rem 2rem 0 2rem;
 
 
47
  border-radius: 14px;
48
  background: var(--ceara-green-gradient);
49
  box-shadow: 0 4px 12px rgba(49, 154, 110, 0.2);
@@ -66,13 +111,13 @@ body {
66
  .nav-links {
67
  list-style: none;
68
  display: flex;
69
- gap: 1rem;
70
  background: rgba(255, 255, 255, 0.2);
71
- padding: 0.35rem 0.6rem;
72
  border-radius: 20px;
73
  }
74
  .nav-links a {
75
- color: rgba(255, 255, 255, 0.92);
76
  text-decoration: none;
77
  font-weight: 600;
78
  font-size: 0.9rem;
@@ -81,7 +126,7 @@ body {
81
  transition: all 0.2s;
82
  }
83
  .nav-links a:hover, .nav-links a.active {
84
- color: var(--ceara-green-1);
85
  background: #ffffff;
86
  }
87
  .nav-actions {
@@ -89,6 +134,26 @@ body {
89
  gap: 1rem;
90
  }
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  /* Buttons */
93
  button {
94
  font-family: 'Inter', sans-serif;
@@ -98,7 +163,7 @@ button {
98
  transition: all 0.2s ease;
99
  }
100
  .btn-primary {
101
- background: var(--ceara-green-1);
102
  color: #ffffff;
103
  border: none;
104
  padding: 0.6rem 1.2rem;
@@ -110,22 +175,22 @@ button {
110
  box-shadow: 0 6px 16px rgba(22, 128, 60, 0.35);
111
  }
112
  .btn-outline {
113
- background: #ffffff;
114
  color: var(--ceara-green-1);
115
  border: 1px solid var(--ceara-green-1);
116
  padding: 0.6rem 1.2rem;
117
  }
118
  .btn-outline:hover {
119
- background: #f0fdf4;
120
  }
121
  .btn-glass {
122
- background: #ffffff;
123
  border: 1px solid var(--bg-glass-border);
124
  color: var(--text-primary);
125
  padding: 0.6rem 1.2rem;
126
  }
127
  .btn-glass:hover {
128
- background: #f8fafc;
129
  }
130
  button.large {
131
  padding: 0.95rem 2rem;
@@ -139,7 +204,8 @@ button.large {
139
  border: 1px solid var(--bg-glass-border);
140
  border-top: 4px solid var(--ceara-green-1);
141
  border-radius: 14px;
142
- box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
 
143
  }
144
 
145
  /* Container */
@@ -168,9 +234,9 @@ button.large {
168
  display: inline-flex;
169
  align-items: center;
170
  gap: 8px;
171
- background: #e6f4ea;
172
- color: var(--ceara-green-1);
173
- border: 1px solid #bbf7d0;
174
  padding: 0.4rem 1rem;
175
  border-radius: 20px;
176
  font-size: 0.85rem;
@@ -191,7 +257,7 @@ button.large {
191
  font-weight: 800;
192
  }
193
  .hero-title span {
194
- background: var(--ceara-green-gradient);
195
  -webkit-background-clip: text;
196
  -webkit-text-fill-color: transparent;
197
  }
@@ -208,7 +274,7 @@ button.large {
208
  margin-bottom: 2rem;
209
  }
210
  .stat {
211
- background: #f8fafc;
212
  border: 1px solid var(--bg-glass-border);
213
  border-top: 3px solid var(--ceara-green-1);
214
  border-radius: 10px;
@@ -262,27 +328,28 @@ button.large {
262
  height: 100%;
263
  border-radius: 50%;
264
  object-fit: cover;
265
- background: #ffffff;
266
- border: 4px solid #ffffff;
267
  }
268
  .floating-badge {
269
  position: absolute;
270
- background: #fff7ed;
271
- color: #9a3412;
272
- border: 1px solid #fdba74;
273
  padding: 0.5rem 1rem;
274
  border-radius: 10px;
275
  font-size: 0.82rem;
276
  font-weight: 700;
277
- box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
 
278
  }
279
  .badge-top { top: 8%; right: 2%; }
280
  .badge-bottom {
281
  bottom: 8%;
282
  left: 2%;
283
- background: #e6f4ea;
284
- color: #15803d;
285
- border-color: #86efac;
286
  }
287
 
288
  /* Tools Grid */
@@ -311,7 +378,7 @@ button.large {
311
  }
312
  .tool-card:hover {
313
  transform: translateY(-4px);
314
- box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
315
  }
316
  .tool-icon {
317
  width: 48px;
@@ -324,6 +391,14 @@ button.large {
324
  margin-bottom: 1.2rem;
325
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
326
  }
 
 
 
 
 
 
 
 
327
  .tool-card h3 {
328
  font-size: 1.15rem;
329
  margin-bottom: 0.6rem;
@@ -403,8 +478,8 @@ button.large {
403
  }
404
 
405
  .page-card {
406
- background: #f8fafc;
407
- border: 1px solid #cbd5e1;
408
  border-top: 3px solid var(--ceara-green-1);
409
  border-radius: 8px;
410
  padding: 10px;
@@ -475,13 +550,13 @@ button.large {
475
 
476
  .sortable-ghost {
477
  opacity: 0.4;
478
- background: #fed7aa;
479
  }
480
 
481
  /* Upload e Inputs */
482
  .upload-area {
483
- border: 2px dashed #cbd5e1;
484
- background: #f8fafc;
485
  border-radius: 12px;
486
  padding: 3rem;
487
  text-align: center;
@@ -492,7 +567,7 @@ button.large {
492
  }
493
  .upload-area:hover {
494
  border-color: var(--ceara-green-1);
495
- background: #f0fdf4;
496
  }
497
  .input-group {
498
  margin-bottom: 1.5rem;
@@ -507,8 +582,8 @@ button.large {
507
  .input-group input, .input-group select {
508
  width: 100%;
509
  padding: 0.8rem 1rem;
510
- background: #ffffff;
511
- border: 1px solid #cbd5e1;
512
  border-radius: 8px;
513
  color: var(--text-primary);
514
  font-family: 'Inter', sans-serif;
@@ -516,5 +591,5 @@ button.large {
516
  .input-group input:focus, .input-group select:focus {
517
  outline: none;
518
  border-color: var(--ceara-green-1);
519
- box-shadow: 0 0 0 3px rgba(22, 128, 60, 0.12);
520
  }
 
8
  --ceara-orange-2: #d9530f;
9
  --ceara-yellow: #e0630e;
10
 
11
+ /* Superfícies (Modo Claro Padrão) */
12
  --bg-dark-base: #f4f6f8;
13
  --bg-dark-card: #ffffff;
14
+ --bg-subtle: #f8fafc;
15
  --bg-glass-border: #e2e8f0;
16
+ --input-border: #cbd5e1;
17
+ --input-bg: #ffffff;
18
 
19
  /* Textos */
20
  --text-primary: #1e293b;
21
  --text-secondary: #64748b;
22
+
23
+ /* Badges e Destaques Suaves */
24
+ --badge-green-bg: #e6f4ea;
25
+ --badge-green-text: #15803d;
26
+ --badge-green-border: #bbf7d0;
27
+ --badge-orange-bg: #fff7ed;
28
+ --badge-orange-text: #9a3412;
29
+ --badge-orange-border: #fdba74;
30
+ --upload-hover-bg: #f0fdf4;
31
+ }
32
+
33
+ body.dark-mode {
34
+ --ceara-green-1: #22c55e;
35
+ --ceara-green-2: #10b981;
36
+ --ceara-green-gradient: linear-gradient(90deg, #15803d 0%, #0f766e 100%);
37
+ --ceara-orange-1: #f97316;
38
+ --ceara-orange-2: #ea580c;
39
+ --ceara-yellow: #f97316;
40
+
41
+ /* Superfícies (Modo Escuro) */
42
+ --bg-dark-base: #0f172a;
43
+ --bg-dark-card: #1e293b;
44
+ --bg-subtle: #162032;
45
+ --bg-glass-border: #334155;
46
+ --input-border: #475569;
47
+ --input-bg: #0f172a;
48
+
49
+ /* Textos */
50
+ --text-primary: #f1f5f9;
51
+ --text-secondary: #94a3b8;
52
+
53
+ /* Badges e Destaques Suaves no Escuro */
54
+ --badge-green-bg: rgba(34, 197, 94, 0.14);
55
+ --badge-green-text: #4ade80;
56
+ --badge-green-border: rgba(74, 222, 128, 0.3);
57
+ --badge-orange-bg: rgba(249, 115, 22, 0.14);
58
+ --badge-orange-text: #fb923c;
59
+ --badge-orange-border: rgba(251, 146, 60, 0.3);
60
+ --upload-hover-bg: rgba(34, 197, 94, 0.1);
61
  }
62
 
63
  * {
 
72
  color: var(--text-primary);
73
  overflow-x: hidden;
74
  min-height: 100vh;
75
+ transition: background-color 0.25s ease, color 0.25s ease;
76
  }
77
 
78
+ /* Background Glow Effects */
79
  .glow-bg {
80
  display: none;
81
  }
82
 
83
+ /* Navbar com mesma largura útil do restante do conteúdo (.container) */
84
  .navbar {
85
  display: flex;
86
  justify-content: space-between;
87
  align-items: center;
88
+ max-width: calc(1400px - 4rem);
89
+ width: calc(100% - 4rem);
90
+ margin: 1.2rem auto 0 auto;
91
+ padding: 0.9rem 2rem;
92
  border-radius: 14px;
93
  background: var(--ceara-green-gradient);
94
  box-shadow: 0 4px 12px rgba(49, 154, 110, 0.2);
 
111
  .nav-links {
112
  list-style: none;
113
  display: flex;
114
+ gap: 0.5rem;
115
  background: rgba(255, 255, 255, 0.2);
116
+ padding: 0.35rem 0.5rem;
117
  border-radius: 20px;
118
  }
119
  .nav-links a {
120
+ color: rgba(255, 255, 255, 0.95);
121
  text-decoration: none;
122
  font-weight: 600;
123
  font-size: 0.9rem;
 
126
  transition: all 0.2s;
127
  }
128
  .nav-links a:hover, .nav-links a.active {
129
+ color: #16803c;
130
  background: #ffffff;
131
  }
132
  .nav-actions {
 
134
  gap: 1rem;
135
  }
136
 
137
+ /* Botão de Alternar Tema (Claro / Escuro) */
138
+ .theme-toggle-btn {
139
+ background: rgba(255, 255, 255, 0.22);
140
+ color: #ffffff;
141
+ border: 1px solid rgba(255, 255, 255, 0.35);
142
+ padding: 0.45rem 0.95rem;
143
+ border-radius: 20px;
144
+ font-size: 0.85rem;
145
+ font-weight: 600;
146
+ display: inline-flex;
147
+ align-items: center;
148
+ gap: 6px;
149
+ cursor: pointer;
150
+ transition: all 0.2s ease;
151
+ }
152
+ .theme-toggle-btn:hover {
153
+ background: rgba(255, 255, 255, 0.32);
154
+ transform: translateY(-1px);
155
+ }
156
+
157
  /* Buttons */
158
  button {
159
  font-family: 'Inter', sans-serif;
 
163
  transition: all 0.2s ease;
164
  }
165
  .btn-primary {
166
+ background: #16803c;
167
  color: #ffffff;
168
  border: none;
169
  padding: 0.6rem 1.2rem;
 
175
  box-shadow: 0 6px 16px rgba(22, 128, 60, 0.35);
176
  }
177
  .btn-outline {
178
+ background: var(--bg-dark-card);
179
  color: var(--ceara-green-1);
180
  border: 1px solid var(--ceara-green-1);
181
  padding: 0.6rem 1.2rem;
182
  }
183
  .btn-outline:hover {
184
+ background: var(--upload-hover-bg);
185
  }
186
  .btn-glass {
187
+ background: var(--bg-dark-card);
188
  border: 1px solid var(--bg-glass-border);
189
  color: var(--text-primary);
190
  padding: 0.6rem 1.2rem;
191
  }
192
  .btn-glass:hover {
193
+ background: var(--bg-subtle);
194
  }
195
  button.large {
196
  padding: 0.95rem 2rem;
 
204
  border: 1px solid var(--bg-glass-border);
205
  border-top: 4px solid var(--ceara-green-1);
206
  border-radius: 14px;
207
+ box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
208
+ transition: background-color 0.25s ease, border-color 0.25s ease;
209
  }
210
 
211
  /* Container */
 
234
  display: inline-flex;
235
  align-items: center;
236
  gap: 8px;
237
+ background: var(--badge-green-bg);
238
+ color: var(--badge-green-text);
239
+ border: 1px solid var(--badge-green-border);
240
  padding: 0.4rem 1rem;
241
  border-radius: 20px;
242
  font-size: 0.85rem;
 
257
  font-weight: 800;
258
  }
259
  .hero-title span {
260
+ background: linear-gradient(90deg, #44a849 0%, #319a6e 100%);
261
  -webkit-background-clip: text;
262
  -webkit-text-fill-color: transparent;
263
  }
 
274
  margin-bottom: 2rem;
275
  }
276
  .stat {
277
+ background: var(--bg-subtle);
278
  border: 1px solid var(--bg-glass-border);
279
  border-top: 3px solid var(--ceara-green-1);
280
  border-radius: 10px;
 
328
  height: 100%;
329
  border-radius: 50%;
330
  object-fit: cover;
331
+ background: var(--bg-dark-card);
332
+ border: 4px solid var(--bg-dark-card);
333
  }
334
  .floating-badge {
335
  position: absolute;
336
+ background: var(--badge-orange-bg);
337
+ color: var(--badge-orange-text);
338
+ border: 1px solid var(--badge-orange-border);
339
  padding: 0.5rem 1rem;
340
  border-radius: 10px;
341
  font-size: 0.82rem;
342
  font-weight: 700;
343
+ box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
344
+ backdrop-filter: blur(8px);
345
  }
346
  .badge-top { top: 8%; right: 2%; }
347
  .badge-bottom {
348
  bottom: 8%;
349
  left: 2%;
350
+ background: var(--badge-green-bg);
351
+ color: var(--badge-green-text);
352
+ border-color: var(--badge-green-border);
353
  }
354
 
355
  /* Tools Grid */
 
378
  }
379
  .tool-card:hover {
380
  transform: translateY(-4px);
381
+ box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
382
  }
383
  .tool-icon {
384
  width: 48px;
 
391
  margin-bottom: 1.2rem;
392
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
393
  }
394
+ .tool-icon.icon-orange {
395
+ background: var(--badge-orange-bg);
396
+ border: 1px solid var(--badge-orange-border);
397
+ }
398
+ .tool-icon.icon-green {
399
+ background: var(--badge-green-bg);
400
+ border: 1px solid var(--badge-green-border);
401
+ }
402
  .tool-card h3 {
403
  font-size: 1.15rem;
404
  margin-bottom: 0.6rem;
 
478
  }
479
 
480
  .page-card {
481
+ background: var(--bg-subtle);
482
+ border: 1px solid var(--input-border);
483
  border-top: 3px solid var(--ceara-green-1);
484
  border-radius: 8px;
485
  padding: 10px;
 
550
 
551
  .sortable-ghost {
552
  opacity: 0.4;
553
+ background: var(--badge-orange-bg);
554
  }
555
 
556
  /* Upload e Inputs */
557
  .upload-area {
558
+ border: 2px dashed var(--input-border);
559
+ background: var(--bg-subtle);
560
  border-radius: 12px;
561
  padding: 3rem;
562
  text-align: center;
 
567
  }
568
  .upload-area:hover {
569
  border-color: var(--ceara-green-1);
570
+ background: var(--upload-hover-bg);
571
  }
572
  .input-group {
573
  margin-bottom: 1.5rem;
 
582
  .input-group input, .input-group select {
583
  width: 100%;
584
  padding: 0.8rem 1rem;
585
+ background: var(--input-bg);
586
+ border: 1px solid var(--input-border);
587
  border-radius: 8px;
588
  color: var(--text-primary);
589
  font-family: 'Inter', sans-serif;
 
591
  .input-group input:focus, .input-group select:focus {
592
  outline: none;
593
  border-color: var(--ceara-green-1);
594
+ box-shadow: 0 0 0 3px rgba(22, 128, 60, 0.15);
595
  }