File size: 32,053 Bytes
2683932
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Customs Brokerage Dashboard</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">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#1a56db',
                        secondary: '#1d4ed8',
                        accent: '#3b82f6',
                        success: '#10b981',
                        warning: '#f59e0b',
                        danger: '#ef4444',
                        dark: '#0f172a',
                        light: '#f8fafc'
                    }
                }
            }
        }
    </script>
    <style>
        .scrollbar-hide::-webkit-scrollbar {
            display: none;
        }
        .scrollbar-hide {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        @media (prefers-color-scheme: dark) {
            body {
                background-color: #111827;
                color: #f3f4f6;
            }
        }
    </style>
</head>
<body class="bg-gray-50 text-gray-900 antialiased">
    <!-- Header Section -->
    <header class="bg-white dark:bg-gray-800 shadow-sm py-4 px-6 flex flex-col sm:flex-row items-center justify-between">
        <div class="flex items-center space-x-3 mb-4 sm:mb-0">
            <div class="bg-primary w-10 h-10 rounded-lg flex items-center justify-center">
                <i class="fas fa-ship text-white text-lg"></i>
            </div>
            <h1 class="text-xl font-bold dark:text-white">Customs Brokerage Dashboard</h1>
        </div>
        
        <div class="flex flex-wrap gap-3 items-center justify-center">
            <div class="flex items-center bg-gray-100 dark:bg-gray-700 rounded-lg px-3 py-2">
                <i class="fas fa-calendar text-gray-500 dark:text-gray-400 mr-2"></i>
                <select id="date-range" class="bg-transparent text-sm border-none focus:ring-0">
                    <option>Last 7 Days</option>
                    <option selected>Last 30 Days</option>
                    <option>Month to Date</option>
                    <option>Quarter to Date</option>
                    <option>Year to Date</option>
                    <option>Custom Range</option>
                </select>
            </div>
            
            <div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
                <i class="fas fa-sync-alt mr-2"></i>
                <span>Updated: <span id="last-updated">Now</span></span>
            </div>
            
            <div class="relative">
                <button id="user-menu" class="h-10 w-10 rounded-full bg-primary flex items-center justify-center text-white">
                    <i class="fas fa-user"></i>
                </button>
                <div id="user-dropdown" class="hidden absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded-md shadow-lg py-2 z-20">
                    <a href="#" class="px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 block"><i class="fas fa-user mr-2"></i> Profile</a>
                    <a href="#" class="px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 block"><i class="fas fa-cog mr-2"></i> Settings</a>
                    <a href="#" class="px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 block"><i class="fas fa-sign-out-alt mr-2"></i> Logout</a>
                </div>
            </div>
        </div>
    </header>

    <!-- Main Content -->
    <div class="flex flex-col lg:flex-row p-4 gap-4 min-h-screen">
        <!-- Sidebar Filters -->
        <aside class="w-full lg:w-64 bg-white dark:bg-gray-800 rounded-lg shadow p-4 h-fit lg:sticky lg:top-4">
            <h2 class="text-lg font-semibold mb-4 dark:text-white">Filters</h2>
            
            <div class="space-y-4">
                <div>
                    <label class="block text-sm font-medium mb-1 dark:text-gray-300">Importer/Exporter</label>
                    <div class="relative">
                        <input type="text" placeholder="Search..." class="w-full rounded-lg border-gray-300 dark:bg-gray-700 dark:border-gray-600 px-3 py-2 text-sm">
                    </div>
                </div>
                
                <div>
                    <label class="block text-sm font-medium mb-1 dark:text-gray-300">Port of Entry/Exit</label>
                    <select class="w-full rounded-lg border-gray-300 dark:bg-gray-700 dark:border-gray-600 px-3 py-2 text-sm">
                        <option>All Ports</option>
                        <option>Port of Los Angeles</option>
                        <option>Port of Long Beach</option>
                        <option>Port of New York</option>
                        <option>Port of Savannah</option>
                    </select>
                </div>
                
                <div>
                    <label class="block text-sm font-medium mb-1 dark:text-gray-300">Mode of Transport</label>
                    <div class="space-y-2">
                        <div class="flex items-center">
                            <input type="checkbox" id="air" class="rounded text-primary">
                            <label for="air" class="ml-2 text-sm dark:text-gray-300">Air</label>
                        </div>
                        <div class="flex items-center">
                            <input type="checkbox" id="sea" class="rounded text-primary" checked>
                            <label for="sea" class="ml-2 text-sm dark:text-gray-300">Sea</label>
                        </div>
                        <div class="flex items-center">
                            <input type="checkbox" id="land" class="rounded text-primary">
                            <label for="land" class="ml-2 text-sm dark:text-gray-300">Land</label>
                        </div>
                        <div class="flex items-center">
                            <input type="checkbox" id="rail" class="rounded text-primary" checked>
                            <label for="rail" class="ml-2 text-sm dark:text-gray-300">Rail</label>
                        </div>
                    </div>
                </div>
                
                <div>
                    <label class="block text-sm font-medium mb-1 dark:text-gray-300">Shipment Status</label>
                    <select class="w-full rounded-lg border-gray-300 dark:bg-gray-700 dark:border-gray-600 px-3 py-2 text-sm">
                        <option>All Statuses</option>
                        <option>Pending Clearance</option>
                        <option>Cleared</option>
                        <option>Under Examination</option>
                        <option>Delayed</option>
                        <option>Released</option>
                    </select>
                </div>
                
                <div>
                    <label class="block text-sm font-medium mb-1 dark:text-gray-300">HS Code Category</label>
                    <select class="w-full rounded-lg border-gray-300 dark:bg-gray-700 dark:border-gray-600 px-3 py-2 text-sm">
                        <option>All Categories</option>
                        <option>Machinery & Electronics</option>
                        <option>Textiles & Apparel</option>
                        <option>Automotive Parts</option>
                        <option>Food Products</option>
                    </select>
                </div>
                
                <div>
                    <label class="block text-sm font-medium mb-1 dark:text-gray-300">Broker/Agent</label>
                    <select class="w-full rounded-lg border-gray-300 dark:bg-gray-700 dark:border-gray-600 px-3 py-2 text-sm">
                        <option>All Brokers</option>
                        <option>Global Shipping Co</option>
                        <option>Oceanwide Logistics</option>
                        <option>Continent Express</option>
                    </select>
                </div>
                
                <button class="w-full bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200 rounded-lg py-2 text-sm font-medium hover:bg-gray-300 dark:hover:bg-gray-600">
                    <i class="fas fa-times mr-2"></i> Clear All Filters
                </button>
            </div>
        </aside>

        <!-- Dashboard Content -->
        <main class="flex-1">
            <!-- KPI Scorecards -->
            <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-4">
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-5 border-l-4 border-primary">
                    <p class="text-gray-500 dark:text-gray-400 text-sm">Total Shipments</p>
                    <div class="flex items-end justify-between mt-2">
                        <h3 class="text-2xl font-bold dark:text-white">1,247</h3>
                        <div class="flex items-center text-success text-sm font-semibold">
                            <i class="fas fa-arrow-up mr-1"></i> 12.5%
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-5 border-l-4 border-secondary">
                    <p class="text-gray-500 dark:text-gray-400 text-sm">Total Declared Value</p>
                    <div class="flex items-end justify-between mt-2">
                        <h3 class="text-2xl font-bold dark:text-white">$5.2M</h3>
                        <div class="flex items-center text-success text-sm font-semibold">
                            <i class="fas fa-arrow-up mr-1"></i> 8.3%
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-5 border-l-4 border-accent">
                    <p class="text-gray-500 dark:text-gray-400 text-sm">Duties & Taxes Paid</p>
                    <div class="flex items-end justify-between mt-2">
                        <h3 class="text-2xl font-bold dark:text-white">$780K</h3>
                        <div class="flex items-center text-danger text-sm font-semibold">
                            <i class="fas fa-arrow-down mr-1"></i> 2.1%
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-5 border-l-4 border-success">
                    <p class="text-gray-500 dark:text-gray-400 text-sm">Avg. Clearance Time</p>
                    <div class="flex items-end justify-between mt-2">
                        <h3 class="text-2xl font-bold dark:text-white">48h</h3>
                        <div class="flex items-center text-success text-sm font-semibold">
                            <i class="fas fa-arrow-down mr-1"></i> 10.2%
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-5 border-l-4 border-warning">
                    <p class="text-gray-500 dark:text-gray-400 text-sm">Compliance Rate</p>
                    <div class="flex items-end justify-between mt-2">
                        <h3 class="text-2xl font-bold dark:text-white">98.4%</h3>
                        <div class="flex items-center text-success text-sm font-semibold">
                            <i class="fas fa-arrow-up mr-1"></i> 1.5%
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-5 border-l-4 border-danger">
                    <p class="text-gray-500 dark:text-gray-400 text-sm">Shipments on Hold</p>
                    <div class="flex items-end justify-between mt-2">
                        <h3 class="text-2xl font-bold dark:text-white">15</h3>
                        <div class="flex items-center text-danger text-sm font-semibold">
                            <i class="fas fa-arrow-up mr-1"></i> 15%
                        </div>
                    </div>
                </div>
            </div>

            <!-- Charts Section -->
            <div class="grid grid-cols-1 lg:grid-cols-2 gap-4 mb-4">
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                    <div class="flex justify-between items-center mb-4">
                        <h3 class="font-semibold dark:text-white">Shipments by Status</h3>
                        <button class="text-xs bg-gray-100 dark:bg-gray-700 rounded-full px-3 py-1">
                            <i class="fas fa-download mr-1"></i> Export
                        </button>
                    </div>
                    <div class="h-64">
                        <canvas id="statusChart"></canvas>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                    <div class="flex justify-between items-center mb-4">
                        <h3 class="font-semibold dark:text-white">Duties & Taxes by Month</h3>
                        <button class="text-xs bg-gray-100 dark:bg-gray-700 rounded-full px-3 py-1">
                            <i class="fas fa-download mr-1"></i> Export
                        </button>
                    </div>
                    <div class="h-64">
                        <canvas id="dutiesChart"></canvas>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                    <div class="flex justify-between items-center mb-4">
                        <h3 class="font-semibold dark:text-white">Volume & Clearance Time</h3>
                        <button class="text-xs bg-gray-100 dark:bg-gray-700 rounded-full px-3 py-1">
                            <i class="fas fa-download mr-1"></i> Export
                        </button>
                    </div>
                    <div class="h-64">
                        <canvas id="volumeChart"></canvas>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                    <div class="flex justify-between items-center mb-4">
                        <h3 class="font-semibold dark:text-white">Top Importers by Value</h3>
                        <button class="text-xs bg-gray-100 dark:bg-gray-700 rounded-full px-3 py-1">
                            <i class="fas fa-download mr-1"></i> Export
                        </button>
                    </div>
                    <div class="h-64">
                        <canvas id="importersChart"></canvas>
                    </div>
                </div>
            </div>

            <!-- Data Table -->
            <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                <div class="flex flex-col md:flex-row md:items-center justify-between mb-4">
                    <h3 class="font-semibold dark:text-white mb-2 md:mb-0">Detailed Shipment Data</h3>
                    <div class="flex space-x-2">
                        <div class="relative">
                            <input type="text" placeholder="Search..." class="rounded-lg border-gray-300 dark:bg-gray-700 dark:border-gray-600 px-3 py-1 text-sm">
                            <i class="fas fa-search absolute right-3 top-2 text-gray-400"></i>
                        </div>
                        <button class="bg-gray-100 dark:bg-gray-700 rounded-lg px-3 py-1 text-sm">
                            <i class="fas fa-columns mr-1"></i> Columns
                        </button>
                        <button class="bg-primary text-white rounded-lg px-3 py-1 text-sm">
                            <i class="fas fa-download mr-1"></i> CSV
                        </button>
                    </div>
                </div>
                
                <div class="overflow-x-auto">
                    <table class="w-full table-auto">
                        <thead class="bg-gray-100 dark:bg-gray-700">
                            <tr>
                                <th class="text-left py-3 px-4 text-xs font-semibold uppercase text-gray-500 dark:text-gray-400">Shipment ID <i class="fas fa-sort ml-1 text-gray-400"></i></th>
                                <th class="text-left py-3 px-4 text-xs font-semibold uppercase text-gray-500 dark:text-gray-400">Entry Date <i class="fas fa-sort ml-1 text-gray-400"></i></th>
                                <th class="text-left py-3 px-4 text-xs font-semibold uppercase text-gray-500 dark:text-gray-400">Importer</th>
                                <th class="text-left py-3 px-4 text-xs font-semibold uppercase text-gray-500 dark:text-gray-400">Port</th>
                                <th class="text-left py-3 px-4 text-xs font-semibold uppercase text-gray-500 dark:text-gray-400">Declared Value <i class="fas fa-sort ml-1 text-gray-400"></i></th>
                                <th class="text-left py-3 px-4 text-xs font-semibold uppercase text-gray-500 dark:text-gray-400">Duty Paid</th>
                                <th class="text-left py-3 px-4 text-xs font-semibold uppercase text-gray-500 dark:text-gray-400">Status</th>
                                <th class="text-left py-3 px-4 text-xs font-semibold uppercase text-gray-500 dark:text-gray-400">Action</th>
                            </tr>
                        </thead>
                        <tbody class="divide-y divide-gray-200 dark:divide-gray-700">
                            <tr class="hover:bg-gray-50 dark:hover:bg-gray-900">
                                <td class="py-3 px-4 text-sm font-medium dark:text-white">SHP-10234</td>
                                <td class="py-3 px-4 text-sm">04/15/2023</td>
                                <td class="py-3 px-4 text-sm">Globex Corp</td>
                                <td class="py-3 px-4 text-sm">Los Angeles</td>
                                <td class="py-3 px-4 text-sm">$125,000</td>
                                <td class="py-3 px-4 text-sm">$14,250</td>
                                <td class="py-3 px-4"><span class="bg-success text-white text-xs px-2 py-1 rounded-full">Cleared</span></td>
                                <td class="py-3 px-4 text-sm"><button class="text-primary hover:underline">View</button></td>
                            </tr>
                            <tr class="hover:bg-gray-50 dark:hover:bg-gray-900">
                                <td class="py-3 px-4 text-sm font-medium dark:text-white">SHP-10235</td>
                                <td class="py-3 px-4 text-sm">04/18/2023</td>
                                <td class="py-3 px-4 text-sm">Acme Inc</td>
                                <td class="py-3 px-4 text-sm">New York</td>
                                <td class="py-3 px-4 text-sm">$89,500</td>
                                <td class="py-3 px-4 text-sm">$8,350</td>
                                <td class="py-3 px-4"><span class="bg-warning text-white text-xs px-2 py-1 rounded-full">Pending</span></td>
                                <td class="py-3 px-4 text-sm"><button class="text-primary hover:underline">View</button></td>
                            </tr>
                            <tr class="hover:bg-gray-50 dark:hover:bg-gray-900">
                                <td class="py-3 px-4 text-sm font-medium dark:text-white">SHP-10236</td>
                                <td class="py-3 px-4 text-sm">04/20/2023</td>
                                <td class="py-3 px-4 text-sm">Wayne Ent</td>
                                <td class="py-3 px-4 text-sm">Savannah</td>
                                <td class="py-3 px-4 text-sm">$225,000</td>
                                <td class="py-3 px-4 text-sm">$28,750</td>
                                <td class="py-3 px-4"><span class="bg-danger text-white text-xs px-2 py-1 rounded-full">Delayed</span></td>
                                <td class="py-3 px-4 text-sm"><button class="text-primary hover:underline">View</button></td>
                            </tr>
                            <tr class="hover:bg-gray-50 dark:hover:bg-gray-900">
                                <td class="py-3 px-4 text-sm font-medium dark:text-white">SHP-10237</td>
                                <td class="py-3 px-4 text-sm">04/22/2023</td>
                                <td class="py-3 px-4 text-sm">Stark Ind</td>
                                <td class="py-3 px-4 text-sm">Long Beach</td>
                                <td class="py-3 px-4 text-sm">$345,000</td>
                                <td class="py-3 px-4 text-sm">$42,500</td>
                                <td class="py-3 px-4"><span class="bg-secondary text-white text-xs px-2 py-1 rounded-full">Under Examination</span></td>
                                <td class="py-3 px-4 text-sm"><button class="text-primary hover:underline">View</button></td>
                            </tr>
                            <tr class="hover:bg-gray-50 dark:hover:bg-gray-900">
                                <td class="py-3 px-4 text-sm font-medium dark:text-white">SHP-10238</td>
                                <td class="py-3 px-4 text-sm">04/24/2023</td>
                                <td class="py-3 px-4 text-sm">Initech Co</td>
                                <td class="py-3 px-4 text-sm">Miami</td>
                                <td class="py-3 px-4 text-sm">$78,200</td>
                                <td class="py-3 px-4 text-sm">$9,100</td>
                                <td class="py-3 px-4"><span class="bg-success text-white text-xs px-2 py-1 rounded-full">Cleared</span></td>
                                <td class="py-3 px-4 text-sm"><button class="text-primary hover:underline">View</button></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                
                <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between mt-4">
                    <div class="mb-4 sm:mb-0">
                        <p class="text-sm text-gray-600 dark:text-gray-400">Showing <span class="font-medium">1</span> to <span class="font-medium">5</span> of <span class="font-medium">1247</span> entries</p>
                    </div>
                    <div>
                        <nav class="flex">
                            <a href="#" class="mr-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-3 py-1 text-sm"><i class="fas fa-chevron-left"></i></a>
                            <a href="#" class="mr-1 rounded border border-gray-300 dark:border-gray-600 bg-primary text-white px-3 py-1 text-sm">1</a>
                            <a href="#" class="mr-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-3 py-1 text-sm">2</a>
                            <a href="#" class="mr-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-3 py-1 text-sm">3</a>
                            <a href="#" class="mr-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-3 py-1 text-sm">4</a>
                            <a href="#" class="mr-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-3 py-1 text-sm"><i class="fas fa-chevron-right"></i></a>
                        </nav>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <script>
        // Toggle user dropdown
        document.getElementById('user-menu').addEventListener('click', function() {
            const dropdown = document.getElementById('user-dropdown');
            dropdown.classList.toggle('hidden');
        });

        // Close dropdown when clicking away
        document.addEventListener('click', function(event) {
            const dropdown = document.getElementById('user-dropdown');
            const userMenu = document.getElementById('user-menu');
            if (!userMenu.contains(event.target) && !dropdown.contains(event.target)) {
                dropdown.classList.add('hidden');
            }
        });

        // Initialize charts
        document.addEventListener('DOMContentLoaded', function() {
            // Shipment Status Chart
            const statusCtx = document.getElementById('statusChart').getContext('2d');
            const statusChart = new Chart(statusCtx, {
                type: 'doughnut',
                data: {
                    labels: ['Cleared', 'Pending', 'Under Examination', 'Delayed', 'Released'],
                    datasets: [{
                        data: [52, 28, 12, 5, 3],
                        backgroundColor: [
                            '#10b981',
                            '#3b82f6',
                            '#f59e0b',
                            '#ef4444',
                            '#8b5cf6'
                        ],
                        borderWidth: 0
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        legend: {
                            position: 'right',
                            labels: {
                                font: {
                                    size: 10
                                },
                                padding: 15
                            }
                        }
                    }
                }
            });

            // Duties by Month Chart
            const dutiesCtx = document.getElementById('dutiesChart').getContext('2d');
            const dutiesChart = new Chart(dutiesCtx, {
                type: 'bar',
                data: {
                    labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
                    datasets: [{
                        label: 'Duties & Taxes ($)',
                        data: [120, 145, 130, 155, 140, 160, 150],
                        backgroundColor: '#3b82f6',
                        borderRadius: 3
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        y: {
                            beginAtZero: true,
                            ticks: {
                                callback: function(value) {
                                    return '$' + value + 'K';
                                }
                            }
                        }
                    },
                    plugins: {
                        legend: {
                            display: false
                        }
                    }
                }
            });

            // Volume & Clearance Chart
            const volumeCtx = document.getElementById('volumeChart').getContext('2d');
            const volumeChart = new Chart(volumeCtx, {
                type: 'bar',
                data: {
                    labels: ['Week 1', 'Week 2', 'Week 3', 'Week 4'],
                    datasets: [
                        {
                            type: 'bar',
                            label: 'Shipment Volume',
                            data: [120, 145, 130, 160],
                            backgroundColor: '#1d4ed8',
                            borderRadius: 3,
                            yAxisID: 'y'
                        },
                        {
                            type: 'line',
                            label: 'Avg. Clearance Time',
                            data: [48, 44, 40, 42],
                            borderColor: '#ef4444',
                            backgroundColor: '#ef4444',
                            borderWidth: 3,
                            yAxisID: 'y1'
                        }
                    ]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        y: {
                            beginAtZero: true,
                            title: {
                                display: true,
                                text: 'Shipment Volume'
                            },
                            position: 'left'
                        },
                        y1: {
                            beginAtZero: true,
                            title: {
                                display: true,
                                text: 'Hours'
                            },
                            position: 'right',
                            grid: {
                                drawOnChartArea: false
                            }
                        }
                    },
                    plugins: {
                        legend: {
                            position: 'top'
                        }
                    }
                }
            });

            // Top Importers Chart
            const importersCtx = document.getElementById('importersChart').getContext('2d');
            const importersChart = new Chart(importersCtx, {
                type: 'bar',
                data: {
                    labels: ['Globex Corp', 'Wayne Ent', 'Stark Ind', 'Initech Co', 'Acme Inc'],
                    datasets: [{
                        label: 'Declared Value ($)',
                        data: [850, 720, 680, 450, 420],
                        backgroundColor: '#10b981',
                        borderRadius: 3
                    }]
                },
                options: {
                    indexAxis: 'y',
                    responsive: true,
                    maintainAspectRatio: false,
                    scales: {
                        x: {
                            beginAtZero: true,
                            ticks: {
                                callback: function(value) {
                                    return '$' + value + 'K';
                                }
                            }
                        }
                    },
                    plugins: {
                        legend: {
                            display: false
                        }
                    }
                }
            });

            // Update timestamp every 5 minutes
            setInterval(updateTimestamp, 300000);
            function updateTimestamp() {
                const now = new Date();
                document.getElementById('last-updated').textContent = 
                    now.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
            }
        });
    </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=anonymous111110987654321/wireframe-dashboard-test1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>