:root{color:#221914;font-synthesis:none;text-rendering:optimizelegibility;background:#f4f1ec;font-family:Inter,Noto Sans TC,PingFang TC,Microsoft JhengHei,system-ui,sans-serif}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;border:0}main{min-height:100vh}.workspace{grid-template-columns:390px minmax(0,1fr);gap:22px;padding:22px;display:grid}.control-panel,.editor-table,.quote-sheet,.pdf-preview{background:#fffdf9;border:1px solid #ded5ca}.control-panel{flex-direction:column;gap:18px;height:calc(100vh - 44px);padding:22px;display:flex;position:sticky;top:22px;overflow:auto}.brand{align-items:center;gap:14px;display:flex}.brand img{object-fit:contain;width:72px;height:42px}.brand p,.brand h1,.table-toolbar h2,.table-toolbar p{margin:0}.brand p{color:#8d7868;font-size:13px}.version-badge{color:#6b5444;background:#efe5d8;margin-top:6px;padding:3px 7px;font-size:11px;font-weight:700;display:inline-block}.brand h1{letter-spacing:0;font-size:24px}.upload-zone{color:#332118;background:#fbf6ee;border:1px dashed #bba387;place-items:center;gap:7px;min-height:144px;display:grid}.upload-zone span,.microcopy,.table-toolbar p,.formula-box p{color:#817267;font-size:13px;line-height:1.55}.upload-zone input{display:none}.status{background:#fff8ea;border-left:4px solid #c79b57;align-items:flex-start;gap:9px;padding:12px;font-size:14px;line-height:1.45;display:flex}.status.done{background:#f1f8ef;border-color:#67986b}.status.warning{border-color:#d69d2f}.status.error{background:#fff1ef;border-color:#b7554d}.spin{animation:.9s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.field-group label,.field-grid label{color:#5b4d43;gap:8px;font-size:13px;font-weight:700;display:grid}.mode-grid,.currency-toggle{grid-template-columns:repeat(2,1fr);gap:8px;margin-top:8px;display:grid}.mode-grid button,.currency-toggle button{color:#3c281e;background:#f6efe6;border:1px solid #0000;justify-content:space-between;align-items:center;min-height:52px;padding:10px 12px;display:flex}.currency-toggle button{justify-content:center}.mode-grid button.active,.currency-toggle button.active{color:#fffaf2;background:#301d14;border-color:#301d14}.field-grid{grid-template-columns:1fr 1fr;gap:12px;display:grid}.pdf-ocr-panel{background:#fbf6ee;border:1px solid #eaded0;gap:10px;padding:12px;display:grid}.page-range{grid-template-columns:1fr 1fr;gap:10px;display:grid}.page-range label{color:#5b4d43;gap:6px;font-size:13px;font-weight:700;display:grid}.field-grid .wide{grid-column:1/-1}input,select{color:#221914;background:#fff;border:1px solid #d8cec2;width:100%;min-height:38px;padding:8px 10px}.actions{grid-template-columns:1fr 1fr;gap:9px;display:grid}.actions button,.secondary,.ghost{color:#fffaf3;background:#301d14;justify-content:center;align-items:center;gap:7px;min-height:40px;display:inline-flex}.secondary{width:100%}.secondary.alt{background:#6a4a2f}.actions .ghost{color:#301d14;background:#ebe2d8}.formula-box{background:#f8f3ec;border:1px solid #eaded0;padding:14px}.formula-box p{margin:8px 0 0}.quote-area{gap:22px;min-width:0;display:grid}.editor-table{padding:18px}.table-toolbar{justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px;display:flex}.table-toolbar h2{font-size:21px}.table-toolbar span{color:#5c4537;background:#f0e7dc;padding:5px 10px;font-size:13px;font-weight:700}.item-editor{gap:8px;display:grid;overflow-x:auto}.pager{flex-wrap:wrap;gap:6px;margin:0 0 14px;display:flex}.pager button{color:#3c281e;background:#efe5d8;border:1px solid #0000;min-width:34px;min-height:32px;padding:6px 10px}.pager button.active{color:#fffaf2;background:#301d14}.quote-pager{width:min(100%,1080px);margin:0 auto -6px}.editor-row{grid-template-columns:110px 160px minmax(260px,1fr) 70px 100px 96px 110px 40px;align-items:center;gap:8px;min-width:980px;display:grid}.editor-row strong{text-align:right;font-size:14px}.icon-only{color:#5b4031;background:#f4ebe2;place-items:center;width:38px;height:38px;display:grid}.pdf-preview{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;padding:14px;display:grid}.pdf-preview img{object-fit:contain;background:#fff;border:1px solid #e1d6cb;width:100%;max-height:340px}.quote-sheet{color:#2a1d17;width:min(100%,1080px);margin:0 auto 32px;padding:52px 58px;position:relative;overflow-x:auto;box-shadow:0 18px 50px #2b201814}.quote-sheet.screen-hidden{display:none}.quote-header{border-top:4px solid #2d1a12;border-bottom:1px solid #c7b9aa;justify-content:space-between;align-items:flex-start;padding:24px 0 18px;display:flex}.quote-header img{object-fit:contain;object-position:left center;width:154px;height:64px}.quote-header h2{letter-spacing:8px;margin:16px 0 6px;font-size:22px}.quote-header p{color:#77695e;margin:0;font-size:13px}.quote-meta{background:#fffaf3;border:1px solid #ded4c8;grid-template-columns:repeat(3,1fr);gap:10px 18px;margin:24px 0;padding:14px;font-size:14px;display:grid}.quote-meta p{margin:0}.quote-meta .full{grid-column:1/-1}.quote-sheet h3{text-align:center;letter-spacing:5px;margin:28px 0 14px;font-size:17px}table{border-collapse:collapse;table-layout:fixed;width:100%;min-width:760px;font-size:14px}th{color:#fff8ef;background:#321e14;border:1px solid #6b574c;padding:13px 9px}td{vertical-align:middle;border:1px solid #ded4c8;padding:12px 10px;line-height:1.45}th:first-child,td:first-child{text-align:center;width:54px}th:nth-child(2),td:nth-child(2){text-align:center;width:112px}th:nth-child(5),td:nth-child(5){text-align:center;width:62px}th:nth-child(6),td:nth-child(6),th:nth-child(7),td:nth-child(7){text-align:right;width:128px;font-weight:700}tbody tr:nth-child(2n){background:#fbf7f1}.image-cell img{object-fit:contain;background:#fff;width:82px;height:70px}.image-cell span{color:#765f4f;background:#eee5db;place-items:center;width:82px;height:70px;margin:0 auto;font-size:13px;font-weight:700;display:grid}td strong,td span{display:block}td span{color:#6e5c50;margin-top:5px;font-size:13px}.quote-summary{border:1px solid #ded4c8;justify-content:end;gap:0;width:min(360px,100%);margin-top:18px;margin-left:auto;display:grid}.quote-summary div{border-bottom:1px solid #ded4c8;grid-template-columns:1fr 150px;align-items:center;min-height:42px;display:grid}.quote-summary div:last-child{border-bottom:0}.quote-summary span,.quote-summary strong{padding:10px 12px}.quote-summary strong{text-align:right}.quote-summary .grand-total{background:#f3eadf;font-size:17px;font-weight:800}.mode-code{color:#5c4537;border:1px solid #c9b8a6;place-items:center;width:26px;height:26px;font-size:13px;font-weight:800;display:grid;position:absolute;bottom:14px;left:18px}@media (width<=1080px){.workspace{grid-template-columns:1fr}.control-panel{height:auto;position:static}}@media (width<=720px){.workspace{padding:12px}.quote-sheet{padding:28px 18px}.quote-meta{grid-template-columns:1fr}.quote-header{gap:12px;display:grid}}@media print{@page{size:A4 portrait;margin:8mm}body{background:#fff}.control-panel,.editor-table,.pdf-preview,.quote-pager{display:none}.workspace{padding:0;display:block}.quote-sheet{width:100%;max-width:none;box-shadow:none;break-after:page;page-break-after:always;border:0;min-height:281mm;margin:0;padding:0;overflow:visible}.quote-sheet.screen-hidden{display:block}.quote-sheet:last-child{break-after:auto;page-break-after:auto}.quote-header{padding:10px 0}.quote-header img{width:120px;height:48px}.quote-meta{gap:6px 10px;margin:12px 0;padding:8px;font-size:10px}.quote-sheet h3{margin:14px 0 8px;font-size:13px}table{table-layout:fixed;width:100%;min-width:0;font-size:9.5px}th{padding:6px 4px}td{word-break:break-word;overflow-wrap:anywhere;padding:6px 4px;line-height:1.35}th:first-child,td:first-child{width:7%}th:nth-child(2),td:nth-child(2){width:12%}th:nth-child(3),td:nth-child(3){width:22%}th:nth-child(4),td:nth-child(4){width:31%}th:nth-child(5),td:nth-child(5){width:6%}th:nth-child(6),td:nth-child(6),th:nth-child(7),td:nth-child(7){width:11%}.image-cell img,.image-cell span{width:54px;height:46px;font-size:9px}.quote-summary{break-inside:avoid;page-break-inside:avoid;width:300px;margin-top:12px;font-size:11px}.quote-summary div{grid-template-columns:1fr 128px;min-height:30px}.quote-summary span,.quote-summary strong{padding:6px 8px}.quote-summary .grand-total{font-size:13px}.mode-code{width:20px;height:20px;font-size:10px;bottom:0;left:0}}
