blacksinisterx commited on
Commit
439b1dc
Β·
verified Β·
1 Parent(s): ff4ee9f

deploy: batch update 1 file(s)

Browse files
report_generation/templates/report_styles.css CHANGED
@@ -1,412 +1,338 @@
1
- /* DetectifAI Report Styles - Enhanced Readability */
2
- :root {
3
- --primary-color: #1a365d;
4
- --secondary-color: #2d3748;
5
- --accent-color: #3182ce;
6
- --danger-color: #e53e3e;
7
- --warning-color: #dd6b20;
8
- --success-color: #38a169;
9
- --bg-color: #ffffff;
10
- --text-color: #1a202c;
11
- --border-color: #e2e8f0;
12
- --section-bg: #f8fafc;
13
- }
14
-
15
- * {
16
- box-sizing: border-box;
17
- margin: 0;
18
- padding: 0;
19
- }
20
-
21
- body {
22
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
23
- font-size: 12pt;
24
- line-height: 1.8;
25
- color: var(--text-color);
26
- background-color: #f7fafc;
27
- }
28
-
29
- .report-container {
30
- max-width: 210mm;
31
- margin: 20px auto;
32
- background: var(--bg-color);
33
- box-shadow: 0 4px 30px rgba(0,0,0,0.15);
34
- }
35
-
36
- /* Header Styles */
37
- .report-header {
38
- background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
39
- color: white;
40
- padding: 40px 50px;
41
- display: flex;
42
- justify-content: space-between;
43
- align-items: center;
44
- border-bottom: 4px solid var(--accent-color);
45
- }
46
-
47
- .report-header .logo h1 {
48
- font-size: 32pt;
49
- margin-bottom: 8px;
50
- font-weight: 700;
51
- }
52
-
53
- .report-header .subtitle {
54
- font-size: 12pt;
55
- opacity: 0.95;
56
- font-weight: 300;
57
- }
58
-
59
- .classification {
60
- padding: 10px 20px;
61
- border-radius: 6px;
62
- font-weight: bold;
63
- text-transform: uppercase;
64
- font-size: 10pt;
65
- letter-spacing: 1px;
66
- }
67
-
68
- .classification.confidential {
69
- background: var(--danger-color);
70
- }
71
-
72
- .classification.internal {
73
- background: var(--warning-color);
74
- }
75
-
76
- .classification.public {
77
- background: var(--success-color);
78
- }
79
-
80
- /* Content Styles */
81
- .report-content {
82
- padding: 50px;
83
- background: white;
84
- }
85
-
86
- .report-section {
87
- margin-bottom: 50px;
88
- page-break-inside: avoid;
89
- }
90
-
91
- .section-content {
92
- background: white;
93
- padding: 30px;
94
- border-radius: 8px;
95
- border-left: 4px solid var(--accent-color);
96
- color: var(--text-color);
97
- }
98
-
99
- .section-divider {
100
- height: 2px;
101
- background: linear-gradient(to right, transparent, var(--border-color), transparent);
102
- margin: 40px 0;
103
- }
104
-
105
- h1, h2, h3, h4 {
106
- color: var(--primary-color);
107
- margin-top: 30px;
108
- margin-bottom: 20px;
109
- font-weight: 600;
110
- }
111
-
112
- h1 {
113
- font-size: 28pt;
114
- border-bottom: 3px solid var(--accent-color);
115
- padding-bottom: 15px;
116
- margin-top: 0;
117
- }
118
-
119
- h2 {
120
- font-size: 20pt;
121
- border-bottom: 2px solid var(--border-color);
122
- padding-bottom: 12px;
123
- margin-top: 0;
124
- }
125
-
126
- h3 {
127
- font-size: 16pt;
128
- color: var(--secondary-color);
129
- }
130
-
131
- h4 {
132
- font-size: 13pt;
133
- color: var(--secondary-color);
134
- }
135
-
136
- p {
137
- margin-bottom: 16px;
138
- color: var(--text-color);
139
- line-height: 1.8;
140
- }
141
-
142
- strong {
143
- color: var(--primary-color);
144
- font-weight: 600;
145
- }
146
-
147
- /* Table Styles */
148
- table {
149
- width: 100%;
150
- border-collapse: collapse;
151
- margin: 25px 0;
152
- font-size: 11pt;
153
- box-shadow: 0 2px 10px rgba(0,0,0,0.1);
154
- border-radius: 8px;
155
- overflow: hidden;
156
- background: white;
157
- }
158
-
159
- th, td {
160
- border: 1px solid var(--border-color);
161
- padding: 14px 16px;
162
- text-align: left;
163
- color: var(--text-color);
164
- }
165
-
166
- th {
167
- background: var(--primary-color);
168
- color: white;
169
- font-weight: 600;
170
- text-transform: uppercase;
171
- font-size: 10pt;
172
- letter-spacing: 0.5px;
173
- }
174
-
175
- tr:nth-child(even) {
176
- background: #f8fafc;
177
- }
178
-
179
- tr:hover {
180
- background: #edf2f7;
181
- transition: background 0.2s ease;
182
- }
183
-
184
- /* Evidence Gallery */
185
- .evidence-gallery {
186
- margin: 30px 0;
187
- padding: 25px;
188
- background: white;
189
- border-radius: 8px;
190
- border: 1px solid var(--border-color);
191
- }
192
-
193
- .gallery-title {
194
- font-size: 14pt;
195
- color: var(--primary-color);
196
- margin-bottom: 20px;
197
- padding-bottom: 10px;
198
- border-bottom: 2px solid var(--accent-color);
199
- }
200
-
201
- .gallery-grid {
202
- display: grid;
203
- grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
204
- gap: 25px;
205
- }
206
-
207
- .evidence-item {
208
- border: 2px solid var(--border-color);
209
- border-radius: 10px;
210
- overflow: hidden;
211
- background: white;
212
- transition: transform 0.2s ease, box-shadow 0.2s ease;
213
- }
214
-
215
- .evidence-item:hover {
216
- transform: translateY(-4px);
217
- box-shadow: 0 6px 20px rgba(0,0,0,0.15);
218
- }
219
-
220
- .evidence-image {
221
- width: 100%;
222
- height: 180px;
223
- object-fit: cover;
224
- border-bottom: 2px solid var(--border-color);
225
- background: #f8fafc;
226
- }
227
-
228
- .image-placeholder {
229
- width: 100%;
230
- height: 180px;
231
- display: flex;
232
- align-items: center;
233
- justify-content: center;
234
- background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
235
- color: #4a5568;
236
- font-size: 11pt;
237
- border-bottom: 2px solid var(--border-color);
238
- font-weight: 500;
239
- }
240
-
241
- .evidence-item figcaption {
242
- padding: 12px;
243
- font-size: 10pt;
244
- color: #2d3748;
245
- background: white;
246
- font-weight: 500;
247
- min-height: 50px;
248
- }
249
-
250
- /* Lists */
251
- ul, ol {
252
- margin: 16px 0;
253
- padding-left: 30px;
254
- }
255
-
256
- li {
257
- margin-bottom: 10px;
258
- line-height: 1.6;
259
- color: var(--text-color);
260
- }
261
-
262
- /* Code blocks */
263
- code {
264
- background: #edf2f7;
265
- padding: 3px 8px;
266
- border-radius: 4px;
267
- font-size: 10pt;
268
- font-family: 'Courier New', monospace;
269
- color: #2d3748;
270
- }
271
-
272
- pre {
273
- background: #2d3748;
274
- color: #e2e8f0;
275
- padding: 20px;
276
- border-radius: 8px;
277
- overflow-x: auto;
278
- font-size: 10pt;
279
- margin: 20px 0;
280
- }
281
-
282
- pre code {
283
- background: transparent;
284
- color: #e2e8f0;
285
- padding: 0;
286
- }
287
-
288
- /* Footer Styles */
289
- .report-footer {
290
- background: var(--section-bg);
291
- padding: 30px 50px;
292
- border-top: 3px solid var(--accent-color);
293
- font-size: 10pt;
294
- color: #4a5568;
295
- }
296
-
297
- .footer-content {
298
- max-width: 100%;
299
- }
300
-
301
- .footer-info {
302
- margin-bottom: 20px;
303
- padding-bottom: 20px;
304
- border-bottom: 1px solid var(--border-color);
305
- }
306
-
307
- .footer-info p {
308
- margin-bottom: 8px;
309
- color: #2d3748;
310
- }
311
-
312
- .disclaimer {
313
- margin-top: 20px;
314
- font-style: italic;
315
- padding: 15px;
316
- background: #fff3cd;
317
- border-left: 4px solid var(--warning-color);
318
- border-radius: 4px;
319
- color: #856404;
320
- }
321
-
322
- /* Print Styles */
323
- @media print {
324
- body {
325
- background: white;
326
- }
327
-
328
- .report-container {
329
- box-shadow: none;
330
- max-width: 100%;
331
- margin: 0;
332
- }
333
-
334
- .report-section {
335
- page-break-inside: avoid;
336
- }
337
-
338
- h2, h3 {
339
- page-break-after: avoid;
340
- }
341
-
342
- .section-divider {
343
- page-break-after: avoid;
344
- }
345
- }
346
-
347
- /* Threat Level Indicators */
348
- .threat-critical {
349
- color: #c53030;
350
- font-weight: bold;
351
- background: #fff5f5;
352
- padding: 2px 6px;
353
- border-radius: 3px;
354
- }
355
-
356
- .threat-high {
357
- color: #dd6b20;
358
- font-weight: bold;
359
- background: #fffaf0;
360
- padding: 2px 6px;
361
- border-radius: 3px;
362
- }
363
-
364
- .threat-medium {
365
- color: #d69e2e;
366
- background: #fffff0;
367
- padding: 2px 6px;
368
- border-radius: 3px;
369
- }
370
-
371
- .threat-low {
372
- color: #38a169;
373
- background: #f0fff4;
374
- padding: 2px 6px;
375
- border-radius: 3px;
376
- }
377
-
378
- /* Horizontal rules */
379
- hr {
380
- border: none;
381
- border-top: 2px solid var(--border-color);
382
- margin: 30px 0;
383
- }
384
-
385
- /* Scrollable sections - ensure text is visible */
386
- .scrollable-section {
387
- max-height: 400px;
388
- overflow-y: auto;
389
- padding: 20px;
390
- background: white;
391
- border: 1px solid var(--border-color);
392
- border-radius: 8px;
393
- color: var(--text-color);
394
- }
395
-
396
- .scrollable-section::-webkit-scrollbar {
397
- width: 10px;
398
- }
399
-
400
- .scrollable-section::-webkit-scrollbar-track {
401
- background: #f1f1f1;
402
- border-radius: 10px;
403
- }
404
-
405
- .scrollable-section::-webkit-scrollbar-thumb {
406
- background: var(--accent-color);
407
- border-radius: 10px;
408
- }
409
-
410
- .scrollable-section::-webkit-scrollbar-thumb:hover {
411
- background: var(--primary-color);
412
- }
 
