:root{--ink:#111;--muted:#657269;--line:#222;--soft:#e6e6e6;--paper:#fff;--bg:#f0f1f2;--accent:#1d7858}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:"Microsoft YaHei","Noto Sans SC",sans-serif;font-size:13px}.page-header{max-width:1240px;margin:0 auto;padding:30px 26px 24px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.eyebrow{display:block;color:#7b837e;font:10px/1.2 Consolas,monospace;letter-spacing:.12em}.page-header h1{margin:7px 0 8px;font-size:28px}.page-header p{margin:0;color:var(--muted);font-size:12px}.header-actions{display:flex;align-items:center;gap:12px}.header-actions a,.header-actions span{color:#647168;font-size:11px}.header-actions a{padding:8px 11px;border:1px solid #cbd7ce;border-radius:7px;background:#fff;text-decoration:none}main{max-width:1240px;margin:0 auto 50px;padding:0 26px}.toolbar{display:flex;align-items:end;gap:9px;padding:15px 0;border-top:1px solid #d4dbd6;border-bottom:1px solid #d4dbd6}.toolbar label{width:300px;color:#68746b;font-size:11px}.toolbar input{display:block;width:100%;height:36px;margin-top:6px;padding:0 10px;border:1px solid #c6d1c8;border-radius:7px;background:#fff;outline:none}.toolbar button,.dialog-footer button,.section-head button{height:36px;padding:0 14px;border:1px solid #cbd6ce;border-radius:7px;background:#fff;color:#57635a;cursor:pointer}.toolbar button:hover,.dialog-footer button:hover,.section-head button:hover{border-color:#58a682;color:var(--accent)}button.primary{background:var(--accent);border-color:var(--accent);color:#fff}.message{min-height:18px;color:#28734c;font-size:11px}.message.error{color:#a3483b}.muted{color:#8c968f;font-size:10px}.table-wrap{overflow:auto;border:1px solid #dce4dd;border-radius:10px;background:#fff}body>main>div table{width:100%;border-collapse:collapse;min-width:920px}th,td{padding:12px 11px;border-bottom:1px solid #e7ece8;text-align:left;vertical-align:middle;font-size:11px}th{background:#f5f8f5;color:#6d796f;font-weight:600}.project-cell strong{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-cell small{display:block;margin-top:4px;color:#98a199}.status{display:inline-block;padding:4px 8px;border-radius:20px;background:#f1f4f1;color:#6e7b71}.status.sent{background:#e9f6ef;color:#247450}.status.signed{background:#e3f3eb;color:#176445}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.row-actions button{padding:6px 8px;border:1px solid #ccd7ce;border-radius:5px;background:#fff;color:#556259;cursor:pointer;font-size:10px}dialog{width:min(1120px,96vw);max-height:96vh;padding:0;border:0;border-radius:10px;background:#fff;color:var(--ink);box-shadow:0 30px 90px #22342744}dialog::backdrop{background:#152019a8;backdrop-filter:blur(2px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid #dce4dd}.dialog-header h2{margin:6px 0 0;font-size:19px}.icon-button{width:32px;height:32px;border:1px solid #d2ddd4;border-radius:7px;background:#fff;font-size:21px;color:#647168;cursor:pointer}.dialog-body{display:grid;gap:14px;padding:20px 24px;overflow:auto;max-height:calc(96vh - 145px)}label{display:block;color:#69766c;font-size:11px}label input,label textarea,label select{display:block;width:100%;margin-top:6px;padding:9px 10px;border:1px solid #cbd6cd;border-radius:5px;background:#fff;color:var(--ink);font:inherit;outline:none}label textarea{resize:vertical;line-height:1.55}.form-grid{display:grid;grid-template-columns:2fr 1fr 1.5fr 1fr;gap:10px}.word-paper{width:min(794px,100%);margin:0 auto;padding:40px 54px 48px;background:var(--paper);border:1px solid #cfcfcf;box-shadow:0 5px 18px #00000010;font-family:"SimSun","宋体",serif}.word-brand{text-align:center;font-size:20px;font-weight:700;letter-spacing:.04em}.word-brand span{color:#c00000}.word-title{text-align:center;margin:13px 0 27px;font-size:22px;font-weight:700}.word-edit-label{color:#111;font-size:14px}.word-edit-label>span{display:block;font-weight:700;margin:18px 0 5px}.word-edit-label textarea{border:0;border-bottom:1px dashed #bbb;border-radius:0;padding:2px 0;font-family:inherit;font-size:13px;line-height:1.75;resize:vertical}.section-head{display:flex;align-items:center;justify-content:space-between;margin:10px 0 8px;font-family:"Microsoft YaHei",sans-serif}.section-head h3{margin:0;font-size:14px}.section-head button{height:30px;padding:0 9px;font-size:11px}.quote-items-wrap{overflow:auto}.quote-items{width:100%;border-collapse:collapse;table-layout:fixed}.quote-items th,.quote-items td{height:47px;padding:5px 6px;border:1px solid #222;text-align:center;vertical-align:middle;font-family:"SimSun","宋体",serif;font-size:12px}.quote-items th{font-weight:700;background:#fff}.quote-items th:nth-child(1){width:8%}.quote-items th:nth-child(2){width:18%}.quote-items th:nth-child(3){width:10%}.quote-items th:nth-child(4){width:38%}.quote-items th:nth-child(5),.quote-items th:nth-child(6){width:13%}.quote-items input{width:100%;height:31px;padding:4px;border:0;border-bottom:1px dotted #aaa;border-radius:0;text-align:center;font:12px "SimSun","宋体",serif;background:transparent}.quote-items input[type=file]{height:auto;padding:2px;font:10px sans-serif}.quote-items .thumb{display:block;width:70px;height:42px;object-fit:cover;margin:3px auto;border:1px solid #ddd}.remove-item{width:25px;height:25px;padding:0!important;color:#a34d42!important;border:0!important}.word-total{display:grid;grid-template-columns:1fr 2fr 1fr;align-items:center;min-height:46px;border:1px solid #222;border-top:0;font:12px "SimSun","宋体",serif}.word-total>span,.word-total>strong{padding:7px 8px}.word-total>span:first-child{font-weight:700;text-align:center}.word-total>span:nth-child(2){border-left:1px solid #222}.word-total input{width:70%;border:0;border-bottom:1px dotted #aaa;font:12px inherit}.word-total strong{border-left:1px solid #222;text-align:center;font-weight:400}.word-meta{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:26px;font:13px "SimSun","宋体",serif}.word-meta label{color:#111}.word-meta input{border:0;border-bottom:1px solid #777;border-radius:0;padding:3px 0;font-family:inherit}.dialog-footer{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:15px 24px;border-top:1px solid #dce4dd}.dialog-footer .muted{margin-right:auto}@media(max-width:760px){.page-header{display:block;padding:22px 15px 18px}.header-actions{margin-top:15px;justify-content:space-between}main{padding:0 15px}.toolbar{display:grid;grid-template-columns:1fr 1fr}.toolbar label{width:auto;grid-column:1/-1}.toolbar button{width:100%}.form-grid{grid-template-columns:1fr 1fr}.dialog-header,.dialog-body,.dialog-footer{padding-left:15px;padding-right:15px}.dialog-footer{align-items:stretch;flex-wrap:wrap}.dialog-footer .muted{width:100%;margin:0}.dialog-footer button{flex:1}.word-paper{padding:26px 18px 34px}.word-title{font-size:19px}.quote-items{min-width:680px}}
 .editor-item-page,.quote-items-page{width:210mm;min-height:297mm;page-break-after:always;break-after:page}.editor-extra-page{padding-top:30px}.continuation-title{margin:0 0 18px;text-align:center;font-size:18px}.editor-item-page .quote-detail-paper{min-height:0}.item-page-total{margin-top:0}.editor-item-page .item-page-total{margin-top:0}
.editor-item-page .quote-items tbody td{height:128pt}.editor-item-page .quote-items tbody td:nth-child(4){height:128pt}.editor-item-page .quote-items .thumb{width:calc(100% - 12px);max-width:100%;height:118px;object-fit:contain;margin:3px auto}.editor-item-page .quote-items-wrap{overflow:visible}
.word-edit-label textarea{height:auto;min-height:40px;max-height:none;overflow:hidden;overflow-y:hidden;resize:none;scrollbar-width:none}.word-edit-label textarea::-webkit-scrollbar{display:none}.quote-total-top{display:flex;justify-content:flex-end;align-items:center;min-height:24px;margin:-14px 0 6px;font:12px "SimSun","宋体",serif}.quote-total-top strong{margin-left:4px;color:#c00000;font-weight:700}.quote-total-footer{grid-column:1/-1;text-align:right;margin-top:10px;font:13px "SimSun","宋体",serif}.quote-total-footer strong{color:#c00000;margin-left:4px}.quote-items tfoot td{height:46px;padding:7px 8px;border:1px solid #222;text-align:center;font:12px "SimSun","宋体",serif}.quote-items tfoot td:nth-child(4){text-align:left;padding-left:10px}.quote-items tfoot input{height:24px;width:70%;padding:2px}.editor-item-page .quote-items-wrap{border:0}.editor-item-page .quote-detail-paper{margin-bottom:0;padding-bottom:0}
.word-meta{grid-template-columns:1fr 1fr auto;align-items:baseline}.word-meta .quote-total-footer{grid-column:auto;margin-top:0;white-space:nowrap;align-self:baseline;line-height:1.2}
.editor-paper,.editor-paper .quote-detail-paper{box-shadow:none!important}.editor-paper .quote-detail-paper{border:0!important;padding-left:0;padding-right:0}
.quote-intro-edit{display:block;width:100%;margin:14px 0 18px;padding:2px 0;border:0;border-bottom:1px dashed #bbb;border-radius:0;background:transparent;color:#111;font:13px/1.75 "SimSun","宋体",serif;resize:none;overflow:hidden}
.department-select{min-width:82px;padding:5px 7px;border:1px solid #d3ddd5;border-radius:5px;background:#fff;color:#445148;font:inherit}
.row-actions button.danger{color:#a3483b;border-color:#e0c1bc}.row-actions button.danger:hover{background:#fff5f3;border-color:#a3483b}
.toolbar button.primary:hover{color:#fff;border-color:var(--accent);background:var(--accent)}
.quote-items input{border-bottom-color:transparent!important}.quote-items tfoot input{border-bottom-color:transparent!important}
.quote-detail-paper>.quote-total-top{width:26%;min-height:20px;margin:0 0 2px auto;white-space:nowrap}
@media(max-width:760px){
  dialog#editor{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);margin:8px}
  dialog#editor .dialog-body{max-height:calc(100vh - 150px);overflow-x:hidden;padding:14px 10px;min-width:0}
  dialog#editor #editorItemPages{width:100%;min-width:0;overflow:hidden}
  dialog#editor .form-grid{grid-template-columns:1fr;gap:8px}
  dialog#editor .editor-paper,dialog#editor .editor-item-page{width:100%!important;max-width:100%;min-width:0;min-height:0;padding:22px 10px 26px}
  dialog#editor .word-heading .word-title{padding:0 62px;font-size:18px;white-space:normal;overflow-wrap:anywhere}
  dialog#editor .quote-detail-paper{width:100%;min-width:0;margin:12px 0 18px;padding:12px 0 16px;overflow:hidden}
  dialog#editor .quote-items-wrap{display:block;width:100%;max-width:100%;min-width:0;overflow-x:scroll!important;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x pan-y}
  dialog#editor .quote-items{width:680px!important;min-width:680px!important;max-width:none}
  dialog#editor .editor-item-page .quote-items tbody td,dialog#editor .editor-item-page .quote-items tbody td:nth-child(4){height:90px!important}
  dialog#editor .editor-item-page .quote-items .thumb{height:76px!important;max-height:76px}
  dialog#editor .reference-file-input{display:block;position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
  dialog#editor .reference-drop-cell{position:relative;cursor:pointer}
  dialog#editor .reference-drop-cell:after{content:'点按选择图片';display:block;color:#78857b;font:10px/1.2 "Microsoft YaHei",sans-serif;margin:2px auto}
  dialog#editor .reference-drop-cell:has(.thumb) :is(input[data-field="referenceImage"]),dialog#editor .reference-drop-cell:has(.thumb):after{display:none}
  dialog#editor .dialog-footer{padding:12px 10px;gap:7px}
}
