File size: 33,174 Bytes
e4cd9a5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Insurance Claims Data Generator</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .sidebar {
            transition: all 0.3s ease;
        }
        .data-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .progress-bar {
            animation: progress 1.5s ease-in-out forwards;
        }
        @keyframes progress {
            from { width: 0%; }
            to { width: var(--progress); }
        }
    </style>
</head>
<body class="bg-gray-100 font-sans">
    <div class="flex h-screen overflow-hidden">
        <!-- Sidebar -->
        <div class="sidebar bg-blue-800 text-white w-64 flex-shrink-0">
            <div class="p-4 border-b border-blue-700">
                <h1 class="text-2xl font-bold flex items-center">
                    <i class="fas fa-database mr-2"></i>
                    <span>ClaimsGen</span>
                </h1>
                <p class="text-blue-200 text-sm mt-1">Data Generation Engine v2.4</p>
            </div>
            <nav class="p-4">
                <div class="mb-6">
                    <h3 class="text-blue-300 uppercase text-xs font-semibold mb-3">MAIN</h3>
                    <a href="#" class="flex items-center py-2 px-3 bg-blue-700 rounded-lg text-white">
                        <i class="fas fa-home mr-3"></i>
                        Dashboard
                    </a>
                    <a href="#" class="flex items-center py-2 px-3 text-blue-200 hover:bg-blue-700 rounded-lg mt-1">
                        <i class="fas fa-chart-line mr-3"></i>
                        Analytics
                    </a>
                    <a href="#" class="flex items-center py-2 px-3 text-blue-200 hover:bg-blue-700 rounded-lg mt-1">
                        <i class="fas fa-cog mr-3"></i>
                        Settings
                    </a>
                </div>
                <div>
                    <h3 class="text-blue-300 uppercase text-xs font-semibold mb-3">DATA GENERATION</h3>
                    <a href="#" class="flex items-center py-2 px-3 text-blue-200 hover:bg-blue-700 rounded-lg">
                        <i class="fas fa-car-crash mr-3"></i>
                        Motor Claims
                    </a>
                    <a href="#" class="flex items-center py-2 px-3 text-blue-200 hover:bg-blue-700 rounded-lg mt-1">
                        <i class="fas fa-house-damage mr-3"></i>
                        Home Claims
                    </a>
                    <a href="#" class="flex items-center py-2 px-3 text-blue-200 hover:bg-blue-700 rounded-lg mt-1">
                        <i class="fas fa-paw mr-3"></i>
                        Pet Claims
                    </a>
                    <a href="#" class="flex items-center py-2 px-3 text-blue-200 hover:bg-blue-700 rounded-lg mt-1">
                        <i class="fas fa-random mr-3"></i>
                        Synthetic Data
                    </a>
                </div>
            </nav>
        </div>

        <!-- Main Content -->
        <div class="flex-1 overflow-auto">
            <!-- Header -->
            <header class="bg-white shadow-sm p-4 flex justify-between items-center">
                <h2 class="text-xl font-semibold text-gray-800">Insurance Claims Data Generator</h2>
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <i class="fas fa-search absolute left-3 top-2.5 text-gray-400"></i>
                        <input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
                    </div>
                    <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center">
                        <i class="fas fa-plus mr-2"></i>
                        New Dataset
                    </button>
                </div>
            </header>

            <!-- Content -->
            <main class="p-6">
                <!-- Stats Cards -->
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
                    <div class="data-card bg-white p-6 rounded-xl shadow-sm border border-gray-100 transition-all">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-gray-500">Total Claims</p>
                                <h3 class="text-2xl font-bold mt-1">25,069</h3>
                            </div>
                            <div class="bg-blue-100 p-3 rounded-lg">
                                <i class="fas fa-file-invoice text-blue-600 text-xl"></i>
                            </div>
                        </div>
                        <div class="mt-4">
                            <div class="flex justify-between text-sm text-gray-500 mb-1">
                                <span>Q3 2024</span>
                                <span>12,534</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2">
                                <div class="bg-blue-600 h-2 rounded-full" style="--progress: 50%"></div>
                            </div>
                            <div class="flex justify-between text-sm text-gray-500 mt-1">
                                <span>Q4 2024</span>
                                <span>12,535</span>
                            </div>
                        </div>
                    </div>

                    <div class="data-card bg-white p-6 rounded-xl shadow-sm border border-gray-100 transition-all">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-gray-500">Claim Distribution</p>
                                <h3 class="text-2xl font-bold mt-1">3 Types</h3>
                            </div>
                            <div class="bg-green-100 p-3 rounded-lg">
                                <i class="fas fa-chart-pie text-green-600 text-xl"></i>
                            </div>
                        </div>
                        <div class="mt-4">
                            <div class="flex justify-between text-sm text-gray-500 mb-1">
                                <span>Motor (60%)</span>
                                <span>15,041</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2">
                                <div class="bg-green-500 h-2 rounded-full" style="--progress: 60%"></div>
                            </div>
                            <div class="flex justify-between text-sm text-gray-500 mt-1">
                                <span>Home (35%)</span>
                                <span>8,774</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2 mt-1">
                                <div class="bg-yellow-500 h-2 rounded-full" style="--progress: 35%"></div>
                            </div>
                            <div class="flex justify-between text-sm text-gray-500 mt-1">
                                <span>Pet (5%)</span>
                                <span>1,253</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2 mt-1">
                                <div class="bg-red-500 h-2 rounded-full" style="--progress: 5%"></div>
                            </div>
                        </div>
                    </div>

                    <div class="data-card bg-white p-6 rounded-xl shadow-sm border border-gray-100 transition-all">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-gray-500">Average Claim Cost</p>
                                <h3 class="text-2xl font-bold mt-1">€1,128</h3>
                            </div>
                            <div class="bg-purple-100 p-3 rounded-lg">
                                <i class="fas fa-euro-sign text-purple-600 text-xl"></i>
                            </div>
                        </div>
                        <div class="mt-4">
                            <div class="flex justify-between text-sm text-gray-500 mb-1">
                                <span>Motor</span>
                                <span>€1,228</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2">
                                <div class="bg-blue-500 h-2 rounded-full" style="--progress: 61%"></div>
                            </div>
                            <div class="flex justify-between text-sm text-gray-500 mt-1">
                                <span>Home</span>
                                <span>€1,026</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2">
                                <div class="bg-green-500 h-2 rounded-full" style="--progress: 51%"></div>
                            </div>
                            <div class="flex justify-between text-sm text-gray-500 mt-1">
                                <span>Pet</span>
                                <span>€350</span>
                            </div>
                            <div class="w-full bg-gray-200 rounded-full h-2">
                                <div class="bg-yellow-500 h-2 rounded-full" style="--progress: 18%"></div>
                            </div>
                        </div>
                    </div>

                    <div class="data-card bg-white p-6 rounded-xl shadow-sm border border-gray-100 transition-all">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-gray-500">Special Cases</p>
                                <h3 class="text-2xl font-bold mt-1">Anomalies</h3>
                            </div>
                            <div class="bg-red-100 p-3 rounded-lg">
                                <i class="fas fa-exclamation-triangle text-red-600 text-xl"></i>
                            </div>
                        </div>
                        <div class="mt-4 space-y-2">
                            <div class="flex items-center text-sm">
                                <span class="w-32 text-gray-500">High Cost (3%)</span>
                                <span class="font-medium">752 cases</span>
                            </div>
                            <div class="flex items-center text-sm">
                                <span class="w-32 text-gray-500">New Policies (2%)</span>
                                <span class="font-medium">501 cases</span>
                            </div>
                            <div class="flex items-center text-sm">
                                <span class="w-32 text-gray-500">Flood Events</span>
                                <span class="font-medium">+10% on 6/7/24</span>
                            </div>
                            <div class="flex items-center text-sm">
                                <span class="w-32 text-gray-500">Natural Disasters</span>
                                <span class="font-medium">12/8/24 spike</span>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Charts Section -->
                <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
                    <!-- Claim Type Distribution -->
                    <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                        <div class="flex justify-between items-center mb-4">
                            <h3 class="font-semibold text-lg">Claim Type Distribution</h3>
                            <select class="border rounded-lg px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
                                <option>Q3 2024</option>
                                <option>Q4 2024</option>
                                <option selected>Full Period</option>
                            </select>
                        </div>
                        <canvas id="claimTypeChart" height="250"></canvas>
                    </div>

                    <!-- Claim Cost Distribution -->
                    <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                        <div class="flex justify-between items-center mb-4">
                            <h3 class="font-semibold text-lg">Claim Cost Distribution</h3>
                            <div class="flex space-x-2">
                                <button class="px-3 py-1 bg-blue-100 text-blue-600 rounded-lg text-sm">Motor</button>
                                <button class="px-3 py-1 bg-gray-100 text-gray-600 rounded-lg text-sm">Home</button>
                                <button class="px-3 py-1 bg-gray-100 text-gray-600 rounded-lg text-sm">Pet</button>
                            </div>
                        </div>
                        <canvas id="costDistributionChart" height="250"></canvas>
                    </div>
                </div>

                <!-- Data Generation Controls -->
                <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100 mb-8">
                    <h3 class="font-semibold text-lg mb-4">Data Generation Parameters</h3>
                    
                    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                        <!-- General Parameters -->
                        <div class="space-y-4">
                            <h4 class="font-medium text-blue-600 flex items-center">
                                <i class="fas fa-sliders-h mr-2"></i>
                                General Parameters
                            </h4>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Total Records</label>
                                <input type="number" value="25069" class="w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Time Period</label>
                                <div class="flex space-x-2">
                                    <select class="flex-1 border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                                        <option>Q3 2024</option>
                                        <option selected>Q3-Q4 2024</option>
                                        <option>Full Year 2024</option>
                                    </select>
                                </div>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Special Events</label>
                                <div class="space-y-2">
                                    <label class="flex items-center">
                                        <input type="checkbox" checked class="mr-2">
                                        <span>Flood on 6/7/2024 (+10%)</span>
                                    </label>
                                    <label class="flex items-center">
                                        <input type="checkbox" checked class="mr-2">
                                        <span>Natural disaster on 12/8/2024</span>
                                    </label>
                                </div>
                            </div>
                        </div>

                        <!-- Claim Type Distribution -->
                        <div class="space-y-4">
                            <h4 class="font-medium text-green-600 flex items-center">
                                <i class="fas fa-percentage mr-2"></i>
                                Claim Distribution
                            </h4>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Motor Insurance</label>
                                <div class="flex items-center">
                                    <input type="range" min="0" max="100" value="60" class="w-full mr-2">
                                    <span class="w-12 text-right">60%</span>
                                </div>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Home Insurance</label>
                                <div class="flex items-center">
                                    <input type="range" min="0" max="100" value="35" class="w-full mr-2">
                                    <span class="w-12 text-right">35%</span>
                                </div>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">Pet Insurance</label>
                                <div class="flex items-center">
                                    <input type="range" min="0" max="100" value="5" class="w-full mr-2">
                                    <span class="w-12 text-right">5%</span>
                                </div>
                            </div>
                        </div>

                        <!-- Advanced Parameters -->
                        <div class="space-y-4">
                            <h4 class="font-medium text-purple-600 flex items-center">
                                <i class="fas fa-cogs mr-2"></i>
                                Advanced Parameters
                            </h4>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">High Cost Claims</label>
                                <div class="flex items-center">
                                    <input type="range" min="0" max="10" value="3" class="w-full mr-2">
                                    <span class="w-12 text-right">3%</span>
                                </div>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">New Policy Claims</label>
                                <div class="flex items-center">
                                    <input type="range" min="0" max="5" value="2" class="w-full mr-2">
                                    <span class="w-12 text-right">2%</span>
                                </div>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">ML Model</label>
                                <select class="w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                                    <option>GAN (Default)</option>
                                    <option>VAE</option>
                                    <option>Autoencoder</option>
                                    <option>Isolation Forest</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="mt-6 flex justify-end space-x-3">
                        <button class="px-4 py-2 border rounded-lg text-gray-700 hover:bg-gray-50">
                            Reset Parameters
                        </button>
                        <button class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 flex items-center">
                            <i class="fas fa-play mr-2"></i>
                            Generate Dataset
                        </button>
                    </div>
                </div>

                <!-- Sample Data Preview -->
                <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                    <div class="flex justify-between items-center mb-4">
                        <h3 class="font-semibold text-lg">Sample Generated Data</h3>
                        <button class="px-3 py-1 bg-gray-100 text-gray-600 rounded-lg text-sm flex items-center">
                            <i class="fas fa-download mr-2"></i>
                            Export CSV
                        </button>
                    </div>
                    <div class="overflow-x-auto">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Claim #</th>
                                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
                                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Subtype</th>
                                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
                                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Cost (€)</th>
                                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Policy</th>
                                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Coverage</th>
                                </tr>
                            </thead>
                            <tbody class="bg-white divide-y divide-gray-200">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">CL-2024-015432</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Motor</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Collision</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">15/07/2024</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1,228</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">POL-98765</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">All Risk</td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">CL-2024-015433</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Home</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Water Leakage</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">06/07/2024</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1,450</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">POL-54321</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Natural Disaster</td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">CL-2024-015434</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Pet</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Vet Visit</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">22/09/2024</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">350</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">POL-12345</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Vet Coverage</td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">CL-2024-015435</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Motor</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Theft</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12/08/2024</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12,500</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">POL-45678</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">All Risk</td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">CL-2024-015436</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Home</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Storm Damage</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12/08/2024</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2,300</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">POL-34567</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Natural Disaster</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <script>
        // Claim Type Distribution Chart
        const claimTypeCtx = document.getElementById('claimTypeChart').getContext('2d');
        const claimTypeChart = new Chart(claimTypeCtx, {
            type: 'doughnut',
            data: {
                labels: ['Motor Insurance', 'Home Insurance', 'Pet Insurance'],
                datasets: [{
                    data: [15041, 8774, 1253],
                    backgroundColor: [
                        '#3B82F6',
                        '#10B981',
                        '#EF4444'
                    ],
                    borderWidth: 0
                }]
            },
            options: {
                responsive: true,
                plugins: {
                    legend: {
                        position: 'bottom',
                    },
                    tooltip: {
                        callbacks: {
                            label: function(context) {
                                let label = context.label || '';
                                if (label) {
                                    label += ': ';
                                }
                                label += context.raw.toLocaleString() + ' (' + Math.round(context.parsed * 100 / context.dataset.data.reduce((a, b) => a + b, 0)) + '%)';
                                return label;
                            }
                        }
                    }
                },
                cutout: '70%'
            }
        });

        // Cost Distribution Chart
        const costDistributionCtx = document.getElementById('costDistributionChart').getContext('2d');
        const costDistributionChart = new Chart(costDistributionCtx, {
            type: 'bar',
            data: {
                labels: ['<500', '500-1000', '1000-5000', '5000-10000', '>10000'],
                datasets: [{
                    label: 'Motor Claims',
                    data: [3500, 6000, 4500, 800, 241],
                    backgroundColor: '#3B82F6',
                    borderWidth: 0
                }]
            },
            options: {
                responsive: true,
                scales: {
                    y: {
                        beginAtZero: true,
                        ticks: {
                            callback: function(value) {
                                return value.toLocaleString();
                            }
                        }
                    }
                },
                plugins: {
                    tooltip: {
                        callbacks: {
                            label: function(context) {
                                let label = context.dataset.label || '';
                                if (label) {
                                    label += ': ';
                                }
                                label += context.raw.toLocaleString() + ' claims';
                                return label;
                            }
                        }
                    }
                }
            }
        });

        // Simulate progress bars animation
        document.addEventListener('DOMContentLoaded', function() {
            const progressBars = document.querySelectorAll('.progress-bar');
            progressBars.forEach(bar => {
                const progress = bar.style.getPropertyValue('--progress');
                bar.style.width = progress;
            });
        });

        // Toggle between motor/home/pet data in cost distribution chart
        const costChartButtons = document.querySelectorAll('#costDistributionChart + div button');
        costChartButtons.forEach(button => {
            button.addEventListener('click', function() {
                costChartButtons.forEach(btn => {
                    btn.classList.remove('bg-blue-100', 'text-blue-600');
                    btn.classList.add('bg-gray-100', 'text-gray-600');
                });
                this.classList.remove('bg-gray-100', 'text-gray-600');
                this.classList.add('bg-blue-100', 'text-blue-600');
                
                // Update chart data based on selection
                const label = this.textContent.trim();
                if (label === 'Motor') {
                    costDistributionChart.data.datasets[0].data = [3500, 6000, 4500, 800, 241];
                    costDistributionChart.data.datasets[0].backgroundColor = '#3B82F6';
                    costDistributionChart.data.datasets[0].label = 'Motor Claims';
                } else if (label === 'Home') {
                    costDistributionChart.data.datasets[0].data = [2000, 4000, 2500, 200, 74];
                    costDistributionChart.data.datasets[0].backgroundColor = '#10B981';
                    costDistributionChart.data.datasets[0].label = 'Home Claims';
                } else if (label === 'Pet') {
                    costDistributionChart.data.datasets[0].data = [800, 300, 150, 3, 0];
                    costDistributionChart.data.datasets[0].backgroundColor = '#EF4444';
                    costDistributionChart.data.datasets[0].label = 'Pet Claims';
                }
                costDistributionChart.update();
            });
        });
    </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=designfailure/insur-claims-datagen" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>