Repository navigation
Expand file tree
/
Copy pathadmin.html
More file actions
4284 lines (3960 loc) · 220 KB
/
Copy pathadmin.html
File metadata and controls
4284 lines (3960 loc) · 220 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>Family Panel — Admin</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<meta name="theme-color" content="#0e0d0c">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800&family=DM+Sans:opsz,wght@9..40,300;400;500;600;700&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
/* Defaults — overridden immediately by applyThemePreset() on load */
--bg: #0e0d0c;
--surface: #161512;
--surface2: #1d1b18;
--border: rgba(255,255,255,0.07);
--border2: rgba(255,255,255,0.12);
--gold: #e8a840;
--gold-bg: rgba(232,168,64,0.08);
--gold-bd: rgba(232,168,64,0.20);
--gold-dim: rgba(232,168,64,0.12);
--gold-mid: rgba(232,168,64,0.28);
--text: #f0ece4;
--muted: rgba(240,236,228,0.45);
--faint: rgba(240,236,228,0.20);
--green: #5db87a;
--green-bg: rgba(93,184,122,0.10);
--red: #e86060;
--red-bg: rgba(232,96,96,0.10);
--blue: #58a6ff;
--r10: 10px;
--r6: 6px;
--ease: 0.15s cubic-bezier(.4,0,.2,1);
--shadow: 0 1px 4px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.10);
}
html, body { min-height: 100vh; background: var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px; }
/* ── HEADER ──────────────────────────────────────────────── */
#header {
background: var(--surface);
border-bottom: 1px solid var(--border);
padding: 0 32px;
display: flex;
align-items: center;
gap: 24px;
height: 60px;
position: sticky;
top: 0;
z-index: 50;
box-shadow: 0 1px 0 var(--border);
}
#header-logo {
display: flex;
align-items: center;
gap: 10px;
text-decoration: none;
}
#header-logo span:first-child {
font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif;
font-size: 20px;
color: var(--text);
}
#header-logo .badge {
background: var(--gold-bg);
border: 1px solid var(--gold-bd);
border-radius: 5px;
color: var(--gold);
font-size: 9px;
font-weight: 700;
letter-spacing: .7px;
text-transform: uppercase;
padding: 2px 7px;
}
#header-spacer { flex: 1; }
.header-link {
font-size: 12px;
color: var(--muted);
text-decoration: none;
padding: 5px 10px;
border-radius: var(--r6);
transition: all var(--ease);
}
.header-link:hover { background: var(--surface2); color: var(--text); }
.header-link.active { color: var(--gold); font-weight: 600; }
#save-status {
font-size: 11px;
color: var(--faint);
display: flex;
align-items: center;
gap: 6px;
transition: color var(--ease);
}
#save-status.saving { color: var(--gold); }
#save-status.saved { color: var(--green); }
#save-status.error { color: var(--red); }
/* ── LAYOUT ──────────────────────────────────────────────── */
#layout {
display: grid;
grid-template-columns: 220px 1fr;
min-height: calc(100vh - 60px);
}
/* ── SIDEBAR ─────────────────────────────────────────────── */
#sidebar {
background: var(--surface);
border-right: 1px solid var(--border);
padding: 20px 12px;
position: sticky;
top: 60px;
height: calc(100vh - 60px);
overflow-y: auto;
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-label {
font-size: 9px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--faint);
padding: 0 10px;
margin-bottom: 6px;
}
.sidebar-btn {
display: flex;
align-items: center;
gap: 9px;
padding: 8px 10px;
border-radius: var(--r6);
cursor: pointer;
transition: all var(--ease);
font-size: 13px;
color: var(--muted);
text-decoration: none;
width: 100%;
background: transparent;
border: none;
font-family: 'DM Sans', sans-serif;
text-align: left;
}
.sidebar-btn:hover { background: var(--surface2); color: var(--text); }
.sidebar-btn.active { background: var(--gold-bg); color: var(--gold); font-weight: 600; }
.sidebar-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; flex-shrink: 0; }
/* ── MAIN CONTENT ────────────────────────────────────────── */
#main { padding: 28px 32px; }
.section { display: none; }
.section.active { display: block; }
/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-title {
font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif;
font-size: 28px;
font-weight: 400;
color: var(--text);
margin-bottom: 4px;
}
.page-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
/* ── CARD ────────────────────────────────────────────────── */
.panel {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--r10);
box-shadow: var(--shadow);
overflow: hidden;
margin-bottom: 20px;
}
.panel-header {
padding: 14px 20px 12px;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
}
.panel-title { font-size: 13px; font-weight: 600; color: var(--text); }
.panel-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.panel-body { padding: 20px; }
/* ── THEME PRESET CARDS ─────────────────────────────────── */
.preset-card {
border-radius: 10px;
overflow: hidden;
cursor: pointer;
border: 2px solid transparent;
transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
position: relative;
}
.preset-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.preset-card.selected { border-color: var(--gold); }
.preset-card.selected::after {
content: '✓';
position: absolute;
top: 6px; right: 7px;
font-size: 10px;
font-weight: 700;
color: #fff;
background: var(--gold);
border-radius: 50%;
width: 16px; height: 16px;
display: flex; align-items: center; justify-content: center;
line-height: 1;
}
.preset-swatch {
height: 64px;
display: flex;
gap: 3px;
padding: 8px;
align-items: flex-end;
}
.preset-swatch-bar { flex: 1; border-radius: 3px; height: 100%; }
.preset-label {
font-size: 11px;
font-weight: 600;
padding: 6px 10px 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* ── TABLE ───────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th {
text-align: left;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .8px;
color: var(--faint);
padding: 0 12px 10px;
border-bottom: 1px solid var(--border);
}
td {
padding: 11px 12px;
border-bottom: 1px solid var(--border);
font-size: 13px;
color: var(--text);
vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }
/* ── FORM ELEMENTS ───────────────────────────────────────── */
.form-row { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-end; }
.form-row > * { flex: 1; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .7px;
color: var(--muted);
}
input[type="text"], input[type="number"], input[type="email"], input[type="password"],
input[type="date"], input[type="time"], input[type="color"], select, textarea {
background: var(--surface2);
border: 1px solid var(--border);
border-radius: var(--r6);
color: var(--text);
font-family: 'DM Sans', sans-serif;
font-size: 13px;
padding: 8px 11px;
outline: none;
width: 100%;
transition: border-color var(--ease);
-webkit-appearance: none;
appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-bg); }
input[type="color"] { padding: 3px 5px; height: 36px; cursor: pointer; }
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--surface); }
/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 14px;
border-radius: var(--r6);
font-family: 'DM Sans', sans-serif;
font-size: 12px;
font-weight: 600;
cursor: pointer;
border: none;
transition: all var(--ease);
text-decoration: none;
white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-secondary{ background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover{ background: var(--bg); }
.btn-danger { background: var(--red-bg); border: 1px solid rgba(192,57,43,.2); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-success { background: var(--green-bg); border: 1px solid rgba(45,138,82,.2); color: var(--green); }
.btn-success:hover { background: var(--green); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-xs { padding: 3px 8px; font-size: 10px; }
/* ── BADGES ──────────────────────────────────────────────── */
.badge {
display: inline-block;
padding: 2px 8px;
border-radius: 20px;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .4px;
}
.badge-daily { background: rgba(37,99,235,.1); color: var(--blue); border: 1px solid rgba(37,99,235,.15); }
.badge-weekly { background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold-bd); }
.badge-monthly { background: rgba(147,51,234,.1); color: #7c3aed; border: 1px solid rgba(147,51,234,.15); }
.badge-yearly { background: rgba(236,72,153,.1); color: #db2777; border: 1px solid rgba(236,72,153,.15); }
.badge-once { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }
/* ── CHORE PERSON AVATAR PICKER ── */
.person-avatar-pick {
width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
border: 3px solid transparent; display: flex; align-items: center;
justify-content: center; font-size: 20px; overflow: hidden;
transition: border-color .15s, transform .15s; position: relative;
flex-shrink: 0;
}
.person-avatar-pick img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.person-avatar-pick.selected { border-color: var(--gold); transform: scale(1.1); }
.person-avatar-pick-name {
font-size: 9px; text-align: center; color: var(--muted);
margin-top: 3px; max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.person-avatar-wrap { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.picker-chip {
padding: 5px 11px; border-radius: 20px; font-size: 11px; font-weight: 600;
cursor: pointer; border: 1px solid var(--border2); background: var(--surface2);
color: var(--muted); transition: all .15s; user-select: none;
}
.picker-chip.on { background: var(--gold-dim); border-color: var(--gold-mid); color: var(--gold); }
.reset-time-chip {
display: inline-flex; align-items: center; gap: 5px;
padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
background: var(--surface2); border: 1px solid var(--border2); color: var(--text);
}
.reset-time-chip button {
background: none; border: none; color: var(--muted); cursor: pointer;
font-size: 13px; line-height: 1; padding: 0; transition: color .15s;
}
.reset-time-chip button:hover { color: #ef4444; }
/* ── SCHEDULE OVERVIEW ── */
.sched-grid {
display: grid; gap: 1px; min-width: 500px;
background: var(--border);
border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.sched-hdr {
background: var(--surface2); padding: 6px 8px;
font-size: 10px; font-weight: 700; text-transform: uppercase;
letter-spacing: .5px; color: var(--muted); text-align: center;
}
.sched-hdr.today { color: var(--gold); }
.sched-cell {
background: var(--surface); padding: 5px 6px; min-height: 36px;
display: flex; flex-direction: column; gap: 3px;
}
.sched-cell.today { background: var(--gold-dim); }
.sched-chip {
font-size: 9px; padding: 2px 6px; border-radius: 10px;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
font-weight: 600;
}
.color-swatch {
width: 16px; height: 16px; border-radius: 50%; display: inline-block;
border: 2px solid rgba(0,0,0,0.08); flex-shrink: 0;
}
/* ── USER CARD (grid) ────────────────────────────────────── */
#user-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 14px;
margin-bottom: 16px;
}
.user-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--r10);
box-shadow: var(--shadow);
overflow: hidden;
transition: box-shadow var(--ease);
}
.user-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.user-card-top {
padding: 18px 16px 14px;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
border-bottom: 1px solid var(--border);
}
.user-big-avatar {
width: 56px; height: 56px; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-size: 26px;
}
.user-card-name { font-size: 15px; font-weight: 600; color: var(--text); }
.user-card-meta { font-size: 11px; color: var(--muted); }
.user-card-actions {
padding: 10px 12px;
display: flex;
gap: 6px;
justify-content: center;
}
/* ── CHORE LIST ──────────────────────────────────────────── */
.chore-list-row {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 0;
border-bottom: 1px solid var(--border);
}
.chore-list-row:last-child { border-bottom: none; }
.chore-person-chip {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 2px 8px 2px 5px;
border-radius: 20px;
font-size: 10px;
font-weight: 600;
}
.chore-list-label { flex: 1; font-size: 13px; color: var(--text); }
/* ── ADD CHORE INLINE FORM ───────────────────────────────── */
#add-chore-form {
background: var(--surface2);
border: 1px solid var(--border);
border-radius: var(--r10);
padding: 16px 20px;
margin-bottom: 20px;
display: none;
}
#add-chore-form.open { display: block; }
/* ── REMINDER LIST ───────────────────────────────────────── */
.reminder-admin-row {
display: flex; align-items: center; gap: 10px;
padding: 8px 0; border-bottom: 1px solid var(--border);
}
.reminder-admin-row:last-child { border-bottom: none; }
.reminder-done-pill {
font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
padding: 2px 7px; border-radius: 10px;
}
.reminder-done-pill.done { background: var(--green-bg); color: var(--green); }
.reminder-done-pill.open { background: var(--gold-bg); color: var(--gold); }
/* ── SETTINGS ────────────────────────────────────────────── */
.setting-row {
display: flex; align-items: center; gap: 14px;
padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-info { flex: 1; }
.setting-name { font-size: 13px; font-weight: 500; color: var(--text); }
.setting-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.setting-control { min-width: 180px; }
/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
position: fixed; inset: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(3px);
z-index: 100; display: flex; align-items: center; justify-content: center;
opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
padding: 24px; width: 440px; max-width: 95vw;
box-shadow: 0 20px 60px rgba(0,0,0,.15);
transform: translateY(10px); transition: transform .18s ease;
max-height: 85vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal h3 { font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif; font-size: 22px; color: var(--text); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.modal-actions .btn { flex: 1; justify-content: center; }
.modal-row { display: flex; gap: 12px; }
/* ── TOAST ───────────────────────────────────────────────── */
#toast {
position: fixed; bottom: 24px; right: 24px;
background: var(--text); color: #fff;
border-radius: var(--r10); padding: 10px 16px;
font-size: 12px; font-weight: 500;
transform: translateY(60px); opacity: 0; transition: all .25s ease;
z-index: 999; pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.ok { background: var(--green); }
#toast.err { background: var(--red); }
/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
text-align: center; padding: 40px 20px; color: var(--muted);
}
.empty-state .empty-icon { font-size: 36px; margin-bottom: 10px; }
.empty-state p { font-size: 13px; }
/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.section.active { animation: fadeUp .25s ease; }
/* ── TOGGLE SWITCH ───────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 8px; }
.toggle {
position: relative; width: 40px; height: 22px; flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
position: absolute; inset: 0;
background: var(--border2); border-radius: 11px; cursor: pointer;
transition: background var(--ease);
}
.toggle-slider::after {
content: ''; position: absolute; width: 16px; height: 16px;
left: 3px; top: 3px; background: white; border-radius: 50%;
transition: transform var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--gold); }
.toggle input:checked + .toggle-slider::after { transform: translateX(18px); }
/* ── EMOJI PICKER ────────────────────────────────────────── */
.emoji-grid {
display: flex; flex-wrap: wrap; gap: 6px;
margin-top: 6px;
}
.emoji-opt {
width: 36px; height: 36px; border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-size: 20px; cursor: pointer; border: 2px solid transparent;
transition: all var(--ease); background: var(--surface2);
}
.emoji-opt:hover { background: var(--bg); transform: scale(1.15); }
.emoji-opt.selected { border-color: var(--gold); background: var(--gold-bg); }
</style>
<script>
// Pre-load: apply dark mode from localStorage before first paint to avoid flash
(function() {
try {
if (localStorage.getItem('fp-theme') === 'light') {
document.documentElement.classList.add('light');
}
} catch {}
})();
</script>
</head>
<body>
<!-- HEADER -->
<div id="header">
<a id="header-logo" href="/">
<span>Family Panel</span>
<span class="badge">Admin</span>
</a>
<div id="header-spacer"></div>
<button id="theme-btn" onclick="toggleTheme()" title="Toggle light/dark mode" style="background:var(--surface2);border:1px solid var(--border);border-radius:20px;color:var(--muted);font-size:14px;padding:4px 10px;cursor:pointer;transition:all var(--ease);line-height:1;">🌙</button>
<a class="header-link" href="/" target="_blank">View Dashboard ↗</a>
<div id="save-status">● All saved</div>
</div>
<div id="layout">
<!-- SIDEBAR -->
<nav id="sidebar">
<div class="sidebar-section">
<div class="sidebar-label">Manage</div>
<button class="sidebar-btn active" onclick="showSection('users')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"/></svg>
Family Members
</button>
<button class="sidebar-btn" onclick="showSection('chores')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
Chores
</button>
<button class="sidebar-btn" onclick="showSection('reminders')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"/></svg>
Reminders
</button>
<button class="sidebar-btn" onclick="showSection('guests')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"/></svg>
Guests
</button>
</div>
<div class="sidebar-section">
<div class="sidebar-label">Home Assistant</div>
<button class="sidebar-btn" onclick="showSection('connection')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"/></svg>
Connection
</button>
<button class="sidebar-btn" onclick="showSection('calendars')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"/></svg>
Calendars
</button>
<button class="sidebar-btn" onclick="showSection('entities')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 002.25-2.25V6.75a2.25 2.25 0 00-2.25-2.25H6.75A2.25 2.25 0 004.5 6.75v10.5a2.25 2.25 0 002.25 2.25zm.75-12h9v9h-9v-9z"/></svg>
HA Entities
</button>
<button class="sidebar-btn" onclick="showSection('customdash')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"/></svg>
Home Control
</button>
</div>
<div class="sidebar-section">
<div class="sidebar-label">System</div>
<button class="sidebar-btn" onclick="showSection('settings')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
Settings
</button>
<button class="sidebar-btn" onclick="showSection('appearance')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4.098 19.902a3.75 3.75 0 005.304 0l6.401-6.402M6.75 21A3.75 3.75 0 013 17.25V4.125C3 3.504 3.504 3 4.125 3h5.25c.621 0 1.125.504 1.125 1.125v4.072M6.75 21a3.75 3.75 0 003.75-3.75V8.197M6.75 21h13.125c.621 0 1.125-.504 1.125-1.125v-5.25c0-.621-.504-1.125-1.125-1.125h-4.072M10.5 8.197l2.88-2.88c.438-.439 1.15-.439 1.59 0l3.712 3.713c.44.44.44 1.152 0 1.59l-2.879 2.88M6.75 17.25h.008v.008H6.75v-.008z"/></svg>
Appearance
</button>
<button class="sidebar-btn" onclick="showSection('photoframe')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"/></svg>
Photo Frame
</button>
<button class="sidebar-btn" onclick="showSection('mediaplayer')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m9 9 10.5-3m0 6.553v3.75a2.25 2.25 0 0 1-1.632 2.163l-1.32.377a1.803 1.803 0 1 1-.99-3.467l2.31-.66a2.25 2.25 0 0 0 1.632-2.163Zm0 0V2.25L9 5.25v10.303m0 0v3.75a2.25 2.25 0 0 1-1.632 2.163l-1.32.377a1.803 1.803 0 0 1-.99-3.467l2.31-.66A2.25 2.25 0 0 0 9 15.553Z"/></svg>
Media Player
</button>
<button class="sidebar-btn" onclick="showSection('reset')">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"/></svg>
Reset Chores
</button>
</div>
<div style="padding:16px 12px 12px;border-top:1px solid var(--border);margin-top:auto;">
<div style="font-size:10px;color:var(--faint);text-align:center;letter-spacing:.3px;">
Family Panel <span id="app-version" style="color:var(--muted);"></span>
</div>
<div id="update-dot" style="display:none;margin-top:8px;text-align:center;">
<button onclick="showSection('settings')" style="background:var(--gold-bg);border:1px solid var(--gold-bd);border-radius:20px;color:var(--gold);font-size:10px;font-weight:600;padding:3px 10px;cursor:pointer;font-family:inherit;letter-spacing:.3px;">
✦ Update available
</button>
</div>
</div>
</nav>
<!-- MAIN -->
<main id="main">
<!-- ══════════════ USERS ══════════════ -->
<div id="section-users" class="section active">
<div class="page-title">Family Members</div>
<div class="page-sub">Add, edit or remove people. The dashboard chores chart updates automatically.</div>
<div id="user-grid"></div>
<button class="btn btn-primary" onclick="openUserModal()">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/></svg>
Add Family Member
</button>
</div>
<!-- ══════════════ CHORES ══════════════ -->
<div id="section-chores" class="section">
<div class="page-title">Chores</div>
<div class="page-sub">Manage tasks for each family member. Daily chores reset at set times; weekly chores appear on chosen days; monthly chores appear in chosen weeks of the month.</div>
<div class="panel">
<div class="panel-header">
<div>
<div class="panel-title">All Chores</div>
<div class="panel-sub" id="chore-count-label"></div>
</div>
<button class="btn btn-primary btn-sm" onclick="openChoreModal()">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/></svg>
Add Chore
</button>
</div>
<div style="padding:0 20px;" id="chore-table-wrap">
<div id="chore-list"></div>
</div>
</div>
<!-- Leaderboard Reset Settings -->
<div class="panel" style="margin-top:16px;">
<div class="panel-header">
<div>
<div class="panel-title">Leaderboard Reset</div>
<div class="panel-sub">Choose which day the weekly points leaderboard resets. Points from before that day are excluded from the current week's totals.</div>
</div>
</div>
<div style="padding:12px 20px 16px;display:flex;align-items:center;gap:16px;flex-wrap:wrap;">
<label style="display:flex;align-items:center;gap:8px;cursor:pointer;">
<input type="checkbox" id="cfg-reset-enabled" onchange="document.getElementById('cfg-reset-day-row').style.display=this.checked?'flex':'none'" style="width:16px;height:16px;accent-color:var(--gold);cursor:pointer;">
<span style="font-size:12px;font-weight:600;color:var(--text);">Enable Weekly Reset</span>
</label>
<div id="cfg-reset-day-row" style="display:none;align-items:center;gap:8px;">
<label style="font-size:12px;font-weight:600;color:var(--text);">Reset day</label>
<select id="cfg-reset-day" style="background:var(--surface2);border:1px solid var(--border);border-radius:6px;color:var(--text);font-size:12px;padding:5px 10px;outline:none;cursor:pointer;font-family:inherit;">
<option value="0">Sunday</option>
<option value="1" selected>Monday</option>
<option value="2">Tuesday</option>
<option value="3">Wednesday</option>
<option value="4">Thursday</option>
<option value="5">Friday</option>
<option value="6">Saturday</option>
</select>
</div>
<button class="btn btn-primary btn-sm" onclick="saveChoreResetSettings()">Save</button>
<button class="btn btn-danger btn-sm" onclick="clearAllPoints()" style="margin-left:auto;">Clear All Points</button>
</div>
</div>
<!-- Pocket Money Settings -->
<div class="panel" style="margin-top:16px;">
<div class="panel-header">
<div>
<div class="panel-title">Pocket Money</div>
<div class="panel-sub">Configure when pocket money is calculated and paid. Set each child's weekly amount and gamification in their user profile.</div>
</div>
</div>
<div style="padding:12px 20px 16px;display:flex;align-items:center;gap:16px;flex-wrap:wrap;">
<label style="display:flex;align-items:center;gap:8px;cursor:pointer;">
<input type="checkbox" id="cfg-pay-enabled" onchange="document.getElementById('cfg-pay-day-row').style.display=this.checked?'flex':'none'" style="width:16px;height:16px;accent-color:var(--gold);cursor:pointer;">
<span style="font-size:12px;font-weight:600;color:var(--text);">Enable Pocket Money</span>
</label>
<div id="cfg-pay-day-row" style="display:none;align-items:center;gap:8px;">
<label style="font-size:12px;font-weight:600;color:var(--text);">Pay day</label>
<select id="cfg-pay-day" style="background:var(--surface2);border:1px solid var(--border);border-radius:6px;color:var(--text);font-size:12px;padding:5px 10px;outline:none;cursor:pointer;font-family:inherit;">
<option value="0">Sunday</option>
<option value="1">Monday</option>
<option value="2">Tuesday</option>
<option value="3">Wednesday</option>
<option value="4">Thursday</option>
<option value="5">Friday</option>
<option value="6" selected>Saturday</option>
</select>
</div>
<button class="btn btn-primary btn-sm" onclick="saveChorePaySettings()">Save</button>
</div>
</div>
<!-- This Week's Progress -->
<div class="panel" style="margin-top:16px;">
<div class="panel-header">
<div>
<div class="panel-title">This Week's Progress</div>
<div class="panel-sub">How each child is tracking toward pocket money this week.</div>
</div>
</div>
<div id="pay-progress-list" style="padding:0 20px 8px;"></div>
</div>
<!-- Schedule Overview -->
<div class="panel" style="margin-top:16px;">
<div class="panel-header">
<div class="panel-title">Schedule Overview</div>
<div style="font-size:11px;color:var(--muted);">Which chores appear on which days this week</div>
</div>
<div id="chore-schedule-grid" style="padding:12px 16px;overflow-x:auto;"></div>
</div>
</div>
<!-- ══════════════ REMINDERS ══════════════ -->
<div id="section-reminders" class="section">
<div class="page-title">Reminders</div>
<div class="page-sub">Shared family reminders visible on the dashboard.</div>
<div class="panel">
<div class="panel-header">
<div class="panel-title">Active Reminders</div>
<button class="btn btn-primary btn-sm" onclick="openReminderModal()">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/></svg>
Add Reminder
</button>
</div>
<div style="padding:0 20px;" id="reminder-admin-list"></div>
</div>
</div>
<!-- ══════════════ CONNECTION ══════════════ -->
<div id="section-connection" class="section">
<div class="page-title">HA Connection</div>
<div class="page-sub">Configure your Home Assistant URL and long-lived access token. Changes are saved to <code style="font-size:11px;background:var(--surface2);padding:1px 5px;border-radius:4px;">config.json</code> and take effect after a server restart.</div>
<div class="panel">
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Home Assistant URL</div>
<div class="setting-desc">e.g. http://homeassistant.local:8123 or http://10.0.0.5:8123</div>
</div>
<div class="setting-control" style="min-width:260px;">
<input type="text" id="cfg-ha-url" placeholder="http://10.0.0.1:8123" style="width:100%;">
</div>
</div>
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Access Token</div>
<div class="setting-desc">Long-lived access token from HA → Profile → Security</div>
</div>
<div class="setting-control" style="min-width:260px;">
<input type="password" id="cfg-ha-token" placeholder="Leave blank to keep current token" style="width:100%;" autocomplete="off">
</div>
</div>
<div class="setting-row" style="border:none;padding-bottom:20px;gap:12px;flex-wrap:wrap;">
<button class="btn btn-primary" onclick="saveConnection()">Save Connection</button>
<button class="btn btn-secondary" onclick="testConnection()" id="test-conn-btn">Test Connection</button>
<div id="conn-result" style="font-size:12px;margin-left:4px;"></div>
</div>
</div>
<div class="panel" style="margin-top:16px;">
<div class="panel-header">
<div class="panel-title">Current Status</div>
</div>
<div style="padding:16px 20px;" id="conn-status-detail">
<div style="font-size:12px;color:var(--muted);">Click "Test Connection" to check HA connectivity.</div>
</div>
</div>
</div>
<!-- ══════════════ CALENDARS ══════════════ -->
<div id="section-calendars" class="section">
<div class="page-title">Calendars</div>
<div class="page-sub">Add, remove, or recolour the Outlook/M365 calendars pulled from Home Assistant. The entity ID comes from HA → Developer Tools → States, search for <code style="font-size:11px;background:var(--surface2);padding:1px 5px;border-radius:4px;">calendar.</code></div>
<div class="panel">
<div class="panel-header">
<div class="panel-title">Active Calendars</div>
<button class="btn btn-primary btn-sm" onclick="openCalendarModal()">
<svg viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/></svg>
Add Calendar
</button>
</div>
<div id="calendars-list" style="padding:0 20px;"></div>
</div>
</div>
<!-- ══════════════ HA ENTITIES ══════════════ -->
<div id="section-entities" class="section">
<div class="page-title">HA Entities</div>
<div class="page-sub">Assign Home Assistant entity IDs to each dashboard slot. Find entity IDs in HA → Developer Tools → States. Leave a slot blank to hide that button or tile.</div>
<div class="panel">
<div class="panel-header">
<div class="panel-title">Top Menu</div>
<div style="font-size:11px;color:var(--muted);">3 quick-action buttons in the header bar</div>
</div>
<div id="topbar-slots"></div>
</div>
<div class="panel" style="margin-top:16px;">
<div class="panel-header">
<div class="panel-title">Controls</div>
<div style="font-size:11px;color:var(--muted);">6 buttons in the Controls card</div>
</div>
<div id="control-slots"></div>
</div>
<div class="panel" style="margin-top:16px;">
<div class="panel-header">
<div class="panel-title">Home</div>
<div style="font-size:11px;color:var(--muted);">4 sensor tiles in the Home card</div>
</div>
<div id="sensor-slots"></div>
</div>
</div>
<!-- ══════════════ EVENTS ══════════════ -->
<!-- ══════════════ SETTINGS ══════════════ -->
<div id="section-settings" class="section">
<div class="page-title">Settings</div>
<div class="page-sub">Configuration for the family panel.</div>
<!-- Update checker -->
<div class="panel" style="margin-bottom:20px;" id="update-panel">
<div class="panel-header" style="display:flex;align-items:center;justify-content:space-between;">
<div class="panel-title">Updates</div>
<button class="btn btn-secondary btn-sm" onclick="checkForUpdate(true)" id="update-check-btn">Check now</button>
</div>
<div id="update-status" style="padding:14px 20px;font-size:13px;color:var(--muted);">
Checking for updates…
</div>
</div>
<div class="panel">
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Admin Password</div>
<div class="setting-desc">Set a password to protect this admin portal. Stored as a SHA-256 hash. Leave blank to keep current password.</div>
</div>
<div class="setting-control">
<input type="password" id="cfg-password" placeholder="Enter new password" autocomplete="new-password">
</div>
</div>
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Shopping List — HA Entity</div>
<div class="setting-desc">A <code style="font-size:10px;background:var(--surface2);padding:1px 5px;border-radius:3px;">todo.*</code> entity from HA (e.g. <code style="font-size:10px;background:var(--surface2);padding:1px 5px;border-radius:3px;">todo.shopping_list</code>). A Shopping List button will appear in the top bar. Leave blank to hide it.</div>
</div>
<div class="setting-control">
<input type="text" id="cfg-todo-entity" placeholder="todo.shopping_list">
</div>
</div>
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Weather — HA Entity <span style="font-size:10px;color:var(--gold);font-weight:400;">(primary)</span></div>
<div class="setting-desc">A <code style="font-size:10px;background:var(--surface2);padding:1px 5px;border-radius:3px;">weather.*</code> entity from HA (e.g. <code style="font-size:10px;background:var(--surface2);padding:1px 5px;border-radius:3px;">weather.forecast_home</code>). If set, this is used instead of Open-Meteo.</div>
</div>
<div class="setting-control">
<input type="text" id="cfg-weather-entity" placeholder="weather.forecast_home">
</div>
</div>
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Weather — Location <span style="font-size:10px;color:var(--muted);font-weight:400;">(fallback)</span></div>
<div class="setting-desc">City name used for Open-Meteo if no HA entity is set above</div>
</div>
<div class="setting-control">
<input type="text" id="cfg-weather" placeholder="Hamilton, NZ">
</div>
</div>
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Pocket Money — Minimum Completion %</div>
<div class="setting-desc">Kids must reach this completion percentage to earn any pocket money. Below this threshold they earn $0. Default: 50%.</div>
</div>
<div class="setting-control">
<input type="number" id="cfg-pay-min-pct" min="0" max="100" style="width:80px;" placeholder="50">
<span style="font-size:12px;color:var(--muted);margin-left:4px;">%</span>
</div>
</div>
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Chore Log Retention</div>
<div class="setting-desc">How many days of chore completion history to keep (shown in the log view on the dashboard)</div>
</div>
<div class="setting-control">
<input type="number" id="cfg-log-days" min="1" max="90" step="1" placeholder="10">
</div>
</div>
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Poll Interval</div>
<div class="setting-desc">How often the dashboard re-fetches data (seconds)</div>
</div>
<div class="setting-control">
<input type="number" id="cfg-poll" min="5" max="300" step="5">
</div>
</div>
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Calendar Deduplication</div>
<div class="setting-desc">Hide duplicate events that appear in multiple calendars (e.g. shared invites showing in both Bob & Laura's calendars)</div>
</div>
<div class="setting-control">
<label style="display:flex;align-items:center;gap:8px;cursor:pointer;">
<input type="checkbox" id="cfg-dedup" style="width:16px;height:16px;accent-color:var(--gold);cursor:pointer;">
<span style="font-size:12px;color:var(--muted)" id="cfg-dedup-label">Enabled</span>
</label>
</div>
</div>
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Expand All-Day Events in Day View</div>
<div class="setting-desc">Show all-day and multi-day events as a full-height block across all 24 hours in the day view. When off, they only appear as a banner at the top.</div>
</div>
<div class="setting-control">
<label style="display:flex;align-items:center;gap:8px;cursor:pointer;">
<input type="checkbox" id="cfg-allday-expand" style="width:16px;height:16px;accent-color:var(--gold);cursor:pointer;">
<span style="font-size:12px;color:var(--muted)" id="cfg-allday-expand-label">Enabled</span>
</label>
</div>
</div>
<div class="setting-row">
<div class="setting-info">
<div class="setting-name">Time Format</div>
<div class="setting-desc">Choose 12-hour (e.g. 2:30 pm) or 24-hour (e.g. 14:30) for the clock and calendar times.</div>
</div>
<div class="setting-control">
<select id="cfg-time-format" style="background:var(--surface2);border:1px solid var(--border);border-radius:var(--r8);color:var(--text);font-size:12px;padding:5px 10px;cursor:pointer;outline:none;">
<option value="24">24-hour</option>
<option value="12">12-hour</option>
</select>
</div>
</div>