agenticlogistics commited on
Commit
02ef2f9
·
verified ·
1 Parent(s): 4db70ad

undefined - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +859 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Ftz Analysis Optimization
3
- emoji: 🚀
4
- colorFrom: purple
5
- colorTo: yellow
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: ftz-analysis-optimization
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,859 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>XYZ Cosmetics – FTZ Analysis & Optimization Studio</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
9
+ <script src="https://unpkg.com/tabulator-tables@5.4.4/dist/js/tabulator.min.js"></script>
10
+ <link href="https://unpkg.com/tabulator-tables@5.4.4/dist/css/tabulator.min.css" rel="stylesheet">
11
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
12
+ <style>
13
+ :root {
14
+ --primary: #4f46e5;
15
+ --primary-dark: #4338ca;
16
+ --secondary: #10b981;
17
+ --accent: #f59e0b;
18
+ --dark: #1e293b;
19
+ --light: #f8fafc;
20
+ --danger: #ef4444;
21
+ --gray: #94a3b8;
22
+ }
23
+
24
+ body {
25
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
26
+ background-color: #f1f5f9;
27
+ color: #1e293b;
28
+ }
29
+
30
+ .sidebar {
31
+ background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
32
+ transition: all 0.3s ease;
33
+ }
34
+
35
+ .tab-content {
36
+ display: none;
37
+ }
38
+
39
+ .tab-content.active {
40
+ display: block;
41
+ }
42
+
43
+ .chart-container {
44
+ background: white;
45
+ border-radius: 0.5rem;
46
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
47
+ padding: 1.5rem;
48
+ margin-bottom: 1.5rem;
49
+ }
50
+
51
+ .kpi-tile {
52
+ background: white;
53
+ border-radius: 0.5rem;
54
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
55
+ padding: 1.25rem;
56
+ transition: transform 0.2s ease;
57
+ }
58
+
59
+ .kpi-tile:hover {
60
+ transform: translateY(-3px);
61
+ }
62
+
63
+ .tab-button {
64
+ position: relative;
65
+ padding: 0.75rem 1rem;
66
+ font-weight: 500;
67
+ color: #64748b;
68
+ transition: all 0.3s ease;
69
+ }
70
+
71
+ .tab-button.active {
72
+ color: var(--primary);
73
+ }
74
+
75
+ .tab-button.active::after {
76
+ content: '';
77
+ position: absolute;
78
+ bottom: 0;
79
+ left: 0;
80
+ right: 0;
81
+ height: 3px;
82
+ background-color: var(--primary);
83
+ border-radius: 3px 3px 0 0;
84
+ }
85
+
86
+ .scenario-card {
87
+ border: 1px solid #e2e8f0;
88
+ border-radius: 0.5rem;
89
+ transition: all 0.3s ease;
90
+ }
91
+
92
+ .scenario-card:hover {
93
+ border-color: var(--primary);
94
+ box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.1);
95
+ }
96
+
97
+ .scenario-card.active {
98
+ border-color: var(--primary);
99
+ box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.15), 0 4px 6px -2px rgba(79, 70, 229, 0.05);
100
+ }
101
+
102
+ .table-container {
103
+ background: white;
104
+ border-radius: 0.5rem;
105
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
106
+ overflow: hidden;
107
+ }
108
+
109
+ .tooltip {
110
+ position: relative;
111
+ }
112
+
113
+ .tooltip:hover::after {
114
+ content: attr(data-tooltip);
115
+ position: absolute;
116
+ bottom: 100%;
117
+ left: 50%;
118
+ transform: translateX(-50%);
119
+ background: rgba(30, 41, 59, 0.9);
120
+ color: white;
121
+ padding: 0.5rem;
122
+ border-radius: 0.25rem;
123
+ font-size: 0.875rem;
124
+ white-space: nowrap;
125
+ z-index: 10;
126
+ }
127
+
128
+ .sparkline {
129
+ height: 40px;
130
+ }
131
+
132
+ .slider-container {
133
+ padding: 1rem;
134
+ background: white;
135
+ border-radius: 0.5rem;
136
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
137
+ }
138
+
139
+ .footer {
140
+ background: #0f172a;
141
+ color: #94a3b8;
142
+ font-size: 0.875rem;
143
+ }
144
+
145
+ @media (max-width: 768px) {
146
+ .sidebar {
147
+ position: fixed;
148
+ top: 0;
149
+ left: -100%;
150
+ height: 100%;
151
+ z-index: 100;
152
+ }
153
+
154
+ .sidebar.active {
155
+ left: 0;
156
+ }
157
+
158
+ .mobile-overlay {
159
+ display: none;
160
+ position: fixed;
161
+ top: 0;
162
+ left: 0;
163
+ right: 0;
164
+ bottom: 0;
165
+ background: rgba(0, 0, 0, 0.5);
166
+ z-index: 99;
167
+ }
168
+
169
+ .mobile-overlay.active {
170
+ display: block;
171
+ }
172
+ }
173
+ </style>
174
+ </head>
175
+ <body class="min-h-screen">
176
+ <!-- Mobile Overlay -->
177
+ <div class="mobile-overlay" id="mobileOverlay"></div>
178
+
179
+ <!-- Main Layout Container -->
180
+ <div class="flex flex-col md:flex-row">
181
+ <!-- Sidebar -->
182
+ <div class="sidebar md:static z-50 w-64 flex flex-col shadow-lg h-screen md:h-auto" id="sidebar">
183
+ <div class="p-5">
184
+ <h1 class="text-white text-xl font-bold">XYZ Cosmetics</h1>
185
+ <p class="text-gray-300 text-sm">FTZ Analysis Studio</p>
186
+ </div>
187
+
188
+ <div class="px-4 py-3">
189
+ <h2 class="text-gray-300 text-xs uppercase font-semibold tracking-wider mb-2">Global Filters</h2>
190
+
191
+ <div class="mb-4">
192
+ <label class="block text-gray-300 text-xs mb-1">Date Range</label>
193
+ <div class="grid grid-cols-2 gap-2">
194
+ <select class="w-full bg-slate-800 text-white text-sm rounded p-2">
195
+ <option>2023-01</option>
196
+ <option>2026-12</option>
197
+ </select>
198
+ <select class="w-full bg-slate-800 text-white text-sm rounded p-2">
199
+ <option>2026-12</option>
200
+ <option>2023-01</option>
201
+ </select>
202
+ </div>
203
+ </div>
204
+
205
+ <div class="mb-4">
206
+ <label class="block text-gray-300 text-xs mb-1">Product Family</label>
207
+ <div class="grid grid-cols-2 gap-2">
208
+ <label class="flex items-center text-white text-sm">
209
+ <input type="checkbox" class="mr-2 rounded text-indigo-500">
210
+ <span>Skincare</span>
211
+ </label>
212
+ <label class="flex items-center text-white text-sm">
213
+ <input type="checkbox" class="mr-2 rounded text-indigo-500" checked>
214
+ <span>Makeup</span>
215
+ </label>
216
+ <label class="flex items-center text-white text-sm">
217
+ <input type="checkbox" class="mr-2 rounded text-indigo-500" checked>
218
+ <span>Fragrance</span>
219
+ </label>
220
+ <label class="flex items-center text-white text-sm">
221
+ <input type="checkbox" class="mr-2 rounded text-indigo-500">
222
+ <span>Haircare</span>
223
+ </label>
224
+ </div>
225
+ </div>
226
+
227
+ <div class="mb-4">
228
+ <label class="block text-gray-300 text-xs mb-1">HS Codes</label>
229
+ <div class="space-y-1 max-h-40 overflow-y-auto">
230
+ <label class="flex items-center text-white text-sm">
231
+ <input type="checkbox" class="mr-2 rounded text-indigo-500" checked>
232
+ <span>3304 - Beauty/Makeup</span>
233
+ </label>
234
+ <label class="flex items-center text-white text-sm">
235
+ <input type="checkbox" class="mr-2 rounded text-indigo-500">
236
+ <span>3305 - Hair Products</span>
237
+ </label>
238
+ <label class="flex items-center text-white text-sm">
239
+ <input type="checkbox" class="mr-2 rounded text-indigo-500" checked>
240
+ <span>3307 - Perfumes</span>
241
+ </label>
242
+ <label class="flex items-center text-white text-sm">
243
+ <input type="checkbox" class="mr-2 rounded text-indigo-500">
244
+ <span>4202 - Cosmetic Bags</span>
245
+ </label>
246
+ <label class="flex items-center text-white text-sm">
247
+ <input type="checkbox" class="mr-2 rounded text-indigo-500">
248
+ <span>3923 - Packaging</span>
249
+ </label>
250
+ </div>
251
+ </div>
252
+
253
+ <div class="mb-4">
254
+ <label class="block text-gray-300 text-xs mb-1">Supplier Country</label>
255
+ <select class="w-full bg-slate-800 text-white text-sm rounded p-2">
256
+ <option>All Countries</option>
257
+ <option>France</option>
258
+ <option>Italy</option>
259
+ <option>Spain</option>
260
+ <option>China</option>
261
+ <option>South Korea</option>
262
+ </select>
263
+ </div>
264
+ </div>
265
+
266
+ <div class="px-4 py-3 mt-auto">
267
+ <button class="w-full bg-indigo-600 hover:bg-indigo-700 text-white py-2 rounded-md text-sm font-medium transition">
268
+ Apply Filters
269
+ </button>
270
+ </div>
271
+ </div>
272
+
273
+ <!-- Main Content -->
274
+ <div class="md:ml-64">
275
+ <!-- Top Navigation -->
276
+ <nav class="bg-white shadow-sm p-4 flex justify-between items-center">
277
+ <div class="flex items-center">
278
+ <button id="sidebarToggle" class="md:hidden text-gray-500 mr-4">
279
+ <i class="fas fa-bars"></i>
280
+ </button>
281
+ <h2 class="text-xl font-semibold">FTZ Analysis & Optimization</h2>
282
+ </div>
283
+
284
+ <div class="flex items-center space-x-3">
285
+ <select class="border border-gray-300 rounded-md text-sm p-2">
286
+ <option>Standard Entry</option>
287
+ <option selected>FTZ - Baseline</option>
288
+ <option>FTZ - Privileged Foreign</option>
289
+ <option>FTZ - Inverted Tariff</option>
290
+ <option>Bonded Warehouse</option>
291
+ </select>
292
+ <button class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-md text-sm font-medium">
293
+ Run Scenario
294
+ </button>
295
+ <button class="border border-gray-300 hover:bg-gray-50 px-4 py-2 rounded-md text-sm font-medium">
296
+ Reset
297
+ </button>
298
+ <button class="border border-gray-300 hover:bg-gray-50 px-4 py-2 rounded-md text-sm font-medium">
299
+ Regenerate Data
300
+ </button>
301
+ <select class="border border-gray-300 rounded-md text-sm p-2">
302
+ <option>USD</option>
303
+ <option>EUR</option>
304
+ <option>JPY</option>
305
+ <option>KRW</option>
306
+ </select>
307
+ </div>
308
+ </nav>
309
+
310
+ <!-- Tabs -->
311
+ <div class="border-b border-gray-200 bg-white">
312
+ <div class="flex overflow-x-auto px-4">
313
+ <button class="tab-button active" data-tab="overview">Overview</button>
314
+ <button class="tab-button" data-tab="inventory">Inventory & Flows</button>
315
+ <button class="tab-button" data-tab="duty">Duty & Fees</button>
316
+ <button class="tab-button" data-tab="comparison">FTZ vs. Alternatives</button>
317
+ <button class="tab-button" data-tab="optimization">Optimization Lab</button>
318
+ <button class="tab-button" data-tab="compliance">Compliance & Risk</button>
319
+ <button class="tab-button" data-tab="about">About</button>
320
+ </div>
321
+ </div>
322
+
323
+ <!-- Tab Content -->
324
+ <div class="p-4 md:p-6">
325
+ <!-- Overview Tab -->
326
+ <div id="tab-overview" class="tab-content active">
327
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
328
+ <div class="kpi-tile">
329
+ <div class="flex justify-between items-start">
330
+ <div>
331
+ <h3 class="text-gray-500 text-sm font-medium">Total Duty Paid YTD</h3>
332
+ <p class="text-2xl font-bold mt-1">$2.4M</p>
333
+ </div>
334
+ <div class="bg-green-100 p-2 rounded-full">
335
+ <i class="fas fa-arrow-down text-green-600"></i>
336
+ </div>
337
+ </div>
338
+ <p class="text-green-600 text-sm mt-2">
339
+ <i class="fas fa-arrow-down"></i> 12.3% vs Standard Entry
340
+ </p>
341
+ </div>
342
+
343
+ <div class="kpi-tile">
344
+ <div class="flex justify-between items-start">
345
+ <div>
346
+ <h3 class="text-gray-500 text-sm font-medium">MPF/HMF Fees YTD</h3>
347
+ <p class="text-2xl font-bold mt-1">$185K</p>
348
+ </div>
349
+ <div class="bg-green-100 p-2 rounded-full">
350
+ <i class="fas fa-arrow-down text-green-600"></i>
351
+ </div>
352
+ </div>
353
+ <p class="text-green-600 text-sm mt-2">
354
+ <i class="fas fa-arrow-down"></i> 28.7% vs Standard Entry
355
+ </p>
356
+ </div>
357
+
358
+ <div class="kpi-tile">
359
+ <div class="flex justify-between items-start">
360
+ <div>
361
+ <h3 class="text-gray-500 text-sm font-medium">Avg Landed Cost/Unit</h3>
362
+ <p class="text-2xl font-bold mt-1">$8.45</p>
363
+ </div>
364
+ <div class="bg-blue-100 p-2 rounded-full">
365
+ <i class="fas fa-dollar-sign text-blue-600"></i>
366
+ </div>
367
+ </div>
368
+ <p class="text-blue-600 text-sm mt-2">
369
+ <i class="fas fa-equals"></i> Standard Entry: $9.12
370
+ </p>
371
+ </div>
372
+
373
+ <div class="kpi-tile">
374
+ <div class="flex justify-between items-start">
375
+ <div>
376
+ <h3 class="text-gray-500 text-sm font-medium">Gross Margin %</h3>
377
+ <p class="text-2xl font-bold mt-1">64.2%</p>
378
+ </div>
379
+ <div class="bg-green-100 p-2 rounded-full">
380
+ <i class="fas fa-chart-line text-green-600"></i>
381
+ </div>
382
+ </div>
383
+ <p class="text-green-600 text-sm mt-2">
384
+ <i class="fas fa-arrow-up"></i> +3.2% vs Standard Entry
385
+ </p>
386
+ </div>
387
+ </div>
388
+
389
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
390
+ <div class="chart-container">
391
+ <h3 class="text-lg font-semibold mb-4">Duty and Fees by HS Code</h3>
392
+ <div id="duty-chart" class="h-80"></div>
393
+ </div>
394
+
395
+ <div class="chart-container">
396
+ <h3 class="text-lg font-semibold mb-4">Monthly Duty/Feet Trend</h3>
397
+ <div id="monthly-chart" class="h-80"></div>
398
+ </div>
399
+ </div>
400
+
401
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mt-6">
402
+ <div class="chart-container">
403
+ <h3 class="text-lg font-semibold mb-4">Cost Composition</h3>
404
+ <div id="cost-chart" class="h-80"></div>
405
+ </div>
406
+
407
+ <div class="table-container">
408
+ <h3 class="text-lg font-semibold p-4">Top Savings Opportunities</h3>
409
+ <div id="top-skus-table" class="p-4"></div>
410
+ </div>
411
+ </div>
412
+ </div>
413
+
414
+ <!-- Comparison Tab -->
415
+ <div id="tab-comparison" class="tab-content">
416
+ <div class="mb-6">
417
+ <h2 class="text-xl font-semibold mb-4">Scenario Comparison</h2>
418
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4">
419
+ <div class="scenario-card p-4 cursor-pointer active">
420
+ <div class="flex justify-between items-start">
421
+ <h3 class="text-lg font-semibold">Standard Entry</h3>
422
+ <span class="text-gray-400">$0</span>
423
+ </div>
424
+ <p class="text-gray-500 text-sm mt-1">Base reference scenario</p>
425
+ <div class="mt-3">
426
+ <div class="text-2xl font-bold">$12.8M</div>
427
+ <p class="text-gray-500 text-sm">Total Cost</p>
428
+ </div>
429
+ </div>
430
+
431
+ <div class="scenario-card p-4 cursor-pointer">
432
+ <div class="flex justify-between items-start">
433
+ <h3 class="text-lg font-semibold">FTZ - Baseline</h3>
434
+ <span class="text-green-500">-$1.2M</span>
435
+ </div>
436
+ <p class="text-gray-500 text-sm mt-1">Deferred duty, weekly entry</p>
437
+ <div class="mt-3">
438
+ <div class="text-2xl font-bold text-green-600">$11.6M</div>
439
+ <p class="text-gray-500 text-sm">Total Cost</p>
440
+ </div>
441
+ </div>
442
+
443
+ <div class="scenario-card p-4 cursor-pointer">
444
+ <div class="flex justify-between items-start">
445
+ <h3 class="text-lg font-semibold">FTZ - Privileged Foreign</h3>
446
+ <span class="text-green-500">-$1.8M</span>
447
+ </div>
448
+ <p class="text-gray-500 text-sm mt-1">Locked duty rates</p>
449
+ <div class="mt-3">
450
+ <div class="text-2xl font-bold text-green-600">$11.0M</div>
451
+ <p class="text-gray-500 text-sm">Total Cost</p>
452
+ </div>
453
+ </div>
454
+
455
+ <div class="scenario-card p-4 cursor-pointer">
456
+ <div class="flex justify-between items-start">
457
+ <h3 class="text-lg font-semibold">FTZ - Inverted Tariff</h3>
458
+ <span class="text-green-500">-$2.1M</span>
459
+ </div>
460
+ <p class="text-gray-500 text-sm mt-1">Lower finished good rates</p>
461
+ <div class="mt-3">
462
+ <div class="text-2xl font-bold text-green-600">$10.7M</div>
463
+ <p class="text-gray-500 text-sm">Total Cost</p>
464
+ </div>
465
+ </div>
466
+
467
+ <div class="scenario-card p-4 cursor-pointer">
468
+ <div class="flex justify-between items-start">
469
+ <h3 class="text-lg font-semibold">Bonded Warehouse</h3>
470
+ <span class="text-green-500">-$950K</span>
471
+ </div>
472
+ <p class="text-gray-500 text-sm mt-1">Postponed payment</p>
473
+ <div class="mt-3">
474
+ <div class="text-2xl font-bold text-green-600">$11.9M</div>
475
+ <p class="text-gray-500 text-sm">Total Cost</p>
476
+ </div>
477
+ </div>
478
+ </div>
479
+ </div>
480
+
481
+ <div class="chart-container">
482
+ <h3 class="text-lg font-semibold mb-4">Cost Comparison (Millions $)</h3>
483
+ <div id="comparison-chart" class="h-96"></div>
484
+ </div>
485
+
486
+ <div class="table-container mt-6">
487
+ <h3 class="text-lg font-semibold p-4">Decision Matrix</h3>
488
+ <div class="p-4">
489
+ <table class="min-w-full divide-y divide-gray-200">
490
+ <thead class="bg-gray-50">
491
+ <tr>
492
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Factor</th>
493
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Standard Entry</th>
494
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">FTZ</th>
495
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Bonded Warehouse</th>
496
+ </tr>
497
+ </thead>
498
+ <tbody class="bg-white divide-y divide-gray-200">
499
+ <tr>
500
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Duty Timing</td>
501
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">At entry</td>
502
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">At U.S. commerce entry</td>
503
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">At withdrawal</td>
504
+ </tr>
505
+ <tr>
506
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Rate Lock</td>
507
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">No</td>
508
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Yes (Privileged Foreign)</td>
509
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">No</td>
510
+ </tr>
511
+ <tr>
512
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">MPF Savings</td>
513
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">None</td>
514
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Weekly entry reduces counts</td>
515
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">None</td>
516
+ </tr>
517
+ <tr>
518
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Storage Cost</td>
519
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Customs exam areas</td>
520
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Operator/monthly fees</td>
521
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Warehouse/per pallet</td>
522
+ </tr>
523
+ <tr>
524
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Best For</td>
525
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Low volume</td>
526
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">High volume, fluctuating rates</td>
527
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Declining rates, short term</td>
528
+ </tr>
529
+ </tbody>
530
+ </table>
531
+ </div>
532
+ </div>
533
+ </div>
534
+
535
+ <!-- Optimization Tab -->
536
+ <div id="tab-optimization" class="tab-content">
537
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
538
+ <div class="lg:col-span-2">
539
+ <div class="chart-container">
540
+ <h3 class="text-lg font-semibold mb-4">Sensitivity Analysis</h3>
541
+ <div id="sensitivity-chart" class="h-80"></div>
542
+ </div>
543
+
544
+ <div class="chart-container mt-6">
545
+ <h3 class="text-lg font-semibold mb-4">Network Optimization</h3>
546
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
547
+ <div class="border border-gray-200 rounded-lg p-4">
548
+ <div class="flex justify-between items-center mb-2">
549
+ <span class="text-gray-600">FTZ Allocation</span>
550
+ <span class="font-bold">65%</span>
551
+ </div>
552
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
553
+ <div class="bg-indigo-600 h-2.5 rounded-full" style="width: 65%"></div>
554
+ </div>
555
+ </div>
556
+ <div class="border border-gray-200 rounded-lg p-4">
557
+ <div class="flex justify-between items-center mb-2">
558
+ <span class="text-gray-600">Bonded Warehouse</span>
559
+ <span class="font-bold">25%</span>
560
+ </div>
561
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
562
+ <div class="bg-green-500 h-2.5 rounded-full" style="width: 25%"></div>
563
+ </div>
564
+ </div>
565
+ <div class="border border-gray-200 rounded-lg p-4">
566
+ <div class="flex justify-between items-center mb-2">
567
+ <span class="text-gray-600">Direct to DC</span>
568
+ <span class="font-bold">10%</span>
569
+ </div>
570
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
571
+ <div class="bg-blue-500 h-2.5 rounded-full" style="width: 10%"></div>
572
+ </div>
573
+ </div>
574
+ </div>
575
+ </div>
576
+ </div>
577
+
578
+ <div>
579
+ <div class="slider-container mb-6">
580
+ <h3 class="text-lg font-semibold mb-4">Optimization Controls</h3>
581
+
582
+ <div class="mb-4">
583
+ <label class="block text-gray-700 text-sm mb-1">Tariff Increase Assumption</label>
584
+ <input type="range" min="0" max="10" value="3" class="w-full">
585
+ <div class="flex justify-between text-xs text-gray-500 mt-1">
586
+ <span>Falling</span>
587
+ <span>Neutral</span>
588
+ <span>Rising</span>
589
+ </div>
590
+ </div>
591
+
592
+ <div class="mb-4">
593
+ <label class="block text-gray-700 text-sm mb-1">Inventory Dwell Time</label>
594
+ <input type="range" min="15" max="90" value="45" class="w-full">
595
+ <div class="flex justify-between text-xs text-gray-500 mt-1">
596
+ <span>Short</span>
597
+ <span>Medium</span>
598
+ <span>Long</span>
599
+ </div>
600
+ </div>
601
+
602
+ <div class="mb-4">
603
+ <label class="block text-gray-700 text-sm mb-1">Component Complexity</label>
604
+ <input type="range" min="1" max="5" value="3" class="w-full">
605
+ </div>
606
+
607
+ <div class="flex items-center justify-between mb-2">
608
+ <span class="text-gray-700">Weekly Entry</span>
609
+ <label class="switch">
610
+ <input type="checkbox" checked>
611
+ <span class="slider"></span>
612
+ </label>
613
+ </div>
614
+
615
+ <button class="w-full bg-indigo-600 hover:bg-indigo-700 text-white py-2 rounded-md text-sm font-medium mt-4">
616
+ Optimize Network
617
+ </button>
618
+ </div>
619
+
620
+ <div class="slider-container">
621
+ <h3 class="text-lg font-semibold mb-4">Scenario Recommendation</h3>
622
+ <div class="p-4 bg-indigo-50 rounded-lg">
623
+ <p class="text-indigo-800">
624
+ <span class="font-bold">Recommended Mix:</span> FTZ 70%, Bonded 20%, Direct 10%
625
+ </p>
626
+ <p class="text-indigo-700 text-sm mt-2">
627
+ This configuration optimizes for the current tariff increase projection while
628
+ balancing inventory holding costs and administrative overhead.
629
+ </p>
630
+ </div>
631
+ </div>
632
+ </div>
633
+ </div>
634
+ </div>
635
+
636
+ <!-- About Tab -->
637
+ <div id="tab-about" class="tab-content">
638
+ <div class="chart-container">
639
+ <h2 class="text-xl font-semibold mb-4">About FTZ Analysis & Optimization Studio</h2>
640
+ <div class="prose max-w-none">
641
+ <p>
642
+ The FTZ Analysis & Optimization Studio is a simulation environment that enables logistics,
643
+ finance, and compliance teams to evaluate the financial impact of using U.S. Foreign Trade Zones
644
+ versus Bonded Warehouses and standard entry procedures for imported beauty and cosmetic goods.
645
+ </p>
646
+
647
+ <h3 class="text-lg font-semibold mt-6 mb-3">Key Concepts</h3>
648
+ <ul class="list-disc pl-5 space-y-2">
649
+ <li><strong>Foreign Trade Zones (FTZs)</strong>: Areas considered outside the U.S. customs territory for tariff purposes. Duties are deferred until merchandise enters U.S. commerce. Benefits include weekly entry, direct delivery, inverted tariff opportunities, and scrap/waste relief.</li>
650
+ <li><strong>Bonded Warehouses</strong>: Secure storage facilities where imported goods can be stored without paying duties until they're withdrawn for domestic consumption. Duties are assessed at withdrawal time, allowing benefit from declining rates.</li>
651
+ <li><strong>Privileged Foreign Status</strong>: Within FTZs, goods can be admitted with privileged foreign status locking in duty rates at the time of admission, providing protection against rate increases.</li>
652
+ <li><strong>Inverted Tariff Opportunities</strong>: When components with higher duty rates are imported as privileged foreign status, and the finished products have lower duty rates, savings can be achieved.</li>
653
+ </ul>
654
+
655
+ <h3 class="text-lg font-semibold mt-6 mb-3">Application Features</h3>
656
+ <ul class="list-disc pl-5 space-y-2">
657
+ <li><strong>Multi-scenario Comparison</strong>: Evaluate Standard Entry, FTZ Baseline, FTZ with Privileged Foreign Status, FTZ with Inverted Tariff, and Bonded Warehouse scenarios.</li>
658
+ <li><strong>Dynamic Cost Modeling</strong>: Calculates customs duties, MPF/HMF fees, storage costs, and compliance overhead based on current and anticipated tariff rates.</li>
659
+ <li><strong>Optimization Recommendations</strong>: Provides allocation recommendations between FTZs, Bonded Warehouses, and direct distribution based on financial modeling.</li>
660
+ <li><strong>Risk Assessment</strong>: Incorporates potential disruptions, policy changes, and regulatory compliance into financial projections.</li>
661
+ </ul>
662
+
663
+ <h3 class="text-lg font-semibold mt-6 mb-3">Disclaimer</h3>
664
+ <p>
665
+ This demonstration uses synthetic data generated client-side. All FTZ and customs treatment information
666
+ is summarized from public resources including strtrade.com, geodis.com, bergenlogistics.com,
667
+ chiefexecutive.net, and zhftaxlaw.com. Actual duty/tariff calculations should be verified with
668
+ customs brokers and legal advisors.
669
+ </p>
670
+ </div>
671
+ </div>
672
+ </div>
673
+ </div>
674
+ </div>
675
+
676
+ <!-- Footer -->
677
+ <div class="footer p-4 text-center text-sm">
678
+ Demonstration only. FTZ/Bonded mechanics summarized from public resources:
679
+ strtrade.com, geodis.com, bergenlogistics.com, chiefexecutive.net, zhftaxlaw.com.
680
+ </div>
681
+
682
+ <script>
683
+ // Tab switching functionality
684
+ document.querySelectorAll('.tab-button').forEach(button => {
685
+ button.addEventListener('click', () => {
686
+ // Remove active class from all tabs and buttons
687
+ document.querySelectorAll('.tab-button').forEach(btn => btn.classList.remove('active'));
688
+ document.querySelectorAll('.tab-content').forEach(tab => tab.classList.remove('active'));
689
+
690
+ // Add active class to clicked button
691
+ button.classList.add('active');
692
+
693
+ // Show corresponding tab content
694
+ const tabId = button.getAttribute('data-tab');
695
+ document.getElementById(`tab-${tabId}`).classList.add('active');
696
+ });
697
+ });
698
+
699
+ // Mobile sidebar toggle
700
+ document.getElementById('sidebarToggle').addEventListener('click', () => {
701
+ document.getElementById('sidebar').classList.toggle('active');
702
+ document.getElementById('mobileOverlay').classList.toggle('active');
703
+ });
704
+
705
+ document.getElementById('mobileOverlay').addEventListener('click', () => {
706
+ document.getElementById('sidebar').classList.remove('active');
707
+ document.getElementById('mobileOverlay').classList.remove('active');
708
+ });
709
+
710
+ // Close sidebar when clicking outside on mobile
711
+ document.addEventListener('click', (e) => {
712
+ const sidebar = document.getElementById('sidebar');
713
+ const toggle = document.getElementById('sidebarToggle');
714
+
715
+ if (window.innerWidth < 768 &&
716
+ sidebar.classList.contains('active') &&
717
+ !sidebar.contains(e.target) &&
718
+ e.target !== toggle) {
719
+ sidebar.classList.remove('active');
720
+ document.getElementById('mobileOverlay').classList.remove('active');
721
+ }
722
+ });
723
+
724
+ // Initialize charts
725
+ document.addEventListener('DOMContentLoaded', () => {
726
+ // Duty by HS Code Chart
727
+ const dutyChart = document.getElementById('duty-chart');
728
+ const dutyData = [{
729
+ type: 'bar',
730
+ x: ['3304', '3305', '3307', '4202', '3923', '7010'],
731
+ y: [1200000, 800000, 1500000, 450000, 600000, 900000],
732
+ marker: { color: '#4f46e5' }
733
+ }];
734
+
735
+ const dutyLayout = {
736
+ title: 'Duty by HS Code',
737
+ xaxis: { title: 'HS Code' },
738
+ yaxis: { title: 'Duty Amount (USD)' },
739
+ margin: { t: 40, l: 40, r: 20, b: 60 }
740
+ };
741
+
742
+ Plotly.newPlot(dutyChart, dutyData, dutyLayout, {displayModeBar: false});
743
+
744
+ // Monthly Trend Chart
745
+ const monthlyChart = document.getElementById('monthly-chart');
746
+ const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
747
+ const monthlyData = [{
748
+ type: 'scatter',
749
+ mode: 'lines+markers',
750
+ name: 'FTZ Scenario',
751
+ x: months,
752
+ y: [180000, 195000, 190000, 185000, 175000, 170000, 165000, 170000, 175000, 185000, 195000, 205000],
753
+ line: { color: '#10b981', width: 3 },
754
+ marker: { size: 6 }
755
+ }, {
756
+ type: 'scatter',
757
+ mode: 'lines+markers',
758
+ name: 'Standard Entry',
759
+ x: months,
760
+ y: [220000, 235000, 230000, 225000, 215000, 210000, 205000, 210000, 215000, 225000, 235000, 245000],
761
+ line: { color: '#94a3b8', width: 2 },
762
+ marker: { size: 4 }
763
+ }];
764
+
765
+ const monthlyLayout = {
766
+ title: 'Monthly Duty/Fees Comparison',
767
+ xaxis: { title: 'Month' },
768
+ yaxis: { title: 'Amount (USD)' },
769
+ margin: { t: 40, l: 60, r: 20, b: 60 }
770
+ };
771
+
772
+ Plotly.newPlot(monthlyChart, monthlyData, monthlyLayout, {displayModeBar: false});
773
+
774
+ // Cost Composition Chart
775
+ const costChart = document.getElementById('cost-chart');
776
+ const costData = [{
777
+ type: 'pie',
778
+ values: [35, 25, 15, 10, 10, 5],
779
+ labels: ['Duty', 'FTZ Operator Fees', 'Storage Costs', 'MPF/HMF Fees', 'Compliance Overhead', 'Demurrage'],
780
+ marker: {
781
+ colors: ['#4f46e5', '#818cf8', '#c7d2fe', '#10b981', '#34d399', '#a7f3d0']
782
+ },
783
+ textinfo: 'label+percent'
784
+ }];
785
+
786
+ const costLayout = {
787
+ title: 'Cost Composition Breakdown',
788
+ margin: { t: 40, l: 0, r: 0, b: 0 }
789
+ };
790
+
791
+ Plotly.newPlot(costChart, costData, costLayout, {displayModeBar: false});
792
+
793
+ // Top SKUs Table
794
+ const topSKUsTable = new Tabulator("#top-skus-table", {
795
+ height: "300px",
796
+ data: [
797
+ {sku: "FRG-001", hs: "3307", savings: 125000, dw: "Y", dwell: 45, cost: 8500},
798
+ {sku: "SKC-003", hs: "3304", savings: 98000, dw: "Y", dwell: 38, cost: 6200},
799
+ {sku: "MKP-012", hs: "3304", savings: 87000, dw: "N", dwell: 52, cost: 11000},
800
+ {sku: "FRG-025", hs: "3307", savings: 78000, dw: "Y", dwell: 35, cost: 5500},
801
+ {sku: "HRC-007", hs: "3305", savings: 65000, dw: "N", dwell: 48, cost: 9200},
802
+ ],
803
+ layout: "fitColumns",
804
+ columns: [
805
+ {title: "SKU", field: "sku", width: 100},
806
+ {title: "HS Code", field: "hs", width: 100},
807
+ {title: "Savings", field: "savings", formatter: "money", formatterParams: {symbol: "$"}, hozAlign: "right"},
808
+ {title: "Priv. Foreign", field: "dw", width: 120, hozAlign: "center"},
809
+ {title: "Dwell (Days)", field: "dwell", width: 120, hozAlign: "center"},
810
+ {title: "Storage Cost", field: "cost", formatter: "money", formatterParams: {symbol: "$"}, hozAlign: "right"},
811
+ ],
812
+ });
813
+
814
+ // Comparison Chart
815
+ const comparisonChart = document.getElementById('comparison-chart');
816
+ const comparisonData = [{
817
+ type: 'bar',
818
+ x: ['Standard Entry', 'FTZ - Baseline', 'FTZ - Privileged Foreign', 'FTZ - Inverted Tariff', 'Bonded Warehouse'],
819
+ y: [12800000, 11600000, 11000000, 10700000, 11900000],
820
+ marker: {
821
+ color: ['#94a3b8', '#4f46e5', '#818cf8', '#6366f1', '#a78bfa']
822
+ }
823
+ }];
824
+
825
+ const comparisonLayout = {
826
+ title: 'Total Cost Comparison (Millions USD)',
827
+ xaxis: { title: 'Scenario' },
828
+ yaxis: { title: 'Total Cost' },
829
+ margin: { t: 40, l: 80, r: 20, b: 100 }
830
+ };
831
+
832
+ Plotly.newPlot(comparisonChart, comparisonData, comparisonLayout, {displayModeBar: false});
833
+
834
+ // Sensitivity Chart
835
+ const sensitivityChart = document.getElementById('sensitivity-chart');
836
+ const sensitivityData = [
837
+ {
838
+ type: 'bar',
839
+ orientation: 'h',
840
+ x: [0.15, 0.25, -0.1, 0.05, 0.3],
841
+ y: ['Tariff Rate Change', 'Dwell Time', 'Weekly Entry', 'Storage Costs', 'Inventory Turns'],
842
+ marker: {
843
+ color: ['#ef4444', '#ef4444', '#10b981', '#10b981', '#10b981']
844
+ }
845
+ }
846
+ ];
847
+
848
+ const sensitivityLayout = {
849
+ title: 'Sensitivity Analysis: Net Savings Impact',
850
+ xaxis: { title: 'Impact on Savings (% of total cost)' },
851
+ yaxis: { title: 'Factor' },
852
+ margin: { t: 40, l: 120, r: 20, b: 60 }
853
+ };
854
+
855
+ Plotly.newPlot(sensitivityChart, sensitivityData, sensitivityLayout, {displayModeBar: false});
856
+ });
857
+ </script>
858
+ <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=agenticlogistics/ftz-analysis-optimization" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
859
+ </html>