File size: 112,775 Bytes
b1ecc4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
<!DOCTYPE html>
<html lang="ko" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title id="html-title">CertBridge 사용 가이드</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* ─────────────────────────────────────────
   CertBridge Guide Design System
   Dual Theme Sync (Light + Dark)
   Premium Modern Style
   ───────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

:root {
  /* Light Theme (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-glass: rgba(0, 0, 0, 0.015);
  --bg-hover: rgba(0, 0, 0, 0.025);
  
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-blue-subtle: rgba(37, 99, 235, 0.08);
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-red: #dc2626;
  --accent-purple: #7c3aed;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-active: rgba(37, 99, 235, 0.4);
  
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-glow: none;

  --grad: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  --grad-hero: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(2, 132, 199, 0.05) 100%);
  --hero-text: #1e293b;
  --hero-desc: #475569;
}

[data-theme='dark'] {
  /* Dark Theme */
  --bg-primary: #0f1117;
  --bg-secondary: #1a1d27;
  --bg-card: #1e2130;
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-hover: rgba(255, 255, 255, 0.05);
  
  --text-primary: #e8eaed;
  --text-secondary: #9aa0b0;
  --text-muted: #5f6577;
  
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-blue-subtle: rgba(59, 130, 246, 0.12);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-active: rgba(59, 130, 246, 0.5);
  
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.1);

  --grad: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
  --grad-hero: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);
  --hero-text: #e8eaed;
  --hero-desc: #9aa0b0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

::selection {
  background: var(--accent-blue-subtle);
  color: var(--accent-blue);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
}
a:hover {
  text-decoration: underline;
}

/* Sidebar Styling */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  padding: 24px 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-logo {
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.sidebar-logo h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: -0.3px;
  font-family: 'Outfit', sans-serif;
}

.sidebar-logo p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  padding: 10px 24px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.sidebar nav a:hover, .sidebar nav a.active {
  color: var(--accent-blue);
  background: var(--accent-blue-subtle);
  border-left-color: var(--accent-blue);
}

.sidebar nav a .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg-glass);
  font-size: 10px;
  font-weight: 600;
  margin-right: 10px;
  color: var(--text-muted);
}

.sidebar nav a.active .num {
  background: var(--accent-blue);
  color: white;
}

/* Main Area */
.main {
  margin-left: 260px;
  flex: 1;
  padding: 0;
  overflow-y: auto;
  height: 100vh;
}

/* Embedded in Iframe */
body.in-iframe .sidebar {
  display: none !important;
}

body.in-iframe .main {
  margin-left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

body.in-iframe .content {
  padding: 32px 24px 60px;
  max-width: 100%;
}

/* Hero Header */
.hero {
  background: var(--grad-hero);
  padding: 48px 40px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--hero-text);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 13.5px;
  color: var(--hero-desc);
  margin-top: 8px;
  max-width: 800px;
}

.hero .badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* Content Container */
.content {
  padding: 48px;
  max-width: 1000px;
  margin: 0 auto;
}

.section {
  margin-bottom: 48px;
  scroll-margin-top: 40px;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  padding-left: 12px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 1.5px;
  background: var(--accent-blue);
}

h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--accent-blue);
}

h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text-primary);
}

p, li {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

ul, ol {
  margin: 0 0 16px 20px;
}

/* Cards & Layout */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 12px);
  padding: 20px;
  margin: 16px 0;
  box-shadow: var(--shadow-card);
}

.card.tip, .card.info {
  border-color: rgba(37, 99, 235, 0.2);
  background: var(--accent-blue-subtle);
}

.card.tip h4, .card.info h4 {
  color: var(--accent-blue);
  margin-top: 0;
}

.card.warn {
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.03);
}

