Wizzas commited on
Commit
d05cbbf
·
verified ·
1 Parent(s): 2fb1b49

Update verified React dashboard

Browse files
frontend/dist/assets/TeamWorkspace-Bqyc-6by.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{c as pe,r,l as Ve,a as et,b as tt,d as at,e as rt,s as Ke,f as z,R as nt,g as ze,h as e,i as Ie,p as Qe,n as Oe,j as Ye,k as Xe,m as st,w as De,o as We,q as lt,t as ct,u as it,v as ot,x as dt,y as ut,z as mt,A as pt,B as ft,C as ht,L as Et,S as vt,D as yt,E as je,F as gt,G as bt,H as He,I as wt}from"./index-CSIynkJt.js";/**
2
+ * @license lucide-react v0.468.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const St=pe("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);/**
7
+ * @license lucide-react v0.468.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const Me=pe("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
12
+ * @license lucide-react v0.468.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const Nt=pe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
17
+ * @license lucide-react v0.468.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const kt=pe("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
22
+ * @license lucide-react v0.468.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const _t=pe("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
27
+ * @license lucide-react v0.468.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const Ct=pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
32
+ * @license lucide-react v0.468.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const Dt=pe("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
37
+ * @license lucide-react v0.468.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const Rt=pe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),Ue="17:00",Tt=[{label:"Tomorrow",days:1},{label:"In 3 days",days:3},{label:"In 1 week",days:7},{label:"In 2 weeks",days:14}],xe=l=>String(l).padStart(2,"0"),Fe=l=>l.getFullYear()+"-"+xe(l.getMonth()+1)+"-"+xe(l.getDate());function Be(l,n=new Date){const u=new Date(n);return u.setDate(u.getDate()+l),Fe(u)}const Ge=(l,n)=>l?l+"T"+(n||Ue):"",xt=l=>({date:l?l.slice(0,10):"",time:l?l.slice(11,16):""}),Ze=l=>{const[n,u]=l.split(":").map(Number);return(n%12||12)+":"+xe(u)+" "+(n<12?"AM":"PM")};function At(l){const n=[];for(let u=420;u<=1200;u+=30)n.push(xe(Math.floor(u/60))+":"+xe(u%60));return l&&/^\d\d:\d\d$/.test(l)&&!n.includes(l)&&n.push(l),n.sort()}function qt(l,n=new Date){const u=Math.round((new Date(l.slice(0,10)+"T00:00")-new Date(Fe(n)+"T00:00"))/864e5);return u===0?"today":u===1?"tomorrow":u>1?"in "+u+" days":u===-1?"yesterday":Math.abs(u)+" days ago"}function Je(l,n=new Date){if(!l||!Number.isFinite(Date.parse(l)))return"";const u=new Date(l.slice(0,10)+"T00:00"),i=D=>u.toLocaleDateString("en-GB",D);return i({weekday:"long"})+", "+u.getDate()+" "+i({month:"short"})+" "+u.getFullYear()+" at "+Ze(l.slice(11,16))+" · "+qt(l,n)}const Lt=l=>{const n=new Date(l);return Fe(n)+"T"+String(n.getHours()).padStart(2,"0")+":"+String(n.getMinutes()).padStart(2,"0")};function $e({legend:l,prefix:n,value:u,time:i,setValue:D,setTime:v,disabled:U,required:C,keep:O}){const y=xt(u),W=y.time||i,$=p=>D(Ge(p,W)),K=p=>{v(p),y.date&&D(Ge(y.date,p))};return e.createElement("fieldset",{className:"due-field"},e.createElement("legend",null,l),e.createElement("div",{className:"due-shortcuts",role:"group","aria-label":l+" shortcuts"},O&&e.createElement("button",{type:"button",className:"chip"+(u?"":" selected"),"aria-pressed":!u,disabled:U,onClick:()=>D("")},"Keep current"),Tt.map(p=>{const I=Be(p.days);return e.createElement("button",{type:"button",key:p.days,className:"chip"+(y.date===I?" selected":""),"aria-pressed":y.date===I,disabled:U,onClick:()=>$(I)},p.label)})),e.createElement("div",{className:"due-inputs"},e.createElement("label",{className:"field"},n,"date",e.createElement("input",{type:"date",disabled:U,required:C,min:Fe(new Date),max:Be(365),value:y.date,onInput:p=>$(p.target.value),onChange:p=>$(p.target.value)})),e.createElement("label",{className:"field"},n,"time",e.createElement("select",{disabled:U,value:W,onChange:p=>K(p.target.value)},At(W).map(p=>e.createElement("option",{key:p,value:p},Ze(p)))))),e.createElement("p",{className:"caption due-summary","aria-live":"polite"},u?e.createElement(e.Fragment,null,"Due ",e.createElement("strong",null,Je(u))):O||"Pick a shortcut or a date. The time starts at 5:00 PM."))}function Pt({user:l,inspection:n,notes:u=[],inspections:i=[],inspectionLoading:D=!1,onSelectInspection:v,onEvidence:U}){const C=r.useRef(0),O=r.useRef(!1),y=r.useRef(n==null?void 0:n.id),W=r.useRef(null),$=r.useRef(null),K=r.useRef(null),[p,I]=r.useState("checking"),[F,H]=r.useState([]),[B,f]=r.useState([]),[fe,m]=r.useState(""),[te,S]=r.useState([]),[A,q]=r.useState([]),[he,T]=r.useState(""),[N,J]=r.useState(!1),[le,b]=r.useState(""),[L,Ee]=r.useState(""),[G,s]=r.useState(""),[w,h]=r.useState("Normal"),[x,R]=r.useState(""),[M,ce]=r.useState(Ue),[V,ie]=r.useState(!1),[Ne,Ae]=r.useState(""),[Re,ve]=r.useState(""),[ke,qe]=r.useState(null),[_e,Le]=r.useState(0),[Pe,ae]=r.useState(""),[ye,Ce]=r.useState(""),[oe,j]=r.useState(""),[ge,de]=r.useState(Ue),c=F.find(t=>t.id===fe),ue=Ve(u),me=et(F),a=tt(n,u,F,D),d=at({description:le,owner:L,supervisor:G,priority:w,due:x},B),o=a.ready?d||(V?"":"Confirm that the saved Staff review identifies a defect before creating the case."):a.reason,[P,re]=r.useState([]),k=i.filter(t=>!t.archived_at),Q=k.map(t=>t.id).join(","),ne=t=>st(t.id===(n==null?void 0:n.id)?u:P.filter(E=>E.inspection_id===t.id),F),be=k.map(t=>({row:t,status:ne(t)})).sort((t,E)=>(E.status.key==="ready")-(t.status.key==="ready")),Y=be.filter(t=>t.status.key==="ready").length,ee=rt(c,l.id,B.some(t=>t.user_id===l.id&&t.role==="developer")),_=!!c&&ke!==null&&ke!==c.version;async function X(){const t=++C.current,E=await z(),g=await E.rpc("defectrag_ca_staff");if(t!==C.current)return;if(g.error||g.data!==!0)throw I("denied"),H([]),f([]),m(""),S([]),q([]),new Error("Sign in with an approved Staff account and verify the security code before opening corrective actions.");const Z=await Promise.all([E.from("corrective_actions").select("*").order("created_at",{ascending:!1}).limit(500),E.from("staff_members").select("user_id,display_name,role,revoked_at").is("revoked_at",null)]);if(t===C.current){if(Z.some(Te=>Te.error))throw I("unavailable"),H([]),f([]),m(""),S([]),q([]),Z.find(Te=>Te.error).error;I("authorized"),H(Z[0].data||[]),f(Z[1].data||[]),T(""),Le(Te=>Te+1)}}r.useEffect(()=>{const t=Ke(X,{onState:E=>{E.error&&(I("unavailable"),T(E.error),H([]),f([]),m(""),S([]),q([]))}});return()=>{t.stop(),C.current++}},[l.id]),r.useEffect(()=>{const t=()=>{C.current++,I("checking"),H([]),f([]),m(""),S([]),q([]),X().catch(E=>T(E.message))};return window.addEventListener("defectrag-auth-change",t),()=>window.removeEventListener("defectrag-auth-change",t)},[l.id]),r.useEffect(()=>{y.current&&y.current!==(n==null?void 0:n.id)&&(b(""),Ee(""),s(""),R(""),h("Normal")),y.current=n==null?void 0:n.id,ie(!1)},[n==null?void 0:n.id]),r.useEffect(()=>{ie(!1)},[ue==null?void 0:ue.id]),r.useEffect(()=>{let t=!0;const E=Q?Q.split(","):[];if(p!=="authorized"||!E.length){re([]);return}return z().then(g=>g.from("staff_notes").select("id,inspection_id,author_id,body,created_at").in("inspection_id",E).like("body",nt+"%").order("created_at").limit(2e3)).then(({data:g,error:Z})=>{if(t){if(Z)throw Z;re(g||[])}}).catch(()=>{t&&re([])}),()=>{t=!1}},[p,Q,_e]),r.useEffect(()=>{p==="authorized"&&ze($.current)},[p,n==null?void 0:n.id,ue==null?void 0:ue.id]);function we(){ve(""),Ae((c==null?void 0:c.state)||""),ae((c==null?void 0:c.owner_id)||""),Ce((c==null?void 0:c.supervisor_id)||""),j(""),qe((c==null?void 0:c.version)??null)}r.useEffect(we,[c==null?void 0:c.id]),r.useEffect(()=>{c&&ze(W.current)},[c==null?void 0:c.id]),r.useEffect(()=>{let t=!0;const E=C.current;if(!c||p!=="authorized"){K.current=null,S([]),q([]);return}return K.current!==c.id&&(K.current=c.id,S([]),q([])),z().then(g=>Promise.all([g.from("corrective_action_history").select("*").eq("case_id",c.id).order("version"),g.from("corrective_action_events").select("id,case_id,version,kind,status,attempts,last_error,created_at").eq("case_id",c.id).order("created_at",{ascending:!1})])).then(g=>{if(!(!t||E!==C.current)){if(g.some(Z=>Z.error))throw g.find(Z=>Z.error).error;S(g[0].data||[]),q(g[1].data||[])}}).catch(g=>{t&&E===C.current&&T(g.message)}),()=>{t=!1}},[c==null?void 0:c.id,c==null?void 0:c.version,_e,l.id,p]);async function se(t){if(!O.current){O.current=!0,J(!0),T("");try{await t(),await X(),De()}catch(E){T(E.message||"Corrective action request failed.")}finally{O.current=!1,J(!1)}}}const Se=t=>{var E;return((E=B.find(g=>g.user_id===t))==null?void 0:E.display_name)||"Former / unavailable staff"};return e.createElement("section",{className:"card case-workspace",ref:$,tabIndex:-1,"aria-label":"Corrective Actions workspace"},e.createElement("div",{className:"section-title"},e.createElement("div",null,e.createElement("h2",null,"Corrective Actions"),e.createElement("p",null,"Track work needed after a Staff review confirms a defect. Assign someone to fix it, set a due date, and keep a record of progress.")),e.createElement("button",{className:"secondary",disabled:N,onClick:()=>se(X)},"Refresh cases")),he&&e.createElement("div",{className:"error",role:"alert"},Ie(he)),p==="checking"&&e.createElement("p",{role:"status"},"Checking Staff access and the security code…"),p!=="checking"&&p!=="authorized"&&e.createElement("p",{className:"note"},"Open Staff workspace to check account approval and enter the security code. Then return here and try again."),p==="authorized"&&e.createElement(e.Fragment,null,e.createElement("p",{className:"caption"},"Showing up to 500 cases available to this account. Open: ",me.open," · Resolved / closed: ",me.resolved," · Overdue: ",me.overdue," · Average resolution: ",me.averageResolutionHours===null?"No resolved cases":me.averageResolutionHours.toFixed(1)+" hours",". Email delivery is separate from whether the case has been saved."),e.createElement("h3",null,"Create and assign a case"),e.createElement("p",{className:"caption"},"1. Choose a Team inspection. 2. Save its defect review. 3. Assign the work and deadline."),v&&e.createElement("label",{className:"field"},"Team inspection",e.createElement("select",{value:(n==null?void 0:n.id)||"",disabled:N||D,onChange:t=>v(t.target.value)},e.createElement("option",{value:""},"Choose a shared product inspection"),be.map(({row:t,status:E})=>{var g;return e.createElement("option",{key:t.id,value:t.id},Qe((g=t.payload)==null?void 0:g.category)," · ",new Date(t.created_at).toLocaleString()," · ",t.id.slice(0,8)," — ",E.label)}))),v&&k.length>0&&e.createElement("p",{className:"caption"},Y?`${Y} inspection${Y>1?"s are":" is"} ready, listed first.`:"No inspection is ready yet. A case needs a saved review of Reviewed with “Reject: defect confirmed”."),v&&!k.length&&e.createElement("p",{className:"note"},"No active Team inspections are available. Open a saved Personal inspection and choose Share with team before creating a case."),e.createElement("div",{className:"case-step "+(a.ready?"ready":"blocked")},e.createElement("strong",null,a.ready?"Ready to assign":n?a.existingCaseId?"This inspection already has a case":a.needsReview?"Step 2 needed: confirm the defect in a Staff review":"Not available yet":"Step 1: choose a Team inspection"),e.createElement("p",{id:"case-creation-guidance",role:"status"},a.reason),n&&!n.archived_at&&!D&&e.createElement("button",{type:"button",className:a.needsReview?"primary":"secondary",disabled:N,onClick:()=>U==null?void 0:U(n.id)},a.needsReview?"Open this inspection’s review":"Open photo and Staff review"),a.existingCaseId&&e.createElement("button",{type:"button",className:"secondary",onClick:()=>m(a.existingCaseId)},"Open existing case")),e.createElement("p",{className:"caption"},"Assignment fields can be filled in as a draft. Nothing is saved or emailed until Create corrective action succeeds. Unsaved drafts stay on this page. Reloading, signing out or losing verified access can discard them."),!B.length&&e.createElement("p",{className:"note"},"No active Staff are available for assignment. Refresh cases or contact the workspace administrator. No account permissions will be changed here."),e.createElement("form",{className:"login-form","data-tour":"case","aria-label":"Assign corrective action","aria-describedby":"case-creation-guidance case-submit-guidance",onSubmit:t=>{if(t.preventDefault(),!(o||N||O.current))return se(async()=>{const E=await z(),g=await We(E,"defectrag_create_corrective_action",{p_inspection:n.id,p_review:a.review.id,p_confirmed:V,p_owner:L,p_supervisor:G,p_priority:w,p_description:le,p_due:new Date(x).toISOString()});m(g),b(""),ie(!1)})}},e.createElement("label",{className:"field"},"What needs fixing?",e.createElement("textarea",{disabled:N,required:!0,minLength:10,maxLength:2e3,value:le,onInput:t=>b(t.target.value),onChange:t=>b(t.target.value)})),e.createElement("label",{className:"field"},"Person responsible",e.createElement("select",{disabled:N,required:!0,value:L,onChange:t=>Ee(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),B.map(t=>e.createElement("option",{key:t.user_id,value:t.user_id},t.display_name)))),e.createElement("label",{className:"field"},"Supervisor",e.createElement("select",{disabled:N,required:!0,value:G,onChange:t=>s(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),B.map(t=>e.createElement("option",{key:t.user_id,value:t.user_id},t.display_name)))),e.createElement("label",{className:"field"},"Priority",e.createElement("select",{disabled:N,value:w,onChange:t=>h(t.target.value)},["Low","Normal","High","Critical"].map(t=>e.createElement("option",{key:t},t)))),$e({legend:"Due date and time",prefix:"Due ",value:x,time:M,setValue:R,setTime:ce,disabled:N,required:!0}),e.createElement("p",{className:"caption"},"Times use this device’s time zone. Choose a future deadline within the next year. The deadline is saved with the case."),e.createElement("p",{className:"note"},"Email reminders require administrator activation. Saving this case does not send an email by itself. The current n8n workflow targets the supervisor; it does not yet email the person responsible automatically. Confirm delivery with the supervisor separately."),e.createElement("label",{className:"consent-check"+(a.ready?"":" locked")},e.createElement("input",{type:"checkbox",disabled:N||!a.ready,checked:V,onChange:t=>ie(t.target.checked)}),e.createElement("span",null,"A Staff review has confirmed a defect that needs fixing. An unusual inspection result alone is not enough.",!a.ready&&e.createElement("small",null," Available after the review step above is complete."))),e.createElement("p",{className:"note",id:"case-submit-guidance",role:"status"},o?"Cannot create yet: "+o:"Ready to save the assignment. No email is sent by this button."),e.createElement("button",{className:"primary",disabled:N||!!o},"Create corrective action")),e.createElement("h3",{className:"section-gap"},"Saved cases"),e.createElement("div",{className:"table-wrap","data-tour":c?void 0:"case-update"},e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Case"),e.createElement("th",null,"Status"),e.createElement("th",null,"Owner"),e.createElement("th",null,"Priority"),e.createElement("th",null,"Due"),e.createElement("th",null))),e.createElement("tbody",null,F.map(t=>e.createElement("tr",{key:t.id},e.createElement("td",null,t.id.slice(0,8)),e.createElement("td",null,t.state,!["Resolved","Closed","Cancelled"].includes(t.state)&&Date.parse(t.due_at)<Date.now()?" · Overdue":""),e.createElement("td",null,Se(t.owner_id)),e.createElement("td",null,t.priority),e.createElement("td",null,new Date(t.due_at).toLocaleString()),e.createElement("td",null,e.createElement("button",{className:"text-button",onClick:()=>m(t.id)},"Details")))))),!F.length&&e.createElement("p",{className:"caption"},"No cases are available to this account yet.")),c&&e.createElement("div",{className:"cloud-message","data-tour":"case-update",ref:W,tabIndex:-1,"aria-label":"Corrective action case details"},e.createElement("div",{className:"section-title"},e.createElement("h3",null,"Case ",c.id.slice(0,8)," · ",c.state),e.createElement("button",{className:"text-button",onClick:()=>m("")},"Close details")),e.createElement("p",null,c.description),e.createElement("p",null,"Person responsible: ",Se(c.owner_id)," · Supervisor: ",Se(c.supervisor_id)," · Due: ",new Date(c.due_at).toLocaleString()),e.createElement("p",null,"Confirmed by: ",Se(c.confirmed_by)),e.createElement("button",{className:"secondary",onClick:()=>U(c.inspection_id)},"Open the linked photo and review"),Oe(c.state).length>0&&!ee&&e.createElement("p",{className:"note"},"Only the person responsible, the supervisor or a Developer can change this case after verifying their security code. Other Staff can read it."),!Oe(c.state).length&&e.createElement("p",{className:"note"},"This case is ",c.state.toLowerCase(),". Its saved assignment and history are available to read; further updates are not permitted."),_&&ee&&e.createElement("p",{className:"note",role:"status"},"This case changed while the update was being drafted. The draft has been kept; it has not been saved. Copy any text needed before loading the latest case. ",e.createElement("button",{className:"secondary",disabled:N,onClick:()=>{we(),T("")}},"Load latest case and replace draft")),Oe(c.state).length>0&&ee&&e.createElement("form",{className:"login-form",onSubmit:t=>{t.preventDefault(),se(async()=>{if(_)throw new Error("The case changed. Load the latest case before saving.");const E=await z(),g=await We(E,"defectrag_update_corrective_action",{p_id:c.id,p_version:ke,p_state:Ne,p_note:Re,p_owner:Pe,p_supervisor:ye,p_due:oe?new Date(oe).toISOString():null});qe(g),ve(""),j("")})}},e.createElement("label",{className:"field"},"Case status",e.createElement("select",{disabled:N||_,value:Ne,onChange:t=>Ae(t.target.value)},Oe(c.state).map(t=>e.createElement("option",{key:t},t)))),e.createElement("label",{className:"field"},"Owner",e.createElement("select",{disabled:N||_,required:!0,value:Pe,onChange:t=>ae(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),B.map(t=>e.createElement("option",{key:t.user_id,value:t.user_id},t.display_name)))),e.createElement("label",{className:"field"},"Supervisor",e.createElement("select",{disabled:N||_,required:!0,value:ye,onChange:t=>Ce(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),B.map(t=>e.createElement("option",{key:t.user_id,value:t.user_id},t.display_name)))),$e({legend:"Change due date and time (optional)",prefix:"New due ",value:oe,time:ge,setValue:j,setTime:de,disabled:N||_,keep:"The current due date stays: "+Je(Lt(c.due_at))+"."}),e.createElement("label",{className:"field"},"What changed or was fixed?",e.createElement("textarea",{disabled:N,required:!0,minLength:3,maxLength:2e3,value:Re,onInput:t=>ve(t.target.value),onChange:t=>ve(t.target.value)})),e.createElement("button",{className:"primary",disabled:N||!Ne||_},"Save case update")),e.createElement("h3",null,"Status history"),te.map(t=>e.createElement("p",{key:t.id},e.createElement("strong",null,t.state)," · ",Se(t.actor_id)," · ",new Date(t.created_at).toLocaleString(),e.createElement("br",null),t.note,t.snapshot&&e.createElement("small",null,e.createElement("br",null),"Owner: ",Se(t.snapshot.owner_id)," · Supervisor: ",Se(t.snapshot.supervisor_id)," · Due: ",new Date(t.snapshot.due_at).toLocaleString()))),e.createElement("h3",null,"Email delivery"),e.createElement("p",{className:"caption"},"Waiting emails have not been sent. If delivery fails or is uncertain, contact the workspace administrator. The case stays saved even when the email service is unavailable."),A.map(t=>e.createElement("p",{key:t.id},Ye(t.kind)," · ",Xe(t.status)," · attempts ",t.attempts,t.last_error?" · "+Ie(t.last_error):"")))))}function Ot({client:l,user:n,onChange:u}){var G;const[i,D]=r.useState(null),[v,U]=r.useState([]),[C,O]=r.useState([]),[y,W]=r.useState(null),[$,K]=r.useState(""),[p,I]=r.useState(""),[F,H]=r.useState(""),[B,f]=r.useState(""),[fe,m]=r.useState(""),[te,S]=r.useState(""),[A,q]=r.useState(!1),[he,T]=r.useState([]),[N,J]=r.useState([]),le=((G=window.DEFECTRAG_PUBLIC_CONFIG)==null?void 0:G.registrationEnabled)===!0;async function b(){if(!n){D(null),T([]),J([]);return}const s=await lt(l);D(s);const{data:w,error:h}=await l.auth.mfa.listFactors();if(h)throw h;const x=(w.totp||[]).filter(R=>R.status==="verified");if(U(x),O((w.all||[]).filter(R=>R.factor_type==="totp"&&R.status==="unverified")),I(R=>{var M;return x.some(ce=>ce.id===R)?R:((M=x[0])==null?void 0:M.id)||""}),s.role==="developer"&&s.approved&&s.aal2){const[R,M]=await Promise.all([l.rpc("defectrag_access_directory"),l.rpc("defectrag_notification_status")]);if(R.error)throw R.error;if(M.error)throw M.error;T(R.data||[]),J(M.data||[])}else T([]),J([])}async function L(s){q(!0),S("");try{await s()}catch(w){S(w.message||"Security request failed.")}finally{q(!1)}}r.useEffect(()=>{let s=!0;return W(null),K(""),T([]),J([]),l&&n?b().catch(w=>{s&&S(w.message)}):D(null),()=>{s=!1}},[l,n==null?void 0:n.id]);async function Ee(){await ut(l,(y==null?void 0:y.id)||p,$),K(""),W(null),await b(),u(),S("Security code verified. Staff access is available only after the account is approved.")}return e.createElement("div",{className:"section-gap"},n&&e.createElement("h3",null,"Sign-in and account security"),te&&e.createElement("p",{className:"note",role:"status"},Ie(te)),n?e.createElement(e.Fragment,null,e.createElement("p",null,"Access: ",e.createElement("strong",null,i!=null&&i.revoked?"revoked":i!=null&&i.approved?"approved":(i==null?void 0:i.request_status)||"not requested")," · Authenticator: ",e.createElement("strong",null,i!=null&&i.aal2?"security code verified":"enter security code")),e.createElement("button",{className:"secondary",disabled:A,onClick:()=>L(b)},"Refresh account status"),i&&!i.approved&&!i.revoked&&!i.request_status&&e.createElement("form",{className:"login-form",onSubmit:s=>{s.preventDefault(),L(async()=>{await it(l,F),await b(),S("Request sent. Check back here for Developer approval. Team and private Staff work are not available while the request is waiting."),u()})}},e.createElement("label",{className:"field"},"Display name",e.createElement("input",{value:F,maxLength:80,onChange:s=>H(s.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:A||!i.registration_enabled||!i.email_verified},"Request staff access")),e.createElement("p",{className:"caption"},"Use an authenticator app for the extra six-digit sign-in code. Keep access to that app. If it is lost, contact the workspace administrator; resetting the password does not remove this security check."),!y&&!v.length&&!C.length&&e.createElement("button",{className:"secondary",disabled:A,onClick:()=>L(async()=>W(await ot(l)))},"Set up a security code app"),!y&&C.map(s=>e.createElement("p",{key:s.id,className:"caption"},"Authenticator setup was not finished. ",e.createElement("button",{className:"text-button",disabled:A,onClick:()=>L(async()=>{const{error:w}=await l.auth.mfa.unenroll({factorId:s.id});if(w)throw w;await b()})},"Cancel incomplete setup"))),y&&e.createElement("div",{className:"note"},e.createElement("div",null,e.createElement("p",null,"Open an authenticator app, scan this private QR code, then enter the six-digit code below to finish. Do not share the QR code or security codes."),e.createElement("img",{src:y.totp.qr_code,width:"200",height:"200",alt:"Private authenticator enrollment QR code"}),e.createElement("button",{className:"text-button",disabled:A,onClick:()=>L(async()=>{const{error:s}=await l.auth.mfa.unenroll({factorId:y.id});if(s)throw s;W(null),K("")})},"Cancel incomplete setup"))),!y&&v.length>0&&(i==null?void 0:i.aal2)&&e.createElement("p",{className:"caption"},"The security code is verified for this sign-in."),(y||v.length>0&&!(i!=null&&i.aal2))&&e.createElement("form",{className:"login-form",onSubmit:s=>{s.preventDefault(),L(Ee)}},!y&&e.createElement("label",{className:"field"},"Security code app",e.createElement("select",{value:p,onChange:s=>I(s.target.value)},v.map(s=>e.createElement("option",{key:s.id,value:s.id},s.friendly_name||"Authenticator")))),e.createElement("label",{className:"field"},"Six-digit security code",e.createElement("input",{inputMode:"numeric",autoComplete:"one-time-code",pattern:"[0-9]{6}",maxLength:6,value:$,onChange:s=>K(s.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:A},"Verify security code")),(i==null?void 0:i.role)==="developer"&&i.approved&&i.aal2&&e.createElement(e.Fragment,null,e.createElement("h3",{className:"section-gap"},"Staff access management"),e.createElement("p",null,"Approve or reject requests that are still waiting. Removing access stops new Staff actions but keeps inspection history."),e.createElement("div",{className:"table-wrap"},e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Account"),e.createElement("th",null,"Status"),e.createElement("th",null,"Role"),e.createElement("th",null,"Action"))),e.createElement("tbody",null,he.map(s=>e.createElement("tr",{key:s.user_id},e.createElement("td",null,s.display_name,e.createElement("br",null),e.createElement("small",null,s.email)),e.createElement("td",null,s.status),e.createElement("td",null,s.role||"applicant"),e.createElement("td",null,s.user_id!==n.id&&(s.status==="pending"?["approve","reject"]:s.status==="approved"?["revoke"]:[]).map(w=>e.createElement("button",{key:w,className:"text-button",disabled:A,onClick:()=>{window.confirm(`${w[0].toUpperCase()+w.slice(1)} access for ${s.display_name}?`)&&L(async()=>{await dt(l,s,w),await b(),u(),S("Account access updated. Check Email delivery below separately; saving this change does not confirm an email was sent.")})}},{approve:"Approve",reject:"Reject",revoke:"Remove access"}[w])))))))),e.createElement("h3",{className:"section-gap"},"Email delivery"),e.createElement("p",{className:"caption"},"Waiting emails have not been sent. Delivery depends on administrator settings and the email service being available. Sent means the email service accepted the message; it may still reach Spam or fail to arrive."),e.createElement("div",{className:"table-wrap"},e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Event"),e.createElement("th",null,"Delivery"),e.createElement("th",null,"Attempts"),e.createElement("th",null))),e.createElement("tbody",null,N.map(s=>e.createElement("tr",{key:s.id},e.createElement("td",null,Ye(s.kind)),e.createElement("td",null,Xe(s.status)),e.createElement("td",null,s.attempts),e.createElement("td",null,s.status==="dead"&&e.createElement("button",{className:"text-button",disabled:A,onClick:()=>L(async()=>{const{error:w}=await l.rpc("defectrag_retry_notification",{p_id:s.id});if(w)throw w;await b()})},"Retry delivery"))))))))):le?e.createElement("details",{className:"register-panel"},e.createElement("summary",null,"New to Staff work? Create an account"),e.createElement("form",{className:"login-form",onSubmit:s=>{s.preventDefault(),L(async()=>{await ct(l,{email:B,password:fe,displayName:F,redirectTo:location.origin+location.pathname}),m(""),S("Check the inbox and Spam folder for a confirmation email. Open its link, sign in, then choose Request staff access. A Developer must approve the request before Staff work is available.")})}},e.createElement("p",null,"New to Staff work? Create an account, confirm the email, then request access. The public demo can be used without an account."),e.createElement("label",{className:"field"},"Display name",e.createElement("input",{value:F,onChange:s=>H(s.target.value),maxLength:80,autoComplete:"name",required:!0})),e.createElement("label",{className:"field"},"Email",e.createElement("input",{type:"email",value:B,onChange:s=>f(s.target.value),autoComplete:"email",required:!0})),e.createElement("label",{className:"field"},"New password",e.createElement("input",{type:"password",minLength:12,value:fe,onChange:s=>m(s.target.value),autoComplete:"new-password",required:!0})),e.createElement("button",{className:"secondary",disabled:A||!l},"Register account"))):e.createElement("p",{className:"caption"},"New account registration is currently closed. Existing Staff can sign in below. The public demo is still available."))}function Ft({onOpenInspection:l,onOpenCorrectiveActions:n,onChooseInspection:u,casesView:i=!1,initialInspectionId:D=null}){var me;const v=r.useRef(0),U=r.useRef(null),C=r.useRef(0),O=r.useRef(null),y=r.useRef(0),W=r.useRef(null),$=r.useRef(null),[K,p]=r.useState(0),[I,F]=r.useState(!1),[H,B]=r.useState({state:"refreshing"}),[f,fe]=r.useState(null),[m,te]=r.useState(null),[S,A]=r.useState([]),[q,he]=r.useState({}),[T,N]=r.useState(""),[J,le]=r.useState(""),[b,L]=r.useState(!1),[Ee,G]=r.useState(""),[s,w]=r.useState(!1),[h,x]=r.useState(null),[R,M]=r.useState([]),[ce,V]=r.useState([]),[ie,Ne]=r.useState(""),[Ae,Re]=r.useState(!1),[ve,ke]=r.useState(""),[qe,_e]=r.useState(!1),[Le,Pe]=r.useState(null),ae=mt(),ye=pt(window.DEFECTRAG_PUBLIC_CONFIG);r.useEffect(()=>()=>{R.filter(a=>a.startsWith("blob:")).forEach(a=>URL.revokeObjectURL(a))},[R]),r.useEffect(()=>{O.current=h},[h]),r.useEffect(()=>{h&&ze(W.current)},[K]),r.useEffect(()=>{if(!f||!m||!D)return;const a=f.id+":"+D;$.current!==a&&($.current=a,de({id:D},{focus:!i}))},[f==null?void 0:f.id,m==null?void 0:m.user_id,D]);const Ce=ft(),oe=ae&&Le&&(!i||!m)?e.createElement(Ot,{key:(f==null?void 0:f.id)||"anonymous",client:Le,user:f,onChange:()=>{De(),f&&j(ge)}}):null;async function j(a){L(!0),G("");try{await a()}catch(d){G(d.message||"Team request failed.")}finally{L(!1)}}async function ge(){var _;const a=++C.current,d=v.current,o=(_=O.current)==null?void 0:_.id,{client:P,staff:re}=await wt();let k=P.from("shared_inspections").select("*").order("created_at",{ascending:!1}).limit(200);k=s?k.not("archived_at","is",null):k.is("archived_at",null);const[{data:Q,error:ne},{data:be,error:Y},ee]=await Promise.all([k,P.from("staff_members").select("*"),o?P.from("staff_notes").select("*").eq("inspection_id",o).order("created_at"):{data:[]}]);if(ne)throw ne;if(Y)throw Y;if(ee.error)throw ee.error;if(a===C.current&&(te(re),G(""),A(Q||[]),he(Object.fromEntries((be||[]).map(X=>[X.user_id,X.display_name]))),o&&d===v.current)){const X=(Q||[]).find(we=>we.id===o);if(!X)v.current++,x(null),M([]),V([]);else if(x(X),V(ee.data||[]),!ae&&Date.now()-y.current>480*1e3){const we=await Promise.all([X.image_path,X.heatmap_path].map(se=>P.storage.from("team-inspections").createSignedUrl(se,900)));if(a===C.current&&d===v.current){if(we.some(se=>se.error))throw new Error("Shared image links could not refresh.");M(we.map(se=>se.data.signedUrl)),y.current=Date.now()}}}}r.useEffect(()=>{if(!Ce)return;let a=!1,d;return z().then(async o=>{!a&&ae&&Pe(o),d=o.auth.onAuthStateChange((re,k)=>{var Q;if(!a){const ne=((Q=k==null?void 0:k.user)==null?void 0:Q.id)||null;U.current!==ne&&(v.current++,C.current++,x(null),A([]),M([]),V([]),te(null),U.current=ne),fe((k==null?void 0:k.user)||null),re==="PASSWORD_RECOVERY"&&Re(!0)}}).data.subscription;const{data:P}=await o.auth.getUser();a||fe(P.user)}).catch(o=>{a||G(o.message)}),()=>{a=!0,v.current++,d==null||d.unsubscribe()}},[Ce]),r.useEffect(()=>{if(!f)return;const a=Ke(ge,{onState:d=>{B(d),d.error&&(G(d.error),ae&&(v.current++,A([]),he({}),x(null),M([]),V([]),te(null)))}});return()=>{a.stop(),C.current++}},[f==null?void 0:f.id,s]);async function de(a,{focus:d=!0}={}){const o=++v.current;F(!0);try{await j(async()=>{if(o!==v.current)return;const P=await z(),re=P.storage.from("team-inspections"),[{data:k,error:Q},{data:ne,error:be}]=await Promise.all([P.from("shared_inspections").select("*").eq("id",a.id).single(),P.from("staff_notes").select("*").eq("inspection_id",a.id).order("created_at")]);if(o!==v.current)return;if(Q)throw Q;if(be)throw be;const Y=ae?await ht(P,k):null,ee=Y?Y.map(_=>({data:{signedUrl:_}})):await Promise.all([k.image_path,k.heatmap_path].map(_=>re.createSignedUrl(_,900)));if(ee.some(_=>_.error))throw new Error("Private images could not be loaded. Check staff/storage policies.");if(o!==v.current){Y==null||Y.forEach(_=>URL.revokeObjectURL(_));return}O.current=k,y.current=Date.now(),x(k),M(ee.map(_=>_.data.signedUrl)),V(ne||[]),d&&p(_=>_+1)})}finally{o===v.current&&F(!1)}}function c(){v.current++,O.current=null,F(!1),x(null),M([]),V([])}async function ue(){await j(async()=>{const a=await z(),d=S.filter(o=>o.owner_id===f.id).map(o=>o.id);if(d.length){const{error:o}=await a.rpc("archive_team_inspections",{p_ids:d});if(o)throw o}v.current++,x(null),_e(!1),await ge(),De()})}return Ce?e.createElement(e.Fragment,null,e.createElement("section",{className:"card"},e.createElement("div",{className:"section-title"},e.createElement("div",null,e.createElement("h2",null,e.createElement(Rt,{size:21})," ",i?"Corrective Actions access":"Staff workspace"),e.createElement("p",null,m?"This account can access shared Team work. New inspections start in Personal Workspace and are shared only when chosen.":"Sign in to review inspections shared with the team. New inspections start in Personal Workspace and are shared only when chosen.")),e.createElement("span",{className:"subtle-tag"},e.createElement(Me,{size:13})," STAFF ACCESS")),Ee&&e.createElement("div",{className:"error",role:"alert"},Ie(Ee)),I&&e.createElement("p",{role:"status"},"Opening the shared photo and review…"),i&&!ye&&e.createElement("p",{className:"note"},"Corrective Actions has been turned off for this app. Inspections and reviews are still available. Contact the workspace administrator if needed."),f&&!m&&oe,f?e.createElement(e.Fragment,null,e.createElement("div",{className:"team-toolbar"},e.createElement("div",null,e.createElement(vt,{size:18}),e.createElement("strong",null,(m==null?void 0:m.display_name)||f.email),e.createElement("span",{className:"subtle-tag"},(m==null?void 0:m.role)||"CHECKING ACCESS")),e.createElement("button",{className:"secondary",disabled:b,onClick:()=>j(ge)},e.createElement(Ct,{size:16})," Refresh"),!i&&m&&ye&&e.createElement("button",{className:"secondary",onClick:()=>n==null?void 0:n()},"Open Corrective Actions"),i&&m&&e.createElement("button",{className:"secondary",onClick:()=>u==null?void 0:u()},"Choose a Team inspection"),e.createElement("button",{className:"secondary",onClick:()=>j(async()=>{await(await z()).auth.signOut(),A([]),x(null),te(null)})},e.createElement(_t,{size:16})," Sign out")),Ae&&e.createElement("form",{className:"login-form",onSubmit:a=>{a.preventDefault(),j(async()=>{const d=await z(),{error:o}=await d.auth.updateUser({password:ve});if(o)throw o;ke(""),Re(!1)})}},e.createElement("label",{className:"field"},"Set a new password",e.createElement("input",{type:"password",minLength:12,autoComplete:"new-password",value:ve,onChange:a=>ke(a.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:b},"Save password")),!i&&e.createElement(e.Fragment,null,e.createElement("div",{className:"team-toolbar"},e.createElement("span",{role:"status"},"Team Workspace · latest ",S.length," shared inspections · ",H.state==="synced"?"updated at "+new Date(H.at).toLocaleTimeString():H.state==="offline"?"offline; shown results may be out of date":H.state==="stale"?"update failed; shown results may be out of date":"refreshing…"," · checks for changes every 15 seconds"),(m==null?void 0:m.role)==="developer"&&e.createElement("button",{className:"secondary",onClick:()=>{w(!s),x(null)}},e.createElement(St,{size:16}),s?"Active history":"Restore archived team work"),!s&&e.createElement("button",{className:"secondary danger",disabled:b||!S.some(a=>a.owner_id===f.id),onClick:()=>_e(!0)},e.createElement(yt,{size:16})," Archive my shared inspections")),qe&&e.createElement("div",{className:"note"},e.createElement("div",null,e.createElement("strong",null,"Archive your visible records?"),e.createElement("p",null,"They will leave the shared active history. Original files and conversations remain recoverable by a developer. Other staff members’ records will stay active."),e.createElement("div",{className:"button-row"},e.createElement("button",{className:"primary",disabled:b,onClick:ue},"Archive my records"),e.createElement("button",{className:"secondary",onClick:()=>_e(!1)},"Cancel")))),e.createElement("div",{className:"table-wrap"},e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"Inspection"),e.createElement("th",null,"Product"),e.createElement("th",null,"Result"),e.createElement("th",null,"Shared by"),e.createElement("th",null,"Saved"),e.createElement("th",null))),e.createElement("tbody",null,S.map(a=>{var d;return e.createElement("tr",{key:a.id},e.createElement("td",null,e.createElement("strong",null,a.id.slice(0,8))),e.createElement("td",null,Qe(a.payload.category)),e.createElement("td",null,e.createElement("span",{className:"badge "+((d=a.payload.verdict)==null?void 0:d.toLowerCase())},je(a.payload.verdict))),e.createElement("td",null,q[a.owner_id]||"Staff member"),e.createElement("td",null,new Date(a.created_at).toLocaleString()),e.createElement("td",null,e.createElement("button",{className:"text-button",disabled:b,onClick:()=>de(a)},"Review"),s&&(m==null?void 0:m.role)==="developer"&&e.createElement("button",{className:"text-button",disabled:b,onClick:()=>j(async()=>{const o=await z(),{error:P}=await o.rpc("restore_team_inspections",{p_ids:[a.id]});if(P)throw P;await ge(),De()})},"Restore")))}))),!S.length&&e.createElement("div",{className:"empty"},e.createElement(Me,{size:30}),e.createElement("p",null,s?"No archived records to recover.":"No shared inspections yet. Open an inspection result and select Share with team."))))):e.createElement(e.Fragment,null,e.createElement("h3",{className:"section-gap"},"Sign in"),e.createElement("form",{className:"login-form",onSubmit:a=>{a.preventDefault(),j(async()=>{const d=await z(),{error:o}=await d.auth.signInWithPassword({email:T,password:J});if(o)throw o;le("")})}},e.createElement("label",{className:"field"},"Work email",e.createElement("input",{type:"email",autoComplete:"username",value:T,onChange:a=>N(a.target.value),required:!0})),e.createElement("label",{className:"field"},"Password",e.createElement("input",{type:"password",autoComplete:"current-password",value:J,onChange:a=>le(a.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:b},b?e.createElement(Et,{className:"spin",size:17}):e.createElement(kt,{size:17})," Sign in"),e.createElement("button",{type:"button",className:"text-button",disabled:!T||b,onClick:()=>j(async()=>{const a=await z(),{error:d}=await a.auth.resetPasswordForEmail(T,{redirectTo:location.origin+location.pathname});if(d)throw d;G("Password reset requested. Check the inbox and Spam folder.")})},"Reset password"),e.createElement("p",{className:"caption"},ae?"A new account needs Developer approval before Staff work is available. Approved Staff must also enter their security code when asked.":"The workspace administrator must approve an account before it can access Staff work.")),oe),f&&m&&oe&&e.createElement("details",{className:"account-panel section-gap"},e.createElement("summary",null,"Account & security"),oe)),i&&f&&m&&ye&&e.createElement(Pt,{key:f.id,user:f,inspection:h,notes:ce,inspections:S,inspectionLoading:I,onSelectInspection:a=>a?de({id:a},{focus:!1}):c(),onEvidence:a=>de({id:a})}),f&&h&&e.createElement("section",{className:"card",ref:W,tabIndex:-1,"aria-labelledby":"shared-inspection-title"},e.createElement("div",{className:"section-title"},e.createElement("div",null,e.createElement("h2",{id:"shared-inspection-title"},"Shared inspection · ",h.id.slice(0,8)),e.createElement("p",null,"Shared copy from ",q[h.owner_id]||"a colleague",". These are saved results. Opening them does not run another inspection.")),e.createElement("div",{className:"button-row"},l&&!h.archived_at&&e.createElement("button",{className:"secondary",onClick:()=>l(h)},"Open full result and assistant"),!i&&ye&&!h.archived_at&&e.createElement("button",{className:"secondary",onClick:()=>n==null?void 0:n(h)},"Create or view corrective actions"),e.createElement("button",{className:"text-button",onClick:c},"Close"))),e.createElement("div",{className:"shared-images"},R.map((a,d)=>e.createElement("img",{key:a,src:a,alt:d?"Saved highlighted areas":"Saved inspected product"}))),e.createElement("div",{className:"observation"},e.createElement("strong",null,"SAVED RESULT"),e.createElement("span",null,je(h.payload.verdict)," · score ",Number(h.payload.score).toFixed(5)," · review limit ",Number(h.payload.threshold).toFixed(5))),e.createElement("h3",{className:"section-gap"},"Saved assistant conversation"),(me=h.conversation)!=null&&me.length?h.conversation.map((a,d)=>e.createElement("p",{className:"cloud-message",key:d},e.createElement("strong",null,a.role==="user"?"Inspector":"Evidence Assistant",": "),a.question||a.answer)):e.createElement("p",{className:"caption"},"No assistant conversation was shared with this inspection."),!h.archived_at&&e.createElement(gt,{key:h.id+String(ce.length),current:ce.map(a=>He(a,q)).filter(Boolean).at(-1),disabled:b,onSave:async a=>{const d=await z(),{error:o}=await d.from("staff_notes").insert({inspection_id:h.id,author_id:f.id,body:bt(a.status,a.decision,a.note)});if(o)throw o;await de(h,{focus:!i}),De()}}),e.createElement("h3",{className:"section-gap"},"Team notes"),ce.filter(a=>!He(a,q)).map(a=>e.createElement("div",{className:"cloud-message",key:a.id},e.createElement("strong",null,q[a.author_id]||"Staff member"),e.createElement("p",null,a.body),e.createElement("small",null,new Date(a.created_at).toLocaleString()))),!h.archived_at&&e.createElement("form",{className:"question-form",onSubmit:a=>{a.preventDefault(),j(async()=>{const d=await z(),{error:o}=await d.from("staff_notes").insert({inspection_id:h.id,author_id:f.id,body:ie.trim()});if(o)throw o;Ne(""),await de(h),De()})}},e.createElement("input",{"aria-label":"Staff review note",maxLength:2e3,placeholder:"Add a note for the team…",value:ie,onChange:a=>Ne(a.target.value)}),e.createElement("button",{className:"primary",disabled:b||!ie.trim()},e.createElement(Dt,{size:16})," Add note")))):e.createElement("section",{className:"card cloud-setup"},e.createElement("div",{className:"setup-icon"},e.createElement(Me,{size:32})),e.createElement("span",{className:"eyebrow"},"TEAM WORKSPACE"),e.createElement("h2",null,"Team workspace is not available yet."),e.createElement("p",null,"The workspace administrator needs to connect shared storage before Staff can sign in here."),e.createElement("div",{className:"setup-grid"},[["01","Connect shared storage","The workspace administrator completes this setup."],["02","Set up staff access","The administrator sets up approval and account security."],["03","Connect this dashboard","The administrator connects the app, then Staff can sign in."]].map(([a,d,o])=>e.createElement("div",{key:a},e.createElement("b",null,a),e.createElement("h3",null,d),e.createElement("p",null,o)))),e.createElement("a",{className:"primary",href:"https://supabase.com/dashboard",target:"_blank",rel:"noreferrer"},"Administrator setup ",e.createElement(Nt,{size:16})),e.createElement("p",{className:"caption"},"Contact the workspace administrator for help. The public demo can be used without Staff access."))}export{Ft as default};
frontend/dist/assets/index-Bcox7ps8.css ADDED
@@ -0,0 +1 @@
 
 
1
+ :root{font-family:Inter,Segoe UI,system-ui,sans-serif;color:#20383b;background:#f5f7f7;font-synthesis:none;font-weight:400;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:disabled{opacity:.52;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #35b6a5;outline-offset:3px}button{border:0;background:none;color:inherit}h1,h2,h3,p{margin:0}h1{font-size:38px;line-height:1.2;letter-spacing:-1.1px;font-weight:650}h2{font-size:20px;letter-spacing:-.25px;font-weight:650}h3{font-size:18px}p{line-height:1.65}.app{display:flex;min-height:100vh}.sidebar{background:#142f33;color:#aec0c2;width:242px;position:fixed;inset:0 auto 0 0;padding:31px 19px 22px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;color:#fff;gap:10px;margin-bottom:47px}.brand>div{font-weight:700;letter-spacing:-.5px;font-size:24px}.brand span:not(.brand-mark){font-size:10px;display:block;letter-spacing:1.8px;font-weight:500;margin-top:6px;color:#9bb5b8}.brand-mark{background:#2f6d67;width:37px;height:40px;border-radius:10px;display:grid;place-items:center;color:#a3e6d9}.brand b{font-size:13px;color:#a3e6d9;font-weight:500;border:1px solid #426468;border-radius:5px;padding:3px;margin-left:auto}.workspace-label{font-size:13px;letter-spacing:1.6px;color:#739095;margin:0 13px 14px}nav{display:grid;gap:7px}nav button{display:flex;align-items:center;gap:11px;text-align:left;padding:12px 13px;border-radius:7px;font-size:15px;color:#adc3c5;white-space:nowrap}nav button.active{background:#2a5556;color:#e0f7ee;font-weight:600}nav button.active svg{color:#9fdbc7}nav button:hover{background:#24464a}.nav-count{margin-left:auto;font-size:13px;background:#b98243;color:#fff;border-radius:4px;min-width:20px;text-align:center;padding:2px}.sidebar-bottom{margin-top:auto}.local-card{margin-top:40px;padding:15px 12px;border:1px solid #365054;border-radius:7px;font-size:13px}.local-card strong{font-size:13px;vertical-align:middle;color:#c2d5d3}.local-card p{color:#819ea2;line-height:1.9;margin:8px 0 0 15px}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#65c4a2;margin-right:7px;vertical-align:middle}.status-dot.offline{background:#d6aa60}.sidebar-foot{display:flex;align-items:center;justify-content:center;gap:7px;color:#7e9b9f;font-size:13px;padding-top:23px}main{margin-left:242px;flex:1;min-width:0}.topbar{height:73px;border-bottom:1px solid #e3e9e8;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 37px;font-size:14px;color:#7b898a}.topbar>span,.topbar>div{display:flex;align-items:center;gap:13px}.environment{font-size:12px;letter-spacing:1px;color:#69827e}.avatar{background:#eaf0ef;color:#49605e;border-radius:50%;width:29px;height:29px;display:grid;place-items:center;font-size:13px;font-weight:600;margin-left:8px}.content{max-width:1570px;margin:auto;padding:35px 37px 0}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:29px}.eyebrow{font-size:12px;font-weight:650;letter-spacing:1.7px;color:#6f8c85;margin-bottom:9px}.page-heading>div>p:last-child{color:#7b8a8a;font-size:15px;margin-top:9px}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:9px;border-radius:6px;padding:12px 16px;font-size:14px;font-weight:600;white-space:nowrap}.primary{background:#23796c;color:#fff}.primary:hover:not(:disabled){background:#1b6157}.secondary{background:#fff;border:1px solid #dbe4e2;color:#536a68}.text-button{color:#30786c;font-size:14px;font-weight:600;display:inline-flex;align-items:center;gap:8px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin-bottom:24px}.card{background:#fff;border:1px solid #e0e7e5;border-radius:9px;padding:23px;margin-bottom:24px;box-shadow:0 2px 2px #163d3502}.stat{padding:20px 22px;margin-bottom:0}.stat>div{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:#788a87}.stat strong{font-size:32px;letter-spacing:-1px;font-weight:600;display:block;margin:12px 0 7px}.stat small{font-size:13px;color:#8c9996}.teal{color:#3c8075}.green{color:#5a9d7c}.orange{color:#d68b61}.amber{color:#c3a253}.overview-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:24px}.hero-card{position:relative;border-radius:9px;overflow:hidden;background:#183e3f;min-height:330px;padding:30px;color:#f2faf7;margin-bottom:24px}.hero-card .pill{display:inline-flex;align-items:center;gap:6px;font-size:11px;letter-spacing:1px;background:#365b56;color:#b7dace;padding:6px 8px;border-radius:4px}.hero-card h2{font-size:24px;line-height:1.4;letter-spacing:-.7px;margin:18px 0 12px;position:relative;z-index:2}.hero-card p{font-size:14px;color:#aac6be;max-width:59%;position:relative;z-index:2}.hero-card .light{margin-top:23px;background:#ddf1e6;color:#275f52}.scan-visual{position:absolute;inset:52px 18px 40px auto;width:35%;border:1px solid #4b7970;border-radius:7px;background:#305858;transform:rotate(-5deg);padding:8px}.scan-visual img{width:100%;height:100%;object-fit:cover;border-radius:4px;opacity:.65;filter:saturate(.65)}.scan-visual>span{position:absolute;bottom:-23px;left:-10px;font-size:10px;letter-spacing:1px;white-space:nowrap;color:#b7dace}.scan-corner{position:absolute;z-index:1;top:20px;right:20px;bottom:20px;left:20px;border:1px solid #aad7bd;border-radius:4px}.scan-corner:after{content:"";position:absolute;top:47%;left:-6px;right:-6px;height:1px;background:#c0eaca;box-shadow:0 0 12px #c3f5df}.section-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:21px}.section-title p{font-size:14px;color:#8a9795;margin-top:6px}.subtle-tag{font-size:11px;letter-spacing:.7px;color:#6b8981;background:#f0f5f3;border:1px solid #e1ebe6;border-radius:4px;padding:5px 7px;white-space:nowrap}.pipeline-step{display:flex;gap:13px;margin-bottom:19px;align-items:center}.pipeline-step>span{font-size:13px;border:1px solid #dce7e3;border-radius:50%;width:28px;height:28px;display:grid;place-items:center;color:#588b7e}.pipeline-step strong{font-size:14px}.pipeline-step p{font-size:13px;color:#8b9a96;line-height:1.6;margin-top:2px}.readiness{padding:23px}.readiness .note{font-size:12px;padding:11px}.note{background:#f1f6f3;color:#668377;border:1px solid #e2ece5;border-radius:5px;display:flex;align-items:flex-start;gap:9px;padding:13px;font-size:14px;line-height:1.6}.note svg{flex-shrink:0;margin-top:1px}.note p{font-size:14px}.standalone{margin-bottom:24px}.standalone strong{color:#45695b}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:14px}th{text-align:left;color:#83938e;font-size:12px;letter-spacing:.2px;background:#f7f9f8;padding:12px;font-weight:500}td{padding:15px 12px;border-bottom:1px solid #edf1ef;color:#5f736d}td strong{font-weight:600;color:#3c5950}td small{display:block;color:#96a29d;font-size:12px;margin-top:5px}tr:last-child td{border-bottom:0}.badge{display:inline-flex;align-items:center;gap:6px;border:1px solid #d4e8dc;background:#edf8f0;color:#558068;font-size:13px;border-radius:5px;padding:5px 8px}.badge i{width:4px;height:4px;border-radius:50%;background:currentColor}.badge.anomalous{background:#fcf0ea;border-color:#f3dacc;color:#b17a57}.badge.uncertain{background:#f9f4e6;border-color:#ede2bd;color:#a38e52}.icon-button{width:29px;height:29px;border:1px solid #e1e9e5;border-radius:5px;display:inline-grid;place-items:center;color:#6c8d7e}.gallery{display:grid;grid-template-columns:repeat(6,1fr);gap:14px;margin-bottom:24px}.sample{background:#fff;border:1px solid #dfe7e2;border-radius:8px;padding:0;text-align:left;overflow:hidden}.sample:hover{border-color:#73a28d}.sample img{width:100%;height:110px;object-fit:cover;background:#e6edeb}.sample>div{padding:13px 11px}.sample strong{font-size:14px}.sample span{font-size:11px;color:#889990;display:flex;justify-content:space-between;margin-top:5px}.inspection-grid{display:grid;grid-template-columns:330px minmax(0,1fr);gap:24px}.field{font-size:14px;font-weight:600;display:block;margin-bottom:20px;color:#496658}.field>span{font-weight:400;color:#93a098;font-size:13px;margin-left:5px}select,input{border:1px solid #dce5df;border-radius:5px;background:#fff;color:#536c5f;min-height:39px;padding:9px 11px;width:100%;font-size:14px}.field select,.field input{margin-top:9px}.drop-zone{border:1px dashed #b9cfc0;background:#f8faf8;border-radius:7px;min-height:195px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:20px;gap:12px;cursor:pointer;position:relative;color:#6d917c;text-align:center}.drop-zone span{font-size:12px;color:#9ba99e}.drop-zone img{width:100%;height:140px;object-fit:contain}.drop-zone input{opacity:0;position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;cursor:pointer}.drop-zone:focus-within{outline:3px solid #35b6a5;outline-offset:3px}.caption{font-size:12px;color:#8a9d8e;line-height:1.7;margin-top:12px}.upload-card .caption:last-child{text-align:center}.wide{width:100%;margin-top:19px}.empty{min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#96a99b;gap:12px;padding:20px}.empty p{font-size:15px;max-width:350px}.empty h3{font-size:17px;color:#557362}.result-banner{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px}.result-banner h2{margin-top:13px;font-size:24px}.result-banner p{font-size:13px;color:#8c9c90;margin-top:6px}.image-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px;font-size:13px;color:#849a8b}.result-image{width:100%;max-height:390px;object-fit:contain;background:#f2f6f3;border:1px solid #e5ece6;border-radius:7px}.score-grid{display:grid;grid-template-columns:repeat(3,1fr);margin:20px 0;gap:18px}.score-grid>div{border-right:1px solid #e7ede7}.score-grid>div:last-child{border:0}.score-grid small{font-size:13px;color:#8aa08f;display:block}.score-grid strong{font-size:26px;font-weight:550;display:block;margin-top:8px;color:#405f4a}.filters{display:flex;align-items:center;gap:12px;background:#f7f9f7;padding:12px;margin-bottom:16px;border-radius:5px;color:#809885}.filters select{max-width:170px;font-size:13px}.filters>span{margin-left:auto;font-size:13px;white-space:nowrap}.muted{color:#8c9e90}.table-caption{padding:8px 12px}.assistant h2{display:flex;align-items:center;gap:8px}.observation{display:flex;gap:14px;background:#f1f6f1;padding:13px;border-radius:6px;font-size:14px;color:#64846a;align-items:center}.observation strong{font-size:11px;letter-spacing:1px;white-space:nowrap}.suggestions{display:flex;gap:10px;margin:25px 0;flex-wrap:wrap}.suggestions button{border:1px solid #dfe9df;border-radius:6px;padding:12px;font-size:13px;display:flex;gap:15px;align-items:center;color:#65846b}.question-form{display:flex;gap:10px;margin-top:21px}.question-form input{flex:1}.conversation{margin-top:20px}.user-message{margin-left:15%;padding:16px;border-radius:6px;background:#edf4ee;margin-bottom:16px;font-size:15px}.user-message strong{font-size:13px;color:#7c947f}.user-message p{margin-top:6px}.assistant-message{border:1px solid #e3ebe2;border-radius:6px;padding:18px;margin-bottom:18px}.assistant-message>div:first-child{display:flex;align-items:center;justify-content:space-between}.assistant-message strong{font-size:14px}.answer-text{font-size:15px;white-space:pre-wrap;margin:14px 0}.trace{color:#99a798;font-size:11px;display:block;margin-top:13px}details{font-size:14px;color:#608166}summary{cursor:pointer;padding:10px 0}.source{background:#f6f9f4;padding:12px;border-radius:5px;margin:8px 0}.source p{font-size:14px;color:#798f78;white-space:pre-wrap;margin:8px 0}.source small{display:block;color:#90a08a;font-size:12px}.source a{display:flex;align-items:center;gap:5px;color:#3b7e52;font-size:13px;margin-top:8px}.generating{display:flex;gap:9px;align-items:center;font-size:14px;color:#658e6b;padding:15px 0}.alert-row{display:flex;gap:17px;align-items:center;border-top:1px solid #edf0ea;padding:19px 0}.alert-row>svg{color:#bd9b65}.alert-row>div{flex:1}.alert-row strong{font-size:15px}.alert-row p{font-size:13px;color:#94a38d;margin-top:5px}.performance-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.performance-grid .card{min-width:0}.performance-grid .section-title{gap:7px}.performance-grid p{font-size:13px}.matrix{display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px;margin:17px 0 25px;align-items:center;text-align:center}.matrix small{font-size:11px;color:#8a9c82}.matrix b{font-size:22px;font-weight:500;background:#f9f1e9;color:#ad987a;padding:15px 0;border-radius:4px}.matrix b.correct{background:#eaf3e8;color:#658460}dl>div{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #edf0e8;padding:10px 0;font-size:12px}dt{color:#90a087}dd{margin:0;color:#668060;text-align:right}.about p{font-size:15px;color:#82937a;margin:14px 0}.about h3{font-size:16px;margin-top:27px;color:#627b57}.source-link{display:flex;align-items:center;justify-content:space-between;padding:23px 0;border-bottom:1px solid #e9eee4;color:#7c956d}.source-link strong{font-size:15px}.source-link small{display:block;font-size:13px;color:#a1ac97;margin-top:6px}.about .note{margin-top:22px}.error{background:#fcf0ed;border:1px solid #f0d5cb;color:#a5654e;display:flex;gap:10px;align-items:center;padding:14px;border-radius:6px;font-size:15px;margin-bottom:23px}.error span{flex:1}.error button{color:inherit;display:grid;place-items:center}.batch-summary{margin:22px 0}.batch-summary p{font-size:15px;color:#83927b;margin-top:8px}footer{border-top:1px solid #e2e9e0;margin-top:12px;padding:22px 0;color:#8c9d86;display:flex;gap:17px;font-size:12px}footer>span:first-child{flex:1}.spin{animation:spin 1.2s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(min-width:1500px){.hero-card h2{font-size:34px}.hero-card{min-height:340px}.gallery .sample img{height:140px}}@media(max-width:1200px){.sidebar{width:214px;padding-left:14px;padding-right:14px}main{margin-left:214px}.content{padding:28px 25px 0}.topbar{padding:0 25px}.hero-card{padding:24px}.hero-card h2{font-size:24px}.overview-grid{grid-template-columns:1.15fr 1fr;gap:18px}.hero-card p{max-width:65%}.scan-visual{width:29%;right:14px}.gallery{grid-template-columns:repeat(3,1fr)}.sample img{height:140px}.inspection-grid{grid-template-columns:285px minmax(0,1fr);gap:18px}.card{padding:19px}.performance-grid{grid-template-columns:1fr}.performance-grid .matrix{max-width:350px}.performance-grid dl{display:grid;grid-template-columns:repeat(2,1fr);gap:0 30px}.filters{flex-wrap:wrap}.filters select{flex:1;min-width:110px}}@media(max-width:900px){.overview-grid{grid-template-columns:1fr}.hero-card{min-height:285px}.scan-visual{width:28%;right:32px;top:25px}.hero-card p{max-width:60%}.inspection-grid{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(2,1fr)}.page-heading{align-items:flex-start}h1{font-size:32px}.brand>div{font-size:20px}.brand span:not(.brand-mark){font-size:10px}.sidebar{width:200px}main{margin-left:200px}.alert-row{flex-wrap:wrap}.alert-row>div{min-width:180px}}@media(max-width:680px){.app{display:block}.sidebar{width:100%;position:relative;padding:16px 18px 0;display:block}.brand{margin-bottom:20px;width:185px}.brand>div{font-size:22px}.workspace-label,.sidebar-bottom{display:none}nav{display:flex;overflow:auto;gap:4px;margin:0 -5px;padding:0 0 12px}nav button{font-size:13px;padding:10px;gap:7px}nav button svg{width:15px;min-width:15px}.sidebar nav .nav-count{font-size:11px}main{margin:0}.topbar{height:50px;padding:0 19px;font-size:12px}.environment{font-size:10px}.avatar{width:25px;height:25px;font-size:11px}.content{padding:26px 18px 0}.page-heading{display:block;margin-bottom:25px}.page-heading>.primary{margin-top:18px}h1{font-size:30px}.stats-grid{gap:10px}.stat{padding:17px}.stat strong{font-size:32px}.stat small{font-size:11px}.hero-card{padding:23px;min-height:310px}.hero-card h2{font-size:25px}.hero-card p{max-width:62%}.scan-visual{width:27%;right:18px;top:65px;bottom:55px}.scan-visual>span{font-size:5px;left:-8px}.gallery{grid-template-columns:repeat(2,1fr);gap:10px}.sample img{height:120px}.sample span{font-size:11px}.card{padding:18px;margin-bottom:18px}.section-title{gap:10px}.section-title h2{font-size:17px}.section-title p{font-size:13px}.subtle-tag{font-size:10px}.section-title>.subtle-tag{max-width:130px;white-space:normal}.observation{display:block}.observation span{display:block;margin-top:7px;font-size:13px}.assistant-message>div:first-child{gap:12px}.assistant-message{padding:12px}.score-grid{gap:12px}.score-grid strong{font-size:24px}.score-grid small{font-size:11px}.result-banner h2{font-size:20px}.result-banner{align-items:flex-start}.result-banner .secondary{padding:9px;font-size:12px}.performance-grid dl{display:block}.filters{gap:8px}.filters>svg{display:none}.filters select{min-width:90px}.filters>span{width:100%;font-size:12px}.question-form{gap:6px}.question-form .primary{padding:10px}.question-form input{min-width:0}.alert-row{gap:10px}.alert-row>div{min-width:140px}.alert-row .secondary{font-size:13px;padding:10px}footer{flex-wrap:wrap;font-size:11px;gap:9px}footer>span:last-child{width:100%}.source-link{padding:18px 0}}@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}.showcase-banner{display:flex;gap:14px;padding:18px 22px;background:#e4f3ee;border:1px solid #95c9ba;border-radius:14px;margin:0 0 24px;color:#154b40}.showcase-banner svg{flex-shrink:0;margin-top:2px}.showcase-banner p{margin:6px 0 0;line-height:1.55;font-size:16px}.upload-card .gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.upload-card .sample img{height:110px}.upload-card .sample{min-width:0}:root{--ink:#1d2541;--muted:#66728b;--accent:#6556e8;--blue:#247bef;--line:#e1e5f1;--surface:#fff;font-family:Segoe UI,Inter,system-ui,sans-serif;color:var(--ink);background:#f4f5fb;font-size:16px;font-weight:450;--shadow:0 5px 24px #26345e08}body{background:radial-gradient(ellipse at 90% 0,#e9e8fd 0,transparent 40%),#f4f5fb}button,a,input,select,summary{transition:background .18s,border-color .18s,box-shadow .18s,transform .18s,color .18s}button:active:not(:disabled){transform:translateY(1px)}.sidebar{background:linear-gradient(180deg,#171d37,#202347 70%,#302958);color:#b7c2df;border-right:1px solid #3e4167;padding-top:25px}.brand{margin-bottom:28px;gap:11px}.brand>div{font-size:26px;letter-spacing:-1px}.brand span:not(.brand-mark){font-size:8px;letter-spacing:1.5px;color:#bdc2e6}.brand-mark{background:none;width:42px;height:42px}.brand-mark img{width:42px;height:42px}.workspace-label{color:#8993bb;font-size:10px;margin-bottom:12px}nav{gap:5px;overflow:auto;scrollbar-width:thin;scrollbar-color:#555c8c transparent}nav button{font-size:14px;padding:11px 12px;color:#c4cbe3}nav button.active{background:linear-gradient(105deg,#6556e8,#4d4aa2);color:#fff;box-shadow:0 5px 14px #0b0e2b50}nav button.active svg{color:#fff}nav button:hover{background:#343959;color:#fff}.nav-count{background:#f3a64a;color:#1d2541;font-weight:700}.local-card{background:#ffffff07;border-color:#525776;margin-top:22px}.local-card strong{font-size:12px;color:#e0e5f7}.local-card p{font-size:11px;color:#b1b9d8}.sidebar-foot{font-size:11px;color:#afb5d6}.status-dot{background:#4fd6b1;box-shadow:0 0 0 3px #4fd6b114}.topbar{background:#ffffffc9;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);color:#74809a;border-color:var(--line);height:68px;font-size:13px}.environment{font-size:10px;color:#5a5e99}.avatar{background:#e9e7ff;color:#6556ba}.content{padding-top:32px}.page-heading{margin-bottom:28px}.page-heading h1{font-size:38px;letter-spacing:-1.4px;color:#202841;font-weight:720}.page-heading>div>p:last-child{font-size:16px;color:var(--muted);max-width:700px}.eyebrow{color:#6d61bd;font-size:11px;letter-spacing:1.8px;font-weight:700;margin-bottom:11px}.card{border-color:var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--shadow);padding:25px;margin-bottom:24px}.section-title{margin-bottom:21px}.section-title h2{color:var(--ink);font-size:20px;font-weight:680}.section-title h2 svg{vertical-align:middle;margin-right:4px}.section-title p{font-size:14px;color:var(--muted);line-height:1.55}.section-title>div{min-width:0}.subtle-tag{border-color:#e1dcfb;background:#f1eefe;color:#625998;display:inline-flex;align-items:center;gap:5px;border-radius:6px;font-size:10px}.stats-grid{gap:17px}.stat{position:relative;overflow:hidden}.stat:after{content:"";position:absolute;width:80px;height:80px;right:-35px;bottom:-35px;border-radius:50%;background:#f2f0ff}.stat>div{font-size:14px;color:#64708b}.stat strong{font-size:38px;line-height:1.25;font-weight:720;color:#26304d;letter-spacing:-1px}.stat small{font-size:12px;color:#79839a}.stat:nth-child(2):after{background:#eaf9f0}.stat:nth-child(3):after{background:#fff2e7}.stat:nth-child(4):after{background:#fff8da}.teal{color:#7861e8}.green{color:#25936c}.orange{color:#de7d38}.amber{color:#bc961b}.primary{background:linear-gradient(110deg,#6b54e8,#4b69e6);border-radius:9px;color:#fff;box-shadow:0 4px 10px #6757dc25;font-size:14px;min-height:42px;padding:11px 17px;font-weight:600}.primary:hover{box-shadow:0 6px 18px #6757dc40;filter:brightness(1.05);transform:translateY(-1px)}.secondary{border:1px solid #dce0f0;border-radius:9px;color:#5d5a8d;background:#fff;font-size:13px;padding:10px 13px;display:inline-flex;align-items:center;gap:7px;justify-content:center}.secondary:hover{background:#f3f1ff;border-color:#b7aceb}.secondary.selected{background:#eeebff;border-color:#8f7ce7}.danger{color:#b34d5f}.text-button{color:#6c5ccc;font-size:13px}.icon-button{border-color:#dfe0ef;border-radius:8px;color:#7167a6;background:#fff;width:33px;height:33px}.icon-button:hover{background:#eeeafa;border-color:#b8a9ea}.button-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.button-row>.primary,.button-row>.secondary{white-space:nowrap}.hero-card{background:linear-gradient(125deg,#373073,#3a4e9a 60%,#2469a3);border-radius:17px;box-shadow:0 10px 28px #2526591a;min-height:330px}.hero-card h2{font-size:29px;font-weight:680;color:#fff;max-width:65%;line-height:1.28}.hero-card p{font-size:14px;color:#d1d8f5;max-width:61%;line-height:1.65}.pill{background:#ffffff16;color:#e0dffd;border-color:#ffffff26;font-size:10px}.primary.light{background:#fff;color:#4f469b;box-shadow:none}.scan-visual{transform:rotate(-4deg);box-shadow:0 15px 30px #0b133b40;border-color:#b9b1f6;border-radius:10px;overflow:hidden;animation:float-image 7s ease-in-out infinite}.scan-corner{border-color:#e4dcff}.scan-corner:after{background:#9cdffd;box-shadow:0 0 14px #91d9ff;animation:scan-sweep 4s ease-in-out infinite}.scan-visual>span{background:#252044d9;color:#d3e9ff;font-size:8px}.pipeline-step strong{font-size:14px;color:#37415f}.pipeline-step p{font-size:13px;color:#78839a}.pipeline-step>span{border-color:#ddd5f7;color:#7962c1;background:#faf8ff;font-size:11px}.readiness .note{font-size:12px}.note{border-color:#dddff1;background:#f5f5fc;color:#656985;border-radius:9px;font-size:13px;line-height:1.6}.note p{font-size:13px}.showcase-banner{background:linear-gradient(100deg,#ede9ff,#e9f2ff);border-color:#d5d0f4;border-radius:14px;color:#514b84;padding:19px 21px}.showcase-banner p,table{font-size:14px}th{background:#f5f6fc;color:#8189a1;font-size:11px;padding:13px 12px;font-weight:650}td{padding:17px 12px;border-color:#edf0f7;color:#66718b}td strong{color:#374261}td small{font-size:11px;color:#8991a8;margin-top:6px}tbody tr{transition:background .16s}tbody tr:hover{background:#f8f7ff}.badge{font-size:12px;padding:6px 10px;border-radius:7px}.badge.good{color:#217a57;background:#eaf8f0;border-color:#c9ead8}.badge.anomalous{color:#b66331;background:#fff0e5;border-color:#f8d7bd}.badge.uncertain{color:#a17b0d;background:#fff8df;border-color:#eddda0}.filters{background:#f5f6fc;border-radius:10px;padding:14px;color:#78819a}.filters select{font-size:13px;max-width:190px}.filters>span{font-size:12px}.gallery{grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.sample{border-color:#e0e3ef;border-radius:12px;transition:transform .18s,box-shadow .18s,border-color .18s}.sample:hover{transform:translateY(-4px);box-shadow:0 9px 24px #3c32651c;border-color:#a697e7}.sample img{height:140px}.sample>div{padding:13px}.sample strong{font-size:14px;color:#3c4561}.sample span{font-size:11px;color:#8388a2}.sample img{transition:transform .35s}.sample:hover img{transform:scale(1.035)}.field{font-size:14px;color:#525c79}.field>span{font-size:12px;color:#9497ad}select,input{min-height:43px;border-color:#dce0ee;border-radius:8px;color:#4e5872;font-size:14px;padding:10px 12px}input:focus,select:focus{border-color:#9c88e5;box-shadow:0 0 0 3px #8c74e51a}.drop-zone{border-color:#bdb0e5;background:#f8f6ff;color:#8170bc;border-radius:13px;min-height:200px}.drop-zone:hover{border-color:#8a6ce4;background:#f2edff}.drop-zone strong{font-size:15px}.drop-zone span{font-size:12px}.caption{color:#7e86a0;font-size:12px;line-height:1.7}.empty{color:#9298b2}.empty p{font-size:15px}.empty h3{color:#626b8e}.result-banner h2{font-size:24px;color:#303b5a}.result-banner p{font-size:12px;color:#7c87a1}.image-toolbar{font-size:13px;color:#78819c}.score-grid small{color:#7a839e;font-size:13px}.score-grid strong{color:#4d438c;font-size:27px;font-weight:650}.score-grid>div{border-color:#e5e2f3}.viewer-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0}.viewer-controls>div{display:flex;align-items:center;gap:8px;font-size:12px;color:#7f80a1}.viewer-stage{height:350px;position:relative;border:1px solid #e0e2ef;border-radius:12px;background:repeating-conic-gradient(#f0f1f7,#f0f1f7 25%,#f8f8fc 0%,#f8f8fc 50%) 50%/20px 20px;overflow:hidden}.viewer-image-wrap{position:absolute;top:0;right:0;bottom:0;left:0;transition:transform .25s}.viewer-original,.viewer-overlay{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:contain}.viewer-overlay{clip-path:inset(0 0 0 var(--split))}.viewer-overlay.full{clip-path:none}.comparison-line{position:absolute;top:0;bottom:0;left:var(--split);width:2px;background:#fff;box-shadow:0 0 0 1px #6556e8;pointer-events:none}.comparison-line:after{content:"↔";position:absolute;top:48%;left:-17px;width:34px;height:34px;border-radius:50%;background:#fff;color:#6556e8;display:grid;place-items:center;box-shadow:0 2px 14px #35304f30}.comparison-range{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;cursor:ew-resize;padding:0;margin:0}.viewer-stage:focus-within{outline:3px solid #a18cef;outline-offset:2px}.viewer-label{position:absolute;top:12px;padding:6px 9px;background:#20283ecf;color:#fff;border-radius:5px;font-size:9px;letter-spacing:1px;pointer-events:none}.viewer-label.left{left:12px}.viewer-label.right{right:12px}.image-dialog,.confirmation-dialog{border:1px solid #d9d5ed;border-radius:18px;padding:26px;box-shadow:0 24px 90px #11152655;color:var(--ink);max-width:min(94vw,1100px)}dialog::backdrop{background:#171931a8;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.image-dialog{width:1000px}.image-dialog .viewer-stage{height:70vh}.confirmation-dialog{width:520px}.confirmation-dialog h2{font-size:26px;line-height:1.25}.confirmation-dialog>p{margin:17px 0;color:#77809b;font-size:15px}.confirmation-dialog .note{margin-bottom:23px}.confirmation-dialog .button-row{justify-content:flex-end}.observation{background:linear-gradient(110deg,#eeebfb,#ecf2fc);color:#5a568a;border:1px solid #e3dff5;border-radius:10px;font-size:14px;flex-wrap:wrap}.observation strong{font-size:10px;color:#7866ad}.suggestions{gap:9px;margin:20px 0}.suggestions button{font-size:13px;color:#71619e;border-color:#ddd6ef;border-radius:9px;padding:10px 12px;background:#fcfbff}.suggestions button:hover{background:#efe9fd;border-color:#b8a8df}.user-message{background:#eeebfc;color:#4e467a;border-radius:13px 13px 3px;font-size:15px}.user-message strong{font-size:11px;color:#9585b6}.assistant-message{border-color:#e1def0;background:linear-gradient(130deg,#fff,#faf9ff);border-radius:13px;padding:22px}.assistant-message strong{font-size:14px;color:#625281}.answer-text{font-size:16px;line-height:1.85;color:#45506c;margin:17px 0}.source{background:#f3f1fa;border-radius:8px;padding:15px}.source p{font-size:14px;color:#6e6c87;line-height:1.75}.source strong{font-size:12px}.source small{font-size:11px;color:#9691aa}.source a{font-size:12px;color:#6f5cc6}.workflow-details{margin-top:13px;border-top:1px solid #e8e3f4;padding-top:3px}.workflow-details summary{font-size:12px;color:#9a91b0}.workflow-details p{font-size:12px;color:#8c829f}.trace{font-size:11px;color:#a398b7}.generating{font-size:14px;color:#7663ae}.generating .spin{color:#8165d8}.question-form input{font-size:15px}.question-form .primary{min-width:90px}.assistant .section-title{flex-wrap:wrap}.error{font-size:14px;background:#fff1ef;border-color:#f1cfc8;color:#a65045;border-radius:10px}.success{display:flex;align-items:center;gap:10px;margin-bottom:22px;border:1px solid #c7e9db;background:#edf9f2;color:#377963;padding:14px;border-radius:10px;font-size:14px}.success span{flex:1}.alert-row{border-color:#ebe7f3}.alert-row strong{font-size:15px;color:#5b527b}.alert-row p{font-size:12px;color:#8b85a0}.performance-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.performance-grid p{font-size:13px;color:#82829a}.performance-grid .section-title h2{font-size:18px}.performance-grid .section-title{flex-wrap:wrap}.matrix small{font-size:11px;color:#9290a7}.matrix b{font-size:24px;background:#fff0e5;color:#a77e5c}.matrix b.correct{background:#eeebfa;color:#7961b2}dl>div{font-size:12px;border-color:#e9e6f0}dt{color:#9288a3}dd{color:#6e5f86}.about p{font-size:15px;color:#7a7791;line-height:1.85}.about h3{font-size:17px;color:#6e608b}.source-link strong{font-size:15px;color:#71658c}.source-link small{font-size:12px;color:#9b91ac}.source-link{border-color:#ece7f1}.about .note{font-size:13px}.muted{color:var(--muted)}footer{color:#9290a8;font-size:12px;border-color:#dddbea;padding:23px 0}.setup-icon{width:57px;height:57px;background:linear-gradient(125deg,#eee6ff,#e5f0ff);color:#8061c7;border-radius:16px;display:grid;place-items:center}.cloud-setup{padding:36px}.cloud-setup>.eyebrow{display:block;margin-top:25px}.cloud-setup>h2{font-size:30px;margin-bottom:17px}.cloud-setup>p{max-width:760px;color:var(--muted);font-size:16px;line-height:1.8}.setup-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:32px 0}.setup-grid>div{padding:23px;background:#f7f5fd;border:1px solid #e4ddf4;border-radius:12px}.setup-grid b{color:#a396c5;font-size:13px}.setup-grid h3{font-size:17px;margin:15px 0 9px}.setup-grid p{font-size:14px;color:#9286a6;line-height:1.7}.login-form{max-width:440px;margin:28px 0}.login-form .text-button{margin-left:16px}.team-toolbar{display:flex;align-items:center;gap:13px;flex-wrap:wrap;margin:20px 0;color:#7d719b;font-size:13px}.team-toolbar>div:first-child{display:flex;align-items:center;gap:10px;flex:1}.team-toolbar>span:first-child{flex:1}.shared-images{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:20px 0}.shared-images img{width:100%;height:320px;object-fit:contain;background:#f2eff8;border-radius:12px}.cloud-message{padding:15px 17px;border:1px solid #e6e1ee;border-radius:10px;margin:12px 0;color:#7b6a8c;font-size:15px;white-space:pre-wrap}.cloud-message small{font-size:11px;color:#aa9bb6}.section-gap{margin:27px 0 16px}.benchmark-intro{display:flex;align-items:center;gap:25px;background:linear-gradient(115deg,#eeebff,#eff5ff);border-color:#d8d4f0}.benchmark-intro h2{font-size:27px;color:#594c80}.benchmark-intro p{font-size:15px;color:#82729d;line-height:1.8;max-width:850px;margin-top:14px}.benchmark-intro>svg{color:#a28cc9;flex-shrink:0}.training-steps{display:grid;gap:10px;margin-bottom:24px}.training-steps details{border:1px solid #e5dff0;border-radius:10px;background:#faf8fd;padding:7px 17px}.training-steps summary{display:flex;align-items:center;gap:14px;color:#75608f;font-size:15px;list-style:none}.training-steps summary>span{font-size:11px;border:1px solid #dcd0eb;color:#ac8cbb;border-radius:50%;width:28px;height:28px;display:grid;place-items:center}.training-steps details p{margin:5px 0 15px 43px;font-size:14px;color:#8b789e;line-height:1.75}.content{animation:page-in .28s ease-out}.card{animation:card-in .32s ease-out both}.stats-grid .card:nth-child(2){animation-delay:35ms}.stats-grid .card:nth-child(3){animation-delay:.07s}.stats-grid .card:nth-child(4){animation-delay:.105s}@keyframes page-in{0%{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes card-in{0%{opacity:.5;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}@keyframes float-image{0%,to{transform:rotate(-4deg) translateY(0)}50%{transform:rotate(-3deg) translateY(-6px)}}@keyframes scan-sweep{0%,to{top:25%;opacity:.5}50%{top:75%;opacity:1}}@media(min-width:901px){.sidebar{width:250px}main{margin-left:250px}.content,.topbar{padding-left:32px;padding-right:32px}.inspection-grid{grid-template-columns:310px minmax(0,1fr)}}@media(max-width:1250px){.performance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-grid{grid-template-columns:1fr}.hero-card{min-height:290px}.hero-card h2{font-size:31px}.scan-visual{width:26%;top:23px;bottom:23px;right:35px}.readiness{display:none}.gallery{grid-template-columns:repeat(3,minmax(0,1fr))}.setup-grid{grid-template-columns:1fr}.page-heading h1{font-size:34px}.section-title{flex-wrap:wrap}}@media(max-width:900px){.sidebar{width:205px}main{margin-left:205px}.sidebar nav button{font-size:12px;padding:11px 8px}.content{padding:26px 22px 0}.inspection-grid{grid-template-columns:1fr}.upload-card .gallery{grid-template-columns:repeat(4,minmax(0,1fr))}.performance-grid{grid-template-columns:1fr}.viewer-stage{height:380px}.stats-grid{grid-template-columns:repeat(2,1fr)}.card{padding:22px}.hero-card h2{font-size:27px}}@media(max-width:680px){.sidebar{width:100%;position:relative;padding:18px 18px 0}.sidebar nav{overflow:auto}.sidebar nav button{font-size:12px;padding:10px;min-height:40px}.brand{margin-bottom:18px}.brand>div{font-size:23px}main{margin:0}.content{padding:24px 16px 0}.page-heading h1{font-size:31px}.page-heading>div>p:last-child{font-size:15px}.card{padding:19px;border-radius:13px}.topbar{padding:0 17px;height:53px}.environment{font-size:8px}.stats-grid{gap:11px}.stat strong{font-size:31px}.stat small{font-size:11px}.hero-card{min-height:330px;padding:24px}.hero-card h2{font-size:27px;max-width:70%}.hero-card p{font-size:13px;max-width:68%}.scan-visual{width:23%;right:18px;top:80px;bottom:85px}.gallery,.upload-card .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.sample img{height:135px}.viewer-controls{justify-content:center}.viewer-stage{height:300px}.viewer-label{font-size:8px}.section-title h2{font-size:19px}.section-title p{font-size:13px}.result-banner{flex-wrap:wrap}.result-banner h2{font-size:22px}.result-banner p{font-size:12px}.score-grid strong{font-size:23px}.score-grid small{font-size:11px}.observation{font-size:13px}.assistant-message{padding:16px}.answer-text{font-size:15px}.assistant-message>div:first-child{flex-wrap:wrap;gap:10px}.suggestions button{font-size:12px}.shared-images{grid-template-columns:1fr}.benchmark-intro>svg{display:none}.benchmark-intro h2{font-size:24px}.cloud-setup{padding:23px}.cloud-setup>h2{font-size:26px}.team-toolbar>.secondary{font-size:12px}.confirmation-dialog{padding:23px}.confirmation-dialog h2{font-size:24px}footer{font-size:10px}.source-link strong{font-size:14px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}.tutorial-dialog{width:min(650px,calc(100vw - 32px));max-height:88dvh;box-sizing:border-box;border:1px solid #dcd8ef;border-radius:20px;padding:28px;margin:auto;background:#fff;color:#29344f;box-shadow:0 24px 90px #11152655;overflow:auto}.tutorial-top,.tutorial-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.tutorial-progress{display:block;width:100%;height:6px;margin:18px 0 23px;accent-color:#6556e8}.tutorial-icon{width:58px;height:58px;border-radius:16px;background:linear-gradient(120deg,#eee8ff,#e9f0ff);color:#6556e8;display:grid;place-items:center;margin-bottom:18px}.tutorial-dialog h2{font-size:27px;line-height:1.25;margin:0 0 12px}.tutorial-dialog h2:focus{outline:none}.tutorial-dialog>p{font-size:16px;line-height:1.65;color:#5c6680}.tutorial-points{padding-left:22px;margin:18px 0 26px;color:#56617b;font-size:15px;line-height:1.75}.tutorial-points li+li{margin-top:12px}.tutorial-footer{border-top:1px solid #e8e3f4;padding-top:18px}.tutorial-footer .button-row{margin:0}.tutorial-footer button{min-height:42px}@media(max-width:680px){.tutorial-dialog{padding:20px;max-height:90dvh}.tutorial-dialog h2{font-size:23px}.tutorial-points{font-size:14px}.tutorial-footer{gap:10px}.tutorial-footer .button-row{gap:8px}}.case-workspace textarea{display:block;width:100%;min-height:96px;resize:vertical;margin-top:9px;padding:10px 12px;border:1px solid #dce0ee;border-radius:8px;font:inherit;font-weight:400;color:#4e5872;background:#fff}.case-workspace textarea:focus-visible{outline:3px solid #35b6a5;outline-offset:3px}.case-workspace input[type=checkbox]{width:auto;min-height:0;padding:0;margin-right:8px;vertical-align:middle}.mobile-nav-hint{display:none}@media(max-width:680px){.mobile-nav-hint{display:block;color:#bbbce0;font-size:11px;line-height:1.5;padding:5px 0 10px;margin:0}}[tabindex="-1"]:focus{outline:none}.case-step{border:1px solid #dddff1;background:#f5f5fc;border-radius:9px;padding:14px 16px;margin:14px 0 18px;color:#656985;font-size:13px;line-height:1.6}.case-step strong{display:block;color:#3b3f63;font-size:14px;margin-bottom:4px}.case-step p{margin:0 0 10px}.case-step .primary,.case-step .secondary{margin-right:10px}.case-step.ready{border-color:#bfe3d2;background:#f0f8f4}.case-step.blocked{border-left:4px solid #8f7ce7}.case-workspace .consent-check{display:flex;align-items:flex-start;gap:8px;margin:16px 0 4px;font-size:14px;line-height:1.6;color:#4e5872;cursor:pointer}.case-workspace .consent-check input{flex:0 0 auto;margin:5px 0 0;accent-color:#6556e8}.case-workspace .consent-check small{display:block;color:#7e86a0;font-size:12px}.case-workspace .consent-check.locked{cursor:not-allowed;color:#8a90a8}.register-panel,.account-panel{border:1px solid #e6e3f3;border-radius:9px;padding:12px 16px;margin-top:22px;background:#fbfbfe}.register-panel>summary,.account-panel>summary{cursor:pointer;color:#5d5a8d;font-weight:600;font-size:14px}.register-panel[open]>summary,.account-panel[open]>summary{margin-bottom:6px}.demo-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;flex-wrap:wrap}.demo-banner>div{flex:1 1 320px}.demo-banner p{margin:4px 0 0}.alert-thumb{width:46px;height:46px;object-fit:cover;border-radius:8px;flex:0 0 auto;background:#eef0f6}.tutorial-coach{position:fixed;right:24px;bottom:24px;z-index:60;width:min(380px,calc(100vw - 32px));max-height:min(70vh,520px);overflow:auto;background:#fff;border:1px solid #dcd7f5;border-radius:14px;box-shadow:0 18px 50px #2b245a33;padding:16px 18px;color:#4e5872}.tutorial-coach h2{font-size:17px;margin:10px 0 6px;color:#2f3354}.tutorial-coach p{font-size:13.5px;line-height:1.6;margin:0 0 8px}.tutorial-coach progress{width:100%;height:6px;accent-color:#6556e8}.tutorial-coach small{display:block;color:#8a90a8;font-size:11.5px;line-height:1.5;margin-top:10px}.tutorial-coach .coach-hint{background:#fff7e6;border:1px solid #f1d9a6;color:#7a5a12;border-radius:8px;padding:8px 10px}.tutorial-coach .coach-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:6px}.tour-target{outline:3px solid #6556e8!important;outline-offset:4px;border-radius:10px;box-shadow:0 0 0 8px #6556e824!important;animation:tour-pulse 1.6s ease-in-out infinite}@keyframes tour-pulse{50%{box-shadow:0 0 0 14px #6556e812}}@media(prefers-reduced-motion:reduce){.tour-target{animation:none}}@media(max-width:680px){.tutorial-coach{right:8px;left:8px;bottom:calc(8px + env(safe-area-inset-bottom,0px));width:auto;max-height:46vh}}.due-field{border:0;padding:0;margin:0 0 20px;min-width:0}.due-field legend{font-size:14px;font-weight:600;color:#525c79;padding:0;margin-bottom:9px}.due-shortcuts{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.chip{border:1px solid #dce0f0;background:#fff;color:#4e5872;border-radius:999px;padding:7px 13px;font-size:13px;min-height:34px}.chip:hover:not(:disabled){border-color:#b7aceb;background:#f6f4ff}.chip.selected{background:#eeebff;border-color:#8f7ce7;color:#4d3fb0;font-weight:600}.due-inputs{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,160px);gap:12px}.due-inputs .field{margin-bottom:0;font-weight:500;font-size:13px}.due-summary{margin-top:10px}.due-summary strong{color:#3d3a73;font-weight:600}@media(max-width:480px){.due-inputs{grid-template-columns:1fr}}.tutorial-coach.at-bottom-left{right:auto;left:24px}.tutorial-coach.at-top-right{bottom:auto;top:24px}.tutorial-coach.at-top-left{right:auto;left:24px;bottom:auto;top:24px}@media(max-width:680px){.tutorial-coach.at-top{bottom:auto;top:calc(8px + env(safe-area-inset-top,0px))}}.coach-more{display:none}@media(max-width:680px),(max-height:820px){.tutorial-coach{max-height:none;padding:12px 14px}.tutorial-coach>small{display:none}.tutorial-coach h2{font-size:17px;margin:6px 0 4px}.tutorial-coach progress{margin:6px 0}.coach-text:not(.open){display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.coach-more{display:inline-flex;padding:0;margin:0 0 6px}body.coach-open main{padding-bottom:240px}}.batch-samples{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0 4px;padding:12px 14px;border:1px solid #e3def6;border-radius:11px;background:#faf8ff}.batch-samples>div:first-child{flex:1 1 180px;display:grid;gap:2px}.batch-samples strong{font-size:14px;color:#3d3a73}.batch-samples span{font-size:12px;color:#7e86a0}.batch-sample-row{display:flex;gap:6px}.batch-sample-row img{width:48px;height:48px;object-fit:cover;border-radius:7px;border:1px solid #e3def6}
frontend/dist/assets/index-CSIynkJt.js ADDED
The diff for this file is too large to render. See raw diff
 
frontend/dist/index.html CHANGED
@@ -1,3 +1,3 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="theme-color" content="#132e32"/><meta name="description" content="Local visual anomaly inspection with traceable evidence."/><title>DefectRAG · Inspection intelligence</title><link rel="icon" type="image/svg+xml" href="./logo.svg"><script src="./config.js"></script> <script type="module" crossorigin src="./assets/index-CeylBrAJ.js"></script>
2
- <link rel="stylesheet" crossorigin href="./assets/index-C1cBzm5C.css">
3
  </head><body><div id="root"></div></body></html>
 
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="theme-color" content="#132e32"/><meta name="description" content="Local visual anomaly inspection with traceable evidence."/><title>DefectRAG · Inspection intelligence</title><link rel="icon" type="image/svg+xml" href="./logo.svg"><script src="./config.js"></script> <script type="module" crossorigin src="./assets/index-CSIynkJt.js"></script>
2
+ <link rel="stylesheet" crossorigin href="./assets/index-Bcox7ps8.css">
3
  </head><body><div id="root"></div></body></html>