Update verified React dashboard
Browse files- frontend/dist/assets/TeamWorkspace-CasJPmbn.js +41 -0
- frontend/dist/assets/index-BY_K4Azl.js +0 -0
- frontend/dist/assets/index-BhfDqrNT.css +1 -0
- frontend/dist/email/robot-hello.gif +0 -0
- frontend/dist/index.html +2 -2
- frontend/dist/logo.svg +12 -12
- frontend/dist/sample-thumbs/candle_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/candle_good.jpg +0 -0
- frontend/dist/sample-thumbs/capsules_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/capsules_good.jpg +0 -0
- frontend/dist/sample-thumbs/cashew_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/cashew_good.jpg +0 -0
- frontend/dist/sample-thumbs/chewinggum_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/chewinggum_good.jpg +0 -0
- frontend/dist/sample-thumbs/fryum_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/fryum_good.jpg +0 -0
- frontend/dist/sample-thumbs/macaroni1_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/macaroni1_good.jpg +0 -0
- frontend/dist/sample-thumbs/macaroni2_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/macaroni2_good.jpg +0 -0
- frontend/dist/sample-thumbs/pcb1_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/pcb1_good.jpg +0 -0
- frontend/dist/sample-thumbs/pcb2_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/pcb2_good.jpg +0 -0
- frontend/dist/sample-thumbs/pcb3_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/pcb3_good.jpg +0 -0
- frontend/dist/sample-thumbs/pcb4_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/pcb4_good.jpg +0 -0
- frontend/dist/sample-thumbs/pipe_fryum_anomalous.jpg +0 -0
- frontend/dist/sample-thumbs/pipe_fryum_good.jpg +0 -0
frontend/dist/assets/TeamWorkspace-CasJPmbn.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{c as he,r as a,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 Me,h as e,i as Oe,p as Qe,n as Pe,j as Ye,k as Xe,m as st,w as Ne,o as ze,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 je,L as ht,S as Et,D as vt,E as We,F as yt,G as gt,H as He,I as bt}from"./index-BY_K4Azl.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 wt=he("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 Fe=he("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 St=he("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=he("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 Nt=he("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 _t=he("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 Ct=he("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 Dt=he("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",Rt=[{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"),Ie=l=>l.getFullYear()+"-"+xe(l.getMonth()+1)+"-"+xe(l.getDate());function Be(l,s=new Date){const u=new Date(s);return u.setDate(u.getDate()+l),Ie(u)}const Ge=(l,s)=>l?l+"T"+(s||Ue):"",Tt=l=>({date:l?l.slice(0,10):"",time:l?l.slice(11,16):""}),Ze=l=>{const[s,u]=l.split(":").map(Number);return(s%12||12)+":"+xe(u)+" "+(s<12?"AM":"PM")};function xt(l){const s=[];for(let u=420;u<=1200;u+=30)s.push(xe(Math.floor(u/60))+":"+xe(u%60));return l&&/^\d\d:\d\d$/.test(l)&&!s.includes(l)&&s.push(l),s.sort()}function Lt(l,s=new Date){const u=Math.round((new Date(l.slice(0,10)+"T00:00")-new Date(Ie(s)+"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,s=new Date){if(!l||!Number.isFinite(Date.parse(l)))return"";const u=new Date(l.slice(0,10)+"T00:00"),i=T=>u.toLocaleDateString("en-GB",T);return i({weekday:"long"})+", "+u.getDate()+" "+i({month:"short"})+" "+u.getFullYear()+" at "+Ze(l.slice(11,16))+" · "+Lt(l,s)}const At=l=>{const s=new Date(l);return Ie(s)+"T"+String(s.getHours()).padStart(2,"0")+":"+String(s.getMinutes()).padStart(2,"0")};function $e({legend:l,prefix:s,value:u,time:i,setValue:T,setTime:y,disabled:j,required:_,keep:F}){const g=Tt(u),W=g.time||i,K=f=>T(Ge(f,W)),C=f=>{y(f),g.date&&T(Ge(g.date,f))};return e.createElement("fieldset",{className:"due-field"},e.createElement("legend",null,l),e.createElement("div",{className:"due-shortcuts",role:"group","aria-label":l+" shortcuts"},F&&e.createElement("button",{type:"button",className:"chip"+(u?"":" selected"),"aria-pressed":!u,disabled:j,onClick:()=>T("")},"Keep current"),Rt.map(f=>{const A=Be(f.days);return e.createElement("button",{type:"button",key:f.days,className:"chip"+(g.date===A?" selected":""),"aria-pressed":g.date===A,disabled:j,onClick:()=>K(A)},f.label)})),e.createElement("div",{className:"due-inputs"},e.createElement("label",{className:"field"},s,"date",e.createElement("input",{type:"date",disabled:j,required:_,min:Ie(new Date),max:Be(365),value:g.date,onInput:f=>K(f.target.value),onChange:f=>K(f.target.value)})),e.createElement("label",{className:"field"},s,"time",e.createElement("select",{disabled:j,value:W,onChange:f=>C(f.target.value)},xt(W).map(f=>e.createElement("option",{key:f,value:f},Ze(f)))))),e.createElement("p",{className:"caption due-summary","aria-live":"polite"},u?e.createElement(e.Fragment,null,"Due ",e.createElement("strong",null,Je(u))):F||"Pick a shortcut or a date. The time starts at 5:00 PM."))}function qt({user:l,inspection:s,notes:u=[],inspections:i=[],inspectionLoading:T=!1,onSelectInspection:y,onEvidence:j}){const _=a.useRef(0),F=a.useRef(!1),g=a.useRef(s==null?void 0:s.id),W=a.useRef(null),K=a.useRef(null),[C,f]=a.useState("checking"),[A,H]=a.useState([]),[q,ne]=a.useState([]),[m,B]=a.useState(""),[E,G]=a.useState([]),[P,k]=a.useState([]),[J,Q]=a.useState(""),[v,Se]=a.useState(!1),[V,oe]=a.useState(""),[w,M]=a.useState(""),[me,Y]=a.useState(""),[n,S]=a.useState("Normal"),[p,O]=a.useState(""),[L,I]=a.useState(Ue),[se,ee]=a.useState(!1),[Ee,_e]=a.useState(""),[Le,ve]=a.useState(""),[ke,Ce]=a.useState(null),[Ae,De]=a.useState(0),[Re,qe]=a.useState(""),[de,ye]=a.useState(""),[ge,pe]=a.useState(""),[X,be]=a.useState(Ue),c=A.find(t=>t.id===m),ue=Ve(u),we=et(A),x=tt(s,u,A,T),r=at({description:V,owner:w,supervisor:me,priority:n,due:p},q),o=x.ready?r||(se?"":"Confirm that the saved Staff review identifies a defect before creating the case."):x.reason,[d,D]=a.useState([]),le=i.filter(t=>!t.archived_at),N=le.map(t=>t.id).join(","),ce=t=>st(t.id===(s==null?void 0:s.id)?u:d.filter(h=>h.inspection_id===t.id),A),ie=le.map(t=>({row:t,status:ce(t)})).sort((t,h)=>(h.status.key==="ready")-(t.status.key==="ready")),fe=ie.filter(t=>t.status.key==="ready").length,Z=rt(c,l.id,q.some(t=>t.user_id===l.id&&t.role==="developer")),$=!!c&&ke!==null&&ke!==c.version;async function R(){const t=++_.current,h=await z(),b=await h.rpc("defectrag_ca_staff");if(t!==_.current)return;if(b.error||b.data!==!0)throw f("denied"),H([]),ne([]),B(""),G([]),k([]),new Error("Sign in with an approved Staff account and verify the security code before opening corrective actions.");const re=await Promise.all([h.from("corrective_actions").select("*").order("created_at",{ascending:!1}).limit(500),h.from("staff_members").select("user_id,display_name,role,revoked_at").is("revoked_at",null)]);if(t===_.current){if(re.some(Te=>Te.error))throw f("unavailable"),H([]),ne([]),B(""),G([]),k([]),re.find(Te=>Te.error).error;f("authorized"),H(re[0].data||[]),ne(re[1].data||[]),Q(""),De(Te=>Te+1)}}a.useEffect(()=>{const t=Ke(R,{onState:h=>{h.error&&(f("unavailable"),Q(h.error),H([]),ne([]),B(""),G([]),k([]))}});return()=>{t.stop(),_.current++}},[l.id]),a.useEffect(()=>{const t=()=>{_.current++,f("checking"),H([]),ne([]),B(""),G([]),k([]),R().catch(h=>Q(h.message))};return window.addEventListener("defectrag-auth-change",t),()=>window.removeEventListener("defectrag-auth-change",t)},[l.id]),a.useEffect(()=>{g.current&&g.current!==(s==null?void 0:s.id)&&(oe(""),M(""),Y(""),O(""),S("Normal")),g.current=s==null?void 0:s.id,ee(!1)},[s==null?void 0:s.id]),a.useEffect(()=>{ee(!1)},[ue==null?void 0:ue.id]),a.useEffect(()=>{let t=!0;const h=N?N.split(","):[];if(C!=="authorized"||!h.length){D([]);return}return z().then(b=>b.from("staff_notes").select("id,inspection_id,author_id,body,created_at").in("inspection_id",h).like("body",nt+"%").order("created_at").limit(2e3)).then(({data:b,error:re})=>{if(t){if(re)throw re;D(b||[])}}).catch(()=>{t&&D([])}),()=>{t=!1}},[C,N,Ae]),a.useEffect(()=>{C==="authorized"&&Me(K.current)},[C,s==null?void 0:s.id,ue==null?void 0:ue.id]);function te(){ve(""),_e((c==null?void 0:c.state)||""),qe((c==null?void 0:c.owner_id)||""),ye((c==null?void 0:c.supervisor_id)||""),pe(""),Ce((c==null?void 0:c.version)??null)}a.useEffect(te,[c==null?void 0:c.id]),a.useEffect(()=>{c&&Me(W.current)},[c==null?void 0:c.id]),a.useEffect(()=>{let t=!0;const h=_.current;if(G([]),k([]),!(!c||C!=="authorized"))return z().then(b=>Promise.all([b.from("corrective_action_history").select("*").eq("case_id",c.id).order("version"),b.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(b=>{if(!(!t||h!==_.current)){if(b.some(re=>re.error))throw b.find(re=>re.error).error;G(b[0].data||[]),k(b[1].data||[])}}).catch(b=>{t&&h===_.current&&Q(b.message)}),()=>{t=!1}},[c==null?void 0:c.id,c==null?void 0:c.version,Ae,l.id,C]);async function ae(t){if(!F.current){F.current=!0,Se(!0),Q("");try{await t(),await R(),Ne()}catch(h){Q(h.message||"Corrective action request failed.")}finally{F.current=!1,Se(!1)}}}const U=t=>{var h;return((h=q.find(b=>b.user_id===t))==null?void 0:h.display_name)||"Former / unavailable staff"};return e.createElement("section",{className:"card case-workspace",ref:K,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:v,onClick:()=>ae(R)},"Refresh cases")),J&&e.createElement("div",{className:"error",role:"alert"},Oe(J)),C==="checking"&&e.createElement("p",{role:"status"},"Checking Staff access and the security code…"),C!=="checking"&&C!=="authorized"&&e.createElement("p",{className:"note"},"Open Staff workspace to check account approval and enter the security code. Then return here and try again."),C==="authorized"&&e.createElement(e.Fragment,null,e.createElement("p",{className:"caption"},"Showing up to 500 cases available to this account. Open: ",we.open," · Resolved / closed: ",we.resolved," · Overdue: ",we.overdue," · Average resolution: ",we.averageResolutionHours===null?"No resolved cases":we.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."),y&&e.createElement("label",{className:"field"},"Team inspection",e.createElement("select",{value:(s==null?void 0:s.id)||"",disabled:v||T,onChange:t=>y(t.target.value)},e.createElement("option",{value:""},"Choose a shared product inspection"),ie.map(({row:t,status:h})=>{var b;return e.createElement("option",{key:t.id,value:t.id},Qe((b=t.payload)==null?void 0:b.category)," · ",new Date(t.created_at).toLocaleString()," · ",t.id.slice(0,8)," — ",h.label)}))),y&&le.length>0&&e.createElement("p",{className:"caption"},fe?`${fe} inspection${fe>1?"s are":" is"} ready, listed first.`:"No inspection is ready yet. A case needs a saved review of Reviewed with “Reject: defect confirmed”."),y&&!le.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 "+(x.ready?"ready":"blocked")},e.createElement("strong",null,x.ready?"Ready to assign":s?x.existingCaseId?"This inspection already has a case":x.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"},x.reason),s&&!s.archived_at&&!T&&e.createElement("button",{type:"button",className:x.needsReview?"primary":"secondary",disabled:v,onClick:()=>j==null?void 0:j(s.id)},x.needsReview?"Open this inspection’s review":"Open photo and Staff review"),x.existingCaseId&&e.createElement("button",{type:"button",className:"secondary",onClick:()=>B(x.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."),!q.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||v||F.current))return ae(async()=>{const h=await z(),b=await ze(h,"defectrag_create_corrective_action",{p_inspection:s.id,p_review:x.review.id,p_confirmed:se,p_owner:w,p_supervisor:me,p_priority:n,p_description:V,p_due:new Date(p).toISOString()});B(b),oe(""),ee(!1)})}},e.createElement("label",{className:"field"},"What needs fixing?",e.createElement("textarea",{disabled:v,required:!0,minLength:10,maxLength:2e3,value:V,onInput:t=>oe(t.target.value),onChange:t=>oe(t.target.value)})),e.createElement("label",{className:"field"},"Person responsible",e.createElement("select",{disabled:v,required:!0,value:w,onChange:t=>M(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),q.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:v,required:!0,value:me,onChange:t=>Y(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),q.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:v,value:n,onChange:t=>S(t.target.value)},["Low","Normal","High","Critical"].map(t=>e.createElement("option",{key:t},t)))),$e({legend:"Due date and time",prefix:"Due ",value:p,time:L,setValue:O,setTime:I,disabled:v,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"+(x.ready?"":" locked")},e.createElement("input",{type:"checkbox",disabled:v||!x.ready,checked:se,onChange:t=>ee(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.",!x.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:v||!!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,A.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,U(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:()=>B(t.id)},"Details")))))),!A.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:()=>B("")},"Close details")),e.createElement("p",null,c.description),e.createElement("p",null,"Person responsible: ",U(c.owner_id)," · Supervisor: ",U(c.supervisor_id)," · Due: ",new Date(c.due_at).toLocaleString()),e.createElement("p",null,"Confirmed by: ",U(c.confirmed_by)),e.createElement("button",{className:"secondary",onClick:()=>j(c.inspection_id)},"Open the linked photo and review"),Pe(c.state).length>0&&!Z&&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."),!Pe(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."),$&&Z&&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:v,onClick:()=>{te(),Q("")}},"Load latest case and replace draft")),Pe(c.state).length>0&&Z&&e.createElement("form",{className:"login-form",onSubmit:t=>{t.preventDefault(),ae(async()=>{if($)throw new Error("The case changed. Load the latest case before saving.");const h=await z(),b=await ze(h,"defectrag_update_corrective_action",{p_id:c.id,p_version:ke,p_state:Ee,p_note:Le,p_owner:Re,p_supervisor:de,p_due:ge?new Date(ge).toISOString():null});Ce(b),ve(""),pe("")})}},e.createElement("label",{className:"field"},"Case status",e.createElement("select",{disabled:v||$,value:Ee,onChange:t=>_e(t.target.value)},Pe(c.state).map(t=>e.createElement("option",{key:t},t)))),e.createElement("label",{className:"field"},"Owner",e.createElement("select",{disabled:v||$,required:!0,value:Re,onChange:t=>qe(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),q.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:v||$,required:!0,value:de,onChange:t=>ye(t.target.value)},e.createElement("option",{value:""},"Choose active staff"),q.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:ge,time:X,setValue:pe,setTime:be,disabled:v||$,keep:"The current due date stays: "+Je(At(c.due_at))+"."}),e.createElement("label",{className:"field"},"What changed or was fixed?",e.createElement("textarea",{disabled:v,required:!0,minLength:3,maxLength:2e3,value:Le,onInput:t=>ve(t.target.value),onChange:t=>ve(t.target.value)})),e.createElement("button",{className:"primary",disabled:v||!Ee||$},"Save case update")),e.createElement("h3",null,"Status history"),E.map(t=>e.createElement("p",{key:t.id},e.createElement("strong",null,t.state)," · ",U(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: ",U(t.snapshot.owner_id)," · Supervisor: ",U(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."),P.map(t=>e.createElement("p",{key:t.id},Ye(t.kind)," · ",Xe(t.status)," · attempts ",t.attempts,t.last_error?" · "+Oe(t.last_error):"")))))}function Pt({client:l,user:s,onChange:u}){var Y;const[i,T]=a.useState(null),[y,j]=a.useState([]),[_,F]=a.useState([]),[g,W]=a.useState(null),[K,C]=a.useState(""),[f,A]=a.useState(""),[H,q]=a.useState(""),[ne,m]=a.useState(""),[B,E]=a.useState(""),[G,P]=a.useState(""),[k,J]=a.useState(!1),[Q,v]=a.useState([]),[Se,V]=a.useState([]),oe=((Y=window.DEFECTRAG_PUBLIC_CONFIG)==null?void 0:Y.registrationEnabled)===!0;async function w(){if(!s){T(null),v([]),V([]);return}const n=await lt(l);T(n);const{data:S,error:p}=await l.auth.mfa.listFactors();if(p)throw p;const O=(S.totp||[]).filter(L=>L.status==="verified");if(j(O),F((S.all||[]).filter(L=>L.factor_type==="totp"&&L.status==="unverified")),A(L=>{var I;return O.some(se=>se.id===L)?L:((I=O[0])==null?void 0:I.id)||""}),n.role==="developer"&&n.approved&&n.aal2){const[L,I]=await Promise.all([l.rpc("defectrag_access_directory"),l.rpc("defectrag_notification_status")]);if(L.error)throw L.error;if(I.error)throw I.error;v(L.data||[]),V(I.data||[])}else v([]),V([])}async function M(n){J(!0),P("");try{await n()}catch(S){P(S.message||"Security request failed.")}finally{J(!1)}}a.useEffect(()=>{let n=!0;return W(null),C(""),v([]),V([]),l&&s?w().catch(S=>{n&&P(S.message)}):T(null),()=>{n=!1}},[l,s==null?void 0:s.id]);async function me(){await ut(l,(g==null?void 0:g.id)||f,K),C(""),W(null),await w(),u(),P("Security code verified. Staff access is available only after the account is approved.")}return e.createElement("div",{className:"section-gap"},s&&e.createElement("h3",null,"Sign-in and account security"),G&&e.createElement("p",{className:"note",role:"status"},Oe(G)),s?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:k,onClick:()=>M(w)},"Refresh account status"),i&&!i.approved&&!i.revoked&&!i.request_status&&e.createElement("form",{className:"login-form",onSubmit:n=>{n.preventDefault(),M(async()=>{await it(l,H),await w(),P("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:H,maxLength:80,onChange:n=>q(n.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:k||!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."),!g&&!y.length&&!_.length&&e.createElement("button",{className:"secondary",disabled:k,onClick:()=>M(async()=>W(await ot(l)))},"Set up a security code app"),!g&&_.map(n=>e.createElement("p",{key:n.id,className:"caption"},"Authenticator setup was not finished. ",e.createElement("button",{className:"text-button",disabled:k,onClick:()=>M(async()=>{const{error:S}=await l.auth.mfa.unenroll({factorId:n.id});if(S)throw S;await w()})},"Cancel incomplete setup"))),g&&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:g.totp.qr_code,width:"200",height:"200",alt:"Private authenticator enrollment QR code"}),e.createElement("button",{className:"text-button",disabled:k,onClick:()=>M(async()=>{const{error:n}=await l.auth.mfa.unenroll({factorId:g.id});if(n)throw n;W(null),C("")})},"Cancel incomplete setup"))),!g&&y.length>0&&(i==null?void 0:i.aal2)&&e.createElement("p",{className:"caption"},"The security code is verified for this sign-in."),(g||y.length>0&&!(i!=null&&i.aal2))&&e.createElement("form",{className:"login-form",onSubmit:n=>{n.preventDefault(),M(me)}},!g&&e.createElement("label",{className:"field"},"Security code app",e.createElement("select",{value:f,onChange:n=>A(n.target.value)},y.map(n=>e.createElement("option",{key:n.id,value:n.id},n.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:K,onChange:n=>C(n.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:k},"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,Q.map(n=>e.createElement("tr",{key:n.user_id},e.createElement("td",null,n.display_name,e.createElement("br",null),e.createElement("small",null,n.email)),e.createElement("td",null,n.status),e.createElement("td",null,n.role||"applicant"),e.createElement("td",null,n.user_id!==s.id&&(n.status==="pending"?["approve","reject"]:n.status==="approved"?["revoke"]:[]).map(S=>e.createElement("button",{key:S,className:"text-button",disabled:k,onClick:()=>{window.confirm(`${S[0].toUpperCase()+S.slice(1)} access for ${n.display_name}?`)&&M(async()=>{await dt(l,n,S),await w(),u(),P("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"}[S])))))))),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,Se.map(n=>e.createElement("tr",{key:n.id},e.createElement("td",null,Ye(n.kind)),e.createElement("td",null,Xe(n.status)),e.createElement("td",null,n.attempts),e.createElement("td",null,n.status==="dead"&&e.createElement("button",{className:"text-button",disabled:k,onClick:()=>M(async()=>{const{error:S}=await l.rpc("defectrag_retry_notification",{p_id:n.id});if(S)throw S;await w()})},"Retry delivery"))))))))):oe?e.createElement("details",{className:"register-panel"},e.createElement("summary",null,"New to Staff work? Create an account"),e.createElement("form",{className:"login-form",onSubmit:n=>{n.preventDefault(),M(async()=>{await ct(l,{email:ne,password:B,displayName:H,redirectTo:location.origin+location.pathname}),E(""),P("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:H,onChange:n=>q(n.target.value),maxLength:80,autoComplete:"name",required:!0})),e.createElement("label",{className:"field"},"Email",e.createElement("input",{type:"email",value:ne,onChange:n=>m(n.target.value),autoComplete:"email",required:!0})),e.createElement("label",{className:"field"},"New password",e.createElement("input",{type:"password",minLength:12,value:B,onChange:n=>E(n.target.value),autoComplete:"new-password",required:!0})),e.createElement("button",{className:"secondary",disabled:k||!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 It({onOpenInspection:l,onOpenCorrectiveActions:s,onChooseInspection:u,casesView:i=!1,initialInspectionId:T=null}){var x;const y=a.useRef(0),j=a.useRef(null),_=a.useRef(0),F=a.useRef(null),g=a.useRef(0),W=a.useRef(null),K=a.useRef(null),[C,f]=a.useState(0),[A,H]=a.useState(!1),[q,ne]=a.useState({state:"refreshing"}),[m,B]=a.useState(null),[E,G]=a.useState(null),[P,k]=a.useState([]),[J,Q]=a.useState({}),[v,Se]=a.useState(""),[V,oe]=a.useState(""),[w,M]=a.useState(!1),[me,Y]=a.useState(""),[n,S]=a.useState(!1),[p,O]=a.useState(null),[L,I]=a.useState([]),[se,ee]=a.useState([]),[Ee,_e]=a.useState(""),[Le,ve]=a.useState(!1),[ke,Ce]=a.useState(""),[Ae,De]=a.useState(!1),[Re,qe]=a.useState(null),de=mt(),ye=pt(window.DEFECTRAG_PUBLIC_CONFIG);a.useEffect(()=>()=>{L.filter(r=>r.startsWith("blob:")).forEach(r=>URL.revokeObjectURL(r))},[L]),a.useEffect(()=>{F.current=p},[p]),a.useEffect(()=>{p&&Me(W.current)},[C]),a.useEffect(()=>{if(!m||!E||!T)return;const r=m.id+":"+T;K.current!==r&&(K.current=r,c({id:T},{focus:!i}))},[m==null?void 0:m.id,E==null?void 0:E.user_id,T]);const ge=ft(),pe=de&&Re&&(!i||!E)?e.createElement(Pt,{key:(m==null?void 0:m.id)||"anonymous",client:Re,user:m,onChange:()=>{Ne(),m&&X(be)}}):null;async function X(r){M(!0),Y("");try{await r()}catch(o){Y(o.message||"Team request failed.")}finally{M(!1)}}async function be(){var R;const r=++_.current,o=y.current,d=(R=F.current)==null?void 0:R.id,{client:D,staff:le}=await bt();let N=D.from("shared_inspections").select("*").order("created_at",{ascending:!1}).limit(200);N=n?N.not("archived_at","is",null):N.is("archived_at",null);const[{data:ce,error:ie},{data:fe,error:Z},$]=await Promise.all([N,D.from("staff_members").select("*"),d?D.from("staff_notes").select("*").eq("inspection_id",d).order("created_at"):{data:[]}]);if(ie)throw ie;if(Z)throw Z;if($.error)throw $.error;if(r===_.current&&(G(le),Y(""),k(ce||[]),Q(Object.fromEntries((fe||[]).map(te=>[te.user_id,te.display_name]))),d&&o===y.current)){const te=(ce||[]).find(ae=>ae.id===d);if(!te)y.current++,O(null),I([]),ee([]);else if(O(te),ee($.data||[]),Date.now()-g.current>480*1e3)if(de){const ae=await je(D,te);r===_.current&&o===y.current?(I(ae),g.current=Date.now()):ae.forEach(U=>URL.revokeObjectURL(U))}else{const ae=await Promise.all([te.image_path,te.heatmap_path].map(U=>D.storage.from("team-inspections").createSignedUrl(U,900)));if(r===_.current&&o===y.current){if(ae.some(U=>U.error))throw new Error("Shared image links could not refresh.");I(ae.map(U=>U.data.signedUrl)),g.current=Date.now()}}}}a.useEffect(()=>{if(!ge)return;let r=!1,o;return z().then(async d=>{!r&&de&&qe(d),o=d.auth.onAuthStateChange((le,N)=>{var ce;if(!r){const ie=((ce=N==null?void 0:N.user)==null?void 0:ce.id)||null;j.current!==ie&&(y.current++,_.current++,O(null),k([]),I([]),ee([]),G(null),j.current=ie),B((N==null?void 0:N.user)||null),le==="PASSWORD_RECOVERY"&&ve(!0)}}).data.subscription;const{data:D}=await d.auth.getUser();r||B(D.user)}).catch(d=>{r||Y(d.message)}),()=>{r=!0,y.current++,o==null||o.unsubscribe()}},[ge]),a.useEffect(()=>{if(!m)return;const r=Ke(be,{onState:o=>{ne(o),o.error&&(Y(o.error),de&&(y.current++,k([]),Q({}),O(null),I([]),ee([]),G(null)))}});return()=>{r.stop(),_.current++}},[m==null?void 0:m.id,n]);async function c(r,{focus:o=!0}={}){const d=++y.current;H(!0);try{await X(async()=>{if(d!==y.current)return;const D=await z(),le=D.storage.from("team-inspections"),[{data:N,error:ce},{data:ie,error:fe}]=await Promise.all([D.from("shared_inspections").select("*").eq("id",r.id).single(),D.from("staff_notes").select("*").eq("inspection_id",r.id).order("created_at")]);if(d!==y.current)return;if(ce)throw ce;if(fe)throw fe;const Z=de?await je(D,N):null,$=Z?Z.map(R=>({data:{signedUrl:R}})):await Promise.all([N.image_path,N.heatmap_path].map(R=>le.createSignedUrl(R,900)));if($.some(R=>R.error))throw new Error("Private images could not be loaded. Check staff/storage policies.");if(d!==y.current){Z==null||Z.forEach(R=>URL.revokeObjectURL(R));return}F.current=N,g.current=Date.now(),O(N),I($.map(R=>R.data.signedUrl)),ee(ie||[]),o&&f(R=>R+1)})}finally{d===y.current&&H(!1)}}function ue(){y.current++,F.current=null,H(!1),O(null),I([]),ee([])}async function we(){await X(async()=>{const r=await z(),o=P.filter(d=>d.owner_id===m.id).map(d=>d.id);if(o.length){const{error:d}=await r.rpc("archive_team_inspections",{p_ids:o});if(d)throw d}y.current++,O(null),De(!1),await be(),Ne()})}return ge?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(Dt,{size:21})," ",i?"Corrective Actions access":"Staff workspace"),e.createElement("p",null,E?"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(Fe,{size:13})," STAFF ACCESS")),me&&e.createElement("div",{className:"error",role:"alert"},Oe(me)),A&&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."),m&&!E&&pe,m?e.createElement(e.Fragment,null,e.createElement("div",{className:"team-toolbar"},e.createElement("div",null,e.createElement(Et,{size:18}),e.createElement("strong",null,(E==null?void 0:E.display_name)||m.email),e.createElement("span",{className:"subtle-tag"},(E==null?void 0:E.role)||"CHECKING ACCESS")),e.createElement("button",{className:"secondary",disabled:w,onClick:()=>X(be)},e.createElement(_t,{size:16})," Refresh"),!i&&E&&ye&&e.createElement("button",{className:"secondary",onClick:()=>s==null?void 0:s()},"Open Corrective Actions"),i&&E&&e.createElement("button",{className:"secondary",onClick:()=>u==null?void 0:u()},"Choose a Team inspection"),e.createElement("button",{className:"secondary",onClick:()=>X(async()=>{await(await z()).auth.signOut(),k([]),O(null),G(null)})},e.createElement(Nt,{size:16})," Sign out")),Le&&e.createElement("form",{className:"login-form",onSubmit:r=>{r.preventDefault(),X(async()=>{const o=await z(),{error:d}=await o.auth.updateUser({password:ke});if(d)throw d;Ce(""),ve(!1)})}},e.createElement("label",{className:"field"},"Set a new password",e.createElement("input",{type:"password",minLength:12,autoComplete:"new-password",value:ke,onChange:r=>Ce(r.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:w},"Save password")),!i&&e.createElement(e.Fragment,null,e.createElement("div",{className:"team-toolbar"},e.createElement("span",{role:"status"},"Team Workspace · latest ",P.length," shared inspections · ",q.state==="synced"?"updated at "+new Date(q.at).toLocaleTimeString():q.state==="offline"?"offline; shown results may be out of date":q.state==="stale"?"update failed; shown results may be out of date":"refreshing…"," · checks for changes every 15 seconds"),(E==null?void 0:E.role)==="developer"&&e.createElement("button",{className:"secondary",onClick:()=>{S(!n),O(null)}},e.createElement(wt,{size:16}),n?"Active history":"Restore archived team work"),!n&&e.createElement("button",{className:"secondary danger",disabled:w||!P.some(r=>r.owner_id===m.id),onClick:()=>De(!0)},e.createElement(vt,{size:16})," Archive my shared inspections")),Ae&&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:w,onClick:we},"Archive my records"),e.createElement("button",{className:"secondary",onClick:()=>De(!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,P.map(r=>{var o;return e.createElement("tr",{key:r.id},e.createElement("td",null,e.createElement("strong",null,r.id.slice(0,8))),e.createElement("td",null,Qe(r.payload.category)),e.createElement("td",null,e.createElement("span",{className:"badge "+((o=r.payload.verdict)==null?void 0:o.toLowerCase())},We(r.payload.verdict))),e.createElement("td",null,J[r.owner_id]||"Staff member"),e.createElement("td",null,new Date(r.created_at).toLocaleString()),e.createElement("td",null,e.createElement("button",{className:"text-button",disabled:w,onClick:()=>c(r)},"Review"),n&&(E==null?void 0:E.role)==="developer"&&e.createElement("button",{className:"text-button",disabled:w,onClick:()=>X(async()=>{const d=await z(),{error:D}=await d.rpc("restore_team_inspections",{p_ids:[r.id]});if(D)throw D;await be(),Ne()})},"Restore")))}))),!P.length&&e.createElement("div",{className:"empty"},e.createElement(Fe,{size:30}),e.createElement("p",null,n?"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:r=>{r.preventDefault(),X(async()=>{const o=await z(),{error:d}=await o.auth.signInWithPassword({email:v,password:V});if(d)throw d;oe("")})}},e.createElement("label",{className:"field"},"Work email",e.createElement("input",{type:"email",autoComplete:"username",value:v,onChange:r=>Se(r.target.value),required:!0})),e.createElement("label",{className:"field"},"Password",e.createElement("input",{type:"password",autoComplete:"current-password",value:V,onChange:r=>oe(r.target.value),required:!0})),e.createElement("button",{className:"primary",disabled:w},w?e.createElement(ht,{className:"spin",size:17}):e.createElement(kt,{size:17})," Sign in"),e.createElement("button",{type:"button",className:"text-button",disabled:!v||w,onClick:()=>X(async()=>{const r=await z(),{error:o}=await r.auth.resetPasswordForEmail(v,{redirectTo:location.origin+location.pathname});if(o)throw o;Y("Password reset requested. Check the inbox and Spam folder.")})},"Reset password"),e.createElement("p",{className:"caption"},de?"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.")),pe),m&&E&&pe&&e.createElement("details",{className:"account-panel section-gap"},e.createElement("summary",null,"Account & security"),pe)),i&&m&&E&&ye&&e.createElement(qt,{key:m.id,user:m,inspection:p,notes:se,inspections:P,inspectionLoading:A,onSelectInspection:r=>r?c({id:r},{focus:!1}):ue(),onEvidence:r=>c({id:r})}),m&&p&&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 · ",p.id.slice(0,8)),e.createElement("p",null,"Shared copy from ",J[p.owner_id]||"a colleague",". These are saved results. Opening them does not run another inspection.")),e.createElement("div",{className:"button-row"},l&&!p.archived_at&&e.createElement("button",{className:"secondary",onClick:()=>l(p)},"Open full result and assistant"),!i&&ye&&!p.archived_at&&e.createElement("button",{className:"secondary",onClick:()=>s==null?void 0:s(p)},"Create or view corrective actions"),e.createElement("button",{className:"text-button",onClick:ue},"Close"))),e.createElement("div",{className:"shared-images"},L.map((r,o)=>e.createElement("img",{key:r,src:r,alt:o?"Saved highlighted areas":"Saved inspected product"}))),e.createElement("div",{className:"observation"},e.createElement("strong",null,"SAVED RESULT"),e.createElement("span",null,We(p.payload.verdict)," · score ",Number(p.payload.score).toFixed(5)," · review limit ",Number(p.payload.threshold).toFixed(5))),e.createElement("h3",{className:"section-gap"},"Saved assistant conversation"),(x=p.conversation)!=null&&x.length?p.conversation.map((r,o)=>e.createElement("p",{className:"cloud-message",key:o},e.createElement("strong",null,r.role==="user"?"Inspector":"Evidence Assistant",": "),r.question||r.answer)):e.createElement("p",{className:"caption"},"No assistant conversation was shared with this inspection."),!p.archived_at&&e.createElement(yt,{key:p.id+String(se.length),current:se.map(r=>He(r,J)).filter(Boolean).at(-1),disabled:w,onSave:async r=>{const o=await z(),{error:d}=await o.from("staff_notes").insert({inspection_id:p.id,author_id:m.id,body:gt(r.status,r.decision,r.note)});if(d)throw d;await c(p,{focus:!i}),Ne()}}),e.createElement("h3",{className:"section-gap"},"Team notes"),se.filter(r=>!He(r,J)).map(r=>e.createElement("div",{className:"cloud-message",key:r.id},e.createElement("strong",null,J[r.author_id]||"Staff member"),e.createElement("p",null,r.body),e.createElement("small",null,new Date(r.created_at).toLocaleString()))),!p.archived_at&&e.createElement("form",{className:"question-form",onSubmit:r=>{r.preventDefault(),X(async()=>{const o=await z(),{error:d}=await o.from("staff_notes").insert({inspection_id:p.id,author_id:m.id,body:Ee.trim()});if(d)throw d;_e(""),await c(p),Ne()})}},e.createElement("input",{"aria-label":"Staff review note",maxLength:2e3,placeholder:"Add a note for the team…",value:Ee,onChange:r=>_e(r.target.value)}),e.createElement("button",{className:"primary",disabled:w||!Ee.trim()},e.createElement(Ct,{size:16})," Add note")))):e.createElement("section",{className:"card cloud-setup"},e.createElement("div",{className:"setup-icon"},e.createElement(Fe,{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(([r,o,d])=>e.createElement("div",{key:r},e.createElement("b",null,r),e.createElement("h3",null,o),e.createElement("p",null,d)))),e.createElement("a",{className:"primary",href:"https://supabase.com/dashboard",target:"_blank",rel:"noreferrer"},"Administrator setup ",e.createElement(St,{size:16})),e.createElement("p",{className:"caption"},"Contact the workspace administrator for help. The public demo can be used without Staff access."))}export{It as default};
|
frontend/dist/assets/index-BY_K4Azl.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
frontend/dist/assets/index-BhfDqrNT.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}}
|
frontend/dist/email/robot-hello.gif
ADDED
|
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-
|
| 2 |
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
| 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-BY_K4Azl.js"></script>
|
| 2 |
+
<link rel="stylesheet" crossorigin href="./assets/index-BhfDqrNT.css">
|
| 3 |
</head><body><div id="root"></div></body></html>
|
frontend/dist/logo.svg
CHANGED
|
|
|
|
frontend/dist/sample-thumbs/candle_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/candle_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/capsules_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/capsules_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/cashew_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/cashew_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/chewinggum_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/chewinggum_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/fryum_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/fryum_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/macaroni1_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/macaroni1_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/macaroni2_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/macaroni2_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/pcb1_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/pcb1_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/pcb2_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/pcb2_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/pcb3_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/pcb3_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/pcb4_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/pcb4_good.jpg
ADDED
|
|
frontend/dist/sample-thumbs/pipe_fryum_anomalous.jpg
ADDED
|
|
frontend/dist/sample-thumbs/pipe_fryum_good.jpg
ADDED
|
|