#quoteDocumentsPage .qd-root { min-width:0; color:var(--text,#243449); }
#quoteDocumentsPage [hidden] { display:none !important; }
.qd-section-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:16px; }
#qdStatus { max-width:450px; font-size:12px; color:#648173; text-align:right; }
.qd-error,#qdStatus.qd-error { color:#c44536; font-size:13px; }
.qd-section-heading h3 { font-size:16px; margin:0; }
.qd-template-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:16px; margin-bottom:30px; }
.qd-template-card { display:flex; flex-wrap:wrap; gap:14px; align-items:center; padding:22px; background:#fff; border:1px solid #e2e7ee; border-radius:12px; }
.qd-template-icon { display:grid; place-items:center; width:48px; height:58px; background:#eaf7f5; color:#0b7a75; border-radius:7px; font:25px SimSun,serif; }
.qd-template-icon svg { width:27px; height:27px; }
.qd-batch-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:14px 0; }
.qd-batch-toolbar label { display:flex; gap:6px; align-items:center; font-size:13px; }
.qd-batch-toolbar input,.qd-record-table input[type=checkbox] { width:16px!important; height:16px; margin:0; }
.qd-check-col { width:64px; min-width:64px; padding:10px!important; white-space:nowrap; text-align:center!important; }
#qdStampControls { display:inline-flex; gap:6px; align-items:center; padding:3px 7px; border:1px solid #b8d9d4; border-radius:6px; font-size:12px; }
#qdStampControls[hidden] { display:none; }
#qdStampControls input { width:75px; padding:4px; }
#qdCompanySeals .qd-seal-card { grid-template-columns:55px minmax(0,1fr) auto; }
.qd-template-card h3 { font-size:18px; margin:0 0 7px; }
.qd-template-card p { font-size:12px; margin:0; color:#7e8a9b; }
.qd-card-actions { width:100%; display:flex; gap:8px; padding-top:8px; }
.qd-search,.qd-small-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.qd-search input { width:240px; }
.qd-search select { width:160px; }
.qd-root input:not([type=range]):not([type=checkbox]),.qd-root select,.qd-root textarea { border:1px solid #d7dfe8; border-radius:6px; background:#fff; padding:8px 10px; color:#26364b; min-width:0; font:inherit; }
.qd-root textarea { resize:vertical; }
.qd-root input:focus,.qd-root textarea:focus,.qd-root select:focus { outline:2px solid #a8d8d3; outline-offset:1px; }
.qd-record-table { width:100%; overflow:auto; background:white; border:1px solid #e2e7ee; border-radius:9px; }
.qd-record-table table { width:100%; border-collapse:collapse; min-width:750px; }
.qd-record-table th,.qd-record-table td { padding:13px 16px; text-align:left; border-bottom:1px solid #edf0f5; font-size:13px; }
.qd-record-table th { color:#768399; background:#f7f9fc; font-weight:500; }
.qd-record-table td:last-child { white-space:nowrap; }
.qd-document-link { padding:0; color:#0b7a75; border:0; background:transparent; font:inherit; cursor:pointer; text-align:left; }
.qd-empty { text-align:center !important; color:#8b97a8; height:120px; }
.qd-editor-top { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:14px; }
#qdTitle { flex:1; min-width:180px; font-weight:600; }
.qd-editor-top button { white-space:nowrap; }
.qd-template-notice { padding:10px 14px; background:#fff7df; color:#8a6724; border-radius:6px; font-size:13px; }
.qd-workspace { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:16px; align-items:start; }
.qd-editor-main { min-width:0; background:#e7ebf1; border:1px solid #dce2ea; border-radius:9px; overflow:hidden; }
.qd-format-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:4px; padding:9px; background:#fff; border-bottom:1px solid #dce2ea; }
.qd-format-toolbar button { background:#fff; border:1px solid transparent; padding:6px 8px; border-radius:4px; cursor:pointer; color:#4a5870; font-size:12px; }
.qd-format-toolbar button:hover { background:#eef1fa; border-color:#d8deee; }
.qd-format-toolbar select { padding:4px; font-size:12px; width:auto; }
.qd-paper-scroll { max-height:calc(100vh - 265px); min-height:520px; overflow:auto; padding:30px; }
.qd-paper { position:relative; box-sizing:border-box; width:210mm; min-height:297mm; background:#fff; padding:20mm; margin:0 auto; box-shadow:0 2px 16px #2b3a4e1a; }
.qd-paper.qd-landscape { width:297mm; min-height:210mm; }
#qdContent { outline:none; min-height:200px; cursor:text; }
#qdContent table { min-width:0 !important; max-width:100%; }
#qdContent th,#qdContent td { position:static; }
#qdContent [data-field] { background:#eef4ff; border-radius:2px; outline:none; min-width:22px; display:inline; }
#qdContent [data-field]:focus { background:#e1ebff; box-shadow:0 1px #7a9de0; }
#qdContent [data-field].qd-derived { background:transparent; }
#qdContent [data-field]:not(.qd-derived) { cursor:pointer; }
#qdContent .qd-inline-field { font:inherit; padding:0 3px; border:1px solid #91a9dc; border-radius:2px; line-height:inherit; max-width:100%; background:#f4f7ff; }
#qdContent [data-col=sequence],#qdContent [data-col=amount] { background:#fafbfc; }
.qd-row-actions { position:absolute; left:5px; display:flex; gap:2px; z-index:4; }
.qd-row-actions button { width:25px; height:26px; padding:0; border:1px solid #d7dfed; color:#677ca4; background:#f8faff; border-radius:4px; cursor:pointer; }
.qd-inspector { background:white; border:1px solid #e0e5ed; border-radius:9px; overflow:auto; max-height:calc(100vh - 265px); font-size:13px; }
.qd-inspector section,.qd-inspector details { padding:17px; border-bottom:1px solid #e8edf4; }
.qd-inspector h3 { margin:0 0 10px; font-size:15px; }
.qd-inspector summary { font-size:14px; cursor:pointer; font-weight:600; margin-bottom:12px; }
.qd-inspector details:not([open]) summary { margin:0; }
.qd-inspector select,.qd-inspector input:not([type=checkbox]),.qd-inspector textarea { width:100%; margin-bottom:9px; }
.qd-inspector input[type=file] { font-size:11px; padding:6px !important; }
.qd-field-label { display:block; margin-top:12px; color:#627086; font-size:12px; }
.qd-field-label b { color:#d15d4f; }
.qd-field-label input,.qd-field-label textarea,.qd-field-label select { margin-top:6px; display:block; }
.qd-checkbox { display:flex; align-items:center; gap:6px; margin-top:8px; line-height:1.6; }
.qd-hint { font-size:12px; color:#8994a4; line-height:1.65; margin:8px 0; }
.qd-total { display:flex; justify-content:space-between; gap:8px; margin-top:14px; padding-top:12px; border-top:1px solid #edf0f4; }
.qd-total strong { color:#5669a1; font-variant-numeric:tabular-nums; }
.qd-used-stamp { display:flex; gap:6px; margin:9px 0; }
.qd-selected { background:#e8efff !important; }
#qdContent .qd-stamp { cursor:move; touch-action:none; }
#qdContent .qd-stamp-selected { outline:1px dashed #6d8ad5; outline-offset:3px; }
.qd-seal-card { display:grid; grid-template-columns:55px minmax(0,1fr) 45px; gap:7px; align-items:center; padding:12px 0; border-top:1px solid #eef0f4; margin-top:10px; }
.qd-seal-card img { width:55px; height:55px; object-fit:contain; }
.qd-seal-card small { display:block; margin-top:5px; color:#758587; line-height:1.5; }
#qdContent .qd-image-selected { outline:2px solid #0b7a75; outline-offset:2px; }
.qd-company-add,.qd-company-row,.qd-dialog-heading { display:flex; align-items:center; gap:10px; justify-content:space-between; }
.qd-company-add input { flex:1; min-width:0; }
.qd-company-add button { flex-shrink:0; }
.qd-company-row { padding:12px 0; border-bottom:1px solid #e7efee; justify-content:flex-start; text-align:left; }
.qd-company-row > div:not(.qd-small-actions) { flex:1; min-width:0; text-align:left; }
.qd-company-row > input[type="checkbox"] { margin:0; }
.qd-company-row > button,.qd-company-row > .qd-small-actions { flex-shrink:0; }
#qdCompanyList { max-height:45vh; overflow:auto; margin-top:12px; }
.qd-dialog-heading h3 { margin:0; }
.qd-dialog select { width:100%; }
.qd-library-tabs { display:flex; gap:10px; margin-bottom:20px; }
.qd-archive-group { margin:18px 0 24px; }
.qd-archive-group h3 { color:#0b7a75; font-size:16px; }
.qd-archive-group h3 small,.qd-company-row small { display:block; font-size:12px; color:#718486; font-weight:400; margin-top:5px; }
.qd-archive-group h3 small { display:inline; margin-left:12px; }
.qd-dialog.qd-companies-dialog { box-sizing:border-box; width:min(960px,94vw); max-height:90vh; overflow:auto; }
.qd-companies-dialog > .qd-dialog-heading { position:sticky; top:-24px; z-index:5; background:#fff; padding:12px 0; border-bottom:1px solid #e3eeec; margin-bottom:16px; }
#qdArchiveCompany { width:260px; }
.qd-companies-dialog [hidden] { display:none!important; }
.qd-profile-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; margin-bottom:16px; }
.qd-company-section { border-top:1px solid #e3eeec; margin-top:24px; padding-top:20px; }
.qd-company-section h3 { margin-bottom:12px; }
.qd-asset-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; }
.qd-asset-card { padding:12px; border:1px solid #dce9e7; border-radius:10px; display:flex; flex-direction:column; gap:8px; min-width:0; }
.qd-asset-card img { width:100%; height:130px; object-fit:contain; background:#f5f9f8; }
.qd-asset-card small { display:block; color:#718486; margin-top:4px; }
.qd-asset-card strong { overflow-wrap:anywhere; }
.qd-profile-check,.qd-export-asset { display:flex; align-items:center; gap:8px; margin:10px 0 5px; }
.qd-profile-check input[type=checkbox],.qd-export-asset input[type=checkbox] { width:auto; margin:0; }
#qdPartyProfiles fieldset { border:1px solid #deebe8; border-radius:8px; padding:10px; margin:12px 0; }
#qdPartyProfiles legend { color:#0b7a75; padding:0 5px; }
@media(max-width:760px){.qd-profile-grid{grid-template-columns:1fr;}.qd-companies-dialog{width:94vw;}.qd-library-tabs{flex-wrap:wrap;}}
.qd-dialog { border:1px solid #dce3ee; border-radius:12px; padding:24px; width:min(480px,90vw); color:#31415a; box-shadow:0 20px 80px #15274044; }
.qd-dialog::backdrop { background:#14233c66; }
.qd-dialog h3 { margin:0 0 18px; font-size:17px; }
.qd-dialog input,.qd-dialog textarea { width:100%; }
.qd-dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
.qd-paste-dialog { width:min(720px,90vw); }
.qd-paste-dialog p { font-size:13px; color:#758399; }
.qd-paste-dialog textarea { font-family:monospace; font-size:12px; }
.qd-pdf-dialog { width:92vw; max-width:1400px; height:90vh; padding:14px; }
.qd-pdf-dialog form { display:flex; justify-content:space-between; align-items:center; padding-bottom:12px; }
.qd-pdf-dialog iframe { width:100%; height:calc(100% - 45px); border:0; }
.qd-preview .qd-inspector,.qd-preview .qd-format-toolbar,.qd-preview #qdRowActions { display:none !important; }
.qd-preview .qd-workspace { grid-template-columns:minmax(0,1fr); }
.qd-preview #qdContent [data-field],.qd-preview #qdContent [data-col] { background:transparent; box-shadow:none; }
.qd-preview #qdContent .qd-stamp { outline:none; pointer-events:none; }
.qd-preview #qdContent { pointer-events:none; }
@media(max-width:1100px) { .qd-workspace { grid-template-columns:minmax(0,1fr) 245px; } .qd-editor-top .ghost-btn { font-size:12px; padding:7px; } }
@media(max-width:760px) { .qd-workspace { display:flex; flex-direction:column; } .qd-editor-main,.qd-inspector { width:100%; } .qd-inspector { max-height:none; } .qd-heading,.qd-section-heading { flex-wrap:wrap; } #qdStatus { text-align:left; } .qd-paper-scroll { max-height:65vh; padding:20px; } .qd-editor-top input { flex-basis:100%; order:-1; } .qd-search { width:100%; } .qd-search input { flex:1; width:120px; } }

/* Editing controls and highlights are excluded from exported document content. */
#quoteDocumentsPage input[type=checkbox]{width:16px!important;height:16px!important;min-width:16px!important;max-width:16px!important;min-height:16px!important;padding:0!important;margin:0!important;flex:0 0 16px;appearance:auto;accent-color:#0b7a75;}
#qdContent [data-field]{background:#fff0bf;box-shadow:inset 0 -2px #bf8b16;}
#qdContent [data-field].qd-filled,#qdContent td.qd-filled{background:#ffe08a!important;color:#241800;box-shadow:inset 0 -2px #b57800;}
#quoteDocumentsPage .qd-inspector input.qd-filled,#quoteDocumentsPage .qd-inspector textarea.qd-filled{background:#fff0b3;border-color:#bd8700;color:#302100;}
#qdContent [data-field]:focus,#qdContent .qd-inline-field{background:#ffd45c;outline:2px solid #ad7200;}
#qdContent .qd-stamp{max-width:none;}
#qdContent .qd-stamp-ui{position:absolute;z-index:8;border:1px dashed #087fbd;pointer-events:none;transform-origin:center;}
#qdContent .qd-stamp-ui button{position:absolute;pointer-events:auto;touch-action:none;line-height:1;margin:0;padding:0;min-width:0;min-height:0;box-sizing:border-box;}
#qdContent .qd-stamp-handle{width:12px;height:12px;background:#fff;border:2px solid #087fbd;border-radius:2px;}
#qdContent .qd-nw{left:-6px;top:-6px;cursor:nwse-resize;}#qdContent .qd-ne{right:-6px;top:-6px;cursor:nesw-resize;}
#qdContent .qd-sw{left:-6px;bottom:-6px;cursor:nesw-resize;}#qdContent .qd-se{right:-6px;bottom:-6px;cursor:nwse-resize;}
#qdContent .qd-stamp-rotate{left:calc(50% - 13px);top:-36px;width:26px;height:26px;border:1px solid #087fbd;border-radius:50%;background:#fff;color:#087fbd;cursor:grab;font:22px Arial;}
#qdContent .qd-stamp-delete{right:-2px;top:-36px;height:26px;padding:3px 8px!important;border:1px solid #c74536;border-radius:4px;background:#fff;color:#b02e24;cursor:pointer;font:12px Arial;}

#qdStampControls label{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;margin:0;}
#qdContent [data-party-info] p.qd-filled{background:#ffe08a;color:#241800;box-shadow:inset 0 -1px #b57800;}

.qd-company-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px;padding-bottom:16px;border-bottom:1px solid #e3eeec;}
.qd-company-tabs button{min-width:110px;}
.qd-company-tabs button:disabled{opacity:.45;cursor:not-allowed;}
#qdCompanyDetailPanel>.qd-section-heading{margin-bottom:18px;}
#qdCompanyMedia .qd-company-section{border-top:0;margin-top:0;padding-top:8px;}

/* Clearly separated editing commands and inquiry navigation. */
.qd-format-toolbar button{border:1px solid #cbd7df;background:#fff;min-height:29px;white-space:nowrap;}
.qd-format-toolbar button:disabled{opacity:.4;cursor:not-allowed;}
.qd-inquiry-navigation{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;}
.qd-inquiry-navigation>span{font-size:12px;color:#627086;min-width:36px;text-align:center;}
.qd-workspace.qd-series-layout{grid-template-columns:150px minmax(0,1fr) 280px;}
.qd-inquiry-pages{background:#f6f9fa;border:1px solid #dce8e7;border-radius:9px;padding:9px;max-height:calc(100vh - 265px);overflow:auto;}
.qd-inquiry-pages h3{font-size:13px;margin:4px 0 10px;color:#37605d;}
.qd-inquiry-thumb{display:block;width:100%;padding:6px;margin:0 0 10px;text-align:left;border:1px solid #d5dfdf;border-radius:7px;background:#fff;cursor:pointer;overflow:hidden;}
.qd-inquiry-thumb.qd-inquiry-active{border:2px solid #0b7a75;background:#eefaf7;padding:5px;}
.qd-thumb-caption,.qd-thumb-company{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:3px 0;color:#315f5a;}
.qd-thumb-preview{display:block;height:164px;position:relative;overflow:hidden;background:#fff;border:1px solid #e5eceb;pointer-events:none;}
.qd-thumb-paper{display:block;position:absolute;top:0;left:0;width:210mm;min-height:297mm;padding:20mm;transform:scale(.14);transform-origin:0 0;background:#fff;}
.qd-thumb-paper.qd-thumb-landscape{width:297mm;min-height:210mm;transform:scale(.1);}
.qd-export-company{border:1px solid #dce8e7;border-radius:7px;margin:12px 0;padding:10px;}
.qd-export-company legend{font-size:13px;color:#0b7a75;max-width:100%;overflow-wrap:anywhere;}
#qdExportAssets{max-height:55vh;overflow:auto;}
#qdContent .qd-stamp-hit{position:absolute;z-index:3;background:transparent;cursor:move;touch-action:none;transform-origin:center;}
.qd-size-hud{position:fixed;z-index:2147483000;pointer-events:none;padding:7px 10px;color:white;background:#125a56;border:1px solid #a5e0d5;border-radius:5px;font:600 13px Arial;box-shadow:0 2px 8px #1233;white-space:nowrap;}
.qd-stamp-size,.qd-inline-image-size{position:absolute;left:0;bottom:-25px;white-space:nowrap;color:#fff;background:#125a56;border-radius:4px;padding:3px 5px;font:12px Arial;pointer-events:none;}
.qd-inline-image-ui{position:absolute;z-index:9;border:1px dashed #087fbd;pointer-events:none;}
.qd-inline-image-ui button{position:absolute;pointer-events:auto;touch-action:none;width:12px;height:12px;min-width:0;min-height:0;padding:0;margin:0;background:#fff;border:2px solid #087fbd;border-radius:2px;}
.qd-inline-image-ui .qd-nw{left:-6px;top:-6px;cursor:nwse-resize;}.qd-inline-image-ui .qd-ne{right:-6px;top:-6px;cursor:nesw-resize;}
.qd-inline-image-ui .qd-sw{left:-6px;bottom:-6px;cursor:nesw-resize;}.qd-inline-image-ui .qd-se{right:-6px;bottom:-6px;cursor:nwse-resize;}
.qd-image-drag-ghost{position:fixed;pointer-events:none;z-index:2147482000;opacity:.65;object-fit:contain;}
@media(max-width:1150px){.qd-workspace.qd-series-layout{grid-template-columns:120px minmax(0,1fr) 235px;}.qd-thumb-paper{transform:scale(.11);}.qd-thumb-paper.qd-thumb-landscape{transform:scale(.08);}.qd-thumb-preview{height:130px;}}
@media(max-width:900px){.qd-workspace.qd-series-layout{grid-template-columns:minmax(0,1fr) 235px;}.qd-inquiry-pages{grid-column:1/-1;max-height:200px;display:flex;align-items:flex-start;gap:8px;}.qd-inquiry-pages h3{min-width:75px;}#qdInquiryThumbnails{display:flex;gap:8px;}.qd-inquiry-thumb{width:110px;min-width:110px;margin:0;}.qd-thumb-preview{height:120px;}}

#qdContent img[data-image-id]{cursor:move;touch-action:none;}

.qd-dialog-toast { position:fixed; inset:24px auto auto 50%; transform:translateX(-50%); margin:0; max-width:calc(100vw - 40px); padding:12px 22px; border:1px solid #8bc5bc; border-radius:12px; background:#effbf8; color:#145c55; box-shadow:0 8px 28px #123b3b30; font-size:15px; z-index:2147483647; pointer-events:none; }
.qd-dialog-toast.qd-error { background:#fff1f0; border-color:#e5a19c; color:#a52b25; }

/* Drag feedback must escape shell positioning rules and never occupy a layout row. */
#quoteDocumentsPage #qdSizeHud { position:fixed!important; z-index:2147483000!important; width:max-content!important; inline-size:max-content!important; height:auto!important; min-width:0!important; max-width:calc(100vw - 16px)!important; margin:0!important; right:auto!important; bottom:auto!important; box-sizing:border-box; }
/* Match document fields and inspector inputs. */
#qdContent [data-field],#qdContent [data-field].qd-filled{background:var(--qd-field-bg,#f8f7f2)!important;color:#243044;box-shadow:inset 0 -2px var(--qd-field-edge,#d8d5c7);}
#quoteDocumentsPage #qdFields [data-qd-field],#quoteDocumentsPage #qdFields [data-company-field]{background:var(--qd-field-bg,#f8f7f2);border-color:var(--qd-field-edge,#d8d5c7);color:#243044;}
#qdContent [data-field]:focus,#qdContent .qd-inline-field{background:var(--qd-field-bg,#f8f7f2);outline:2px solid var(--qd-field-edge,#d8d5c7);}
.qd-preview #qdContent [data-field],.qd-preview #qdContent [data-field].qd-filled{background:transparent!important;box-shadow:none;}
@media print{#qdContent [data-field],#qdContent [data-field].qd-filled{background:transparent!important;box-shadow:none;}}
/* Keep selecting a stamp from moving the document preview. */
#quoteDocumentsPage .qd-format-toolbar{height:50px;min-height:50px;box-sizing:border-box;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding:8px 9px;}
#quoteDocumentsPage .qd-format-toolbar>*{flex-shrink:0;}
#quoteDocumentsPage #qdStampControls{height:32px;box-sizing:border-box;padding:0 5px;white-space:nowrap;}
#quoteDocumentsPage #qdStampControls[hidden]{display:inline-flex;visibility:hidden;pointer-events:none;}
#quoteDocumentsPage #qdStampControls input{height:28px;min-height:28px;box-sizing:border-box;margin:0;padding:3px 5px;}
#quoteDocumentsPage #qdStampControls button{height:28px;min-height:28px;padding:3px 6px;}

/* Editor-only distinction between shared locked details and independent prices. */
.qd-template-setup{padding:12px 16px;margin:8px 0 12px;border:1px solid #cbd9e8;border-radius:10px;background:#f4f8fc;}
.qd-template-setup .qd-small-actions{margin-bottom:8px;flex-wrap:wrap;}
.qd-template-setup .qd-hint{margin:0;}
.qd-template-dialog{width:min(780px,94vw);max-height:88vh;overflow:auto;}
.qd-template-dialog .qd-dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;}
.qd-template-dialog .qd-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
.qd-template-dialog input:not([type=checkbox]),.qd-template-dialog select,.qd-template-dialog textarea{width:100%;box-sizing:border-box;}
.qd-template-dialog .qt-checks{display:grid;gap:12px;margin:16px 0;}
#qtOriginalDialog{width:min(920px,94vw);}
#qtOriginalBody{background:white;padding:24px;border:1px solid #d8dee6;margin-top:16px;}
@media(max-width:600px){.qd-template-dialog .qd-profile-grid{grid-template-columns:1fr;}}
#quoteDocumentsPage #qdContent td.qd-locked-cell { background:#f1f4f6!important; color:#53616e; box-shadow:inset 0 0 0 1px #dce3e8; cursor:not-allowed; }
#quoteDocumentsPage #qdContent td.qd-locked-cell [data-field] { background:transparent!important; box-shadow:none; color:inherit; }
#quoteDocumentsPage #qdContent td.qd-price-editable { background:#ffe08a!important; color:#241800; box-shadow:inset 0 -2px #b57800; cursor:text; }
@media print { #quoteDocumentsPage #qdContent td.qd-locked-cell,#quoteDocumentsPage #qdContent td.qd-price-editable { background:transparent!important; box-shadow:none; color:#111; } }

/* Fit both scroll panes into the space left by the actual editor headings. */
#quoteDocumentsPage .qd-root{display:flex;flex-direction:column;min-height:0;height:100%;overflow:hidden;}
#quoteDocumentsPage .qd-root>.panel-head{flex:0 0 auto;}
#quoteDocumentsPage #qdLibrary{flex:1;min-height:0;overflow:auto;padding-bottom:48px;}
#quoteDocumentsPage #qdEditor{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;}
#quoteDocumentsPage .qd-editor-top,#quoteDocumentsPage .qd-template-notice,#quoteDocumentsPage .qd-template-setup{flex:0 0 auto;}
#quoteDocumentsPage .qd-workspace{flex:1;min-height:0;grid-template-rows:minmax(0,1fr);align-items:stretch;overflow:hidden;}
#quoteDocumentsPage .qd-editor-main{display:flex;flex-direction:column;min-height:0;}
#quoteDocumentsPage .qd-format-toolbar{flex:0 0 auto;}
#quoteDocumentsPage .qd-paper-scroll{flex:1;min-height:0;max-height:none;box-sizing:border-box;padding:30px 30px 60px;scroll-padding-bottom:80px;}
#quoteDocumentsPage .qd-paper-scroll::after{content:"";display:block;height:96px;clear:both;}
#quoteDocumentsPage .qd-inspector{min-height:0;max-height:none;box-sizing:border-box;padding-bottom:64px;scroll-padding-bottom:48px;overscroll-behavior:contain;}
#quoteDocumentsPage .qd-inspector input,#quoteDocumentsPage .qd-inspector select,#quoteDocumentsPage .qd-inspector textarea{box-sizing:border-box;}
#quoteDocumentsPage .qd-inquiry-pages{min-height:0;max-height:none;}
#quoteDocumentsPage #qtSetupBar{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:6px 12px;}
#quoteDocumentsPage #qtSetupBar .qd-small-actions{flex-wrap:nowrap;overflow-x:auto;margin:0;min-width:0;}
#quoteDocumentsPage #qtSetupBar button,#quoteDocumentsPage #qtSetupBar strong{white-space:nowrap;flex-shrink:0;}
#quoteDocumentsPage #qtSetupHint{grid-column:1/-1;}
#quoteDocumentsPage .qd-table-size-handle{position:fixed;width:13px;height:13px;min-width:13px;min-height:13px;padding:0;border:2px solid #0b7a75;background:#fff;z-index:30;cursor:nwse-resize;touch-action:none;box-sizing:border-box;}
#quoteDocumentsPage #qdContent.qd-column-edge,#quoteDocumentsPage #qdContent.qd-column-edge *{cursor:col-resize!important;}
#quoteDocumentsPage #qdContent.qd-row-edge,#quoteDocumentsPage #qdContent.qd-row-edge *{cursor:row-resize!important;}
#quoteDocumentsPage #qdContent.qd-table-resizing{user-select:none;}
@media(max-width:900px) and (min-width:761px){
  #quoteDocumentsPage .qd-workspace.qd-series-layout{grid-template-rows:auto minmax(0,1fr);}
  #quoteDocumentsPage .qd-workspace.qd-series-layout .qd-inquiry-pages{max-height:150px;}
}
@media(max-width:760px){
  #quoteDocumentsPage .qd-workspace{display:flex;overflow:auto;}
  #quoteDocumentsPage .qd-editor-main{flex:0 0 60vh;min-height:320px;}
  #quoteDocumentsPage .qd-inspector{flex:none;max-height:none;overflow:visible;}
  #quoteDocumentsPage .qd-inquiry-pages{flex:none;max-height:150px;}
  #quoteDocumentsPage #qtSetupBar{grid-template-columns:minmax(0,1fr);}
}
