Abddeus commited on
Commit
c2ecfc4
·
verified ·
1 Parent(s): b2cf90d

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +149 -425
index.html CHANGED
@@ -2,451 +2,175 @@
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
- <title>Orthodontic ABO Auto-Tracer</title>
 
6
  <script src="https://cdn.jsdelivr.net/npm/onnxruntime-web@1.18.0/dist/ort.min.js"></script>
 
 
 
7
  <style>
8
  :root {
9
- --bg: #121318;
10
- --panel: #1e2029;
11
- --accent: #0070f3;
12
- --text: #f0f2f5;
13
- --border: #2e3240;
14
- --normal: #00e676;
15
- --deviated: #ff5252;
 
 
 
 
 
16
  }
17
- * { box-sizing: border-box; margin: 0; padding: 0; }
18
- body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
19
-
20
- header { background: var(--panel); border-bottom: 1px solid var(--border); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; }
21
- header h1 { font-size: 18px; color: #4da6ff; display: flex; align-items: center; gap: 8px; }
22
- #model-status { font-size: 13px; padding: 4px 10px; border-radius: 12px; background: #2b2e3d; color: #ffb74d; }
23
-
24
- .main { display: flex; flex: 1; height: calc(100vh - 57px); }
25
-
26
- /* Left Toolbar */
27
- .sidebar { width: 340px; background: var(--panel); border-right: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
28
- .section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: #8892b0; margin-bottom: 6px; }
29
- .btn { background: var(--accent); color: #fff; border: none; padding: 10px 14px; border-radius: 6px; font-weight: 600; cursor: pointer; width: 100%; transition: 0.2s; }
30
- .btn:hover { background: #0056b3; }
31
- .btn:disabled { background: #3a3f52; cursor: not-allowed; opacity: 0.6; }
32
-
33
- .control-group { background: #161820; padding: 10px; border-radius: 6px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
34
- .slider-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
35
- .slider-row input[type="range"] { width: 150px; }
36
- select { background: #232634; color: var(--text); border: 1px solid var(--border); padding: 8px; border-radius: 6px; width: 100%; font-size: 13px; }
37
-
38
- /* Center Canvas Viewport */
39
- .viewport { flex: 1; background: #0a0b0e; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
40
- #canvas-container { position: relative; cursor: crosshair; }
41
- #ceph-image { display: block; max-height: 85vh; max-width: 100%; user-select: none; }
42
- #overlay-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
43
-
44
- /* Right Analysis Table */
45
- .analysis-panel { width: 440px; background: var(--panel); border-left: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
46
- table { width: 100%; border-collapse: collapse; font-size: 12px; }
47
- th { text-align: left; padding: 8px; color: #8892b0; border-bottom: 1px solid var(--border); }
48
- td { padding: 8px; border-bottom: 1px solid #232736; }
49
- .status-badge { padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
50
- .badge-normal { background: rgba(0, 230, 118, 0.15); color: var(--normal); }
51
- .badge-dev { background: rgba(255, 82, 82, 0.15); color: var(--deviated); }
52
- </style>
53
- </head>
54
- <body>
55
-
56
- <header>
57
- <h1>🦷 Orthodontic Cephalometric ABO Auto-Tracer</h1>
58
- <div id="model-status">Loading ONNX Neural Network...</div>
59
- </header>
60
-
61
- <div class="main">
62
- <!-- Left Sidebar Controls -->
63
- <div class="sidebar">
64
- <div>
65
- <div class="section-title">1. Patient Radiograph</div>
66
- <input type="file" id="file-input" accept="image/*" class="btn" style="background: #232634; font-size: 12px; padding: 8px;">
67
- </div>
68
-
69
- <button id="run-ai-btn" class="btn" disabled>⚡ Run AI Auto-Tracing</button>
70
-
71
- <div>
72
- <div class="section-title">2. Manual Landmark Adjustment</div>
73
- <div class="control-group">
74
- <label style="font-size: 12px;">Select Landmark to Move:</label>
75
- <select id="landmark-select">
76
- <option value="">None (View Only)</option>
77
- <option value="S">Sella (S)</option>
78
- <option value="N">Nasion (N)</option>
79
- <option value="Po">Porion (Po)</option>
80
- <option value="Or">Orbitale (Or)</option>
81
- <option value="A">Point A (Subspinale)</option>
82
- <option value="B">Point B (Supramentale)</option>
83
- <option value="Pog">Pogonion (Pog)</option>
84
- <option value="Me">Menton (Me)</option>
85
- <option value="Go">Gonion (Go)</option>
86
- <option value="UIT">Upper Incisor Tip (UIT)</option>
87
- <option value="UIA">Upper Incisor Apex (UIA)</option>
88
- <option value="LIT">Lower Incisor Tip (LIT)</option>
89
- <option value="LIA">Lower Incisor Apex (LIA)</option>
90
- <option value="Pn">Pronasale (Pn)</option>
91
- <option value="Ls">Labrale Superius (Ls)</option>
92
- <option value="Li">Labrale Inferius (Li)</option>
93
- <option value="Pog_soft">Soft Pogonion (Pog')</option>
94
- <option value="CAL1">📐 Set Ruler Point 1 (0 mm)</option>
95
- <option value="CAL2">📐 Set Ruler Point 2 (10 mm)</option>
96
- </select>
97
- <span style="font-size: 11px; color: #8892b0;">Select a landmark above, then click its exact position on the x-ray.</span>
98
- </div>
99
- </div>
100
-
101
- <div>
102
- <div class="section-title">3. Image Adjustments</div>
103
- <div class="control-group">
104
- <div class="slider-row">
105
- <span>Brightness</span>
106
- <input type="range" id="brightness" min="0.5" max="2.0" step="0.05" value="1.0">
107
- </div>
108
- <div class="slider-row">
109
- <span>Contrast</span>
110
- <input type="range" id="contrast" min="0.5" max="2.5" step="0.05" value="1.0">
111
- </div>
112
- <div class="slider-row">
113
- <span>Invert Film</span>
114
- <input type="checkbox" id="invert">
115
- </div>
116
- </div>
117
- </div>
118
- </div>
119
-
120
- <!-- Center Radiograph Viewport -->
121
- <div class="viewport">
122
- <div id="canvas-container">
123
- <img id="ceph-image" src="" alt="" style="display: none;">
124
- <svg id="overlay-svg"></svg>
125
- </div>
126
- </div>
127
-
128
- <!-- Right Analysis Table -->
129
- <div class="analysis-panel">
130
- <div class="section-title">Official ABO Analysis Summary</div>
131
- <table>
132
- <thead>
133
- <tr>
134
- <th>Metric</th>
135
- <th>Norm</th>
136
- <th>Measured</th>
137
- <th>Status</th>
138
- </tr>
139
- </thead>
140
- <tbody id="abo-rows">
141
- <tr><td colspan="4" style="text-align: center; color: #8892b0; padding: 20px;">Upload a ceph to view ABO metrics</td></tr>
142
- </tbody>
143
- </table>
144
- </div>
145
- </div>
146
-
147
- <script>
148
- // -------------------------------------------------------------
149
- // 1. Model & Landmark Definitions
150
- // -------------------------------------------------------------
151
- const MODEL_URL = "https://huggingface.co/MuhammadNabeelSh/cephalometry-landmarks/resolve/main/landmarks-cepha29.onnx";
152
-
153
- const LM_INDICES = {
154
- "A": 0, "ANS": 1, "B": 3, "Gn": 5, "Go": 6, "LIA": 7, "LIT": 8,
155
- "Li": 11, "Ls": 12, "Me": 13, "N": 14, "Or": 16, "Pn": 18,
156
- "Po": 19, "Pog": 20, "Pog_soft": 21, "S": 23, "UIA": 25, "UIT": 26
157
- };
158
-
159
- const ABO_NORMS = [
160
- { id: "SNA", name: "SNA Angle", norm: 82.0, sd: 2.0, unit: "°" },
161
- { id: "SNB", name: "SNB Angle", norm: 80.0, sd: 2.0, unit: "°" },
162
- { id: "ANB", name: "ANB Difference", norm: 2.0, sd: 2.0, unit: "°" },
163
- { id: "FMA", name: "FMA (FH to MP)", norm: 25.0, sd: 4.0, unit: "°" },
164
- { id: "SNMP", name: "SN to MP Angle", norm: 32.0, sd: 5.0, unit: "°" },
165
- { id: "IMPA", name: "IMPA (L1 to MP)", norm: 90.0, sd: 5.0, unit: "°" },
166
- { id: "U1SN", name: "U1 to SN Angle", norm: 102.0, sd: 5.0, unit: "°" },
167
- { id: "U1NA_deg", name: "U1 to NA Angle", norm: 22.0, sd: 4.0, unit: "°" },
168
- { id: "U1NA_mm", name: "U1 to NA (mm)", norm: 4.0, sd: 2.0, unit: "mm" },
169
- { id: "L1NB_deg", name: "L1 to NB Angle", norm: 25.0, sd: 4.0, unit: "°" },
170
- { id: "L1NB_mm", name: "L1 to NB (mm)", norm: 4.0, sd: 2.0, unit: "mm" },
171
- { id: "IIA", name: "Interincisal Angle", norm: 130.0, sd: 6.0, unit: "°" },
172
- { id: "UL_E", name: "Upper Lip to E-Line", norm: -3.0, sd: 2.0, unit: "mm" },
173
- { id: "LL_E", name: "Lower Lip to E-Line", norm: -1.0, sd: 2.0, unit: "mm" }
174
- ];
175
-
176
- let session = null;
177
- let coords = {};
178
- let pxPerMm = 10.0;
179
- let calPt1 = null;
180
-
181
- const imgElem = document.getElementById("ceph-image");
182
- const svgElem = document.getElementById("overlay-svg");
183
- const statusElem = document.getElementById("model-status");
184
- const runAiBtn = document.getElementById("run-ai-btn");
185
- const container = document.getElementById("canvas-container");
186
-
187
- // -------------------------------------------------------------
188
- // 2. Load ONNX Web Model
189
- // -------------------------------------------------------------
190
- async function initModel() {
191
- try {
192
- ort.env.wasm.numThreads = 1;
193
- session = await ort.InferenceSession.create(MODEL_URL, { executionProviders: ['wasm'] });
194
- statusElem.innerText = "● Model Ready (Free Browser Compute)";
195
- statusElem.style.color = "#00e676";
196
- if (imgElem.src) runAiBtn.disabled = false;
197
- } catch (err) {
198
- statusElem.innerText = "Error loading weights: " + err.message;
199
- statusElem.style.color = "#ff5252";
200
- }
201
- }
202
- initModel();
203
-
204
- // -------------------------------------------------------------
205
- // 3. Image Loading & Filters
206
- // -------------------------------------------------------------
207
- document.getElementById("file-input").addEventListener("change", (e) => {
208
- const file = e.target.files[0];
209
- if (!file) return;
210
- const reader = new FileReader();
211
- reader.onload = (evt) => {
212
- imgElem.onload = () => {
213
- svgElem.setAttribute("viewBox", `0 0 ${imgElem.naturalWidth} ${imgElem.naturalHeight}`);
214
- svgElem.setAttribute("width", imgElem.clientWidth);
215
- svgElem.setAttribute("height", imgElem.clientHeight);
216
- if (session) runAiBtn.disabled = false;
217
- };
218
- imgElem.src = evt.target.result;
219
- imgElem.style.display = "block";
220
- coords = {};
221
- renderAnalysis();
222
- };
223
- reader.readAsDataURL(file);
224
- });
225
-
226
- function applyFilters() {
227
- const b = document.getElementById("brightness").value;
228
- const c = document.getElementById("contrast").value;
229
- const inv = document.getElementById("invert").checked ? 1 : 0;
230
- imgElem.style.filter = `brightness(${b}) contrast(${c}) invert(${inv})`;
231
- }
232
- document.getElementById("brightness").addEventListener("input", applyFilters);
233
- document.getElementById("contrast").addEventListener("input", applyFilters);
234
- document.getElementById("invert").addEventListener("change", applyFilters);
235
-
236
- // -------------------------------------------------------------
237
- // 4. Run AI Inference (Browser Side)
238
- // -------------------------------------------------------------
239
- runAiBtn.addEventListener("click", async () => {
240
- if (!session || !imgElem.src) return;
241
- runAiBtn.disabled = true;
242
- statusElem.innerText = "Running Landmark Detection...";
243
-
244
- // Resize to 768x768 for the network
245
- const offCanvas = document.createElement("canvas");
246
- offCanvas.width = 768;
247
- offCanvas.height = 768;
248
- const ctx = offCanvas.getContext("2d");
249
- ctx.drawImage(imgElem, 0, 0, 768, 768);
250
- const imgData = ctx.getImageData(0, 0, 768, 768).data;
251
-
252
- // Preprocess: NCHW format + ImageNet Normalization
253
- const floatArr = new Float32Array(3 * 768 * 768);
254
- const mean = [0.485, 0.456, 0.406];
255
- const std = [0.229, 0.224, 0.225];
256
-
257
- for (let i = 0; i < 768 * 768; i++) {
258
- const r = imgData[i * 4] / 255.0;
259
- const g = imgData[i * 4 + 1] / 255.0;
260
- const b = imgData[i * 4 + 2] / 255.0;
261
- floatArr[i] = (r - mean[0]) / std[0];
262
- floatArr[768 * 768 + i] = (g - mean[1]) / std[1];
263
- floatArr[2 * 768 * 768 + i] = (b - mean[2]) / std[2];
264
- }
265
 
266
- const tensor = new ort.Tensor("float32", floatArr, [1, 3, 768, 768]);
267
- const results = await session.run({ [session.inputNames[0]]: tensor });
268
- const heatmaps = results[session.outputNames[0]].data; // [1, 29, 192, 192]
269
-
270
- const origW = imgElem.naturalWidth;
271
- const origH = imgElem.naturalHeight;
272
- coords = {};
273
-
274
- // Extract ArgMax Coordinates
275
- for (const [name, ch] of Object.entries(LM_INDICES)) {
276
- let maxVal = -Infinity;
277
- let maxIdx = 0;
278
- const offset = ch * 192 * 192;
279
- for (let j = 0; j < 192 * 192; j++) {
280
- if (heatmaps[offset + j] > maxVal) {
281
- maxVal = heatmaps[offset + j];
282
- maxIdx = j;
283
- }
284
  }
285
- const py = Math.floor(maxIdx / 192);
286
- const px = maxIdx % 192;
287
- coords[name] = {
288
- x: (px / 192) * origW,
289
- y: (py / 192) * origH
290
- };
291
- }
292
-
293
- statusElem.innerText = "● Tracing & Analysis Complete";
294
- runAiBtn.disabled = false;
295
- renderAnalysis();
296
- });
297
-
298
- // -------------------------------------------------------------
299
- // 5. Click to Adjust Landmark or Calibrate
300
- // -------------------------------------------------------------
301
- container.addEventListener("click", (e) => {
302
- const selectedLm = document.getElementById("landmark-select").value;
303
- if (!selectedLm || !imgElem.naturalWidth) return;
304
 
305
- const rect = imgElem.getBoundingClientRect();
306
- const scaleX = imgElem.naturalWidth / rect.width;
307
- const scaleY = imgElem.naturalHeight / rect.height;
308
- const clickX = (e.clientX - rect.left) * scaleX;
309
- const clickY = (e.clientY - rect.top) * scaleY;
310
-
311
- if (selectedLm === "CAL1") {
312
- calPt1 = { x: clickX, y: clickY };
313
- } else if (selectedLm === "CAL2") {
314
- if (calPt1) {
315
- const d = Math.hypot(clickX - calPt1.x, clickY - calPt1.y);
316
- if (d > 0) pxPerMm = d / 10.0;
317
  }
318
- } else {
319
- coords[selectedLm] = { x: clickX, y: clickY };
320
- }
321
-
322
- renderAnalysis();
323
- });
324
 
325
- // -------------------------------------------------------------
326
- // 6. Vector Geometry Engine
327
- // -------------------------------------------------------------
328
- function getAngle(p1, v, p2) {
329
- if (!p1 || !v || !p2) return null;
330
- const v1 = { x: p1.x - v.x, y: p1.y - v.y };
331
- const v2 = { x: p2.x - v.x, y: p2.y - v.y };
332
- const dot = v1.x * v2.x + v1.y * v2.y;
333
- const mag1 = Math.hypot(v1.x, v1.y);
334
- const mag2 = Math.hypot(v2.x, v2.y);
335
- return (Math.acos(Math.max(-1, Math.min(1, dot / (mag1 * mag2 + 1e-7)))) * (180 / Math.PI)).toFixed(1);
336
- }
337
 
338
- function getLineAngle(p1, p2, p3, p4) {
339
- if (!p1 || !p2 || !p3 || !p4) return null;
340
- const v1 = { x: p2.x - p1.x, y: p2.y - p1.y };
341
- const v2 = { x: p4.x - p3.x, y: p4.y - p3.y };
342
- const dot = v1.x * v2.x + v1.y * v2.y;
343
- const mag1 = Math.hypot(v1.x, v1.y);
344
- const mag2 = Math.hypot(v2.x, v2.y);
345
- let deg = (Math.acos(Math.max(-1, Math.min(1, dot / (mag1 * mag2 + 1e-7)))) * (180 / Math.PI));
346
- if (deg > 90) deg = 180 - deg;
347
- return deg.toFixed(1);
348
- }
 
 
349
 
350
- function getPerpDist(pt, l1, l2) {
351
- if (!pt || !l1 || !l2 || !pxPerMm) return null;
352
- const lineVec = { x: l2.x - l1.x, y: l2.y - l1.y };
353
- const lineLen = Math.hypot(lineVec.x, lineVec.y);
354
- if (lineLen === 0) return null;
355
- const cross = lineVec.x * (pt.y - l1.y) - lineVec.y * (pt.x - l1.x);
356
- return (cross / lineLen / pxPerMm).toFixed(1);
357
- }
358
 
359
- // -------------------------------------------------------------
360
- // 7. Render Vectors & ABO Summary
361
- // -------------------------------------------------------------
362
- function renderAnalysis() {
363
- svgElem.innerHTML = "";
364
- if (!coords.S) return;
 
365
 
366
- function drawLine(p1, p2, col, w = 3) {
367
- if (!p1 || !p2) return;
368
- const l = document.createElementNS("http://www.w3.org/2000/svg", "line");
369
- l.setAttribute("x1", p1.x); l.setAttribute("y1", p1.y);
370
- l.setAttribute("x2", p2.x); l.setAttribute("y2", p2.y);
371
- l.setAttribute("stroke", col); l.setAttribute("stroke-width", w);
372
- svgElem.appendChild(l);
373
- }
374
 
375
- // ABO Vectors
376
- drawLine(coords.S, coords.N, "#00E5FF", 4); // S-N
377
- drawLine(coords.N, coords.A, "#76FF03", 2); // N-A
378
- drawLine(coords.N, coords.B, "#76FF03", 2); // N-B
379
- drawLine(coords.Po, coords.Or, "#FFD600", 3); // FH (Po-Or)
380
- drawLine(coords.Go, coords.Me, "#FF1744", 4); // MP (Go-Me)
381
- drawLine(coords.UIT, coords.UIA, "#00E676", 3); // U1 Axis
382
- drawLine(coords.LIT, coords.LIA, "#D500F9", 3); // L1 Axis
383
- drawLine(coords.Pn, coords.Pog_soft, "#FF6D00", 2); // E-Line
 
 
 
384
 
385
- // Landmark Points
386
- for (const [name, pt] of Object.entries(coords)) {
387
- const c = document.createElementNS("http://www.w3.org/2000/svg", "circle");
388
- c.setAttribute("cx", pt.x); c.setAttribute("cy", pt.y);
389
- c.setAttribute("r", 5); c.setAttribute("fill", "#FFFF00");
390
- c.setAttribute("stroke", "#000"); c.setAttribute("stroke-width", 2);
391
- svgElem.appendChild(c);
392
 
393
- const t = document.createElementNS("http://www.w3.org/2000/svg", "text");
394
- t.setAttribute("x", pt.x + 8); t.setAttribute("y", pt.y - 4);
395
- t.setAttribute("fill", "#FFF"); t.setAttribute("font-size", "14px");
396
- t.setAttribute("font-weight", "bold");
397
- t.textContent = name;
398
- svgElem.appendChild(t);
399
- }
400
 
401
- // Calculations
402
- const sna = getAngle(coords.S, coords.N, coords.A);
403
- const snb = getAngle(coords.S, coords.N, coords.B);
404
- const anb = (sna && snb) ? (sna - snb).toFixed(1) : null;
405
- const fma = getLineAngle(coords.Po, coords.Or, coords.Go, coords.Me);
406
- const snmp = getLineAngle(coords.S, coords.N, coords.Go, coords.Me);
407
- const impa = getLineAngle(coords.LIT, coords.LIA, coords.Go, coords.Me);
408
- const u1sn = getLineAngle(coords.UIT, coords.UIA, coords.S, coords.N);
409
- const u1na_deg = getLineAngle(coords.UIT, coords.UIA, coords.N, coords.A);
410
- const u1na_mm = getPerpDist(coords.UIT, coords.N, coords.A);
411
- const l1nb_deg = getLineAngle(coords.LIT, coords.LIA, coords.N, coords.B);
412
- const l1nb_mm = getPerpDist(coords.LIT, coords.N, coords.B);
413
- const iia = getLineAngle(coords.UIT, coords.UIA, coords.LIT, coords.LIA);
414
- const ul_e = getPerpDist(coords.Ls, coords.Pn, coords.Pog_soft);
415
- const ll_e = getPerpDist(coords.Li, coords.Pn, coords.Pog_soft);
416
 
417
- const values = {
418
- SNA: sna, SNB: snb, ANB: anb, FMA: fma, SNMP: snmp, IMPA: impa,
419
- U1SN: u1sn, U1NA_deg: u1na_deg, U1NA_mm: u1na_mm, L1NB_deg: l1nb_deg,
420
- L1NB_mm: l1nb_mm, IIA: iia, UL_E: ul_e, LL_E: ll_e
421
- };
 
 
 
 
 
 
422
 
423
- const tbody = document.getElementById("abo-rows");
424
- tbody.innerHTML = "";
 
 
 
 
 
 
 
425
 
426
- ABO_NORMS.forEach(metric => {
427
- const val = values[metric.id];
428
- let statusHtml = `<span class="status-badge" style="background:#2e3240; color:#8892b0;">-</span>`;
429
- let measuredText = "-";
 
430
 
431
- if (val !== null && val !== undefined) {
432
- measuredText = `${val} ${metric.unit}`;
433
- const diff = Math.abs(val - metric.norm);
434
- const isNormal = diff <= metric.sd;
435
- statusHtml = isNormal
436
- ? `<span class="status-badge badge-normal">Normal</span>`
437
- : `<span class="status-badge badge-dev">${val > metric.norm ? 'High' : 'Low'}</span>`;
438
  }
439
 
440
- const tr = document.createElement("tr");
441
- tr.innerHTML = `
442
- <td><strong>${metric.name}</strong></td>
443
- <td>${metric.norm}${metric.unit} ± ${metric.sd}</td>
444
- <td>${measuredText}</td>
445
- <td>${statusHtml}</td>
446
- `;
447
- tbody.appendChild(tr);
448
- });
449
- }
450
- </script>
451
- </body>
452
- </html>
 
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>OrthoCeph Pro | Automated ABO Cephalometric Analysis</title>
7
  <script src="https://cdn.jsdelivr.net/npm/onnxruntime-web@1.18.0/dist/ort.min.js"></script>
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
11
  <style>
12
  :root {
13
+ --bg-dark: #0b0f19;
14
+ --surface-dark: #111827;
15
+ --surface-card: #1f293d;
16
+ --surface-border: #2e3b55;
17
+ --accent: #2563eb;
18
+ --accent-hover: #1d4ed8;
19
+ --accent-glow: rgba(37, 99, 235, 0.25);
20
+ --text-main: #f8fafc;
21
+ --text-muted: #94a3b8;
22
+ --status-green: #10b981;
23
+ --status-red: #f43f5e;
24
+ --status-amber: #f59e0b;
25
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
+ * { box-sizing: border-box; margin: 0; padding: 0; }
28
+ body {
29
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
30
+ background-color: var(--bg-dark);
31
+ color: var(--text-main);
32
+ height: 100vh;
33
+ display: flex;
34
+ flex-direction: column;
35
+ overflow: hidden;
36
+ -webkit-font-smoothing: antialiased;
 
 
 
 
 
 
 
 
37
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
+ /* Modern Top Navigation Bar */
40
+ header {
41
+ background: var(--surface-dark);
42
+ border-bottom: 1px solid var(--surface-border);
43
+ height: 64px;
44
+ padding: 0 24px;
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: space-between;
48
+ flex-shrink: 0;
49
+ z-index: 10;
 
50
  }
 
 
 
 
 
 
51
 
52
+ .brand {
53
+ display: flex;
54
+ align-items: center;
55
+ gap: 12px;
56
+ }
 
 
 
 
 
 
 
57
 
58
+ .brand-icon {
59
+ width: 36px;
60
+ height: 36px;
61
+ background: linear-gradient(135deg, #3b82f6, #1d4ed8);
62
+ border-radius: 8px;
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ font-weight: 700;
67
+ font-size: 18px;
68
+ color: white;
69
+ box-shadow: 0 0 16px var(--accent-glow);
70
+ }
71
 
72
+ .brand-title {
73
+ font-size: 16px;
74
+ font-weight: 700;
75
+ letter-spacing: -0.02em;
76
+ }
 
 
 
77
 
78
+ .brand-subtitle {
79
+ font-size: 11px;
80
+ color: var(--text-muted);
81
+ font-weight: 500;
82
+ text-transform: uppercase;
83
+ letter-spacing: 0.05em;
84
+ }
85
 
86
+ .header-actions {
87
+ display: flex;
88
+ align-items: center;
89
+ gap: 16px;
90
+ }
 
 
 
91
 
92
+ #status-badge {
93
+ display: flex;
94
+ align-items: center;
95
+ gap: 8px;
96
+ font-size: 12px;
97
+ font-weight: 500;
98
+ background: rgba(30, 41, 59, 0.8);
99
+ border: 1px solid var(--surface-border);
100
+ padding: 6px 14px;
101
+ border-radius: 20px;
102
+ color: var(--text-muted);
103
+ }
104
 
105
+ #status-badge .indicator {
106
+ width: 8px;
107
+ height: 8px;
108
+ border-radius: 50%;
109
+ background-color: var(--status-amber);
110
+ box-shadow: 0 0 8px var(--status-amber);
111
+ }
112
 
113
+ /* Main Workspace Layout */
114
+ .workspace {
115
+ display: flex;
116
+ flex: 1;
117
+ height: calc(100vh - 64px);
118
+ overflow: hidden;
119
+ }
120
 
121
+ /* Left Control Sidebar */
122
+ .sidebar {
123
+ width: 330px;
124
+ background: var(--surface-dark);
125
+ border-right: 1px solid var(--surface-border);
126
+ padding: 20px;
127
+ display: flex;
128
+ flex-direction: column;
129
+ gap: 20px;
130
+ overflow-y: auto;
131
+ flex-shrink: 0;
132
+ }
 
 
 
133
 
134
+ .section-header {
135
+ font-size: 11px;
136
+ font-weight: 700;
137
+ text-transform: uppercase;
138
+ letter-spacing: 0.08em;
139
+ color: var(--text-muted);
140
+ margin-bottom: 10px;
141
+ display: flex;
142
+ justify-content: space-between;
143
+ align-items: center;
144
+ }
145
 
146
+ .card {
147
+ background: var(--surface-card);
148
+ border: 1px solid var(--surface-border);
149
+ border-radius: 10px;
150
+ padding: 14px;
151
+ display: flex;
152
+ flex-direction: column;
153
+ gap: 10px;
154
+ }
155
 
156
+ .form-group {
157
+ display: flex;
158
+ flex-direction: column;
159
+ gap: 4px;
160
+ }
161
 
162
+ .form-group label {
163
+ font-size: 11px;
164
+ font-weight: 500;
165
+ color: var(--text-muted);
 
 
 
166
  }
167
 
168
+ .input-field {
169
+ background: #0f172a;
170
+ border: 1px solid var(--surface-border);
171
+ border-radius: 6px;
172
+ padding: 8px 12px;
173
+ color: var(--text-main);
174
+ font-size: 13px;
175
+ outline: none;
176
+ transition