.card.warn h4 {
  color: var(--accent-red);
  margin-top: 0;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

th {
  background: var(--bg-glass);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 10px 14px;
  font-size: 12px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

tr:hover td {
  background: var(--bg-hover);
}

.role-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.role {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.role:hover {
  border-color: var(--accent-blue);
}

.role .icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.role .name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.role .desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.flow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.flow-step {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11.5px;
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: var(--shadow-card);
}

.flow-arrow {
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: bold;
}

/* Code */
code {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 11px;
  background: var(--accent-blue-subtle);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent-blue);
}

.code-wrap {
  position: relative;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border-subtle);
}

.code-header span {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.copy-btn {
  padding: 2px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 10px;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

pre {
  background: var(--bg-card);
  padding: 12px 16px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

pre .comment { color: var(--text-muted); font-style: italic; }
pre .keyword { color: var(--accent-purple); font-weight: 600; }
pre .string { color: var(--accent-emerald); }
pre .cmd { color: var(--accent-blue); }

.menu-path {
  color: var(--accent-blue);
  font-weight: 600;
}

.top-toolbar {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.lang-selector {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11.5px;
  outline: none;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.lang-selector:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .content { padding: 24px; }
  .hero { padding: 32px 24px; }
  .hero h1 { font-size: 22px; }
  .role-card { grid-template-columns: 1fr; }
}

@media print {
  .sidebar { display: none; }
  .main { margin-left: 0; }
}
</style>
</head>
<body>

<aside class="sidebar">
  <div class="sidebar-logo">
    <h1>📋 CertBridge</h1>
    <p data-i18n="sidebar.ver">사용 가이드 v0.1.0</p>
  </div>
  <nav id="nav">
    <a href="#start" class="active"><span class="num">1</span><span data-i18n="nav.start">시작하기</span></a>
    <a href="#roles"><span class="num">2</span><span data-i18n="nav.roles">역할별 가이드</span></a>
    <a href="#meta"><span class="num">3</span><span data-i18n="nav.meta">메타 템플릿 관리</span></a>
    <a href="#parsing"><span class="num">4</span><span data-i18n="nav.parsing">AI 파싱 워크플로우</span></a>
    <a href="#legacy"><span class="num">5</span><span data-i18n="nav.legacy">레거시 연동</span></a>
    <a href="#graphrag"><span class="num">6</span><span data-i18n="nav.graphrag">GraphRAG & 온톨로지</span></a>
    <a href="#dashboard"><span class="num">7</span><span data-i18n="nav.dashboard">대시보드 & 모니터링</span></a>
    <a href="#faq"><span class="num">8</span><span data-i18n="nav.faq">FAQ</span></a>
  </nav>
</aside>

<div class="main">
  <div class="top-toolbar">
    <select id="lang-select" class="lang-selector" onchange="changeLanguage(this.value)">
      <option value="ko">한국어</option>
      <option value="en">English</option>
      <option value="zh">中文</option>
      <option value="ja">日本語</option>
      <option value="de">Deutsch</option>
      <option value="fr">Français</option>
      <option value="es">Español</option>
      <option value="pt">Português</option>
      <option value="hu">Magyar</option>
    </select>
  </div>

  <div class="hero">
    <h1 data-i18n="hero.title">CertBridge 사용 가이드</h1>
    <p data-i18n="hero.desc">AI 성적서 파싱부터 레거시 시스템 통합, 그래프 기반 분석까지 — 역할별 상세 사용법을 안내합니다.</p>
    <span class="badge" data-i18n="hero.badge">📖 v0.1.0 · 관리자 · 입력자 · 분석가</span>
  </div>
  
  <div class="content">

    <!-- 1. 시작하기 -->
    <section class="section" id="start">
      <h2 data-i18n="start.title">1. 시작하기</h2>
      <h3 data-i18n="start.login">로그인 및 최초 접속</h3>
      <p data-i18n="start.login_desc">앱 실행 후 서버 주소 확인(설정 → 중앙 서버 URL) → 로그인 화면에서 계정/비밀번호 입력.</p>
      <table>
        <thead>
          <tr>
            <th data-i18n="start.tb_role">기본 관리자</th>
            <th data-i18n="start.tb_id">아이디</th>
            <th data-i18n="start.tb_pw">비밀번호</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td data-i18n="start.tb_first">최초 로그인</td>
            <td><code>admin</code></td>
            <td><code>admin123</code></td>
          </tr>
        </tbody>
      </table>
      <h3 data-i18n="start.menu_intro">대시보드 및 메뉴 구성</h3>
      <p data-i18n="start.menu_desc">로그인 후 메인 대시보드가 표시됩니다. 좌측 사이드바에서 각 기능 메뉴에 접근합니다:</p>
      <table>
        <thead>
          <tr>
            <th data-i18n="start.tb_m_name">메뉴</th>
            <th data-i18n="start.tb_m_desc">설명</th>
            <th data-i18n="start.tb_m_auth">접근 권한</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td data-i18n="start.tb_m1">📊 대시보드</td>
            <td data-i18n="start.tb_m1_desc">파싱 통계, 시스템 현황, 최근 작업</td>
            <td data-i18n="start.tb_m_all">모든 사용자</td>
          </tr>
          <tr>
            <td data-i18n="start.tb_m2">📄 파싱</td>
            <td data-i18n="start.tb_m2_desc">성적서 업로드 및 AI 파싱</td>
            <td>user, admin</td>
          </tr>
          <tr>
            <td data-i18n="start.tb_m3">📋 메타 관리</td>
            <td data-i18n="start.tb_m3_desc">성적서 양식 템플릿 등록</td>
            <td>user, admin</td>
          </tr>
          <tr>
            <td data-i18n="start.tb_m4">🔗 온톨로지</td>
            <td data-i18n="start.tb_m4_desc">Neo4j 그래프 탐색 및 관리</td>
            <td data-i18n="start.tb_m_all">모든 사용자</td>
          </tr>
          <tr>
            <td data-i18n="start.tb_m5">💬 AI 채팅</td>
            <td data-i18n="start.tb_m5_desc">GraphRAG 자연어 질의</td>
            <td>analyst, admin</td>
          </tr>
          <tr>
            <td data-i18n="start.tb_m6">👥 그룹 관리</td>
            <td data-i18n="start.tb_m6_desc">클라이언트 그룹 및 서비스 프로파일</td>
            <td>admin</td>
          </tr>
        </tbody>
      </table>
    </section>

    <!-- 2. 역할별 가이드 -->
    <section class="section" id="roles">
      <h2 data-i18n="roles.title">2. 역할별 가이드</h2>
      <div class="role-card">
        <div class="role">
          <div class="icon">👤</div>
          <div class="name" data-i18n="roles.r1">관리자 (Admin)</div>
          <div class="desc" data-i18n="roles.r1_desc">시스템 설정, 그룹/사용자 관리, 서비스 프로파일, 모니터링</div>
        </div>
        <div class="role">
          <div class="icon">👷</div>
          <div class="name" data-i18n="roles.r2">입력자 (User)</div>
          <div class="desc" data-i18n="roles.r2_desc">성적서 업로드, AI 파싱, 결과 검증, 레거시 전송</div>
        </div>
        <div class="role">
          <div class="icon">🔬</div>
          <div class="name" data-i18n="roles.r3">분석가 (Analyst)</div>
          <div class="desc" data-i18n="roles.r3_desc">온톨로지 탐색, GraphRAG Q&A, 통계 분석</div>
        </div>
      </div>

      <h3 data-i18n="roles.admin_wf">👤 관리자 워크플로우</h3>
      <div class="flow">
        <div class="flow-step" data-i18n="roles.aw1">그룹 생성</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.aw2">프로파일 등록</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.aw3">사용자 추가</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.aw4">어댑터 설정</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.aw5">모니터링</div>
      </div>
      <ul>
        <li data-i18n="roles.admin_li1"><strong>그룹 관리</strong>: 클라이언트 그룹을 생성하고, 각 그룹에 DB/MinIO/LLM/Neo4j 정보를 독립 할당합니다.</li>
        <li data-i18n="roles.admin_li2"><strong>사용자 관리</strong>: 사용자를 생성하고 역할(admin/user/analyst)을 할당하며 TOTP 2FA 설정을 제어합니다.</li>
      </ul>

      <h3 data-i18n="roles.user_wf">👷 입력자 워크플로우</h3>
      <div class="flow">
        <div class="flow-step" data-i18n="roles.uw1">성적서 선택</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.uw2">템플릿 매칭</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.uw3">AI 파싱</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.uw4">수동 검증</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.uw5">레거시 전송</div>
      </div>

      <h3 data-i18n="roles.analyst_wf">🔬 분석가 워크플로우</h3>
      <div class="flow">
        <div class="flow-step" data-i18n="roles.anw1">온톨로지 탐색</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.anw2">자연어 질의</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.anw3">Cypher 분석</div><span class="flow-arrow"></span>
        <div class="flow-step" data-i18n="roles.anw4">품질 레포트</div>
      </div>
    </section>

    <!-- 3. 메타 템플릿 -->
    <section class="section" id="meta">
      <h2 data-i18n="meta.title">3. 메타 템플릿 관리</h2>
      <p data-i18n="meta.intro">각 업체/양식별로 성적서 메타 정보를 등록하면, AI 파싱 시 자동으로 필드 매핑이 적용됩니다.</p>

      <h3 data-i18n="meta.new_reg">새 템플릿 등록 절차</h3>
      <ol>
        <li data-i18n="meta.step1"><strong>메타 관리</strong> 메뉴로 이동하여 <strong>신규 등록</strong>을 선택합니다.</li>
        <li data-i18n="meta.step2"><strong>업체명</strong>, <strong>소재 유형</strong><strong>문서 버전</strong>을 명시합니다.</li>
        <li data-i18n="meta.step3"><strong>필드 Definitions</strong>를 정의합니다: 원본 키워드 → 표준화 필드명, 정규 표현식 힌트, 필수 데이터 타입 설정.</li>
        <li data-i18n="meta.step4">저장 즉시 중앙 API 및 Neo4j 온톨로지 스키마 노드와 관계가 자동 동기화됩니다.</li>
      </ol>

      <h3 data-i18n="meta.example">필드 매핑 예시</h3>
      <table>
        <thead>
          <tr>
            <th data-i18n="meta.tb_orig">원본 필드명</th>
            <th data-i18n="meta.tb_std">정규화 필드 (표준)</th>
            <th data-i18n="meta.tb_type">타입</th>
            <th data-i18n="meta.tb_req">필수 여부</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>Ni 함량 (%) / Nickel Content</td>
            <td><code>ni_pct</code></td>
            <td>number</td>
            <td></td>
          </tr>
          <tr>
            <td>LOT 번호 / Batch No.</td>
            <td><code>lot_number</code></td>
            <td>text</td>
            <td></td>
          </tr>
          <tr>
            <td>시험일자 / Date of Test</td>
            <td><code>test_date</code></td>
            <td>date</td>
            <td></td>
          </tr>
        </tbody>
      </table>

      <div class="card tip">
        <h4 data-i18n="meta.tip_title">💡 신속 버저닝 관리</h4>
        <p data-i18n="meta.tip_desc">동일 업체의 양식이 소폭 변경된 경우, 기존 양식을 복사하여 새 버전을 등록하십시오. 이전 품질 이력과의 하위 호환성이 안전하게 보장됩니다.</p>
      </div>
    </section>

    <!-- 4. AI 파싱 -->
    <section class="section" id="parsing">
      <h2 data-i18n="parsing.title">4. AI 파싱 워크플로우</h2>

      <h3 data-i18n="parsing.support">지원 파일 형식</h3>
      <table>
        <thead>
          <tr>
            <th data-i18n="parsing.tb_fmt">형식</th>
            <th data-i18n="parsing.tb_ext">확장자</th>
            <th data-i18n="parsing.tb_proc">처리 방식</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>PDF</td>
            <td><code>.pdf</code></td>
            <td data-i18n="parsing.tb_pdf">텍스트 직접 추출 + Vision/OCR 하이브리드 엔진</td>
          </tr>
          <tr>
            <td>Excel</td>
            <td><code>.xlsx, .xls</code></td>
            <td data-i18n="parsing.tb_excel">시트 구조 셀 데이터 직접 맵 추출</td>
          </tr>
          <tr>
            <td>Image</td>
            <td><code>.png, .jpg</code></td>
            <td data-i18n="parsing.tb_image">멀티모달 Vision AI 분석 및 좌표 기하 보정</td>
          </tr>
        </tbody>
      </table>

      <h3 data-i18n="parsing.proc">파싱 절차</h3>
      <ol>
        <li data-i18n="parsing.step1"><strong>파싱</strong> 메뉴에서 파일을 업로드(드래그 앤 드롭 지원)합니다.</li>
        <li data-i18n="parsing.step2">원하는 <strong>AI 엔진</strong>(Gemini Pro, Claude Sonnet, OpenAI GPT 등)을 지정합니다.</li>
        <li data-i18n="parsing.step3"><strong>파싱 시작</strong>을 실행하면 AI가 비동기 큐를 통해 필드-값 매핑과 <strong>정확도 신뢰 점수</strong>를 도출합니다.</li>
        <li data-i18n="parsing.step4">신뢰도 경고 표시(90% 미만) 항목을 확인하고 필요한 경우 값을 수정 후 <strong>승인/저장</strong>합니다.</li>
      </ol>
    </section>

    <!-- 5. 레거시 연동 -->
    <section class="section" id="legacy">
      <h2 data-i18n="legacy.title">5. 레거시 시스템 연동</h2>
      <h3 data-i18n="legacy.adapter">어댑터 매핑 설정</h3>
      <p data-i18n="legacy.adapter_desc">추출된 JSON 데이터를 사내 기간계 시스템(MES, ERP, LIMS 등) 규격에 맞게 변환하여 자동 발송합니다.</p>
      <ol>
        <li data-i18n="legacy.ad_step1">관리자 콘솔의 <strong>서비스 프로파일 → 아웃바운드 어댑터</strong> 탭으로 이동합니다.</li>
        <li data-i18n="legacy.ad_step2">송신 방식을 설정합니다 (REST API / Database Direct Insert / Local CSV File Out).</li>
        <li data-i18n="legacy.ad_step3">필드 맵의 타겟 키명(LegacyKey)을 매칭하여 동기화를 활성화합니다.</li>
      </ol>
      <h3 data-i18n="legacy.sync">데이터 전송 확인</h3>
      <p data-i18n="legacy.sync_desc">승인이 완료된 문서는 상세 보기 창에서 **[레거시 송신]** 버튼 클릭 시 어댑터를 거쳐 1초 이내에 연동 시스템에 자동 반영됩니다. 송신 현황 및 실패 사유는 **감사 로그(Audit Log)**에 상세히 기록됩니다.</p>
    </section>

    <!-- 6. GraphRAG -->
    <section class="section" id="graphrag">
      <h2 data-i18n="graphrag.title">6. GraphRAG & 온톨로지</h2>
      <h3 data-i18n="graphrag.structure">Neo4j 지식 온톨로지 구조</h3>
      <p data-i18n="graphrag.struct_desc">파싱된 품질 정보는 단순 DB 테이블을 넘어 Neo4j의 유기적인 지식 그래프 구조로 적재됩니다:</p>
      <ul>
        <li data-i18n="graphrag.li1"><strong>Material (소재)</strong><strong>Supplier (공급사)</strong> 연결</li>
        <li data-i18n="graphrag.li2"><strong>Certificate (성적서 LOT)</strong><strong>TestResult (측정치)</strong> 연결</li>
        <li data-i18n="graphrag.li3">각 측정치는 <strong>TestMethod (검사표준)</strong> 및 장비 노드와 의미론적으로 연결</li>
      </ul>

      <h3 data-i18n="graphrag.chat">GraphRAG 자연어 분석 인터페이스</h3>
      <p data-i18n="graphrag.chat_desc"><strong>온톨로지 Q&A</strong> 메뉴에서 자연어 질문을 작성하면, AI가 자동으로 유효한 Neo4j Cypher 쿼리를 구성하여 다차원 그래프를 고속 질의하고 신뢰성 높은 통계를 내놓습니다.</p>
      
      <div class="card tip">
        <h4 data-i18n="graphrag.prompt_title">💡 추천하는 AI 질문 형태</h4>
        <ul>
          <li>"NCM811 소재 공급사 중 최근 3개월간 평균 수분 함량이 가장 안정적이었던 제조사는 어디야?"</li>
          <li>"이번 전지 셀 테스트에서 쇼트가 난 LOT의 전구체 LOT 정보와 제조 온도 편차 내역을 시각화해 줘."</li>
        </ul>
      </div>
    </section>

    <!-- 7. 대시보드 -->
    <section class="section" id="dashboard">
      <h2 data-i18n="dashboard.title">7. 대시보드 & 모니터링</h2>
      <h3 data-i18n="dashboard.realtime">실시간 대시보드 현황판</h3>
      <p data-i18n="dashboard.desc">현장의 실시간 운영 품질 현황을 요약하는 프리미엄 정보 뷰를 제공합니다:</p>
      <ul>
        <li data-i18n="dashboard.li1"><strong>오늘의 처리량 (Total Volume)</strong>: 금일 성공적으로 파싱된 성적서 개수</li>
        <li data-i18n="dashboard.li2"><strong>정확도 지표 (AI Confidence Trend)</strong>: 추출 정확도 및 신뢰 점수 시계열 추이</li>
        <li data-i18n="dashboard.li3"><strong>인프라 생존 지표 (Service Status)</strong>: PG, Neo4j, Redis, MinIO 연결 상태 정상 상태 모니터링</li>
      </ul>
    </section>

    <!-- 8. FAQ -->
    <section class="section" id="faq">
      <h2 data-i18n="faq.title">8. 자주 묻는 질문 (FAQ)</h2>
      
      <div class="card">
        <h4 data-i18n="faq.q1">Q. AI 파싱 도중 일부 텍스트가 깨지거나 값이 틀리게 나옵니다.</h4>
        <p data-i18n="faq.a1">A. 성적서 문서가 저해상도 스캔 이미지인 경우 OCR 엔진 오차가 발생할 수 있습니다. 템플릿 정의에서 정규 표현식 정제 필터를 보강하거나 보다 고성능의 프라이빗 AI 모델(Gemini 1.5 Pro 또는 Claude 3.5 Sonnet)로 변경하여 파싱하십시오.</p>
      </div>

      <div class="card">
        <h4 data-i18n="faq.q2">Q. 보안 정책상 클라우드 API를 사용할 수 없습니다. 대안이 있습니까?</h4>
        <p data-i18n="faq.a2">A. 예. CertBridge는 Ollama, vLLM 등의 로컬 추론 솔루션과 연계할 수 있는 "OpenAI 호환 API" 형식을 완벽히 지원합니다. 사내 인트라넷 환경에 Llama-3-Instruct 등 온프레미스(On-Premise) 모델을 올려 외부망 유출 없이 100% 오프라인 운영이 가능합니다.</p>
      </div>

      <div class="card">
        <h4 data-i18n="faq.q3">Q. 데이터 전송 오류가 지속적으로 발생합니다.</h4>
        <p data-i18n="faq.a3">A. 클라이언트의 네트워크 방화벽에서 중앙 서버의 API 포트(기본 <code>8090</code>)에 대한 인바운드 차단 해제 여부와 DB 커넥션 풀 설정을 확인하십시오. 상세 원인은 감사 로그 메뉴의 오류 추적 항목을 참고바랍니다.</p>
      </div>
    </section>

  </div>
</div>

<script>
// ─── Theme Synchronization ───
function syncTheme() {
  let theme = "light";
  try {
    if (window.parent && window.parent.document && window.parent.document.documentElement) {
      theme = window.parent.document.documentElement.getAttribute("data-theme") || "light";
    } else {
      theme = localStorage.getItem("certbridge_theme") || "light";
    }
  } catch (e) {
    theme = localStorage.getItem("certbridge_theme") || "light";
  }
  
  if (theme === "dark") {
    document.documentElement.setAttribute("data-theme", "dark");
  } else {
    document.documentElement.removeAttribute("data-theme");
  }
}
syncTheme();
// Observe parent document changes if available
try {
  if (window.parent && window.parent.document && window.parent.document.documentElement) {
    const observer = new MutationObserver((mutations) => {
      mutations.forEach((mutation) => {
        if (mutation.type === "attributes" && mutation.attributeName === "data-theme") {
          syncTheme();
        }
      });
    });
    observer.observe(window.parent.document.documentElement, { attributes: true });
  }
} catch (e) {
  setInterval(syncTheme, 1000);
}

// ─── Iframe Detection for Sidebar ───
if (window.self !== window.top) {
  document.body.classList.add('in-iframe');
}

// 9 Locales Translation Dictionary
const i18n = {
  ko: {
    "sidebar.ver": "사용 가이드 v0.1.0",
    "nav.start": "시작하기",
    "nav.roles": "역할별 가이드",
    "nav.meta": "메타 템플릿 관리",
    "nav.parsing": "AI 파싱 워크플로우",
    "nav.legacy": "레거시 연동",
    "nav.graphrag": "GraphRAG & 온톨로지",
    "nav.dashboard": "대시보드 & 모니터링",
    "nav.faq": "FAQ",
    "hero.title": "CertBridge 사용 가이드",
    "hero.desc": "AI 성적서 파싱부터 레거시 시스템 통합, 그래프 기반 분석까지 — 역할별 상세 사용법을 안내합니다.",
    "hero.badge": "📖 v0.1.0 · 관리자 · 입력자 · 분석가",
    "start.title": "1. 시작하기",
    "start.login": "로그인 및 최초 접속",
    "start.login_desc": "앱 실행 후 서버 주소 확인(설정 → 중앙 서버 URL) → 로그인 화면에서 계정/비밀번호 입력.",
    "start.tb_role": "기본 관리자",
    "start.tb_id": "아이디",
    "start.tb_pw": "비밀번호",
    "start.tb_first": "최초 로그인",
    "start.menu_intro": "대시보드 및 메뉴 구성",
    "start.menu_desc": "로그인 후 메인 대시보드가 표시됩니다. 좌측 사이드바에서 각 기능 메뉴에 접근합니다:",
    "start.tb_m_name": "메뉴",
    "start.tb_m_desc": "설명",
    "start.tb_m_auth": "접근 권한",
    "start.tb_m1": "📊 대시보드",
    "start.tb_m1_desc": "파싱 통계, 시스템 현황, 최근 작업",
    "start.tb_m_all": "모든 사용자",
    "start.tb_m2": "📄 파싱",
    "start.tb_m2_desc": "성적서 업로드 및 AI 파싱",
    "start.tb_m3": "📋 메타 관리",
    "start.tb_m3_desc": "성적서 양식 템플릿 등록",
    "start.tb_m4": "🔗 온톨로지",
    "start.tb_m4_desc": "Neo4j 그래프 탐색 및 관리",
    "start.tb_m5": "💬 AI 채팅",
    "start.tb_m5_desc": "GraphRAG 자연어 질의",
    "start.tb_m6": "👥 그룹 관리",
    "start.tb_m6_desc": "클라이언트 그룹 및 서비스 프로파일",
    "roles.title": "2. 역할별 가이드",
    "roles.r1": "관리자 (Admin)",
    "roles.r1_desc": "시스템 설정, 그룹/사용자 관리, 서비스 프로파일, 모니터링",
    "roles.r2": "입력자 (User)",
    "roles.r2_desc": "성적서 업로드, AI 파싱, 결과 검증, 레거시 전송",
    "roles.r3": "분석가 (Analyst)",
    "roles.r3_desc": "온톨로지 탐색, GraphRAG Q&A, 통계 분석",
    "roles.admin_wf": "👤 관리자 워크플로우",
    "roles.aw1": "그룹 생성",
    "roles.aw2": "프로파일 등록",
    "roles.aw3": "사용자 추가",
    "roles.aw4": "어댑터 설정",
    "roles.aw5": "모니터링",
    "roles.admin_li1": "그룹 관리: 클라이언트 그룹을 생성하고, 각 그룹에 DB/MinIO/LLM/Neo4j 정보를 독립 할당합니다.",
    "roles.admin_li2": "사용자 관리: 사용자를 생성하고 역할(admin/user/analyst)을 할당하며 TOTP 2FA 설정을 제어합니다.",
    "roles.user_wf": "👷 입력자 워크플로우",
    "roles.uw1": "성적서 선택",
    "roles.uw2": "템플릿 매칭",
    "roles.uw3": "AI 파싱",
    "roles.uw4": "수동 검증",
    "roles.uw5": "레거시 전송",
    "roles.analyst_wf": "🔬 분석가 워크플로우",
    "roles.anw1": "온톨로지 탐색",
    "roles.anw2": "자연어 질의",
    "roles.anw3": "Cypher 분석",
    "roles.anw4": "품질 레포트",
    "meta.title": "3. 메타 템플릿 관리",
    "meta.intro": "각 업체/양식별로 성적서 메타 정보를 등록하면, AI 파싱 시 자동으로 필드 매핑이 적용됩니다.",
    "meta.new_reg": "새 템플릿 등록 절차",
    "meta.step1": "메타 관리 메뉴로 이동하여 신규 등록을 선택합니다.",
    "meta.step2": "업체명, 소재 유형 및 문서 버전을 명시합니다.",
    "meta.step3": "필드 Definitions를 정의합니다: 원본 키워드 → 표준화 필드명, 정규 표현식 힌트, 필수 데이터 타입 설정.",
    "meta.step4": "저장 즉시 중앙 API 및 Neo4j 온톨로지 스키마 노드와 관계가 자동 동기화됩니다.",
    "meta.example": "필드 매핑 예시",
    "meta.tb_orig": "원본 필드명",
    "meta.tb_std": "정규화 필드 (표준)",
    "meta.tb_type": "타입",
    "meta.tb_req": "필수 여부",
    "meta.tip_title": "💡 신속 버저닝 관리",
    "meta.tip_desc": "동일 업체의 양식이 소폭 변경된 경우, 기존 양식을 복사하여 새 버전을 등록하십시오. 이전 품질 이력과의 하위 호환성이 안전하게 보장됩니다.",
    "parsing.title": "4. AI 파싱 워크플로우",
    "parsing.support": "지원 파일 형식",
    "parsing.tb_fmt": "형식",
    "parsing.tb_ext": "확장자",
    "parsing.tb_proc": "처리 방식",
    "parsing.tb_pdf": "텍스트 직접 추출 + Vision/OCR 하이브리드 엔진",
    "parsing.tb_excel": "시트 구조 셀 데이터 직접 맵 추출",
    "parsing.tb_image": "멀티모달 Vision AI 분석 및 좌표 기하 보정",
    "parsing.proc": "파싱 절차",
    "parsing.step1": "파싱 메뉴에서 파일을 업로드(드래그 앤 드롭 지원)합니다.",
    "parsing.step2": "원하는 AI 엔진(Gemini Pro, Claude Sonnet, OpenAI GPT 등)을 지정합니다.",
    "parsing.step3": "파싱 시작을 실행하면 AI가 비동기 큐를 통해 필드-값 매핑과 정확도 신뢰 점수를 도출합니다.",
    "parsing.step4": "신뢰도 경고 표시(90% 미만) 항목을 확인하고 필요한 경우 값을 수정 후 승인/저장합니다.",
    "legacy.title": "5. 레거시 시스템 연동",
    "legacy.adapter": "어댑터 매핑 설정",
    "legacy.adapter_desc": "추출된 JSON 데이터를 사내 기간계 시스템(MES, ERP, LIMS 등) 규격에 맞게 변환하여 자동 발송합니다.",
    "legacy.ad_step1": "관리자 콘솔의 서비스 프로파일 → 아웃바운드 어댑터 탭으로 이동합니다.",
    "legacy.ad_step2": "송신 방식을 설정합니다 (REST API / Database Direct Insert / Local CSV File Out).",
    "legacy.ad_step3": "필드 맵의 타겟 키명(LegacyKey)을 매칭하여 동기화를 활성화합니다.",
    "legacy.sync": "데이터 전송 확인",
    "legacy.sync_desc": "승인이 완료된 문서는 상세 보기 창에서 [레거시 송신] 버튼 클릭 시 어댑터를 거쳐 1초 이내에 연동 시스템에 자동 반영됩니다. 송신 현황 및 실패 사유는 감사 로그(Audit Log)에 상세히 기록됩니다.",
    "graphrag.title": "6. GraphRAG & 온톨로지",
    "graphrag.structure": "Neo4j 지식 온톨로지 구조",
    "graphrag.struct_desc": "파싱된 품질 정보는 단순 DB 테이블을 넘어 Neo4j의 유기적인 지식 그래프 구조로 적재됩니다:",
    "graphrag.li1": "Material (소재) ↔ Supplier (공급사) 연결",
    "graphrag.li2": "Certificate (성적서 LOT) ↔ TestResult (측정치) 연결",
    "graphrag.li3": "각 측정치는 TestMethod (검사표준) 및 장비 노드와 의미론적으로 연결",
    "graphrag.chat": "GraphRAG 자연어 분석 인터페이스",
    "graphrag.chat_desc": "온톨로지 Q&A 메뉴에서 자연어 질문을 작성하면, AI가 자동으로 유효한 Neo4j Cypher 쿼리를 구성하여 다차원 그래프를 고속 질의하고 신뢰성 높은 통계를 내놓습니다.",
    "graphrag.prompt_title": "💡 추천하는 AI 질문 형태",
    "dashboard.title": "7. 대시보드 & 모니터링",
    "dashboard.realtime": "실시간 대시보드 현황판",
    "dashboard.desc": "현장의 실시간 운영 품질 현황을 요약하는 프리미엄 정보 뷰를 제공합니다:",
    "dashboard.li1": "오늘의 처리량 (Total Volume): 금일 성공적으로 파싱된 성적서 개수",
    "dashboard.li2": "정확도 지표 (AI Confidence Trend): 추출 정확도 및 신뢰 점수 시계열 추이",
    "dashboard.li3": "인프라 생존 지표 (Service Status): PG, Neo4j, Redis, MinIO 연결 상태 정상 상태 모니터링",
    "faq.title": "8. 자주 묻는 질문 (FAQ)",
    "faq.q1": "Q. AI 파싱 도중 일부 텍스트가 깨지거나 값이 틀리게 나옵니다.",
    "faq.a1": "A. 성적서 문서가 저해상도 스캔 이미지인 경우 OCR 엔진 오차가 발생할 수 있습니다. 템플릿 정의에서 정규 표현식 정제 필터를 보강하거나 보다 고성능의 프라이빗 AI 모델(Gemini 1.5 Pro 또는 Claude 3.5 Sonnet)로 변경하여 파싱하십시오.",
    "faq.q2": "Q. 보안 정책상 클라우드 API를 사용할 수 없습니다. 대안이 있습니까?",
    "faq.a2": "A. 예. CertBridge는 Ollama, vLLM 등의 로컬 추론 솔루션과 연계할 수 있는 \"OpenAI 호환 API\" 형식을 완벽히 지원합니다. 사내 인트라넷 환경에 Llama-3-Instruct 등 온프레미스(On-Premise) 모델을 올려 외부망 유출 없이 100% 오프라인 운영이 가능합니다.",
    "faq.q3": "Q. 데이터 전송 오류가 지속적으로 발생합니다.",
    "faq.a3": "A. 클라이언트의 네트워크 방화벽에서 중앙 서버의 API 포트(기본 8090)에 대한 인바운드 차단 해제 여부와 DB 커넥션 풀 설정을 확인하십시오. 상세 원인은 감사 로그 메뉴의 오류 추적 항목을 참고바랍니다."
  },
  en: {
    "sidebar.ver": "User Guide v0.1.0",
    "nav.start": "Getting Started",
    "nav.roles": "Role Guide",
    "nav.meta": "Meta Template",
    "nav.parsing": "AI Parsing",
    "nav.legacy": "Legacy Sync",
    "nav.graphrag": "GraphRAG & Ontology",
    "nav.dashboard": "Dashboard",
    "nav.faq": "FAQ",
    "hero.title": "CertBridge User Guide",
    "hero.desc": "From quality certificate AI parsing to ERP/MES integration and Neo4j GraphRAG analysis — comprehensive usage guide by user roles.",
    "hero.badge": "📖 v0.1.0 · Admin · User · Analyst",
    "start.title": "1. Getting Started",
    "start.login": "Login & Connection Setup",
    "start.login_desc": "Check your target central server URL (Settings → Server URL) and enter your account ID and password.",
    "start.tb_role": "Default User",
    "start.tb_id": "ID",
    "start.tb_pw": "Password",
    "start.tb_first": "Initial Login",
    "start.menu_intro": "Main Dashboard Structure",
    "start.menu_desc": "After logging in, you can access the left sidebar navigation items based on your workspace privileges:",
    "start.tb_m_name": "Menu",
    "start.tb_m_desc": "Description",
    "start.tb_m_auth": "Access Role",
    "start.tb_m1": "📊 Dashboard",
    "start.tb_m1_desc": "Parsing statistics, live system statuses, recent parsing jobs",
    "start.tb_m_all": "All Roles",
    "start.tb_m2": "📄 Parsing",
    "start.tb_m2_desc": "Upload certificate files for active AI extraction",
    "start.tb_m3": "📋 Templates",
    "start.tb_m3_desc": "Define metadata templates and field mappings",
    "start.tb_m4": "🔗 Ontology",
    "start.tb_m4_desc": "Explore Neo4j semantic graph relationships",
    "start.tb_m5": "💬 GraphRAG Chat",
    "start.tb_m5_desc": "Ask LLMs about battery quality in natural language",
    "start.tb_m6": "👥 Groups",
    "start.tb_m6_desc": "Configure client profiles and local credentials",
    "roles.title": "2. Roles & Guidelines",
    "roles.r1": "Administrator (Admin)",
    "roles.r1_desc": "System environments, multi-groups, user accounts, audit logging, monitoring",
    "roles.r2": "Field Operator (User)",
    "roles.r2_desc": "Upload quality records, trigger OCR extraction, manual validation, send to legacy systems",
    "roles.r3": "Quality Analyst (Analyst)",
    "roles.r3_desc": "Semantic graph navigation, GraphRAG querying, quality trend reports",
    "roles.admin_wf": "👤 Administrator Workflow",
    "roles.aw1": "Create Group",
    "roles.aw2": "Configure Profiles",
    "roles.aw3": "Add Users",
    "roles.aw4": "Setup Adapter",
    "roles.aw5": "Monitor",
    "roles.admin_li1": "Group Management: Provision localized database, MinIO bucket, LLM, and Neo4j configurations per group.",
    "roles.admin_li2": "User Management: Create secure accounts and manage TOTP 2FA multi-factor settings.",
    "roles.user_wf": "👷 Operator Workflow",
    "roles.uw1": "Select Document",
    "roles.uw2": "Match Template",
    "roles.uw3": "Run AI OCR",
    "roles.uw4": "Review Values",
    "roles.uw5": "Send to MES",
    "roles.analyst_wf": "🔬 Analyst Workflow",
    "roles.anw1": "Browse Graph",
    "roles.anw2": "Ask AI Chat",
    "roles.anw3": "Verify Cypher",
    "roles.anw4": "Export Report",
    "meta.title": "3. Metadata & Schema Templates",
    "meta.intro": "Define normalization mappings for different supplier certificate templates to enable seamless extraction.",
    "meta.new_reg": "How to Create a Template",
    "meta.step1": "Go to the Template Manager and click on Create Template.",
    "meta.step2": "Enter the supplier name, active material type, and active revision version.",
    "meta.step3": "Map certificate keys: Raw text keyword → Normalized target key, regex format, data type.",
    "meta.step4": "Once saved, syncMetaOntology automatically registers the new FieldDefinition schema nodes in Neo4j.",
    "meta.example": "Mapping Examples",
    "meta.tb_orig": "Raw Keyword in Doc",
    "meta.tb_std": "Normalized Standard Key",
    "meta.tb_type": "Data Type",
    "meta.tb_req": "Required",
    "meta.tip_title": "💡 Easy Versioning",
    "meta.tip_desc": "If a supplier updates their document layout slightly, copy the existing template and increment the version. Full backward compatibility is automatically maintained.",
    "parsing.title": "4. AI Parsing & Extraction",
    "parsing.support": "Supported Formats",
    "parsing.tb_fmt": "Format",
    "parsing.tb_ext": "Extensions",
    "parsing.tb_proc": "Processing Pipeline",
    "parsing.tb_pdf": "Direct Text extraction + Multi-modal Vision/OCR fallback",
    "parsing.tb_excel": "Direct spreadsheet cellular coordinate key mapping",
    "parsing.tb_image": "Multimodal Vision AI extraction and spatial geometric layout correction",
    "parsing.proc": "Extraction Steps",
    "parsing.step1": "Go to the Parsing page and drag & drop files.",
    "parsing.step2": "Select your AI Provider (Gemini Pro, Claude Sonnet, OpenAI GPT, Ollama).",
    "parsing.step3": "Click Parse. The asynchronous engine extracts parameters and calculates AI Confidence Scores.",
    "parsing.step4": "Review warning items (marked orange when confidence <90%), edit incorrect data, and click approve.",
    "legacy.title": "5. Legacy System Integration",
    "legacy.adapter": "ERP / MES Adapter Mapping",
    "legacy.adapter_desc": "Send verified JSON certificates to your factory LIMS, MES, or ERP systems in real-time.",
    "legacy.ad_step1": "Go to settings/profiles → Outbound Adapters.",
    "legacy.ad_step2": "Choose protocol (REST API webhook / SQL INSERT / CSV file output).",
    "legacy.ad_step3": "Verify target key matching (LegacyKey) and enable synchronization.",
    "legacy.sync": "Push Data",
    "legacy.sync_desc": "After validating values, click the 'Send to Legacy' button. Data is synchronized within 1 second. Log details appear in the central Audit Log.",
    "graphrag.title": "6. GraphRAG & Semantic Ontology",
    "graphrag.structure": "Neo4j Knowledge Graph Model",
    "graphrag.struct_desc": "Certificates are structured logically as inter-connected nodes instead of isolated table rows:",
    "graphrag.li1": "Material ↔ Supplier relations",
    "graphrag.li2": "Certificate (LOT ID) ↔ TestResult values",
    "graphrag.li3": "TestResult ↔ TestMethod (ISO/ASTM) standards",
    "graphrag.chat": "GraphRAG Natural Language AI Chat",
    "graphrag.chat_desc": "Under the AI Q&A tab, ask complex analytical questions. The LLM translates your question to a Cypher query, retrieves the graph paths, and provides contextual answers.",
    "graphrag.prompt_title": "💡 Example AI Prompts",
    "dashboard.title": "7. Dashboard & Health Check",
    "dashboard.realtime": "Live Operation Console",
    "dashboard.desc": "Provides executive level summaries of quality processing metrics:",
    "dashboard.li1": "Total Volume: Successfully parsed records today",
    "dashboard.li2": "AI Confidence Trend: Extraction accuracy index",
    "dashboard.li3": "Service Status: Active connection probes for PostgreSQL, Neo4j, Redis, and MinIO",
    "faq.title": "8. Frequently Asked Questions (FAQ)",
    "faq.q1": "Q. Some text parameters are translated poorly or values are missing.",
    "faq.a1": "A. Scanned files with bad dpi resolution can limit OCR performance. Optimize your meta-template rules, apply regular expression pre-filters, or shift to a stronger model like Claude 3.5 Sonnet.",
    "faq.q2": "Q. Company policy restricts using public cloud APIs. Can we run offline?",
    "faq.a2": "A. Yes. CertBridge supports local OpenAI-compatible endpoints (like Ollama or vLLM). You can deploy open-weight models (e.g. Llama-3, Qwen) completely offline within your intranet.",
    "faq.q3": "Q. Network connection timeout issues.",
    "faq.a3": "A. Make sure target ports (default API: 8090, Neo4j: 7687) are allowed by local/server firewalls and inspect central Audit logs for details."
  },
  zh: {
    "sidebar.ver": "使用指南 v0.1.0",
    "nav.start": "快速开始",
    "nav.roles": "角色操作指南",
    "nav.meta": "模板元数据管理",
    "nav.parsing": "AI 智能解析",
    "nav.legacy": "三方系统集成",
    "nav.graphrag": "GraphRAG 与图本体",
    "nav.dashboard": "实时仪表盘",
    "nav.faq": "常见问题 FAQ",
    "hero.title": "CertBridge 质量证书系统使用手册",
    "hero.desc": "从 AI 提取解析到遗留系统同步,以及基于 Neo4j 知识图谱的语义 GraphRAG 分析——为您的岗位提供全面指引。",
    "hero.badge": "📖 v0.1.0 · 管理员 · 录入员 · 质量分析师",
    "start.title": "1. 快速开始",
    "start.login": "登录与中心连接",
    "start.login_desc": "启动桌面端后,在“设置”中配置正确的中央服务器 URL(例如 8090 端口),输入账号和密码进行登录。",
    "start.tb_role": "默认账号",
    "start.tb_id": "用户名",
    "start.tb_pw": "密码",
    "start.tb_first": "首次初始化",
    "start.menu_intro": "左侧菜单架构",
    "start.menu_desc": "登录系统后,可以根据所拥有的角色在左侧导航菜单栏访问对应的分析控制台:",
    "start.tb_m_name": "菜单",
    "start.tb_m_desc": "功能描述",
    "start.tb_m_auth": "可用角色",
    "start.tb_m1": "📊 仪表盘",
    "start.tb_m1_desc": "解析工作负载统计、核心微服务生存探针、近期解析队列",
    "start.tb_m_all": "所有用户",
    "start.tb_m2": "📄 智能解析",
    "start.tb_m2_desc": "拖放导入原厂证书文件(PDF / 图像)触发 AI 解析与人机对齐校验",
    "start.tb_m3": "📋 元数据管理",
    "start.tb_m3_desc": "零代码快速建立供应商版式标准,指派字段检验类型",
    "start.tb_m4": "🔗 质量本体",
    "start.tb_m4_desc": "查看 Neo4j 数据库中的电池材料、批次节点语义网络关系",
    "start.tb_m5": "💬 智能问答",
    "start.tb_m5_desc": "使用自然语言检索原材料质量异动、偏差溯源",
    "start.tb_m6": "👥 组管理",
    "start.tb_m6_desc": "配置独立租户、定义客户端 LLM 及 Neo4j 独立连接",
    "roles.title": "2. 角色操作指南",
    "roles.r1": "管理员 (Admin)",
    "roles.r1_desc": "管理部门多租户分组、下发服务协议参数、审计用户行为轨迹、系统监控",
    "roles.r2": "录入员 (User)",
    "roles.r2_desc": "日常证书收集导入、校验置信度较低的异常值、向下游 MES 写入审批状态",
    "roles.r3": "质量分析师 (Analyst)",
    "roles.r3_desc": "通过图谱本体进行缺陷批次追溯、使用 AI 问答挖掘潜在供应商参数漂移规律",
    "roles.admin_wf": "👤 管理员标准工作流",
    "roles.aw1": "建立工厂组",
    "roles.aw2": "指派服务配置",
    "roles.aw3": "创建账号",
    "roles.aw4": "配置输出适配器",
    "roles.aw5": "全局监控",
    "roles.admin_li1": "租户隔离管理: 管理员可以创建逻辑上完全隔离的租户环境,并为其指派专用的 Postgres 库、MinIO 及 Neo4j 容器。",
    "roles.admin_li2": "用户管理: 创建登录凭证,开启或跳过 TOTP 二步动态安全验证。",
    "roles.user_wf": "👷 录入员操作流",
    "roles.uw1": "选择本地文件",
    "roles.uw2": "模板匹配",
    "roles.uw3": "AI 批量解析",
    "roles.uw4": "人机值比对",
    "roles.uw5": "向 LIMS/MES 投递",
    "roles.analyst_wf": "🔬 分析师操作流",
    "roles.anw1": "浏览本体拓扑",
    "roles.anw2": "自然语言对话",
    "roles.anw3": "校验 Cypher",
    "roles.anw4": "输出质量周报",
    "meta.title": "3. 模板与字段元数据管理",
    "meta.intro": "对不同供应商的纸面版式进行抽象,让 AI 在遇到相应文件时知道如何规整关键指标。",
    "meta.new_reg": "如何创建字段模板",
    "meta.step1": "点击“元数据管理”菜单,选择“新增供应商版面”。",
    "meta.step2": "录入供应商简称、对应活性物大类(如高镍 NCM、LFP 等)以及版面版本号。",
    "meta.step3": "定义映射规则:PDF 纸面出现的原始词汇 → 标准化的数据库物理键名,配置验证规则及数据格式。",
    "meta.step4": "点击保存,系统会自动下发 schema 信息并实时向 Neo4j 拓扑网络扩展新的 FieldDefinition 节点。",
    "meta.example": "映射逻辑示范",
    "meta.tb_orig": "文档纸面原始词",
    "meta.tb_std": "标准化数据库字段名",
    "meta.tb_type": "数据物理类型",
    "meta.tb_req": "必须包含",
    "meta.tip_title": "💡 版本平滑升级",
    "meta.tip_desc": "如果某家供应商由于设备改型更新了质检报告单指标,您只需复制当前版本并增加版本后缀。旧批次的质量历史数据绝不会损坏或错位。",
    "parsing.title": "4. AI 解析工作流",
    "parsing.support": "支持的文件版式",
    "parsing.tb_fmt": "版式类型",
    "parsing.tb_ext": "文件后缀",
    "parsing.tb_proc": "后台处理逻辑",
    "parsing.tb_pdf": "文本层直接矢量抓取 + 复合 OCR 补充的双核解析",
    "parsing.tb_excel": "电子表格跨工作簿单元格物理坐标精准抽取",
    "parsing.tb_image": "多模态大模型直接对齐空间几何,纠正拍摄畸变倾斜",
    "parsing.proc": "解析步骤说明",
    "parsing.step1": "进入解析页面,直接拖放需要处理的证书文档。",
    "parsing.step2": "下拉选择模型分析引擎(Gemini 1.5 Pro, Claude 3.5 Sonnet, GPT-4o 等)。",
    "parsing.step3": "点击开始,分析服务会异步提取内容,对每个字段反馈 0-100 置信度百分比。",
    "parsing.step4": "注意检查显示橘色(置信度低于 90%)的警告框,根据原文对偏误进行修改,点击保存归档。",
    "legacy.title": "5. 三方遗留系统集成",
    "legacy.adapter": "MES / ERP 接口适配器",
    "legacy.adapter_desc": "解析比对正确后的 JSON 数据,能以零代码对接方式自动推送回厂内 ERP/LIMS 接口中。",
    "legacy.ad_step1": "进入适配器管理,点击“新建适配器”。",
    "legacy.ad_step2": "指派协议规格(REST API POST 请求 / 数据库 Direct Insert 插入 / 本地 CSV 导出)。",
    "legacy.ad_step3": "建立 LegacyKey 对接映射键,激活实时同步。",
    "legacy.sync": "推送并归档",
    "legacy.sync_desc": "数据校对无误后,直接在前端点击“发送至 ERP/MES”按钮,数据将在 1 秒内被传送,所有的轨迹都会留存在“审计日志”中备查。",
    "graphrag.title": "6. GraphRAG 图智能问答与图本体",
    "graphrag.structure": "Neo4j 知识本体拓扑",
    "graphrag.struct_desc": "所有归档的批次数据不再像常规 SQL 一样孤立存放,而是被编织进 Neo4j 拓扑网中:",
    "graphrag.li1": "原材料 (Material) 与 供应商 (Supplier) 存在指向关系",
    "graphrag.li2": "质量证书 (Certificate LOT) 与 单项测量值 (TestResult) 存在关联",
    "graphrag.li3": "测量值与检测规范 (TestMethod, ISO) 构成标准网格,消除仪器设备系统性偏差",
    "graphrag.chat": "GraphRAG 自然语言交叉检索",
    "graphrag.chat_desc": "在智能聊天窗口,您可以免去写 Cypher 语句的烦恼,直接说人话,AI 大模型会自动将自然语言翻译成高效率的图查询指令并解读结果。",
    "graphrag.prompt_title": "💡 推荐提问示例",
    "dashboard.title": "7. 全局仪表盘与监控",
    "dashboard.realtime": "实时生产运行大屏",
    "dashboard.desc": "汇总了厂内最核心的生产质量指标看板:",
    "dashboard.li1": "今日吞吐量 (Total Volume): 今日累计解析保存成功的证书总量",
    "dashboard.li2": "置信度漂移线 (AI Confidence Trend): AI 提取精准度在近日的波动折线图",
    "dashboard.li3": "服务矩阵健康度 (Service Status): PostgreSQL, Neo4j, Redis, MinIO 全链路微服务的存活状态监控",
    "faq.title": "8. 常见问题 FAQ",
    "faq.q1": "Q. AI 解析有时候出现提取值丢失或者对齐错误怎么办?",
    "faq.a1": "A. 报告单如果带有严重的斜角变形、拍照阴影,可能影响识别率。您可以通过微调对应模板的正则表达式过滤参数来消除噪音,或选用性能最强的主流商业大模型(例如 Claude 3.5 Sonnet)。",
    "faq.q2": "Q. 厂内机密要求不允许连接互联网云端 API 进行处理,怎么办?",
    "faq.a2": "A. CertBridge 原生支持本地化私有大模型方案。您可以在厂内局域网部署 Ollama / vLLM 服务器,搭载私有 Llama-3 / Qwen 模型,通过“OpenAI 兼容 API”接入,实现 100% 局域网离线智能解析。",
    "faq.q3": "Q. 提示“ECONNREFUSED”无法连接服务器?",
    "faq.a3": "A. 请在系统设置中核对“中央服务器 URL”配置(默认端口 8090),确认服务器防火墙已放行对应端口并排查 Postgres 容器存活状态。"
  },
  ja: {
    "sidebar.ver": "ユーザーガイド v0.1.0",
    "nav.start": "はじめに",
    "nav.roles": "役割別ガイド",
    "nav.meta": "メタテンプレート管理",
    "nav.parsing": "AI解析フロー",
    "nav.legacy": "基幹連携",
    "nav.graphrag": "GraphRAG & オントロジー",
    "nav.dashboard": "ダッシュボード",
    "nav.faq": "FAQ",
    "hero.title": "CertBridge 操作ガイド",
    "hero.desc": "AI試験成績書解析からERP/MES基幹連携、Neo4j GraphRAG多次元分析まで——担当者別に詳細な使用方法を解説します。",
    "hero.badge": "📖 v0.1.0 · 管理者 · 入力者 · 分析者",
    "start.title": "1. はじめに",
    "start.login": "ログインとサーバー接続",
    "start.login_desc": "アプリを起動後、設定メニューで中央サーバーURL(例: 8090ポート)が正しいか確認し、IDとパスワードを入力します。",
    "start.tb_role": "デフォルトロール",
    "start.tb_id": "ユーザーID",
    "start.tb_pw": "パスワード",
    "start.tb_first": "初期ログイン",
    "start.menu_intro": "メイン画面のメニュー構成",
    "start.menu_desc": "ログインが成功すると、所有する権限に応じて左側のサイドバーメニューから各機能にアクセスできます。",
    "start.tb_m_name": "メニュー",
    "start.tb_m_desc": "説明",
    "start.tb_m_auth": "アクセス権限",
    "start.tb_m1": "📊 ダッシュボード",
    "start.tb_m1_desc": "解析の処理統計、各サービスの接続状態、最近の処理結果リスト",
    "start.tb_m_all": "全ユーザー",
    "start.tb_m2": "📄 試験成績書解析",
    "start.tb_m2_desc": "PDFや画像ファイルをドラッグ&ドロップしてAI解析と検証を実行",
    "start.tb_m3": "📋 テンプレート管理",
    "start.tb_m3_desc": "サプライヤー別フォーマットの定義、標準項目マッピングの登録",
    "start.tb_m4": "🔗 オントロジー",
    "start.tb_m4_desc": "Neo4jグラフデータベースによる材料・ロットのつながり探索",
    "start.tb_m5": "💬 グラフ AIチャット",
    "start.tb_m5_desc": "GraphRAGを使用した品質トレンドの自然言語問い合わせ",
    "start.tb_m6": "👥 グループ管理",
    "start.tb_m6_desc": "組織グループの作成、ローカルデータベースやLLMなどの割り当て",
    "roles.title": "2. 役割別操作ガイド",
    "roles.r1": "システム管理者 (Admin)",
    "roles.r1_desc": "組織グループの管理、サービスプロファイル設定、アカウント発行、変更監査ログの監視",
    "roles.r2": "現場入力担当者 (User)",
    "roles.r2_desc": "日常の成績書アップロード、AI抽出結果の整合性確認、基幹システムへの送信承認",
    "roles.r3": "品質分析者 (Analyst)",
    "roles.r3_desc": "ナレッジグラフを使用した欠陥ロット追跡、AIチャットでのサプライヤー別品質異常検知",
    "roles.admin_wf": "👤 管理者の標準フロー",
    "roles.aw1": "グループの作成",
    "roles.aw2": "プロファイル割当",
    "roles.aw3": "ユーザーの追加",
    "roles.aw4": "アダプター設定",
    "roles.aw5": "システム監視",
    "roles.admin_li1": "マルチテナント管理: 管理者は、組織グループごとに専用のPostgreSQL、MinIO、Neo4j環境を個別に構成できます。",
    "roles.admin_li2": "アカウント設定: パスワード強制変更、TOTP二要素認証の設定を管理します。",
    "roles.user_wf": "👷 入力者の標準フロー",
    "roles.uw1": "成績書選択",
    "roles.uw2": "テンプレートマッチ",
    "roles.uw3": "AI解析実行",
    "roles.uw4": "抽出結果レビュー",
    "roles.uw5": "基幹へのデータ送信",
    "roles.analyst_wf": "🔬 分析者の標準フロー",
    "roles.anw1": "グラフ拓朴探索",
    "roles.anw2": "AIチャットに質問",
    "roles.anw3": "Cypher実行検証",
    "roles.anw4": "品質レポート作成",
    "meta.title": "3. テンプレートおよび標準項目管理",
    "meta.intro": "サプライヤーごとに異なるフォーマットを標準化し、AI抽出時に正確なデータ項目マッピングを実行します。",
    "meta.new_reg": "新規テンプレートの登録",
    "meta.step1": "テンプレート管理メニューに移動し、新規登録をクリックします。",
    "meta.step2": "サプライヤー名、該当材料カテゴリー、文書バージョンを登録します。",
    "meta.step3": "マッピング設定: 帳票のキーワード → データベース標準キー、検証正規表現、データ型定義。",
    "meta.step4": "保存すると、自動的にAPIが走り、Neo4j側にFieldDefinitionスキーマノードが構築されます。",
    "meta.example": "マッピングの設定例",
    "meta.tb_orig": "成績書の項目名",
    "meta.tb_std": "標準キー(DB物理名)",
    "meta.tb_type": "データ型",
    "meta.tb_req": "必須項目",
    "meta.tip_title": "💡 バージョン管理のベストプラクティス",
    "meta.tip_desc": "サプライヤーが様式を変更した場合、既存テンプレートをコピーして新しいバージョンを作成してください。過去のロット品質履歴データとの後方互換性が維持されます。",
    "parsing.title": "4. AI解析のワークフロー",
    "parsing.support": "サポートされるドキュメント形式",
    "parsing.tb_fmt": "ドキュメントタイプ",
    "parsing.tb_ext": "拡張子",
    "parsing.tb_proc": "処理パイプライン",
    "parsing.tb_pdf": "テキスト直接読み込み + 画像化部分のVision/OCRの自動併用解析",
    "parsing.tb_excel": "スプレッドシートのセルの位置(座標)からダイレクトにマッピング抽出",
    "parsing.tb_image": "マルチモーダルVision AIによる画像の傾きや影の補正とデータ認識",
    "parsing.proc": "解析手順",
    "parsing.step1": "解析ページを開き、対象ドキュメントを直接ドラッグ&ドロップします。",
    "parsing.step2": "使用するAIエンジン(Gemini Pro, Claude Sonnet, GPT-4oなど)を指定します。",
    "parsing.step3": "実行すると、各項目について0〜100%の信頼スコア(Confidence Score)が出力されます。",
    "parsing.step4": "信頼度90%未満のオレンジの警告枠を確認し、必要に応じて正しい値に編集後、保存します。",
    "legacy.title": "5. 基幹システム(ERP / MES)との連携",
    "legacy.adapter": "送信アダプターの設定",
    "legacy.adapter_desc": "検証が完了したJSONデータを、自社のMES, ERP, LIMSなどの連携規格に合わせて自動送信します。",
    "legacy.ad_step1": "プロファイル管理から送信アダプター設定を選択します。",
    "legacy.ad_step2": "連携方式を指定します (REST API / SQL Direct Insert / CSVローカルファイル出力)。",
    "legacy.ad_step3": "標準キーと基幹キー(LegacyKey)をマッチングして同期化を有効にします。",
    "legacy.sync": "データ送信の承認",
    "legacy.sync_desc": "検証結果を確認し、「基幹送信」ボタンをクリックすると、データが1秒以内に基幹システムに登録されます。詳細は監査ログ(Audit Log)から追跡可能です。",
    "graphrag.title": "6. GraphRAG とオントロジー",
    "graphrag.structure": "Neo4jナレッジグラフの構造",
    "graphrag.struct_desc": "成績書データは単なるテーブルではなく、以下のように結びついたグラフとしてNeo4jに蓄積されます。",
    "graphrag.li1": "原材料(Material) ↔ 製造メーカー(Supplier) の関係",
    "graphrag.li2": "品質ロット(Certificate LOT) ↔ 各検査結果(TestResult) の関係",
    "graphrag.li3": "検査結果 ↔ 試験規格(TestMethod, ISO) の接続による測定誤差排除",
    "graphrag.chat": "GraphRAG 自然言語AIチャット",
    "graphrag.chat_desc": "AIチャット画面では、複雑なCypher文を書くことなく、日常会話のようにAIに質問するだけでグラフデータベースから相関情報を瞬時に引き出し解説します。",
    "graphrag.prompt_title": "💡 質問プロンプトの例",
    "dashboard.title": "7. リアルタイム監視とメトリクス",
    "dashboard.realtime": "品質操業ステータス大盤",
    "dashboard.desc": "現場の稼働状況を把握するためのリアルタイム操業統計を提供します。",
    "dashboard.li1": "今日の本数 (Total Volume): 今日正常に保存された証明書の総数",
    "dashboard.li2": "AI信頼度の推移 (AI Confidence Trend): 最近のAI抽出の正解率傾向グラフ",
    "dashboard.li3": "微サービス監視 (Service Status): PostgreSQL, Neo4j, Redis, MinIO の稼働状態リアルタイム診断",
    "faq.title": "8. よくある質問 (FAQ)",
    "faq.q1": "Q. AI解析の一部でデータの抜けや誤変換が発生します。",
    "faq.a1": "A. ドキュメントの解像度が極端に低い場合や、極端な影がある場合に発生することがあります。テンプレート定義で正規表現によるフィルタリングを適用するか、より高性能なAIモデル(Claude 3.5 Sonnetなど)を選択して再実行してください。",
    "faq.q2": "Q. インターネット接続が一切不可能なクローズド環境ですが、利用可能ですか?",
    "faq.a2": "A. はい。OllamaやvLLMなどを利用した「OpenAI互換API」をサポートしています。社内ネットワーク内にローカルLLMを構築することで、外部ネットワークへデータを送出することなく、完全にオフラインで動作可能です。",
    "faq.q3": "Q. ECONNREFUSED エラーが表示されます。",
    "faq.a3": "A. 設定で中央サーバーURL(ポート: 8090)が正しいこと、ネットワーク設定やファームウェアで制限されていないことを確認し、監査ログを参照してください。"
  },
  de: {
    "sidebar.ver": "Benutzerhandbuch v0.1.0",
    "nav.start": "Erste Schritte",
    "nav.roles": "Rollenleitfaden",
    "nav.meta": "Metavorlagen",
    "nav.parsing": "KI-Parsing",
    "nav.legacy": "Legacy-Integration",
    "nav.graphrag": "GraphRAG & Ontologie",
    "nav.dashboard": "Dashboard & Metriken",
    "nav.faq": "FAQ",
    "hero.title": "CertBridge Benutzerhandbuch",
    "hero.desc": "Von der KI-gestützten Zertifikatsanalyse über ERP/MES-Integration bis hin zu Neo4j-basierten GraphRAG-Abfragen — ausführliche Schritt-für-Schritt-Anleitung nach Rollen.",
    "hero.badge": "📖 v0.1.0 · Admin · Benutzer · Analyst",
    "start.title": "1. Erste Schritte",
    "start.login": "Anmeldung & Serververbindung",
    "start.login_desc": "Prüfen Sie nach dem Starten der App die Serveradresse (Einstellungen → Server-URL, Standardport 8090) und geben Sie ID und Passwort ein.",
    "start.tb_role": "Standardrolle",
    "start.tb_id": "Benutzer-ID",
    "start.tb_pw": "Passwort",
    "start.tb_first": "Erstanmeldung",
    "start.menu_intro": "Dashboard & Seitenleiste",
    "start.menu_desc": "Nach der Anmeldung gelangen Sie zum Dashboard. Über die linke Seitenleiste haben Sie Zugriff auf folgende Menüs:",
    "start.tb_m_name": "Menü",
    "start.tb_m_desc": "Beschreibung",
    "start.tb_m_auth": "Berechtigung",
    "start.tb_m1": "📊 Dashboard",
    "start.tb_m1_desc": "Parsing-Statistiken, Live-Systemstatus der Microservices, letzte Parsing-Verläufe",
    "start.tb_m_all": "Alle Rollen",
    "start.tb_m2": "📄 Parsing",
    "start.tb_m2_desc": "Qualitätszertifikate hochladen und KI-Parsing starten",
    "start.tb_m3": "📋 Vorlagen",
    "start.tb_m3_desc": "Metadaten-Vorlagen und Feldzuordnungen für Lieferanten erstellen",
    "start.tb_m4": "🔗 Ontologie",
    "start.tb_m4_desc": "Durchsuchen des semantischen Neo4j-Graphen Modells",
    "start.tb_m5": "💬 KI-Chat Q&A",
    "start.tb_m5_desc": "Analysieren Sie Qualitätsdaten mit GraphRAG in natürlicher Sprache",
    "start.tb_m6": "👥 Gruppen",
    "start.tb_m6_desc": "Erstellen von Mandantengruppen, Zuweisen von LLMs, Datenbanken und Neo4j-Instanzen",
    "roles.title": "2. Rollenspezifischer Leitfaden",
    "roles.r1": "Administrator (Admin)",
    "roles.r1_desc": "Mandantenkonfiguration, Profilverwaltung, Benutzerkonten und TOTP-2FA Steuerung, Sicherheitsaudits",
    "roles.r2": "Erfasser (User)",
    "roles.r2_desc": "Zertifikats-Ingestion, Prüfung von Ausnahmewerten, Freigabe zur ERP/MES-Übermittlung",
    "roles.r3": "Qualitätsanalyst (Analyst)",
    "roles.r3_desc": "Abfrage von Qualitätsabweichungen über den Graphen, GraphRAG Ursachenanalyse",
    "roles.admin_wf": "👤 Administrator-Workflow",
    "roles.aw1": "Gruppe anlegen",
    "roles.aw2": "Profil zuweisen",
    "roles.aw3": "Benutzer hinzufügen",
    "roles.aw4": "Adapter einrichten",
    "roles.aw5": "Überwachen",
    "roles.admin_li1": "Mandantentrennung: Erstellen Sie unabhängige Gruppen mit eigenen Postgres-, MinIO- und Neo4j-Ressourcen.",
    "roles.admin_li2": "Sicherheit: Verwalten Sie Passwörter und aktivieren/erzwingen Sie TOTP-2FA.",
    "roles.user_wf": "👷 Erfasser-Workflow",
    "roles.uw1": "Datei wählen",
    "roles.uw2": "Vorlage abgleichen",
    "roles.uw3": "KI-Parsing",
    "roles.uw4": "Werte validieren",
    "roles.uw5": "An MES senden",
    "roles.analyst_wf": "🔬 Analysten-Workflow",
    "roles.anw1": "Graphen durchsuchen",
    "roles.anw2": "Frage an KI",
    "roles.anw3": "Cypher-Validierung",
    "roles.anw4": "Qualitätsbericht erstellen",
    "meta.title": "3. Metadaten & Vorlagenmanagement",
    "meta.intro": "Durch das Normalisieren unterschiedlicher Lieferantenlayouts wird ein nahtloses und automatisiertes KI-Parsing ermöglicht.",
    "meta.new_reg": "Neues Metadaten-Template anlegen",
    "meta.step1": "Gehen Sie zu Vorlagen und klicken Sie auf Vorlage erstellen.",
    "meta.step2": "Geben Sie Lieferantenname, Materialkategorie und Dokumentversion ein.",
    "meta.step3": "Definieren Sie Feldzuordnungen: Rohwert keyword → standardisierter Zielschlüssel, Datentyp, Pflichtfeld.",
    "meta.step4": "Nach dem Speichern synchronisiert die syncMetaOntology API automatisch die FieldDefinition-Knoten im Neo4j-Graphen.",
    "meta.example": "Beispiel für Feldzuordnungen",
    "meta.tb_orig": "Originalwert im Dokument",
    "meta.tb_std": "Standardisierter Schlüssel",
    "meta.tb_type": "Datentyp",
    "meta.tb_req": "Erforderlich",
    "meta.tip_title": "💡 Vorlagen-Versionierung",
    "meta.tip_desc": "Bei kleineren Änderungen des Lieferantenlayouts kopieren Sie die bestehende Vorlage und erhöhen die Versionsnummer. Die Abwärtskompatibilität bleibt vollständig erhalten.",
    "parsing.title": "4. KI-Parsing & Extraktion",
    "parsing.support": "Unterstützte Formate",
    "parsing.tb_fmt": "Format",
    "parsing.tb_ext": "Dateiendung",
    "parsing.tb_proc": "Verarbeitungs-Pipeline",
    "parsing.tb_pdf": "Direkte Textextraktion + OCR-Fallback für Bildseiten",
    "parsing.tb_excel": "Direkte Tabellenblatt-Zellwert-Extraktion über Koordinaten",
    "parsing.tb_image": "Multimodales Vision-Parsing mit automatischer Perspektivenkorrektur",
    "parsing.proc": "Parsing-Schritte",
    "parsing.step1": "Gehen Sie zu Parsing und laden Sie das Dokument hoch (Drag & Drop möglich).",
    "parsing.step2": "Wählen Sie den KI-Anbieter (Gemini Pro, Claude Sonnet, GPT-4o, Ollama).",
    "parsing.step3": "Klicken Sie auf Parsing starten. Der Parser berechnet Werte und Konfidenz-Scores.",
    "parsing.step4": "Prüfen Sie Warnungen (orange markiert, wenn Score < 90%), korrigieren Sie Fehler und klicken Sie auf Speichern.",
    "legacy.title": "5. Legacy-Systemintegration",
    "legacy.adapter": "MES / ERP-Adapterkonfiguration",
    "legacy.adapter_desc": "Senden Sie validierte JSON-Zertifikatsdaten in Echtzeit an Ihre ERP-, LIMS- oder MES-Systeme.",
    "legacy.ad_step1": "Navigieren Sie zu Einstellungen → Outbound-Adapter.",
    "legacy.ad_step2": "Wählen Sie das Protokoll (REST API, Direct SQL, CSV-Datei).",
    "legacy.ad_step3": "Ordnen Sie die Quellschlüssel den Zielschlüsseln (LegacyKey) zu.",
    "legacy.sync": "Datenübermittlung freigeben",
    "legacy.sync_desc": "Klicken Sie nach der Verifizierung auf 'An Legacy senden'. Die Synchronisation erfolgt in weniger als einer Sekunde. Prüfberichte finden Sie in den Audit-Logs.",
    "graphrag.title": "6. GraphRAG & Semantische Ontologie",
    "graphrag.structure": "Neo4j Wissensgraph-Modell",
    "graphrag.struct_desc": "Die erfassten Qualitätsdaten werden in Neo4j strukturiert verknüpft, um tiefe Abfragen zu ermöglichen:",
    "graphrag.li1": "Verknüpfung von Material (Material) und Lieferanten (Supplier)",
    "graphrag.li2": "Verknüpfung von Zertifikat (Certificate LOT) und TestResult-Messwerten",
    "graphrag.li3": "Verknüpfung von Messergebnissen mit Prüfmethoden (TestMethod, ISO/ASTM)",
    "graphrag.chat": "Natürliche Sprache mit GraphRAG",
    "graphrag.chat_desc": "Im Q&A-Chat übersetzt das System Ihre Fragen in Cypher-Datenbankabfragen und liefert verständliche, faktenbasierte Antworten.",
    "graphrag.prompt_title": "💡 Beispielhafte KI-Fragen",
    "dashboard.title": "7. Dashboard & Monitoring",
    "dashboard.realtime": "Echtzeit-Betriebskonsole",
    "dashboard.desc": "Bietet einen schnellen Überblick über die wichtigsten Leistungsindikatoren:",
    "dashboard.li1": "Gesamtvolumen (Total Volume): Anzahl heute erfolgreich geparster Zertifikate",
    "dashboard.li2": "AI Confidence Trend: Verlaufsgrafik der KI-Genauigkeit der letzten Tage",
    "dashboard.li3": "System-Gesundheit (Service Status): Überwachung der Datenbanken PostgreSQL, Neo4j, Redis und MinIO",
    "faq.title": "8. Häufig gestellte Fragen (FAQ)",
    "faq.q1": "Q. Beim Parsen fehlen Werte oder Zeichen sind fehlerhaft.",
    "faq.a1": "A. Eine schlechte Auflösung gescannter PDFs kann die Texterkennung beeinträchtigen. Passen Sie die Regex-Filter an oder wechseln Sie zu einem stärkeren Modell wie Claude 3.5 Sonnet.",
    "faq.q2": "Q. Unsere Sicherheitsrichtlinie verbietet Cloud-APIs. Ist Offline-Betrieb möglich?",
    "faq.a2": "A. Ja. CertBridge unterstützt lokale API-Endpunkte (Ollama, vLLM). Sie können Llama-3 oder Qwen komplett offline im Firmennetzwerk betreiben.",
    "faq.q3": "Q. Verbindungsfehler ('ECONNREFUSED').",
    "faq.a3": "A. Überprüfen Sie, ob der API-Port 8090 und der Neo4j-Port 7687 in den Firewalls freigegeben sind, und prüfen Sie den Server-Status im Audit-Log."
  },
  fr: {
    "sidebar.ver": "Guide de l'utilisateur v0.1.0",
    "nav.start": "Commencer",
    "nav.roles": "Directives de rôle",
    "nav.meta": "Modèles de métadonnées",
    "nav.parsing": "AI Parsing",
    "nav.legacy": "Intégration",
    "nav.graphrag": "GraphRAG & Ontologie",
    "nav.dashboard": "Tableau de bord",
    "nav.faq": "FAQ",
    "hero.title": "Guide de l'utilisateur CertBridge",
    "hero.desc": "De l'extraction par IA à l'intégration dans ERP/MES et l'analyse de graphe avec Neo4j GraphRAG — découvrez le guide complet par rôle utilisateur.",
    "hero.badge": "📖 v0.1.0 · Admin · Utilisateur · Analyste",
    "start.title": "1. Commencer",
    "start.login": "Connexion et configuration",
    "start.login_desc": "Vérifiez l'adresse du serveur (Paramètres → URL du serveur, port par défaut 8090) et entrez votre identifiant et votre mot de passe.",
    "start.tb_role": "Rôle par défaut",
    "start.tb_id": "Identifiant",
    "start.tb_pw": "Mot de passe",
    "start.tb_first": "Première connexion",
    "start.menu_intro": "Structure du tableau de bord",
    "start.menu_desc": "Après vous être connecté, vous pouvez accéder aux différents menus depuis la barre latérale gauche :",
    "start.tb_m_name": "Menu",
    "start.tb_m_desc": "Description",
    "start.tb_m_auth": "Rôle requis",
    "start.tb_m1": "📊 Tableau de bord",
    "start.tb_m1_desc": "Statistiques d'analyse, état de santé des microservices, dernières tâches terminées",
    "start.tb_m_all": "Tous les rôles",
    "start.tb_m2": "📄 Extraction",
    "start.tb_m2_desc": "Téléversez vos certificats et lancez l'extraction par IA",
    "start.tb_m3": "📋 Modèles",
    "start.tb_m3_desc": "Définissez les modèles de métadonnées et les mappages par fournisseur",
    "start.tb_m4": "🔗 Ontologie",
    "start.tb_m4_desc": "Explorez les relations sémantiques dans le graphe Neo4j",
    "start.tb_m5": "💬 Chat IA",
    "start.tb_m5_desc": "Interrogez vos données en langage naturel grâce à GraphRAG",
    "start.tb_m6": "👥 Groupes",
    "start.tb_m6_desc": "Créez des groupes d'utilisateurs et attribuez les LLM et bases de données",
    "roles.title": "2. Directives opérationnelles par rôle",
    "roles.r1": "Administrateur (Admin)",
    "roles.r1_desc": "Configuration des locataires, profils, utilisateurs, audit et gestion de la double authentification TOTP-2FA",
    "roles.r2": "Opérateur (User)",
    "roles.r2_desc": "Ingestion de certificats, vérification des valeurs aberrantes, validation et envoi vers ERP/MES",
    "roles.r3": "Analyste Qualité (Analyst)",
    "roles.r3_desc": "Diagnostic des anomalies via le graphe, requêtes GraphRAG, rapports de dérive",
    "roles.admin_wf": "👤 Workflow Administrateur",
    "roles.aw1": "Créer Groupe",
    "roles.aw2": "Attribuer Profil",
    "roles.aw3": "Ajouter Utilisateur",
    "roles.aw4": "Configurer Adaptateur",
    "roles.aw5": "Superviser",
    "roles.admin_li1": "Isolation des groupes: Créez des environnements indépendants avec leurs propres instances PostgreSQL, MinIO et Neo4j.",
    "roles.admin_li2": "Sécurité: Gérez les règles de mot de passe et configurez l'authentification double TOTP.",
    "roles.user_wf": "👷 Workflow Opérateur",
    "roles.uw1": "Choisir Fichier",
    "roles.uw2": "Mappage Modèle",
    "roles.uw3": "AI Ingestion",
    "roles.uw4": "Valider Valeurs",
    "roles.uw5": "Envoyer à MES",
    "roles.analyst_wf": "🔬 Workflow Analyste",
    "roles.anw1": "Explorer Graphe",
    "roles.anw2": "Poser Question",
    "roles.anw3": "Valider Cypher",
    "roles.anw4": "Exporter Rapport",
    "meta.title": "3. Gestion des modèles de métadonnées",
    "meta.intro": "La normalisation des différents formats de documents fournisseurs permet une extraction par IA fluide et automatisée.",
    "meta.new_reg": "Créer un nouveau modèle",
    "meta.step1": "Allez dans Modèles et cliquez sur Créer modèle.",
    "meta.step2": "Renseignez le nom du fournisseur, la catégorie de matériau et la version.",
    "meta.step3": "Mappez les champs : terme brut → clé normalisée, type de données, champ obligatoire.",
    "meta.step4": "Une fois enregistré, l'API syncMetaOntology insère automatiquement les nœuds FieldDefinition dans Neo4j.",
    "meta.example": "Exemples de mappage",
    "meta.tb_orig": "Texte brut dans le document",
    "meta.tb_std": "Clé normalisée standard",
    "meta.tb_type": "Type de données",
    "meta.tb_req": "Requis",
    "meta.tip_title": "💡 Gestion des versions",
    "meta.tip_desc": "Si un fournisseur modifie son modèle, copiez le modèle existant et incrémentez sa version. La compatibilité ascendante est entièrement garantie.",
    "parsing.title": "4. AI Ingestion & Parsing",
    "parsing.support": "Formats supportés",
    "parsing.tb_fmt": "Format",
    "parsing.tb_ext": "Extension",
    "parsing.tb_proc": "Traitement",
    "parsing.tb_pdf": "Extraction directe du texte + OCR de secours pour les numérisations",
    "parsing.tb_excel": "Extraction directe basée sur les coordonnées des cellules de feuilles de calcul",
    "parsing.tb_image": "Parsing Vision IA avec correction automatique de perspective et éclairage",
    "parsing.proc": "Étapes d'extraction",
    "parsing.step1": "Allez dans Extraction et déposez votre fichier (Drag & Drop supporté).",
    "parsing.step2": "Sélectionnez le modèle d'IA (Gemini Pro, Claude Sonnet, GPT-4o, Ollama).",
    "parsing.step3": "Cliquez sur Ingestion. Le système calcule les valeurs et les scores de confiance.",
    "parsing.step4": "Vérifiez les alertes (orange si score < 90%), corrigez les valeurs et sauvegardez.",
    "legacy.title": "5. Intégration systèmes ERP / MES",
    "legacy.adapter": "Configuration des adaptateurs",
    "legacy.adapter_desc": "Envoyez en temps réel vos données de certificats validées à vos outils ERP, LIMS ou MES.",
    "legacy.ad_step1": "Rendez-vous dans Paramètres → Adaptateurs sortants.",
    "legacy.ad_step2": "Choisissez le protocole (API REST, insertion SQL, fichier CSV).",
    "legacy.ad_step3": "Associez les clés cibles correspondantes (LegacyKey) et activez la synchronisation.",
    "legacy.sync": "Transmettre les données",
    "legacy.sync_desc": "Cliquez sur 'Envoyer à Legacy' après validation. La synchronisation prend moins d'une seconde. Les rapports d'erreur et logs sont dans l'Audit Log.",
    "graphrag.title": "6. GraphRAG & Ontologie sémantique",
    "graphrag.structure": "Structure du graphe Neo4j",
    "graphrag.struct_desc": "Les données sont stockées sous forme de nœuds reliés de manière sémantique au sein de Neo4j :",
    "graphrag.li1": "Liaison entre Matériau (Material) et Fournisseurs (Supplier)",
    "graphrag.li2": "Liaison entre Certificat (Certificate LOT) et mesures (TestResult)",
    "graphrag.li3": "Liaison entre mesures et méthodes de test standardisées (TestMethod, ISO/ASTM)",
    "graphrag.chat": "Requêtes en langage naturel avec GraphRAG",
    "graphrag.chat_desc": "Posez vos questions simplement dans la boîte de dialogue, l'IA les traduit en requêtes Cypher complexes et fournit des explications claires et fiables.",
    "graphrag.prompt_title": "💡 Exemples de questions",
    "dashboard.title": "7. Tableau de bord & Monitoring",
    "dashboard.realtime": "Console d'activité en temps réel",
    "dashboard.desc": "Affiche les indicateurs de performance clés pour suivre l'activité sur site :",
    "dashboard.li1": "Volume total (Total Volume) : Nombre de certificats validés aujourd'hui",
    "dashboard.li2": "AI Confidence Trend : Évolution de la précision de l'IA sur les derniers jours",
    "dashboard.li3": "Santé système (Service Status) : Surveillance de PostgreSQL, Neo4j, Redis et MinIO",
    "faq.title": "8. Foire aux questions (FAQ)",
    "faq.q1": "Q. Lors de l'extraction, certaines valeurs sont fausses ou manquantes.",
    "faq.a1": "A. Les scans de mauvaise qualité ou trop sombres peuvent limiter l'OCR. Ajustez vos filtres Regex ou utilisez un modèle plus performant comme Claude 3.5 Sonnet.",
    "faq.q2": "Q. Notre politique interdit l'accès aux API Cloud. Peut-on fonctionner hors ligne ?",
    "faq.a2": "A. Oui. CertBridge supporte les connexions locales de type OpenAI (Ollama, vLLM). Vous pouvez héberger Llama-3 ou Qwen entièrement hors ligne dans votre réseau.",
    "faq.q3": "Q. Message d'erreur de connexion ('ECONNREFUSED').",
    "faq.a3": "A. Vérifiez que le port d'API central 8090 et le port Neo4j 7687 sont ouverts dans vos pare-feu, et examinez le journal Audit Log."
  },
  es: {
    "sidebar.ver": "Guía de usuario v0.1.0",
    "nav.start": "Comenzar",
    "nav.roles": "Guía de roles",
    "nav.meta": "Plantillas metadatos",
    "nav.parsing": "AI Ingestión",
    "nav.legacy": "Integración",
    "nav.graphrag": "GraphRAG y Ontología",
    "nav.dashboard": "Panel de control",
    "nav.faq": "FAQ",
    "hero.title": "Guía de usuario CertBridge",
    "hero.desc": "Desde el análisis de certificados por IA hasta la integración en ERP/MES y el análisis de grafos con Neo4j GraphRAG — descubra la guía completa por rol de usuario.",
    "hero.badge": "📖 v0.1.0 · Admin · Usuario · Analista",
    "start.title": "1. Comenzar",
    "start.login": "Inicio de sesión y configuración",
    "start.login_desc": "Verifique la dirección del servidor (Ajustes → URL del servidor, puerto predeterminado 8090) e introduzca su ID y contraseña.",
    "start.tb_role": "Rol predeterminado",
    "start.tb_id": "Usuario ID",
    "start.tb_pw": "Contraseña",
    "start.tb_first": "Primer acceso",
    "start.menu_intro": "Estructura de menús",
    "start.menu_desc": "Una vez conectado, puede acceder a los diferentes menús desde la barra lateral izquierda:",
    "start.tb_m_name": "Menú",
    "start.tb_m_desc": "Descripción",
    "start.tb_m_auth": "Rol requerido",
    "start.tb_m1": "📊 Dashboard",
    "start.tb_m1_desc": "Estadísticas de análisis, estado de salud de microservicios, últimos trabajos guardados",
    "start.tb_m_all": "Todos los roles",
    "start.tb_m2": "📄 Ingestión",
    "start.tb_m2_desc": "Cargue certificados y ejecute la extracción por IA",
    "start.tb_m3": "📋 Plantillas",
    "start.tb_m3_desc": "Defina las plantillas de metadatos y mapeos por proveedor",
    "start.tb_m4": "🔗 Ontología",
    "start.tb_m4_desc": "Explore las relaciones semánticas en el grafo Neo4j",
    "start.tb_m5": "💬 Chat IA",
    "start.tb_m5_desc": "Interrogue sus datos en lenguaje natural gracias a GraphRAG",
    "start.tb_m6": "👥 Grupos",
    "start.tb_m6_desc": "Cree grupos de usuarios y asigne bases de datos y LLMs",
    "roles.title": "2. Guía operativa por rol",
    "roles.r1": "Administrador (Admin)",
    "roles.r1_desc": "Configuración de inquilinos, perfiles, usuarios, auditorías de actividad y gestión de TOTP-2FA",
    "roles.r2": "Operador (User)",
    "roles.r2_desc": "Ingesta de certificados, validación de valores y envío hacia ERP/MES",
    "roles.r3": "Analista de Calidad (Analyst)",
    "roles.r3_desc": "Búsqueda de desviaciones en el grafo, consultas GraphRAG, informes de calidad",
    "roles.admin_wf": "👤 Workflow de Administrador",
    "roles.aw1": "Crear Grupo",
    "roles.aw2": "Asignar Perfil",
    "roles.aw3": "Añadir Usuario",
    "roles.aw4": "Ajustar Adaptador",
    "roles.aw5": "Monitorear",
    "roles.admin_li1": "Aislamiento de grupos: Cree entornos independientes con sus propias instancias de PostgreSQL, MinIO y Neo4j.",
    "roles.admin_li2": "Seguridad: Gestione reglas de contraseñas y configure autenticación de dos factores (TOTP).",
    "roles.user_wf": "👷 Workflow de Operador",
    "roles.uw1": "Elegir Archivo",
    "roles.uw2": "Mapeo de Plantilla",
    "roles.uw3": "AI Ingestión",
    "roles.uw4": "Validar Valores",
    "roles.uw5": "Enviar a MES",
    "roles.analyst_wf": "🔬 Workflow de Analista",
    "roles.anw1": "Explorar Grafo",
    "roles.anw2": "Pregunta a IA",
    "roles.anw3": "Validar Cypher",
    "roles.anw4": "Exportar Informe",
    "meta.title": "3. Gestión de plantillas de metadatos",
    "meta.intro": "La normalización de diferentes formatos de documentos de proveedores permite un análisis automatizado y fluido por IA.",
    "meta.new_reg": "Crear una nueva plantilla",
    "meta.step1": "Vaya a Plantillas y haga clic en Crear plantilla.",
    "meta.step2": "Rellene el nombre del proveedor, categoría de material y versión.",
    "meta.step3": "Mapee los campos: término original → clave normalizada, tipo de datos, campo obligatorio.",
    "meta.step4": "Una vez guardado, la API syncMetaOntology creará automáticamente los nodos FieldDefinition en Neo4j.",
    "meta.example": "Ejemplos de mapeo",
    "meta.tb_orig": "Texto original en el documento",
    "meta.tb_std": "Clave normalizada estándar",
    "meta.tb_type": "Tipo de datos",
    "meta.tb_req": "Requerido",
    "meta.tip_title": "💡 Gestión de versiones",
    "meta.tip_desc": "Si un proveedor modifica su modelo, copie la plantilla existente e incremente su versión. La compatibilidad con versiones anteriores está totalmente garantizada.",
    "parsing.title": "4. AI Ingestión y Extracción",
    "parsing.support": "Formatos soportados",
    "parsing.tb_fmt": "Formato",
    "parsing.tb_ext": "Extensión",
    "parsing.tb_proc": "Procesamiento",
    "parsing.tb_pdf": "Extracción directa de texto + OCR de respaldo para PDFs escaneados",
    "parsing.tb_excel": "Extracción directa basada en las coordenadas de las celdas de hojas de cálculo",
    "parsing.tb_image": "Análisis Vision AI con corrección automática de perspectiva y deformaciones",
    "parsing.proc": "Pasos de extracción",
    "parsing.step1": "Vaya a Ingestión y arrastre su archivo (Drag & Drop soportado).",
    "parsing.step2": "Seleccione el modelo de IA (Gemini Pro, Claude Sonnet, GPT-4o, Ollama).",
    "parsing.step3": "Haga clic en Ingestar. El sistema calcula los valores y los puntajes de confianza.",
    "parsing.step4": "Verifique las alertas (naranja si confianza < 90%), corrija los valores y guarde.",
    "legacy.title": "5. Integración con sistemas ERP / MES",
    "legacy.adapter": "Configuración de adaptadores",
    "legacy.adapter_desc": "Envíe en tiempo real sus datos de certificados validados a sus herramientas ERP, LIMS o MES.",
    "legacy.ad_step1": "Vaya a Ajustes → Adaptadores de salida.",
    "legacy.ad_step2": "Elija el protocolo (API REST, inserción directa SQL, archivo CSV).",
    "legacy.ad_step3": "Asocie las claves objetivo correspondientes (LegacyKey) y active la sincronización.",
    "legacy.sync": "Transmitir los datos",
    "legacy.sync_desc": "Haga clic en 'Enviar a Legacy' después de la validación. La sincronización tarda menos de un segundo. Los logs e informes de error se guardan en el Audit Log.",
    "graphrag.title": "6. GraphRAG y Ontología semántica",
    "graphrag.structure": "Estructura del grafo Neo4j",
    "graphrag.struct_desc": "Los datos se almacenan en Neo4j como nodos interconectados de manera lógica:",
    "graphrag.li1": "Relación entre Material (Material) y Proveedores (Supplier)",
    "graphrag.li2": "Relación entre Certificado (Certificate LOT) y mediciones (TestResult)",
    "graphrag.li3": "Relación entre mediciones y métodos de prueba estándar (TestMethod, ISO/ASTM)",
    "graphrag.chat": "Consultas en lenguaje natural con GraphRAG",
    "graphrag.chat_desc": "Haga sus preguntas en lenguaje natural en el cuadro de diálogo. La IA las traducirá en consultas Cypher complejas para proporcionar respuestas fiables.",
    "graphrag.prompt_title": "💡 Ejemplos de preguntas",
    "dashboard.title": "7. Dashboard & Monitoreo",
    "dashboard.realtime": "Consola de actividad en tiempo real",
    "dashboard.desc": "Muestra indicadores de rendimiento clave para seguir la actividad operativa:",
    "dashboard.li1": "Volumen total (Total Volume): Número de certificados aprobados hoy",
    "dashboard.li2": "AI Confidence Trend: Evolución de la precisión de la IA en los últimos días",
    "dashboard.li3": "Salud del sistema (Service Status): Supervisión en tiempo real de PostgreSQL, Neo4j, Redis y MinIO",
    "faq.title": "8. Preguntas frecuentes (FAQ)",
    "faq.q1": "Q. Algunos valores del documento faltan o se leen con errores.",
    "faq.a1": "A. Los escaneos oscuros o de baja resolución pueden limitar el OCR. Ajuste sus filtros Regex en la plantilla o utilice un modelo de IA más potente como Claude 3.5 Sonnet.",
    "faq.q2": "Q. Las políticas prohíben el uso de APIs en la nube. ¿Se puede funcionar sin conexión?",
    "faq.a2": "A. Sí. CertBridge soporta conexiones locales compatibles con OpenAI (Ollama, vLLM). Puede alojar Llama-3 o Qwen completamente offline en su red interna.",
    "faq.q3": "Q. Mensaje de error de conexión ('ECONNREFUSED').",
    "faq.a3": "A. Verifique que el puerto de API central 8090 y el puerto Neo4j 7687 estén abiertos en sus cortafuegos, y consulte el Audit Log."
  },
  pt: {
    "sidebar.ver": "Guia do usuário v0.1.0",
    "nav.start": "Iniciar",
    "nav.roles": "Guia de papéis",
    "nav.meta": "Modelos metadados",
    "nav.parsing": "AI Ingestão",
    "nav.legacy": "Integração",
    "nav.graphrag": "GraphRAG & Ontologia",
    "nav.dashboard": "Painel de controle",
    "nav.faq": "FAQ",
    "hero.title": "Guia do usuário CertBridge",
    "hero.desc": "Desde a análise de certificados por IA até a integração no ERP/MES e análise de grafos com Neo4j GraphRAG — descubra o guia completo por papel de usuário.",
    "hero.badge": "📖 v0.1.0 · Admin · Usuário · Analista",
    "start.title": "1. Iniciar",
    "start.login": "Login e configuração",
    "start.login_desc": "Verifique o endereço do servidor (Definições → URL do servidor, porta padrão 8090) e insira seu ID e senha.",
    "start.tb_role": "Papel padrão",
    "start.tb_id": "Usuário ID",
    "start.tb_pw": "Senha",
    "start.tb_first": "Primeiro acesso",
    "start.menu_intro": "Estrutura do painel",
    "start.menu_desc": "Uma vez conectado, você pode acessar os diferentes menus a partir da barra lateral esquerda:",
    "start.tb_m_name": "Menu",
    "start.tb_m_desc": "Descrição",
    "start.tb_m_auth": "Papel necessário",
    "start.tb_m1": "📊 Dashboard",
    "start.tb_m1_desc": "Estatísticas de análise, estado de saúde dos microserviços, últimos trabalhos salvos",
    "start.tb_m_all": "Todos os papéis",
    "start.tb_m2": "📄 Ingestão",
    "start.tb_m2_desc": "Carregue certificados e execute a extração por IA",
    "start.tb_m3": "📋 Modelos",
    "start.tb_m3_desc": "Defina os modelos de metadados e mapeamentos por fornecedor",
    "start.tb_m4": "🔗 Ontologia",
    "start.tb_m4_desc": "Explore as relações semânticas no grafo Neo4j",
    "start.tb_m5": "💬 Chat IA",
    "start.tb_m5_desc": "Interrogue seus dados em linguagem natural graças ao GraphRAG",
    "start.tb_m6": "👥 Grupos",
    "start.tb_m6_desc": "Crie grupos de usuários e atribua bases de dados e LLMs",
    "roles.title": "2. Guia operacional por papel",
    "roles.r1": "Administrador (Admin)",
    "roles.r1_desc": "Configuração de inquilinos, perfis, usuários, auditorias de atividade e gestão de TOTP-2FA",
    "roles.r2": "Operador (User)",
    "roles.r2_desc": "Ingesta de certificados, validação de valores e envio para ERP/MES",
    "roles.r3": "Analista de Qualidade (Analyst)",
    "roles.r3_desc": "Busca de desvios no grafo, consultas GraphRAG, relatórios de qualidade",
    "roles.admin_wf": "👤 Workflow de Administrador",
    "roles.aw1": "Criar Grupo",
    "roles.aw2": "Atribuir Perfil",
    "roles.aw3": "Adicionar Usuário",
    "roles.aw4": "Ajustar Adaptador",
    "roles.aw5": "Monitorar",
    "roles.admin_li1": "Isolamento de grupos: Crie ambientes independentes com suas próprias instâncias de PostgreSQL, MinIO e Neo4j.",
    "roles.admin_li2": "Segurança: Gerencie regras de senhas e configure autenticação de dois fatores (TOTP).",
    "roles.user_wf": "👷 Workflow de Operador",
    "roles.uw1": "Escolher Arquivo",
    "roles.uw2": "Mapeamento Modelo",
    "roles.uw3": "AI Ingestão",
    "roles.uw4": "Validar Valores",
    "roles.uw5": "Enviar a MES",
    "roles.analyst_wf": "🔬 Workflow de Analista",
    "roles.anw1": "Explorar Grafo",
    "roles.anw2": "Pergunta a IA",
    "roles.anw3": "Validar Cypher",
    "roles.anw4": "Exportar Relatório",
    "meta.title": "3. Gestão de modelos de metadados",
    "meta.intro": "A normalização de diferentes formatos de documentos de fornecedores permite uma análise automatizada e fluida por IA.",
    "meta.new_reg": "Criar um novo modelo",
    "meta.step1": "Vá em Modelos e clique em Criar modelo.",
    "meta.step2": "Preencha o nome do fornecedor, categoria de material e versão.",
    "meta.step3": "Mapeie os campos: termo original → chave normalizada, tipo de dados, campo obrigatório.",
    "meta.step4": "Uma vez salvo, a API syncMetaOntology criará automaticamente os nós FieldDefinition no Neo4j.",
    "meta.example": "Exemplos de mapeamento",
    "meta.tb_orig": "Texto original no documento",
    "meta.tb_std": "Chave normalizada padrão",
    "meta.tb_type": "Tipo de dados",
    "meta.tb_req": "Obrigatório",
    "meta.tip_title": "💡 Gestão de versões",
    "meta.tip_desc": "Se um fornecedor modificar seu modelo, copie a plantilla existente e incremente sua versão. A compatibilidade com versões anteriores está garantida.",
    "parsing.title": "4. AI Ingestão e Extração",
    "parsing.support": "Formatos suportados",
    "parsing.tb_fmt": "Formato",
    "parsing.tb_ext": "Extensão",
    "parsing.tb_proc": "Processamento",
    "parsing.tb_pdf": "Extração direta de texto + OCR de backup para PDFs escaneados",
    "parsing.tb_excel": "Extração direta baseada nas coordenadas das células de planilhas",
    "parsing.tb_image": "Análise Vision AI com correção automática de perspectiva e deformidades",
    "parsing.proc": "Passos de extração",
    "parsing.step1": "Vá em Ingestão e arraste seu arquivo (Drag & Drop suportado).",
    "parsing.step2": "Selecione o modelo de IA (Gemini Pro, Claude Sonnet, GPT-4o, Ollama).",
    "parsing.step3": "Clique em Ingestar. O sistema calcula os valores e os escores de confiança.",
    "parsing.step4": "Verifique os alertas (laranja se confiança < 90%), corrija os valores e salve.",
    "legacy.title": "5. Integração com sistemas ERP / MES",
    "legacy.adapter": "Configuração de adaptadores",
    "legacy.adapter_desc": "Envie em tempo real seus dados de certificados validados para suas ferramentas ERP, LIMS ou MES.",
    "legacy.ad_step1": "Vá em Definições → Adaptadores de saída.",
    "legacy.ad_step2": "Escolha o protocolo (API REST, inserção direta SQL, arquivo CSV).",
    "legacy.ad_step3": "Associe as chaves correspondentes (LegacyKey) e ative a sincronização.",
    "legacy.sync": "Transmitir os dados",
    "legacy.sync_desc": "Clique em 'Enviar a Legacy' após validação. A sincronização leva menos de um segundo. Logs e relatórios são salvos no Audit Log.",
    "graphrag.title": "6. GraphRAG & Ontologia semântica",
    "graphrag.structure": "Estrutura do grafo Neo4j",
    "graphrag.struct_desc": "Os dados são salvos no Neo4j como nós interconectados de maneira lógica:",
    "graphrag.li1": "Relação entre Material (Material) e Fornecedores (Supplier)",
    "graphrag.li2": "Relação entre Certificado (Certificate LOT) e medições (TestResult)",
    "graphrag.li3": "Relação entre medições e métodos de teste padrão (TestMethod, ISO/ASTM)",
    "graphrag.chat": "Consultas em linguagem natural com GraphRAG",
    "graphrag.chat_desc": "Faça suas perguntas em linguagem natural na caixa de diálogo. A IA as traduzirá em consultas Cypher complexas para fornecer respostas confiáveis.",
    "graphrag.prompt_title": "💡 Exemplos de perguntas",
    "dashboard.title": "7. Dashboard & Monitoramento",
    "dashboard.realtime": "Consola de atividade em tempo real",
    "dashboard.desc": "Mostra indicadores de desempenho chave para seguir a atividade operacional:",
    "dashboard.li1": "Volume total (Total Volume): Número de certificados aprovados hoje",
    "dashboard.li2": "AI Confidence Trend: Evolução da precisão da IA nos últimos dias",
    "dashboard.li3": "Saúde do sistema (Service Status): Supervisão em tempo real do PostgreSQL, Neo4j, Redis e MinIO",
    "faq.title": "8. Perguntas frequentes (FAQ)",
    "faq.q1": "Q. Alguns valores do documento faltam ou são lidos com erros.",
    "faq.a1": "A. Scans escuros ou com baixa resolução podem limitar o OCR. Ajuste seus filtros Regex no modelo ou utilize um modelo de IA mais potente como Claude 3.5 Sonnet.",
    "faq.q2": "Q. As políticas proíbem o uso de APIs na nuvem. É possível funcionar off-line?",
    "faq.a2": "A. Sim. O CertBridge suporta conexões locais compatíveis com OpenAI (Ollama, vLLM). Você pode hospedar o Llama-3 ou Qwen completamente off-line em sua rede interna.",
    "faq.q3": "Q. Mensagem de erro de conexão ('ECONNREFUSED').",
    "faq.a3": "A. Verifique se a porta da API central 8090 e a porta do Neo4j 7687 estão abertas em seus firewalls e consulte o Audit Log."
  },
  hu: {
    "sidebar.ver": "Használati útmutató v0.1.0",
    "nav.start": "Elkezdés",
    "nav.roles": "Szerepkörök",
    "nav.meta": "Metasablonok",
    "nav.parsing": "AI Ingestion",
    "nav.legacy": "Integráció",
    "nav.graphrag": "GraphRAG és Ontológia",
    "nav.dashboard": "Vezérlőpult",
    "nav.faq": "FAQ",
    "hero.title": "CertBridge Használati Útmutató",
    "hero.desc": "Az AI alapú tanúsítvány-feldolgozástól az ERP/MES integráción át a Neo4j GraphRAG elemzésig — részletes útmutató szerepkörök szerint.",
    "hero.badge": "📖 v0.1.0 · Admin · Felhasználó · Elemző",
    "start.title": "1. Elkezdés",
    "start.login": "Bejelentkezés és beállítás",
    "start.login_desc": "Ellenőrizze a szerver címét (Beállítások → Szerver URL, alapértelmezett port: 8090), majd adja meg a felhasználónevét és jelszavát.",
    "start.tb_role": "Alapértelmezett szerepkör",
    "start.tb_id": "Felhasználónév",
    "start.tb_pw": "Jelszó",
    "start.tb_first": "Első bejelentkezés",
    "start.menu_intro": "A menü szerkezete",
    "start.menu_desc": "A bejelentkezés után a bal oldali menüsávból érheti el a különféle funkciókat:",
    "start.tb_m_name": "Menü",
    "start.tb_m_desc": "Leírás",
    "start.tb_m_auth": "Szerepkör",
    "start.tb_m1": "📊 Dashboard",
    "start.tb_m1_desc": "Elemzési statisztikák, a szolgáltatások állapota, utolsó sikeres munkák",
    "start.tb_m_all": "Összes szerepkör",
    "start.tb_m2": "📄 Ingestion",
    "start.tb_m2_desc": "Töltse fel a tanúsítványokat és indítsa el az AI elemzést",
    "start.tb_m3": "📋 Sablonok",
    "start.tb_m3_desc": "Metasablonok és mezőleképezések beszállítónként",
    "start.tb_m4": "🔗 Ontológia",
    "start.tb_m4_desc": "Fedezze fel a szemantikus kapcsolatokat a Neo4j gráfban",
    "start.tb_m5": "💬 AI Chat",
    "start.tb_m5_desc": "Kérdezzen az adatairól természetes nyelven a GraphRAG segítségével",
    "start.tb_m6": "👥 Csoportok",
    "start.tb_m6_desc": "Hozzon létre felhasználói csoportokat és rendeljen hozzájuk adatbázisokat",
    "roles.title": "2. Szerepkörök szerinti útmutató",
    "roles.r1": "Rendszergazda (Admin)",
    "roles.r1_desc": "Csoportok, profilok, felhasználók kezelése, biztonsági auditok és a kétlépcsős azonosítás (TOTP) beállítása",
    "roles.r2": "Operátor (User)",
    "roles.r2_desc": "Tanúsítványok feltöltése, AI adatok ellenőrzése, jóváhagyás és küldés az ERP/MES felé",
    "roles.r3": "Minőségügyi Elemző (Analyst)",
    "roles.r3_desc": "Hibaforrások felderítése a gráfban, GraphRAG lekérdezések, minőségi riportok",
    "roles.admin_wf": "👤 Rendszergazda folyamat",
    "roles.aw1": "Csoport létrehozása",
    "roles.aw2": "Profil hozzárendelése",
    "roles.aw3": "Felhasználó hozzáadása",
    "roles.aw4": "Adapter beállítása",
    "roles.aw5": "Felügyelet",
    "roles.admin_li1": "Csoportok izolálása: Hozzon létre független csoportokat saját PostgreSQL, MinIO és Neo4j erőforrásokkal.",
    "roles.admin_li2": "Biztonság: Kezelje a jelszó-szabályokat és állítsa be a TOTP azonosítást.",
    "roles.user_wf": "👷 Operátor folyamat",
    "roles.uw1": "Fájl kiválasztása",
    "roles.uw2": "Sablon párosítása",
    "roles.uw3": "AI Feldolgozás",
    "roles.uw4": "Adatok ellenőrzése",
    "roles.uw5": "Küldés a MES felé",
    "roles.analyst_wf": "🔬 Elemző folyamat",
    "roles.anw1": "Gráf felfedezése",
    "roles.anw2": "Kérdés az AI-hoz",
    "roles.anw3": "Cypher ellenőrzése",
    "roles.anw4": "Riport exportálása",
    "meta.title": "3. Metasablonok kezelése",
    "meta.intro": "A beszállítói formátumok normalizálása teszi lehetővé a zökkenőmentes és automatizált AI feldolgozást.",
    "meta.new_reg": "Új sablon létrehozása",
    "meta.step1": "Menjen a Sablonok menübe és kattintson a Sablon létrehozása gombra.",
    "meta.step2": "Adja meg a beszállító nevét, anyagkategóriáját és a verziót.",
    "meta.step3": "Párosítsa a mezőket: eredeti kifejezés → standard kulcs, adattípus, kötelező mező.",
    "meta.step4": "A mentés után a syncMetaOntology API automatikusan létrehozza a FieldDefinition csomópontokat a Neo4j gráfban.",
    "meta.example": "Példák a párosításra",
    "meta.tb_orig": "Eredeti szöveg a dokumentumban",
    "meta.tb_std": "Standardizált kulcs",
    "meta.tb_type": "Adattípus",
    "meta.tb_req": "Kötelező",
    "meta.tip_title": "💡 Verziókezelés",
    "meta.tip_desc": "Ha a beszállító megváltoztatja a sablont, másolja le a meglévő sablont és növelje a verziószámot. A visszamenőleges kompatibilitás teljes mértékben biztosított.",
    "parsing.title": "4. AI Ingestion és Feldolgozás",
    "parsing.support": "Támogatott formátumok",
    "parsing.tb_fmt": "Formátum",
    "parsing.tb_ext": "Kiterjesztés",
    "parsing.tb_proc": "Feldolgozás",
    "parsing.tb_pdf": "Közvetlen szövegkivonás + OCR fallback a szkennelt dokumentumokhoz",
    "parsing.tb_excel": "Közvetlen táblázat-cellafeldolgozás a koordináták alapján",
    "parsing.tb_image": "Vision AI alapú feldolgozás automatikus perspektíva- és torzításkorrekcióval",
    "parsing.proc": "A feldolgozás lépései",
    "parsing.step1": "Menjen az Ingestion lapra és húzza be a fájlt (Drag & Drop támogatott).",
    "parsing.step2": "Válassza ki a használni kívánt AI modellt (Gemini Pro, Claude Sonnet, GPT-4o, Ollama).",
    "parsing.step3": "Kattintson az Ingest gombra. A rendszer kiszámítja az értékeket és a megbízhatósági pontszámot.",
    "parsing.step4": "Ellenőrizze a figyelmeztetéseket (narancssárga, ha a pontszám < 90%), javítsa a hibákat, majd mentse el.",
    "legacy.title": "5. Integráció ERP / MES rendszerekkel",
    "legacy.adapter": "Adapterek konfigurálása",
    "legacy.adapter_desc": "Küldje el valós időben a jóváhagyott tanúsítványadatokat az ERP, LIMS vagy MES rendszereibe.",
    "legacy.ad_step1": "Menjen a Beállítások → Kimeneti adapterek menüpontba.",
    "legacy.ad_step2": "Válassza ki a protokollt (REST API, közvetlen SQL beszúrás, CSV fájl).",
    "legacy.ad_step3": "Párosítsa a kulcsokat a célrendszer kulcsaival (LegacyKey) és engedélyezze a szinkronizálást.",
    "legacy.sync": "Adatok továbbítása",
    "legacy.sync_desc": "A jóváhagyás után kattintson a 'Küldés Legacy-be' gombra. A szinkronizáció egy másodpercen belül megtörténik. A hibák és naplófájlok az Audit Logban találhatók.",
    "graphrag.title": "6. GraphRAG és Szemantikus Ontológia",
    "graphrag.structure": "A Neo4j gráf felépítése",
    "graphrag.struct_desc": "Az adatok nem különálló táblákban, hanem egymással szemantikailag összekapcsolt gráfként tárolódnak a Neo4j-ben:",
    "graphrag.li1": "Kapcsolat az Anyagok (Material) és a Beszállítók (Supplier) között",
    "graphrag.li2": "Kapcsolat a Tanúsítvány (Certificate LOT) és a mérési eredmények (TestResult) között",
    "graphrag.li3": "Kapcsolat a mérési eredmények és a vizsgálati szabványok (TestMethod, ISO/ASTM) között",
    "graphrag.chat": "Kérdések természetes nyelven a GraphRAG segítségével",
    "graphrag.chat_desc": "Tegye fel kérdéseit egyszerűen a csevegőablakban. Az AI lefordítja azokat Cypher lekérdezésekké és hiteles, tényeken alapuló válaszokat ad.",
    "graphrag.prompt_title": "💡 Példák a kérdésekre",
    "dashboard.title": "7. Dashboard & Monitoring",
    "dashboard.realtime": "Valós idejű működési vezérlőpult",
    "dashboard.desc": "Megjeleníti a legfontosabb teljesítménymutatókat a helyszíni folyamatok követéséhez:",
    "dashboard.li1": "Összesített mennyiség (Total Volume): A mai napon sikeresen jóváhagyott tanúsítványok száma",
    "dashboard.li2": "AI Confidence Trend: Az AI megbízhatóságának alakulása az elmúlt napokban",
    "dashboard.li3": "Rendszer állapota (Service Status): A PostgreSQL, Neo4j, Redis és MinIO működésének valós idejű felügyelete",
    "faq.title": "8. Gyakran ismételt kérdések (FAQ)",
    "faq.q1": "Q. A feldolgozás során bizonyos értékek hiányoznak vagy hibásak.",
    "faq.a1": "A. A rossz minőségű vagy túl sötét szkennelt dokumentumok ronthatják az OCR teljesítményét. Finomítsa a sablon Regex szűrőit, vagy váltson egy nagyobb teljesítményű modellre (pl. Claude 3.5 Sonnet).",
    "faq.q2": "Q. A belső szabályzatunk tiltja a felhőalapú API-k használatát. Megoldható a helyi működés?",
    "faq.a2": "A. Igen. A CertBridge támogatja a helyi OpenAI-kompatibilis kapcsolatokat (pl. Ollama, vLLM). Futtathatja a Llama-3 vagy Qwen modelleket teljesen offline módon a belső hálózaton.",
    "faq.q3": "Q. ECONNREFUSED kapcsolódási hiba lép fel.",
    "faq.a3": "A. Ellenőrizze, hogy a központi API port (8090) és a Neo4j port (7687) nyitva van-e a tűzfalon, és tekintse meg az Audit Log bejegyzéseit."
  }
};

function changeLanguage(lang) {
  document.documentElement.lang = lang;
  localStorage.setItem("certbridge_language", lang);
  document.getElementById("lang-select").value = lang;

  // Update all elements with data-i18n attribute
  const elements = document.querySelectorAll("[data-i18n]");
  elements.forEach(el => {
    const key = el.getAttribute("data-i18n");
    if (i18n[lang] && i18n[lang][key]) {
      el.innerHTML = i18n[lang][key];
    } else if (i18n["en"] && i18n["en"][key]) {
      el.innerHTML = i18n["en"][key];
    }
  });

  // Update HTML Title dynamically
  if (lang === "ko") {
    document.getElementById("html-title").innerText = "CertBridge 사용 가이드";
  } else if (lang === "zh") {
    document.getElementById("html-title").innerText = "CertBridge 使用手册";
  } else if (lang === "ja") {
    document.getElementById("html-title").innerText = "CertBridge 操作ガイド";
  } else if (lang === "hu") {
    document.getElementById("html-title").innerText = "CertBridge Használati Útmutató";
  } else if (lang === "de") {
    document.getElementById("html-title").innerText = "CertBridge Benutzerhandbuch";
  } else if (lang === "fr") {
    document.getElementById("html-title").innerText = "Guide de l'utilisateur CertBridge";
  } else if (lang === "es") {
    document.getElementById("html-title").innerText = "Guía de usuario CertBridge";
  } else if (lang === "pt") {
    document.getElementById("html-title").innerText = "Guia do usuário CertBridge";
  } else {
    document.getElementById("html-title").innerText = "CertBridge User Guide";
  }

  console.log(`🌍 User Guide Language updated to: ${lang}`);
}

// Initializer
document.addEventListener("DOMContentLoaded", () => {
  // 1. Sync with React App Active Language
  const getLang = () => localStorage.getItem("certbridge_language") || "ko";
  changeLanguage(getLang());

  // Storage listener for instant sync
  window.addEventListener("storage", (e) => {
    if (e.key === "certbridge_language") {
      changeLanguage(e.newValue || "ko");
    }
  });

  // Polling fallback
  setInterval(() => {
    const currentLang = document.documentElement.lang;
    const targetLang = getLang();
    if (currentLang !== targetLang) {
      changeLanguage(targetLang);
    }
  }, 500);

  // ScrollSpy logic
  const sections = document.querySelectorAll('.section');
  const navLinks = document.querySelectorAll('#nav a');
  const observer = new IntersectionObserver(entries => {
    entries.forEach(e => {
      if (e.isIntersecting) {
        navLinks.forEach(l => l.classList.remove('active'));
        const id = e.target.id;
        const link = document.querySelector(`#nav a[href="#${id}"]`);
        if (link) link.classList.add('active');
      }
    });
  }, { threshold: 0.2 });
  sections.forEach(s => observer.observe(s));
});
</script>
</body>
</html>