1
+ /* ============================================================
2
+ DetectifAI Incident Report β€” Stylesheet
3
+ Design: Professional forensic document.
4
+ Colour palette: navy primary, slate text, white surface.
5
+ Print-ready: A4-compatible, page-break aware.
6
+ ============================================================ */
7
+
8
+ :root {
9
+ --navy: #1a365d;
10
+ --navy-mid: #2c5282;
11
+ --slate: #2d3748;
12
+ --slate-light: #4a5568;
13
+ --steel: #718096;
14
+ --border: #e2e8f0;
15
+ --surface: #f8fafc;
16
+ --white: #ffffff;
17
+ --accent: #3182ce;
18
+ --danger: #c53030;
19
+ --warn: #c05621;
20
+ --ok: #276749;
21
+ --warn-bg: #fffff0;
22
+ --danger-bg: #fff5f5;
23
+ }
24
+
25
+ /* ── Reset ─────────────────────────────────────────────────── */
26
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
27
+
28
+ /* ── Base ──────────────────────────────────────────────────── */
29
+ body {
30
+ font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
31
+ font-size: 11pt;
32
+ line-height: 1.75;
33
+ color: var(--slate);
34
+ background: #edf2f7;
35
+ }
36
+
37
+ /* ── Page wrapper ──────────────────────────────────────────── */
38
+ .report-container {
39
+ max-width: 210mm;
40
+ margin: 24px auto;
41
+ background: var(--white);
42
+ box-shadow: 0 2px 24px rgba(0,0,0,0.12);
43
+ }
44
+
45
+ /* ── Header ────────────────────────────────────────────────── */
46
+ .report-header {
47
+ background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
48
+ color: var(--white);
49
+ padding: 36px 48px;
50
+ display: flex;
51
+ justify-content: space-between;
52
+ align-items: flex-start;
53
+ border-bottom: 4px solid var(--accent);
54
+ }
55
+
56
+ .logo-row {
57
+ display: flex;
58
+ align-items: center;
59
+ gap: 12px;
60
+ margin-bottom: 6px;
61
+ }
62
+
63
+ .logo-icon {
64
+ width: 32px;
65
+ height: 32px;
66
+ color: var(--white);
67
+ opacity: 0.9;
68
+ flex-shrink: 0;
69
+ }
70
+
71
+ .logo h1 {
72
+ font-size: 26pt;
73
+ font-weight: 700;
74
+ letter-spacing: -0.5px;
75
+ line-height: 1;
76
+ }
77
+
78
+ .subtitle {
79
+ font-size: 10pt;
80
+ opacity: 0.80;
81
+ font-weight: 300;
82
+ margin-top: 2px;
83
+ }
84
+
85
+ /* Classification badge */
86
+ .classification {
87
+ padding: 8px 18px;
88
+ border-radius: 4px;
89
+ font-weight: 700;
90
+ text-transform: uppercase;
91
+ font-size: 9pt;
92
+ letter-spacing: 1.5px;
93
+ color: var(--white);
94
+ white-space: nowrap;
95
+ }
96
+ .classification.confidential { background: var(--danger); }
97
+ .classification.internal { background: var(--warn); }
98
+ .classification.public { background: var(--ok); }
99
+ .classification.restricted { background: #553c9a; }
100
+
101
+ /* ── Main content ──────────────────────────────────────────── */
102
+ .report-content {
103
+ padding: 48px 48px 32px;
104
+ }
105
+
106
+ .report-section {
107
+ margin-bottom: 40px;
108
+ }
109
+
110
+ .section-content {
111
+ background: var(--surface);
112
+ padding: 28px 32px;
113
+ border-radius: 6px;
114
+ border-left: 4px solid var(--accent);
115
+ }
116
+
117
+ .section-divider {
118
+ height: 1px;
119
+ background: var(--border);
120
+ margin: 40px 0;
121
+ }
122
+
123
+ /* ── Typography ────────────────────────────────────────────── */
124
+ h1 {
125
+ font-size: 22pt;
126
+ color: var(--navy);
127
+ border-bottom: 3px solid var(--accent);
128
+ padding-bottom: 12px;
129
+ margin-bottom: 20px;
130
+ font-weight: 700;
131
+ }
132
+
133
+ h2 {
134
+ font-size: 16pt;
135
+ color: var(--navy);
136
+ border-bottom: 1px solid var(--border);
137
+ padding-bottom: 8px;
138
+ margin-top: 28px;
139
+ margin-bottom: 16px;
140
+ font-weight: 600;
141
+ }
142
+
143
+ h3 {
144
+ font-size: 13pt;
145
+ color: var(--slate);
146
+ margin-top: 22px;
147
+ margin-bottom: 12px;
148
+ font-weight: 600;
149
+ }
150
+
151
+ h4 {
152
+ font-size: 11pt;
153
+ color: var(--slate-light);
154
+ margin-top: 16px;
155
+ margin-bottom: 8px;
156
+ font-weight: 600;
157
+ }
158
+
159
+ p {
160
+ margin-bottom: 14px;
161
+ text-align: justify;
162
+ hyphens: auto;
163
+ }
164
+
165
+ strong { color: var(--navy); font-weight: 600; }
166
+
167
+ em { color: var(--slate-light); }
168
+
169
+ hr {
170
+ border: none;
171
+ border-top: 1px solid var(--border);
172
+ margin: 24px 0;
173
+ }
174
+
175
+ /* ── Tables ────────────────────────────────────────────────── */
176
+ table {
177
+ width: 100%;
178
+ border-collapse: collapse;
179
+ margin: 20px 0;
180
+ font-size: 10pt;
181
+ border-radius: 6px;
182
+ overflow: hidden;
183
+ box-shadow: 0 1px 6px rgba(0,0,0,0.08);
184
+ }
185
+
186
+ thead { background: var(--navy); color: var(--white); }
187
+
188
+ th {
189
+ padding: 12px 14px;
190
+ font-weight: 600;
191
+ font-size: 9pt;
192
+ text-transform: uppercase;
193
+ letter-spacing: 0.6px;
194
+ text-align: left;
195
+ }
196
+
197
+ td {
198
+ padding: 11px 14px;
199
+ border-bottom: 1px solid var(--border);
200
+ vertical-align: top;
201
+ }
202
+
203
+ tbody tr:nth-child(even) { background: var(--surface); }
204
+ tbody tr:hover { background: #edf2f7; }
205
+
206
+ td:first-child { font-weight: 600; color: var(--slate); width: 22%; }
207
+
208
+ /* ── Inline images from markdown ── */
209
+ /* The markdown renderer produces <p><img …></p> or bare <img …>.
210
+ We style these as a clean evidence grid so keyframes are correctly
211
+ aligned without duplicating them in a separate gallery block. */
212
+ .section-content p > img,
213
+ .section-content img {
214
+ display: block;
215
+ width: 100%;
216
+ max-width: 280px;
217
+ height: 180px;
218
+ object-fit: cover;
219
+ border-radius: 6px;
220
+ border: 1px solid var(--border);
221
+ margin: 8px auto 4px;
222
+ box-shadow: 0 2px 8px rgba(0,0,0,0.08);
223
+ }
224
+
225
+ /* Keyframe grid β€” wraps consecutive images in the evidence section */
226
+ .section-content .keyframe-grid {
227
+ display: grid;
228
+ grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
229
+ gap: 20px;
230
+ margin: 20px 0;
231
+ }
232
+
233
+ /* ── Lists ─────────────────────────────────────────────────── */
234
+ ul, ol {
235
+ margin: 12px 0 12px 24px;
236
+ }
237
+
238
+ li {
239
+ margin-bottom: 6px;
240
+ line-height: 1.6;
241
+ }
242
+
243
+ li::marker { color: var(--accent); font-weight: 600; }
244
+
245
+ /* ── Blockquotes ───────────────────────────────────────────── */
246
+ blockquote {
247
+ margin: 16px 0;
248
+ padding: 16px 20px;
249
+ border-left: 4px solid var(--accent);
250
+ background: var(--surface);
251
+ border-radius: 0 6px 6px 0;
252
+ color: var(--slate-light);
253
+ font-style: italic;
254
+ }
255
+
256
+ blockquote p { margin-bottom: 0; }
257
+
258
+ /* ── Code ──────────────────────────────────────────────────── */
259
+ code {
260
+ background: #edf2f7;
261
+ padding: 2px 6px;
262
+ border-radius: 3px;
263
+ font-family: 'Courier New', monospace;
264
+ font-size: 9.5pt;
265
+ color: #c53030;
266
+ }
267
+
268
+ pre {
269
+ background: var(--slate);
270
+ color: #e2e8f0;
271
+ padding: 16px 20px;
272
+ border-radius: 6px;
273
+ overflow-x: auto;
274
+ font-size: 9pt;
275
+ margin: 16px 0;
276
+ }
277
+
278
+ pre code { background: transparent; color: inherit; padding: 0; }
279
+
280
+ /* ── Threat level tags ─────────────────────────────────────── */
281
+ .threat-critical { color: var(--danger); font-weight: 600; background: var(--danger-bg); padding: 1px 5px; border-radius: 3px; }
282
+ .threat-high { color: var(--warn); font-weight: 600; background: #fffaf0; padding: 1px 5px; border-radius: 3px; }
283
+ .threat-medium { color: #b7791f; background: var(--warn-bg); padding: 1px 5px; border-radius: 3px; }
284
+ .threat-low { color: var(--ok); background: #f0fff4; padding: 1px 5px; border-radius: 3px; }
285
+
286
+ /* ── Footer ────────────────────────────────────────────────── */
287
+ .report-footer {
288
+ background: var(--surface);
289
+ padding: 24px 48px;
290
+ border-top: 2px solid var(--accent);
291
+ font-size: 9.5pt;
292
+ color: var(--steel);
293
+ }
294
+
295
+ .footer-info {
296
+ margin-bottom: 16px;
297
+ padding-bottom: 12px;
298
+ border-bottom: 1px solid var(--border);
299
+ display: flex;
300
+ gap: 32px;
301
+ flex-wrap: wrap;
302
+ }
303
+
304
+ .footer-info p { margin: 0; text-align: left; }
305
+
306
+ .disclaimer {
307
+ font-style: italic;
308
+ padding: 12px 16px;
309
+ background: #fffbeb;
310
+ border-left: 3px solid #d69e2e;
311
+ border-radius: 3px;
312
+ color: #744210;
313
+ line-height: 1.5;
314
+ }
315
+
316
+ /* ── Print / PDF ───────────────────────────────────────────── */
317
+ @media print {
318
+ body { background: white; }
319
+
320
+ .report-container {
321
+ box-shadow: none;
322
+ max-width: 100%;
323
+ margin: 0;
324
+ }
325
+
326
+ .report-header { page-break-after: avoid; }
327
+
328
+ .report-section { page-break-inside: avoid; orphans: 3; widows: 3; }
329
+
330
+ h1, h2, h3, h4 { page-break-after: avoid; }
331
+
332
+ table { page-break-inside: avoid; }
333
+ thead { display: table-header-group; }
334
+
335
+ img { max-width: 100%; page-break-inside: avoid; }
336
+
337
+ a { text-decoration: none; color: var(--navy); }
338
+ }