ltcai 2.2.7 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +63 -32
  2. package/docs/CHANGELOG.md +82 -0
  3. package/docs/V3_BACKEND_ARCHITECTURE.md +138 -0
  4. package/docs/V3_FRONTEND.md +136 -0
  5. package/knowledge_graph.py +649 -21
  6. package/latticeai/__init__.py +1 -1
  7. package/latticeai/api/admin.py +47 -0
  8. package/latticeai/api/agents.py +54 -31
  9. package/latticeai/api/auth.py +1 -1
  10. package/latticeai/api/chat.py +10 -2
  11. package/latticeai/api/search.py +236 -0
  12. package/latticeai/api/static_routes.py +11 -2
  13. package/latticeai/core/config.py +16 -0
  14. package/latticeai/core/embedding_providers.py +502 -0
  15. package/latticeai/core/local_embeddings.py +86 -0
  16. package/latticeai/core/workspace_os.py +1 -1
  17. package/latticeai/server_app.py +49 -1
  18. package/latticeai/services/agent_runtime.py +245 -0
  19. package/latticeai/services/search_service.py +346 -0
  20. package/package.json +6 -4
  21. package/static/account.html +9 -9
  22. package/static/activity.html +4 -4
  23. package/static/admin.html +8 -8
  24. package/static/agents.html +4 -4
  25. package/static/chat.html +10 -10
  26. package/static/css/reference/account.css +137 -1
  27. package/static/css/reference/chat.css +31 -37
  28. package/static/css/responsive.css +42 -0
  29. package/static/css/tokens.css +125 -130
  30. package/static/graph.html +9 -9
  31. package/static/manifest.json +3 -3
  32. package/static/plugins.html +4 -4
  33. package/static/scripts/account.js +4 -4
  34. package/static/scripts/chat.js +40 -8
  35. package/static/scripts/workspace.js +78 -0
  36. package/static/v3/css/lattice.base.css +128 -0
  37. package/static/v3/css/lattice.components.css +447 -0
  38. package/static/v3/css/lattice.shell.css +407 -0
  39. package/static/v3/css/lattice.tokens.css +132 -0
  40. package/static/v3/css/lattice.views.css +277 -0
  41. package/static/v3/index.html +40 -0
  42. package/static/v3/js/app.js +26 -0
  43. package/static/v3/js/core/api.js +327 -0
  44. package/static/v3/js/core/components.js +215 -0
  45. package/static/v3/js/core/dom.js +148 -0
  46. package/static/v3/js/core/fixtures.js +171 -0
  47. package/static/v3/js/core/router.js +37 -0
  48. package/static/v3/js/core/routes.js +73 -0
  49. package/static/v3/js/core/shell.js +363 -0
  50. package/static/v3/js/core/store.js +113 -0
  51. package/static/v3/js/views/admin-audit.js +185 -0
  52. package/static/v3/js/views/admin-permissions.js +178 -0
  53. package/static/v3/js/views/admin-policies.js +103 -0
  54. package/static/v3/js/views/admin-private-vpc.js +138 -0
  55. package/static/v3/js/views/admin-security.js +181 -0
  56. package/static/v3/js/views/admin-users.js +168 -0
  57. package/static/v3/js/views/agents.js +194 -0
  58. package/static/v3/js/views/chat.js +450 -0
  59. package/static/v3/js/views/files.js +180 -0
  60. package/static/v3/js/views/home.js +119 -0
  61. package/static/v3/js/views/hybrid-search.js +195 -0
  62. package/static/v3/js/views/knowledge-graph.js +238 -0
  63. package/static/v3/js/views/models.js +247 -0
  64. package/static/v3/js/views/my-computer.js +237 -0
  65. package/static/v3/js/views/pipeline.js +161 -0
  66. package/static/v3/js/views/settings.js +258 -0
  67. package/static/workflows.html +4 -4
  68. package/static/workspace.css +340 -2
  69. package/static/workspace.html +43 -24
