File size: 40,468 Bytes
e7d4ae7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>The Connector Group Command Center</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <style>
        .dashboard-card {
            transition: all 0.3s ease;
        }
        .dashboard-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .performance-indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            display: inline-block;
            margin-right: 5px;
        }
        .performance-good {
            background-color: #10B981;
        }
        .performance-warning {
            background-color: #F59E0B;
        }
        .performance-critical {
            background-color: #EF4444;
        }
        .custom-scrollbar::-webkit-scrollbar {
            height: 6px;
            width: 6px;
        }
        .custom-scrollbar::-webkit-scrollbar-track {
            background: #f1f1f1;
        }
        .custom-scrollbar::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 3px;
        }
        .custom-scrollbar::-webkit-scrollbar-thumb:hover {
            background: #555;
        }
        .tab-active {
            border-bottom: 3px solid #3B82F6;
            color: #3B82F6;
            font-weight: 600;
        }
        .funnel-step {
            position: relative;
            margin-bottom: 20px;
        }
        .funnel-bar {
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 15px;
            color: white;
            font-weight: bold;
            border-radius: 4px;
            margin-bottom: 5px;
            transition: width 0.5s ease;
        }
        .funnel-percentage {
            position: absolute;
            right: 10px;
            color: white;
        }
        .heatmap-cell {
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            font-size: 10px;
            font-weight: bold;
        }
    </style>
