-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmsf.html
More file actions
1717 lines (1554 loc) · 104 KB
/
Copy pathsmsf.html
File metadata and controls
1717 lines (1554 loc) · 104 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
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pension Fund</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&family=Manrope:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.8.2/jspdf.plugin.autotable.min.js"></script>
<style>
:root{--bg:#0a0c10;--surface:#111318;--card:#161920;--border:#232730;--accent:#c8a96e;--accent2:#5c9eff;--accent3:#4ecb8a;--accent4:#e06b6b;--accent5:#b67fff;--text:#e8e3d8;--muted:#7a7f8e;--font-display:'DM Serif Display',Georgia,serif;--font-body:'Manrope',sans-serif;--font-mono:'DM Mono',monospace;--radius:12px}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:var(--bg);color:var(--text);font-family:var(--font-body);font-size:14px;line-height:1.6;min-height:100vh}
body::before{content:'';position:fixed;inset:0;z-index:0;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");opacity:.4}
#app{position:relative;z-index:1;display:flex;flex-direction:column;min-height:100vh}
header{border-bottom:1px solid var(--border);padding:18px 32px;display:flex;align-items:center;justify-content:space-between;background:rgba(10,12,16,.85);backdrop-filter:blur(12px);position:sticky;top:0;z-index:100}
.logo{display:flex;align-items:baseline;gap:10px}
.logo-title{font-family:var(--font-display);font-size:22px;color:var(--accent)}
.header-right{display:flex;align-items:center;gap:16px}
.last-updated{font-size:11px;color:var(--muted);font-family:var(--font-mono)}
.btn{padding:7px 16px;border-radius:6px;border:1px solid var(--border);background:var(--card);color:var(--text);font-size:12px;cursor:pointer;transition:all .15s;font-weight:500}
.btn:hover{border-color:var(--accent);color:var(--accent)}
.btn-accent{background:var(--accent);color:#000;border-color:var(--accent);font-weight:700}
.dropdown{position:relative;display:inline-block}
.dropdown-menu{display:none;position:absolute;right:0;top:calc(100% + 10px);min-width:240px;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:10px;z-index:1000;box-shadow:0 18px 40px rgba(0,0,0,.35)}
.dropdown.open .dropdown-menu{display:block}
.dropdown-item{width:100%;text-align:left;padding:10px 12px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--text);cursor:pointer;font-family:var(--font-body);font-size:13px;font-weight:700}
.dropdown-item:hover{border-color:var(--accent);background:rgba(200,169,110,.08);color:var(--accent)}
.back-link{font-size:11px;color:var(--muted);text-decoration:none;display:flex;align-items:center;gap:5px;letter-spacing:.5px;transition:color .15s}
.back-link:hover{color:var(--accent)}
nav{display:flex;gap:2px;padding:0 32px;border-bottom:1px solid var(--border);background:var(--surface);overflow-x:auto}
.tab{padding:13px 20px;font-size:13px;font-weight:500;color:var(--muted);cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap}
.tab:hover{color:var(--text)}.tab.active{color:var(--accent);border-bottom-color:var(--accent)}
main{flex:1;padding:32px;max-width:1400px;margin:0 auto;width:100%}
.page{display:none}.page.active{display:block;animation:fadeIn .2s ease}
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1}}
.page-title{font-family:var(--font-display);font-size:28px;color:var(--accent);margin-bottom:4px;font-style:italic}
.page-sub{color:var(--muted);font-size:13px;margin-bottom:28px}
h3{font-size:14px;font-weight:700;margin-bottom:12px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:22px}
.kpi{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:18px 20px;position:relative;overflow:hidden}
.kpi::before{content:'';position:absolute;top:0;left:0;right:0;height:2px}
.kpi.gold::before{background:var(--accent)}.kpi.blue::before{background:var(--accent2)}.kpi.green::before{background:var(--accent3)}.kpi.red::before{background:var(--accent4)}
.kpi-label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:1.5px;font-weight:600;margin-bottom:6px}
.kpi-value{font-family:var(--font-mono);font-size:24px}
.kpi-sub{font-size:11px;color:var(--muted);margin-top:4px}
.progress-wrap{margin-bottom:14px}
.progress-header{display:flex;justify-content:space-between;margin-bottom:5px}
.progress-bar{height:6px;background:var(--border);border-radius:99px;overflow:hidden}
.progress-fill{height:100%;border-radius:99px;transition:width .6s ease}
table{width:100%;border-collapse:collapse;font-size:13px}
th{text-align:left;padding:10px 14px;border-bottom:1px solid var(--border);font-size:11px;text-transform:uppercase;color:var(--muted)}
td{padding:12px 14px;border-bottom:1px solid var(--border)}
.table-total-row{font-weight:700;background:rgba(255,255,255,0.02)}
.table-total-row td{border-top:2px solid var(--border);border-bottom:2px solid var(--border)}
.indent-item{padding-left:28px}
.td-mono{font-family:var(--font-mono)}.td-green{color:var(--accent3);font-weight:600}.td-gold{color:var(--accent)}
.td-red{color:var(--accent4);font-weight:600}
.form-group{display:flex;flex-direction:column;gap:5px;margin-bottom:10px}
label{font-size:11px;color:var(--muted);text-transform:uppercase;font-weight:600}
input,select{background:var(--surface);border:1px solid var(--border);border-radius:6px;color:var(--text);padding:9px 12px;font-size:13px}
input:focus,select:focus{outline:none;border-color:var(--accent)}
input[type=number]{font-family:var(--font-mono)}
.badge{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:700;text-transform:uppercase}
.badge-blue{background:rgba(92,158,255,.15);color:var(--accent2);border:1px solid rgba(92,158,255,.3)}
.alert{padding:12px 16px;border-radius:8px;font-size:13px;border-left:3px solid;margin-bottom:16px}
.alert-warn{background:rgba(200,169,110,.08);border-color:var(--accent)}
.alert-info{background:rgba(92,158,255,.08);border-color:var(--accent2)}
.section{margin-bottom:32px}
.chart-wrap{position:relative;width:100%}
.donut-legend{display:flex;flex-direction:column;gap:8px}
.legend-item{display:flex;align-items:center;gap:10px;font-size:12px}
.legend-dot{width:10px;height:10px;border-radius:50%}
.checklist{display:flex;flex-direction:column;gap:10px}
.check-item{display:flex;align-items:flex-start;gap:10px;font-size:13px}
.check-icon{font-size:16px;flex-shrink:0}
.statement-subnav{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:20px}
.subnav-btn{padding:8px 16px;font-size:12px;cursor:pointer;color:var(--muted);border-radius:6px 6px 0 0;border:1px solid transparent;border-bottom:none;margin-bottom:-1px}
.subnav-btn.active{color:var(--accent);background:var(--card);border-color:var(--border)}
#save-toast{position:fixed;bottom:24px;right:24px;z-index:999;background:var(--accent3);color:#000;padding:10px 20px;border-radius:8px;font-weight:700;transform:translateY(80px);transition:transform .3s}
#save-toast.show{transform:translateY(0)}
.site-footer{border-top:1px solid var(--border);padding:20px 32px;color:var(--muted);background:rgba(17,19,24,.6);backdrop-filter:blur(10px)}
.footer-inner{max-width:1400px;margin:0 auto;display:flex;gap:40px;flex-wrap:wrap}
.footer-col{min-width:220px}
.footer-title{font-size:12px;color:var(--text);font-weight:900;letter-spacing:.5px;text-transform:uppercase;margin-bottom:8px}
.site-footer a{color:var(--accent2);text-decoration:none;font-weight:700}
.site-footer a:hover{color:var(--accent)}
.footer-text{font-size:12px;line-height:1.5;max-width:560px}
.empty-state{text-align:center;padding:48px;color:var(--muted)}
.settings-subnav{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:20px;overflow-x:auto;}
.settings-panel{display:none}
.settings-panel.active{display:block}
@media(max-width:900px){.grid-4,.grid-3{grid-template-columns:1fr 1fr}main{padding:20px 16px}}
@media(max-width:600px){.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}.site-footer{padding:18px 16px}}
</style>
</head>
<body>
<div id="app">
<header>
<div class="logo">
<a href="index" class="back-link">← Hub</a>
<span class="logo-title">Pension Fund</span>
</div>
<div class="header-right">
<span class="last-updated" id="last-updated-label">Live Systems Ready</span>
<button class="btn" id="lang-toggle-btn" onclick="toggleLanguage()">🌐 Tiếng Việt</button>
<div class="dropdown" id="header-actions">
<button class="btn" type="button" onclick="document.getElementById('header-actions').classList.toggle('open')">⋯</button>
<div class="dropdown-menu">
<button class="dropdown-item" onclick="showPage('settings'); switchSettingsTab('data-mgmt');">📥 Import Data JSON</button>
<button class="dropdown-item" onclick="exportData()">↓ Export Data JSON</button>
<button class="dropdown-item" onclick="exportPensionFundReport()">📊 Complete PDF Report</button>
<button class="dropdown-item" onclick="showPage('settings')">⚙️ Settings & Inventory</button>
</div>
</div>
<button class="btn btn-accent" onclick="saveAll()">Save</button>
</div>
</header>
<nav>
<div class="tab active" onclick="showPage('dashboard')" id="tab-dashboard">📊 Dashboard</div>
<div class="tab" onclick="showPage('portfolio')" id="tab-portfolio">💼 Investment Portfolio</div>
<div class="tab" onclick="showPage('performance')" id="tab-performance">📈 Performance Track</div>
<div class="tab" onclick="showPage('financials')" id="tab-financials">🧾 Financial Statements</div>
<div class="tab" onclick="showPage('contributions')" id="tab-contributions">💰 Contributions & Caps</div>
<div class="tab" onclick="showPage('compliance')" id="tab-compliance">📋 Compliance</div>
<div class="tab" onclick="showPage('projections')" id="tab-projections">📈 Projections</div>
</nav>
<main>
<div class="page active" id="page-dashboard">
<div class="page-title">Fund Overview</div>
<div class="page-sub">Superannuation fund overview · caps, compliance & projected balance</div>
<div class="grid-4 section" id="kpi-row"></div>
<div class="grid-2 section">
<div class="card">
<h3>Fund Asset Allocation</h3>
<div style="display:flex;gap:24px;align-items:center">
<div style="width:180px;height:180px" class="chart-wrap"><canvas id="donut-chart"></canvas></div>
<div class="donut-legend" id="donut-legend" style="flex:1"></div>
</div>
</div>
<div class="card">
<h3>Years to Preservation Age</h3>
<div style="text-align:center;padding:20px">
<div id="years-to-60" style="font-family:var(--font-display);font-size:64px;color:var(--accent)">—</div>
<div style="color:var(--muted);font-size:13px">Target balance at age 60</div>
</div>
<div id="retirement-progress-bars"></div>
</div>
</div>
<div class="grid-2 section">
<div class="card">
<h3>Annual Contributions Breakdown</h3>
<div class="chart-wrap" style="height:180px"><canvas id="contrib-chart"></canvas></div>
</div>
<div class="card">
<h3>Compliance Snapshot</h3>
<div id="compliance-snapshot" class="checklist"></div>
</div>
</div>
<div class="card section">
<h3>SMSF Strategy Roadmap</h3>
<div class="tbl-wrap" id="roadmap-table"></div>
</div>
</div>
<div class="page" id="page-portfolio">
<div class="page-title">Investment Portfolio</div>
<div class="page-sub">SMSF trust assets · Holdings register, cost base & IPS vs actual</div>
<div class="alert alert-info">💡 SMSF IPS target: Balanced long-term asset structures across standardized global allocation frameworks. Manage actual entries via Settings panel.</div>
<div class="card section">
<table>
<thead>
<tr>
<th>Asset Specification</th>
<th>Asset Class Group</th>
<th>Units Held</th>
<th>Market Price</th>
<th>Current Valuation</th>
<th>Cost Base</th>
<th>Unrealized Gain/Loss</th>
<th>Allocation Weight</th>
</tr>
</thead>
<tbody id="holdings-tbody"></tbody>
<tfoot id="holdings-tfoot"></tfoot>
</table>
</div>
<div class="grid-2 section">
<div class="card">
<h3>IPS Target vs Actual Allocation</h3>
<div id="allocation-bars"></div>
</div>
<div class="card">
<h3>Historical Multi-Year Asset Allocations ($)</h3>
<div style="margin-bottom:12px">
<label>Select Calendar Horizon View</label>
<select id="allocation-year-selector" onchange="updateMultiYearAllocChart()">
<option value="2026">2026 (Current Reporting Cycle)</option>
<option value="2025">2025 (Audited Closeout)</option>
<option value="2024">2024 (Historical Baseline)</option>
</select>
</div>
<div style="height:220px" class="chart-wrap">
<canvas id="multiyear-alloc-chart"></canvas>
</div>
</div>
</div>
</div>
<div class="page" id="page-performance">
<div class="page-title">Performance Track</div>
<div class="page-sub">Historical fund returns data analysis compared against institutional superannuation indicators</div>
<div class="grid-3 section">
<div class="kpi gold">
<div class="kpi-label">Fund 3-Year Compounded Return</div>
<div class="kpi-value" id="perf-fund-roi">8.14%</div>
<div class="kpi-sub">Net of administrative fee extractions</div>
</div>
<div class="kpi blue">
<div class="kpi-label">Super Industry Growth Benchmark</div>
<div class="kpi-value">7.20%</div>
<div class="kpi-sub">Median balanced fund tracking average</div>
</div>
<div class="kpi green">
<div class="kpi-label">Net Alpha Generation Margin</div>
<div class="kpi-value td-green" id="perf-fund-alpha">+0.94%</div>
<div class="kpi-sub">Relative outperformance spread</div>
</div>
</div>
<div class="card section">
<h3>Historical Performance Profile vs Benchmark Indicators (%)</h3>
<div style="height:260px" class="chart-wrap"><canvas id="perf-chart"></canvas></div>
</div>
<div class="card section">
<h3>Historical Operating Profit & Loss Summary Ledger</h3>
<table>
<thead>
<tr>
<th>Performance Metric Vectors</th>
<th class="td-mono">FY2024 ($)</th>
<th class="td-mono">FY2025 ($)</th>
<th class="td-mono">FY2026 (YTD $)</th>
</tr>
</thead>
<tbody id="perf-summary-tbody"></tbody>
</table>
</div>
</div>
<div class="page" id="page-financials">
<div class="page-title">Financial Statements</div>
<div class="page-sub">Auditable dynamic statutory accounting matrices matching general ledger configurations</div>
<div class="statement-subnav">
<div class="subnav-btn active" onclick="switchStatement('income')" id="sbtn-income">Statement of Comprehensive Income</div>
<div class="subnav-btn" onclick="switchStatement('balance')" id="sbtn-balance">Statement of Financial Position (Balance Sheet)</div>
<div class="subnav-btn" onclick="switchStatement('cash')" id="sbtn-cash">Statement of Cash Flows</div>
<div class="subnav-btn" onclick="switchStatement('gains')" id="sbtn-gains">Realised vs Unrealised Yields Matrix</div>
</div>
<div class="card" id="stmt-panel-income">
<h3>Statement of Comprehensive Income (Profit and Loss)</h3>
<table>
<thead><tr><th>Revenue and Expense Classification</th><th class="td-mono">FY2025 ($)</th><th class="td-mono">FY2026 ($)</th></tr></thead>
<tbody>
<tr><td>Franked Dividend Inflows</td><td class="td-mono">14,200</td><td class="td-mono" id="fin-inc-div-f">16,500</td></tr>
<tr><td>Unfranked Dividend Inflows</td><td class="td-mono">3,100</td><td class="td-mono" id="fin-inc-div-u">3,800</td></tr>
<tr><td>Interest Yield Income</td><td class="td-mono">2,450</td><td class="td-mono" id="fin-inc-int">4,120</td></tr>
<tr><td>Commercial Property Rental Gross Revenue</td><td class="td-mono">34,000</td><td class="td-mono" id="fin-inc-rent">36,500</td></tr>
<tr><td>Net Realised Capital Gains Ledger</td><td class="td-mono">12,500</td><td class="td-mono" id="fin-inc-cap">8,900</td></tr>
<tr class="table-total-row"><td>Total Operational Income Revenue</td><td class="td-mono">66,250</td><td class="td-mono" id="fin-inc-total">69,820</td></tr>
<tr><td style="font-weight:600">Operating Outflow Expenses</td><td></td><td></td></tr>
<tr class="indent-item"><td>Accounting & Administration Outgoings</td><td class="td-mono">2,200</td><td class="td-mono" id="fin-exp-admin">2,400</td></tr>
<tr class="indent-item"><td>Approved SMSF Audit Provision Costs</td><td class="td-mono">650</td><td class="td-mono" id="fin-exp-audit">700</td></tr>
<tr class="indent-item"><td>ATO Supervisory Levies Applied</td><td class="td-mono">259</td><td class="td-mono" id="fin-exp-levy">259</td></tr>
<tr class="indent-item"><td>Commercial Property Holding Outgoings</td><td class="td-mono">4,800</td><td class="td-mono" id="fin-exp-prop">5,100</td></tr>
<tr class="table-total-row"><td>Total Operating Expenses Deducted</td><td class="td-mono">7,909</td><td class="td-mono" id="fin-exp-total">8,459</td></tr>
<tr class="table-total-row" style="color:var(--accent3)"><td>Net Earnings Allocated to Member Capital Account</td><td class="td-mono">58,341</td><td class="td-mono" id="fin-inc-net">61,361</td></tr>
</tbody>
</table>
</div>
<div class="card" id="stmt-panel-balance" style="display:none">
<h3>Statement of Financial Position (Balance Sheet)</h3>
<table>
<thead><tr><th>Asset & Liability Ledger Pools</th><th class="td-mono">FY2025 ($)</th><th class="td-mono">FY2026 ($)</th></tr></thead>
<tbody>
<tr><td style="font-weight:600">Current Liquid Funds</td><td></td><td></td></tr>
<tr class="indent-item"><td>Operating Cash Accounts</td><td class="td-mono">45,200</td><td class="td-mono" id="fin-bal-cash">58,400</td></tr>
<tr class="indent-item"><td>Term Deposits Registry</td><td class="td-mono">50,000</td><td class="td-mono" id="fin-bal-td">75,000</td></tr>
<tr><td style="font-weight:600">Non-Current Investments Balance</td><td></td><td></td></tr>
<tr class="indent-item"><td>Sovereign Fixed Income Debt Bonds</td><td class="td-mono">62,000</td><td class="td-mono" id="fin-bal-bonds">65,000</td></tr>
<tr class="indent-item"><td>Direct Equities (Listed Shares)</td><td class="td-mono">245,000</td><td class="td-mono" id="fin-bal-shares">289,500</td></tr>
<tr class="indent-item"><td>Commercial Property Real Estate Assets</td><td class="td-mono">420,000</td><td class="td-mono" id="fin-bal-prop">450,000</td></tr>
<tr class="indent-item"><td>Alternative Commodity, Precious Metals & Other Assets</td><td class="td-mono">88,400</td><td class="td-mono" id="fin-bal-alt">112,600</td></tr>
<tr class="table-total-row"><td>Gross Strategic Fund Assets (Gross Assets Value)</td><td class="td-mono">910,600</td><td class="td-mono" id="fin-bal-gross-assets">1,050,500</td></tr>
<tr><td style="font-weight:600">Liabilities Matrix</td><td></td><td></td></tr>
<tr class="indent-item"><td>Accrued Expenses and Fees Owed</td><td class="td-mono">1,100</td><td class="td-mono" id="fin-liab-accrued">1,350</td></tr>
<tr class="indent-item"><td>Deferred Provision for Fund Capital Income Tax Liabilities</td><td class="td-mono">8,400</td><td class="td-mono" id="fin-liab-tax">9,200</td></tr>
<tr class="table-total-row"><td>Total Liabilities Matrix Accruals</td><td class="td-mono">9,500</td><td class="td-mono" id="fin-liab-total">10,550</td></tr>
<tr class="table-total-row" style="color:var(--accent)"><td>Net Fund Assets (Total Member Equity Balances)</td><td class="td-mono">901,100</td><td class="td-mono" id="fin-bal-net-assets">1,039,950</td></tr>
</tbody>
</table>
</div>
<div class="card" id="stmt-panel-cash" style="display:none">
<h3>Statement of Cash Flows</h3>
<table>
<thead><tr><th>Cash Receipts and Disbursement Channels</th><th class="td-mono">FY2025 ($)</th><th class="td-mono">FY2026 ($)</th></tr></thead>
<tbody>
<tr><td>Cash Collection from Distributions and Dividends</td><td class="td-mono">17,300</td><td class="td-mono" id="fin-cf-dist">20,300</td></tr>
<tr><td>Interest Yield Inflow Receipts</td><td class="td-mono">2,450</td><td class="td-mono" id="fin-cf-int">4,120</td></tr>
<tr><td>Rental Outflow Proceeds from Commercial Real Estate</td><td class="td-mono">34,000</td><td class="td-mono" id="fin-cf-rent">36,500</td></tr>
<tr><td>Payments to Administrators, Auditors and System Suppliers</td><td class="td-mono">-7,909</td><td class="td-mono" id="fin-cf-exp">-8,459</td></tr>
<tr class="table-total-row"><td>Net Cash Flow from Core Operating Channels</td><td class="td-mono">45,841</td><td class="td-mono" id="fin-cf-op">52,461</td></tr>
<tr><td>Cash Received from Portfolio Divestment Sales</td><td class="td-mono">45,000</td><td class="td-mono" id="fin-cf-sale">30,000</td></tr>
<tr><td>Cash Outflows Absorbed by Capital Acquisitions</td><td class="td-mono">-92,000</td><td class="td-mono" id="fin-cf-acq">-115,000</td></tr>
<tr class="table-total-row"><td>Net Cash Generated by Capital Investment Activity</td><td class="td-mono">-47,000</td><td class="td-mono" id="fin-cf-inv">-85,000</td></tr>
<tr><td>Member Inward Concessional & Non-Concessional Cash Deposits</td><td class="td-mono">32,500</td><td class="td-mono" id="fin-cf-contrib">45,739</td></tr>
<tr class="table-total-row"><td>Net Financing Contributions Cash Flow Inwards</td><td class="td-mono">32,500</td><td class="td-mono" id="fin-cf-fin">45,739</td></tr>
<tr class="table-total-row" style="color:var(--accent2)"><td>Net Absolute Increase/Decrease Variance in Cash Held</td><td class="td-mono">31,341</td><td class="td-mono" id="fin-cf-var">13,200</td></tr>
</tbody>
</table>
</div>
<div class="card" id="stmt-panel-gains" style="display:none">
<h3>Realised vs Unrealised Capital Yields Ledger Analysis</h3>
<table>
<thead>
<tr>
<th>Asset Taxonomy Grouping Vectors</th>
<th class="td-mono">Weighted Cost Base ($)</th>
<th class="td-mono">Current Market Valuation ($)</th>
<th class="td-mono">Realised Capital Yield ($)</th>
<th class="td-mono">Unrealised Valuation Variance ($)</th>
</tr>
</thead>
<tbody id="gains-matrix-tbody"></tbody>
</table>
</div>
</div>
<div class="page" id="page-contributions">
<div class="page-title">Contributions & Caps Overview</div>
<div class="page-sub">Concessional, non-concessional & employer SG summaries.</div>
<div class="grid-4 section" id="contrib-kpis"></div>
<div class="grid-2 section">
<div class="card">
<h3>Fund Growth to Preservation Age</h3>
<div class="chart-wrap" style="height:270px"><canvas id="fund-growth-chart"></canvas></div>
</div>
<div class="card">
<h3>Active Optimization Parameters</h3>
<div id="contributions-read-panel" style="display:flex; flex-direction:column; gap:12px; margin-top:10px;"></div>
</div>
</div>
<div class="card section">
<h3>Financial Year Contribution Summary</h3>
<div id="fy-contrib-table"></div>
</div>
<div class="card section">
<h3>Super Fire-Up Dynamic Assessment</h3>
<div id="fire-up-static-view"></div>
</div>
</div>
<div class="page" id="page-compliance">
<div class="page-title">Compliance & Governance</div>
<div class="page-sub">Sole purpose test · In-house assets · Audit, minutes & valuations</div>
<div class="alert alert-info">📋 <strong>Sole purpose test:</strong> Fund must provide retirement benefits. All investments and expenses must support member retirement outcomes.</div>
<div class="alert alert-warn">📋 <strong>In-house asset rule:</strong> Related-party assets (incl. loans to members) must not exceed 5% of fund value at 30 June.</div>
<div class="alert alert-info">📋 <strong>Commercial property:</strong> SMSF may acquire business real property at arm's length, leased on commercial terms.</div>
<div class="alert alert-warn">📋 <strong>Concessional cap FY2026–27:</strong> $32,500 p.a. Unused cap carry-forward if TSB <$500k.</div>
<div class="card section">
<h3>Annual Compliance Checklist</h3>
<div id="compliance-checklist-full"></div>
</div>
<div class="card section">
<h3>In-House Asset Monitor</h3>
<div class="grid-2">
<div class="form-group"><label>Related-Party Asset Value ($)</label><input type="number" id="inhouse-value" value="0" step="any" onchange="updateInHouse()"></div>
<div class="form-group"><label>5% Limit (auto)</label><input type="text" id="inhouse-limit" readonly style="opacity:.7"></div>
</div>
<div id="inhouse-status" style="margin-top:16px"></div>
</div>
</div>
<div class="page" id="page-projections">
<div class="page-title">Fund Projections</div>
<div class="page-sub">Accumulation to preservation age · Conservative / Base / Optimistic scenarios</div>
<div class="card section">
<button class="btn btn-accent" onclick="calcProjections()">Run Projections</button>
</div>
<div class="card section"><div class="chart-wrap" style="height:300px"><canvas id="proj-chart"></canvas></div></div>
<div class="card section"><div id="proj-table"></div></div>
</div>
<div class="page" id="page-settings">
<div class="page-title">Settings & Inventory Hub</div>
<div class="page-sub">Consolidated form configuration engine for portfolio holdings, configurations, caps, and fund parameters.</div>
<div class="settings-subnav">
<button class="subnav-btn active" onclick="switchSettingsTab('asset-intake')" id="sbt-asset-intake">📦 Asset Inventory</button>
<button class="subnav-btn" onclick="switchSettingsTab('fund-profile')" id="sbt-fund-profile">👤 Profile & Targets</button>
<button class="subnav-btn" onclick="switchSettingsTab('financial-data')" id="sbt-financial-data">🧾 Financials Data</button>
<button class="subnav-btn" onclick="switchSettingsTab('contrib-settings')" id="sbt-contrib-settings">💰 Contribution Caps</button>
<button class="subnav-btn" onclick="switchSettingsTab('fireup-review')" id="sbt-fireup-review">🔥 Fire-Up</button>
<button class="subnav-btn" onclick="switchSettingsTab('data-mgmt')" id="sbt-data-mgmt">💽 Data Exchange</button>
</div>
<div class="card section settings-panel active" id="spnl-asset-intake">
<h3>Portfolio Asset Inventory Intake Form</h3>
<p style="color:var(--muted); font-size:12px; margin-bottom:14px;">Insert and validate asset entries across the restructured global taxonomy standard classes.</p>
<div style="display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end">
<div class="form-group" style="flex:2"><label>Asset Label Name</label><input id="h-name" placeholder="e.g. Vanguard Balanced High-Growth Index"></div>
<div class="form-group"><label>Restructured Asset Class</label>
<select id="h-cat">
<option>Cash</option>
<option>Term Deposit</option>
<option>Bonds</option>
<option>Shares</option>
<option>Derivatives</option>
<option>Managed Funds</option>
<option>Property</option>
<option>Golds & Metals</option>
<option>Cryptocurrency</option>
<option>Other</option>
</select>
</div>
<div class="form-group"><label>Units Volume</label><input type="number" id="h-qty" value="1000" step="any"></div>
<div class="form-group"><label>Unit Face Price ($)</label><input type="number" id="h-price" value="50.00" step="any"></div>
<div class="form-group"><label>Initial Cost Base ($)</label><input type="number" id="h-cost" value="48000" step="any"></div>
<div class="form-group"><label>DRIP Mode</label><select id="h-drip"><option>Yes</option><option>No</option></select></div>
<button class="btn btn-accent" onclick="addHolding()" style="height:38px; margin-bottom:10px;">+ Add into Asset Ledger</button>
</div>
</div>
<div class="grid-2 section settings-panel" id="spnl-fund-profile">
<div class="card">
<h3>Fund Corporate Profile Configuration</h3>
<div class="form-group"><label>Fund Entity Name</label><input id="s-fund-name"></div>
<div class="form-group"><label>Primary Member Age</label><input type="number" id="s-age"></div>
<div class="form-group"><label>Statutory Preservation Age Target</label><input type="number" id="s-pres-age" value="60"></div>
<div class="form-group"><label>Registered Corporate Trustees Pool</label><input type="number" id="s-trustees" value="2"></div>
<button class="btn btn-accent" style="margin-top:8px; width:100%" onclick="saveSettings()">Save Identity Profile</button>
</div>
<div class="card">
<h3>IPS Model Target Allocations Weight Matrix (%)</h3>
<div id="target-alloc-form" style="max-height: 275px; overflow-y: auto; padding-right: 5px;"></div>
<button class="btn btn-accent" style="margin-top:16px; width:100%" onclick="saveTargets()">Commit IPS Allocation Weights</button>
</div>
</div>
<div class="card section settings-panel" id="spnl-financial-data">
<h3>Current FY Financial Reporting Inputs</h3>
<p style="color:var(--muted); font-size:12px; margin-bottom:14px;">These fields synchronize across all performance, ROI, cash flow, and income statement frameworks within the platform.</p>
<div class="grid-2">
<div>
<h4 style="color:var(--accent); margin-bottom:8px; font-size:12px; text-transform:uppercase;">Gross Revenue Streams ($)</h4>
<div class="form-group"><label>Franked Dividend Inflows</label><input type="number" id="in-fin-div-f" step="any"></div>
<div class="form-group"><label>Unfranked Dividend Inflows</label><input type="number" id="in-fin-div-u" step="any"></div>
<div class="form-group"><label>Interest Yield Income</label><input type="number" id="in-fin-int" step="any"></div>
<div class="form-group"><label>Commercial Property Rent</label><input type="number" id="in-fin-rent" step="any"></div>
<div class="form-group"><label>Net Realised Capital Gains</label><input type="number" id="in-fin-cap" step="any"></div>
<h4 style="color:var(--accent); margin-bottom:8px; margin-top:20px; font-size:12px; text-transform:uppercase;">Investing Cash Flows ($)</h4>
<div class="form-group"><label>Cash Received from Portfolio Divestment Sales</label><input type="number" id="in-fin-cash-sale" step="any"></div>
<div class="form-group"><label>Cash Outflows Absorbed by Capital Acquisitions</label><input type="number" id="in-fin-cash-acq" step="any"></div>
</div>
<div>
<h4 style="color:var(--accent); margin-bottom:8px; font-size:12px; text-transform:uppercase;">Operating Expenses ($)</h4>
<div class="form-group"><label>Accounting & Administration Outgoings</label><input type="number" id="in-fin-exp-admin" step="any"></div>
<div class="form-group"><label>Approved SMSF Audit Provision Costs</label><input type="number" id="in-fin-exp-audit" step="any"></div>
<div class="form-group"><label>ATO Supervisory Levies Applied</label><input type="number" id="in-fin-exp-levy" step="any"></div>
<div class="form-group"><label>Commercial Property Holding Outgoings</label><input type="number" id="in-fin-exp-prop" step="any"></div>
<h4 style="color:var(--accent); margin-bottom:8px; margin-top:20px; font-size:12px; text-transform:uppercase;">Liabilities Provision ($)</h4>
<div class="form-group"><label>Accrued Expenses and Fees Owed</label><input type="number" id="in-fin-liab-accrued" step="any"></div>
<div class="form-group"><label>Deferred Provision for Fund Capital Income Tax</label><input type="number" id="in-fin-liab-tax" step="any"></div>
</div>
</div>
<button class="btn btn-accent" style="margin-top:16px; width:100%" onclick="saveFinancials()">Synchronize Financial Ledgers</button>
</div>
<div class="card section settings-panel" id="spnl-contrib-settings">
<h3>Integrated System Contribution Settings</h3>
<p style="color:var(--muted); font-size:12px; margin-bottom:14px;">Establish baseline limits, super guarantees, and salary sacrifice flows to model long-term outcomes.</p>
<div class="grid-4" style="margin-bottom:16px;">
<div class="form-group"><label>Current Audited Base Fund Balance ($)</label><input type="number" id="fund-balance" readonly style="opacity:.65"></div>
<div class="form-group"><label>Monthly Inward Salary Sacrifice ($)</label><input type="number" id="fund-ss" step="any"></div>
<div class="form-group"><label>Monthly Mandated Employer SG ($)</label><input type="number" id="fund-sg" step="any"></div>
<div class="form-group"><label>Monthly Voluntary Concessional Flow ($)</label><input type="number" id="fund-vol" step="any"></div>
</div>
<div class="grid-4">
<div class="form-group"><label>Annual Concessional Cap Framework ($)</label><input type="number" id="fund-con-cap" step="any"></div>
<div class="form-group"><label>Annual Non-Concessional Cap Threshold ($)</label><input type="number" id="fund-non-cap" step="any"></div>
<div class="form-group"><label>Expected Net Return Multipliers (% p.a.)</label><input type="number" id="fund-return" step="any"></div>
<div class="form-group"><label>Target Terminal Capital Value Target at Age 60 ($)</label><input type="number" id="fund-target" step="any"></div>
</div>
<button class="btn btn-accent" style="width:100%; margin-top:20px;" onclick="calcFund()">Re-Calculate Forward Projections</button>
</div>
<div class="card section settings-panel" id="spnl-fireup-review">
<h3>Super Fire-Up Analytics Engine Review</h3>
<div class="alert alert-info">🔥 Map current multi-fund leakage points, parse lost legacy ledger structures, and index enhanced cost structures instantly.</div>
<div class="grid-2">
<div>
<div class="form-group"><label>Legacy Retail/Industry Fund Identity</label><input id="fu-fund-name" value="AustralianSuper"></div>
<div class="form-group"><label>Current Retained Capital Base ($)</label><input type="number" id="fu-balance" value="450000"></div>
<div class="form-group"><label>Aggregated Outward Annual Fee Drag ($)</label><input type="number" id="fu-fee" value="4200"></div>
<div class="form-group"><label>Historical Performance Return Metric (% p.a.)</label><input type="number" id="fu-return" value="6.80"></div>
<div class="form-group"><label>Estimated Extraneous Lost Super Pool ($)</label><input type="number" id="fu-lost" value="12500" placeholder="Verify via ATO MyGov profile portal"></div>
<button class="btn btn-accent" onclick="calcFireUp()" style="margin-top:12px; width:100%">Run Loss Trace Optimization Model</button>
</div>
<div id="fire-up-result" style="display:flex; flex-direction:column; justify-content:center;"></div>
</div>
</div>
<div class="card section settings-panel" id="spnl-data-mgmt">
<h3>Form Native Data Exchange & Management Module</h3>
<p style="color:var(--muted); font-size:12px; margin-bottom:16px;">Perform state data transfers. Seamlessly upload configuration schemas or export application states into clean JSON schemas.</p>
<div style="display:flex; gap:12px; flex-wrap:wrap;">
<button class="btn btn-accent" onclick="document.getElementById('import-file-settings').click()">↑ Import Data Form JSON</button>
<input type="file" id="import-file-settings" accept=".json" style="display:none" onchange="importData(event)">
<button class="btn btn-accent" onclick="exportData()">↓ Export Data Form JSON</button>
<button class="btn" onclick="exportPensionFundReport()">📊 Complete PDF Report</button>
<button class="btn" style="color:var(--accent4); border-color:var(--accent4); margin-left:auto" onclick="clearAll()">⚠ Reset Framework State</button>
</div>
</div>
</div>
</main>
</div>
<div id="save-toast">✓ Saved</div>
<footer class="site-footer">
<div class="footer-inner">
<div class="footer-col">
<div class="footer-title">Related resources</div>
<a href="index">Financial Hub</a><br/>
<a href="LifePlan Report.doc">LifePlan Report</a><br/>
<a href="smes">Company</a><br/>
<a href="trust">Trust</a>
</div>
<div class="footer-col">
<div class="footer-title">References</div>
<div class="footer-text">Prepared for information purposes only. Not financial advice.</div>
</div>
</div>
</footer>
<script>
// TRANSLATION ENGINE
let currentLang = 'en';
let tPairs = [
["Pension Fund", "Quỹ Hưu Trí"],
["Live Systems Ready", "Hệ thống Sẵn sàng"],
["Import Data JSON", "Nhập Dữ liệu JSON"],
["Export Data JSON", "Xuất Dữ liệu JSON"],
["Complete PDF Report", "Báo cáo PDF Toàn diện"],
["Settings & Inventory Hub", "Trung tâm Cài đặt & Danh mục"],
["Settings & Inventory", "Cài đặt & Danh mục"],
["Save", "Lưu"],
["Dashboard", "Tổng quan"],
["Investment Portfolio", "Danh mục Đầu tư"],
["Performance Track", "Theo dõi Hiệu suất"],
["Financial Statements", "Báo cáo Tài chính"],
["Contributions & Caps Overview", "Tổng quan Đóng góp & Hạn mức"],
["Contributions & Caps", "Đóng góp & Hạn mức"],
["Compliance & Governance", "Tuân thủ & Quản trị"],
["Compliance", "Tuân thủ"],
["Projections", "Dự phóng"],
["Fund Overview", "Tổng quan Quỹ"],
["Fund Asset Allocation", "Phân bổ Tài sản Quỹ"],
["Years to Preservation Age", "Năm đến tuổi Nhận hưu"],
["Annual Contributions Breakdown", "Chi tiết Đóng góp Hàng năm"],
["Compliance Snapshot", "Tóm tắt Tuân thủ"],
["SMSF Strategy Roadmap", "Lộ trình Chiến lược SMSF"],
["Superannuation fund overview · caps, compliance & projected balance", "Tổng quan quỹ hưu trí · hạn mức, tuân thủ & số dư dự kiến"],
["Target balance at age 60", "Mục tiêu số dư ở tuổi 60"],
["SMSF trust assets · Holdings register, cost base & IPS vs actual", "Tài sản quỹ SMSF · Danh sách nắm giữ, chi phí gốc & IPS"],
["SMSF IPS target: Balanced long-term asset structures across standardized global allocation frameworks. Manage actual entries via Settings panel.", "Mục tiêu IPS SMSF: Cấu trúc tài sản cân bằng dài hạn."],
["Asset Specification", "Đặc điểm Tài sản"],
["Asset Class Group", "Nhóm Lớp Tài sản"],
["Units Held", "Số lượng Nắm giữ"],
["Market Price", "Giá Thị trường"],
["Current Valuation", "Định giá Hiện tại"],
["Cost Base", "Chi phí Gốc"],
["Unrealized Gain/Loss", "Lãi/Lỗ Chưa thực hiện"],
["Allocation Weight", "Tỷ trọng Phân bổ"],
["IPS Target vs Actual Allocation", "Mục tiêu IPS so với Phân bổ Thực tế"],
["Historical Multi-Year Asset Allocations ($)", "Phân bổ Tài sản Lịch sử Đa năm ($)"],
["Historical Multi-Year Asset Allocations", "Phân bổ Tài sản Lịch sử Đa năm"],
["Select Calendar Horizon View", "Chọn Chế độ xem Lịch trình"],
["Fund 3-Year Compounded Return", "Lợi nhuận Kép 3 năm của Quỹ"],
["Super Industry Growth Benchmark", "Điểm chuẩn Tăng trưởng Ngành"],
["Net Alpha Generation Margin", "Biên độ Tạo Alpha Ròng"],
["Historical Performance Profile vs Benchmark Indicators (%)", "Hiệu suất Lịch sử so với Điểm chuẩn (%)"],
["Historical Operating Profit & Loss Summary Ledger", "Sổ cái Lãi Lỗ Hoạt động Lịch sử"],
["Net of administrative fee extractions", "Sau khi trừ phí quản lý"],
["Median balanced fund tracking average", "Trung bình quỹ cân bằng theo dõi"],
["Relative outperformance spread", "Mức chênh lệch vượt trội tương đối"],
["Performance Metric Vectors", "Các Chỉ số Hiệu suất"],
["Statement of Comprehensive Income (Profit and Loss)", "Báo cáo Thu nhập Toàn diện (Lãi và Lỗ)"],
["Statement of Comprehensive Income", "Báo cáo Thu nhập Toàn diện"],
["Statement of Financial Position (Balance Sheet)", "Bảng Cân đối Kế toán"],
["Statement of Cash Flows", "Báo cáo Lưu chuyển Tiền tệ"],
["Realised vs Unrealised Capital Yields Ledger Analysis", "Phân tích Lợi suất Đã thực hiện & Chưa thực hiện"],
["Realised vs Unrealised Yields Matrix", "Ma trận Lợi suất Đã thực hiện & Chưa thực hiện"],
["Revenue and Expense Classification", "Phân loại Doanh thu và Chi phí"],
["Asset & Liability Ledger Pools", "Sổ cái Tài sản & Nợ phải trả"],
["Cash Receipts and Disbursement Channels", "Kênh Thu và Chi Tiền mặt"],
["Asset Taxonomy Grouping Vectors", "Nhóm Phân loại Tài sản"],
["Weighted Cost Base ($)", "Chi phí Gốc Gia quyền ($)"],
["Current Market Valuation ($)", "Định giá Thị trường Hiện tại ($)"],
["Realised Capital Yield ($)", "Lợi suất Vốn Đã thực hiện ($)"],
["Unrealised Valuation Variance ($)", "Chênh lệch Định giá Chưa thực hiện ($)"],
["Concessional, non-concessional & employer SG summaries.", "Tóm tắt đóng góp khấu trừ, không khấu trừ & SG."],
["Fund Growth to Preservation Age", "Tăng trưởng Quỹ đến Tuổi Nhận hưu"],
["Active Optimization Parameters", "Thông số Tối ưu hóa Hiện tại"],
["Financial Year Contribution Summary", "Tóm tắt Đóng góp Năm Tài chính"],
["Super Fire-Up Dynamic Assessment", "Đánh giá Động Super Fire-Up"],
["Sole purpose test · In-house assets · Audit, minutes & valuations", "Kiểm tra Mục đích duy nhất · Tài sản nội bộ · Kiểm toán"],
["Sole purpose test:", "Kiểm tra Mục đích duy nhất:"],
["In-house asset rule:", "Quy tắc Tài sản nội bộ:"],
["Commercial property:", "Bất động sản thương mại:"],
["Concessional cap FY2026–27:", "Hạn mức khấu trừ FY2026-27:"],
["Fund must provide retirement benefits. All investments and expenses must support member retirement outcomes.", "Quỹ phải cung cấp phúc lợi hưu trí. Mọi đầu tư và chi phí phải hỗ trợ kết quả hưu trí."],
["Related-party assets (incl. loans to members) must not exceed 5% of fund value at 30 June.", "Tài sản liên quan (gồm khoản vay cho thành viên) không được vượt 5% giá trị quỹ lúc 30/6."],
["SMSF may acquire business real property at arm's length, leased on commercial terms.", "SMSF có thể mua bất động sản kinh doanh sòng phẳng, cho thuê theo điều kiện thương mại."],
["Unused cap carry-forward if TSB <$500k.", "Chuyển tiếp hạn mức chưa sử dụng nếu TSB <$500k."],
["Annual Compliance Checklist", "Danh sách Kiểm tra Tuân thủ Hàng năm"],
["In-House Asset Monitor", "Giám sát Tài sản Nội bộ"],
["Related-Party Asset Value ($)", "Giá trị Tài sản Liên quan ($)"],
["5% Limit (auto)", "Giới hạn 5% (tự động)"],
["Accumulation to preservation age · Conservative / Base / Optimistic scenarios", "Tích lũy đến tuổi nhận hưu · Kịch bản Bảo thủ / Cơ sở / Lạc quan"],
["Run Projections", "Chạy Dự phóng"],
["Consolidated form configuration engine for portfolio holdings, configurations, caps, and fund parameters.", "Công cụ cấu hình biểu mẫu hợp nhất cho danh mục, hạn mức và tham số."],
["Asset Inventory", "Danh mục Tài sản"],
["Profile & Targets", "Hồ sơ & Mục tiêu"],
["Financials Data", "Dữ liệu Tài chính"],
["Contribution Caps", "Hạn mức Đóng góp"],
["Fire-Up", "Fire-Up"],
["Data Exchange", "Trao đổi Dữ liệu"],
["Portfolio Asset Inventory Intake Form", "Biểu mẫu Nhập Tài sản Danh mục"],
["Insert and validate asset entries across the restructured global taxonomy standard classes.", "Chèn và xác thực danh sách tài sản trong hệ thống phân loại toàn cầu mới."],
["Fund Corporate Profile Configuration", "Cấu hình Hồ sơ Doanh nghiệp Quỹ"],
["IPS Model Target Allocations Weight Matrix (%)", "Ma trận Tỷ trọng Phân bổ Mục tiêu IPS (%)"],
["Current FY Financial Reporting Inputs", "Đầu vào Báo cáo Tài chính Năm hiện tại"],
["These fields synchronize across all performance, ROI, cash flow, and income statement frameworks within the platform.", "Các trường này đồng bộ hóa trên tất cả báo cáo hiệu suất, dòng tiền và thu nhập."],
["Integrated System Contribution Settings", "Cài đặt Đóng góp Hệ thống Tích hợp"],
["Establish baseline limits, super guarantees, and salary sacrifice flows to model long-term outcomes.", "Thiết lập giới hạn cơ sở, SG và luồng tiền khấu trừ lương để dự phóng dài hạn."],
["Super Fire-Up Analytics Engine Review", "Đánh giá Phân tích Động cơ Super Fire-Up"],
["Map current multi-fund leakage points, parse lost legacy ledger structures, and index enhanced cost structures instantly.", "Lập bản đồ rò rỉ đa quỹ, phân tích sổ cái cũ, và chỉ mục cấu trúc chi phí tức thì."],
["Form Native Data Exchange & Management Module", "Mô-đun Trao đổi & Quản lý Dữ liệu Bản địa"],
["Perform state data transfers. Seamlessly upload configuration schemas or export application states into clean JSON schemas.", "Thực hiện truyền dữ liệu trạng thái. Tải lên cấu hình hoặc xuất cấu trúc JSON."],
["Asset Label Name", "Tên Nhãn Tài sản"],
["Restructured Asset Class", "Lớp Tài sản Cấu trúc lại"],
["Units Volume", "Khối lượng Đơn vị"],
["Unit Face Price ($)", "Mệnh giá Đơn vị ($)"],
["Initial Cost Base ($)", "Chi phí Gốc Ban đầu ($)"],
["DRIP Mode", "Chế độ DRIP"],
["Add into Asset Ledger", "Thêm vào Sổ cái Tài sản"],
["Fund Entity Name", "Tên Thực thể Quỹ"],
["Primary Member Age", "Tuổi Thành viên Chính"],
["Statutory Preservation Age Target", "Mục tiêu Tuổi Nhận hưu Pháp định"],
["Registered Corporate Trustees Pool", "Số Ủy viên Quản trị Đăng ký"],
["Save Identity Profile", "Lưu Hồ sơ Danh tính"],
["Commit IPS Allocation Weights", "Áp dụng Tỷ trọng Phân bổ IPS"],
["Gross Revenue Streams ($)", "Dòng Doanh thu Gộp ($)"],
["Investing Cash Flows ($)", "Dòng tiền Đầu tư ($)"],
["Operating Expenses ($)", "Chi phí Hoạt động ($)"],
["Liabilities Provision ($)", "Dự phòng Nợ phải trả ($)"],
["Synchronize Financial Ledgers", "Đồng bộ hóa Sổ cái Tài chính"],
["Current Audited Base Fund Balance ($)", "Số dư Quỹ Cơ sở Đã kiểm toán ($)"],
["Monthly Inward Salary Sacrifice ($)", "Khấu trừ Lương Hàng tháng ($)"],
["Monthly Mandated Employer SG ($)", "Đóng góp Bắt buộc Hàng tháng ($)"],
["Monthly Voluntary Concessional Flow ($)", "Dòng tiền Khấu trừ Tự nguyện ($)"],
["Annual Concessional Cap Framework ($)", "Khung Hạn mức Khấu trừ Hàng năm ($)"],
["Annual Non-Concessional Cap Threshold ($)", "Ngưỡng Hạn mức Không Khấu trừ Hàng năm ($)"],
["Expected Net Return Multipliers (% p.a.)", "Hệ số Lợi nhuận Ròng Kỳ vọng (%/năm)"],
["Target Terminal Capital Value Target at Age 60 ($)", "Mục tiêu Giá trị Vốn tại Tuổi 60 ($)"],
["Re-Calculate Forward Projections", "Tính toán lại Dự phóng Tương lai"],
["Legacy Retail/Industry Fund Identity", "Tên Quỹ Bán lẻ/Ngành Cũ"],
["Current Retained Capital Base ($)", "Cơ sở Vốn Giữ lại Hiện tại ($)"],
["Aggregated Outward Annual Fee Drag ($)", "Phí Hàng năm Gộp Rút ra ($)"],
["Historical Performance Return Metric (% p.a.)", "Tỷ suất Lợi nhuận Lịch sử (%/năm)"],
["Estimated Extraneous Lost Super Pool ($)", "Ước tính Khoản Super Thất lạc ($)"],
["Run Loss Trace Optimization Model", "Chạy Mô hình Tối ưu Truy tìm Tổn thất"],
["Reset Framework State", "Đặt lại Trạng thái Khuôn khổ"],
["Aggregate Portfolios Sum", "Tổng Danh mục Đầu tư"],
["Strategic Implementation Phase Milestone", "Cột mốc Giai đoạn Triển khai"],
["Timeline Velocity Gauge Status", "Trạng thái Đo lường Tiến độ"],
["Execution Focus", "Trọng tâm Thực thi"],
["Phase Alpha Initialization: Asset Structure Rebalancing", "Giai đoạn Alpha: Tái cân bằng Cấu trúc Tài sản"],
["Phase Beta Acceleration: Volumetric Capital Inflows Injection", "Giai đoạn Beta: Bơm Vốn Khối lượng lớn"],
["Phase Gamma Finalization: Preservation Age Liquidity Event Transition", "Giai đoạn Gamma: Chuyển đổi Thanh khoản Nghỉ hưu"],
["Active Operations", "Đang Hoạt động"],
["Pending Verification", "Chờ Xác minh"],
["Halted Target Mapped", "Đã lập bản đồ"],
["Sole Purpose Framework Compliance:", "Tuân thủ Khuôn khổ Mục đích Duy nhất:"],
["Regulatory Audit Readiness Index:", "Chỉ số Sẵn sàng Kiểm toán:"],
["Gross Fund Operating Revenues ($)", "Tổng Doanh thu Hoạt động Quỹ ($)"],
["System Operational Admin Expenses ($)", "Chi phí Quản trị Vận hành ($)"],
["Net Fund Retained Distributable Profits ($)", "Lợi nhuận Ròng Giữ lại ($)"],
["Internal Fund Compounded Yield Trajectory Return (%)", "Lợi nhuận Kép Nội bộ Quỹ (%)"],
["Institutional Superannuation Industry Growth Benchmark (%)", "Điểm chuẩn Tăng trưởng Ngành Quỹ Hưu trí (%)"],
["Cap Segment Type Allocation", "Phân bổ Hạn mức"],
["Yearly Accumulated Outflows", "Dòng tiền Tích lũy Hàng năm"],
["Statutory Legal Limit Cap", "Hạn mức Pháp lý Tuân thủ"],
["Calculated Space Margin", "Biên độ Trống Tính toán"],
["Concessional Caps (Pre-Tax Stream)", "Hạn mức Khấu trừ (Trước thuế)"],
["Non-Concessional Allocations (Post-Tax)", "Phân bổ Không Khấu trừ (Sau thuế)"],
["Monthly Salary Sacrifice:", "Khấu trừ Lương Hàng tháng:"],
["Monthly Employer SG:", "Đóng góp Người sử dụng lao động:"],
["Monthly Voluntary Concessional:", "Đóng góp Tự nguyện:"],
["Target Balance (Age 60):", "Mục tiêu Số dư (Tuổi 60):"],
["Expected Base Return Rate:", "Tỷ suất Sinh lời Kỳ vọng:"],
["Breach Event Detected:", "Phát hiện Vi phạm:"],
["Regulatory Status Clear:", "Trạng thái Pháp lý Rõ ràng:"],
["Financial Optimization Result Mapped", "Kết quả Tối ưu hóa Tài chính"],
["Consolidated Yield Vectors", "Vectơ Lợi suất Hợp nhất"],
["Portfolio Assets", "Tài sản Danh mục"],
["Conservative Scenario", "Kịch bản Bảo thủ"],
["Base Case Framework", "Kịch bản Cơ sở"],
["Optimistic Track", "Kịch bản Lạc quan"],
["Time Stamp Matrix Interval", "Khoảng thời gian Ma trận"],
["Conservative Vector ($)", "Vectơ Bảo thủ ($)"],
["Base Vector Target ($)", "Mục tiêu Cơ sở ($)"],
["Optimistic Vector Allocation ($)", "Phân bổ Lạc quan ($)"],
["Year 0 Baseline Initial", "Năm 0 Cơ sở Ban đầu"],
["Year 5 Accumulation Interval", "Năm 5 Khoảng thời gian Tích lũy"],
["Year 10 Accumulation Terminal", "Năm 10 Tích lũy Cuối cùng"],
["Year", "Năm"],
["Related resources", "Tài nguyên liên quan"],
["References", "Tài liệu tham khảo"],
["Prepared for information purposes only. Not financial advice.", "Chỉ nhằm mục đích thông tin. Không phải lời khuyên tài chính."],
["Franked Dividend Inflows", "Cổ tức Đã đóng thuế"],
["Unfranked Dividend Inflows", "Cổ tức Chưa đóng thuế"],
["Interest Yield Income", "Thu nhập Lãi suất"],
["Commercial Property Rental Gross Revenue", "Tổng Doanh thu Cho thuê Bất động sản"],
["Commercial Property Rent", "Thuê Bất động sản"],
["Net Realised Capital Gains Ledger", "Sổ cái Lợi nhuận Vốn Đã thực hiện"],
["Net Realised Capital Gains", "Lợi nhuận Vốn Đã thực hiện"],
["Total Operational Income Revenue", "Tổng Doanh thu Hoạt động"],
["Operating Outflow Expenses", "Chi phí Hoạt động Dòng ra"],
["Accounting & Administration Outgoings", "Chi phí Kế toán & Quản trị"],
["Approved SMSF Audit Provision Costs", "Chi phí Kiểm toán SMSF"],
["ATO Supervisory Levies Applied", "Thuế Giám sát ATO"],
["Commercial Property Holding Outgoings", "Chi phí Duy trì Bất động sản"],
["Total Operating Expenses Deducted", "Tổng Chi phí Khấu trừ"],
["Net Earnings Allocated to Member Capital Account", "Lợi nhuận Ròng Phân bổ vào Tài khoản"],
["Current Liquid Funds", "Quỹ Thanh khoản Hiện tại"],
["Operating Cash Accounts", "Tài khoản Tiền mặt Hoạt động"],
["Term Deposits Registry", "Sổ Đăng ký Tiền gửi Kỳ hạn"],
["Non-Current Investments Balance", "Số dư Đầu tư Dài hạn"],
["Sovereign Fixed Income Debt Bonds", "Trái phiếu Nợ Thu nhập Cố định"],
["Direct Equities (Listed Shares)", "Cổ phiếu Trực tiếp (Niêm yết)"],
["Commercial Property Real Estate Assets", "Bất động sản Thương mại"],
["Alternative Commodity, Precious Metals & Other Assets", "Hàng hóa Thay thế, Kim loại & Khác"],
["Gross Strategic Fund Assets (Gross Assets Value)", "Tổng Tài sản Quỹ (Giá trị Gộp)"],
["Liabilities Matrix", "Ma trận Nợ phải trả"],
["Accrued Expenses and Fees Owed", "Chi phí Trích trước & Phí Còn nợ"],
["Deferred Provision for Fund Capital Income Tax Liabilities", "Dự phòng Thuế Thu nhập Hoãn lại"],
["Deferred Provision for Fund Capital Income Tax", "Dự phòng Thuế Thu nhập"],
["Total Liabilities Matrix Accruals", "Tổng Trích trước Nợ phải trả"],
["Net Fund Assets (Total Member Equity Balances)", "Tài sản Quỹ Ròng (Tổng Vốn Thành viên)"],
["Cash Collection from Distributions and Dividends", "Thu tiền từ Phân phối và Cổ tức"],
["Interest Yield Inflow Receipts", "Biên nhận Dòng tiền Lãi suất"],
["Rental Outflow Proceeds from Commercial Real Estate", "Doanh thu Cho thuê Bất động sản"],
["Payments to Administrators, Auditors and System Suppliers", "Thanh toán Kế toán, Kiểm toán & Hệ thống"],
["Net Cash Flow from Core Operating Channels", "Dòng tiền Ròng từ Hoạt động Cốt lõi"],
["Cash Received from Portfolio Divestment Sales", "Tiền mặt từ Bán thoái vốn"],
["Cash Outflows Absorbed by Capital Acquisitions", "Dòng tiền Ra mua Tài sản"],
["Net Cash Generated by Capital Investment Activity", "Dòng tiền Ròng từ Hoạt động Đầu tư"],
["Member Inward Concessional & Non-Concessional Cash Deposits", "Tiền gửi Đóng góp từ Thành viên"],
["Net Financing Contributions Cash Flow Inwards", "Dòng tiền Đóng góp Tài trợ"],
["Net Absolute Increase/Decrease Variance in Cash Held", "Chênh lệch Tăng/Giảm Tiền mặt"],
["Transitioning architecture from", "Chuyển đổi kiến trúc từ"],
["under internal institutional administration profiles decreases structural cost leaks. Expected annual management fees drop by", "dưới hồ sơ quản trị tổ chức làm giảm rò rỉ chi phí cấu trúc. Dự kiến phí quản lý hàng năm giảm"],
["inside the system framework parameters.", "bên trong các thông số khuôn khổ hệ thống."],
["Salary Sacrifice", "Khấu trừ Lương"],
["Employer SG", "Cấp SG"],
["Voluntary Cap", "Mức Tự nguyện"],
["Fund Return Rate (%)", "Lợi nhuận Quỹ (%)"],
["Median Institutional Sector Benchmark (%)", "Điểm chuẩn Trung vị Ngành (%)"],
["Conservative Scenario (5% p.a.)", "Kịch bản Bảo thủ (5%/năm)"],
["Base Case Framework (7.5% p.a.)", "Kịch bản Cơ sở (7.5%/năm)"],
["Optimistic Track (9.5% p.a.)", "Kịch bản Lạc quan (9.5%/năm)"],
["Cash", "Tiền mặt"],
["Term Deposit", "Tiền gửi Kỳ hạn"],
["Bonds", "Trái phiếu"],
["Shares", "Cổ phiếu"],
["Derivatives", "Phái sinh"],
["Managed Funds", "Quỹ Quản lý"],
["Property", "Bất động sản"],
["Golds & Metals", "Vàng & Kim loại"],
["Cryptocurrency", "Tiền điện tử"],
["Other", "Khác"]
];
// Sort descending by length to prevent partial substring matches
tPairs.sort((a, b) => b[0].length - a[0].length);
function t(str) {
if (currentLang === 'en') return str;
for (let i = 0; i < tPairs.length; i++) {
if (tPairs[i][0] === str) return tPairs[i][1];
}
return str;
}
function tText(text, toVi) {
let result = text;
tPairs.forEach(pair => {
const source = toVi ? pair[0] : pair[1];
const target = toVi ? pair[1] : pair[0];
if (result.includes(source)) {
result = result.split(source).join(target);
}
});
return result;
}
function translateDOMNode(node, toVi) {
if (node.nodeType === 3) {
let txt = node.nodeValue;
if (txt.trim() !== '') {
let translated = tText(txt, toVi);
if (translated !== txt) node.nodeValue = translated;
}
} else {
if (node.tagName === 'SCRIPT' || node.tagName === 'STYLE' || node.tagName === 'CANVAS') return;
if (node.tagName === 'INPUT' && node.placeholder) {
let translated = tText(node.placeholder, toVi);
if (translated !== node.placeholder) node.placeholder = translated;
}
node.childNodes.forEach(child => translateDOMNode(child, toVi));
}
}
function toggleLanguage() {
currentLang = currentLang === 'en' ? 'vi' : 'en';
const toVi = currentLang === 'vi';
const langBtn = document.getElementById('lang-toggle-btn');
if (langBtn) langBtn.innerHTML = toVi ? "🌐 English" : "🌐 Tiếng Việt";
// Translate the entire static DOM
translateDOMNode(document.body, toVi);
// Re-trigger dynamic state rendering
calculateCoreAggregates();
const activePageId = document.querySelector('.page.active').id.replace('page-', '');
triggerChartsRendering(activePageId);
}
// STATE DEFINITIONS CONTROL OBJECT
let state = {
settings: { fundName: "Apex Private Wealth SMSF", age: 42, presAge: 60, trustees: 2 },
targets: { "Cash": 10, "Term Deposit": 10, "Bonds": 10, "Shares": 30, "Derivatives": 5, "Managed Funds": 10, "Property": 15, "Golds & Metals": 5, "Cryptocurrency": 3, "Other": 2 },
holdings: [
{ name: "Macquarie Operating Bank Account", cat: "Cash", qty: 1, price: 58400, cost: 58400, drip: "No" },
{ name: "ANZ High Yield 12-M Term Deposit", cat: "Term Deposit", qty: 1, price: 75000, cost: 75000, drip: "No" },
{ name: "Australian Government Sovereign Debt Index", cat: "Bonds", qty: 650, price: 100, cost: 67200, drip: "Yes" },
{ name: "Vanguard Total Stock Market Index ETF", cat: "Shares", qty: 2500, price: 88, cost: 190000, drip: "Yes" },
{ name: "iShares S&P500 Core Technology ETF", cat: "Shares", qty: 1250, price: 55.60, cost: 60500, drip: "Yes" },
{ name: "Commercial Logistical Logistics Hub Warehouse", cat: "Property", qty: 1, price: 450000, cost: 390000, drip: "No" },
{ name: "Perth Mint Direct Vault Physical Bullion", cat: "Golds & Metals", qty: 32, price: 2100, cost: 62000, drip: "No" },
{ name: "Bitcoin Ledger Protected Cold Storage Account", cat: "Cryptocurrency", qty: 0.45, price: 110000, cost: 23200, drip: "No" }
],
contributions: { balance: 1039950, ss: 1200, sg: 950, vol: 500, conCap: 32500, nonConCap: 110000, returnRate: 7.5, targetBal: 2500000 },
financials: {
incDivF: 16500, incDivU: 3800, incInt: 4120, incRent: 36500, incCap: 8900,
expAdmin: 2400, expAudit: 700, expLevy: 259, expProp: 5100,
liabAccrued: 1350, liabTax: 9200,
cashSale: 30000, cashAcq: 115000
}
};
const assetCategoriesOrdered = ["Cash", "Term Deposit", "Bonds", "Shares", "Derivatives", "Managed Funds", "Property", "Golds & Metals", "Cryptocurrency", "Other"];
const assetColorsMapping = ["#c8a96e", "#5c9eff", "#4ecb8a", "#e06b6b", "#b67fff", "#ff9f43", "#00d2d3", "#ff9ff3", "#54a0ff", "#5f27cd"];
const historicalAllocationsOverYears = {
"2026": [5.6, 7.2, 6.3, 27.8, 0.0, 0.0, 43.3, 6.5, 3.3, 0.0],
"2025": [8.2, 5.0, 7.5, 25.0, 0.0, 3.0, 45.0, 4.5, 1.8, 0.0],
"2024": [12.0, 0.0, 10.0, 20.0, 0.0, 5.0, 48.0, 5.0, 0.0, 0.0]
};
let donutChart = null;
let multiYearChart = null;
let perfLineChart = null;
let growthBarChart = null;
let projLineChart = null;
window.addEventListener('DOMContentLoaded', () => {
loadLocalState();
initializeForms();
calculateCoreAggregates();
showPage('dashboard');
calcFireUp();
});
function loadLocalState() {
const localData = localStorage.getItem('smsf_suite_localstate');
if (localData) {
try {
const parsed = JSON.parse(localData);
if (parsed.holdings && parsed.settings && parsed.financials) state = parsed;
else if (parsed.holdings && parsed.settings) {
state.holdings = parsed.holdings; state.settings = parsed.settings; state.targets = parsed.targets; state.contributions = parsed.contributions;
}
} catch (e) { console.warn("Failed to parse local browser cache state.", e); }
}
}
function saveAll() {
localStorage.setItem('smsf_suite_localstate', JSON.stringify(state));
const toast = document.getElementById('save-toast');
toast.classList.add('show');
setTimeout(() => toast.classList.remove('show'), 2000);
}
function initializeForms() {
document.getElementById('s-fund-name').value = state.settings.fundName;
document.getElementById('s-age').value = state.settings.age;
document.getElementById('s-pres-age').value = state.settings.presAge;
document.getElementById('s-trustees').value = state.settings.trustees;
document.getElementById('fund-balance').value = state.contributions.balance;
document.getElementById('fund-ss').value = state.contributions.ss;
document.getElementById('fund-sg').value = state.contributions.sg;
document.getElementById('fund-vol').value = state.contributions.vol;
document.getElementById('fund-con-cap').value = state.contributions.conCap;
document.getElementById('fund-non-cap').value = state.contributions.nonConCap;
document.getElementById('fund-return').value = state.contributions.returnRate;
document.getElementById('fund-target').value = state.contributions.targetBal;
document.getElementById('in-fin-div-f').value = state.financials.incDivF;
document.getElementById('in-fin-div-u').value = state.financials.incDivU;
document.getElementById('in-fin-int').value = state.financials.incInt;
document.getElementById('in-fin-rent').value = state.financials.incRent;
document.getElementById('in-fin-cap').value = state.financials.incCap;
document.getElementById('in-fin-exp-admin').value = state.financials.expAdmin;
document.getElementById('in-fin-exp-audit').value = state.financials.expAudit;
document.getElementById('in-fin-exp-levy').value = state.financials.expLevy;
document.getElementById('in-fin-exp-prop').value = state.financials.expProp;
document.getElementById('in-fin-liab-accrued').value = state.financials.liabAccrued;
document.getElementById('in-fin-liab-tax').value = state.financials.liabTax;
document.getElementById('in-fin-cash-sale').value = state.financials.cashSale;
document.getElementById('in-fin-cash-acq').value = state.financials.cashAcq;
const targetAllocForm = document.getElementById('target-alloc-form');
targetAllocForm.innerHTML = '';
assetCategoriesOrdered.forEach(cat => {
targetAllocForm.innerHTML += `
<div class="form-group">
<label>${cat} Target Model Allocation Weight (%)</label>
<input type="number" class="ips-target-input" data-cat="${cat}" value="${state.targets[cat] || 0}">
</div>`;
});
}
function switchSettingsTab(tabId) {
document.querySelectorAll('.settings-panel').forEach(p => p.classList.remove('active'));
document.querySelectorAll('.settings-subnav .subnav-btn').forEach(b => b.classList.remove('active'));
document.getElementById('spnl-' + tabId).classList.add('active');
document.getElementById('sbt-' + tabId).classList.add('active');
}
function showPage(pageId) {
document.querySelectorAll('.page').forEach(p => p.classList.remove('active'));
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
const targetPage = document.getElementById('page-' + pageId);
const targetTab = document.getElementById('tab-' + pageId);
if (targetPage) targetPage.classList.add('active');
if (targetTab) targetTab.classList.add('active');
document.getElementById('header-actions').classList.remove('open');
setTimeout(() => { triggerChartsRendering(pageId); }, 40);
}
function switchStatement(statementId) {