Spaces:
3SCError404
/
Paused

dushyantsingh0 commited on
Commit
bd0fa52
·
1 Parent(s): dd6ee62

backend stabilization

Browse files
api/v1/auth.py CHANGED
@@ -367,6 +367,8 @@ async def logout(
367
  """
368
  from jose import jwt as jwt_lib
369
  from core.token_blocklist import blocklist_token
 
 
370
 
371
  try:
372
  payload = jwt_lib.decode(token, settings.SECRET_KEY, algorithms=[settings.ALGORITHM])
@@ -437,7 +439,6 @@ async def reset_password(
437
  ) -> Any:
438
  """Reset password using a token."""
439
  from jose import jwt, JWTError
440
- from core.config import get_settings
441
  settings = get_settings()
442
 
443
  try:
 
367
  """
368
  from jose import jwt as jwt_lib
369
  from core.token_blocklist import blocklist_token
370
+ from core.config import get_settings
371
+ settings = get_settings()
372
 
373
  try:
374
  payload = jwt_lib.decode(token, settings.SECRET_KEY, algorithms=[settings.ALGORITHM])
 
439
  ) -> Any:
440
  """Reset password using a token."""
441
  from jose import jwt, JWTError
 
442
  settings = get_settings()
443
 
444
  try:
frontend/apps/customer/src/components/Dashboard.tsx CHANGED
@@ -93,14 +93,14 @@ export const Dashboard: React.FC<DashboardProps> = ({ setActive, setSelectedTick
93
  borderRadius: 28,
94
  padding: "48px",
95
  marginBottom: 32,
96
- color: "#fff",
97
  display: "flex",
98
  flexWrap: "wrap",
99
  gap: "32px",
100
  justifyContent: "space-between",
101
  alignItems: "center",
102
- border: "1px solid rgba(255, 255, 255, 0.12)",
103
- boxShadow: "0 40px 100px -20px rgba(0, 0, 0, 0.5)",
104
  overflow: 'hidden'
105
  }}>
106
  {/* Tactical Grid Overlay */}
@@ -120,20 +120,20 @@ export const Dashboard: React.FC<DashboardProps> = ({ setActive, setSelectedTick
120
 
121
  <div style={{ flex: 1, position: 'relative', zIndex: 2 }}>
122
  <div style={{ display: 'flex', alignItems: 'center', gap: 10, marginBottom: 12 }}>
123
- <div style={{ padding: '6px', background: 'rgba(255,255,255,0.1)', borderRadius: 8 }}>
124
- <Sparkles size={14} color="#fff" strokeWidth={2.5} />
125
  </div>
126
- <span style={{ fontSize: 11, fontWeight: 800, textTransform: 'uppercase', letterSpacing: '0.2em', opacity: 0.8 }}>System Status: Optimized</span>
127
  </div>
128
 
129
  <div style={{ fontSize: 13, opacity: 0.6, marginBottom: 4, letterSpacing: '0.02em' }}>Welcome back,</div>
130
  <div style={{ fontSize: 34, fontWeight: 900, marginBottom: 12, letterSpacing: "-0.02em" }}>{user?.full_name || 'Support Hub'}</div>
131
 
132
- <div style={{ fontSize: 14, opacity: 0.7, maxWidth: 420, lineHeight: 1.6, fontWeight: 500 }}>
133
  {ticketsLoading && tickets.length === 0 ? (
134
  "Synchronizing your workspace datasets..."
135
  ) : (
136
- <>You have <strong style={{ color: '#fff' }}>{activeTickets.length} active tickets</strong> currently in progress. {activeTickets.length > 0 ? 'Leadership is monitoring resolution cycles.' : 'Your workspace is in a healthy equilibrium.'}</>
137
  )}
138
  </div>
139
 
@@ -142,7 +142,7 @@ export const Dashboard: React.FC<DashboardProps> = ({ setActive, setSelectedTick
142
  style={{
143
  marginTop: 28,
144
  padding: "14px 28px",
145
- background: "linear-gradient(135deg, var(--neural-accent-indigo) 0%, var(--neural-accent-violet) 100%)",
146
  border: "none",
147
  borderRadius: 14,
148
  color: "#fff",
@@ -152,11 +152,11 @@ export const Dashboard: React.FC<DashboardProps> = ({ setActive, setSelectedTick
152
  display: 'flex',
153
  alignItems: 'center',
154
  gap: 10,
155
- boxShadow: "0 20px 40px -10px rgba(109, 40, 217, 0.4)",
156
  transition: 'all 0.3s ease'
157
  }}
158
  >
159
- Access Workspace Status <ArrowRight size={16} strokeWidth={2.5} />
160
  </button>
161
  </div>
162
 
@@ -168,9 +168,8 @@ export const Dashboard: React.FC<DashboardProps> = ({ setActive, setSelectedTick
168
  { label: "RESOLVED SUCCESS", value: showStatsLoading ? <Skeleton width={40} height={28} /> : (stats?.by_status ? (stats.by_status.RESOLVED || 0) + (stats.by_status.CLOSED || 0) : "0"), sub: "Verified Tasks", icon: <CheckCircle size={18} /> }
169
  ].map(s => (
170
  <div key={s.label} style={{
171
- background: "rgba(2, 6, 23, 0.6)",
172
- backdropFilter: "blur(40px) saturate(200%)",
173
- border: "1px solid rgba(255, 255, 255, 0.08)",
174
  borderRadius: 20,
175
  padding: "24px",
176
  minWidth: 170,
@@ -179,16 +178,16 @@ export const Dashboard: React.FC<DashboardProps> = ({ setActive, setSelectedTick
179
  display: "flex",
180
  flexDirection: "column",
181
  justifyContent: "center",
182
- boxShadow: "0 20px 40px -10px rgba(0,0,0,0.5)",
183
  position: 'relative',
184
  zIndex: 3
185
  }}>
186
  <div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 12 }}>
187
- <div style={{ fontSize: 9, fontWeight: 900, letterSpacing: "0.15em", opacity: 0.6 }}>{s.label}</div>
188
- <div style={{ color: 'rgba(255,255,255,0.4)' }}>{s.icon}</div>
189
  </div>
190
- <div style={{ fontSize: 28, fontWeight: 900, marginBottom: 4, letterSpacing: '-0.02em' }}>{s.value}</div>
191
- <div style={{ fontSize: 10, opacity: 0.5, fontWeight: 700 }}>{s.sub}</div>
192
  </div>
193
  ))}
194
  </div>
 
93
  borderRadius: 28,
94
  padding: "48px",
95
  marginBottom: 32,
96
+ color: "var(--text-main)",
97
  display: "flex",
98
  flexWrap: "wrap",
99
  gap: "32px",
100
  justifyContent: "space-between",
101
  alignItems: "center",
102
+ border: "1px solid var(--border-subtle)",
103
+ boxShadow: "0 20px 60px -20px rgba(15, 23, 42, 0.05)",
104
  overflow: 'hidden'
105
  }}>
106
  {/* Tactical Grid Overlay */}
 
120
 
121
  <div style={{ flex: 1, position: 'relative', zIndex: 2 }}>
122
  <div style={{ display: 'flex', alignItems: 'center', gap: 10, marginBottom: 12 }}>
123
+ <div style={{ padding: '6px', background: 'var(--primary-glow)', borderRadius: 8 }}>
124
+ <Sparkles size={14} color="var(--primary)" strokeWidth={2.5} />
125
  </div>
126
+ <span style={{ fontSize: 11, fontWeight: 900, textTransform: 'uppercase', letterSpacing: '0.2em', color: 'var(--primary)', opacity: 0.8 }}>System Status: Optimized</span>
127
  </div>
128
 
129
  <div style={{ fontSize: 13, opacity: 0.6, marginBottom: 4, letterSpacing: '0.02em' }}>Welcome back,</div>
130
  <div style={{ fontSize: 34, fontWeight: 900, marginBottom: 12, letterSpacing: "-0.02em" }}>{user?.full_name || 'Support Hub'}</div>
131
 
132
+ <div style={{ fontSize: 14, color: 'var(--text-muted)', maxWidth: 420, lineHeight: 1.6, fontWeight: 500 }}>
133
  {ticketsLoading && tickets.length === 0 ? (
134
  "Synchronizing your workspace datasets..."
135
  ) : (
136
+ <>You have <strong style={{ color: 'var(--primary)' }}>{activeTickets.length} active tickets</strong> currently in progress. {activeTickets.length > 0 ? 'Leadership is monitoring resolution cycles.' : 'Your workspace is in a healthy equilibrium.'}</>
137
  )}
138
  </div>
139
 
 
142
  style={{
143
  marginTop: 28,
144
  padding: "14px 28px",
145
+ background: "var(--primary)",
146
  border: "none",
147
  borderRadius: 14,
148
  color: "#fff",
 
152
  display: 'flex',
153
  alignItems: 'center',
154
  gap: 10,
155
+ boxShadow: "0 10px 25px -5px rgba(30, 64, 175, 0.3)",
156
  transition: 'all 0.3s ease'
157
  }}
158
  >
159
+ Access Workspace Status <ArrowRight size={16} strokeWidth={3} />
160
  </button>
161
  </div>
162
 
 
168
  { label: "RESOLVED SUCCESS", value: showStatsLoading ? <Skeleton width={40} height={28} /> : (stats?.by_status ? (stats.by_status.RESOLVED || 0) + (stats.by_status.CLOSED || 0) : "0"), sub: "Verified Tasks", icon: <CheckCircle size={18} /> }
169
  ].map(s => (
170
  <div key={s.label} style={{
171
+ background: "#fff",
172
+ border: "1px solid var(--border-subtle)",
 
173
  borderRadius: 20,
174
  padding: "24px",
175
  minWidth: 170,
 
178
  display: "flex",
179
  flexDirection: "column",
180
  justifyContent: "center",
181
+ boxShadow: "0 10px 25px -5px rgba(0,0,0,0.03)",
182
  position: 'relative',
183
  zIndex: 3
184
  }}>
185
  <div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 12 }}>
186
+ <div style={{ fontSize: 9, fontWeight: 900, letterSpacing: "0.15em", color: 'var(--text-muted)' }}>{s.label}</div>
187
+ <div style={{ color: 'var(--primary)' }}>{s.icon}</div>
188
  </div>
189
+ <div style={{ fontSize: 28, fontWeight: 900, marginBottom: 4, letterSpacing: '-0.02em', color: 'var(--text-main)' }}>{s.value}</div>
190
+ <div style={{ fontSize: 10, color: 'var(--text-muted)', opacity: 0.6, fontWeight: 700 }}>{s.sub}</div>
191
  </div>
192
  ))}
