.document-workspace {display:grid;grid-template-columns:minmax(260px,.8fr) minmax(0,1.2fr);gap:24px;align-items:start}
.document-workspace>* {min-width:0}
.document-toolbar {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.document-toolbar h2 {margin:0}
.document-preview {position:static}
.document-paper {margin:18px 0;background:#f0ede9;border:1px solid var(--border,#ded5cb);padding:10px;border-radius:12px;max-height:70vh;overflow:auto}
.document-paper img,[data-local-preview] img {display:block;width:100%;height:auto;background:white}
[data-local-preview] {max-height:70vh;overflow:auto;margin-bottom:20px}
.document-reader pre {white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-height:320px;overflow:auto}
.document-reader details {margin-top:16px}
.document-reader li {margin-bottom:8px}
.document-source-line {overflow-wrap:anywhere}
.document-workspace pre {white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}
.document-workspace .form-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
.document-needs-review {outline:2px solid #9b621d;outline-offset:2px}
.document-review-confirm {display:block;padding:18px;border-radius:12px;background:var(--surface,#fff);margin:18px 0}
.document-review-confirm input {width:auto;margin-right:8px}
.document-workspace [hidden],.document-reader [hidden],[data-ocr-confirm][hidden],.document-preview [hidden] {display:none}
@media(max-width:1050px) {.document-workspace {grid-template-columns:1fr}.document-preview {position:static}.document-paper {max-height:50vh}}
@media(max-width:600px) {.document-workspace .form-grid {grid-template-columns:1fr}}

#purchase-editor [data-entry-field][hidden], [data-receipt-help][hidden], [data-new-supplier-help][hidden] {display:none}