@@ -15,6 +15,8 @@ const state = {
15
15
 
16
16
  // Skills that match common workspace needs are surfaced under "Recommended".
17
17
  const RECOMMENDED_SKILL_HINTS = ["code", "review", "doc", "test", "security", "research", "changelog", "refactor", "debug"];
18
+ const MODE_KEY = "ltcai_workspace_mode";
19
+ const LANG_KEY = "ltcai_lang";
18
20
 
19
21
  function $(id) {
20
22
  return document.getElementById(id);
@@ -51,6 +53,61 @@ function toast(message) {
51
53
  node._timer = setTimeout(() => node.classList.remove("show"), 2200);
52
54
  }
53
55
 
56
+ function adminAvailableForWorkspace(workspace) {
57
+ const storedAdmin = (() => {
58
+ try { return localStorage.getItem("ltcai_is_admin") === "true"; } catch { return false; }
59
+ })();
60
+ const role = String(workspace?.your_role || "").toLowerCase();
61
+ return storedAdmin || role === "owner" || role === "admin";
62
+ }
63
+
64
+ function currentWorkspaceMode() {
65
+ try {
66
+ const mode = localStorage.getItem(MODE_KEY);
67
+ return ["basic", "advanced", "admin"].includes(mode) ? mode : "basic";
68
+ } catch {
69
+ return "basic";
70
+ }
71
+ }
72
+
73
+ function applyWorkspaceMode(mode, { adminAvailable = false } = {}) {
74
+ if (mode === "admin" && !adminAvailable) mode = "basic";
75
+ const shell = document.querySelector(".workspace-shell");
76
+ if (shell) shell.dataset.workspaceMode = mode;
77
+ document.querySelectorAll("[data-workspace-mode]").forEach((button) => {
78
+ if (button.matches("button")) {
79
+ const active = button.dataset.workspaceMode === mode;
80
+ button.classList.toggle("active", active);
81
+ button.setAttribute("aria-selected", active ? "true" : "false");
82
+ button.disabled = button.dataset.workspaceMode === "admin" && !adminAvailable;
83
+ }
84
+ });
85
+ try { localStorage.setItem(MODE_KEY, mode); } catch {}
86
+ }
87
+
88
+ function updateWorkspaceChrome(activeWorkspace) {
89
+ const shell = document.querySelector(".workspace-shell");
90
+ const adminAvailable = adminAvailableForWorkspace(activeWorkspace);
91
+ if (shell) shell.dataset.adminAvailable = adminAvailable ? "true" : "false";
92
+ applyWorkspaceMode(currentWorkspaceMode(), { adminAvailable });
93
+ const lang = (() => {
94
+ try { return localStorage.getItem(LANG_KEY) || "en"; } catch { return "en"; }
95
+ })();
96
+ document.documentElement.lang = lang;
97
+ const langSelect = $("workspace-language");
98
+ if (langSelect) langSelect.value = lang;
99
+ }
100
+
101
+ async function logoutWorkspace() {
102
+ try { await api("/logout", { method: "POST" }); } catch (_) {}
103
+ try {
104
+ localStorage.removeItem("ltcai_user_email");
105
+ localStorage.removeItem("ltcai_user_nickname");
106
+ localStorage.removeItem("ltcai_is_admin");
107
+ } catch (_) {}
108
+ window.location.href = "/account";
109
+ }
110
+
54
111
  function renderMetrics(os) {
55
112
  const counts = os?.counts || {};
56
113
  const graph = os?.graph || {};
@@ -363,6 +420,7 @@ function renderWorkspaceRegistry(registry, edition) {
363
420
  `).join("");
364
421
  }
365
422
  const active = workspaces.find((ws) => ws.workspace_id === state.activeWorkspace);
423
+ updateWorkspaceChrome(active);
366
424
  const rolePill = $("workspace-role");
367
425
  if (rolePill) rolePill.textContent = active ? (active.your_role || "—") : "";
368
426
  if (edition) {
@@ -837,6 +895,26 @@ document.addEventListener("change", async (event) => {
837
895
  });
838
896
 
839
897
  document.addEventListener("DOMContentLoaded", () => {
898
+ document.querySelectorAll("[data-workspace-mode]").forEach((button) => {
899
+ if (!button.matches("button")) return;
900
+ button.addEventListener("click", () => {
901
+ const shell = document.querySelector(".workspace-shell");
902
+ const adminAvailable = shell?.dataset.adminAvailable === "true";
903
+ applyWorkspaceMode(button.dataset.workspaceMode, { adminAvailable });
904
+ });
905
+ });
906
+ const language = $("workspace-language");
907
+ if (language) {
908
+ language.value = (() => {
909
+ try { return localStorage.getItem(LANG_KEY) || "en"; } catch { return "en"; }
910
+ })();
911
+ language.addEventListener("change", () => {
912
+ try { localStorage.setItem(LANG_KEY, language.value); } catch (_) {}
913
+ document.documentElement.lang = language.value;
914
+ });
915
+ }
916
+ const logoutButton = $("workspace-logout");
917
+ if (logoutButton) logoutButton.addEventListener("click", () => logoutWorkspace());
840
918
  $("refresh-btn").addEventListener("click", () => refreshAll().catch((err) => toast(err.message)));
841
919
  $("snapshot-now").addEventListener("click", () => createSnapshot().catch((err) => toast(err.message)));
842
920
  $("create-snapshot").addEventListener("click", () => createSnapshot().catch((err) => toast(err.message)));
@@ -0,0 +1,128 @@
1
+ /* ============================================================================
2
+ * Lattice AI v3 — Base layer (reset + element defaults + lattice backdrop)
3
+ * Token-native: no themed hex values, everything via var(--*).
4
+ * ========================================================================== */
5
+
6
+ *, *::before, *::after { box-sizing: border-box; }
7
+
8
+ html, body { height: 100%; }
9
+
10
+ body {
11
+ margin: 0;
12
+ font-family: var(--lt3-font-sans);
13
+ font-size: var(--lt3-text-md);
14
+ line-height: var(--lt3-leading-normal);
15
+ color: var(--text);
16
+ background: var(--bg);
17
+ -webkit-font-smoothing: antialiased;
18
+ text-rendering: optimizeLegibility;
19
+ overflow: hidden; /* shell owns scroll regions */
20
+ }
21
+
22
+ /* The signature lattice backdrop — a faint structural mesh of nodes+edges.
23
+ Sits behind the whole app; reinforces the "lattice" identity without noise. */
24
+ .lt3-app::before {
25
+ content: "";
26
+ position: fixed;
27
+ inset: 0;
28
+ z-index: 0;
29
+ pointer-events: none;
30
+ background:
31
+ radial-gradient(circle at center, var(--lt3-mesh-node) 0.9px, transparent 1.1px),
32
+ linear-gradient(var(--lt3-mesh-line) 1px, transparent 1px),
33
+ linear-gradient(90deg, var(--lt3-mesh-line) 1px, transparent 1px),
34
+ var(--app-bg);
35
+ background-size:
36
+ var(--lt3-mesh-size) var(--lt3-mesh-size),
37
+ var(--lt3-mesh-size) var(--lt3-mesh-size),
38
+ var(--lt3-mesh-size) var(--lt3-mesh-size),
39
+ cover;
40
+ background-position: center;
41
+ mask-image: radial-gradient(ellipse 120% 90% at 50% -10%, #000 55%, transparent 100%);
42
+ opacity: 0.9;
43
+ }
44
+
45
+ h1, h2, h3, h4, p, figure { margin: 0; }
46
+
47
+ a { color: inherit; text-decoration: none; }
48
+
49
+ button {
50
+ font: inherit;
51
+ color: inherit;
52
+ cursor: pointer;
53
+ border: none;
54
+ background: none;
55
+ }
56
+
57
+ input, select, textarea { font: inherit; color: inherit; }
58
+
59
+ textarea { resize: vertical; }
60
+
61
+ img, svg { display: block; max-width: 100%; }
62
+
63
+ code, pre, kbd, samp { font-family: var(--lt3-font-mono); }
64
+
65
+ :root[data-lt-icons="fallback"] .ti {
66
+ display: inline-grid;
67
+ place-items: center;
68
+ min-width: 1em;
69
+ min-height: 1em;
70
+ font-family: var(--lt3-font-mono);
71
+ font-size: 0.72em;
72
+ font-style: normal;
73
+ font-weight: 800;
74
+ line-height: 1;
75
+ text-transform: uppercase;
76
+ }
77
+
78
+ :root[data-lt-icons="fallback"] .ti::before {
79
+ content: attr(data-fallback);
80
+ }
81
+
82
+ :focus-visible {
83
+ outline: 2px solid var(--focus-ring);
84
+ outline-offset: 2px;
85
+ border-radius: var(--lt3-radius-xs);
86
+ }
87
+
88
+ ::-webkit-scrollbar { width: 8px; height: 8px; }
89
+ ::-webkit-scrollbar-track { background: transparent; }
90
+ ::-webkit-scrollbar-thumb {
91
+ background: color-mix(in srgb, var(--border-strong) 60%, transparent);
92
+ border-radius: 99px;
93
+ border: 2px solid transparent;
94
+ background-clip: padding-box;
95
+ }
96
+ ::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: padding-box; }
97
+
98
+ /* Accessible visually-hidden utility */
99
+ .lt3-sr {
100
+ position: absolute !important;
101
+ width: 1px; height: 1px;
102
+ padding: 0; margin: -1px;
103
+ overflow: hidden; clip: rect(0,0,0,0);
104
+ white-space: nowrap; border: 0;
105
+ }
106
+
107
+ .lt3-skip {
108
+ position: fixed;
109
+ top: var(--lt3-space-3);
110
+ left: var(--lt3-space-3);
111
+ z-index: var(--lt3-z-toast);
112
+ padding: var(--lt3-space-2) var(--lt3-space-4);
113
+ background: var(--accent);
114
+ color: #fff;
115
+ border-radius: var(--lt3-radius-sm);
116
+ transform: translateY(-200%);
117
+ transition: transform var(--lt3-dur-2) var(--lt3-ease);
118
+ }
119
+ .lt3-skip:focus { transform: translateY(0); }
120
+
121
+ @media (prefers-reduced-motion: reduce) {
122
+ *, *::before, *::after {
123
+ animation-duration: 0.001ms !important;
124
+ animation-iteration-count: 1 !important;
125
+ transition-duration: 0.001ms !important;
126
+ scroll-behavior: auto !important;
127
+ }
128
+ }
@@ -0,0 +1,447 @@
1
+ /* ============================================================================
2
+ * Lattice AI v3 — Component primitives
3
+ * The shared vocabulary every view composes from. Token-native, theme-aware.
4
+ * ========================================================================== */
5
+
6
+ /* ── Layout primitives ──────────────────────────────────────────────────── */
7
+ .lt3-stack { display: flex; flex-direction: column; gap: var(--lt3-space-4); }
8
+ .lt3-stack-2 { display: flex; flex-direction: column; gap: var(--lt3-space-2); }
9
+ .lt3-stack-3 { display: flex; flex-direction: column; gap: var(--lt3-space-3); }
10
+ .lt3-stack-6 { display: flex; flex-direction: column; gap: var(--lt3-space-6); }
11
+ .lt3-row { display: flex; align-items: center; gap: var(--lt3-space-3); }
12
+ .lt3-row-2 { display: flex; align-items: center; gap: var(--lt3-space-2); }
13
+ .lt3-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lt3-space-2); }
14
+ .lt3-spacer { flex: 1 1 auto; }
15
+ .lt3-grid { display: grid; gap: var(--lt3-space-4); }
16
+ .lt3-grid-auto {
17
+ display: grid;
18
+ gap: var(--lt3-space-4);
19
+ grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
20
+ }
21
+ .lt3-grid-2 { display: grid; gap: var(--lt3-space-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
22
+ .lt3-grid-3 { display: grid; gap: var(--lt3-space-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
23
+
24
+ /* ── Eyebrow / labels ───────────────────────────────────────────────────── */
25
+ .lt3-eyebrow {
26
+ font-size: var(--lt3-text-2xs);
27
+ font-weight: var(--lt3-weight-semi);
28
+ letter-spacing: var(--lt3-tracking-caps);
29
+ text-transform: uppercase;
30
+ color: var(--faint);
31
+ }
32
+ .lt3-muted { color: var(--muted); }
33
+ .lt3-faint { color: var(--faint); }
34
+ .lt3-mono { font-family: var(--lt3-font-mono); font-size: 0.92em; }
35
+
36
+ /* ── Card / Panel ───────────────────────────────────────────────────────── */
37
+ .lt3-card,
38
+ .lt3-panel {
39
+ position: relative;
40
+ background: var(--surface);
41
+ border: 1px solid var(--border);
42
+ border-radius: var(--lt3-radius-lg);
43
+ box-shadow: var(--lt3-elev-1);
44
+ }
45
+ .lt3-panel { padding: var(--lt3-space-5); }
46
+ .lt3-card { padding: var(--lt3-space-4); }
47
+ .lt3-card--flat { box-shadow: none; background: var(--surface-2); }
48
+ .lt3-card--ghost { background: transparent; border-style: dashed; box-shadow: none; }
49
+ .lt3-card--interactive { transition: transform var(--lt3-dur-2) var(--lt3-ease), border-color var(--lt3-dur-2) var(--lt3-ease), box-shadow var(--lt3-dur-2) var(--lt3-ease); }
50
+ .lt3-card--interactive:hover {
51
+ transform: translateY(-2px);
52
+ border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
53
+ box-shadow: var(--lt3-elev-2);
54
+ }
55
+
56
+ .lt3-panel__head {
57
+ display: flex;
58
+ align-items: flex-start;
59
+ justify-content: space-between;
60
+ gap: var(--lt3-space-3);
61
+ margin-bottom: var(--lt3-space-4);
62
+ }
63
+ .lt3-panel__title {
64
+ font-size: var(--lt3-text-lg);
65
+ font-weight: var(--lt3-weight-semi);
66
+ letter-spacing: var(--lt3-tracking-tight);
67
+ }
68
+ .lt3-panel__sub { font-size: var(--lt3-text-sm); color: var(--muted); }
69
+
70
+ /* ── Buttons ────────────────────────────────────────────────────────────── */
71
+ .lt3-btn {
72
+ display: inline-flex;
73
+ align-items: center;
74
+ justify-content: center;
75
+ gap: var(--lt3-space-2);
76
+ height: 38px;
77
+ padding: 0 var(--lt3-space-4);
78
+ border-radius: var(--lt3-radius-sm);
79
+ border: 1px solid transparent;
80
+ font-size: var(--lt3-text-sm);
81
+ font-weight: var(--lt3-weight-semi);
82
+ white-space: nowrap;
83
+ transition: background var(--lt3-dur-2) var(--lt3-ease), border-color var(--lt3-dur-2) var(--lt3-ease), transform var(--lt3-dur-1) var(--lt3-ease), color var(--lt3-dur-2) var(--lt3-ease);
84
+ }
85
+ .lt3-btn:active { transform: translateY(1px); }
86
+ .lt3-btn[disabled] { opacity: 0.5; pointer-events: none; }
87
+ .lt3-btn .ti { font-size: 1.05rem; }
88
+
89
+ .lt3-btn--primary { background: var(--accent); color: #fff; box-shadow: var(--lt3-elev-1); }
90
+ .lt3-btn--primary:hover { background: var(--accent-deep); }
91
+ .lt3-btn--ghost { background: var(--surface-2); border-color: var(--border); color: var(--text); }
92
+ .lt3-btn--ghost:hover { border-color: var(--border-strong); background: var(--surface-3); }
93
+ .lt3-btn--subtle { background: transparent; color: var(--muted); }
94
+ .lt3-btn--subtle:hover { background: var(--surface-2); color: var(--text); }
95
+ .lt3-btn--danger { background: var(--lt3-err-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
96
+ .lt3-btn--danger:hover { background: color-mix(in srgb, var(--danger) 24%, transparent); }
97
+ .lt3-btn--sm { height: 30px; padding: 0 var(--lt3-space-3); font-size: var(--lt3-text-xs); }
98
+ .lt3-btn--lg { height: 46px; padding: 0 var(--lt3-space-5); font-size: var(--lt3-text-md); }
99
+ .lt3-btn--block { width: 100%; }
100
+
101
+ .lt3-iconbtn {
102
+ display: inline-flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ width: 38px;
106
+ height: 38px;
107
+ border-radius: var(--lt3-radius-sm);
108
+ color: var(--muted);
109
+ transition: background var(--lt3-dur-2) var(--lt3-ease), color var(--lt3-dur-2) var(--lt3-ease);
110
+ }
111
+ .lt3-iconbtn:hover { background: var(--surface-2); color: var(--text); }
112
+ .lt3-iconbtn .ti { font-size: 1.2rem; }
113
+ .lt3-iconbtn--sm { width: 30px; height: 30px; }
114
+
115
+ /* ── Inputs ─────────────────────────────────────────────────────────────── */
116
+ .lt3-input, .lt3-select, .lt3-textarea {
117
+ width: 100%;
118
+ height: 40px;
119
+ padding: 0 var(--lt3-space-4);
120
+ background: var(--input);
121
+ border: 1px solid var(--border);
122
+ border-radius: var(--lt3-radius-sm);
123
+ color: var(--text);
124
+ font-size: var(--lt3-text-sm);
125
+ transition: border-color var(--lt3-dur-2) var(--lt3-ease), box-shadow var(--lt3-dur-2) var(--lt3-ease);
126
+ }
127
+ .lt3-textarea { height: auto; min-height: 96px; padding: var(--lt3-space-3) var(--lt3-space-4); line-height: var(--lt3-leading-snug); }
128
+ .lt3-input::placeholder, .lt3-textarea::placeholder { color: var(--faint); }
129
+ .lt3-input:focus, .lt3-select:focus, .lt3-textarea:focus {
130
+ outline: none;
131
+ border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
132
+ box-shadow: 0 0 0 3px var(--accent-soft);
133
+ }
134
+ .lt3-field { display: flex; flex-direction: column; gap: var(--lt3-space-2); }
135
+ .lt3-label { font-size: var(--lt3-text-xs); font-weight: var(--lt3-weight-medium); color: var(--muted); }
136
+
137
+ .lt3-search {
138
+ display: flex;
139
+ align-items: center;
140
+ gap: var(--lt3-space-2);
141
+ height: 44px;
142
+ padding: 0 var(--lt3-space-4);
143
+ background: var(--input);
144
+ border: 1px solid var(--border);
145
+ border-radius: var(--lt3-radius-pill);
146
+ }
147
+ .lt3-search .ti { color: var(--faint); font-size: 1.15rem; }
148
+ .lt3-search input { flex: 1; height: 100%; background: none; border: none; outline: none; font-size: var(--lt3-text-md); }
149
+
150
+ /* ── Pills / badges / chips ─────────────────────────────────────────────── */
151
+ .lt3-pill {
152
+ display: inline-flex;
153
+ align-items: center;
154
+ gap: var(--lt3-space-1);
155
+ height: 24px;
156
+ padding: 0 var(--lt3-space-3);
157
+ border-radius: var(--lt3-radius-pill);
158
+ font-size: var(--lt3-text-2xs);
159
+ font-weight: var(--lt3-weight-semi);
160
+ letter-spacing: var(--lt3-tracking-wide);
161
+ background: var(--surface-2);
162
+ color: var(--muted);
163
+ border: 1px solid var(--border);
164
+ }
165
+ .lt3-pill--ok { background: var(--lt3-ok-soft); color: var(--success); border-color: transparent; }
166
+ .lt3-pill--warn { background: var(--lt3-warn-soft); color: var(--warning); border-color: transparent; }
167
+ .lt3-pill--err { background: var(--lt3-err-soft); color: var(--danger); border-color: transparent; }
168
+ .lt3-pill--info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
169
+ .lt3-pill--dot::before {
170
+ content: ""; width: 6px; height: 6px; border-radius: 99px;
171
+ background: currentColor; display: inline-block;
172
+ }
173
+
174
+ .lt3-chip {
175
+ display: inline-flex;
176
+ align-items: center;
177
+ gap: var(--lt3-space-2);
178
+ height: 30px;
179
+ padding: 0 var(--lt3-space-3);
180
+ border-radius: var(--lt3-radius-pill);
181
+ background: var(--surface-2);
182
+ border: 1px solid var(--border);
183
+ font-size: var(--lt3-text-xs);
184
+ font-weight: var(--lt3-weight-medium);
185
+ color: var(--text);
186
+ transition: border-color var(--lt3-dur-2) var(--lt3-ease), background var(--lt3-dur-2) var(--lt3-ease);
187
+ }
188
+ .lt3-chip[data-active="true"] { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); color: var(--accent); }
189
+ .lt3-chip:hover { border-color: var(--border-strong); }
190
+
191
+ .lt3-kbd {
192
+ display: inline-flex;
193
+ align-items: center;
194
+ height: 20px;
195
+ padding: 0 6px;
196
+ border-radius: 5px;
197
+ background: var(--surface-3);
198
+ border: 1px solid var(--border);
199
+ border-bottom-width: 2px;
200
+ font-family: var(--lt3-font-mono);
201
+ font-size: var(--lt3-text-2xs);
202
+ color: var(--muted);
203
+ }
204
+
205
+ /* Data-provenance tag: clearly marks placeholder vs live data */
206
+ .lt3-source {
207
+ display: inline-flex;
208
+ align-items: center;
209
+ gap: var(--lt3-space-1);
210
+ height: 20px;
211
+ padding: 0 var(--lt3-space-2);
212
+ border-radius: var(--lt3-radius-pill);
213
+ font-size: var(--lt3-text-2xs);
214
+ font-weight: var(--lt3-weight-semi);
215
+ letter-spacing: var(--lt3-tracking-wide);
216
+ text-transform: uppercase;
217
+ }
218
+ .lt3-source--placeholder { background: var(--lt3-warn-soft); color: var(--warning); }
219
+ .lt3-source--live { background: var(--lt3-ok-soft); color: var(--success); }
220
+ .lt3-source--pending { background: var(--surface-2); color: var(--faint); }
221
+
222
+ /* ── Stat tile ──────────────────────────────────────────────────────────── */
223
+ .lt3-stat {
224
+ display: flex;
225
+ flex-direction: column;
226
+ gap: var(--lt3-space-1);
227
+ padding: var(--lt3-space-4) var(--lt3-space-5);
228
+ background: var(--surface);
229
+ border: 1px solid var(--border);
230
+ border-radius: var(--lt3-radius-md);
231
+ }
232
+ .lt3-stat__label { font-size: var(--lt3-text-xs); color: var(--muted); display: flex; align-items: center; gap: var(--lt3-space-2); }
233
+ .lt3-stat__value { font-size: var(--lt3-text-2xl); font-weight: var(--lt3-weight-bold); letter-spacing: var(--lt3-tracking-tight); line-height: 1.1; }
234
+ .lt3-stat__delta { font-size: var(--lt3-text-2xs); color: var(--muted); }
235
+ .lt3-stat__delta--up { color: var(--success); }
236
+ .lt3-stat__delta--down { color: var(--danger); }
237
+
238
+ /* ── Tables ─────────────────────────────────────────────────────────────── */
239
+ .lt3-table { width: 100%; border-collapse: collapse; font-size: var(--lt3-text-sm); }
240
+ .lt3-table th {
241
+ text-align: left;
242
+ font-size: var(--lt3-text-2xs);
243
+ font-weight: var(--lt3-weight-semi);
244
+ letter-spacing: var(--lt3-tracking-caps);
245
+ text-transform: uppercase;
246
+ color: var(--faint);
247
+ padding: var(--lt3-space-3) var(--lt3-space-3);
248
+ border-bottom: 1px solid var(--border);
249
+ position: sticky; top: 0; background: var(--surface); z-index: 1;
250
+ }
251
+ .lt3-table td {
252
+ padding: var(--lt3-space-3) var(--lt3-space-3);
253
+ border-bottom: 1px solid var(--line);
254
+ vertical-align: middle;
255
+ }
256
+ .lt3-table tr:last-child td { border-bottom: none; }
257
+ .lt3-table tbody tr { transition: background var(--lt3-dur-1) var(--lt3-ease); }
258
+ .lt3-table tbody tr:hover { background: var(--surface-2); }
259
+ .lt3-table--clip { border: 1px solid var(--border); border-radius: var(--lt3-radius-md); overflow: hidden; }
260
+
261
+ /* ── List rows ──────────────────────────────────────────────────────────── */
262
+ .lt3-list { display: flex; flex-direction: column; }
263
+ .lt3-list__item {
264
+ display: flex;
265
+ align-items: center;
266
+ gap: var(--lt3-space-3);
267
+ padding: var(--lt3-space-3) var(--lt3-space-1);
268
+ border-bottom: 1px solid var(--line);
269
+ }
270
+ .lt3-list__item:last-child { border-bottom: none; }
271
+ .lt3-list__body { flex: 1; min-width: 0; }
272
+ .lt3-list__title { font-weight: var(--lt3-weight-medium); font-size: var(--lt3-text-sm); }
273
+ .lt3-list__meta { font-size: var(--lt3-text-xs); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
274
+
275
+ /* ── Tabs / segmented ───────────────────────────────────────────────────── */
276
+ .lt3-tabs { display: inline-flex; gap: var(--lt3-space-1); border-bottom: 1px solid var(--border); }
277
+ .lt3-tab {
278
+ padding: var(--lt3-space-3) var(--lt3-space-4);
279
+ font-size: var(--lt3-text-sm);
280
+ font-weight: var(--lt3-weight-medium);
281
+ color: var(--muted);
282
+ border-bottom: 2px solid transparent;
283
+ margin-bottom: -1px;
284
+ transition: color var(--lt3-dur-2) var(--lt3-ease), border-color var(--lt3-dur-2) var(--lt3-ease);
285
+ }
286
+ .lt3-tab[data-active="true"] { color: var(--text); border-bottom-color: var(--accent); }
287
+ .lt3-tab:hover { color: var(--text); }
288
+
289
+ .lt3-seg {
290
+ display: inline-flex;
291
+ padding: 3px;
292
+ gap: 2px;
293
+ background: var(--surface-2);
294
+ border: 1px solid var(--border);
295
+ border-radius: var(--lt3-radius-sm);
296
+ }
297
+ .lt3-seg button {
298
+ padding: var(--lt3-space-2) var(--lt3-space-3);
299
+ border-radius: 7px;
300
+ font-size: var(--lt3-text-xs);
301
+ font-weight: var(--lt3-weight-semi);
302
+ color: var(--muted);
303
+ transition: background var(--lt3-dur-2) var(--lt3-ease), color var(--lt3-dur-2) var(--lt3-ease);
304
+ }
305
+ .lt3-seg button[data-active="true"] { background: var(--surface); color: var(--text); box-shadow: var(--lt3-elev-1); }
306
+
307
+ /* ── Toggle switch ──────────────────────────────────────────────────────── */
308
+ .lt3-switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: none; }
309
+ .lt3-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
310
+ .lt3-switch span {
311
+ position: absolute; inset: 0;
312
+ background: var(--surface-3);
313
+ border: 1px solid var(--border);
314
+ border-radius: 99px;
315
+ transition: background var(--lt3-dur-2) var(--lt3-ease);
316
+ }
317
+ .lt3-switch span::after {
318
+ content: ""; position: absolute; top: 2px; left: 2px;
319
+ width: 18px; height: 18px; border-radius: 99px;
320
+ background: var(--surface); box-shadow: var(--lt3-elev-1);
321
+ transition: transform var(--lt3-dur-2) var(--lt3-ease);
322
+ }
323
+ .lt3-switch input:checked + span { background: var(--accent); border-color: transparent; }
324
+ .lt3-switch input:checked + span::after { transform: translateX(18px); }
325
+
326
+ /* ── Meter / progress ───────────────────────────────────────────────────── */
327
+ .lt3-meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
328
+ .lt3-meter__fill { height: 100%; border-radius: 99px; background: var(--accent); transition: width var(--lt3-dur-4) var(--lt3-ease); }
329
+ .lt3-meter__fill--vector { background: var(--lt3-pillar-vector); }
330
+ .lt3-meter__fill--graph { background: var(--lt3-pillar-graph); }
331
+ .lt3-meter__fill--hybrid { background: var(--lt3-pillar-hybrid); }
332
+ .lt3-meter__fill--ok { background: var(--success); }
333
+ .lt3-meter__fill--warn { background: var(--warning); }
334
+
335
+ /* ── Avatar ─────────────────────────────────────────────────────────────── */
336
+ .lt3-avatar {
337
+ display: inline-flex; align-items: center; justify-content: center;
338
+ width: 32px; height: 32px; flex: none;
339
+ border-radius: var(--lt3-radius-sm);
340
+ background: var(--accent-soft);
341
+ color: var(--accent);
342
+ font-size: var(--lt3-text-xs);
343
+ font-weight: var(--lt3-weight-bold);
344
+ text-transform: uppercase;
345
+ }
346
+
347
+ /* ── States: empty / loading / error ────────────────────────────────────── */
348
+ .lt3-empty {
349
+ display: flex; flex-direction: column; align-items: center; justify-content: center;
350
+ gap: var(--lt3-space-3);
351
+ padding: var(--lt3-space-8) var(--lt3-space-5);
352
+ text-align: center;
353
+ color: var(--muted);
354
+ }
355
+ .lt3-empty__icon {
356
+ display: grid; place-items: center;
357
+ width: 56px; height: 56px;
358
+ border-radius: var(--lt3-radius-lg);
359
+ background: var(--surface-2);
360
+ border: 1px solid var(--border);
361
+ color: var(--faint);
362
+ }
363
+ .lt3-empty__icon .ti { font-size: 1.6rem; }
364
+ .lt3-empty__title { font-size: var(--lt3-text-md); font-weight: var(--lt3-weight-semi); color: var(--text); }
365
+ .lt3-empty__body { font-size: var(--lt3-text-sm); max-width: 38ch; }
366
+
367
+ .lt3-skel {
368
+ border-radius: var(--lt3-radius-sm);
369
+ background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
370
+ background-size: 400% 100%;
371
+ animation: lt3-shimmer 1.4s var(--lt3-ease) infinite;
372
+ }
373
+ .lt3-skel--line { height: 12px; margin: 6px 0; }
374
+ .lt3-skel--block { height: 84px; }
375
+ @keyframes lt3-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
376
+
377
+ .lt3-spinner {
378
+ width: 18px; height: 18px;
379
+ border: 2px solid var(--border);
380
+ border-top-color: var(--accent);
381
+ border-radius: 99px;
382
+ animation: lt3-spin 0.7s linear infinite;
383
+ }
384
+ @keyframes lt3-spin { to { transform: rotate(360deg); } }
385
+
386
+ .lt3-banner {
387
+ display: flex; align-items: flex-start; gap: var(--lt3-space-3);
388
+ padding: var(--lt3-space-3) var(--lt3-space-4);
389
+ border-radius: var(--lt3-radius-md);
390
+ font-size: var(--lt3-text-sm);
391
+ border: 1px solid var(--border);
392
+ background: var(--surface-2);
393
+ }
394
+ .lt3-banner--info { background: var(--accent-soft); border-color: transparent; color: var(--text); }
395
+ .lt3-banner--warn { background: var(--lt3-warn-soft); border-color: transparent; }
396
+ .lt3-banner--err { background: var(--lt3-err-soft); border-color: transparent; }
397
+ .lt3-banner .ti { font-size: 1.15rem; margin-top: 1px; }
398
+
399
+ /* ── Toolbar ────────────────────────────────────────────────────────────── */
400
+ .lt3-toolbar {
401
+ display: flex;
402
+ align-items: center;
403
+ gap: var(--lt3-space-3);
404
+ flex-wrap: wrap;
405
+ }
406
+
407
+ /* ── Code block ─────────────────────────────────────────────────────────── */
408
+ .lt3-code {
409
+ font-family: var(--lt3-font-mono);
410
+ font-size: var(--lt3-text-xs);
411
+ background: var(--surface-2);
412
+ border: 1px solid var(--border);
413
+ border-radius: var(--lt3-radius-sm);
414
+ padding: var(--lt3-space-3) var(--lt3-space-4);
415
+ overflow: auto;
416
+ white-space: pre;
417
+ color: var(--text);
418
+ }
419
+
420
+ /* ── Divider ────────────────────────────────────────────────────────────── */
421
+ .lt3-divider { height: 1px; background: var(--border); border: none; margin: var(--lt3-space-2) 0; }
422
+
423
+ /* ── Toast ──────────────────────────────────────────────────────────────── */
424
+ .lt3-toasts {
425
+ position: fixed;
426
+ bottom: var(--lt3-space-5);
427
+ right: var(--lt3-space-5);
428
+ z-index: var(--lt3-z-toast);
429
+ display: flex; flex-direction: column; gap: var(--lt3-space-2);
430
+ pointer-events: none;
431
+ }
432
+ .lt3-toast {
433
+ pointer-events: auto;
434
+ display: flex; align-items: center; gap: var(--lt3-space-3);
435
+ min-width: 240px; max-width: 380px;
436
+ padding: var(--lt3-space-3) var(--lt3-space-4);
437
+ background: var(--surface-elevated);
438
+ border: 1px solid var(--border);
439
+ border-radius: var(--lt3-radius-md);
440
+ box-shadow: var(--lt3-elev-2);
441
+ font-size: var(--lt3-text-sm);
442
+ animation: lt3-toast-in var(--lt3-dur-3) var(--lt3-ease-out);
443
+ }
444
+ .lt3-toast--ok { border-left: 3px solid var(--success); }
445
+ .lt3-toast--err { border-left: 3px solid var(--danger); }
446
+ .lt3-toast--info { border-left: 3px solid var(--accent); }
447
+ @keyframes lt3-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }