/* Non-modal document workspace. UI geometry is memory-only; no business values are stored here. */
.sw-doc-window{position:fixed;z-index:100;display:flex;flex-direction:column;min-width:0;background:#fff;border:1px solid #758bbd;border-top:3px solid #ed1c24;border-radius:8px;box-shadow:0 12px 36px #15267535;overflow:hidden;isolation:isolate}
.sw-doc-window.sw-doc-active{z-index:101}
.sw-doc-window[hidden],.sw-doc-dock[hidden]{display:none!important}
.sw-doc-titlebar{display:flex;align-items:center;gap:4px;min-height:40px;padding:2px 4px;background:#152675;color:white;cursor:grab;flex-shrink:0;touch-action:none;user-select:none}
.sw-doc-titlebar h2{margin:0 5px;font-size:14px;line-height:1.4;color:white;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sw-doc-window .sw-doc-control{width:36px;min-width:36px;height:34px;min-height:34px;padding:0;border:1px solid #a1b3e7;border-radius:5px;background:#263d88;color:white;font-size:20px;line-height:1}
.sw-doc-window .sw-doc-control:hover{background:#405dab;color:white;border-color:white}.sw-doc-window .sw-doc-close:hover{background:#b91420}
.sw-doc-titlebar>button{flex-shrink:0}.sw-doc-titlebar h2{width:0}
.sw-doc-window .sw-doc-control:focus-visible,.sw-doc-dock:focus-visible{outline:3px solid #ffd66d;outline-offset:-4px}
.sw-doc-body{overflow:auto;overscroll-behavior:contain;min-height:0;flex:1;padding:14px 16px 22px;container-type:inline-size;container-name:swdoc}
.sw-doc-body .po-document{margin:0;padding:0;border:0;box-shadow:none}.sw-doc-body .po-document::before,.sw-doc-body .po-document::after{display:none}
.sw-doc-body .po-document>.panel-title{display:none}.sw-doc-body .document-head h2{display:none}.sw-doc-body .document-head{margin-bottom:8px}
.sw-doc-body>section.panel{margin:0;padding:0;border:0;box-shadow:none}.sw-doc-body>section.panel>.panel-title>h2{display:none}
.sw-doc-body .po-document label,.sw-doc-body .document-header-layout label{font-size:13px;gap:4px;margin:4px 0}
.sw-doc-body .po-document input,.sw-doc-body .po-document select,.sw-doc-body .document-header-layout input,.sw-doc-body .document-header-layout select{font-size:13px;padding:7px 9px;min-height:36px}
.sw-doc-body .po-document textarea{font-size:13px;padding:7px 9px}
.sw-doc-body .po-document small,.sw-doc-body .po-document .hint,.sw-doc-body .document-header-layout .small,.sw-doc-body .document-head .small{font-size:11px;line-height:1.35}
.sw-doc-body .po-counterparty h3,.sw-doc-body .po-document-meta h3{font-size:14px;margin:4px 0 8px}
.sw-doc-body .po-header-layout{gap:16px;margin-bottom:10px}.sw-doc-body .po-breadcrumb{margin:0 0 10px;padding-bottom:8px}
.sw-doc-body .po-breadcrumb button{font-size:12px;padding:7px 10px;min-height:34px}
.sw-doc-window .sw-doc-resize{position:absolute;bottom:0;right:0;z-index:1;width:28px;min-width:28px;height:24px;min-height:24px;background:#e5ebfa;color:#152675;border:0;border-radius:4px 0 0 0;cursor:nwse-resize;touch-action:none;font-size:18px}
.sw-doc-dock{display:inline-flex;align-items:center;max-width:100%;min-height:44px;padding:9px 15px;margin:12px 0;border:2px solid #152675;border-left:4px solid #ed1c24;border-radius:6px;color:#152675;background:#eef2fc;font-size:14px;overflow-wrap:anywhere}
.sw-doc-tray{position:fixed;bottom:10px;right:10px;z-index:102;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-content:flex-start;max-width:calc(100vw - 20px);max-height:min(160px,25dvh);overflow:auto;overscroll-behavior:contain;scroll-padding:4px;padding:4px}.sw-doc-tray[hidden]{display:none!important}.sw-doc-tray:empty{display:none}.sw-doc-tray .sw-doc-dock{margin:0;box-shadow:0 3px 12px #15267520}
#product-suggestions{z-index:130}#toast{z-index:140}
.sw-doc-dragging,.sw-doc-dragging *{user-select:none}.sw-doc-dragging .sw-doc-titlebar{cursor:grabbing}
@container swdoc (max-width:800px){.po-bottom-layout,.bottom-area{grid-template-columns:minmax(0,1fr)!important}.po-meta-grid,.document-header-meta .field-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.po-item-head{display:none}.po-document .po-line{grid-template-columns:repeat(3,minmax(0,1fr))!important}.po-product-field{grid-column:1/-1}}
@container swdoc (max-width:650px){.po-header-layout,.document-header-layout{grid-template-columns:minmax(0,1fr)!important}}
@container swdoc (max-width:580px){.po-meta-grid{grid-template-columns:minmax(0,1fr)!important}}
@container swdoc (max-width:1000px){.sw-preview-document:not(.source-or-050) .document-header-meta .field-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:899px){.sw-doc-window{position:fixed;left:0!important;top:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:none;border-radius:0;box-shadow:none}.sw-doc-window .sw-doc-move,.sw-doc-window .sw-doc-max,.sw-doc-window .sw-doc-resize{display:none}.sw-doc-titlebar{cursor:default;touch-action:pan-y;min-height:50px}.sw-doc-titlebar h2{font-size:13px;white-space:normal;overflow-wrap:anywhere}.sw-doc-window .sw-doc-control{width:44px;min-width:44px;height:44px;min-height:44px}.sw-doc-body{padding:12px 10px 22px;overflow:auto;container-type:normal}.sw-doc-dock{width:100%}.actions button[data-po-action="po-approve"]{min-height:44px}}
@media print{.sw-doc-titlebar,.sw-doc-dock,.sw-doc-resize{display:none!important}.sw-doc-window{position:static!important;width:auto!important;height:auto!important;border:0;box-shadow:none;overflow:visible}.sw-doc-body{overflow:visible}}
@media(max-width:899px){.sw-doc-body .po-document input,.sw-doc-body .po-document select,.sw-doc-body .document-header-layout input,.sw-doc-body .document-header-layout select{font-size:16px;min-height:44px}.sw-doc-body .po-document small,.sw-doc-body .po-document .hint,.sw-doc-body .document-header-layout .small{font-size:12px}}

/* Readable existing install button in the navy workbench sidebar. */
.sidebar #install-button{color:#152675;background:#fff;border:1px solid #b9c5ef;min-height:44px;font-weight:600;line-height:1.4}.sidebar #install-button:hover{color:#152675;background:#eef2ff}.sidebar #install-help{color:#fff;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
