#sop-workspace{display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;margin-top:24px;color:#203936}
.sop-editor>header{margin-bottom:0}.sop-editor>footer{margin-top:0}.sop-version-label{white-space:nowrap}.sop-editor input,.sop-editor textarea,.sop-editor select{font-weight:400}.sop-small form{padding:0}
#sop-workspace button,.sop-editor button,.sop-small button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;border-radius:6px}
.sop-categories{border-right:1px solid #dce5e2;padding-right:18px;display:flex;flex-direction:column;gap:6px}
.sop-categories header,.sop-images header,.sop-section-head,.sop-edit-row>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sop-categories h2,.sop-images h3,.sop-section-head h3{font-size:17px;margin:0}
.sop-categories>button,.sop-category>button:first-child{border:0;background:transparent;justify-content:space-between!important;text-align:left;white-space:normal;overflow-wrap:anywhere;padding:10px;flex:1;min-width:0}
.sop-category{display:flex;align-items:center;gap:2px}.sop-category>button:last-child{padding:6px;flex:none;border:0;background:transparent;width:30px}.sop-category svg{width:17px}
.sop-categories .selected{background:#e3f0ea!important;color:#12654f;font-weight:700}.sop-categories small{color:#526c65;margin-left:10px}
.sop-toolbar{display:flex;align-items:center;gap:12px;padding-bottom:16px;border-bottom:1px solid #dce5e2}.sop-toolbar input{width:320px;max-width:100%;margin:0}.sop-toolbar select{width:auto;max-width:150px;margin:0}.sop-toolbar>span{margin-left:auto;white-space:nowrap;color:#5c706b}
.sop-documents article{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 0;border-bottom:1px solid #dce5e2}.sop-documents article>div:first-child{min-width:0}.sop-title{font-size:18px;font-weight:700;text-align:left;overflow-wrap:anywhere}.sop-documents p{margin:6px 0;color:#5c706b}.sop-documents p span{margin-left:12px;color:#315b7b;background:#e9f0f5;padding:2px 7px;border-radius:4px}.sop-documents small{color:#61746f}.sop-row-actions{display:flex;gap:8px;flex-shrink:0}
.sop-small{width:480px;max-width:calc(100vw - 24px);padding:24px;border:1px solid #dce5e2;border-radius:8px}.sop-small header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.sop-small h2{font-size:22px;margin:0}.sop-small label{display:block;margin:16px 0}.sop-small footer{display:flex;justify-content:flex-end;gap:12px;margin-top:20px}
dialog.sop-editor{width:min(1480px,96vw);max-width:96vw;height:94dvh;max-height:94dvh;padding:0;border:1px solid #dae4e0;border-radius:8px;color:#203936;overflow:hidden}dialog.sop-editor[open]{display:flex;flex-direction:column}.sop-editor>header{padding:18px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #dce5e2;flex-shrink:0}.sop-editor h2{font-size:22px;margin:0 0 6px;line-height:1.4}.sop-editor header>div{min-width:0}.sop-editor header>div>span{font-size:13px;color:#527065}.sop-editor-tools{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 24px;background:#f5f8f7;flex-shrink:0;border-bottom:1px solid #dce5e2}.sop-modes{display:flex;gap:0}.sop-modes button{border-radius:0}.sop-modes button.selected{color:#12654f;background:#e3f0ea;border-color:#98bbae;font-weight:700}.sop-version-label{display:flex;align-items:center;gap:8px;font-size:14px;margin-left:auto}.sop-version-label select{width:260px;margin:0;max-width:100%}.sop-editor-body{overflow:auto;flex:1;min-height:0;padding:24px}.sop-editor>footer{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;padding:12px 24px;border-top:1px solid #dce5e2;background:white}.sop-editor footer>div{display:flex;gap:10px;flex-shrink:0}.sop-editor footer p{margin:0;font-size:14px;max-height:70px;overflow:auto}.sop-meta{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px}.sop-meta label,.sop-row-grid label{font-size:14px;font-weight:600;color:#37534c;display:block}.sop-editor input,.sop-editor select,.sop-editor textarea{font-size:16px;letter-spacing:0;border-radius:5px;margin-top:6px}.sop-editor textarea{resize:vertical;line-height:1.65;min-height:70px}.sop-wide{grid-column:1/-1}.sop-images{padding:20px 0;border-bottom:1px solid #dce5e2}.sop-images small{font-size:13px;color:#667b74;font-weight:400}.sop-upload{display:inline-flex;align-items:center;gap:8px;position:relative;border:1px solid #c9d8d2;border-radius:6px;padding:8px 12px;cursor:pointer}.sop-upload input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.sop-thumbnails{display:flex;gap:12px;flex-wrap:wrap}.sop-thumbnails figure{position:relative;margin:14px 0 0;width:150px;height:110px}.sop-thumbnails figure>button:first-child{width:100%;height:100%;padding:4px}.sop-thumbnails img{width:100%;height:100%;object-fit:contain}.sop-thumbnails figure>button:last-child{position:absolute;right:0;top:0;background:white;min-height:28px;padding:4px}.sop-upload-status{font-size:14px;color:#526c65}.sop-section-head{margin:24px 0 10px}.sop-timing{color:#925d12;font-size:14px}.sop-edit-row{padding:18px 0;border-bottom:1px solid #dce5e2}.sop-edit-row>header{margin-bottom:12px}.sop-edit-row>header>div{display:flex;gap:6px}.sop-edit-row>header button{padding:6px;min-height:32px}.sop-row-grid{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,3fr);gap:14px 24px}.sop-row-grid fieldset{display:flex;align-items:center;gap:10px;border:0;padding:0;margin:0;min-width:0}.sop-row-grid legend{font-size:14px;font-weight:600;color:#37534c}.sop-row-grid fieldset input{width:100px;max-width:30%;margin:0}.sop-row-grid output{font-size:14px;color:#627970}.sop-preview{max-width:1360px;margin:0 auto}.sop-preview>header{padding-bottom:20px;border-bottom:1px solid #dce5e2}.sop-preview header p{margin:0 0 8px;color:#61766f;font-size:14px}.sop-preview h2{font-size:24px;overflow-wrap:anywhere}.sop-preview header a{display:inline-flex;gap:6px;align-items:center;font-size:14px}.sop-preview-images{display:flex;gap:16px;flex-wrap:wrap;margin:20px 0}.sop-preview-images button{width:200px;height:150px;padding:8px}.sop-preview-images img{width:100%;height:100%;object-fit:contain}.sop-notes{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px}.sop-preview table{width:100%;table-layout:fixed;border-collapse:collapse;margin-top:20px}.sop-preview th,.sop-preview td{white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top;padding:16px;border:1px solid #dce5e2;line-height:1.75;font-size:16px;color:#253b35}.sop-preview thead th{position:sticky;top:-24px;background:#e8f0ec;color:#244f42;font-weight:700;z-index:1}.sop-preview tbody th{font-weight:600}.sop-preview tbody tr:nth-child(even){background:#f7f9f8}.sop-preview small{display:block;font-size:13px;color:#6a7c76;margin-top:5px}.sop-time-col{width:12%}.sop-stage-col{width:14%}.sop-purpose-col{width:21%}.sop-image-dialog{width:94vw;max-width:94vw;height:92dvh;max-height:92dvh;padding:48px 16px 16px;border:0;border-radius:8px}.sop-image-dialog img{width:100%;height:100%;object-fit:contain}.sop-image-dialog button{position:absolute;right:12px;top:8px}.sop-editor [hidden]{display:none!important}.sop-editor svg,.sop-small svg,#sop-workspace svg{width:18px;height:18px;flex-shrink:0}
@media(max-width:800px){#sop-workspace{grid-template-columns:1fr;gap:16px}.sop-categories{border-right:0;border-bottom:1px solid #dce5e2;padding:0 0 12px;display:flex;flex-direction:row;overflow-x:auto;align-items:center}.sop-categories header{flex-shrink:0}.sop-categories>button,.sop-category{flex-shrink:0}.sop-categories h2{display:none}.sop-toolbar{flex-wrap:wrap}.sop-toolbar input{width:100%}.sop-documents article{align-items:flex-start;flex-direction:column;gap:12px}.sop-row-actions{align-self:flex-end}dialog.sop-editor{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0}.sop-editor>header{padding:12px 16px}.sop-editor h2{font-size:18px}.sop-editor-tools{padding:10px 16px;gap:8px}.sop-version-label{margin-left:0;flex:1;min-width:200px}.sop-version-label select{width:100%;min-width:0}.sop-editor-body{padding:16px}.sop-meta,.sop-row-grid{grid-template-columns:1fr}.sop-editor>footer{padding:10px 16px;flex-wrap:wrap}.sop-editor footer>div{margin-left:auto}.sop-preview table,.sop-preview tbody,.sop-preview tr,.sop-preview td,.sop-preview tbody th{display:block;width:100%}.sop-preview colgroup,.sop-preview thead{display:none}.sop-preview td,.sop-preview tbody th{border:0;padding:8px 12px}.sop-preview td::before{content:attr(data-label);display:block;font-size:13px;font-weight:600;color:#637b70}.sop-preview tr{border:1px solid #dce5e2;margin-bottom:16px;padding:8px 0}.sop-preview-images button{width:140px;height:110px}.sop-preview h2{font-size:22px}.sop-preview table{margin-top:16px}}
