@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Manrope:wght@400;600;700;800&display=swap');
:root{font-family:'DM Sans',Arial,sans-serif;color:#233044;background:#f3f5f8;font-synthesis:none;--accent:#b71932;--line:#dfe4ec;--muted:#69768a;--green:#147b50;--red:#bd2f42;--amber:#a45c06;--purple:#7850b5}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid transparent;border-radius:9px;padding:11px 17px;font-weight:700;transition:background .12s,box-shadow .12s}button:hover:not(:disabled){filter:brightness(.96);box-shadow:0 2px 8px #17253a12}button:disabled{opacity:.42;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[contenteditable]:focus-visible{outline:3px solid #5a97e3;outline-offset:2px}h1,h2,h3{font-family:Manrope,Arial,sans-serif;letter-spacing:-.035em;color:#18253a}h1{font-size:32px;line-height:1.2;margin:10px 0 15px}h2{font-size:23px;margin:0 0 15px}h3{font-size:18px;margin:20px 0 12px}p{line-height:1.6;margin:10px 0 16px}.muted{color:var(--muted)}.eyebrow{font-size:11px;font-weight:800;letter-spacing:1.5px;text-transform:uppercase;color:#7b8494}.logo{font:800 42px Manrope,Arial;letter-spacing:-3px;color:#243045}.logo span{color:#c2223d}.primary{background:var(--green);color:#fff}.secondary{background:#fff;border-color:var(--line);color:#334259}.danger,.nok{background:#fcecef;color:#a12135;border-color:#f0c1c8}.amber,.rework{background:#fff1da;color:#8b5105;border-color:#edd09f}.ok{background:#e4f5ec;color:#11623e;border-color:#a9d4bf}.info{background:#f0e8fa;color:#7042a4;border-color:#d3bde9}.ghost{background:transparent;color:#58677b}.icon{background:transparent;padding:3px 10px;font-size:23px}.large{font-size:18px;padding:18px 24px;min-height:62px}.wide{width:100%}.grow{flex:1}.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.spread{justify-content:space-between}.heading,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:25px}.section-heading{margin-top:30px;margin-bottom:16px}.section{margin-top:24px}.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:25px;box-shadow:0 3px 10px #17253a03}.empty{text-align:center;padding:50px;color:var(--muted)}.shell{display:grid;grid-template-columns:238px minmax(0,1fr);min-height:100vh}.sidebar{background:#fff;border-right:1px solid var(--line);padding:28px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;border-top:5px solid var(--accent)}.identity{margin:25px 0 32px;display:grid;gap:10px}.identity strong{font-size:21px;line-height:1.3}.identity .badge{justify-self:start}nav{display:grid;gap:5px}.nav{text-align:left;background:transparent;color:#637086;padding:13px}.nav.active{color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,white);border-left:3px solid var(--accent)}.signout{margin-top:auto;background:#f3f5f8;color:#59667a}.shell>main{padding:0 36px 45px;min-width:0}.topbar{padding:23px 0;border-bottom:1px solid var(--line);font-size:10px;font-weight:700;letter-spacing:1px;display:flex;justify-content:space-between;color:#8490a0;margin-bottom:36px}.topbar span{color:#378b69}.role-admin{--accent:#7553ac}.role-cp{--accent:#226ab0}.role-tl{--accent:#b17613}.role-inspector{--accent:#228263}.role-data_capturer{--accent:#b34588}.badge{display:inline-block;border-radius:7px;padding:5px 9px;font-size:11px;font-weight:700;background:#edf0f5;color:#566478;white-space:nowrap}.badge.admin{background:#eee8f7;color:#7553ac}.badge.cp{background:#e7f0fa;color:#226ab0}.badge.tl{background:#fff0d5;color:#98600b}.badge.inspector{background:#e3f4ed;color:#228263}.badge.data_capturer{background:#f9e6f2;color:#a6357b}.status-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}.status-card{background:#fff;border:1px solid var(--line);padding:19px;text-align:left;min-height:110px}.status-card strong{display:block;font-size:27px;margin-bottom:10px}.status-card span{display:block;font-size:12px;font-weight:500;color:#657388;line-height:1.45}.status-card.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.table-tools,.pagination{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:15px;color:var(--muted);font-size:13px}.table-tools input{max-width:430px}.pagination{margin:18px 0 0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}th{background:#f6f8fa;color:#6c788b;border-bottom:1px solid var(--line);white-space:nowrap}th button{padding:13px 10px;background:transparent;font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:inherit}td{padding:16px 10px;border-bottom:1px solid #edf0f5;max-width:380px;overflow-wrap:anywhere}tr[tabindex]{cursor:pointer}tr[tabindex]:hover{background:#f6f9fd}td small{display:block;margin-top:5px}progress{width:100%;height:7px;border:0;border-radius:10px;background:#e9edf3;appearance:none}progress::-webkit-progress-bar{background:#e9edf3;border-radius:10px}progress::-webkit-progress-value{background:var(--green);border-radius:10px}progress::-moz-progress-bar{background:var(--green);border-radius:10px}td progress{min-width:80px;display:block;margin-top:7px}label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600;color:#536178;margin:12px 0}input,textarea,select{padding:12px;border:1px solid #d5dce7;border-radius:8px;background:#fff;color:#26354a;width:100%;min-width:0}input:disabled,textarea:disabled,select:disabled{background:#f0f2f5;color:#7f8b9b}textarea{min-height:85px;resize:vertical}select[size]{min-height:120px}input[type=checkbox]{width:18px;height:18px;accent-color:var(--green)}input[type=color]{width:48px;height:35px;padding:2px}input[type=range]{padding:0}fieldset{border:1px solid var(--line);border-radius:10px;margin:20px 0;padding:16px}legend{padding:0 7px;font-size:13px;font-weight:700}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px}.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:5px 14px}.check{flex-direction:row;align-items:center;font-weight:500;margin:6px 0}.modal{border:0;border-radius:16px;padding:0;width:min(580px,94vw);max-height:94dvh;box-shadow:0 25px 100px #14243e44;color:#25344b}.modal[open]{display:flex;flex-direction:column}.modal::backdrop{background:#15243a80;backdrop-filter:blur(3px)}.modal>header{padding:22px 28px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:20px;flex-shrink:0}.modal>header h2{margin:0;font-size:21px}.modal-body{padding:24px 28px;overflow:auto;overscroll-behavior:contain;min-height:0}.modal>footer{padding:18px 28px;border-top:1px solid var(--line);display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;flex-shrink:0}.wide-modal{width:min(1180px,96vw)}.wi-modal{height:94dvh}.wi-modal .modal-body{padding:0;display:flex;flex-direction:column;overflow:hidden}.wi-progress{padding:20px 26px 12px;flex-shrink:0}.wi-progress .row{font-size:12px}.wi-progress strong{font-size:19px;display:block}.wi-progress small{display:block;margin-top:5px;color:var(--muted)}.wi-progress progress{margin-top:15px}.wizard-tabs,.tabs{display:flex;gap:4px;overflow:auto;border-bottom:1px solid var(--line);padding:0 20px;flex-shrink:0}.tab{white-space:nowrap;border-radius:0;background:transparent;color:#748197;border-bottom:3px solid transparent;font-size:12px;padding:15px 12px}.tab.active{color:#205d9f;border-color:#205d9f}.wizard-content{padding:22px 28px;overflow:auto;flex:1;min-height:0}.notice{padding:17px 20px;border-radius:10px;background:#fff4da;color:#875e17;border:1px solid #f2dfae;margin:15px 0;line-height:1.5}.danger-notice{background:#fff0f1;border-color:#f3c0c6;color:#a42c3d}.danger-text,.form-error{color:#b2233a}.tags{display:flex;gap:7px;flex-wrap:wrap}.tags>span{background:#edf2f8;border-radius:7px;padding:5px 10px;font-size:13px}.step-card{border:1px solid var(--line);border-radius:10px;padding:16px;margin:12px 0;display:flex;align-items:center;justify-content:space-between;gap:15px}.step-card p{font-size:12px;margin:9px 0 0}.step-number{display:inline-flex;border-radius:50%;background:#edf1f7;color:#576b87;width:29px;height:29px;align-items:center;justify-content:center;font-size:12px;font-weight:800;margin-right:10px}.rich-toolbar{display:flex;gap:5px;flex-wrap:wrap;padding:8px;border:1px solid var(--line);border-bottom:0;background:#f7f9fb;border-radius:8px 8px 0 0;align-items:center}.rich-toolbar button{font-size:12px;padding:8px}.rich-toolbar label{flex-direction:row;align-items:center;margin:0}.rich-editor{height:220px;overflow:auto;border:1px solid var(--line);border-radius:0 0 8px 8px;padding:15px;line-height:1.6}.rich-editor img,.instruction-html img{max-width:100%;max-height:320px}.picture-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:20px;margin:20px 0}.reference{margin:0;max-width:100%}.annotated{position:relative;display:block;border:3px solid transparent;line-height:0;overflow:hidden}.annotated img{display:block;width:100%;height:auto}.annotated.OK{border-color:#188752;color:#188752}.annotated.NOK{border-color:#cc3045;color:#cc3045}.annotated.INFO{border-color:#8452bc;color:#8452bc}.circle{position:absolute;aspect-ratio:1;border:3px solid currentColor;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}.circle-layer{position:absolute;inset:0;pointer-events:none}figcaption{font-size:13px;line-height:1.5;padding:10px 0}.thumbnail{max-width:90px}.thumbnail img{max-height:80px;object-fit:contain}.image-editor{display:flex;justify-content:center;max-height:42dvh}.image-editor .annotated{max-height:42dvh;max-width:100%;width:max-content;cursor:crosshair}.image-editor img{height:100%;width:auto;max-height:41dvh;max-width:100%;object-fit:contain}.choice-row{display:flex;gap:10px;margin:15px 0}.choice-row button{flex:1}.choice-row button[aria-pressed=true]{outline:3px solid currentColor;outline-offset:2px}.assignee{display:flex;justify-content:space-between;align-items:center;padding:12px;border:1px solid var(--line);border-radius:8px;margin:8px 0}.history{border-left:3px solid #dde5f0;padding:8px 16px;margin:12px 0;font-size:13px}.history p{margin:5px 0}.review-cards,.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:15px}.stats strong{display:block;font-size:30px;margin-top:10px}.stats span{color:var(--muted);font-size:13px}.requirement-list{display:flex;gap:12px;flex-wrap:wrap}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;background:#f4f6f9;border-radius:8px;padding:15px}details{margin:22px 0}summary{cursor:pointer;font-weight:700;padding:12px 0}.jobs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:20px;margin-top:25px}.job h2{margin-top:22px}.login{display:grid;grid-template-columns:1fr 1fr;min-height:100dvh}.login-brand{padding:50px 9%;background:#172236;color:#c4cbda;display:flex;flex-direction:column;justify-content:space-between}.login-brand .logo{color:#fff}.login-brand h1{font-size:clamp(38px,4vw,62px);color:#fff;line-height:1.15}.login-brand .eyebrow{color:#bf8493}.login-brand small{font-size:10px;letter-spacing:2px}.login-choices{display:grid;place-items:center;padding:35px}.login-choices>div{width:100%;max-width:370px}.login-choices h2{font-size:35px}.login-choices button{margin:8px 0}.login-choices .muted{font-size:13px;margin-top:25px}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.keypad button{font-size:24px;min-height:64px}.password-page{min-height:100vh;display:grid;place-items:center;padding:25px}.password-page form{width:min(500px,100%)}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#17263b;color:#fff;padding:16px 24px;border-radius:10px;box-shadow:0 10px 30px #0003;display:none;z-index:99999;max-width:90vw;font-size:14px}.work-mode{min-height:100dvh;background:#f3f5f8;padding:0 32px 30px}.work-header{display:flex;justify-content:space-between;align-items:center;padding:20px 0;border-bottom:1px solid var(--line)}.work-header strong{display:block;font-size:22px;margin-top:7px}.work-header>span{font-size:14px;color:var(--muted)}.capture-card{max-width:680px;margin:35px auto;background:#fff;border:1px solid var(--line);padding:30px;border-radius:15px}.capture-card .large{margin:15px 0;width:100%}.capture-card input[name=identifier]{font-size:26px;font-weight:700;letter-spacing:1px}.capture-card progress{margin-bottom:20px}.capture-card .large-text{font-size:24px}.timer-bar{display:flex;align-items:center;gap:30px;padding:20px 0;position:sticky;top:0;background:#f3f5f8;z-index:3;border-bottom:1px solid var(--line)}.timer-bar>div{flex:1}.timer-bar span{display:block;font-size:12px;text-transform:uppercase;letter-spacing:1px;color:var(--muted)}.timer-bar strong{font-size:54px;font-variant-numeric:tabular-nums;line-height:1.25}.timer-amber,.rework-clock strong{color:#b77506}.timer-red{color:#c3283e}.flash{animation:flash .8s infinite alternate}@keyframes flash{to{opacity:.3}}.work-step{max-width:1200px;margin:22px auto;background:#fff;padding:30px;border-radius:14px;border:1px solid var(--line)}.work-step h1{margin-top:25px;font-size:32px}.instruction-html{font-size:20px;line-height:1.7;overflow-wrap:anywhere}.outcomes{display:flex;gap:18px;margin-top:30px}.outcome{flex:1;min-height:100px;font-size:26px;border-radius:12px}.outcome.ok{background:#147d50;color:#fff}.outcome.nok{background:#bd3044;color:#fff}.outcome.rework{background:#e6a328;color:#352707}.outcome.understand{background:#246bb0;color:#fff}.pause-overlay{position:fixed;inset:0;background:#142238ed;z-index:8;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#d3dbe7}.pause-overlay h1{color:#fff;font-size:42px}.pause-overlay button{width:300px}.pause-reasons{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:1000px){.shell{grid-template-columns:190px minmax(0,1fr)}.shell>main{padding:0 20px 30px}.sidebar{padding:20px 12px}.identity strong{font-size:18px}.status-cards{grid-template-columns:repeat(3,1fr)}.step-card{display:block}.step-card .row{margin-top:15px}.outcome{font-size:22px;padding:15px}.work-mode{padding:0 20px 20px}}
@media(max-width:650px){.shell{display:block}.sidebar{position:relative;height:auto;padding:12px 16px;border-right:0}.sidebar .logo{font-size:30px}.identity{margin:8px 0;display:flex;align-items:center;justify-content:space-between}.identity strong{font-size:17px}.sidebar nav{display:flex;overflow:auto;margin-top:10px}.nav{white-space:nowrap;font-size:12px;padding:10px}.signout{position:absolute;right:15px;top:12px;font-size:11px;padding:8px}.topbar{margin-bottom:22px;font-size:8px}.heading{align-items:flex-start;flex-direction:column;gap:10px}h1{font-size:27px}.status-cards{grid-template-columns:repeat(3,1fr);gap:7px}.status-card{padding:12px;min-height:100px}.status-card span{font-size:10px}.card{padding:16px}.form-grid{grid-template-columns:1fr}.modal>header,.modal>footer{padding:16px}.modal-body,.wizard-content{padding:17px}.wi-progress{padding:16px}.wi-progress .row>span{font-size:10px}.modal>footer button{flex:1;font-size:12px}.table-tools{align-items:stretch;flex-direction:column}.login{display:block}.login-brand{min-height:230px;padding:24px}.login-brand h1{font-size:35px;margin:20px 0 10px}.login-brand p:not(.eyebrow),.login-brand small{display:none}.login-brand .eyebrow{display:none}.login-choices{padding:30px 25px}.work-mode{padding:0 12px 20px}.work-header>span{font-size:11px}.work-header .eyebrow{font-size:9px}.work-header strong{font-size:18px}.work-step{padding:18px}.work-step h1{font-size:26px}.timer-bar{gap:12px}.timer-bar strong{font-size:40px}.timer-bar .large{font-size:14px;padding:10px;min-height:48px}.timer-bar span{font-size:9px}.outcomes{gap:9px}.outcome{font-size:18px;min-height:85px;padding:10px}.instruction-html{font-size:18px}.capture-card{padding:22px;margin:20px auto}.picture-grid{grid-template-columns:1fr}.modal .picture-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.stats{grid-template-columns:1fr}.image-editor{max-height:30dvh}.image-editor .annotated{max-height:30dvh}.image-editor img{max-height:29dvh}.rich-toolbar button{font-size:10px;padding:6px}}
@media(prefers-reduced-motion:reduce){.flash{animation:none;background:#fee7ea}}
.wi-modal .modal-body{flex:1}.dialog-error{background:#fff0f1;padding:12px;border-radius:8px;flex-shrink:0}
[data-camera-view] video,[data-camera-review]{display:block;width:100%;max-height:45dvh;object-fit:contain;border-radius:10px;background:#152238;margin:12px 0}.camera-controls{margin-top:15px}[hidden]{display:none!important}
.record-details{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:18px 0 28px}.record-details>div{padding:14px 16px;background:#f5f7fa;border:1px solid var(--line);border-radius:9px}.record-details dt{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}.record-details dd{margin:8px 0 0;font-size:15px;font-weight:600;overflow-wrap:anywhere}.evidence-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:18px}.evidence-card{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff;min-width:0}.evidence-card header{padding:16px;min-height:86px}.evidence-card h4{margin:0;font-size:15px;line-height:1.5}.evidence-card header p{margin:6px 0 0;font-size:13px;color:var(--muted)}.evidence-preview{display:block;width:100%;padding:0;border-radius:0;background:#edf0f5}.evidence-preview img{display:block;width:100%;height:220px;object-fit:contain}.evidence-info{padding:16px}.evidence-info small{display:block;color:var(--muted);margin-bottom:14px}.evidence-info button{font-size:12px}.evidence-full{display:block;width:100%;height:auto;max-height:65dvh;object-fit:contain;background:#edf0f5;border-radius:10px}.result-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.result-cards .badge.ok{background:#e4f5ec;color:#11623e}.result-cards .badge.nok{background:#fcecef;color:#a12135}
.status-card.attention-own{background:#e9a528;border-color:#bd7a05;color:#302004;box-shadow:0 0 0 1px #bd7a0520}.status-card.attention-own span,.status-card.attention-own small{color:#493109}.status-card.attention-colleague{background:#fff0d2;border-color:#e8c47e;color:#70480b}.status-card.attention-colleague span,.status-card.attention-colleague small{color:#81581e}.status-card small{display:block;margin-top:9px;font-size:10px;font-weight:700;line-height:1.4}.status-card.attention-own.selected,.status-card.attention-colleague.selected{outline:2px solid #805000;outline-offset:2px}.status-card.attention-own strong,.status-card.attention-colleague strong{color:inherit}

.rich-editor,.instruction-html{font-synthesis:style}

.line-timer{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:20px;padding:18px 0}.line-timer .cycle-timer{grid-column:2;grid-row:1;text-align:center}.line-timer #cycle-clock{display:block;font-size:clamp(80px,11vw,144px);font-weight:800;line-height:1.05;letter-spacing:-4px;padding:5px 16px;border-radius:12px}.line-timer .cycle-timer>span{font-size:13px;font-weight:800;letter-spacing:1.5px;margin-bottom:5px}.line-timer .rework-clock{grid-column:1;grid-row:1;min-width:0}.line-timer>[data-pause]{grid-column:3;grid-row:1;justify-self:end}.line-timer #cycle-clock.flash{animation:line-overdue .4s steps(1,end) infinite}@keyframes line-overdue{0%,49.99%{background:#bd1730;color:#fff}50%,100%{background:transparent;color:#bd1730}}
@media(max-width:650px){.line-timer{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;padding:14px 0}.line-timer .cycle-timer{grid-column:1/-1;grid-row:1}.line-timer #cycle-clock{font-size:clamp(72px,19vw,110px);letter-spacing:-2px;padding:5px 8px}.line-timer .cycle-timer>span{font-size:12px}.line-timer .rework-clock{grid-column:1;grid-row:2}.line-timer>[data-pause]{grid-column:2;grid-row:2}.line-timer .rework-clock strong{font-size:32px}}
@media(prefers-reduced-motion:reduce){.line-timer #cycle-clock.flash{animation:none;background:#bd1730;color:#fff}}
.bi-badge{display:inline-flex;align-items:center;justify-content:center;min-width:44px;padding:7px 11px;border:2px solid #17212f;border-radius:6px;font-size:14px;line-height:1.2;font-weight:800;color:#000;white-space:nowrap;vertical-align:middle}.bi-red{background:#ff0000;color:#000}.bi-yellow{background:#ffff00;color:#000}.bi-green{background:#00b050;color:#000}.bi-unset{background:#f0f2f5;color:#69768a;border-color:#c7cfda;font-size:12px}.bi-field{margin:12px 0}.bi-field>label{margin:0 0 8px}.bi-picker{display:flex;align-items:center;gap:12px;width:100%;padding:8px 12px;text-align:left}.bi-picker:disabled{opacity:1;cursor:default}.bi-picker>span:last-child{color:var(--muted);font-size:12px}.wi-progress .bi-badge{margin-top:8px}.bi-chart{border:1px solid #17212f}.bi-option{display:grid;grid-template-columns:minmax(0,1fr) 85px;align-items:stretch;width:100%;padding:0;border:0;border-bottom:1px solid #17212f;border-radius:0;text-align:left;background:#fff;color:#17212f;box-shadow:none}.bi-option:last-child{border-bottom:0}.bi-option:hover:not(:disabled){filter:none;box-shadow:inset 4px 0 #243044;background:#f5f7fb}.bi-option[aria-checked=true]{outline:3px solid #226ab0;outline-offset:-3px}.bi-option:focus-visible{outline:3px solid #226ab0;outline-offset:-3px}.bi-description{display:grid;gap:4px;padding:12px 15px;font-size:14px;line-height:1.4}.bi-description>span{font-weight:400}.bi-score{display:flex;align-items:center;justify-content:center;border-left:1px solid #17212f;font-size:23px;font-weight:800}.bi-modal .modal-body{padding:18px 24px}.work-identity{display:flex;align-items:center;gap:14px}.work-identity>span:not(.bi-badge){font-size:13px;color:var(--muted)}
@media(max-width:650px){.bi-option{grid-template-columns:minmax(0,1fr) 52px}.bi-description{font-size:12px;padding:10px}.bi-score{font-size:21px}.bi-modal .modal-body{padding:12px}.bi-modal>header h2{font-size:18px}.work-identity{gap:7px;flex-direction:column;align-items:flex-end}.work-identity .bi-badge{font-size:12px;padding:5px 8px}.work-identity>span:not(.bi-badge){font-size:10px}}


.export-status-filter{margin:16px 0;border:1px solid var(--line);border-radius:9px;background:#fff}.export-status-filter>summary{padding:12px 14px;cursor:pointer;font-weight:700}.export-status-filter>summary:focus-visible{outline:3px solid #5a97e3;outline-offset:2px}.export-status-filter>summary span{font-weight:400}.export-status-filter fieldset{border:0;border-top:1px solid var(--line);margin:0;padding:12px 14px;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}.export-status-filter .check{margin:0}.export-status-filter legend{font-size:13px;color:var(--muted)}

/* Camera recognition: large controls and touch selection on tablets. */
.scanner-modal video,.scanner-modal canvas{display:block;width:100%;max-height:55vh;object-fit:contain;background:#161c25;border-radius:8px}
.scanner-modal canvas{height:auto;max-height:none;touch-action:none;cursor:crosshair}
.scanner-modal [data-review]{max-width:760px;margin:auto}
.scanner-modal [data-value]{font-family:monospace;font-size:1.3rem;letter-spacing:.08em}
.scanner-modal footer{flex-wrap:wrap;gap:8px}
.scanner-modal [data-result]{padding:16px 0}
.scanner-modal [data-status]{min-height:1.5em}
/* Live target is mapped to the displayed, object-fit:cover camera pixels. */
.live-scanner .scan-feed{position:relative;height:clamp(220px,45vh,420px);overflow:hidden;border-radius:10px;background:#151b22}
.live-scanner .scan-feed video{width:100%;height:100%;max-height:none;object-fit:cover;cursor:pointer}
.live-scanner .scan-target{position:absolute;border:3px solid #ffbd00;border-radius:8px;box-shadow:0 0 0 9999px #0007;pointer-events:none}
.live-scanner [data-photo]{display:block;max-width:100%;max-height:220px;margin:12px auto;object-fit:contain}
.live-scanner [data-photo][hidden]{display:none}
.live-scanner [data-status]{font-weight:600}
/* Photo controls always occupy the footer; media shrinks into remaining space. */
.photo-modal{width:min(860px,calc(100vw - 16px));height:calc(var(--photo-vh,100dvh) - 16px);max-height:calc(var(--photo-vh,100dvh) - 16px);overflow:hidden}
.photo-modal>header{padding:12px 16px}.photo-modal>footer{padding:12px;display:flex;flex-wrap:nowrap;gap:8px}
.photo-modal>footer button{flex:1 1 0;min-width:0;padding:12px 4px;font-size:clamp(11px,3vw,15px)}
.photo-modal .modal-body{flex:1;min-height:0;overflow:hidden;padding:10px;display:flex;flex-direction:column}
.photo-modal [data-camera-view]{display:flex;flex-direction:column;flex:1;min-height:0;gap:8px}
.photo-modal [data-camera-status]{flex-shrink:0;font-size:12px;line-height:1.3;margin:0;max-height:3.9em;overflow:auto}
.photo-modal [data-camera-status]:empty{display:none}
.photo-modal [data-camera-select]{flex-direction:row;align-items:center;margin:0;flex-shrink:0}
.photo-modal [data-camera-select] select{padding:6px}
.photo-modal .photo-viewport{position:relative;flex:1;min-height:0;overflow:hidden;border-radius:8px;background:#152238}
.photo-modal .photo-viewport video,.photo-modal .photo-viewport img{position:absolute;inset:0;width:100%;height:100%;max-height:none;max-width:100%;object-fit:contain;margin:0}
@media(max-height:420px){.photo-modal>header{padding:5px 12px}.photo-modal>header h2{font-size:17px}.photo-modal>footer{padding:6px}.photo-modal>footer button{padding:8px 4px}.photo-modal .modal-body{padding:6px}.photo-modal [data-camera-view]{gap:4px}}

/* Keep WI actions together without crowding the title on tablets. */
.wi-modal>header{gap:16px}
.wi-modal>header>h2{flex:1;min-width:0;overflow-wrap:anywhere}
.wi-header-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto;margin-left:auto}
.wi-header-actions>.wi-header-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;padding:0;border:1px solid var(--line);border-radius:10px;background:#f6f8fb;color:#637086;line-height:1}
.wi-header-button>svg{display:block;width:21px;height:21px;pointer-events:none}
.wi-header-actions>.wi-header-inspect{background:#edf7f2;color:#147b50;border-color:#d4e9dd}
.wi-header-actions>.wi-header-pdf{background:#edf4fc;color:#226ab0;border-color:#d7e4f4}
.wi-header-actions>.wi-header-button:hover:not(:disabled){filter:brightness(.96);box-shadow:0 2px 7px #17253a12}

/* Keep WI tab actions visible while its content scrolls. */
.wi-modal[open]{display:flex;flex-direction:column;height:94vh;max-height:94vh;height:94dvh;max-height:94dvh;overflow:hidden}
.wi-modal>.modal-body{min-height:0;flex:1 1 0}
.wi-modal>footer{flex:0 0 auto;background:#fff;position:relative;z-index:1}

:root{--required-red:#b42336;--required-green:#147b50}
.requirement-missing{color:var(--required-red)!important}
.requirement-met{color:var(--required-green)!important}
.search-picker{position:relative;min-width:0}
.search-picker>label{display:block;margin-bottom:6px;font-weight:600}
.picker-control{display:flex;gap:0}
.picker-control input{min-width:0;width:100%;border-radius:8px 0 0 8px}
.picker-control .picker-toggle{flex:0 0 44px;border-radius:0 8px 8px 0;margin:0;padding:0}
.picker-options{position:absolute;top:78px;left:0;right:0;z-index:30;max-height:240px;overflow:auto;padding:6px;background:#fff;border:1px solid #b9c4ce;border-radius:8px;box-shadow:0 8px 20px #182b4926}
.picker-options[hidden]{display:none}
.picker-option{display:block;width:100%;min-height:44px;text-align:left;white-space:normal;background:#fff;color:#182b49;border:0;padding:10px 12px;border-radius:5px}
.picker-option:hover,.picker-option.highlighted,.picker-option[aria-selected=true]{background:#eaf1fb}
.picker-options p{padding:10px 12px;margin:0}
.search-picker .picker-add{margin-top:10px;min-height:44px;border:2px solid #385e88;font-weight:700;background:#eaf1fb;color:#23466e}
.add-to-wi{min-width:160px;margin:8px 0 16px}

/* WI lifecycle badge stays beside the title in the fixed modal header. */
.wi-status-badge{display:inline-flex;align-items:center;vertical-align:middle;white-space:nowrap;margin-left:12px;padding:4px 8px;border:1px solid transparent;border-radius:999px;font:700 11px/1.2 'DM Sans',Arial,sans-serif;letter-spacing:0}
.wi-status-draft{background:#eef1f5;border-color:#d9e0e9;color:#526176}
.wi-status-issued{background:#eaf2fa;border-color:#cddff1;color:#285e8e}
.wi-status-active{background:#e8f4ed;border-color:#cce6d6;color:#21694a}
.wi-status-closed{background:#f7edf0;border-color:#e8d1d8;color:#854452}


/* Reserve a visible place while an instruction picture loads. */
.reference img[data-reference-key]:not([src]){min-height:140px;min-width:120px;background:#f3f5f8}

.step-modal{height:94vh;height:94dvh;width:min(1180px,96vw)}
.step-modal>.modal-body{flex:1;padding:16px 28px 24px}
.step-modal>.modal-body>label:first-child{margin-top:0}
.step-instructions{border:1px solid #d6dde7;border-radius:10px;box-shadow:0 2px 5px #17253a06}
.step-instructions .rich-toolbar{gap:3px;border:0;border-bottom:1px solid #dfe4ec;border-radius:10px 10px 0 0;padding:6px 10px;background:#f6f8fb;flex-wrap:nowrap}
.rich-toolbar .rich-tool{width:38px;height:38px;min-height:38px;padding:9px;border:0;border-radius:6px;background:transparent;color:#435169;display:inline-flex;align-items:center;justify-content:center}
.rich-toolbar .rich-tool:hover,.rich-toolbar .rich-tool[aria-pressed=true],.rich-toolbar .rich-tool[aria-expanded=true]{background:#e6edf6;color:#205d9f;box-shadow:none}
.rich-tool svg{width:20px;height:20px;flex-shrink:0}
.rich-divider{height:22px;width:1px;background:#dbe1ea;margin:0 5px;flex-shrink:0}
.rich-colour-picker{position:relative;display:flex}
.colour-indicator{stroke:var(--text-colour,#111111)}
.rich-palette{position:absolute;top:calc(100% + 9px);left:-65px;z-index:5;display:grid;grid-template-columns:repeat(6,34px);gap:4px;padding:10px;background:#fff;border:1px solid #dfe4ec;border-radius:10px;box-shadow:0 8px 26px #17253a26}
.rich-palette[hidden],.rich-image-selection[hidden]{display:none}
.rich-toolbar .rich-swatch{display:grid;place-items:center;width:34px;height:34px;padding:5px;border:1px solid transparent;border-radius:6px;background:transparent}
.rich-swatch span{display:block;width:22px;height:22px;border-radius:4px}
.rich-swatch[aria-pressed=true]{border-color:#226ab0;background:#eaf2fc}
.rich-canvas{position:relative;overflow:hidden;border-radius:0 0 10px 10px}
.step-instructions .rich-editor{height:clamp(220px,calc(100vh - 470px),620px);height:clamp(220px,calc(100dvh - 470px),620px);padding:22px 26px;border:0;border-radius:0;background:#fff;line-height:1.65;font-size:16px;overflow-wrap:anywhere}
.step-instructions .rich-editor:focus-visible{outline:2px solid #84addb;outline-offset:-2px}
.step-instructions .rich-editor:empty:before{content:'Write instructions or paste an image…';color:#9aa5b5;pointer-events:none}
.step-instructions .rich-editor img{cursor:pointer;vertical-align:middle}
.rich-editor img[style*="width"],.instruction-html img[style*="width"]{max-height:none;height:auto}
.rich-image-selection{position:absolute;border:2px solid #226ab0;pointer-events:none;z-index:2}
.rich-resize-handle{position:absolute;right:-7px;bottom:-7px;width:14px;height:14px;padding:0;border:2px solid #fff;border-radius:3px;background:#226ab0;box-shadow:0 0 0 1px #226ab0;cursor:nwse-resize;pointer-events:auto;touch-action:none}
.step-save-status{font-size:12px;color:#69768a;margin-right:auto;align-self:center}
@media(max-width:650px){.step-modal>.modal-body{padding:12px 14px 20px}.step-instructions .rich-toolbar{padding:5px;gap:1px}.rich-divider{margin:0 3px}.step-instructions .rich-editor{padding:16px}.step-modal>header{padding:16px}.step-modal>footer{padding:12px 14px}.step-save-status:empty{display:none}}