193
  </div>
frontend/apps/customer/src/components/ThreadView.tsx CHANGED
@@ -50,6 +50,10 @@ export const ThreadView: React.FC<ThreadViewProps> = ({ ticket: initialTicket, o
50
  const [showConfirmEscalate, setShowConfirmEscalate] = useState(false);
51
  const [isEscalating, setIsEscalating] = useState(false);
52
 
 
 
 
 
53
  // Message Edit State
54
  const [editingMsgId, setEditingMsgId] = useState<string | null>(null);
55
  const [msgEditDraft, setMsgEditDraft] = useState("");
@@ -251,125 +255,97 @@ export const ThreadView: React.FC<ThreadViewProps> = ({ ticket: initialTicket, o
251
  <span style={{ fontSize: 10, color: COLORS.brand, fontWeight: 800, fontFamily: "monospace", background: "rgba(99, 102, 241, 0.1)", padding: "2px 8px", borderRadius: 4, letterSpacing: '0.05em' }}>{ticket.id.slice(0, 8)}</span>
252
  <StatusBadge status={ticket.status} />
253
  <PriorityBadge priority={ticket.priority} />
254
- {ticket.is_escalated && (
255
- <span style={{
256
- background: "rgba(239, 68, 68, 0.1)",
257
- color: "#EF4444",
258
- fontSize: 10,
259
- fontWeight: 800,
260
- padding: "2px 8px",
261
- borderRadius: 4,
262
- border: "1px solid rgba(239, 68, 68, 0.2)",
263
- animation: "pulse 2s infinite"
264
- }}>
265
- 🚨 ESCALATED
266
- </span>
267
- )}
268
  </div>
269
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  </div>
271
 
272
- <div style={{ display: "flex", flex: 1, overflow: "hidden", flexWrap: "wrap" }}>
273
- {/* Left Pane: Ticket Context (65%) */}
274
- <div style={{ flex: "1.8 1 600px", overflowY: "auto", padding: "32px", borderRight: `1px solid ${COLORS.border}`, background: COLORS.bg }}>
 
 
 
 
 
 
275
 
276
  {/* AI Assessment Card */}
277
  {ticket.summary && (
278
  <div style={{
279
- background: "rgba(99, 102, 241, 0.03)",
280
- borderRadius: 16,
281
- border: `1px solid ${COLORS.border}`,
282
- padding: "24px",
283
- marginBottom: "32px",
284
- boxShadow: "0 4px 20px rgba(0, 0, 0, 0.2)",
285
- backdropFilter: "blur(12px)"
 
286
  }}>
287
- <div style={{ display: "flex", alignItems: "center", gap: 10, marginBottom: 12 }}>
288
- <span style={{ fontSize: 20 }}>🪄</span>
289
- <h3 style={{ fontSize: 11, fontWeight: 900, margin: 0, color: COLORS.brand, textTransform: "uppercase", letterSpacing: "0.15em" }}>AI Intelligence Summary</h3>
 
290
  </div>
291
- <p style={{ fontSize: 15, color: COLORS.text, lineHeight: 1.7, margin: 0, fontWeight: 500, fontStyle: "italic" }}>
292
  {ticket.summary}
293
  </p>
294
  </div>
295
  )}
 
296
  {/* Ticket Insights Grid */}
297
- <div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(180px, 1fr))", gap: 20, marginBottom: 32 }}>
298
- <div style={{ padding: 16, border: `1px solid ${COLORS.border}`, borderRadius: 12, background: COLORS.card }}>
299
- <div style={{ fontSize: 9, fontWeight: 900, color: COLORS.muted, textTransform: "uppercase", marginBottom: 6, letterSpacing: '0.1em' }}>Priority Detail</div>
300
- <div style={{ display: "flex", alignItems: "center", gap: 8 }}>
301
- <span style={{
302
  width: 10, height: 10, borderRadius: "50%",
303
- background: ticket.priority === "P0" ? COLORS.error : ticket.priority === "P1" ? COLORS.warning : COLORS.brand,
304
- boxShadow: `0 0 10px ${ticket.priority === "P0" ? COLORS.error : ticket.priority === "P1" ? COLORS.warning : COLORS.brand}44`
305
  }} />
306
- <div style={{ fontSize: 13, fontWeight: 700, color: COLORS.text }}>{ticket.priority} · {ticket.priority === 'P0' ? 'Critical Intelligence' : 'Standard Queue'}</div>
307
  </div>
308
  </div>
309
- <div style={{ padding: 16, border: `1px solid ${COLORS.border}`, borderRadius: 12, background: COLORS.card }}>
310
- <div style={{ fontSize: 9, fontWeight: 900, color: COLORS.muted, textTransform: "uppercase", marginBottom: 6, letterSpacing: '0.1em' }}>Assigned Agent</div>
311
  <div style={{ display: "flex", alignItems: "center", gap: 10 }}>
312
- <div style={{ width: 28, height: 28, borderRadius: 8, background: "rgba(255,255,255,0.05)", border: `1px solid ${COLORS.border}`, display: "flex", alignItems: "center", justifyContent: "center", fontSize: 10, fontWeight: 900, color: COLORS.brand }}>{ticket.assigned_name ? ticket.assigned_name[0] : "?"}</div>
313
- <div style={{ fontSize: 13, fontWeight: 700, color: COLORS.text }}>{ticket.assigned_name || "Nexus Tactical Agent"}</div>
314
  </div>
315
  </div>
316
- <div style={{ padding: 16, border: `1px solid ${COLORS.border}`, borderRadius: 12, background: COLORS.card }}>
317
- <div style={{ fontSize: 9, fontWeight: 900, color: COLORS.muted, textTransform: "uppercase", marginBottom: 6, letterSpacing: '0.1em' }}>Target Milestone</div>
318
- <div style={{ fontSize: 13, fontWeight: 700, color: COLORS.text }}>{formatETA(ticket.expected_resolution_at)}</div>
319
- </div>
320
- <div style={{ padding: 16, border: `1px solid ${COLORS.border}`, borderRadius: 12, background: COLORS.card }}>
321
- <div style={{ fontSize: 9, fontWeight: 900, color: COLORS.muted, textTransform: "uppercase", marginBottom: 6, letterSpacing: '0.1em' }}>System Complexity</div>
322
- <div style={{ display: "flex", alignItems: "center", gap: 8 }}>
323
- <span style={{
324
- width: 10, height: 10, borderRadius: "50%",
325
- background: ticket.estimated_effort_hours?.complexity === "high" ? COLORS.error : ticket.estimated_effort_hours?.complexity === "medium" ? COLORS.warning : COLORS.success
326
- }} />
327
- <div style={{ fontSize: 13, fontWeight: 700, color: COLORS.text, textTransform: "capitalize" }}>{ticket.estimated_effort_hours?.complexity || "Calculated Low"}</div>
328
- </div>
329
  </div>
330
  </div>
331
 
332
- {ticket.duplicate_of_id && (
333
- <div style={{
334
- marginBottom: 32,
335
- padding: "24px",
336
- background: "rgba(99, 102, 241, 0.05)",
337
- borderRadius: 16,
338
- border: `1px solid ${COLORS.brand}`,
339
- display: "flex",
340
- alignItems: "center",
341
- justifyContent: "space-between",
342
- gap: 16,
343
- boxShadow: "0 4px 12px rgba(0,0,0,0.2)"
344
- }}>
345
- <div style={{ display: "flex", alignItems: "center", gap: 16 }}>
346
- <div style={{ width: 44, height: 44, borderRadius: 12, background: COLORS.brand, display: "flex", alignItems: "center", justifyContent: "center", fontSize: 20, boxShadow: "0 4px 8px rgba(0,0,0,0.2)" }}>📎</div>
347
- <div style={{ flex: 1 }}>
348
- <div style={{ fontSize: 13, fontWeight: 800, color: COLORS.brand, textTransform: "uppercase", letterSpacing: "0.05em", marginBottom: 4 }}>Duplicate Ticket Identified</div>
349
- <p style={{ fontSize: 14, color: COLORS.text, margin: 0, lineHeight: 1.5 }}>
350
- This case is a duplicate of <strong>{ticket.duplicate_of_title || ticket.duplicate_of_id}</strong>.
351
- </p>
352
- </div>
353
- </div>
354
- <button
355
- onClick={() => onNavigate && onNavigate({ id: ticket.duplicate_of_id })}
356
- style={{ background: COLORS.brand, color: "#fff", border: "none", borderRadius: 8, padding: "10px 16px", fontSize: 12, fontWeight: 700, cursor: "pointer", whiteSpace: "nowrap" }}
357
- >
358
- View Original Case →
359
- </button>
360
- </div>
361
- )}
362
-
363
  {/* Description Block */}
364
- <div style={{ background: COLORS.card, borderRadius: 16, padding: "24px", border: `1px solid ${COLORS.border}`, marginBottom: 32, boxShadow: "0 4px 12px rgba(0,0,0,0.1)" }}>
365
- <div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 20 }}>
366
- <h3 style={{ fontSize: 13, fontWeight: 900, margin: 0, color: COLORS.muted, textTransform: "uppercase", letterSpacing: '0.1em' }}>Investigation Dossier</h3>
367
  {ticket.status !== 'closed' && (
368
  <button
369
  onClick={() => setIsEditingDesc(!isEditingDesc)}
370
- style={{ background: "rgba(99, 102, 241, 0.1)", border: "none", color: COLORS.brand, fontSize: 11, fontWeight: 800, cursor: "pointer", padding: "6px 14px", borderRadius: 8, textTransform: "uppercase", letterSpacing: '0.05em' }}
371
  >
372
- {isEditingDesc ? "Abort" : "Update Dossier"}
373
  </button>
374
  )}
375
  </div>
@@ -380,36 +356,21 @@ export const ThreadView: React.FC<ThreadViewProps> = ({ ticket: initialTicket, o
380
  value={descDraft}
381
  onChange={e => setDescDraft(e.target.value)}
382
  onPaste={e => handlePaste(e, true)}
383
- placeholder="Describe your issue..."
384
- style={{ width: "100%", minHeight: 180, padding: 16, borderRadius: 12, border: `2px solid ${COLORS.brand}`, fontSize: 14, outline: "none", resize: "vertical", fontFamily: "inherit", background: "rgba(255,255,255,0.03)", color: COLORS.text }}
385
  />
386
- <div style={{ marginTop: 12, display: "flex", justifyContent: "space-between", alignItems: "center" }}>
387
  <button
388
  onClick={handleUpdateDescription}
389
  disabled={savingDesc || isUploading}
390
- style={{ padding: "8px 20px", background: COLORS.brand, color: "#fff", border: "none", borderRadius: 8, fontSize: 13, fontWeight: 600, cursor: "pointer" }}
391
  >
392
- {savingDesc ? "Updating..." : "Save Description"}
393
  </button>
394
- <div style={{ display: 'flex', gap: 12, alignItems: 'center' }}>
395
- {isUploading && <span style={{ fontSize: 12, color: COLORS.brand }}>Uploading file...</span>}
396
- <button
397
- onClick={() => descFileInputRef.current?.click()}
398
- style={{ background: "none", border: "none", color: COLORS.brand, fontSize: 13, fontWeight: 600, cursor: "pointer" }}
399
- >
400
- 📎 Attach
401
- </button>
402
- <input
403
- type="file"
404
- ref={descFileInputRef}
405
- onChange={(e) => e.target.files?.[0] && handleUpload(e.target.files[0], true)}
406
- style={{ display: "none" }}
407
- />
408
- </div>
409
  </div>
410
  </div>
411
  ) : (
412
- <div style={{ fontSize: 15, color: COLORS.gray700, lineHeight: 1.8, overflowWrap: "anywhere", wordBreak: "break-word" }}>
413
  <NexusMarkdown content={ticket.description} />
414
  </div>
415
  )}
@@ -417,168 +378,140 @@ export const ThreadView: React.FC<ThreadViewProps> = ({ ticket: initialTicket, o
417
 
418
  {ticket.is_escalated && (
419
  <div style={{
420
- marginBottom: 32,
421
- padding: "24px",
422
- background: "rgba(239, 68, 68, 0.05)",
423
- borderRadius: 16,
424
- border: "1px solid rgba(239, 68, 68, 0.2)",
425
  display: "flex",
426
  alignItems: "center",
427
- gap: 16,
428
- boxShadow: "0 4px 12px rgba(0,0,0,0.1)"
429
  }}>
430
- <div style={{ width: 44, height: 44, borderRadius: 12, background: "#EF4444", display: "flex", alignItems: "center", justifyContent: "center", fontSize: 20, boxShadow: "0 4px 8px rgba(239, 68, 68, 0.2)" }}>🚨</div>
431
  <div style={{ flex: 1 }}>
432
- <div style={{ fontSize: 13, fontWeight: 800, color: "#EF4444", textTransform: "uppercase", letterSpacing: "0.05em", marginBottom: 4 }}>Urgent Escalation Active</div>
433
- <p style={{ fontSize: 14, color: COLORS.text, margin: 0, lineHeight: 1.5 }}>
434
- This ticket has been escalated to <strong>{ticket.escalated_to_name || "Support Lead"}</strong>.
435
- <span style={{ display: "block", marginTop: 4, fontWeight: 600 }}>Resolution is prioritized by workspace leads.</span>
436
  </p>
437
  </div>
438
  </div>
439
  )}
440
 
441
  {!ticket.is_escalated && !['RESOLVED', 'CLOSED'].includes((ticket.status || '').toUpperCase()) && (
442
- <div style={{ marginBottom: 32, padding: 20, background: "rgba(239,68,68,0.05)", borderRadius: 16, border: `1px solid ${showConfirmEscalate ? "#EF4444" : "rgba(239,68,68,0.1)"}`, display: "flex", justifyContent: "space-between", alignItems: "center", transition: "all 0.2s" }}>
 
 
 
 
 
 
 
 
 
 
443
  <div style={{ flex: 1 }}>
444
- <h4 style={{ fontSize: 14, fontWeight: 800, color: "#EF4444", margin: "0 0 4px 0", textTransform: 'uppercase', letterSpacing: '0.05em' }}>
445
- {showConfirmEscalate ? "⚠️ Confirm Manual Escalation" : "Need faster resolution?"}
446
  </h4>
447
- <p style={{ fontSize: 12, color: COLORS.muted, margin: 0 }}>
448
  {showConfirmEscalate
449
- ? "This action is irreversible. All support leads will be notified immediately."
450
- : "Escalating this ticket will alert support leads and set priority to P0."}
451
  </p>
452
  </div>
453
 
454
- <div style={{ display: "flex", gap: 10 }}>
455
  {showConfirmEscalate ? (
456
  <>
457
- <button
458
- onClick={() => setShowConfirmEscalate(false)}
459
- disabled={isEscalating}
460
- style={{ background: "rgba(255,255,255,0.05)", color: COLORS.text, border: `1px solid ${COLORS.border}`, borderRadius: 8, padding: "10px 16px", fontSize: 13, fontWeight: 600, cursor: "pointer" }}
461
- >
462
- Cancel
463
- </button>
464
- <button
465
- onClick={handleEscalate}
466
- disabled={isEscalating}
467
- style={{ background: "#EF4444", color: "#fff", border: "none", borderRadius: 8, padding: "10px 20px", fontSize: 13, fontWeight: 800, cursor: isEscalating ? "default" : "pointer", boxShadow: "0 4px 12px rgba(239, 68, 68, 0.3)", textTransform: 'uppercase' }}
468
- >
469
- {isEscalating ? "Escalating..." : "Yes, Escalate Now"}
470
- </button>
471
  </>
472
  ) : (
473
- <button
474
- onClick={() => setShowConfirmEscalate(true)}
475
- style={{ background: "#E11D48", color: "#fff", border: "none", borderRadius: 8, padding: "10px 20px", fontSize: 13, fontWeight: 800, cursor: "pointer", boxShadow: "0 4px 12px rgba(225, 29, 72, 0.3)", textTransform: 'uppercase' }}
476
- >
477
- Escalate Issue
478
- </button>
479
  )}
480
  </div>
481
  </div>
482
  )}
483
 
484
- {/* Your Related Cases (Semantic Proximity) */}
485
- {ticket.ai_metadata?.customer_proximity && ticket.ai_metadata.customer_proximity.length > 0 && (
486
- <div style={{ marginBottom: 32 }}>
487
- <h3 style={{ fontSize: 14, fontWeight: 700, marginBottom: 16, color: COLORS.gray900, display: "flex", alignItems: "center", gap: 8 }}>
488
- 🔍 Your Related Cases
489
- </h3>
490
- <div style={{ display: "flex", flexDirection: "column", gap: 10 }}>
491
- {ticket.ai_metadata.customer_proximity.map((sim: any) => (
492
- <div
493
- key={sim.id}
494
- onClick={() => onNavigate && onNavigate({ id: sim.id })}
495
- style={{ padding: "12px 16px", background: "#fff", border: `1px solid ${COLORS.gray200}`, borderRadius: 10, cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", transition: "all 0.2s" }}
496
- onMouseEnter={e => (e.currentTarget.style.borderColor = COLORS.brand)}
497
- onMouseLeave={e => (e.currentTarget.style.borderColor = COLORS.gray200)}
498
- >
499
- <span style={{ fontSize: 13, fontWeight: 500, color: COLORS.gray700 }}>{sim.title}</span>
500
- <span style={{ fontSize: 11, color: COLORS.brand, fontWeight: 600 }}>{(sim.similarity * 100).toFixed(0)}% Similar →</span>
501
- </div>
502
- ))}
503
- </div>
504
- </div>
505
- )}
506
-
507
- {/* Related Help Articles */}
508
- {ticket.similar_articles && ticket.similar_articles.length > 0 && (
509
- <div style={{ marginBottom: 32 }}>
510
- <h3 style={{ fontSize: 14, fontWeight: 700, marginBottom: 16, color: COLORS.gray900, display: "flex", alignItems: "center", gap: 8 }}>
511
- 📚 Related Help Articles
512
- </h3>
513
- <div style={{ display: "flex", flexDirection: "column", gap: 10 }}>
514
- {ticket.similar_articles.map((art: any) => (
515
- <a
516
- key={art.id}
517
- href={`/kb/${art.id}`}
518
- target="_blank"
519
- rel="noreferrer"
520
- style={{ padding: "12px 16px", background: "#fff", border: `1px solid ${COLORS.gray200}`, borderRadius: 10, textDecoration: "none", display: "flex", justifyContent: "space-between", alignItems: "center", transition: "all 0.2s" }}
521
- onMouseEnter={e => e.currentTarget.style.borderColor = COLORS.brand}
522
- onMouseLeave={e => e.currentTarget.style.borderColor = COLORS.gray200}
523
- >
524
- <span style={{ fontSize: 13, fontWeight: 500, color: COLORS.gray700 }}>{art.title}</span>
525
- <span style={{ fontSize: 12, color: COLORS.brand }}>Read Article →</span>
526
- </a>
527
- ))}
528
- </div>
529
- </div>
530
- )}
531
 
532
  {/* Resolution Details Block */}
533
  {(ticket.status?.toUpperCase() === 'RESOLVED' || ticket.status?.toUpperCase() === 'CLOSED') && (
534
  <div style={{
535
  background: "rgba(16, 185, 129, 0.05)",
536
- borderRadius: 16,
537
- padding: "24px",
538
- border: `1px solid ${COLORS.success}`,
539
- marginBottom: "32px",
540
- boxShadow: "0 4px 12px rgba(0,0,0,0.1)"
541
  }}>
542
- <div style={{ display: "flex", justifyContent: "space-between", alignItems: "flex-start", marginBottom: 16 }}>
543
  <div>
544
- <h3 style={{ fontSize: 13, fontWeight: 800, margin: "0 0 4px 0", color: COLORS.success, textTransform: "uppercase", letterSpacing: "0.1em" }}>✅ Official Resolution Details</h3>
545
- <div style={{ fontSize: 12, color: COLORS.muted, opacity: 0.8 }}>
546
- Resolved by <strong>{ticket.resolved_by_name || "Nexus Agent"}</strong> • {formatETA(ticket.resolved_at)}
547
  </div>
548
  </div>
549
- <div style={{ background: "rgba(16, 185, 129, 0.1)", color: COLORS.success, padding: "4px 12px", borderRadius: "100px", fontSize: 11, fontWeight: 800 }}>FINAL OUTCOME</div>
550
  </div>
551
 
552
  <div style={{
553
  fontSize: 15,
554
- color: COLORS.text,
555
- lineHeight: 1.7,
556
- background: "rgba(255,255,255,0.03)",
557
- padding: "20px",
558
- borderRadius: 12,
559
- border: `1px solid ${COLORS.border}`,
560
- overflowWrap: "anywhere",
561
- wordBreak: "break-word"
562
  }}>
563
- <NexusMarkdown content={ticket.resolution_text || "No resolution text provided."} />
564
  </div>
565
 
566
  {/* Feedback Section */}
567
- <div style={{ marginTop: 20, paddingTop: 20, borderTop: `1px dashed ${COLORS.border}` }}>
568
  {ticket.rating ? (
569
- <div style={{ display: "flex", alignItems: "center", gap: 10 }}>
570
- <div style={{ fontSize: 13, fontWeight: 700, color: COLORS.success }}>Your Rating:</div>
571
- <div style={{ display: "flex", gap: 2 }}>
572
  {[1, 2, 3, 4, 5].map(star => (
573
- <span key={star} style={{ fontSize: 18, color: star <= ticket.rating ? "var(--warning)" : "rgba(255,255,255,0.1)" }}>★</span>
574
  ))}
575
  </div>
576
  </div>
577
  ) : (
578
  <div>
579
- <div style={{ fontSize: 13, fontWeight: 700, color: COLORS.success, marginBottom: 12 }}>How was your experience?</div>
580
- <div style={{ display: "flex", alignItems: "center", gap: 16, flexWrap: "wrap" }}>
581
- <div style={{ display: "flex", gap: 4 }}>
582
  {[1, 2, 3, 4, 5].map(star => (
583
  <button
584
  key={star}
@@ -586,8 +519,8 @@ export const ThreadView: React.FC<ThreadViewProps> = ({ ticket: initialTicket, o
586
  onMouseLeave={() => setHoverRating(null)}
587
  onClick={() => setRatingDraft(star)}
588
  style={{
589
- background: "none", border: "none", padding: 0, cursor: "pointer", fontSize: 24,
590
- color: star <= (hoverRating || ratingDraft || 0) ? "var(--warning)" : "rgba(255,255,255,0.1)",
591
  transition: "transform 0.1s"
592
  }}
593
  >
@@ -596,21 +529,21 @@ export const ThreadView: React.FC<ThreadViewProps> = ({ ticket: initialTicket, o
596
  ))}
597
  </div>
598
  <input
599
- placeholder="Add an optional comment..."
600
  value={commentDraft}
601
  onChange={(e) => setCommentDraft(e.target.value)}
602
- style={{ flex: 1, minWidth: 200, padding: "8px 12px", borderRadius: 8, border: `1px solid ${COLORS.border}`, fontSize: 13, background: "rgba(255,255,255,0.03)", color: COLORS.text }}
603
  />
604
  <button
605
  onClick={handleSubmitFeedback}
606
  disabled={!ratingDraft || isSubmittingFeedback}
607
  style={{
608
- background: ratingDraft ? COLORS.success : "rgba(255,255,255,0.1)",
609
- color: "#fff", border: "none", borderRadius: 8, padding: "8px 16px", fontSize: 13, fontWeight: 800,
610
- cursor: ratingDraft ? "pointer" : "default", textTransform: 'uppercase'
611
  }}
612
  >
613
- {isSubmittingFeedback ? "Saving..." : "Submit Feedback"}
614
  </button>
615
  </div>
616
  </div>
@@ -620,147 +553,102 @@ export const ThreadView: React.FC<ThreadViewProps> = ({ ticket: initialTicket, o
620
  )}
621
  </div>
622
 
623
- {/* Right Pane: Activity Feed (35%) */}
624
- <div style={{ flex: "1 1 400px", display: "flex", flexDirection: "column", background: "rgba(255,255,255,0.01)", borderLeft: `1px solid ${COLORS.border}` }}>
625
- <div style={{ flex: 1, overflowY: "auto", padding: "24px" }}>
626
- <div style={{ fontSize: 10, fontWeight: 900, color: COLORS.muted, textTransform: "uppercase", letterSpacing: "0.15em", marginBottom: 24, textAlign: "center", opacity: 0.6 }}>Engagement Protocol Logs</div>
627
-
628
- {loading ? (
629
- <div style={{ textAlign: "center", color: COLORS.gray400, marginTop: 40 }}>Loading thread...</div>
630
- ) : messages.map((msg: any) => {
631
- const isMe = msg.sender_role?.toLowerCase() === 'customer' || !msg.sender_role;
632
- const isAI = msg.sender_role === "nexus_ai";
633
-
634
- return (
635
- <div key={msg.id} style={{ marginBottom: 24, display: "flex", flexDirection: isMe ? "row-reverse" : "row", gap: 12 }}>
636
- <div style={{
637
- width: 36, height: 36, borderRadius: "50%",
638
- background: isMe ? COLORS.brand : isAI ? "rgba(139, 92, 246, 0.2)" : "rgba(245, 158, 11, 0.2)",
639
- flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center",
640
- fontSize: 11, fontWeight: 800, color: isMe ? "#fff" : isAI ? "#C4B5FD" : "#FDE68A",
641
- boxShadow: "0 2px 4px rgba(0,0,0,0.2)"
642
- }}>
643
- {isMe ? "YOU" : isAI ? "AI" : "AG"}
644
- </div>
645
-
646
- <div style={{ maxWidth: "80%", display: "flex", flexDirection: "column", alignItems: isMe ? "flex-end" : "flex-start" }}>
647
- <div style={{ display: "flex", alignItems: "center", gap: 8, marginBottom: 4, flexDirection: isMe ? "row-reverse" : "row" }}>
648
- <span style={{ fontSize: 11, fontWeight: 700, color: COLORS.gray600 }}>{isMe ? "You" : isAI ? "Nexus AI" : msg.sender_name}</span>
649
- <span style={{ fontSize: 10, color: COLORS.gray400 }}>{new Date(msg.created_at).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}</span>
650
-
651
- {isMe && !isAI && (
652
- <div style={{ display: "flex", gap: 6 }}>
653
- <button onClick={() => startEditMessage(msg)} style={{ background: "none", border: "none", fontSize: 10, color: COLORS.brand, cursor: "pointer", padding: 0 }}>Edit</button>
654
- <button onClick={() => handleDeleteMessage(msg.id)} style={{ background: "none", border: "none", fontSize: 10, color: "#EF4444", cursor: "pointer", padding: 0 }}>Delete</button>
655
- </div>
656
- )}
657
- </div>
658
 
659
- {editingMsgId === msg.id ? (
660
- <div style={{ width: "100%" }}>
661
- <textarea
662
- value={msgEditDraft}
663
- onChange={e => setMsgEditDraft(e.target.value)}
664
- style={{ width: "100%", padding: 10, borderRadius: 8, border: `1px solid ${COLORS.brand}`, fontSize: 13 }}
665
- />
666
- <div style={{ display: "flex", gap: 6, marginTop: 4 }}>
667
- <button onClick={() => handleUpdateMessage(msg.id)} style={{ padding: "4px 10px", background: COLORS.brand, color: "#fff", border: "none", borderRadius: 4, fontSize: 11 }}>Update</button>
668
- <button onClick={() => setEditingMsgId(null)} style={{ padding: "4px 10px", background: COLORS.gray200, border: "none", borderRadius: 4, fontSize: 11 }}>Cancel</button>
 
 
 
 
 
 
 
 
 
669
  </div>
670
  </div>
671
- ) : (
672
- <div style={{
673
- background: isMe ? COLORS.brand : COLORS.card,
674
- color: isMe ? "#fff" : COLORS.text,
675
- padding: "12px 18px",
676
- borderRadius: isMe ? "18px 2px 18px 18px" : "2px 18px 18px 18px",
677
- fontSize: 14,
678
- lineHeight: 1.6,
679
- boxShadow: isMe ? "0 4px 12px rgba(0,0,0,0.2)" : "0 1px 3px rgba(0,0,0,0.3)",
680
- border: isMe ? "none" : `1px solid ${COLORS.border}`,
681
- overflowWrap: "anywhere",
682
- wordBreak: "break-word"
683
- }}>
684
- <NexusMarkdown content={msg.content} isMe={isMe} />
685
- </div>
686
- )}
687
- </div>
688
  </div>
689
- );
690
- })}
691
- <div ref={bottomRef} />
692
- </div>
693
 
694
- {/* Fixed Reply Console */}
695
- <div style={{ padding: "20px", background: "#fff", borderTop: `1px solid ${COLORS.gray200}`, position: "relative" }}>
696
-
697
- {/* Floating Intelligence Notice */}
698
- {ticket.assigned_name && (
699
- <div style={{
700
- position: "absolute",
701
- top: -36,
702
- left: 20,
703
- right: 20,
704
- background: "rgba(30, 41, 59, 0.95)",
705
- backdropFilter: "blur(8px)",
706
- border: `1px solid ${COLORS.border}`,
707
- borderRadius: "8px 8px 0 0",
708
- padding: "6px 16px",
709
- display: "flex",
710
- alignItems: "center",
711
- gap: 8,
712
- zIndex: 5,
713
- boxShadow: "0 -4px 12px rgba(0, 0, 0, 0.2)"
714
- }}>
715
- <span style={{ fontSize: 12, animation: "bounce 2s infinite" }}>🧬</span>
716
- <span style={{ fontSize: 11, fontWeight: 700, color: "var(--warning)", letterSpacing: "0.02em" }}>
717
- {ticket.assigned_name} will reply asap. Please wait!
718
- </span>
719
- <div style={{
720
- flex: 1,
721
- height: 2,
722
- background: "linear-gradient(90deg, transparent 0%, var(--warning) 50%, transparent 100%)",
723
- backgroundSize: "200% auto",
724
- animation: "branding-shimmer 3s infinite linear",
725
- borderRadius: 1,
726
- opacity: 0.6
727
- }} />
728
  </div>
729
  )}
730
-
731
- <div style={{ position: "relative" }}>
732
- <textarea
733
- value={newMessage}
734
- onChange={e => setNewMessage(e.target.value)}
735
- onPaste={e => handlePaste(e, false)}
736
- style={{ width: "100%", minHeight: 100, padding: "16px", borderRadius: 12, border: `1px solid ${COLORS.gray200}`, fontSize: 13, outline: "none", resize: "none", background: COLORS.gray50, fontFamily: "inherit" }}
737
- />
738
- <div style={{ position: "absolute", right: 12, bottom: 12, display: 'flex', gap: 8, alignItems: 'center' }}>
739
- <button
740
- onClick={() => fileInputRef.current?.click()}
741
- disabled={isUploading}
742
- style={{ background: "none", border: "none", cursor: "pointer", fontSize: 18, color: COLORS.gray400, padding: "4px" }}
743
- title="Attach file"
744
- >
745
- 📎
746
- </button>
747
- <input
748
- type="file"
749
- ref={fileInputRef}
750
- onChange={(e) => e.target.files?.[0] && handleUpload(e.target.files[0], false)}
751
- style={{ display: "none" }}
752
- />
753
- <button
754
- onClick={handleSend}
755
- disabled={!newMessage.trim() || sending || isUploading}
756
- style={{ padding: "8px 16px", background: newMessage.trim() ? COLORS.brand : COLORS.gray300, color: "#fff", border: "none", borderRadius: 8, fontSize: 12, fontWeight: 700, cursor: newMessage.trim() ? "pointer" : "default" }}
757
- >
758
- {sending ? "..." : "Send"}
759
- </button>
760
- </div>
761
- </div>
762
  </div>
763
- </div>
764
  </div>
765
  </div>
766
  );
 
50
  const [showConfirmEscalate, setShowConfirmEscalate] = useState(false);
51
  const [isEscalating, setIsEscalating] = useState(false);
52
 
53
+ // Sidebar States
54
+ const [isSidebarOpen, setIsSidebarOpen] = useState(true);
55
+ const [sidebarTab, setSidebarTab] = useState<'messages' | 'files'>('messages');
56
+
57
  // Message Edit State
58
  const [editingMsgId, setEditingMsgId] = useState<string | null>(null);
59
  const [msgEditDraft, setMsgEditDraft] = useState("");
 
255
  <span style={{ fontSize: 10, color: COLORS.brand, fontWeight: 800, fontFamily: "monospace", background: "rgba(99, 102, 241, 0.1)", padding: "2px 8px", borderRadius: 4, letterSpacing: '0.05em' }}>{ticket.id.slice(0, 8)}</span>
256
  <StatusBadge status={ticket.status} />
257
  <PriorityBadge priority={ticket.priority} />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  </div>
259
  </div>
260
+ <button
261
+ onClick={() => setIsSidebarOpen(!isSidebarOpen)}
262
+ style={{
263
+ background: isSidebarOpen ? COLORS.brand : "rgba(255,255,255,0.05)",
264
+ color: isSidebarOpen ? "#fff" : COLORS.text,
265
+ border: `1px solid ${COLORS.border}`,
266
+ borderRadius: 8,
267
+ padding: "8px 16px",
268
+ fontSize: 11,
269
+ fontWeight: 800,
270
+ cursor: "pointer",
271
+ display: "flex",
272
+ alignItems: "center",
273
+ gap: 8,
274
+ transition: 'all 0.2s'
275
+ }}
276
+ >
277
+ {isSidebarOpen ? "HIDE INTERACTION" : "SHOW INTERACTION"}
278
+ </button>
279
  </div>
280
 
281
+ <div style={{ display: "flex", flex: 1, overflow: "hidden", position: "relative" }}>
282
+ {/* Main Content Area (Detail Workstation) */}
283
+ <div style={{
284
+ flex: 1,
285
+ overflowY: "auto",
286
+ padding: "40px",
287
+ background: "#fff",
288
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
289
+ }}>
290
 
291
  {/* AI Assessment Card */}
292
  {ticket.summary && (
293
  <div style={{
294
+ background: "rgba(30, 64, 175, 0.03)",
295
+ borderRadius: 24,
296
+ border: `1px solid var(--border-subtle)`,
297
+ padding: "32px",
298
+ marginBottom: "40px",
299
+ boxShadow: "0 10px 30px -10px rgba(30, 64, 175, 0.1)",
300
+ position: 'relative',
301
+ overflow: 'hidden'
302
  }}>
303
+ <div style={{ position: 'absolute', top: 0, left: 0, width: 4, height: '100%', background: 'var(--primary)' }} />
304
+ <div style={{ display: "flex", alignItems: "center", gap: 12, marginBottom: 16 }}>
305
+ <span style={{ fontSize: 24 }}>✨</span>
306
+ <h3 style={{ fontSize: 13, fontWeight: 900, margin: 0, color: 'var(--primary)', textTransform: "uppercase", letterSpacing: "0.2em" }}>Intelligence Summary</h3>
307
  </div>
308
+ <p style={{ fontSize: 16, color: 'var(--text-main)', lineHeight: 1.8, margin: 0, fontWeight: 500 }}>
309
  {ticket.summary}
310
  </p>
311
  </div>
312
  )}
313
+
314
  {/* Ticket Insights Grid */}
315
+ <div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(220px, 1fr))", gap: 24, marginBottom: 40 }}>
316
+ <div style={{ padding: 20, border: `1px solid var(--border-subtle)`, borderRadius: 16, background: "#fff", boxShadow: '0 1px 3px rgba(0,0,0,0.02)' }}>
317
+ <div style={{ fontSize: 10, fontWeight: 900, color: 'var(--text-muted)', textTransform: "uppercase", marginBottom: 8, letterSpacing: '0.1em' }}>Priority Class</div>
318
+ <div style={{ display: "flex", alignItems: "center", gap: 10 }}>
319
+ <div style={{
320
  width: 10, height: 10, borderRadius: "50%",
321
+ background: ticket.priority === "P0" ? "var(--error)" : ticket.priority === "P1" ? "var(--warning)" : "var(--primary)"
 
322
  }} />
323
+ <div style={{ fontSize: 14, fontWeight: 800, color: 'var(--text-main)' }}>{ticket.priority} · {ticket.priority === 'P0' ? 'Critical' : 'Standard'}</div>
324
  </div>
325
  </div>
326
+ <div style={{ padding: 20, border: `1px solid var(--border-subtle)`, borderRadius: 16, background: "#fff", boxShadow: '0 1px 3px rgba(0,0,0,0.02)' }}>
327
+ <div style={{ fontSize: 10, fontWeight: 900, color: 'var(--text-muted)', textTransform: "uppercase", marginBottom: 8, letterSpacing: '0.1em' }}>Lead Analyst</div>
328
  <div style={{ display: "flex", alignItems: "center", gap: 10 }}>
329
+ <div style={{ width: 24, height: 24, borderRadius: 6, background: "rgba(15, 23, 42, 0.05)", border: `1px solid var(--border-subtle)`, display: "flex", alignItems: "center", justifyContent: "center", fontSize: 10, fontWeight: 900, color: 'var(--primary)' }}>{ticket.assigned_name ? ticket.assigned_name[0] : "?"}</div>
330
+ <div style={{ fontSize: 14, fontWeight: 800, color: 'var(--text-main)' }}>{ticket.assigned_name || "Nexus Tactical Team"}</div>
331
  </div>
332
  </div>
333
+ <div style={{ padding: 20, border: `1px solid var(--border-subtle)`, borderRadius: 16, background: "#fff", boxShadow: '0 1px 3px rgba(0,0,0,0.02)' }}>
334
+ <div style={{ fontSize: 10, fontWeight: 900, color: 'var(--text-muted)', textTransform: "uppercase", marginBottom: 8, letterSpacing: '0.1em' }}>Target Milestone</div>
335
+ <div style={{ fontSize: 14, fontWeight: 800, color: 'var(--text-main)' }}>{formatETA(ticket.expected_resolution_at)}</div>
 
 
 
 
 
 
 
 
 
 
336
  </div>
337
  </div>
338
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  {/* Description Block */}
340
+ <div style={{ background: "#fff", borderRadius: 20, padding: "32px", border: `1px solid var(--border-subtle)`, marginBottom: 40, boxShadow: "0 4px 20px rgba(0,0,0,0.03)" }}>
341
+ <div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 24 }}>
342
+ <h3 style={{ fontSize: 12, fontWeight: 900, margin: 0, color: 'var(--text-muted)', textTransform: "uppercase", letterSpacing: '0.15em' }}>Investigation Dossier</h3>
343
  {ticket.status !== 'closed' && (
344
  <button
345
  onClick={() => setIsEditingDesc(!isEditingDesc)}
346
+ style={{ background: "#f8fafc", border: "1px solid var(--border-subtle)", color: 'var(--primary)', fontSize: 10, fontWeight: 900, cursor: "pointer", padding: "8px 16px", borderRadius: 8, textTransform: "uppercase", letterSpacing: '0.1em' }}
347
  >
348
+ {isEditingDesc ? "Abort Edit" : "Update Dossier"}
349
  </button>
350
  )}
351
  </div>
 
356
  value={descDraft}
357
  onChange={e => setDescDraft(e.target.value)}
358
  onPaste={e => handlePaste(e, true)}
359
+ placeholder="Update forensic intelligence..."
360
+ style={{ width: "100%", minHeight: 200, padding: 20, borderRadius: 16, border: `2px solid var(--primary)`, fontSize: 15, outline: "none", resize: "vertical", fontFamily: "inherit", background: "#f8fafc", color: 'var(--text-main)', lineHeight: 1.6 }}
361
  />
362
+ <div style={{ marginTop: 16, display: "flex", justifyContent: "flex-end", gap: 16 }}>
363
  <button
364
  onClick={handleUpdateDescription}
365
  disabled={savingDesc || isUploading}
366
+ style={{ padding: "10px 24px", background: 'var(--primary)', color: "#fff", border: "none", borderRadius: 10, fontSize: 13, fontWeight: 800, cursor: "pointer", boxShadow: '0 4px 12px rgba(30, 64, 175, 0.2)' }}
367
  >
368
+ {savingDesc ? "Syncing..." : "Sync intelligence"}
369
  </button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  </div>
371
  </div>
372
  ) : (
373
+ <div style={{ fontSize: 16, color: 'var(--text-main)', lineHeight: 1.8 }}>
374
  <NexusMarkdown content={ticket.description} />
375
  </div>
376
  )}
 
378
 
379
  {ticket.is_escalated && (
380
  <div style={{
381
+ marginBottom: 40,
382
+ padding: "32px",
383
+ background: "#fff1f2",
384
+ borderRadius: 24,
385
+ border: "1px solid #fda4af",
386
  display: "flex",
387
  alignItems: "center",
388
+ gap: 20,
389
+ boxShadow: "0 10px 30px -10px rgba(190, 18, 60, 0.1)"
390
  }}>
391
+ <div style={{ width: 56, height: 56, borderRadius: 16, background: "#be123c", display: "flex", alignItems: "center", justifyContent: "center", fontSize: 24, boxShadow: "0 5px 15px rgba(190, 18, 60, 0.3)" }}>🚨</div>
392
  <div style={{ flex: 1 }}>
393
+ <div style={{ fontSize: 13, fontWeight: 900, color: "#be123c", textTransform: "uppercase", letterSpacing: "0.15em", marginBottom: 6 }}>Urgent Escalation Status</div>
394
+ <p style={{ fontSize: 15, color: '#9f1239', margin: 0, lineHeight: 1.6, fontWeight: 600 }}>
395
+ Strategic intervention active. Workspace leads are monitoring this investigation.
 
396
  </p>
397
  </div>
398
  </div>
399
  )}
400
 
401
  {!ticket.is_escalated && !['RESOLVED', 'CLOSED'].includes((ticket.status || '').toUpperCase()) && (
402
+ <div style={{
403
+ marginBottom: 40,
404
+ padding: "24px",
405
+ background: "#fff1f2",
406
+ borderRadius: 20,
407
+ border: `1px solid ${showConfirmEscalate ? "#be123c" : "#fda4af"}`,
408
+ display: "flex",
409
+ justifyContent: "space-between",
410
+ alignItems: "center",
411
+ transition: "all 0.2s"
412
+ }}>
413
  <div style={{ flex: 1 }}>
414
+ <h4 style={{ fontSize: 13, fontWeight: 900, color: "#be123c", margin: "0 0 6px 0", textTransform: 'uppercase', letterSpacing: '0.1em' }}>
415
+ {showConfirmEscalate ? "⚠️ Confirm Mission Escalation" : "Inadequate Progress?"}
416
  </h4>
417
+ <p style={{ fontSize: 13, color: "#9f1239", margin: 0, fontWeight: 500 }}>
418
  {showConfirmEscalate
419
+ ? "Strategic alert will be broadcast to all leads immediately."
420
+ : "Escalate for P0 priority and lead analyst oversight."}
421
  </p>
422
  </div>
423
 
424
+ <div style={{ display: "flex", gap: 12 }}>
425
  {showConfirmEscalate ? (
426
  <>
427
+ <button onClick={() => setShowConfirmEscalate(false)} style={{ background: "#fff", color: 'var(--text-main)', border: "1px solid var(--border-subtle)", borderRadius: 10, padding: "10px 20px", fontSize: 12, fontWeight: 700 }}>Cancel</button>
428
+ <button onClick={handleEscalate} style={{ background: "#be123c", color: "#fff", border: "none", borderRadius: 10, padding: "10px 24px", fontSize: 12, fontWeight: 900, boxShadow: "0 4px 12px rgba(190, 18, 60, 0.2)" }}>CONFIRM ESCALATION</button>
 
 
 
 
 
 
 
 
 
 
 
 
429
  </>
430
  ) : (
431
+ <button onClick={() => setShowConfirmEscalate(true)} style={{ background: "#be123c", color: "#fff", border: "none", borderRadius: 10, padding: "12px 24px", fontSize: 11, fontWeight: 900, textTransform: 'uppercase', letterSpacing: '0.1em' }}>Escalate Case</button>
 
 
 
 
 
432
  )}
433
  </div>
434
  </div>
435
  )}
436
 
437
+ {/* Related Metadata Section */}
438
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', gap: 32, marginBottom: 40 }}>
439
+ {ticket.similar_articles && ticket.similar_articles.length > 0 && (
440
+ <div>
441
+ <h3 style={{ fontSize: 11, fontWeight: 900, marginBottom: 16, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: '0.15em' }}>Recommended Protocols</h3>
442
+ <div style={{ display: "flex", flexDirection: "column", gap: 12 }}>
443
+ {ticket.similar_articles.map((art: any) => (
444
+ <a key={art.id} href={`/kb/${art.id}`} target="_blank" rel="noreferrer" style={{ padding: "16px", background: "#fff", border: `1px solid var(--border-subtle)`, borderRadius: 16, textDecoration: "none", display: "flex", justifyContent: "space-between", alignItems: "center", transition: "all 0.2s", boxShadow: '0 1px 2px rgba(0,0,0,0.02)' }}>
445
+ <span style={{ fontSize: 14, fontWeight: 700, color: 'var(--text-main)' }}>{art.title}</span>
446
+ <span style={{ fontSize: 11, color: 'var(--primary)', fontWeight: 900 }}>PROTOCOL →</span>
447
+ </a>
448
+ ))}
449
+ </div>
450
+ </div>
451
+ )}
452
+ {ticket.ai_metadata?.customer_proximity?.length > 0 && (
453
+ <div>
454
+ <h3 style={{ fontSize: 11, fontWeight: 900, marginBottom: 16, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: '0.15em' }}>Forensic Proximity</h3>
455
+ <div style={{ display: "flex", flexDirection: "column", gap: 12 }}>
456
+ {ticket.ai_metadata.customer_proximity.map((sim: any) => (
457
+ <div key={sim.id} onClick={() => onNavigate?.({ id: sim.id })} style={{ padding: "16px", background: "#fff", border: `1px solid var(--border-subtle)`, borderRadius: 16, cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", boxShadow: '0 1px 2px rgba(0,0,0,0.02)' }}>
458
+ <span style={{ fontSize: 14, fontWeight: 700, color: 'var(--text-main)' }}>{sim.title}</span>
459
+ <span style={{ fontSize: 10, color: 'var(--primary)', fontWeight: 900 }}>{(sim.similarity * 100).toFixed(0)}% BIOMETRIC MATCH</span>
460
+ </div>
461
+ ))}
462
+ </div>
463
+ </div>
464
+ )}
465
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
466
 
467
  {/* Resolution Details Block */}
468
  {(ticket.status?.toUpperCase() === 'RESOLVED' || ticket.status?.toUpperCase() === 'CLOSED') && (
469
  <div style={{
470
  background: "rgba(16, 185, 129, 0.05)",
471
+ borderRadius: 24,
472
+ padding: "32px",
473
+ border: `1px solid var(--success)`,
474
+ marginTop: "40px",
475
+ boxShadow: "0 10px 30px -10px rgba(16, 185, 129, 0.1)"
476
  }}>
477
+ <div style={{ display: "flex", justifyContent: "space-between", alignItems: "flex-start", marginBottom: 24 }}>
478
  <div>
479
+ <h3 style={{ fontSize: 13, fontWeight: 900, margin: "0 0 8px 0", color: 'var(--success)', textTransform: "uppercase", letterSpacing: "0.15em" }}>Forensic Resolution Case</h3>
480
+ <div style={{ fontSize: 12, color: 'var(--text-muted)' }}>
481
+ Authenticated by <strong>{ticket.resolved_by_name || "Nexus Strategic Agent"}</strong> • {formatETA(ticket.resolved_at)}
482
  </div>
483
  </div>
484
+ <div style={{ background: "rgba(16, 185, 129, 0.1)", color: 'var(--success)', padding: "6px 16px", borderRadius: "100px", fontSize: 10, fontWeight: 900 }}>FINALIZED</div>
485
  </div>
486
 
487
  <div style={{
488
  fontSize: 15,
489
+ color: 'var(--text-main)',
490
+ lineHeight: 1.8,
491
+ background: "#fff",
492
+ padding: "24px",
493
+ borderRadius: 16,
494
+ border: `1px solid var(--border-subtle)`
 
 
495
  }}>
496
+ <NexusMarkdown content={ticket.resolution_text || "Case finalized without specific notation."} />
497
  </div>
498
 
499
  {/* Feedback Section */}
500
+ <div style={{ marginTop: 32, paddingTop: 32, borderTop: `1px dashed var(--border-subtle)` }}>
501
  {ticket.rating ? (
502
+ <div style={{ display: "flex", alignItems: "center", gap: 12 }}>
503
+ <div style={{ fontSize: 13, fontWeight: 900, color: 'var(--success)', textTransform: 'uppercase' }}>Service Rating:</div>
504
+ <div style={{ display: "flex", gap: 4 }}>
505
  {[1, 2, 3, 4, 5].map(star => (
506
+ <span key={star} style={{ fontSize: 20, color: star <= ticket.rating ? "var(--warning)" : "rgba(0,0,0,0.05)" }}>★</span>
507
  ))}
508
  </div>
509
  </div>
510
  ) : (
511
  <div>
512
+ <div style={{ fontSize: 13, fontWeight: 900, color: 'var(--success)', marginBottom: 16, textTransform: 'uppercase' }}>Operational Feedback</div>
513
+ <div style={{ display: "flex", alignItems: "center", gap: 20, flexWrap: "wrap" }}>
514
+ <div style={{ display: "flex", gap: 6 }}>
515
  {[1, 2, 3, 4, 5].map(star => (
516
  <button
517
  key={star}
 
519
  onMouseLeave={() => setHoverRating(null)}
520
  onClick={() => setRatingDraft(star)}
521
  style={{
522
+ background: "none", border: "none", padding: 0, cursor: "pointer", fontSize: 28,
523
+ color: star <= (hoverRating || ratingDraft || 0) ? "var(--warning)" : "rgba(0,0,0,0.05)",
524
  transition: "transform 0.1s"
525
  }}
526
  >
 
529
  ))}
530
  </div>
531
  <input
532
+ placeholder="Add strategic feedback..."
533
  value={commentDraft}
534
  onChange={(e) => setCommentDraft(e.target.value)}
535
+ style={{ flex: 1, minWidth: 260, padding: "12px 16px", borderRadius: 12, border: `1px solid var(--border-subtle)`, fontSize: 14, background: "#f8fafc", color: 'var(--text-main)' }}
536
  />
537
  <button
538
  onClick={handleSubmitFeedback}
539
  disabled={!ratingDraft || isSubmittingFeedback}
540
  style={{
541
+ background: ratingDraft ? 'var(--success)' : "rgba(0,0,0,0.05)",
542
+ color: "#fff", border: "none", borderRadius: 10, padding: "12px 24px", fontSize: 12, fontWeight: 900,
543
+ cursor: ratingDraft ? "pointer" : "default"
544
  }}
545
  >
546
+ {isSubmittingFeedback ? "SYNCING..." : "SUBMIT FEEDBACK"}
547
  </button>
548
  </div>
549
  </div>
 
553
  )}
554
  </div>
555
 
556
+ {/* Interaction Sidebar (Right Drawer) */}
557
+ <aside style={{
558
+ width: isSidebarOpen ? 480 : 0,
559
+ height: '100%',
560
+ background: "#fff",
561
+ borderLeft: `1px solid var(--border-subtle)`,
562
+ display: "flex",
563
+ flexDirection: "column",
564
+ overflow: "hidden",
565
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
566
+ position: 'relative'
567
+ }}>
568
+ {/* Sidebar Tabs */}
569
+ <div style={{ display: "flex", background: "#f8fafc", borderBottom: `1px solid var(--border-subtle)` }}>
570
+ <button
571
+ onClick={() => setSidebarTab('messages')}
572
+ style={{
573
+ flex: 1, padding: "16px", fontSize: 11, fontWeight: 900,
574
+ color: sidebarTab === 'messages' ? 'var(--primary)' : 'var(--text-muted)',
575
+ background: sidebarTab === 'messages' ? '#fff' : 'transparent',
576
+ borderBottom: sidebarTab === 'messages' ? '3px solid var(--primary)' : '3px solid transparent',
577
+ letterSpacing: '0.1em', cursor: 'pointer', transition: 'all 0.2s'
578
+ }}
579
+ >CONVERSATION</button>
580
+ <button
581
+ onClick={() => setSidebarTab('files')}
582
+ style={{
583
+ flex: 1, padding: "16px", fontSize: 11, fontWeight: 900,
584
+ color: sidebarTab === 'files' ? 'var(--primary)' : 'var(--text-muted)',
585
+ background: sidebarTab === 'files' ? '#fff' : 'transparent',
586
+ borderBottom: sidebarTab === 'files' ? '3px solid var(--primary)' : '3px solid transparent',
587
+ letterSpacing: '0.1em', cursor: 'pointer', transition: 'all 0.2s'
588
+ }}
589
+ >VAULT ASSETS</button>
590
+ </div>
591
 
592
+ <div style={{ flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }}>
593
+ {sidebarTab === 'messages' ? (
594
+ <>
595
+ <div style={{ flex: 1, overflowY: "auto", padding: "32px", display: "flex", flexDirection: "column", gap: 24 }}>
596
+ {messages.map((msg: any) => {
597
+ const isMe = msg.sender_role?.toLowerCase() === 'customer' || !msg.sender_role;
598
+ return (
599
+ <div key={msg.id} style={{ alignSelf: isMe ? "flex-end" : "flex-start", maxWidth: "85%" }}>
600
+ <div style={{
601
+ background: isMe ? 'var(--primary)' : "#f1f5f9",
602
+ color: isMe ? "#fff" : 'var(--text-main)',
603
+ padding: "16px 20px",
604
+ borderRadius: isMe ? "20px 20px 4px 20px" : "20px 20px 20px 4px",
605
+ fontSize: 14, lineHeight: 1.6, boxShadow: "0 4px 12px rgba(0,0,0,0.05)"
606
+ }}>
607
+ <NexusMarkdown content={msg.content} />
608
+ </div>
609
+ <div style={{ fontSize: 10, color: 'var(--text-muted)', marginTop: 8, textAlign: isMe ? 'right' : 'left', fontWeight: 800, textTransform: 'uppercase', letterSpacing: '0.05em' }}>
610
+ {isMe ? "You" : msg.sender_name} • {new Date(msg.created_at).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}
611
  </div>
612
  </div>
613
+ );
614
+ })}
615
+ <div ref={bottomRef} />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
616
  </div>
 
 
 
 
617
 
618
+ <div style={{ padding: "24px", background: "#fff", borderTop: `1px solid var(--border-subtle)` }}>
619
+ <textarea
620
+ value={newMessage}
621
+ onChange={e => setNewMessage(e.target.value)}
622
+ placeholder="Type intelligence response..."
623
+ style={{ width: "100%", minHeight: 100, padding: "16px", borderRadius: 16, border: `1px solid var(--border-subtle)`, fontSize: 14, outline: "none", resize: "none", background: "#f8fafc", fontFamily: "inherit" }}
624
+ />
625
+ <div style={{ display: 'flex', justifyContent: 'space-between', marginTop: 16 }}>
626
+ <button onClick={() => fileInputRef.current?.click()} style={{ background: "#f8fafc", border: "1px solid var(--border-subtle)", borderRadius: 10, padding: "10px 16px", cursor: 'pointer' }}>📎</button>
627
+ <button
628
+ onClick={handleSend}
629
+ disabled={!newMessage.trim() || sending}
630
+ style={{ padding: "10px 32px", background: 'var(--primary)', color: "#fff", border: "none", borderRadius: 10, fontSize: 13, fontWeight: 800, cursor: 'pointer' }}
631
+ >SEND</button>
632
+ </div>
633
+ </div>
634
+ </>
635
+ ) : (
636
+ <div style={{ padding: "32px", display: "flex", flexDirection: "column", gap: 16 }}>
637
+ {messages.flatMap(m => m.attachments || []).length > 0 ? messages.flatMap(m => m.attachments || []).map((att: any, i) => (
638
+ <div key={i} style={{ padding: "16px", background: "#f8fafc", borderRadius: 16, border: `1px solid var(--border-subtle)`, display: "flex", alignItems: "center", gap: 16 }}>
639
+ <span style={{ fontSize: 24 }}>{getFileIcon(att.filename)}</span>
640
+ <div style={{ flex: 1 }}>
641
+ <div style={{ fontSize: 13, fontWeight: 700, color: 'var(--text-main)' }}>{att.filename}</div>
642
+ <div style={{ fontSize: 11, color: 'var(--text-muted)' }}>VAULT ASSET</div>
643
+ </div>
644
+ </div>
645
+ )) : (
646
+ <div style={{ textAlign: 'center', padding: "40px", color: 'var(--text-muted)', fontSize: 14 }}>Zero secure assets in vault.</div>
647
+ )}
 
 
 
 
648
  </div>
649
  )}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650
  </div>
651
+ </aside>
652
  </div>
653
  </div>
654
  );
frontend/packages/shared/src/components/Input.module.css CHANGED
@@ -6,41 +6,42 @@
6
  }
7
 
8
  .label {
9
- font-size: 11px;
10
- font-weight: 800;
11
- color: var(--text-muted);
12
  text-transform: uppercase;
13
- letter-spacing: 0.1em;
14
- margin-left: 4px;
15
- opacity: 0.8;
16
  }
17
 
18
  .input {
19
  width: 100%;
20
- padding: 14px 18px;
21
- background-color: rgba(255, 255, 255, 0.03);
22
- border: 1px solid rgba(255, 255, 255, 0.08);
23
- border-radius: 14px;
24
- color: #fff;
25
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
26
- font-size: 15px;
27
  font-weight: 500;
28
  box-sizing: border-box;
29
  }
30
 
31
  .input::placeholder {
32
- color: rgba(255, 255, 255, 0.2);
 
33
  }
34
 
35
  .input:hover {
36
- background-color: rgba(255, 255, 255, 0.05);
37
- border-color: rgba(255, 255, 255, 0.15);
38
  }
39
 
40
  .input:focus {
41
- background-color: rgba(255, 255, 255, 0.06);
42
  border-color: var(--primary);
43
- box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.15);
44
  outline: none;
45
  }
46
 
 
6
  }
7
 
8
  .label {
9
+ font-size: 10px;
10
+ font-weight: 900;
11
+ color: var(--text-main);
12
  text-transform: uppercase;
13
+ letter-spacing: 0.15em;
14
+ margin-left: 2px;
15
+ opacity: 0.6;
16
  }
17
 
18
  .input {
19
  width: 100%;
20
+ padding: 16px 20px;
21
+ background-color: #f8fafc;
22
+ border: 1px solid var(--border-subtle);
23
+ border-radius: 12px;
24
+ color: var(--text-main);
25
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
26
+ font-size: 14px;
27
  font-weight: 500;
28
  box-sizing: border-box;
29
  }
30
 
31
  .input::placeholder {
32
+ color: var(--text-muted);
33
+ opacity: 0.4;
34
  }
35
 
36
  .input:hover {
37
+ background-color: #f1f5f9;
38
+ border-color: var(--border-hi);
39
  }
40
 
41
  .input:focus {
42
+ background-color: #ffffff;
43
  border-color: var(--primary);
44
+ box-shadow: 0 0 0 4px var(--primary-glow);
45
  outline: none;
46
  }
47
 
frontend/packages/shared/src/components/LoginCard.module.css CHANGED
@@ -226,12 +226,12 @@
226
  }
227
 
228
  .brandLogo {
229
- font-size: 52px;
230
- font-weight: 900;
231
- letter-spacing: 0.2em;
232
- margin-bottom: 8px;
233
- margin-right: -0.2em;
234
- color: var(--bg-obsidian);
235
  font-family: var(--font-header);
236
  display: block;
237
  text-align: center;
@@ -239,12 +239,13 @@
239
 
240
  .subtitle {
241
  color: var(--text-muted);
242
- font-size: 10px;
243
- font-weight: 800;
244
  text-transform: uppercase;
245
- letter-spacing: 0.3em;
246
- opacity: 0.5;
247
  margin: 0;
 
248
  }
249
 
250
  .form {
@@ -321,8 +322,8 @@
321
 
322
  .line {
323
  height: 1px;
324
- width: 24px;
325
- background: rgba(255, 255, 255, 0.1);
326
  }
327
 
328
  .errorAlert {
 
226
  }
227
 
228
  .brandLogo {
229
+ font-size: 40px;
230
+ font-weight: 950;
231
+ letter-spacing: 0.25em;
232
+ margin-bottom: 4px;
233
+ margin-right: -0.25em;
234
+ color: var(--text-main);
235
  font-family: var(--font-header);
236
  display: block;
237
  text-align: center;
 
239
 
240
  .subtitle {
241
  color: var(--text-muted);
242
+ font-size: 9px;
243
+ font-weight: 900;
244
  text-transform: uppercase;
245
+ letter-spacing: 0.4em;
246
+ opacity: 0.7;
247
  margin: 0;
248
+ padding-bottom: 48px;
249
  }
250
 
251
  .form {
 
322
 
323
  .line {
324
  height: 1px;
325
+ width: 32px;
326
+ background: var(--border-subtle);
327
  }
328
 
329
  .errorAlert {
frontend/packages/shared/src/styles/theme.css CHANGED
@@ -50,7 +50,7 @@
50
  --radius-lg: 20px;
51
 
52
  /* Modern Dashboard Constants */
53
- --hero-mesh: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
54
  --radius-xl: 32px;
55
  --radius-full: 9999px;
56
 
 
50
  --radius-lg: 20px;
51
 
52
  /* Modern Dashboard Constants */
53
+ --hero-mesh: linear-gradient(135deg, #f1f5f9 0%, #ffffff 100%);
54
  --radius-xl: 32px;
55
  --radius-full: 9999px;
56