</head>
<body class="bg-gray-50">
    <div class="min-h-screen">
        <!-- Header -->
        <header class="bg-white shadow-sm">
            <div class="max-w-7xl mx-auto px-4 py-4 sm:px-6 lg:px-8 flex justify-between items-center">
                <div class="flex items-center">
                    <div class="bg-blue-600 text-white p-2 rounded-lg">
                        <i class="fas fa-satellite-dish text-2xl"></i>
                    </div>
                    <h1 class="ml-3 text-2xl font-bold text-gray-900">The Connector Group Command Center</h1>
                </div>
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <button id="refresh-btn" class="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition flex items-center">
                            <i class="fas fa-sync-alt mr-2"></i> Refresh Data
                        </button>
                        <div id="last-updated" class="text-xs text-gray-500 mt-1 text-right">Last updated: Just now</div>
                    </div>
                    <div class="relative">
                        <button id="account-menu" class="flex items-center space-x-2 focus:outline-none">
                            <img class="w-8 h-8 rounded-full" src="https://randomuser.me/api/portraits/women/44.jpg" alt="User profile">
                            <span class="text-gray-700">Admin</span>
                        </button>
                    </div>
                </div>
            </div>
        </header>

        <!-- Filters -->
        <div class="bg-white shadow-sm mt-1">
            <div class="max-w-7xl mx-auto px-4 py-3 sm:px-6 lg:px-8">
                <div class="flex flex-wrap items-center justify-between gap-4">
                    <div class="flex items-center space-x-4">
                        <div>
                            <label for="subaccount-filter" class="block text-sm font-medium text-gray-700 mb-1">Subaccount</label>
                            <select id="subaccount-filter" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                <option>All Subaccounts</option>
                                <option>BrowConnector</option>
                                <option>LipConnector</option>
                                <option>LashConnector</option>
                                <option>BeautyConnector</option>
                            </select>
                        </div>
                        <div>
                            <label for="brand-filter" class="block text-sm font-medium text-gray-700 mb-1">Brand</label>
                            <select id="brand-filter" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                <option>All Brands</option>
                                <option>Premium</option>
                                <option>Standard</option>
                                <option>Basic</option>
                            </select>
                        </div>
                        <div>
                            <label for="manager-filter" class="block text-sm font-medium text-gray-700 mb-1">Account Manager</label>
                            <select id="manager-filter" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                <option>All Managers</option>
                                <option>Sarah Johnson</option>
                                <option>Michael Chen</option>
                                <option>Emily Rodriguez</option>
                            </select>
                        </div>
                    </div>
                    <div class="flex items-center space-x-4">
                        <div>
                            <label for="time-filter" class="block text-sm font-medium text-gray-700 mb-1">Time Range</label>
                            <select id="time-filter" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                <option>Last 7 Days</option>
                                <option>Today</option>
                                <option>Yesterday</option>
                                <option>Last 30 Days</option>
                                <option>This Month</option>
                                <option>Custom Range...</option>
                            </select>
                        </div>
                        <button class="mt-6 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition">
                            Apply Filters
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <!-- Main Content -->
        <main class="max-w-7xl mx-auto px-4 py-6 sm:px-6 lg:px-8">
            <!-- Summary Metrics -->
            <div class="mb-8">
                <h2 class="text-xl font-bold text-gray-900 mb-4">Business Overview</h2>
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4">
                    <!-- Total Clients -->
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-sm font-medium text-gray-500">Total Clients</p>
                                <p class="text-2xl font-bold text-gray-900 mt-1">142</p>
                                <p class="text-sm text-gray-500 mt-1">+12% from last month</p>
                            </div>
                            <div class="performance-indicator performance-good"></div>
                        </div>
                        <div class="mt-4 h-2 bg-gray-200 rounded-full">
                            <div class="h-2 bg-green-500 rounded-full" style="width: 75%"></div>
                        </div>
                    </div>
                    
                    <!-- Total MRR -->
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-sm font-medium text-gray-500">Total MRR</p>
                                <p class="text-2xl font-bold text-gray-900 mt-1">$42,850</p>
                                <p class="text-sm text-gray-500 mt-1">+8% from last month</p>
                            </div>
                            <div class="performance-indicator performance-warning"></div>
                        </div>
                        <div class="mt-4 h-2 bg-gray-200 rounded-full">
                            <div class="h-2 bg-yellow-500 rounded-full" style="width: 60%"></div>
                        </div>
                    </div>
                    
                    <!-- Total Leads -->
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-sm font-medium text-gray-500">Total Leads</p>
                                <p class="text-2xl font-bold text-gray-900 mt-1">3,245</p>
                                <p class="text-sm text-gray-500 mt-1">+15% from last month</p>
                            </div>
                            <div class="performance-indicator performance-good"></div>
                        </div>
                        <div class="mt-4 h-2 bg-gray-200 rounded-full">
                            <div class="h-2 bg-green-500 rounded-full" style="width: 85%"></div>
                        </div>
                    </div>
                    
                    <!-- Total Bookings -->
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-sm font-medium text-gray-500">Total Bookings</p>
                                <p class="text-2xl font-bold text-gray-900 mt-1">872</p>
                                <p class="text-sm text-gray-500 mt-1">+5% from last month</p>
                            </div>
                            <div class="performance-indicator performance-warning"></div>
                        </div>
                        <div class="mt-4 h-2 bg-gray-200 rounded-full">
                            <div class="h-2 bg-yellow-500 rounded-full" style="width: 55%"></div>
                        </div>
                    </div>
                    
                    <!-- Overall Conversion Rate -->
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-sm font-medium text-gray-500">Conversion Rate</p>
                                <p class="text-2xl font-bold text-gray-900 mt-1">26.8%</p>
                                <p class="text-sm text-gray-500 mt-1">-2% from last month</p>
                            </div>
                            <div class="performance-indicator performance-critical"></div>
                        </div>
                        <div class="mt-4 h-2 bg-gray-200 rounded-full">
                            <div class="h-2 bg-red-500 rounded-full" style="width: 45%"></div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Tabs Navigation -->
            <div class="border-b border-gray-200 mb-6">
                <nav class="-mb-px flex space-x-8 overflow-x-auto custom-scrollbar">
                    <button class="tab-active whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm">
                        Lead & Appointment Metrics
                    </button>
                    <button class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300">
                        Pipeline Metrics
                    </button>
                    <button class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300">
                        Client Retention
                    </button>
                    <button class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300">
                        Ad Performance
                    </button>
                    <button class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300">
                        Automation Health
                    </button>
                    <button class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300">
                        Operational Metrics
                    </button>
                </nav>
            </div>

            <!-- Lead & Appointment Metrics -->
            <div id="lead-metrics" class="mb-8">
                <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
                    <!-- New Leads Chart -->
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow col-span-1">
                        <div class="flex justify-between items-center mb-4">
                            <h3 class="text-lg font-medium text-gray-900">New Leads</h3>
                            <div class="flex space-x-2">
                                <button class="px-2 py-1 text-xs bg-blue-100 text-blue-800 rounded">Day</button>
                                <button class="px-2 py-1 text-xs bg-gray-100 text-gray-800 rounded">Week</button>
                                <button class="px-2 py-1 text-xs bg-gray-100 text-gray-800 rounded">Month</button>
                            </div>
                        </div>
                        <canvas id="newLeadsChart" height="200"></canvas>
                    </div>
                    
                    <!-- Leads by Source -->
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow col-span-1">
                        <h3 class="text-lg font-medium text-gray-900 mb-4">Leads by Source</h3>
                        <canvas id="leadsBySourceChart" height="200"></canvas>
                    </div>
                    
                    <!-- Appointment Metrics -->
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow col-span-1">
                        <h3 class="text-lg font-medium text-gray-900 mb-4">Appointment Metrics</h3>
                        <div class="space-y-4">
                            <div>
                                <div class="flex justify-between mb-1">
                                    <span class="text-sm font-medium text-gray-700">Confirmed</span>
                                    <span class="text-sm font-medium text-gray-700">78%</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2.5">
                                    <div class="bg-green-500 h-2.5 rounded-full" style="width: 78%"></div>
                                </div>
                            </div>
                            <div>
                                <div class="flex justify-between mb-1">
                                    <span class="text-sm font-medium text-gray-700">Showed</span>
                                    <span class="text-sm font-medium text-gray-700">62%</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2.5">
                                    <div class="bg-blue-500 h-2.5 rounded-full" style="width: 62%"></div>
                                </div>
                            </div>
                            <div>
                                <div class="flex justify-between mb-1">
                                    <span class="text-sm font-medium text-gray-700">No-Shows</span>
                                    <span class="text-sm font-medium text-gray-700">16%</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2.5">
                                    <div class="bg-red-500 h-2.5 rounded-full" style="width: 16%"></div>
                                </div>
                            </div>
                        </div>
                        <div class="mt-6 grid grid-cols-2 gap-4">
                            <div class="bg-gray-50 p-3 rounded-lg">
                                <p class="text-sm text-gray-500">Avg Time to First Contact</p>
                                <p class="text-lg font-bold">2.4 hrs</p>
                            </div>
                            <div class="bg-gray-50 p-3 rounded-lg">
                                <p class="text-sm text-gray-500">Lead-to-Booking Time</p>
                                <p class="text-lg font-bold">3.2 days</p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Top & Bottom Performers -->
                <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mt-6">
                    <!-- Top Performers -->
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow">
                        <h3 class="text-lg font-medium text-gray-900 mb-4">Top Performing Subaccounts</h3>
                        <div class="space-y-3">
                            <div class="flex items-center justify-between p-2 bg-green-50 rounded">
                                <div class="flex items-center">
                                    <div class="bg-green-100 text-green-800 p-2 rounded-full mr-3">
                                        <i class="fas fa-trophy"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">BrowConnector NYC</p>
                                        <p class="text-sm text-gray-500">Conversion: 34.2%</p>
                                    </div>
                                </div>
                                <span class="text-green-800 font-bold">+12%</span>
                            </div>
                            <div class="flex items-center justify-between p-2 bg-green-50 rounded">
                                <div class="flex items-center">
                                    <div class="bg-green-100 text-green-800 p-2 rounded-full mr-3">
                                        <i class="fas fa-medal"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">LashConnector LA</p>
                                        <p class="text-sm text-gray-500">Conversion: 30.8%</p>
                                    </div>
                                </div>
                                <span class="text-green-800 font-bold">+8%</span>
                            </div>
                            <div class="flex items-center justify-between p-2 bg-green-50 rounded">
                                <div class="flex items-center">
                                    <div class="bg-green-100 text-green-800 p-2 rounded-full mr-3">
                                        <i class="fas fa-award"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">LipConnector Miami</p>
                                        <p class="text-sm text-gray-500">Conversion: 28.5%</p>
                                    </div>
                                </div>
                                <span class="text-green-800 font-bold">+5%</span>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Bottom Performers -->
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow">
                        <h3 class="text-lg font-medium text-gray-900 mb-4">Underperforming Subaccounts</h3>
                        <div class="space-y-3">
                            <div class="flex items-center justify-between p-2 bg-red-50 rounded">
                                <div class="flex items-center">
                                    <div class="bg-red-100 text-red-800 p-2 rounded-full mr-3">
                                        <i class="fas fa-exclamation-triangle"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">BeautyConnector Chicago</p>
                                        <p class="text-sm text-gray-500">No-Show: 28%</p>
                                    </div>
                                </div>
                                <span class="text-red-800 font-bold">-15%</span>
                            </div>
                            <div class="flex items-center justify-between p-2 bg-red-50 rounded">
                                <div class="flex items-center">
                                    <div class="bg-red-100 text-red-800 p-2 rounded-full mr-3">
                                        <i class="fas fa-exclamation-circle"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">BrowConnector Dallas</p>
                                        <p class="text-sm text-gray-500">Stale Leads: 42%</p>
                                    </div>
                                </div>
                                <span class="text-red-800 font-bold">-12%</span>
                            </div>
                            <div class="flex items-center justify-between p-2 bg-red-50 rounded">
                                <div class="flex items-center">
                                    <div class="bg-red-100 text-red-800 p-2 rounded-full mr-3">
                                        <i class="fas fa-flag"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">LashConnector Houston</p>
                                        <p class="text-sm text-gray-500">Conversion: 18.2%</p>
                                    </div>
                                </div>
                                <span class="text-red-800 font-bold">-9%</span>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Funnel Visualization -->
                <div class="mt-6">
                    <div class="dashboard-card bg-white p-4 rounded-lg shadow">
                        <h3 class="text-lg font-medium text-gray-900 mb-4">Lead Conversion Funnel</h3>
                        <div class="funnel-container">
                            <div class="funnel-step">
                                <div class="flex justify-between mb-1">
                                    <span class="text-sm font-medium text-gray-700">Opt-in Leads</span>
                                    <span class="text-sm font-medium text-gray-700">1,245</span>
                                </div>
                                <div class="funnel-bar bg-blue-600" style="width: 100%">
                                    <span>100%</span>
                                </div>
                            </div>
                            <div class="funnel-step">
                                <div class="flex justify-between mb-1">
                                    <span class="text-sm font-medium text-gray-700">Booked Appointments</span>
                                    <span class="text-sm font-medium text-gray-700">872</span>
                                </div>
                                <div class="funnel-bar bg-blue-500" style="width: 70%">
                                    <span>70%</span>
                                </div>
                            </div>
                            <div class="funnel-step">
                                <div class="flex justify-between mb-1">
                                    <span class="text-sm font-medium text-gray-700">Showed Appointments</span>
                                    <span class="text-sm font-medium text-gray-700">540</span>
                                </div>
                                <div class="funnel-bar bg-blue-400" style="width: 43%">
                                    <span>43%</span>
                                </div>
                            </div>
                            <div class="funnel-step">
                                <div class="flex justify-between mb-1">
                                    <span class="text-sm font-medium text-gray-700">Closed Sales</span>
                                    <span class="text-sm font-medium text-gray-700">334</span>
                                </div>
                                <div class="funnel-bar bg-blue-300" style="width: 27%">
                                    <span>27%</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Heatmap Section -->
            <div class="mt-8">
                <div class="dashboard-card bg-white p-4 rounded-lg shadow">
                    <h3 class="text-lg font-medium text-gray-900 mb-4">Appointment Heatmap by Day/Hour</h3>
                    <div class="overflow-x-auto">
                        <table class="min-w-full">
                            <thead>
                                <tr>
                                    <th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Hour</th>
                                    <th class="px-4 py-2 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Mon</th>
                                    <th class="px-4 py-2 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Tue</th>
                                    <th class="px-4 py-2 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Wed</th>
                                    <th class="px-4 py-2 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Thu</th>
                                    <th class="px-4 py-2 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Fri</th>
                                    <th class="px-4 py-2 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Sat</th>
                                    <th class="px-4 py-2 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">Sun</th>
                                </tr>
                            </thead>
                            <tbody class="divide-y divide-gray-200">
                                <!-- Sample heatmap data -->
                                <tr>
                                    <td class="px-4 py-2 whitespace-nowrap text-sm font-medium text-gray-900">9 AM</td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-100">12</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-200">18</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-100">14</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-300">22</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-100">16</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-gray-100">4</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-gray-100">2</div></td>
                                </tr>
                                <tr>
                                    <td class="px-4 py-2 whitespace-nowrap text-sm font-medium text-gray-900">10 AM</td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-300">24</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-400">32</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-300">26</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-500">38</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-300">28</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-100">12</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-gray-100">6</div></td>
                                </tr>
                                <tr>
                                    <td class="px-4 py-2 whitespace-nowrap text-sm font-medium text-gray-900">11 AM</td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-400">34</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-500">42</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-400">36</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-600">48</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-400">38</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-200">20</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-100">10</div></td>
                                </tr>
                                <tr>
                                    <td class="px-4 py-2 whitespace-nowrap text-sm font-medium text-gray-900">12 PM</td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-500">40</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-600">52</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-500">44</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-700">58</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-500">46</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-300">28</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-100">14</div></td>
                                </tr>
                                <tr>
                                    <td class="px-4 py-2 whitespace-nowrap text-sm font-medium text-gray-900">1 PM</td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-400">32</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-500">42</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-400">34</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-600">48</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-400">36</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-200">22</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-100">12</div></td>
                                </tr>
                                <tr>
                                    <td class="px-4 py-2 whitespace-nowrap text-sm font-medium text-gray-900">2 PM</td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-300">26</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-400">34</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-300">28</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-500">38</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-300">30</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-green-100">18</div></td>
                                    <td class="px-4 py-2 whitespace-nowrap text-center"><div class="heatmap-cell bg-gray-100">8</div></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <script>
        // Initialize charts
        document.addEventListener('DOMContentLoaded', function() {
            // New Leads Chart
            const newLeadsCtx = document.getElementById('newLeadsChart').getContext('2d');
            const newLeadsChart = new Chart(newLeadsCtx, {
                type: 'line',
                data: {
                    labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
                    datasets: [{
                        label: 'New Leads',
                        data: [45, 72, 68, 85, 62, 38, 22],
                        backgroundColor: 'rgba(59, 130, 246, 0.2)',
                        borderColor: 'rgba(59, 130, 246, 1)',
                        borderWidth: 2,
                        tension: 0.4,
                        fill: true
                    }]
                },
                options: {
                    responsive: true,
                    plugins: {
                        legend: {
                            display: false
                        }
                    },
                    scales: {
                        y: {
                            beginAtZero: true
                        }
                    }
                }
            });
            
            // Leads by Source Chart
            const leadsBySourceCtx = document.getElementById('leadsBySourceChart').getContext('2d');
            const leadsBySourceChart = new Chart(leadsBySourceCtx, {
                type: 'doughnut',
                data: {
                    labels: ['Facebook', 'Instagram', 'Website', 'Referrals', 'Google'],
                    datasets: [{
                        data: [35, 25, 20, 15, 5],
                        backgroundColor: [
                            'rgba(59, 130, 246, 0.7)',
                            'rgba(236, 72, 153, 0.7)',
                            'rgba(16, 185, 129, 0.7)',
                            'rgba(245, 158, 11, 0.7)',
                            'rgba(99, 102, 241, 0.7)'
                        ],
                        borderWidth: 0
                    }]
                },
                options: {
                    responsive: true,
                    plugins: {
                        legend: {
                            position: 'right',
                        }
                    },
                    cutout: '70%'
                }
            });
            
            // Refresh button functionality
            document.getElementById('refresh-btn').addEventListener('click', function() {
                // Simulate data refresh
                const now = new Date();
                document.getElementById('last-updated').textContent = 'Last updated: ' + now.toLocaleTimeString();
                
                // Add loading animation
                this.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Refreshing...';
                setTimeout(() => {
                    this.innerHTML = '<i class="fas fa-sync-alt mr-2"></i> Refresh Data';
                }, 1000);
            });
            
            // Tab switching functionality
            const tabs = document.querySelectorAll('[id^="tab-"]');
            tabs.forEach(tab => {
                tab.addEventListener('click', function() {
                    // Remove active class from all tabs
                    document.querySelectorAll('[id^="tab-"]').forEach(t => {
                        t.classList.remove('tab-active');
                        t.classList.add('text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
                    });
                    
                    // Add active class to clicked tab
                    this.classList.add('tab-active');
                    this.classList.remove('text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
                    
                    // Here you would show/hide the corresponding content sections
                });
            });
        });
    </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=elevateandautomate/error" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>