File size: 39,539 Bytes
bc9f3e6 | 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 | /* ==========================================================================
LocalAiLab Assistant β custom desktop UI (Phase 1)
--------------------------------------------------------------------------
Design language: a quiet "warm studio" look carried from the app's
established brand (terracotta accent on warm cream paper, warm ink text).
The signature element is the agent activity trail β the streaming
thinking/tool steps β rendered as a calm, collapsible trail inside the
conversation instead of Gradio's raw log boxes.
Stylesheet layout:
- app.css ..................... global tokens, base, shell + header,
shared chat primitives (chip / tool-row),
and the migrated-tab components.
- components/chat/*.css ...... per-component styles for the chat tabs
(MessageList / Composer / ChatPane /
RagControls / DrControls / VisionControls).
========================================================================== */
:root {
/* palette β warm, Claude-ish, matches the pinned brand tokens */
--bg: #faf9f5;
--bg-elev: #ffffff;
--bg-soft: #f3efe6;
--bg-sidebar: #efeae0;
--bg-input: #ffffff;
/* Text is pure BLACK in light mode (user request: black text on the
light/white surfaces so it reads clearly). The secondary/faint text
uses dark neutrals for hierarchy β still far darker than the old warm
browns, keeping 10:1+ contrast on the cream/white surfaces. */
--ink: #000000;
--ink-soft: #4a4a4a;
--ink-faint: #6f6f6f;
--line: #e4dcd0;
--line-strong: #d6ccbc;
--accent: #d97757;
--accent-deep: #c25e3f;
--accent-soft: #f7e6dd;
--accent-ink: #8a4427;
--amber-bg: #fbf0dc;
--amber-line: #eed9b0;
--amber-ink: #8a5b1d;
--ok: #4e7a57;
--err: #b4453a;
--code-bg: #2d261f;
--code-ink: #f3e9dc;
--code-line: #45392c;
--shadow-sm: 0 1px 2px rgba(58, 47, 39, 0.06);
--shadow-md: 0 10px 28px rgba(58, 47, 39, 0.12);
--radius-sm: 8px;
--radius: 14px;
--radius-lg: 20px;
--font-ui: "Segoe UI Variable Text", "Segoe UI", "Leelawadee UI",
"Khmer OS Battambang", system-ui, -apple-system, sans-serif;
--font-display: Georgia, "Times New Roman", serif;
--font-code: "Cascadia Code", Consolas, "Courier New", monospace;
--sidebar-w: 236px;
--sidebar-w-collapsed: 68px;
--header-h: 62px;
/* Migrated-tab component tokens (STT / Data / KB / Settings / About).
Dark mode re-maps these below; light mode must match the black-ink
family too, so card titles, inputs, console text and buttons read as
black text on the warm cards instead of the old dark-brown fallbacks. */
--text-strong: #000000;
--text-dim: #4a4a4a;
}
html.dark {
--bg: #1d1814;
--bg-elev: #26201a;
--bg-soft: #221c17;
--bg-sidebar: #16120f;
--bg-input: #2a231c;
/* All text is pure white in dark mode so it stands out on the dark
surfaces (user request: make the text white wherever the background
is not white). This covers the neutral ink family, code text, the
amber thinking/plan labels and the terracotta-tinted labels; only
the semantic status colors (--ok / --err) stay coloured. */
--ink: #ffffff;
--ink-soft: #ffffff;
--ink-faint: #ffffff;
--line: #362e25;
--line-strong: #46392d;
--accent: #e8936c;
--accent-deep: #f0a88a;
--accent-soft: #3a2720;
--accent-ink: #ffffff;
--amber-bg: #33291b;
--amber-line: #4a3c26;
--amber-ink: #ffffff;
--ok: #7faf88;
--err: #e07a6e;
--code-bg: #120e0b;
--code-ink: #ffffff;
--code-line: #2c251d;
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
--shadow-md: 0 10px 28px rgba(0, 0, 0, 0.35);
/* Migrated-tab component tokens. These are ONLY defined in :root as
fallbacks (#3f332b etc. are dark ink built for the light cream cards),
so dark mode must re-map them here β otherwise card titles, inputs,
console text and buttons render dark-on-dark (1.05β1.42:1 contrast).
Mapped onto the same warm surfaces/tints as their :root originals:
text-strong -> --ink, text-dim -> --ink-soft, primary-* -> accent.
Neutral text is pure white here too, matching the --ink family. */
--text-strong: #ffffff;
--text-dim: #ffffff;
--primary-500: #e8936c;
--primary-600: #e8936c;
--primary-700: #ffffff;
/* --card-bg is deliberately aligned with --bg-elev (#26201a, was #2b2620)
so the migrated-tab cards share the header/tab-active surface; light
mode keeps the warm #fffdf9 fallback. */
--card-bg: #26201a;
--card-border: #3d362c;
--input-bg: #221e19;
--console-bg: #1e1a15;
--btn-bg: #383129;
}
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
margin: 0;
font-family: var(--font-ui);
background: var(--bg);
color: var(--ink);
font-size: 15px;
line-height: 1.55;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
overflow: hidden;
}
button {
font-family: inherit;
cursor: pointer;
}
select {
font-family: inherit;
cursor: pointer;
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-thumb {
background: var(--line-strong);
border-radius: 8px;
border: 2px solid transparent;
background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
background: var(--ink-faint);
background-clip: content-box;
}
::-webkit-scrollbar-track {
background: transparent;
}
/* ==========================================================================
Shell layout
========================================================================== */
.shell {
display: flex;
height: 100vh;
}
.sidebar {
width: var(--sidebar-w);
flex: 0 0 var(--sidebar-w);
background: var(--bg-sidebar);
border-right: 1px solid var(--line);
display: flex;
flex-direction: column;
padding: 18px 12px 14px;
overflow: hidden;
transition: width 0.18s ease, flex-basis 0.18s ease;
}
/* Collapsed sidebar β an icon-only rail (the header β° toggles it, the
choice is remembered across sessions). Width, the brand name/subtitle,
tab labels and the footer text all hide; icons stay centred and the
tab/header buttons keep their title tooltips. */
.shell.collapsed .sidebar {
width: var(--sidebar-w-collapsed);
flex-basis: var(--sidebar-w-collapsed);
}
.shell.collapsed .sidebar .brand {
justify-content: center;
padding-inline: 0;
}
.shell.collapsed .sidebar .brand > div:last-child,
.shell.collapsed .sidebar .tab-lb,
.shell.collapsed .sidebar .sidebar-foot span:not(.offline-dot),
.shell.collapsed .sidebar .sidebar-foot .yt-link {
display: none;
}
/* Collapsed rail: keep the Free All VRAM button reachable as a compact
icon-only pill (its label hides; the π₯ stays) β the "always visible"
contract. The CPU/RAM/VRAM readout chips hide with the rail. */
.shell.collapsed .sidebar .sidebar-stats .mem-chip {
display: none;
}
.shell.collapsed .sidebar .sidebar-stats {
padding-inline: 4px;
align-items: center;
}
.shell.collapsed .sidebar .sidebar-stats .vram-btn {
padding: 6px 8px;
}
.shell.collapsed .sidebar .sidebar-stats .vram-btn-label {
display: none;
}
.shell.collapsed .sidebar .tab-btn {
justify-content: center;
padding-inline: 0;
}
.shell.collapsed .sidebar .sidebar-foot {
justify-content: center;
padding-inline: 0;
}
.brand {
display: flex;
align-items: center;
gap: 10px;
padding: 2px 8px 16px;
border-bottom: 1px solid var(--line);
margin-bottom: 14px;
}
.brand-mark {
width: 38px;
height: 38px;
/* CIRCULAR tile matching the round logo's shape β the logo is a circle
with transparent corners, so a square (or rounded-square) tile behind
it showed its orange gradient around the logo. A circle lets the logo
cover the tile edge-to-edge: no orange ring. The gradient stays as a
fallback in case the image ever fails to load. */
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), var(--accent-deep));
display: flex;
align-items: center;
justify-content: center;
box-shadow: var(--shadow-sm);
flex: 0 0 auto;
overflow: hidden;
}
/* The brand logo (ui/web/public/logo.png β the round LocalAiLab logo, same
image as the favicon). Fills the whole circular tile (no padding) so it
covers the orange fallback gradient completely. */
.brand-logo {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
border-radius: 50%;
}
.brand-name {
font-family: var(--font-display);
font-weight: 700;
font-size: 17px;
letter-spacing: 0.2px;
line-height: 1.15;
}
/* Title + version badge on one row, baselines aligned β the badge sits
right after the title, never inside it (so .brand-name stays pure). */
.brand-title-row {
display: flex;
align-items: baseline;
min-width: 0;
}
/* Version badge right after the app title β a small muted pill so the
version reads as part of the brand header (it moved up from the sidebar
footer where it used to sit next to the YouTube link). */
.brand-ver {
/* flex item inside .brand-title-row: display/vertical-align are inert
there (flex items are blockified), so only margin+pill styling apply */
margin-left: 8px;
padding: 1px 7px;
border: 1px solid var(--line);
border-radius: 999px;
background: var(--bg-soft);
color: var(--ink-faint);
font-family: var(--font-ui);
font-size: 10.5px;
font-weight: 600;
letter-spacing: 0.1px;
line-height: 1.4;
white-space: nowrap;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.tabs {
display: flex;
flex-direction: column;
gap: 2px;
overflow-y: auto;
flex: 1;
min-height: 0;
}
.tab-btn {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
border: none;
background: transparent;
color: var(--ink-soft);
text-align: left;
padding: 9px 10px;
border-radius: var(--radius-sm);
font-size: 14px;
transition: background 0.12s ease, color 0.12s ease;
}
.tab-btn:hover {
background: var(--bg-elev);
color: var(--ink);
}
.tab-btn.active {
background: var(--bg-elev);
/* Black text on the white pill (light mode) β the terracotta accent bar
on the left still marks the active tab, so the label doesn't need to
carry the color. Dark mode overrides this to white below. */
color: var(--ink);
font-weight: 600;
box-shadow: var(--shadow-sm);
position: relative;
}
.tab-btn.active::before {
content: "";
position: absolute;
left: -12px;
top: 8px;
bottom: 8px;
width: 3px;
border-radius: 0 3px 3px 0;
background: var(--accent);
}
.tab-ic {
font-size: 16px;
width: 20px;
text-align: center;
flex: 0 0 auto;
}
.tab-lb {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sidebar-foot {
border-top: 1px solid var(--line);
padding: 12px 8px 2px;
font-size: 11.5px;
color: var(--ink-faint);
display: flex;
align-items: center;
gap: 6px;
}
.offline-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--ok);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent);
}
/* YouTube tutorial channel β replaces the old 'works offline' label at the
left end of the footer. Prominent pill: terracotta accent so it reads as
the channel CTA rather than muted footer text; the βΆοΈ glyph and bold
label make it visible at a glance, and the long Khmer label ellipsizes
instead of pushing the version away. */
.sidebar-foot .yt-link {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--accent-ink);
background: color-mix(in srgb, var(--accent) 12%, var(--bg-elev));
border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
border-radius: 999px;
padding: 4px 11px;
font-size: 12px;
font-weight: 600;
text-decoration: none;
line-height: 1.2;
min-width: 0;
max-width: 190px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.sidebar-foot .yt-ic {
font-size: 11px;
flex: 0 0 auto;
}
.sidebar-foot .yt-txt {
overflow: hidden;
text-overflow: ellipsis;
}
.sidebar-foot .yt-link:hover {
background: color-mix(in srgb, var(--accent) 20%, var(--bg-elev));
border-color: var(--accent);
color: var(--accent-ink);
}
/* --------------------------------------------------------------------------
Header
-------------------------------------------------------------------------- */
.main {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
.header {
position: relative; /* anchors the vram confirmation toast */
height: var(--header-h);
flex: 0 0 var(--header-h);
border-bottom: 1px solid var(--line);
background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
backdrop-filter: blur(8px);
display: flex;
align-items: center;
gap: 10px;
padding: 0 18px;
}
.header-title {
font-family: var(--font-display);
font-size: 15px;
font-weight: 700;
color: var(--ink);
margin-right: auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.header-actions {
display: flex;
align-items: center;
gap: 8px;
}
.icon-btn {
border: 1px solid var(--line);
background: var(--bg-elev);
color: var(--ink-soft);
border-radius: var(--radius-sm);
width: 34px;
height: 34px;
font-size: 15px;
display: flex;
align-items: center;
justify-content: center;
transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.icon-btn:hover {
border-color: var(--accent);
color: var(--accent-ink);
}
.icon-btn:disabled {
opacity: 0.5;
cursor: default;
border-color: var(--line);
color: var(--ink-soft);
}
.pill-select {
appearance: none;
border: 1px solid var(--line);
background: var(--bg-elev) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239c8c7c' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
color: var(--ink);
border-radius: var(--radius-sm);
padding: 6px 26px 6px 10px;
font-size: 13px;
max-width: 210px;
transition: border-color 0.12s ease;
}
.pill-select:hover {
border-color: var(--accent);
}
/* 'already downloaded?' status chip β sits at the end of the header model
dropdown (the web port of the Gradio model-status notice card). Compact
pill with the notice's emoji + bold title; the full bilingual notice is
the hover tooltip. Warm Claude palette, light + dark mirrors. */
.model-status-chip {
border: 1px solid var(--accent-soft);
background: var(--accent-soft);
color: var(--accent-ink);
border-radius: 999px;
padding: 5px 12px;
font-size: 12px;
font-weight: 600;
max-width: 180px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: help;
transition: border-color 0.12s ease, background 0.12s ease;
}
.model-status-chip:hover {
border-color: var(--accent);
}
.dark .model-status-chip {
border-color: var(--accent-soft);
background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}
.model-dl-badge {
display: inline-flex;
align-items: center;
gap: 6px;
border: 1px solid var(--accent);
background: var(--accent-soft);
color: var(--accent-ink);
border-radius: 999px;
padding: 4px 12px;
font-size: 12px;
font-weight: 600;
white-space: nowrap;
animation: dl-pulse-border 1.5s infinite alternate;
}
.model-dl-badge.done {
border-color: #2e7d32;
background: rgba(46, 125, 50, 0.12);
color: #2e7d32;
animation: none;
}
.model-dl-badge.error {
border-color: #c62828;
background: rgba(198, 40, 40, 0.12);
color: #c62828;
animation: none;
}
@keyframes dl-pulse-border {
0% { border-color: var(--accent-soft); }
100% { border-color: var(--accent); }
}
.embed-active-info {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 12px;
color: var(--text-muted);
padding: 4px 0;
}
.embed-active-info strong {
color: var(--text-strong);
font-weight: 600;
}
/* The accent/amber tokens above are pure white in dark mode; these two
tokens double as non-text surfaces (send-button / brand-mark gradients,
btn-primary backgrounds), so their text uses are whitened via targeted
rules instead. Links keep their underline so they stay clickable. */
.dark .rich a,
.dark .upload-name {
color: #ffffff;
}
/* 'Free VRAM' button at the model-status chip β free all VRAM right where
the model notice shows, without leaving the tab for Settings. Stop-toned
pill matching the chip's compact header scale. */
.vram-btn {
display: inline-flex;
align-items: center;
gap: 6px;
border: 1px solid color-mix(in srgb, var(--err) 38%, var(--line));
background: color-mix(in srgb, var(--err) 9%, var(--bg-elev));
color: var(--err);
border-radius: 999px;
padding: 5px 12px;
font-size: 12px;
font-weight: 600;
white-space: nowrap;
transition: border-color 0.12s ease, background 0.12s ease;
}
.vram-btn:hover:not(:disabled) {
border-color: var(--err);
background: color-mix(in srgb, var(--err) 15%, var(--bg-elev));
}
.vram-btn:disabled {
opacity: 0.55;
cursor: not-allowed;
}
/* Live CPU/RAM/VRAM usage readouts + Free All VRAM in the SIDEBAR β warm
Claude palette chips that show how much of the machine is in use (and how
much freeing VRAM actually recovered). Stacked full-width so the sidebar
reads CPU β RAM β VRAM top to bottom, with the Free-VRAM button below. */
.sidebar-stats {
display: flex;
flex-direction: column;
gap: 6px;
padding: 10px 8px 12px;
border-top: 1px solid var(--line);
margin-top: auto;
position: relative;
}
.mem-chip {
display: inline-flex;
align-items: center;
gap: 6px;
border: 1px solid var(--line);
background: var(--bg-soft);
color: var(--ink-soft);
border-radius: 999px;
padding: 5px 12px;
font-size: 12px;
font-variant-numeric: tabular-nums;
white-space: nowrap;
user-select: text;
cursor: help;
transition: border-color 0.12s ease, color 0.12s ease;
}
.mem-chip:hover {
border-color: var(--accent);
color: var(--accent-ink);
}
/* Sidebar usage rows β full-width stacked CPU/RAM/VRAM chips (label left,
value right) so the stats column reads cleanly top to bottom. */
.sidebar-stats .mem-chip {
display: flex;
justify-content: space-between;
gap: 8px;
width: 100%;
}
.mem-chip-label {
font-weight: 600;
flex: 0 0 auto;
}
.sidebar-stats .mem-chip-val {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
/* Free All VRAM β full-width under the usage chips so it stays one tap
away in the sidebar on every tab. */
.sidebar-stats .vram-btn {
width: 100%;
justify-content: center;
text-align: center;
padding: 6px 12px;
}
/* Transient toast after freeing VRAM β anchored just above the sidebar
stats block (it has position: relative) so it never shifts the layout;
auto-hides client-side. */
.seg {
display: inline-flex;
border: 1px solid var(--line);
border-radius: var(--radius-sm);
overflow: hidden;
background: var(--bg-elev);
}
.seg button {
border: none;
background: transparent;
color: var(--ink-soft);
padding: 6px 12px;
font-size: 13px;
transition: background 0.12s ease, color 0.12s ease;
}
.seg button.active {
background: var(--accent-soft);
/* Black text in light mode β the tinted pill already marks the active
choice; dark mode overrides to white below. */
color: var(--ink);
font-weight: 600;
}
.dark .seg button.active {
color: #ffffff;
}
.busy-dot {
width: 9px;
height: 9px;
border-radius: 50%;
background: var(--accent);
animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
0%,
100% {
opacity: 0.35;
transform: scale(0.85);
}
50% {
opacity: 1;
transform: scale(1.1);
}
}
/* --------------------------------------------------------------------------
Content wrapper (owns the active tab pane)
-------------------------------------------------------------------------- */
.content {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
/* --------------------------------------------------------------------------
Shared chat primitives β used by ChatPane AND the migrated tabs
(SettingsTab chip-row, DataTab chips, tool rows on every migrated tab).
The chat-specific layouts/bubbles live in components/chat/*.css.
-------------------------------------------------------------------------- */
.chip-row {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 10px;
flex-wrap: wrap;
}
.chip {
display: inline-flex;
align-items: center;
gap: 6px;
border: 1px solid var(--line);
background: var(--bg-soft);
color: var(--ink-soft);
border-radius: 999px;
padding: 4px 12px;
font-size: 12.5px;
user-select: none;
cursor: pointer;
transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.chip.on {
background: var(--accent-soft);
border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
color: var(--accent-ink);
font-weight: 600;
}
.chip input {
display: none;
}
.tool-row {
display: flex;
gap: 8px;
margin-top: 10px;
align-items: center;
}
/* Save buttons show their confirmation INLINE, directly below the button
(the tab-wide tool-flash stays for everything else). Shared by every
tab's Save Report / Save Transcript / Save Audio buttons. */
.save-group {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.save-notice {
font-size: 0.78rem;
line-height: 1.35;
color: var(--ok, #4e7a57);
max-width: 340px;
word-break: break-word;
}
.save-notice.err {
color: var(--err, #b4453a);
}
.tool-flash {
margin-left: auto;
font-size: 12.5px;
color: var(--ok);
}
.tool-flash.err {
color: var(--err);
}
/* Confirmation popup β the toast that pops over the WHOLE app when a
llama-server / GGUF / whisper-server path is activated (Enter or click
outside the field) or VRAM is freed. Fixed + dead-center of the window
(vertical AND horizontal) so it reads as a true popup over whatever tab
is open; auto-hides after a few seconds. */
.settings-toast {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 9999;
max-width: min(560px, calc(100vw - 48px));
padding: 16px 22px;
border-radius: var(--radius, 14px);
background: var(--bg-elev, #ffffff);
border: 1px solid var(--card-border, #e7e0d3);
border-left: 5px solid var(--ok, #4e7a57);
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
color: var(--text-strong, #000000);
font-size: 0.9rem;
font-weight: 600;
line-height: 1.5;
text-align: center;
word-break: break-word;
animation: toast-pop 0.22s ease-out;
}
/* Gentle entrance β the popup scales in from the center so it reads as a
confirmation "pop", not a slide-up status line. */
@keyframes toast-pop {
from {
opacity: 0;
transform: translate(-50%, -50%) scale(0.92);
}
to {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
}
/* Error variant β the Free-All-VRAM failure uses the same centered popup
but with the danger tone (red left border + red text) instead of the
success green. */
.settings-toast.err {
border-left-color: color-mix(in srgb, var(--err, #b4453a) 60%, var(--line, #e7e0d3));
color: var(--err, #b4453a);
}
/* reduced motion */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* ββ Migrated tabs: STT / Data / KB / Settings / About βββββββββββββββ */
.tab-scroll {
display: flex;
flex-direction: column;
gap: 14px;
height: 100%;
overflow-y: auto;
padding: 4px 2px 24px;
}
.card {
background: var(--card-bg, #fffdf9);
border: 1px solid var(--card-border, #e7e0d3);
border-radius: 14px;
padding: 16px 18px;
display: flex;
flex-direction: column;
gap: 12px;
box-shadow: 0 1px 2px rgba(95, 74, 54, 0.05);
}
.card-title {
font-size: 0.95rem;
font-weight: 700;
color: var(--text-strong, #3f332b);
letter-spacing: 0.01em;
}
/* Subheading inside a card β the merged Settings status card labels its
second console block (CUDA) under the Hardware & Driver block. */
.card-subtitle {
font-size: 0.85rem;
font-weight: 700;
color: var(--text-dim, #4a4a4a);
letter-spacing: 0.01em;
margin-top: 2px;
}
.field-row {
display: flex;
flex-wrap: wrap;
gap: 10px;
align-items: flex-end;
}
/* Collapsed "Generation Settings" section β SHARED by the chat panes (below
the composer) and the Data tab (its analysis config): the mode chips, the
per-tab context-window dropdown and the tab-specific controls fold away so
the input area stays clean. Lives in app.css (not a component stylesheet)
because it now spans component boundaries β a shared class, like .card
and .field. Collapsed by default. */
.gen-settings {
margin-top: 10px;
border: 1px solid var(--line);
border-radius: var(--radius-sm);
background: var(--bg-soft);
}
.gen-settings summary {
cursor: pointer;
list-style: none;
padding: 8px 12px;
font-size: 12.5px;
color: var(--ink-soft);
user-select: none;
display: flex;
align-items: center;
gap: 6px;
}
.gen-settings summary::-webkit-details-marker {
display: none;
}
.gen-settings summary::before {
content: "βΈ";
font-size: 11px;
transition: transform 0.15s ease;
color: var(--ink-faint);
}
.gen-settings[open] summary::before {
transform: rotate(90deg);
}
.gen-settings summary:hover {
color: var(--accent-ink);
}
.gen-settings-body {
padding: 10px 12px 12px;
border-top: 1px solid var(--line);
}
.gen-settings-body > :last-child {
margin-bottom: 0;
}
/* A non-wrapping inline group inside a .field-row (e.g. paired buttons). */
.field-row-inline {
flex-wrap: nowrap;
gap: 6px;
}
.field-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 12px;
}
/* Settings providers: each provider is one block (one per row), and all
provider blocks are laid out side by side in a responsive grid. */
.provider-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 12px;
align-items: start;
}
.provider-block {
border: 1px solid var(--card-border, #e7e0d3);
border-radius: 12px;
background: var(--bg-soft, #faf6ee);
padding: 12px 14px;
display: flex;
flex-direction: column;
gap: 10px;
}
.provider-title {
font-size: 0.82rem;
font-weight: 700;
color: var(--text-strong, #3f332b);
border-bottom: 1px dashed var(--card-border, #e7e0d3);
padding-bottom: 6px;
}
.provider-fields {
display: flex;
flex-direction: column;
gap: 10px;
}
.field {
display: flex;
flex-direction: column;
gap: 5px;
flex: 1;
min-width: 150px;
}
.field-num {
flex: 0 1 120px;
}
.select-wide {
flex: 2;
min-width: 200px;
}
.field-label {
font-size: 0.78rem;
font-weight: 600;
color: var(--text-dim, #8a7a63);
}
.field input,
.field select,
.field textarea,
.select-wide {
width: 100%;
box-sizing: border-box;
background: var(--input-bg, #fdfbf6);
border: 1px solid var(--card-border, #e7e0d3);
border-radius: 9px;
padding: 8px 10px;
font: inherit;
color: var(--text-strong, #3f332b);
outline: none;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.select-wide:focus {
border-color: var(--primary-500, #d97757);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-500, #d97757) 15%, transparent);
}
.upload-area {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 18px 12px;
border: 1.5px dashed var(--card-border, #e7e0d3);
border-radius: 12px;
cursor: pointer;
color: var(--text-dim, #8a7a63);
font-size: 0.9rem;
transition: border-color 0.15s ease, background 0.15s ease;
text-align: center;
}
.upload-area:hover {
border-color: var(--primary-500, #d97757);
background: rgba(217, 119, 87, 0.06);
}
.upload-name {
color: var(--primary-600, #c96a49);
font-weight: 600;
}
.btn {
border: 1px solid var(--card-border, #e7e0d3);
background: var(--btn-bg, #f7f2e9);
color: var(--text-strong, #3f332b);
border-radius: 10px;
padding: 8px 14px;
font: inherit;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
transition: filter 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
.btn:hover:not(:disabled) {
filter: brightness(0.97);
box-shadow: 0 1px 4px rgba(95, 74, 54, 0.15);
}
.btn:active:not(:disabled) {
transform: translateY(1px);
}
.btn:disabled {
opacity: 0.45;
cursor: not-allowed;
}
.btn-primary {
background: var(--primary-600, #d97757);
border-color: var(--primary-600, #d97757);
color: #fff;
}
.btn-primary:hover:not(:disabled) {
filter: brightness(1.05);
}
.btn-danger {
/* #b4453a = the light-mode --err: white text on it is 5.47:1 (WCAG AA),
vs 4.21:1 on the old #c25e4a β and the SAME red reads in both modes. */
background: #b4453a;
border-color: #b4453a;
color: #fff;
}
.btn-sm {
padding: 6px 11px;
font-size: 0.8rem;
}
.console {
margin: 0;
padding: 12px;
background: var(--console-bg, #f6f1e6);
border: 1px solid var(--card-border, #e7e0d3);
border-radius: 10px;
font-family: "Cascadia Mono", Consolas, monospace;
font-size: 0.78rem;
line-height: 1.55;
color: var(--text-strong, #3f332b);
white-space: pre-wrap;
word-break: break-word;
max-height: 260px;
overflow-y: auto;
}
.console.log {
max-height: 220px;
color: #9db48b;
}
.status-line {
padding: 8px 12px;
border-radius: 10px;
background: rgba(217, 119, 87, 0.1);
color: var(--primary-700, #a5533a);
font-size: 0.85rem;
font-weight: 600;
}
.status-line.err {
background: rgba(194, 94, 74, 0.12);
color: var(--err);
}
/* ββ Download progress bar ββββββββββββββββββββββββββββββββββββββββββββ */
.dl-progress {
margin-top: 8px;
padding: 10px 12px;
border-radius: 10px;
background: var(--card-bg, #f5f0e8);
border: 1px solid var(--card-border, #e7e0d3);
}
.dl-progress-header {
display: flex;
justify-content: space-between;
align-items: baseline;
margin-bottom: 6px;
gap: 8px;
}
/* ββ Model Management Section in Settings ββββββββββββββββββββββββββββββ */
.provider-subtabs {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-bottom: 14px;
}
.subtab-btn {
padding: 6px 12px;
border-radius: 8px;
border: 1px solid var(--card-border, #e7e0d3);
background: var(--card-bg, #f5f0e8);
color: var(--text-soft, #555);
font-size: 0.8rem;
font-weight: 600;
cursor: pointer;
transition: all 0.15s ease;
display: inline-flex;
align-items: center;
gap: 5px;
}
.subtab-btn:hover {
background: var(--hover-bg, #ece5d8);
color: var(--text-strong, #222);
}
.subtab-btn.active {
background: var(--primary-500, #e08a6a);
color: #fff;
border-color: var(--primary-600, #d97757);
box-shadow: 0 1px 4px rgba(217, 119, 87, 0.25);
}
.model-mgmt-box {
background: var(--console-bg, #f6f1e6);
border: 1px solid var(--card-border, #e7e0d3);
border-radius: 10px;
padding: 14px;
display: flex;
flex-direction: column;
gap: 12px;
}
.model-meta-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
}
.model-status-chip {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 0.76rem;
font-weight: 600;
padding: 3px 8px;
border-radius: 6px;
background: var(--card-bg, #f5f0e8);
border: 1px solid var(--card-border, #e7e0d3);
color: var(--text-strong, #333);
}
.model-status-chip.ready {
background: rgba(38, 166, 91, 0.12);
border-color: rgba(38, 166, 91, 0.3);
color: #27ae60;
}
.model-status-chip.download {
background: rgba(230, 126, 34, 0.12);
border-color: rgba(230, 126, 34, 0.3);
color: #d35400;
}
.model-status-chip.cloud {
background: rgba(52, 152, 219, 0.12);
border-color: rgba(52, 152, 219, 0.3);
color: #2980b9;
}
.model-details-text {
font-family: var(--font-mono, monospace);
font-size: 0.75rem;
color: var(--text-muted, #777);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.model-table {
width: 100%;
border-collapse: collapse;
font-size: 0.83rem;
}
.model-table th,
.model-table td {
padding: 10px 12px;
text-align: left;
border-bottom: 1px solid var(--card-border, #e7e0d3);
vertical-align: middle;
}
.model-table th {
background: var(--card-bg, #f5f0e8);
font-weight: 700;
color: var(--text-dim, #8a7a63);
font-size: 0.76rem;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.model-table tr:hover td {
background: var(--hover-bg, rgba(236, 229, 216, 0.4));
}
.model-name-cell {
display: flex;
flex-direction: column;
gap: 2px;
}
.model-name-title {
font-weight: 600;
color: var(--text-strong, #333);
}
.model-name-id {
font-family: var(--font-mono, monospace);
font-size: 0.72rem;
color: var(--text-muted, #888);
}
.action-btn-group {
display: inline-flex;
align-items: center;
gap: 6px;
}
.model-dl-card {
margin-top: 12px;
padding: 12px 14px;
border-radius: 10px;
background: var(--card-bg, #f5f0e8);
border: 1px solid var(--primary-300, #f0b49e);
box-shadow: 0 2px 8px rgba(224, 138, 106, 0.12);
}
.dl-progress-meta {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
margin-top: 6px;
font-size: 0.75rem;
color: var(--text-soft, #555);
}
.dl-progress-meta .dl-size {
font-weight: 600;
color: var(--text-strong, #222);
}
.dl-progress-meta .dl-speed {
color: var(--primary-600, #d97757);
font-weight: 600;
}
.dl-progress-meta .dl-status {
color: var(--text-muted, #888);
margin-left: auto;
}
.dl-progress-label {
font-size: 0.82rem;
font-weight: 600;
color: var(--text-strong, #3f332b);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
}
.dl-progress-pct {
font-size: 0.85rem;
font-weight: 700;
color: var(--primary-600, #d97757);
white-space: nowrap;
}
.dl-progress-track {
height: 8px;
background: var(--card-border, #e7e0d3);
border-radius: 4px;
overflow: hidden;
}
.dl-progress-bar {
height: 100%;
background: linear-gradient(90deg, var(--primary-500, #e08a6a), var(--primary-600, #d97757));
border-radius: 4px;
transition: width 0.3s ease;
}
.dl-progress-size {
margin-top: 4px;
font-size: 0.75rem;
color: var(--text-muted, #8a7e72);
text-align: right;
}
.kb-log {
margin-top: 8px;
padding: 8px 12px;
border-radius: 10px;
background: rgba(60, 60, 80, 0.08);
border: 1px solid rgba(120, 120, 150, 0.18);
max-height: 240px;
overflow: auto;
font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
font-size: 0.78rem;
line-height: 1.45;
color: var(--text-soft, #555);
white-space: pre-wrap;
word-break: break-word;
}
.kb-log-line {
padding: 1px 0;
}
.table-wrap {
overflow-x: auto;
border: 1px solid var(--card-border, #e7e0d3);
border-radius: 10px;
}
.doc-table {
width: 100%;
border-collapse: collapse;
font-size: 0.82rem;
}
.doc-table th,
.doc-table td {
padding: 8px 10px;
text-align: left;
border-bottom: 1px solid var(--card-border, #e7e0d3);
white-space: nowrap;
}
.doc-table th {
background: var(--console-bg, #f6f1e6);
font-weight: 700;
color: var(--text-dim, #8a7a63);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.doc-table tbody tr {
cursor: pointer;
transition: background 0.12s ease;
}
.doc-table tbody tr:hover {
background: rgba(217, 119, 87, 0.06);
}
.doc-table tbody tr.sel {
background: rgba(217, 119, 87, 0.16);
box-shadow: inset 3px 0 0 var(--primary-500, #d97757);
}
/* Thumbnail previews of a visual document's pages (KB Visual Index). */
.vis-cell {
display: inline-flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.vis-strip {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
gap: 4px;
max-width: 220px;
}
.vis-thumb {
width: 40px;
height: 40px;
object-fit: cover;
border-radius: 6px;
border: 1px solid var(--card-border, #e7e0d3);
background: var(--card-bg, #fff);
flex: none;
cursor: zoom-in;
}
.vis-thumb:hover {
border-color: var(--primary-500, #d97757);
}
.chart-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 12px;
}
.chart-item {
width: 100%;
border: 1px solid var(--card-border, #e7e0d3);
border-radius: 10px;
background: var(--card-bg, #fff);
}
.report-box summary {
cursor: pointer;
font-weight: 600;
color: var(--primary-700, #a5533a);
margin-bottom: 8px;
}
/* live streaming caret on the STT report while the analysis runs */
.report-box .rich.live::after {
content: "";
display: inline-block;
width: 8px;
height: 15px;
margin-left: 3px;
vertical-align: -2px;
border-radius: 2px;
background: var(--accent);
animation: blink 0.9s steps(2, start) infinite;
}
.report-preview {
padding: 14px;
border: 1px solid var(--card-border, #e7e0d3);
border-radius: 10px;
background: var(--console-bg, #f6f1e6);
}
.reports-path {
font-size: 0.8rem;
color: var(--text-dim, #8a7a63);
font-family: "Cascadia Mono", Consolas, monospace;
word-break: break-all;
}
.empty-hint {
color: var(--text-dim, #8a7a63);
font-size: 0.85rem;
padding: 10px 0;
}
.about-box .rich h1,
.about-box .rich h2,
.about-box .rich h3 {
color: var(--primary-700, #a5533a);
}
.tool-row.wrap {
flex-wrap: wrap;
}
|