.cost-calculator{overflow:hidden;border:1px solid #d7e4e7;border-radius:12px;background:#fff}
.cost-calculator>header{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:18px 21px;background:linear-gradient(100deg,#f7faf7,#eef5e1)}
.cost-calculator>header span{color:#789b2d;font-size:10px;font-weight:800;letter-spacing:.16em}
.cost-calculator>header h3{margin:5px 0 3px;font-size:18px}
.cost-calculator>header p{margin:0;color:#718a95;font-size:11px}
.cost-calculator>header>strong{flex:0 0 auto;padding:7px 11px;border-radius:999px;background:#dff0ac;color:#527126;font-size:10px}
.cost-calc-inputs{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) minmax(180px,.7fr);gap:15px;padding:18px 21px;border-top:1px solid #e5edef;border-bottom:1px solid #e5edef}
.cost-calc-inputs label>span,.cost-calc-inputs article>span{display:block;margin-bottom:7px;color:#587581;font-size:11px;font-weight:700}
.cost-calc-inputs label>div{display:flex;height:42px}
.cost-calc-inputs input{min-width:0;width:100%;box-sizing:border-box;border:1px solid #cadadd;border-right:0;border-radius:7px 0 0 7px;padding:0 12px;color:#173e4d;font-size:15px;font-weight:800;outline:0}
.cost-calc-inputs input:focus{border-color:#9abf35;box-shadow:inset 2px 0 #9abf35}
.cost-calc-inputs em{display:flex;align-items:center;flex:0 0 auto;border:1px solid #cadadd;border-left:0;border-radius:0 7px 7px 0;padding:0 12px;background:#f3f7f8;color:#6f8791;font-size:10px;font-style:normal}
.cost-calc-inputs article{padding:10px 14px;border-radius:8px;background:#123d49;color:#fff}
.cost-calc-inputs article>span{margin:0;color:#b8ced3}
.cost-calc-inputs article strong{display:inline-block;margin-top:4px;font-size:20px}
.cost-calc-inputs article small{margin-left:5px;color:#b8ced3}
.cost-calc-results{padding:0 21px}
.cost-calc-head,.cost-calc-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(230px,1.2fr) minmax(120px,.55fr);align-items:center;gap:18px}
.cost-calc-head{padding:10px 0;color:#8299a3;font-size:10px}
.cost-calc-row{min-height:48px;border-top:1px solid #edf2f3}
.cost-calc-item{display:flex;align-items:center;gap:9px}.cost-calc-item>span{display:flex;flex-direction:column;gap:2px}.cost-calc-item input{position:absolute;opacity:0;pointer-events:none}.cost-calc-item>i{position:relative;flex:0 0 18px;width:18px;height:18px;box-sizing:border-box;border:1px solid #9cb0b7;border-radius:4px;background:#fff}.cost-calc-item input:checked+i{border-color:#8caf31;background:#a9cf45}.cost-calc-item input:checked+i:after{content:"";position:absolute;left:5px;top:2px;width:5px;height:9px;border:solid #274b35;border-width:0 2px 2px 0;transform:rotate(45deg)}.cost-calc-item input:focus-visible+i{outline:2px solid #173e4d;outline-offset:2px}.cost-calc-row{cursor:pointer;transition:background .15s,opacity .15s}.cost-calc-row.excluded{background:#f8fafb;opacity:.58}.cost-calc-row.excluded>strong{text-decoration:line-through}.cost-calc-row b{font-size:12px}.cost-calc-row small{color:#91a3aa;font-size:9px}.cost-calc-row>span:nth-child(2){color:#718a95;font-size:11px}.cost-calc-row>strong{text-align:right;font-size:13px}
.cost-calculator>footer{display:flex;justify-content:flex-end;gap:12px;padding:15px 21px;background:#f5f9fa}
.cost-calculator>footer>div{min-width:190px;padding:11px 14px;border:1px solid #dbe7e9;border-radius:8px;background:#fff}
.cost-calculator>footer span,.cost-calculator>footer small{display:block;color:#78909a;font-size:10px}.cost-calculator>footer strong{display:block;margin-top:4px;font-size:20px}.cost-calculator>footer .grand-total{border-color:#acd044;background:#eff8d7}.cost-calculator>footer .grand-total strong{color:#365d20;font-size:24px}
@media(max-width:900px){.cost-calc-inputs{grid-template-columns:1fr 1fr}.cost-calc-inputs article{grid-column:1/-1}.cost-calc-head,.cost-calc-row{grid-template-columns:minmax(150px,1fr) minmax(180px,1fr) 110px}}
@media(max-width:700px){.cost-calculator>header{align-items:flex-start;flex-direction:column}.cost-calc-inputs{grid-template-columns:1fr}.cost-calc-inputs article{grid-column:auto}.cost-calc-head{display:none}.cost-calc-row{grid-template-columns:1fr 100px}.cost-calc-row>span:nth-child(2){display:none}.cost-calculator>footer{flex-direction:column}.cost-calculator>footer>div{min-width:0}}
.cost-calc-inputs{grid-template-columns:repeat(3,minmax(160px,1fr));gap:11px;padding:14px 21px}.cost-calc-inputs select{width:100%;height:42px;box-sizing:border-box;border:1px solid #cadadd;border-radius:7px;padding:0 12px;background:#fff;color:#173e4d;font-weight:750}.cost-calc-inputs .secondary-input>span{color:#8b9ba1;font-weight:600}.cost-calc-inputs .secondary-input input{color:#58717b;font-size:13px}.cost-calculator>footer{display:grid;grid-template-columns:minmax(190px,1fr) minmax(220px,1.15fr) minmax(220px,1fr);align-items:stretch}.cost-calculator>footer>div{min-width:0}.cost-calculator>footer .core-total,.cost-calculator>footer .grand-total{border-color:#acd044;background:#eff8d7}.cost-calculator>footer .core-total strong,.cost-calculator>footer .grand-total strong{color:#365d20;font-size:24px}.cost-calculator>footer .quote-total{background:#fff;color:#617780}.cost-calculator>footer .quote-total strong{font-size:18px}.cost-calculator>footer .quote-total small b{display:inline;color:#536b75;font-size:10px}@media(max-width:900px){.cost-calc-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.cost-calculator>footer{grid-template-columns:1fr 1fr}.cost-calculator>footer .quote-total{grid-column:1/-1}}@media(max-width:700px){.cost-calc-inputs{grid-template-columns:1fr}.cost-calculator>footer{display:grid;grid-template-columns:1fr 1fr}.cost-calculator>footer .quote-total{grid-column:1/-1}}
.cost-calculator.compact>header{padding:11px 16px}.cost-calculator.compact>header h3{margin:3px 0 0}.cost-calculator.compact .cost-calc-inputs{grid-template-columns:repeat(5,minmax(140px,1fr));padding:11px 16px}.cost-calculator.compact>footer{grid-template-columns:repeat(4,minmax(150px,1fr));padding:11px 16px}.cost-calculator.compact>footer>div{padding:9px 12px}.cost-calculator.compact>footer strong{font-size:20px}@media(max-width:1200px){.cost-calculator.compact .cost-calc-inputs{grid-template-columns:repeat(3,minmax(140px,1fr))}}@media(max-width:700px){.cost-calculator.compact .cost-calc-inputs{grid-template-columns:1fr}.cost-calculator.compact>footer{grid-template-columns:1fr 1fr}}
.cost-calculator.compact>header{min-height:42px;box-sizing:border-box;padding:9px 16px}.cost-calculator.compact>header h3{margin:0;font-size:15px}.cost-calculator.compact>footer{grid-template-columns:repeat(5,minmax(140px,1fr));gap:9px}.cost-calculator.compact>footer>div{display:flex;min-height:70px;box-sizing:border-box;flex-direction:column;justify-content:center;padding:9px 12px}.cost-calculator.compact>footer span{font-size:11px;font-weight:650}.cost-calculator.compact>footer strong{margin-top:5px;font-size:20px;line-height:1.1}.cost-calculator.compact>footer .unit-product,.cost-calculator.compact>footer .total-product{border-color:#acd044;background:#eff8d7}.cost-calculator.compact>footer .unit-product strong,.cost-calculator.compact>footer .total-product strong{color:#365d20}.cost-calculator.compact>footer .unit-quote,.cost-calculator.compact>footer .quote-total,.cost-calculator.compact>footer .order-profit{background:#fff}.cost-calculator.compact>footer .order-profit small{margin-top:4px;font-size:10px}.cost-calculator.compact>footer .order-profit small b{font-size:10px}@media(max-width:1200px){.cost-calculator.compact>footer{grid-template-columns:repeat(3,minmax(140px,1fr))}}@media(max-width:700px){.cost-calculator.compact>footer{grid-template-columns:1fr 1fr}.cost-calculator.compact>footer .order-profit{grid-column:1/-1}}

.cost-calculator.compact>footer .unit-product,.cost-calculator.compact>footer .total-product,.cost-calculator.compact>footer .unit-quote,.cost-calculator.compact>footer .order-profit{border-color:#dbe7e9;background:#fff}.cost-calculator.compact>footer .unit-product strong,.cost-calculator.compact>footer .total-product strong{color:#173e4d;font-size:20px}.cost-calculator.compact>footer .quote-total{border-color:#acd044;background:#eff8d7;color:#173e4d}.cost-calculator.compact>footer .quote-total strong{color:#365d20;font-size:24px}

.cost-calculator.compact>footer .quote-total strong{font-size:20px}.quote-save-panel{display:grid;grid-template-columns:minmax(170px,.9fr) minmax(150px,.8fr) minmax(180px,1fr) minmax(220px,1.4fr) auto;align-items:end;gap:12px;padding:14px 16px;border-top:1px solid #dce7ea;background:#f8fbfb}.quote-save-panel>div{align-self:center}.quote-save-panel>div strong,.quote-save-panel>div span{display:block}.quote-save-panel>div strong{font-size:14px}.quote-save-panel>div span{margin-top:3px;color:#78909a;font-size:10px}.quote-save-panel label>span{display:block;margin-bottom:5px;color:#587581;font-size:10px;font-weight:700}.quote-save-panel input{width:100%;height:38px;box-sizing:border-box;border:1px solid #cadadd;border-radius:7px;padding:0 10px;background:#fff;color:#173e4d;font-size:12px;outline:0}.quote-save-panel input:focus{border-color:#9abf35;box-shadow:0 0 0 2px #bddd5840}.quote-save-panel button{height:38px;border:1px solid #9cbd38;border-radius:7px;padding:0 18px;background:#bfe253;color:#173e2f;font-weight:800;white-space:nowrap}.quote-save-panel button:disabled{opacity:.55}@media(max-width:1100px){.quote-save-panel{grid-template-columns:1fr 1fr 1fr}.quote-save-panel>div{grid-column:1/-1}.quote-save-panel button{width:100%}}@media(max-width:700px){.quote-save-panel{grid-template-columns:1fr}.quote-save-panel>div{grid-column:auto}}

/* Two-column costing workspace: editable parameters on the left, calculated output on the right. */
.cost-calculator.compact .cost-calc-workspace{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;border-top:1px solid #e2ebed;border-bottom:1px solid #dce7e9;background:#fff}
.cost-calculator.compact .cost-calc-parameters{min-width:0;border-right:1px solid #dce7e9;background:#fbfcfa}
.cost-calculator.compact .cost-calc-output{display:flex;min-width:0;flex-direction:column;background:#fff}
.cost-calculator.compact .cost-calc-section-heading{display:flex;min-height:48px;box-sizing:border-box;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;border-bottom:1px solid #e3ecee}
.cost-calculator.compact .cost-calc-section-heading strong{color:#173e4d;font-size:13px}
.cost-calculator.compact .cost-calc-section-heading span{color:#8299a3;font-size:10px;text-align:right}
.cost-calculator.compact .cost-calc-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:13px 12px;padding:15px 16px 18px;border:0}
.cost-calculator.compact .cost-calc-inputs .calc-field-wide{grid-column:1/-1}
.cost-calculator.compact .cost-calc-formula-action{display:flex;grid-column:1/-1;align-items:center;justify-content:flex-start;margin-top:-2px}
.cost-calculator.compact .cost-calc-formula-action .formula-cost-open{min-width:190px;background:#c7eb55;color:#102f24}
.cost-calculator.compact .cost-calc-inputs label>span{margin-bottom:6px}
.cost-calculator.compact .cost-calc-inputs label>div{height:40px}
.cost-calculator.compact .cost-calc-inputs input{font-size:14px}
.cost-calculator.compact .calc-derived input{border-color:#b7d965;background:#f2f9df;color:#315b19;cursor:default}
.cost-calculator.compact .cost-calc-inputs input[name="ingredientPrice"]{border-color:#9fc7cf;background:#fff;color:#173e4d;cursor:text;opacity:1}
.cost-calculator.compact .cost-calc-results{flex:1;padding:0 16px}
.cost-calculator.compact .cost-calc-head,.cost-calculator.compact .cost-calc-row{grid-template-columns:minmax(190px,1.2fr) minmax(190px,1fr) minmax(105px,.5fr);gap:15px}
.cost-calculator.compact .cost-calc-row{min-height:44px}
.cost-calculator.compact .ingredient-cost-row{background:#f5fae9;cursor:default}.cost-calculator.compact .ingredient-cost-row .cost-calc-item>i{border-color:#a8cc42;background:#c7e85a}.cost-calculator.compact .ingredient-cost-row .cost-calc-item>i:after{content:"";position:absolute;left:5px;top:2px;width:5px;height:9px;border:solid #274b35;border-width:0 2px 2px 0;transform:rotate(45deg)}
.cost-calc-row:is([data-cost-row="hard-capsule-filling"],[data-cost-row="softgel-encapsulation"],[data-cost-row="tablet-pressing"],[data-cost-row="tablet-coating"]) [data-line-formula]::before{content:"千粒数 ";font-weight:700;color:#587581}
.cost-calc-row:is([data-cost-row="hard-capsule-filling"],[data-cost-row="softgel-encapsulation"],[data-cost-row="tablet-pressing"],[data-cost-row="tablet-coating"]) [data-line-formula]::after{content:" / 千粒";font-weight:700;color:#587581}
.cost-calc-output footer .unit-product>span,.cost-calc-output footer .total-product>span{font-size:0}
.cost-calc-output footer .unit-product>span::after{content:"每单位成本";font-size:11px}
.cost-calc-output footer .total-product>span::after{content:"订单总成本";font-size:11px}
html[lang^="en"] .cost-calc-output footer .unit-product>span::after{content:"Cost per unit"}
html[lang^="en"] .cost-calc-output footer .total-product>span::after{content:"Total order cost"}
html[lang^="en"] .cost-calc-row:is([data-cost-row="hard-capsule-filling"],[data-cost-row="softgel-encapsulation"],[data-cost-row="tablet-pressing"],[data-cost-row="tablet-coating"]) [data-line-formula]::before{content:"1,000-unit qty ";}
html[lang^="en"] .cost-calc-row:is([data-cost-row="hard-capsule-filling"],[data-cost-row="softgel-encapsulation"],[data-cost-row="tablet-pressing"],[data-cost-row="tablet-coating"]) [data-line-formula]::after{content:" / 1,000 units";}
.cost-calculator.compact .cost-calc-output>footer{display:grid;grid-template-columns:repeat(5,minmax(115px,1fr));gap:8px;padding:11px 16px;background:#f5f9fa}
.cost-calculator.compact .cost-calc-output>footer>div{display:flex;min-width:0;min-height:66px;box-sizing:border-box;flex-direction:column;justify-content:center;padding:9px 11px;border:1px solid #dbe7e9;border-radius:8px;background:#fff}
.cost-calculator.compact .cost-calc-output>footer span,.cost-calculator.compact .cost-calc-output>footer small{display:block;color:#78909a;font-size:10px}
.cost-calculator.compact .cost-calc-output>footer span{font-weight:650}
.cost-calculator.compact .cost-calc-output>footer strong{display:block;margin-top:5px;color:#173e4d;font-size:18px;line-height:1.1}
.cost-calculator.compact .cost-calc-output>footer .quote-total{border-color:#acd044;background:#eff8d7}
.cost-calculator.compact .cost-calc-output>footer .quote-total strong{color:#365d20;font-size:18px}
.cost-calculator.compact .cost-calc-output>footer .order-profit small{margin-top:3px}
.cost-calculator.compact .cost-calc-output>footer .order-profit small b{font-size:10px}
@media(max-width:1350px){.cost-calculator.compact .cost-calc-output>footer{grid-template-columns:repeat(3,minmax(120px,1fr))}}
@media(max-width:980px){.cost-calculator.compact .cost-calc-workspace{grid-template-columns:1fr}.cost-calculator.compact .cost-calc-parameters{border-right:0;border-bottom:1px solid #dce7e9}.cost-calculator.compact .cost-calc-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.cost-calculator.compact .cost-calc-inputs .calc-field-wide{grid-column:auto}}
@media(max-width:700px){.cost-calculator.compact .cost-calc-section-heading{align-items:flex-start;flex-direction:column}.cost-calculator.compact .cost-calc-section-heading span{text-align:left}.cost-calculator.compact .cost-calc-inputs{grid-template-columns:1fr}.cost-calculator.compact .cost-calc-output>footer{grid-template-columns:1fr 1fr}.cost-calculator.compact .cost-calc-output>footer .order-profit{grid-column:1/-1}}
.formula-page-summary{margin:14px 16px 0;padding:14px;border:1px solid #d6e3e7;border-radius:12px;background:#f8fbfb}.formula-page-summary>p,.formula-page-empty{margin:0;color:#617c86}.formula-page-summary .formula-cost-result{padding:0;border:0;background:transparent}.formula-page-summary .formula-cost-result>header label,.formula-page-summary .formula-cost-edit{display:none}.formula-page-summary .formula-cost-table{background:#fff}.formula-page-summary .formula-cost-result>footer{margin-top:4px}
.module-load-state{display:grid;min-height:360px;box-sizing:border-box;place-content:center;justify-items:center;gap:10px;border:1px solid #d9e5e8;border-radius:12px;background:#fff;color:#173e4d;text-align:center}.module-load-state strong{font-size:17px}.module-load-state small{max-width:480px;color:#718992;font-size:12px;line-height:1.6}.module-load-state button{margin-top:5px;border:1px solid #9fc52d;border-radius:8px;padding:10px 18px;background:#c1e84b;color:#173e4d;font-weight:750;cursor:pointer}.module-load-spinner{width:28px;height:28px;border:3px solid #dce8c2;border-top-color:#8fba22;border-radius:50%;animation:module-load-spin .8s linear infinite}.module-load-state.error{border-color:#efc5bf;background:#fffafa}.module-load-state.error:before{content:"!";display:grid;width:34px;height:34px;place-content:center;border-radius:50%;background:#fff0ee;color:#b3392d;font-size:20px;font-weight:800}@keyframes module-load-spin{to{transform:rotate(360deg)}}
