/* Existing product colours; shared working controls and recovery states. */
body :focus-visible{outline:3px solid #277994;outline-offset:3px}
.skip-link{position:fixed;left:12px;top:-80px;background:#fff;color:#17415a;padding:12px;z-index:100}
.skip-link:focus{top:10px}
body main input:not([type]),body main input[type=text],body main input[type=number],body main input[type=password],body main select,body main textarea,body main input[type=search]{font-size:16px;min-height:44px;border:1px solid #bbcbd4;border-radius:7px;padding:10px 12px;width:100%;color:#213d50;background:#fff}
body main input[readonly]{background:#f0f5f7}
body main .btn{border-radius:7px;min-height:44px;font-size:16px;padding:10px 16px}
body main .btn.ghost{background:#f3f8fa;color:#245b78;border:1px solid #bbd0dc}
body main label.f{font-size:14px;margin-bottom:18px}
body main label.f b{font-weight:550;margin-bottom:7px;color:#365465}
body main .flow-form{padding:20px;border-color:#ccdbe3;border-radius:10px}
body main .flow-form summary{font-size:19px;color:#214a60}
body main .flow-form form>.grid2{gap:0 24px}
body main .flow-note{font-size:14px;line-height:1.7}
body main textarea.sampling-notes{min-height:180px;line-height:1.7;resize:vertical;overflow-y:hidden}
body main label.f:has(.sampling-notes){grid-column:1/-1}
body main .kpi .n{font-size:23px;overflow-wrap:anywhere}
.form-feedback{padding:14px 16px;border:1px solid #adc9bb;background:#f1f8f4;border-radius:8px;margin:14px 0;line-height:1.7;color:#225542;overflow-wrap:anywhere}
.form-feedback[data-error=true]{background:#fff5f2;border-color:#d9aa9d;color:#843c2c}
.form-feedback p{margin:3px 0 8px}
.form-feedback a{display:inline-block;margin:4px 18px 0 0;color:#245b78;font-weight:600}
.form-feedback[hidden],.draft-tools[hidden]{display:none!important}
.draft-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0;padding:12px 0;border-top:1px solid #e0e8ed}
.draft-tools p{flex:1;min-width:220px;font-size:13px;color:#597181;line-height:1.6}
.draft-tools button{background:#f3f8fa!important;color:#245b78!important;border:1px solid #bdd1dc!important}
.draft-photos{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.draft-photos figure{margin:0;max-width:130px}.draft-photos img{height:90px;width:130px;object-fit:cover;border:1px solid #ccdbe3;border-radius:5px}.draft-photos figcaption{font-size:12px;overflow-wrap:anywhere;color:#586f7e}
.structured-editor{margin:8px 0 22px;padding-top:10px;border-top:1px solid #dae5eb}
.structured-row{display:grid;grid-template-columns:1.1fr .8fr .6fr 1fr 1.2fr auto;gap:10px;align-items:end;border-bottom:1px solid #e1e9ee;margin-bottom:12px;padding-bottom:12px}
body main .structured-row label.f{margin:0;min-width:0}.structured-row input{min-width:0}
.structured-notes{margin-top:16px}.structured-row .row-remove{padding:10px!important}
.record-context .kpis{margin-bottom:0}.record-context .kpi{box-shadow:none;text-align:left;background:#f4f8fa;padding:10px 12px;border-radius:7px}
.record-context details{margin-top:12px}.record-context summary{font-size:14px;color:#345e73;cursor:pointer;padding:8px 0}
.ongoing-list{list-style:none;margin:0;padding:0}.ongoing-list>li[hidden]{display:none}
body .lablink-home{overflow-wrap:anywhere}
body.lablink-home .ongoing-controls select,body.lablink-home .ongoing-controls input[type=search]{font-size:16px;min-height:44px}
body.lablink-home .ongoing-controls select{width:144px}
body.lablink-home .ongoing-heading h2{font-size:20px}
body.lablink-home .ongoing-state b[data-priority="0"]{color:#943b26;background:#fff0e9}
body.lablink-home .ongoing-state b[data-priority="1"]{color:#80540f;background:#fff5de}
body.lablink-home .ongoing-row{scroll-margin:12px}
.inventory-link{font-size:13px;margin-left:12px;color:#345e73}
.home-receipt{flex-shrink:0;margin:0}
@media(min-width:1101px){body.lablink-home .ongoing-panel{grid-template-columns:minmax(240px,.48fr) minmax(0,1.52fr)}body.lablink-home .ongoing-controls{gap:8px}body.lablink-home .ongoing-controls input[type=search]{min-width:130px}}
@media(max-width:700px){
 body.lablink-home main{display:flex;flex-direction:column}
 body.lablink-home .home-context{order:0}body.lablink-home .home-receipt{order:1;margin-bottom:12px}
 body.lablink-home .ongoing-panel{order:2}body.lablink-home .process-banner{order:3}
 body.lablink-home .process-banner[data-enhanced=true]:not([data-expanded=true]) #process-steps{display:none}
 body.lablink-home .process-heading{margin-bottom:0}body.lablink-home .process-heading h1{font-size:22px}
 body.lablink-home .process-console-key{display:none}body.lablink-home .process-current{margin-top:12px;padding-top:12px}
 body.lablink-home .ongoing-controls{align-items:stretch;gap:8px}
 body.lablink-home .ongoing-controls label{min-height:44px;flex-basis:100%}
 body.lablink-home .ongoing-row{grid-template-columns:1fr;gap:7px;padding:16px 2px}
 body.lablink-home .ongoing-open,body.lablink-home .ongoing-state{grid-column:1/-1;text-align:left;align-items:flex-start}
 body.lablink-home .ongoing-open{flex-direction:row;justify-content:space-between;align-items:center}
 body.lablink-home .ongoing-updated{line-height:1.7}
 body main .flow-form{padding:16px 12px}body main .flow-form form>.grid2{grid-template-columns:1fr}
 .structured-row{grid-template-columns:1fr 1fr;background:#f6f9fb;padding:12px;border:1px solid #d9e4ea;border-radius:7px}
 .structured-row label:first-child{grid-column:1/-1}.structured-row .row-remove{grid-column:2;justify-self:end}
 .weigh-manual-heading{gap:10px;flex-wrap:wrap}.record-context .kpis{grid-template-columns:1fr 1fr}.record-context .kpi:first-child{grid-column:1/-1}
 .inventory-link{display:block;margin:4px 0 0}
}
/* Sample handoff and per-project laboratory reporting. */
.testing-choices{margin:0 0 20px;padding:14px 16px 18px;border:1px solid #cbdce5;border-radius:10px;min-width:0}
.testing-choices legend{font-weight:650;color:#31586c;padding:0 5px}
.testing-choice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.testing-choice-grid label{display:flex;align-items:center;gap:10px;padding:12px;background:#f6fafc;border:1px solid #d9e4ea;border-radius:7px;cursor:pointer}
body main .testing-choice-grid input{width:18px;height:18px;min-height:18px;margin:0;accent-color:#176581;flex-shrink:0}
.testing-choice-grid label:has(input:checked){border-color:#4288a2;background:#edf7fb}
.testing-urgency{display:inline-block;border-radius:6px;padding:7px 12px;background:#e8f0f5;color:#355568;font-size:14px}
.testing-urgency.is-urgent{background:#fff0d7;color:#995300;border:1px solid #f0c888}
.testing-report-sheet{margin:0 0 20px}.testing-report-sheet h3{font-size:16px;color:#31586c}
.testing-report-sheet table{width:100%;table-layout:fixed}.testing-report-sheet th:first-child{width:22%}
.testing-report-sheet td{padding:10px}.testing-report-sheet input{width:100%;min-width:0;box-sizing:border-box}
.testing-report-sheet tfoot{background:#eef5f8}.testing-report-sheet tfoot th{width:auto;text-align:right}.testing-cost-total,.testing-cost-saved strong{font-variant-numeric:tabular-nums;color:#175c74;font-weight:650}
@media(max-width:700px){.testing-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.testing-report-sheet table{min-width:540px}}
/* 皂脚性状（取样记录 + QA 复核） */
.appearance-fields{border:1px solid #d0dde6;border-radius:8px;padding:12px 14px;margin:12px 0}
.appearance-fields legend{font-weight:600;padding:0 6px}
.appearance-panel{border:1px solid #d0dde6;border-radius:8px;padding:10px 12px;margin:8px 0;font-size:14px;line-height:1.6}
.appearance-panel.ap-flag.ap-pending{background:#fff7e0;border-color:#d49a2e}
.appearance-panel.ap-abnormal{background:#fee7e5;border-color:#c9362b}
.appearance-panel.ap-confirmed{background:#eef8f2;border-color:#b7d6c6}
.appearance-panel .ap-warn{color:#6b4800;font-weight:600}
.appearance-panel .ap-review{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;margin-top:6px}
.appearance-panel .ap-review .f{flex:1 1 260px}
