Repository navigation
Expand file tree
/
Copy pathapp-mobile.html
More file actions
918 lines (864 loc) · 65.2 KB
/
Copy pathapp-mobile.html
File metadata and controls
918 lines (864 loc) · 65.2 KB
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
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
<!DOCTYPE html>
<html lang="en" class="h-full bg-slate-950 text-slate-100 antialiased font-sans select-none">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Appz — 4-Layer Operating System & Smart Components Simulator</title>
<script src="/vendor/htmx.min.js"></script>
<script src="/htmx-bolt.js"></script>
<script src="/appz.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<style>
/* Kinetic Viewport Transitions */
.device-viewport-frame {
transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
border-radius 0.3s ease;
position: relative;
overflow: hidden;
box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
background: #020617;
}
/* Scaling Container for High-Density Form Factors (Tab-H, TV-H) */
.viewport-scaler {
transform-origin: top center;
transition: transform 0.3s ease;
}
/* Custom Scrollbars */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.2); border-radius: 4px; }
</style>
</head>
<body class="min-h-full flex flex-col items-center p-4 lg:p-6 bg-gradient-to-br from-slate-950 via-indigo-950/20 to-slate-950 text-slate-200">
<!-- Desktop Top Control Bar -->
<header class="w-full max-w-6xl flex flex-wrap items-center justify-between pb-4 border-b border-slate-800/80 mb-6 gap-4">
<div class="flex items-center gap-3">
<a href="/" class="flex items-center gap-2">
<span class="w-8 h-8 rounded-xl bg-indigo-600 font-black text-white flex items-center justify-center text-sm shadow-lg shadow-indigo-600/30">⚡</span>
<div>
<h1 class="font-black text-base text-white tracking-tight flex items-center gap-2">
Appz Engine
<span class="text-[10px] font-extrabold text-indigo-400 bg-indigo-500/10 px-2 py-0.5 rounded-full border border-indigo-500/20">4-Layer OS Stack</span>
</h1>
<p class="text-[10px] text-slate-400">100 Basic Components • 100 Smart Components</p>
</div>
</a>
</div>
<!-- 8 Distinct Viewport Modes Switcher -->
<div class="flex flex-wrap items-center bg-slate-900/90 border border-slate-800 p-1 rounded-2xl gap-1 text-xs font-bold">
<!-- OS Modes -->
<button data-view-btn="OS-H" onclick="$appz.setViewMode('OS-H')" class="px-2.5 py-1.5 rounded-xl bg-slate-800/80 text-slate-400 hover:text-white transition-all">OS-H</button>
<button data-view-btn="OS-P" onclick="$appz.setViewMode('OS-P')" class="px-2.5 py-1.5 rounded-xl bg-slate-800/80 text-slate-400 hover:text-white transition-all">OS-P</button>
<span class="w-px h-4 bg-slate-800 mx-0.5"></span>
<!-- Tablet Modes -->
<button data-view-btn="Tab-H" onclick="$appz.setViewMode('Tab-H')" class="px-2.5 py-1.5 rounded-xl bg-slate-800/80 text-slate-400 hover:text-white transition-all">Tab-H</button>
<button data-view-btn="Tab-P" onclick="$appz.setViewMode('Tab-P')" class="px-2.5 py-1.5 rounded-xl bg-slate-800/80 text-slate-400 hover:text-white transition-all">Tab-P</button>
<span class="w-px h-4 bg-slate-800 mx-0.5"></span>
<!-- Mobile Modes -->
<button data-view-btn="Mob-H" onclick="$appz.setViewMode('Mob-H')" class="px-2.5 py-1.5 rounded-xl bg-slate-800/80 text-slate-400 hover:text-white transition-all">Mob-H</button>
<button data-view-btn="Mob-P" onclick="$appz.setViewMode('Mob-P')" class="px-2.5 py-1.5 rounded-xl bg-indigo-600 text-white transition-all">Mob-P</button>
<span class="w-px h-4 bg-slate-800 mx-0.5"></span>
<!-- TV Modes -->
<button data-view-btn="TV-H" onclick="$appz.setViewMode('TV-H')" class="px-2.5 py-1.5 rounded-xl bg-slate-800/80 text-slate-400 hover:text-white transition-all">TV-H</button>
<button data-view-btn="TV-P" onclick="$appz.setViewMode('TV-P')" class="px-2.5 py-1.5 rounded-xl bg-slate-800/80 text-slate-400 hover:text-white transition-all">TV-P</button>
</div>
<!-- Quick OS Action Buttons -->
<div class="flex items-center gap-2">
<button onclick="$appz.toggleControlCenter()" class="px-3 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-300 font-bold text-xs flex items-center gap-1.5">
<span>⚙️</span> Quick Settings
</button>
<button onclick="$appz.toggleMultitask()" class="px-3 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-300 font-bold text-xs flex items-center gap-1.5">
<span>📑</span> Tasks
</button>
<button onclick="$appz.lock()" class="px-3 py-1.5 rounded-xl bg-indigo-600/20 hover:bg-indigo-600/30 text-indigo-400 border border-indigo-500/30 font-bold text-xs flex items-center gap-1.5">
<span>🔒</span> Lock OS
</button>
</div>
</header>
<!-- Interactive Scaler & Viewport Frame -->
<main class="w-full flex-1 flex flex-col items-center justify-center overflow-auto py-2">
<div class="viewport-scaler flex justify-center items-center">
<!-- DYNAMIC DEVICE VIEWPORT FRAME -->
<div class="device-viewport-frame flex flex-col border-[10px] border-slate-900 rounded-[44px]"
style="width: 390px; height: 844px;"
data-view-mode="Mob-P" data-form-factor="Mob" data-orientation="P">
<!-- LAYER-UX: System Shell Root -->
<app-shellui view-mode="Mob-P" form-factor="Mob" orientation="P"
class="flex-1 flex flex-col overflow-hidden relative select-none"
hx-state='{
"activeDomain": "cockpit",
"researchTab": "pathology",
"industrialTab": "civil",
"gridPower": 4820,
"thermostatTemp": 21.5,
"otaProgress": 0,
"speed": 104,
"vol": 65,
"muted": false,
"mag": "40x",
"ki67": 34.2,
"mitoticCount": 18,
"slice": 142,
"roiMean": 42.5,
"gene": "TNNT2",
"cluster": "Cardiomyocytes",
"pct": 48.2,
"onTarget": 88,
"offTarget": 94,
"targetGene": "HBB",
"variant": "rs334",
"area": 842.5,
"deflect": 4.2,
"sog": 14.2,
"cog": 248,
"ukc": 18.4,
"ndvi": 0.78,
"moist": 28.4
}'>
<!-- 1. LAYER-UX: System Status Bar with Live Clock, RSSI, Battery, Dynamic Island -->
<app-statusbar class="h-9 bg-slate-950/90 backdrop-blur border-b border-slate-900 px-4 flex items-center justify-between shrink-0 z-50 text-[11px] font-semibold text-slate-300">
<div class="flex items-center gap-2">
<span class="status-time font-black text-white">12:00</span>
<span class="text-[9px] text-indigo-400 font-extrabold uppercase tracking-widest">AppzOS</span>
</div>
<!-- Dynamic Island Alert Capsule -->
<div class="dynamic-island h-6 px-3 bg-black rounded-full flex items-center gap-1.5 border border-slate-800 text-[10px] font-bold text-slate-300 transition-all cursor-pointer"
hx-action="$appz.haptic('selection'); $appz.send('iot:island', { text: 'Substation Alpha: 99.4% Peak' })">
<span class="w-2 h-2 rounded-full bg-emerald-500 animate-pulse"></span>
<span class="truncate max-w-[120px]">Active IoT</span>
</div>
<!-- Hardware Telemetry (Layer-Firm) -->
<div class="flex items-center gap-2 text-xs">
<span class="text-indigo-400 font-mono" title="Wi-Fi 5G">▅▄▃</span>
<div class="flex items-center gap-0.5">
<span class="text-[10px] font-bold text-slate-300">94%</span>
<span class="text-emerald-400">🔋</span>
</div>
</div>
</app-statusbar>
<!-- 2. Top App Bar -->
<app-bar class="h-12 bg-slate-900/90 backdrop-blur border-b border-slate-800/80 px-4 flex items-center justify-between shrink-0 z-40">
<div class="flex items-center gap-2">
<span class="text-xs font-black text-indigo-400">⚡ Cockpit</span>
<span class="text-xs font-bold text-white">Smart Hub</span>
</div>
<div class="flex items-center gap-2">
<button hx-action="$appz.sheet('#sheet-smart')" class="px-2.5 py-1 rounded-xl bg-indigo-600/30 text-indigo-400 border border-indigo-500/40 font-bold text-[10px] active:scale-95">Widgets ▤</button>
<button hx-action="$appz.toggleControlCenter()" class="w-7 h-7 rounded-full bg-slate-800 flex items-center justify-center text-xs text-slate-300 active:scale-95">⋮</button>
</div>
</app-bar>
<!-- 3. Smart Domain Selector Bar -->
<div class="h-10 bg-slate-950/80 border-b border-slate-800/60 px-3 flex items-center gap-1.5 overflow-x-auto shrink-0 z-30 text-[10px] font-bold">
<button class="px-2.5 py-1 rounded-lg transition-all"
hx-class='{ "bg-indigo-600 text-white": activeDomain === "cockpit", "bg-slate-900 text-slate-400": activeDomain !== "cockpit" }'
hx-action="activeDomain = 'cockpit'; $appz.haptic('selection')">Cockpit</button>
<button class="px-2.5 py-1 rounded-lg transition-all"
hx-class='{ "bg-indigo-600 text-white": activeDomain === "weather", "bg-slate-900 text-slate-400": activeDomain !== "weather" }'
hx-action="activeDomain = 'weather'; $appz.haptic('selection')">⛅ Weather</button>
<button class="px-2.5 py-1 rounded-lg transition-all"
hx-class='{ "bg-indigo-600 text-white": activeDomain === "car", "bg-slate-900 text-slate-400": activeDomain !== "car" }'
hx-action="activeDomain = 'car'; $appz.haptic('selection')">🚗 Car HUD</button>
<button class="px-2.5 py-1 rounded-lg transition-all"
hx-class='{ "bg-indigo-600 text-white": activeDomain === "iot", "bg-slate-900 text-slate-400": activeDomain !== "iot" }'
hx-action="activeDomain = 'iot'; $appz.haptic('selection')">⚡ Relays</button>
<button class="px-2.5 py-1 rounded-lg transition-all"
hx-class='{ "bg-indigo-600 text-white": activeDomain === "solar", "bg-slate-900 text-slate-400": activeDomain !== "solar" }'
hx-action="activeDomain = 'solar'; $appz.haptic('selection')">☀️ Solar</button>
<button class="px-2.5 py-1 rounded-lg transition-all"
hx-class='{ "bg-indigo-600 text-white": activeDomain === "factory", "bg-slate-900 text-slate-400": activeDomain !== "factory" }'
hx-action="activeDomain = 'factory'; $appz.haptic('selection')">🏭 Factory</button>
<button class="px-2.5 py-1 rounded-lg transition-all"
hx-class='{ "bg-indigo-600 text-white": activeDomain === "health", "bg-slate-900 text-slate-400": activeDomain !== "health" }'
hx-action="activeDomain = 'health'; $appz.haptic('selection')">❤️ Health</button>
<button class="px-2.5 py-1 rounded-lg transition-all whitespace-nowrap"
hx-class='{ "bg-violet-600 text-white shadow-md shadow-violet-600/30": activeDomain === "research", "bg-slate-900 text-slate-400": activeDomain !== "research" }'
hx-action="activeDomain = 'research'; $appz.haptic('selection')">🔬 Research Science</button>
<button class="px-2.5 py-1 rounded-lg transition-all whitespace-nowrap"
hx-class='{ "bg-orange-600 text-white shadow-md shadow-orange-600/30": activeDomain === "industrial", "bg-slate-900 text-slate-400": activeDomain !== "industrial" }'
hx-action="activeDomain = 'industrial'; $appz.haptic('selection')">🏗️ Heavy Engineering</button>
</div>
<!-- 4. Scrollable Multi-Layer Segments (Layers 0..9) -->
<main class="flex-1 overflow-y-auto flex flex-col relative space-y-4 p-4" hx-pull-refresh="/noop">
<!-- SECTION 1: Cockpit Default Hub -->
<div hx-show="activeDomain === 'cockpit'" class="space-y-4">
<!-- SEGMENT: Live Circular Gauges Grid -->
<app-seg id="seg-gauges" class="relative">
<app-layer level="2" class="p-4 rounded-3xl bg-slate-900/80 border border-slate-800/80 backdrop-blur shadow-xl">
<div class="flex items-center justify-between mb-2">
<span class="text-[10px] font-black text-indigo-400 uppercase tracking-widest">Realtime Hardware Dials</span>
<span class="text-[10px] font-bold text-emerald-400 bg-emerald-500/10 px-2 py-0.5 rounded-full border border-emerald-500/20">● 60 FPS</span>
</div>
<div class="grid grid-cols-2 gap-2 justify-items-center">
<app-gauge value="78" min="0" max="100" unit="%" label="Inverter Load"></app-gauge>
<app-gauge value="94" min="0" max="100" unit="%" label="Storage Reserve"></app-gauge>
</div>
</app-layer>
</app-seg>
<!-- SEGMENT: Dual-Dial HVAC Thermostat -->
<app-seg id="seg-thermostat" class="relative">
<app-layer level="3">
<app-thermostat temp="21.5" mode="cool"></app-thermostat>
</app-layer>
</app-seg>
<!-- SEGMENT: Swipeout Kinetic Alarms List -->
<app-seg id="seg-alarms" class="relative space-y-2">
<div class="flex items-center justify-between px-1">
<span class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Live Alarms (Swipe Left/Right)</span>
<span class="text-[10px] text-indigo-400 font-bold cursor-pointer" hx-action="$appz.sheet('#sheet-diag')">View @diag</span>
</div>
<app-swipeout id="alarm-1" class="relative overflow-hidden rounded-2xl bg-slate-900 border border-slate-800 block">
<div class="swipeout-actions-left absolute inset-y-0 left-0 flex items-center px-4 bg-emerald-600 text-white text-xs font-bold">✓ Ack</div>
<div class="swipeout-content relative bg-slate-900 p-3 z-10 flex items-center justify-between">
<div class="flex items-center gap-3">
<span class="text-xl">⚠️</span>
<div>
<p class="text-xs font-bold text-white">Substation Alpha Temp: 58°C</p>
<p class="text-[10px] text-slate-400">Coolant cycle active • 2 min ago</p>
</div>
</div>
<span class="text-[10px] font-extrabold text-amber-400 bg-amber-500/10 px-2 py-0.5 rounded-full border border-amber-500/20">Warning</span>
</div>
<div class="swipeout-actions-right absolute inset-y-0 right-0 flex items-center px-4 bg-rose-600 text-white text-xs font-bold">✕ Mute</div>
</app-swipeout>
</app-seg>
<!-- SEGMENT: Virtual Twin-Stick Joystick -->
<app-seg id="seg-joystick" class="relative flex flex-col items-center py-2">
<span class="text-[10px] font-black text-slate-500 uppercase tracking-widest mb-2">PTZ Camera / Spatial Twin-Stick</span>
<app-joystick id="ptz-joystick" hx-chan-send="iot:ptz" style="width: 110px; height: 110px;"
class="rounded-full bg-slate-900 border-2 border-indigo-500/40 backdrop-blur flex items-center justify-center touch-none">
<div class="joystick-thumb w-10 h-10 rounded-full bg-indigo-500 shadow-lg pointer-events-none transition-transform"></div>
</app-joystick>
</app-seg>
</div>
<!-- SECTION 2: Domain S1 - Weather & Atmosphere -->
<div hx-show="activeDomain === 'weather'" class="space-y-4">
<!-- Smart Weather Hero Component -->
<div class="smart-weather-hero p-5 rounded-3xl bg-gradient-to-br from-indigo-900/60 via-slate-900 to-slate-950 border border-indigo-700/40 shadow-xl flex flex-col justify-between">
<div class="flex items-start justify-between">
<div>
<span class="text-[10px] font-black uppercase tracking-widest text-indigo-400">Atmospheric Telemetry</span>
<h2 class="text-xl font-black text-white mt-0.5">San Francisco</h2>
<p class="text-xs text-slate-400">Partly Cloudy</p>
</div>
<span class="text-3xl">⛅</span>
</div>
<div class="flex items-baseline gap-2 my-3">
<span class="text-5xl font-black text-white tracking-tighter">21.4</span>
<span class="text-lg font-bold text-slate-400">°C</span>
</div>
<div class="grid grid-cols-3 gap-2 pt-3 border-t border-slate-800/80 text-[10px] text-slate-300">
<div><span class="text-slate-500 block">Feels</span><span class="font-bold">20.8°C</span></div>
<div><span class="text-slate-500 block">Humidity</span><span class="font-bold">54%</span></div>
<div><span class="text-slate-500 block">Wind</span><span class="font-bold">14.2 km/h</span></div>
</div>
</div>
</div>
<!-- SECTION 3: Domain S4 - Car Infotainment Cockpit HUD & TPMS -->
<div hx-show="activeDomain === 'car'" class="space-y-4">
<!-- Smart Car Cockpit HUD Component -->
<div class="smart-car-cockpit-hud p-6 rounded-3xl bg-slate-950 border border-slate-800 shadow-2xl flex flex-col justify-between"
hx-state='{ "speed": 104 }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-900">
<div class="flex items-center gap-2">
<span class="text-xs font-black text-indigo-400">TESLA-DRIVE</span>
<span class="text-[10px] font-bold text-slate-500">AUTONOMOUS L4</span>
</div>
<div class="flex items-center gap-3 text-xs font-black">
<span class="text-slate-500">P</span>
<span class="text-slate-500">R</span>
<span class="text-slate-500">N</span>
<span class="text-indigo-400 px-2 py-0.5 rounded-lg bg-indigo-500/20 border border-indigo-500/30">D</span>
</div>
</div>
<div class="flex items-center justify-around py-6">
<div class="flex flex-col items-center">
<span class="text-6xl font-black text-white tracking-tight" hx-text="speed">104</span>
<span class="text-[11px] font-extrabold uppercase tracking-widest text-slate-400 mt-1">KM / H</span>
</div>
<div class="w-10 h-10 rounded-full border-4 border-rose-600 bg-white text-black flex items-center justify-center font-black text-xs shadow-md">
100
</div>
</div>
<div class="grid grid-cols-2 gap-3 pt-3 border-t border-slate-900 text-xs">
<div class="flex items-center gap-2">
<span class="text-emerald-400">🔋</span>
<span class="font-bold text-white">82% Battery</span>
</div>
<div class="flex items-center justify-end gap-1 font-bold text-indigo-400">
<span>428 km</span>
<span class="text-[10px] text-slate-500 uppercase">Est. Range</span>
</div>
</div>
</div>
<!-- Smart Tire Pressure TPMS -->
<div class="smart-tire-pressure-tpms p-5 rounded-3xl bg-slate-900 border border-slate-800 shadow-xl space-y-3">
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<span class="text-[10px] font-black uppercase tracking-widest text-indigo-400">Tire Pressure Monitor (TPMS)</span>
<span class="text-[10px] font-bold text-emerald-400">All Normal</span>
</div>
<div class="relative w-48 h-48 mx-auto bg-slate-950 rounded-2xl border border-slate-800 flex items-center justify-center p-3">
<div class="w-16 h-32 border-2 border-slate-700/50 rounded-2xl absolute"></div>
<div class="absolute top-3 left-2 text-[10px] font-black text-white bg-slate-900 px-1.5 py-0.5 rounded border border-emerald-500/50">FL: 2.3</div>
<div class="absolute top-3 right-2 text-[10px] font-black text-white bg-slate-900 px-1.5 py-0.5 rounded border border-emerald-500/50">FR: 2.3</div>
<div class="absolute bottom-3 left-2 text-[10px] font-black text-white bg-slate-900 px-1.5 py-0.5 rounded border border-emerald-500/50">RL: 2.5</div>
<div class="absolute bottom-3 right-2 text-[10px] font-black text-white bg-slate-900 px-1.5 py-0.5 rounded border border-emerald-500/50">RR: 2.5</div>
<span class="text-[9px] text-slate-500 font-bold uppercase tracking-widest z-10">BAR</span>
</div>
</div>
</div>
<!-- SECTION 4: Domain S3 - Smart Home 8-Channel Relays & Dials -->
<div hx-show="activeDomain === 'iot'" class="space-y-4">
<!-- Smart 8-Channel Relay Switchboard -->
<div class="smart-relay-switchboard p-5 rounded-3xl bg-slate-900 border border-slate-800 shadow-xl space-y-3">
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<span class="text-[10px] font-black uppercase tracking-widest text-indigo-400">8-Channel Power Relays</span>
<button class="text-[10px] font-extrabold text-rose-400 bg-rose-500/10 px-2 py-0.5 rounded-full border border-rose-500/20" hx-action="$appz.haptic('heavy')">Killswitch</button>
</div>
<div class="grid grid-cols-2 gap-2">
<div class="p-3 rounded-2xl border bg-indigo-600 text-white border-indigo-500 shadow-md shadow-indigo-600/20 flex items-center justify-between">
<div>
<span class="text-xs font-bold block">Relay 01: Servers</span>
<span class="text-[9px] text-indigo-200">420 Watts</span>
</div>
<button class="w-8 h-5 rounded-full bg-slate-950 p-0.5 relative" hx-action="$appz.haptic('selection')">
<div class="w-4 h-4 rounded-full bg-white shadow-md translate-x-3"></div>
</button>
</div>
<div class="p-3 rounded-2xl border bg-slate-800 text-slate-400 border-slate-700/40 flex items-center justify-between">
<div>
<span class="text-xs font-bold block">Relay 02: Lights</span>
<span class="text-[9px] text-slate-500">0 Watts (Off)</span>
</div>
<button class="w-8 h-5 rounded-full bg-slate-950 p-0.5 relative" hx-action="$appz.haptic('selection')">
<div class="w-4 h-4 rounded-full bg-slate-600 shadow-md"></div>
</button>
</div>
</div>
</div>
<!-- Smart Rotary Volume -->
<div class="smart-rotary-volume p-5 rounded-3xl bg-slate-900 border border-slate-800 flex flex-col items-center gap-3 shadow-xl"
hx-state='{ "vol": 65, "muted": false }'>
<span class="text-[10px] font-black uppercase tracking-widest text-indigo-400">Audio Master Level</span>
<div class="relative w-28 h-28 flex items-center justify-center">
<div class="w-24 h-24 rounded-full bg-gradient-to-tr from-slate-950 via-slate-800 to-slate-900 border-4 border-indigo-500/40 shadow-inner flex flex-col items-center justify-center cursor-pointer active:scale-95 transition-all"
hx-action="muted = !muted; $appz.haptic('medium')">
<span class="text-xl font-black text-white" hx-text="muted ? 'MUTED' : vol + '%'">65%</span>
<span class="text-[8px] text-slate-400 font-bold">Sonos Arc</span>
</div>
</div>
<div class="flex items-center gap-3">
<button class="px-3 py-1 rounded-xl bg-slate-800 text-xs font-bold text-slate-300 active:scale-90 transition-all" hx-action="vol = Math.max(0, vol - 10); $appz.haptic('selection')">-10</button>
<button class="px-3 py-1 rounded-xl bg-indigo-600 text-xs font-bold text-white active:scale-90 transition-all" hx-action="vol = Math.min(100, vol + 10); $appz.haptic('selection')">+10</button>
</div>
</div>
</div>
<!-- SECTION 5: Domain S3 - Solar Power Flow Matrix -->
<div hx-show="activeDomain === 'solar'" class="space-y-4">
<div class="smart-solar-power-flow p-5 rounded-3xl bg-gradient-to-b from-slate-900 to-slate-950 border border-slate-800 shadow-xl space-y-4">
<div class="flex items-center justify-between">
<span class="text-[10px] font-black uppercase tracking-widest text-amber-400">Solar Energy Flow Matrix</span>
<span class="text-[10px] font-bold text-emerald-400">● 100% Clean</span>
</div>
<div class="grid grid-cols-2 gap-3 text-center">
<div class="p-3 rounded-2xl bg-amber-500/10 border border-amber-500/30">
<span class="text-xl">☀️</span>
<span class="text-xs font-bold text-slate-300 block mt-1">Solar PV</span>
<span class="text-base font-black text-amber-400">5.8 kW</span>
</div>
<div class="p-3 rounded-2xl bg-emerald-500/10 border border-emerald-500/30">
<span class="text-xl">🔋</span>
<span class="text-xs font-bold text-slate-300 block mt-1">Powerwall</span>
<span class="text-base font-black text-emerald-400">3.2 kW</span>
</div>
<div class="p-3 rounded-2xl bg-indigo-500/10 border border-indigo-500/30">
<span class="text-xl">🏠</span>
<span class="text-xs font-bold text-slate-300 block mt-1">Home Load</span>
<span class="text-base font-black text-indigo-400">2.1 kW</span>
</div>
<div class="p-3 rounded-2xl bg-slate-800/60 border border-slate-700/60">
<span class="text-xl">⚡</span>
<span class="text-xs font-bold text-slate-300 block mt-1">Grid Export</span>
<span class="text-base font-black text-slate-300">0.5 kW</span>
</div>
</div>
</div>
</div>
<!-- SECTION 6: Domain S5 - Industrial Factory HMI -->
<div hx-show="activeDomain === 'factory'" class="space-y-4">
<div class="smart-conveyor-belt p-5 rounded-3xl bg-slate-900 border border-slate-800 shadow-xl space-y-3">
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[10px] font-black uppercase tracking-widest text-indigo-400">Production Line HMI</span>
<h3 class="text-xs font-bold text-white">Main Packaging Line 02</h3>
</div>
<span class="text-[10px] font-extrabold px-2 py-0.5 rounded-full border bg-emerald-500/10 text-emerald-400 border-emerald-500/20">1450 RPM</span>
</div>
<div class="flex items-center gap-3">
<button class="flex-1 py-2 rounded-xl bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs active:scale-95 transition-all" hx-action="$appz.haptic('success')">Start VFD</button>
<button class="flex-1 py-2 rounded-xl bg-rose-600 hover:bg-rose-500 text-white font-bold text-xs active:scale-95 transition-all" hx-action="$appz.haptic('error')">Emergency Stop</button>
</div>
</div>
</div>
<!-- SECTION 7: Domain S7 - Health Vitals PPG Heart Rate -->
<div hx-show="activeDomain === 'health'" class="space-y-4">
<div class="smart-heart-rate p-5 rounded-3xl bg-gradient-to-br from-rose-950/40 via-slate-900 to-slate-950 border border-rose-900/40 shadow-xl flex items-center justify-between">
<div>
<span class="text-[10px] font-black uppercase tracking-widest text-rose-400">Continuous PPG Sensor</span>
<div class="flex items-baseline gap-2 mt-1">
<span class="text-4xl font-black text-white">72</span>
<span class="text-xs font-bold text-slate-400 uppercase">BPM</span>
</div>
<span class="text-[10px] font-bold text-rose-400 mt-1 block">● Resting Cardio Zone</span>
</div>
<span class="text-4xl animate-pulse">❤️</span>
</div>
</div>
<!-- SECTION 8: Research Science Design Blocks -->
<div hx-show="activeDomain === 'research'" class="space-y-4">
<!-- Research Sub-Category Tab Bar -->
<div class="p-1 bg-slate-900 rounded-2xl border border-slate-800 flex items-center gap-1 overflow-x-auto text-[10px] font-bold">
<button class="px-2.5 py-1 rounded-xl transition-all whitespace-nowrap"
hx-class='{ "bg-violet-600 text-white shadow-md shadow-violet-600/30": researchTab === "pathology", "text-slate-400": researchTab !== "pathology" }'
hx-action="researchTab = 'pathology'; $appz.haptic('selection')">🔬 Pathology</button>
<button class="px-2.5 py-1 rounded-xl transition-all whitespace-nowrap"
hx-class='{ "bg-cyan-600 text-white shadow-md shadow-cyan-600/30": researchTab === "radiology", "text-slate-400": researchTab !== "radiology" }'
hx-action="researchTab = 'radiology'; $appz.haptic('selection')">☢️ Radiology</button>
<button class="px-2.5 py-1 rounded-xl transition-all whitespace-nowrap"
hx-class='{ "bg-emerald-600 text-white shadow-md shadow-emerald-600/30": researchTab === "atlas", "text-slate-400": researchTab !== "atlas" }'
hx-action="researchTab = 'atlas'; $appz.haptic('selection')">🧬 Cell Atlas</button>
<button class="px-2.5 py-1 rounded-xl transition-all whitespace-nowrap"
hx-class='{ "bg-purple-600 text-white shadow-md shadow-purple-600/30": researchTab === "crispr", "text-slate-400": researchTab !== "crispr" }'
hx-action="researchTab = 'crispr'; $appz.haptic('selection')">✂️ CRISPR</button>
<button class="px-2.5 py-1 rounded-xl transition-all whitespace-nowrap"
hx-class='{ "bg-amber-600 text-white shadow-md shadow-amber-600/30": researchTab === "genomic", "text-slate-400": researchTab !== "genomic" }'
hx-action="researchTab = 'genomic'; $appz.haptic('selection')">🗺️ Genomic Map</button>
</div>
<!-- Research Design Block Container -->
<div hx-show="researchTab === 'pathology'">
<div class="block-pathology-lab rounded-3xl bg-slate-950 border border-slate-800 shadow-xl overflow-hidden flex flex-col p-4 space-y-3"
hx-state='{ "mag": "40x", "ki67": 34.2, "mitoticCount": 18 }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[9px] font-black uppercase tracking-wider text-violet-400">Pathology WSI Scanner</span>
<h3 class="text-xs font-bold text-white">#BIO-84920 (FFPE Core Biopsy)</h3>
</div>
<span class="text-[10px] font-bold px-2 py-0.5 rounded-lg bg-violet-500/20 text-violet-300" hx-text="mag">40x</span>
</div>
<div class="grid grid-cols-2 gap-2 text-xs">
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Ki-67 Index</span>
<span class="text-lg font-black text-rose-400" hx-text="ki67 + '%'">34.2%</span>
</div>
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Nottingham Grade</span>
<span class="text-xs font-black text-rose-400 mt-1 block">GRADE III</span>
</div>
</div>
<div class="flex items-center justify-between pt-2 border-t border-slate-900 text-[10px] text-slate-400">
<span>Mitosis Tally: <strong class="text-white" hx-text="mitoticCount">18</strong></span>
<button class="px-3 py-1 rounded-xl bg-violet-600 text-white font-bold" hx-action="mitoticCount++; $appz.haptic('medium')">+ Tally</button>
</div>
</div>
</div>
<div hx-show="researchTab === 'radiology'">
<div class="block-radiology-dicom rounded-3xl bg-slate-950 border border-slate-800 shadow-xl overflow-hidden flex flex-col p-4 space-y-3"
hx-state='{ "slice": 142, "roiMean": 42.5 }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[9px] font-black uppercase tracking-wider text-cyan-400">Radiology DICOM MPR</span>
<h3 class="text-xs font-bold text-white">#RAD-2026-X99 (Chest CT)</h3>
</div>
<span class="text-[10px] font-bold px-2 py-0.5 rounded-lg bg-cyan-500/20 text-cyan-300">RECIST 1.1</span>
</div>
<div class="p-3 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Target Lesion 1 LUL</span>
<div class="flex items-baseline justify-between mt-1">
<span class="text-2xl font-black text-white" hx-text="roiMean + ' HU'">+42.5 HU</span>
<span class="text-xs font-black text-rose-400">+29.1% PD</span>
</div>
</div>
<div class="flex items-center justify-between pt-2 border-t border-slate-900 text-[10px] text-slate-400">
<span>Slice: <strong class="text-cyan-400 font-mono" hx-text="slice + ' / 320'">142 / 320</strong></span>
<div class="flex gap-1">
<button class="px-2 py-0.5 rounded-lg bg-slate-800 text-white font-bold" hx-action="slice = Math.max(1, slice - 1); $appz.haptic('selection')">◀</button>
<button class="px-2 py-0.5 rounded-lg bg-slate-800 text-white font-bold" hx-action="slice = Math.min(320, slice + 1); $appz.haptic('selection')">▶</button>
</div>
</div>
</div>
</div>
<div hx-show="researchTab === 'atlas'">
<div class="block-biology-atlas rounded-3xl bg-slate-950 border border-slate-800 shadow-xl overflow-hidden flex flex-col p-4 space-y-3"
hx-state='{ "gene": "TNNT2", "cluster": "Cardiomyocytes", "pct": 48.2 }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[9px] font-black uppercase tracking-wider text-emerald-400">Human Biology Atlas</span>
<h3 class="text-xs font-bold text-white">Left Ventricle Myocardium</h3>
</div>
<span class="text-[10px] font-bold px-2 py-0.5 rounded-lg bg-emerald-500/20 text-emerald-300">HCA v3.2</span>
</div>
<div class="p-3 rounded-2xl bg-slate-900 border border-slate-800">
<div class="flex justify-between items-baseline">
<span class="text-xs font-black text-white" hx-text="cluster">Cardiomyocytes</span>
<span class="text-xl font-black text-emerald-400" hx-text="pct + '%'">48.2%</span>
</div>
<span class="text-[9px] text-slate-400 block mt-1">Marker: TNNT2 • Spot Pitch: 55 µm</span>
</div>
</div>
</div>
<div hx-show="researchTab === 'crispr'">
<div class="block-crispr-studio rounded-3xl bg-slate-950 border border-slate-800 shadow-xl overflow-hidden flex flex-col p-4 space-y-3"
hx-state='{ "onTarget": 88, "offTarget": 94, "targetGene": "HBB" }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[9px] font-black uppercase tracking-wider text-purple-400">CRISPR Studio</span>
<h3 class="text-xs font-bold text-white">HBB (Sickle Cell E6V)</h3>
</div>
<span class="text-[10px] font-bold px-2 py-0.5 rounded-lg bg-purple-500/20 text-purple-300">SpCas9</span>
</div>
<div class="grid grid-cols-2 gap-2 text-xs">
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">On-Target</span>
<span class="text-lg font-black text-emerald-400" hx-text="onTarget + ' / 100'">88 / 100</span>
</div>
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Off-Target</span>
<span class="text-lg font-black text-purple-400" hx-text="offTarget + ' / 100'">94 / 100</span>
</div>
</div>
</div>
</div>
<div hx-show="researchTab === 'genomic'">
<div class="block-genomic-map rounded-3xl bg-slate-950 border border-slate-800 shadow-xl overflow-hidden flex flex-col p-4 space-y-3"
hx-state='{ "variant": "rs334" }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[9px] font-black uppercase tracking-wider text-amber-400">Genome Browser</span>
<h3 class="text-xs font-bold text-white">chr11:5,224,000–5,230,000</h3>
</div>
<span class="text-[10px] font-bold px-2 py-0.5 rounded-lg bg-amber-500/20 text-amber-300">GRCh38</span>
</div>
<div class="p-3 rounded-2xl bg-slate-900 border border-slate-800">
<div class="flex justify-between items-baseline">
<span class="text-xs font-mono font-black text-rose-400" hx-text="variant + ' (A>T)'">rs334 (A>T)</span>
<span class="text-[10px] font-black text-rose-400">PATHOGENIC</span>
</div>
<span class="text-[9px] text-slate-400 block mt-1">p.Glu7Val • gnomAD AF: 0.042</span>
</div>
</div>
</div>
</div>
<!-- SECTION 9: Heavy Engineering Design Blocks -->
<div hx-show="activeDomain === 'industrial'" class="space-y-4">
<!-- Industrial Sub-Category Tab Bar -->
<div class="p-1 bg-slate-900 rounded-2xl border border-slate-800 flex items-center gap-1 overflow-x-auto text-[10px] font-bold">
<button class="px-2.5 py-1 rounded-xl transition-all whitespace-nowrap"
hx-class='{ "bg-orange-600 text-white shadow-md shadow-orange-600/30": industrialTab === "civil", "text-slate-400": industrialTab !== "civil" }'
hx-action="industrialTab = 'civil'; $appz.haptic('selection')">📐 Civil / Arch</button>
<button class="px-2.5 py-1 rounded-xl transition-all whitespace-nowrap"
hx-class='{ "bg-blue-600 text-white shadow-md shadow-blue-600/30": industrialTab === "marine", "text-slate-400": industrialTab !== "marine" }'
hx-action="industrialTab = 'marine'; $appz.haptic('selection')">⚓ Marine / GPS</button>
<button class="px-2.5 py-1 rounded-xl transition-all whitespace-nowrap"
hx-class='{ "bg-lime-600 text-white shadow-md shadow-lime-600/30": industrialTab === "agri", "text-slate-400": industrialTab !== "agri" }'
hx-action="industrialTab = 'agri'; $appz.haptic('selection')">🌾 Precision Agri</button>
<button class="px-2.5 py-1 rounded-xl transition-all whitespace-nowrap"
hx-class='{ "bg-amber-600 text-white shadow-md shadow-amber-600/30": industrialTab === "energy", "text-slate-400": industrialTab !== "energy" }'
hx-action="industrialTab = 'energy'; $appz.haptic('selection')">⚡ SCADA Energy</button>
<button class="px-2.5 py-1 rounded-xl transition-all whitespace-nowrap"
hx-class='{ "bg-teal-600 text-white shadow-md shadow-teal-600/30": industrialTab === "pcb", "text-slate-400": industrialTab !== "pcb" }'
hx-action="industrialTab = 'pcb'; $appz.haptic('selection')">💻 PCB / Chip Fab</button>
</div>
<!-- Industrial Design Block Container -->
<div hx-show="industrialTab === 'civil'">
<div class="block-civil-architect rounded-3xl bg-slate-950 border border-slate-800 shadow-xl overflow-hidden flex flex-col p-4 space-y-3"
hx-state='{ "area": 842.5, "deflect": 4.2 }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[9px] font-black uppercase tracking-wider text-orange-400">Civil & BIM Studio</span>
<h3 class="text-xs font-bold text-white">Parkview Tower (Level 04)</h3>
</div>
<span class="text-[10px] font-bold px-2 py-0.5 rounded-lg bg-orange-500/20 text-orange-300">ISO 19650</span>
</div>
<div class="grid grid-cols-2 gap-2 text-xs">
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Floor Area</span>
<span class="text-lg font-black text-white" hx-text="area + ' m²'">842.5 m²</span>
</div>
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Max Deflection</span>
<span class="text-lg font-black text-emerald-400" hx-text="deflect + ' mm'">4.2 mm</span>
</div>
</div>
</div>
</div>
<div hx-show="industrialTab === 'marine'">
<div class="block-marine-navigation rounded-3xl bg-slate-950 border border-slate-800 shadow-xl overflow-hidden flex flex-col p-4 space-y-3"
hx-state='{ "sog": 14.2, "cog": 248, "ukc": 18.4 }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[9px] font-black uppercase tracking-wider text-blue-400">ECDIS Marine Navigation</span>
<h3 class="text-xs font-bold text-white">R/V NEPTUNE EXPLORER</h3>
</div>
<span class="text-[10px] font-bold px-2 py-0.5 rounded-lg bg-blue-500/20 text-blue-300">IMO / SOLAS</span>
</div>
<div class="grid grid-cols-3 gap-2 text-xs text-center">
<div class="p-2 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[8px] text-slate-500 block uppercase">SOG</span>
<span class="text-base font-black text-white" hx-text="sog + ' kn'">14.2 kn</span>
</div>
<div class="p-2 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[8px] text-slate-500 block uppercase">COG</span>
<span class="text-base font-black text-white" hx-text="cog + '°'">248°</span>
</div>
<div class="p-2 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[8px] text-slate-500 block uppercase">Keel Clr</span>
<span class="text-base font-black text-cyan-400" hx-text="ukc + ' m'">18.4 m</span>
</div>
</div>
</div>
</div>
<div hx-show="industrialTab === 'agri'">
<div class="block-agriculture-precision rounded-3xl bg-slate-950 border border-slate-800 shadow-xl overflow-hidden flex flex-col p-4 space-y-3"
hx-state='{ "ndvi": 0.78, "moist": 28.4 }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[9px] font-black uppercase tracking-wider text-lime-400">Precision Agronomy</span>
<h3 class="text-xs font-bold text-white">Parcel-B4 North Pivot</h3>
</div>
<span class="text-[10px] font-bold px-2 py-0.5 rounded-lg bg-lime-500/20 text-lime-300">160 Ha</span>
</div>
<div class="grid grid-cols-2 gap-2 text-xs">
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Mean NDVI</span>
<span class="text-lg font-black text-lime-400" hx-text="ndvi">0.78</span>
</div>
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Soil VWC% (30cm)</span>
<span class="text-lg font-black text-emerald-400" hx-text="moist + '%'">28.4%</span>
</div>
</div>
</div>
</div>
<div hx-show="industrialTab === 'energy'">
<div class="block-energy-scada rounded-3xl bg-slate-950 border border-slate-800 shadow-xl overflow-hidden flex flex-col p-4 space-y-3"
hx-state='{ "loadMw": 142.5, "psi": 2840 }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[9px] font-black uppercase tracking-wider text-amber-400">Energy & SCADA Grid</span>
<h3 class="text-xs font-bold text-white">Substation Delta-4 (230kV)</h3>
</div>
<span class="text-[10px] font-bold px-2 py-0.5 rounded-lg bg-amber-500/20 text-amber-300">IEC 61850</span>
</div>
<div class="grid grid-cols-2 gap-2 text-xs">
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Grid Active Load</span>
<span class="text-lg font-black text-white" hx-text="loadMw + ' MW'">142.5 MW</span>
</div>
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Wellhead Tubing</span>
<span class="text-lg font-black text-amber-400" hx-text="psi + ' PSI'">2,840 PSI</span>
</div>
</div>
</div>
</div>
<div hx-show="industrialTab === 'pcb'">
<div class="block-pcb-semiconductor rounded-3xl bg-slate-950 border border-slate-800 shadow-xl overflow-hidden flex flex-col p-4 space-y-3"
hx-state='{ "zDiff": 90.2, "yield": 94.8 }'>
<div class="flex items-center justify-between pb-2 border-b border-slate-800/80">
<div>
<span class="text-[9px] font-black uppercase tracking-wider text-teal-400">PCB EDA & Semiconductor Fab</span>
<h3 class="text-xs font-bold text-white">BGA-1156 SoC Board (Rev D4)</h3>
</div>
<span class="text-[10px] font-bold px-2 py-0.5 rounded-lg bg-teal-500/20 text-teal-300">12-Layer</span>
</div>
<div class="grid grid-cols-2 gap-2 text-xs">
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">PCIe Z_diff</span>
<span class="text-lg font-black text-teal-400" hx-text="zDiff + ' Ω'">90.2 Ω</span>
</div>
<div class="p-2.5 rounded-2xl bg-slate-900 border border-slate-800">
<span class="text-[9px] text-slate-500 uppercase block">Wafer Die Yield</span>
<span class="text-lg font-black text-emerald-400" hx-text="yield + '%'">94.8%</span>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- 5. Floating Capsule Bottom Navigation -->
<app-navbar mode="float" behavior="always-visible"
class="mx-4 mb-3 rounded-2xl bg-slate-900/90 backdrop-blur-lg border border-slate-800 shadow-2xl h-14 px-4 flex items-center justify-around shrink-0 z-40">
<button class="flex flex-col items-center gap-0.5 text-indigo-400 font-bold text-[10px]" hx-action="$appz.haptic('selection'); activeDomain = 'cockpit'">
<span class="text-sm">⚡</span>
<span>Hub</span>
</button>
<button class="flex flex-col items-center gap-0.5 text-slate-400 text-[10px]" hx-action="$appz.toggleControlCenter()">
<span class="text-sm">🎛️</span>
<span>Control</span>
</button>
<button class="flex flex-col items-center gap-0.5 text-slate-400 text-[10px]" hx-action="$appz.sheet('#sheet-diag')">
<span class="text-sm">🔬</span>
<span>@diag</span>
</button>
<button class="flex flex-col items-center gap-0.5 text-slate-400 text-[10px]" hx-action="$appz.toggleMultitask()">
<span class="text-sm">📑</span>
<span>Tasks</span>
</button>
</app-navbar>
<!-- 6. LAYER-UX OVERLAY: Control Center Quick Settings -->
<app-control-center id="app-control-center" data-open="false"
class="absolute inset-0 z-50 bg-slate-950/85 backdrop-blur-2xl p-6 flex flex-col justify-between transition-all duration-300 opacity-0 pointer-events-none -translate-y-full">
<div>
<div class="flex items-center justify-between pb-4 border-b border-slate-800/80">
<span class="font-black text-sm uppercase tracking-wider text-slate-300">Quick Settings</span>
<button hx-action="$appz.toggleControlCenter()" class="w-8 h-8 rounded-full bg-slate-800 flex items-center justify-center text-xs text-slate-300">✕</button>
</div>
<div class="grid grid-cols-3 gap-3 mt-6">
<button class="p-4 rounded-2xl bg-indigo-600 text-white font-bold text-xs flex flex-col items-center gap-2 shadow-lg shadow-indigo-600/30"
hx-action="$appz.haptic('selection')">
<span class="text-2xl">📶</span>
<span>Wi-Fi 5G</span>
</button>
<button class="p-4 rounded-2xl bg-slate-800 text-slate-300 font-bold text-xs flex flex-col items-center gap-2"
hx-action="$appz.haptic('selection')">
<span class="text-2xl">⚡</span>
<span>Relay 01</span>
</button>
<button class="p-4 rounded-2xl bg-slate-800 text-slate-300 font-bold text-xs flex flex-col items-center gap-2"
hx-action="$appz.haptic('selection')">
<span class="text-2xl">💡</span>
<span>HVAC Aux</span>
</button>
</div>
</div>
<button hx-action="$appz.toggleControlCenter()" class="w-full py-3 rounded-2xl bg-slate-900 border border-slate-800 text-slate-300 font-bold text-xs">Close</button>
</app-control-center>
<!-- 7. LAYER-UX OVERLAY: Multitasking Card Carousel -->
<app-multitask id="app-multitask" data-open="false"
class="absolute inset-0 z-50 bg-slate-950/90 backdrop-blur-2xl p-6 hidden flex-col justify-center items-center gap-6 transition-all duration-300">
<span class="text-xs font-black uppercase tracking-widest text-indigo-400">Active Tasks & Dashboards</span>
<div class="flex items-center gap-4 overflow-x-auto max-w-full py-4">
<div class="w-48 h-64 rounded-2xl bg-slate-900 border border-indigo-500/50 p-4 shadow-2xl flex flex-col justify-between cursor-pointer active:scale-95 transition-all"
hx-action="$appz.toggleMultitask(); activeDomain = 'cockpit'">
<div class="flex items-center justify-between">
<span class="text-xl">⚡</span>
<span class="text-[9px] font-bold px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-400">Active</span>
</div>
<p class="font-black text-white text-xs">Grid Cockpit</p>
</div>
<div class="w-48 h-64 rounded-2xl bg-slate-900 border border-slate-800 p-4 shadow-2xl flex flex-col justify-between cursor-pointer active:scale-95 transition-all"
hx-action="$appz.toggleMultitask(); activeDomain = 'car'">
<div class="flex items-center justify-between">
<span class="text-xl">🚗</span>
<span class="text-[9px] font-bold px-2 py-0.5 rounded-full bg-indigo-500/20 text-indigo-400">Running</span>
</div>
<p class="font-black text-white text-xs">Tesla IVI HUD</p>
</div>
</div>
<button hx-action="$appz.toggleMultitask()" class="px-6 py-2 rounded-xl bg-slate-800 text-slate-300 font-bold text-xs">Back to Shell</button>
</app-multitask>
<!-- 8. LAYER-UX OVERLAY: Lock Screen with Tactile PIN Keypad -->
<app-lockscreen id="app-lockscreen" data-locked="false"
class="absolute inset-0 z-50 bg-black p-8 hidden flex-col items-center justify-between transition-all duration-300">
<div class="flex flex-col items-center pt-8">
<span class="text-4xl">🔒</span>
<h2 class="text-xl font-black text-white mt-3">Device Locked</h2>
<p class="text-xs text-slate-500 mt-1">Enter Master PIN (Default: 1234)</p>
</div>
<app-keypad target="#pin-display" digits="4" valid-pin="1234" class="w-full flex flex-col items-center gap-6">
<div id="pin-display" class="flex items-center gap-4"></div>
<div class="grid grid-cols-3 gap-3">
<button data-key="1" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-base font-bold text-white flex items-center justify-center active:scale-90 transition-all">1</button>
<button data-key="2" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-base font-bold text-white flex items-center justify-center active:scale-90 transition-all">2</button>
<button data-key="3" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-base font-bold text-white flex items-center justify-center active:scale-90 transition-all">3</button>
<button data-key="4" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-base font-bold text-white flex items-center justify-center active:scale-90 transition-all">4</button>
<button data-key="5" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-base font-bold text-white flex items-center justify-center active:scale-90 transition-all">5</button>
<button data-key="6" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-base font-bold text-white flex items-center justify-center active:scale-90 transition-all">6</button>
<button data-key="7" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-base font-bold text-white flex items-center justify-center active:scale-90 transition-all">7</button>
<button data-key="8" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-base font-bold text-white flex items-center justify-center active:scale-90 transition-all">8</button>
<button data-key="9" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-base font-bold text-white flex items-center justify-center active:scale-90 transition-all">9</button>
<button data-key="clear" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-xs font-bold text-slate-400 flex items-center justify-center active:scale-90 transition-all">C</button>
<button data-key="0" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-base font-bold text-white flex items-center justify-center active:scale-90 transition-all">0</button>
<button data-key="backspace" class="w-14 h-14 rounded-full bg-slate-900 hover:bg-slate-800 border border-slate-800 text-xs font-bold text-slate-400 flex items-center justify-center active:scale-90 transition-all">⌫</button>
</div>
</app-keypad>
<button hx-action="$appz.unlock()" class="text-xs font-bold text-indigo-400 pb-2">Bypass Unlock (Demo)</button>
</app-lockscreen>
<!-- 9. LAYER-UX OVERLAY: Multi-Snap Bottom Sheet for @diag Telemetry -->
<app-bottom-sheet id="sheet-diag" class="absolute inset-x-0 bottom-0 z-50 bg-slate-900/95 border-t border-slate-800 rounded-t-3xl p-5 shadow-2xl backdrop-blur-xl hidden translate-y-full transition-transform">
<div class="drag-handle w-12 h-1 bg-slate-700 rounded-full mx-auto mb-4 cursor-grab"></div>
<div class="flex items-center justify-between mb-4">
<span class="text-xs font-black text-white uppercase tracking-wider">🔬 4-Layer @diag Telemetry</span>
<button hx-action="$appz.sheetClose('#sheet-diag')" class="text-xs text-slate-400 font-bold">✕ Close</button>
</div>
<div class="space-y-3 text-[11px]">
<div class="p-3 rounded-2xl bg-slate-950/80 border border-slate-800">
<span class="font-extrabold text-indigo-400 uppercase tracking-widest text-[9px]">Layer-Firm (Hardware HAL)</span>
<p class="text-slate-300 mt-1 font-mono">Battery: 94% (4.12V) • RSSI: 4/4 Bars • Temp: 22.4°C • Lux: 420</p>
</div>
<div class="p-3 rounded-2xl bg-slate-950/80 border border-slate-800">
<span class="font-extrabold text-emerald-400 uppercase tracking-widest text-[9px]">Layer-Sys (OS Subsystems)</span>
<p class="text-slate-300 mt-1 font-mono">Power: Awake • IPC Channels: 6 Active • Storage: Ready</p>
</div>
<div class="p-3 rounded-2xl bg-slate-950/80 border border-slate-800">
<span class="font-extrabold text-amber-400 uppercase tracking-widest text-[9px]">Layer-Srv (Service Daemons)</span>
<p class="text-slate-300 mt-1 font-mono">Telemetry: Streaming (2000ms) • Alarms: 2 Active • OTA: v2.4.0</p>
</div>
<div class="p-3 rounded-2xl bg-slate-950/80 border border-slate-800">
<span class="font-extrabold text-pink-400 uppercase tracking-widest text-[9px]">Layer-UX (Presentation Engine)</span>
<p class="text-slate-300 mt-1 font-mono">Mode: <span class="text-white font-bold" id="diag-view-mode">Mob-P</span> • Elements: 17 Custom Elements</p>
</div>
</div>
<button hx-action="console.log($appz.diag()); $appz.haptic('success')"
class="w-full mt-4 py-2.5 rounded-xl bg-indigo-600 hover:bg-indigo-500 text-white font-bold text-xs shadow-lg shadow-indigo-600/30">
Run Master @diag Console Dump
</button>
</app-bottom-sheet>
<!-- 10. LAYER-UX OVERLAY: Smart Component Library Drawer -->
<app-bottom-sheet id="sheet-smart" class="absolute inset-x-0 bottom-0 z-50 bg-slate-900/95 border-t border-slate-800 rounded-t-3xl p-5 shadow-2xl backdrop-blur-xl hidden translate-y-full transition-transform">
<div class="drag-handle w-12 h-1 bg-slate-700 rounded-full mx-auto mb-4 cursor-grab"></div>
<div class="flex items-center justify-between mb-4">
<span class="text-xs font-black text-white uppercase tracking-wider">⚡ 100 Smart Components Hub</span>
<button hx-action="$appz.sheetClose('#sheet-smart')" class="text-xs text-slate-400 font-bold">✕ Close</button>
</div>
<div class="grid grid-cols-2 gap-2 text-xs font-bold">
<button hx-action="activeDomain = 'weather'; $appz.sheetClose('#sheet-smart'); $appz.haptic('selection')" class="p-3 rounded-xl bg-slate-950 border border-slate-800 flex items-center gap-2 hover:border-indigo-500">
<span class="text-lg">⛅</span>
<span>Weather Hero</span>
</button>
<button hx-action="activeDomain = 'car'; $appz.sheetClose('#sheet-smart'); $appz.haptic('selection')" class="p-3 rounded-xl bg-slate-950 border border-slate-800 flex items-center gap-2 hover:border-indigo-500">
<span class="text-lg">🚗</span>
<span>Car Cockpit HUD</span>
</button>
<button hx-action="activeDomain = 'iot'; $appz.sheetClose('#sheet-smart'); $appz.haptic('selection')" class="p-3 rounded-xl bg-slate-950 border border-slate-800 flex items-center gap-2 hover:border-indigo-500">
<span class="text-lg">⚡</span>
<span>8-Relay Board</span>
</button>
<button hx-action="activeDomain = 'solar'; $appz.sheetClose('#sheet-smart'); $appz.haptic('selection')" class="p-3 rounded-xl bg-slate-950 border border-slate-800 flex items-center gap-2 hover:border-indigo-500">
<span class="text-lg">☀️</span>
<span>Solar Flow</span>
</button>
<button hx-action="activeDomain = 'factory'; $appz.sheetClose('#sheet-smart'); $appz.haptic('selection')" class="p-3 rounded-xl bg-slate-950 border border-slate-800 flex items-center gap-2 hover:border-indigo-500">
<span class="text-lg">🏭</span>
<span>Conveyor HMI</span>
</button>
<button hx-action="activeDomain = 'health'; $appz.sheetClose('#sheet-smart'); $appz.haptic('selection')" class="p-3 rounded-xl bg-slate-950 border border-slate-800 flex items-center gap-2 hover:border-indigo-500">
<span class="text-lg">❤️</span>
<span>Heart Rate PPG</span>
</button>
</div>
</app-bottom-sheet>
</app-shellui>
</div>
</div>
</main>
<!-- Footer Information -->
<footer class="w-full max-w-6xl flex items-center justify-between pt-4 border-t border-slate-800/80 mt-4 text-xs text-slate-500">
<div class="flex items-center gap-3">
<span class="w-2 h-2 rounded-full bg-emerald-500"></span>
<span>100 Basic Components • 100 Smart Components • Zero Virtual DOM • Pure Bun & Go</span>
</div>
<span>Hyperstack Engine Suite</span>
</footer>
</body>
</html>