/* 客户来料加工：与销售开单共用一张正式单据，但只显示当前模式。 */
#invoiceForm .invoice-products[hidden],
#invoiceForm .toll-processing-section[hidden],
#invoiceForm .invoice-products.hide,
#invoiceForm .toll-processing-section.hide{display:none!important}

.order-mode-switch{display:grid;grid-template-columns:minmax(210px,.65fr) minmax(460px,1.35fr) minmax(190px,.5fr);gap:14px;align-items:stretch;padding:14px 30px;margin:0;border-top:1px solid var(--store-theme-border,#dce8e4);border-bottom:1px solid var(--store-theme-border,#dce8e4);background:linear-gradient(110deg,var(--store-theme-faint,#f2f8f6),#fff 72%)}
.order-mode-copy{display:flex;flex-direction:column;justify-content:center;gap:2px}.order-mode-copy>small{letter-spacing:.18em;color:var(--store-theme,#176b57);font-size:10px;font-weight:800}.order-mode-copy>strong{font-size:17px;color:#172824}.order-mode-copy>p{margin:2px 0 0;color:#75827e;font-size:11px;line-height:1.4}
.order-mode-options{display:grid;grid-template-columns:repeat(2,minmax(190px,1fr));gap:10px}
.order-mode-switch .order-mode-option{position:relative;display:grid;grid-template-columns:34px 1fr;align-items:center;gap:10px;min-height:58px;padding:9px 14px;border:1px solid var(--store-theme-border,#bfd6ce);border-radius:14px;background:#fff;color:var(--store-theme,#176b57);text-align:left;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease,background .2s ease;box-sizing:border-box}
.order-mode-switch .order-mode-option:hover{transform:translateY(-1px);box-shadow:0 8px 20px color-mix(in srgb,var(--store-theme,#176b57) 14%,transparent)}
.order-mode-switch .order-mode-option>input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:2}
.order-mode-switch .order-mode-option i{display:grid;place-items:center;width:31px;height:31px;border-radius:10px;background:var(--store-theme-faint,#edf6f2);font-style:normal;font-size:11px;font-weight:800}.order-mode-switch .order-mode-option span{display:grid;gap:3px}.order-mode-switch .order-mode-option b{font-size:14px;white-space:nowrap}.order-mode-switch .order-mode-option small{font-size:11px;line-height:1.25;opacity:.72}
.order-mode-switch .order-mode-option.active{border-color:var(--store-theme,#176b57);background:var(--store-theme,#176b57);color:#fff;box-shadow:0 8px 22px color-mix(in srgb,var(--store-theme,#176b57) 22%,transparent)}
.order-mode-switch .order-mode-option.active i{background:rgba(255,255,255,.16)}
.order-mode-current{display:flex;flex-direction:column;justify-content:center;gap:2px;padding:10px 14px;border:1px solid var(--store-theme-border,#d4e4de);border-radius:14px;background:rgba(255,255,255,.85);color:#71807b}.order-mode-current span{font-size:10px}.order-mode-current b{color:var(--store-theme,#176b57);font-size:14px}.order-mode-current small{font-size:10px}.order-mode-error{grid-column:1/-1;margin:0;padding:9px 12px;border-radius:9px;background:#fff0ee;color:#b94439;font-size:12px}

.toll-processing-section{padding:0;background:#fff;border-top:1px solid var(--store-theme-border,#dce8e4);border-bottom:1px solid var(--store-theme-border,#dce8e4)}
.toll-mode-hero{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(540px,1.7fr);gap:26px;padding:25px 30px;background:linear-gradient(120deg,var(--store-theme-faint,#f1f8f5),#fff 72%)}
.toll-mode-hero small{letter-spacing:.2em;color:var(--store-theme,#176b57);font-weight:700}
.toll-mode-hero h3{margin:5px 0 4px;font-size:25px;color:#152622}
.toll-mode-hero p{margin:0;color:#71807c;line-height:1.6}
.toll-mode-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;align-self:center}
.toll-mode-facts span{display:grid;gap:4px;min-height:62px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--store-theme,#176b57) 12%,#e4ece9);border-radius:13px;background:rgba(255,255,255,.86);font-size:12px;color:#71807c}
.toll-mode-facts b{font-size:13px;color:var(--store-theme,#176b57)}
.toll-section-title{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:22px 30px 13px}
.toll-section-title h3{margin:0 0 4px;font-size:18px}
.toll-section-title p{margin:0;color:#788681;font-size:12px}

.toll-processing-table{width:100%;padding:0 30px 18px;overflow:visible!important;box-sizing:border-box}
.toll-processing-table table{width:100%;min-width:0!important;table-layout:auto;border-collapse:separate;border-spacing:0;border:1px solid #dfe9e5;border-radius:14px;overflow:hidden}
.toll-processing-table th{padding:11px 10px;background:var(--store-theme-faint,#eef6f3);color:#52655f;font-size:12px;font-weight:700;text-align:left;white-space:nowrap}
.toll-processing-table th:nth-child(1){width:19%}.toll-processing-table th:nth-child(2){width:13%}.toll-processing-table th:nth-child(3){width:10%}.toll-processing-table th:nth-child(4){width:8%}.toll-processing-table th:nth-child(5){width:auto}.toll-processing-table th:nth-child(6){width:70px}
.toll-processing-table td{padding:10px 7px;vertical-align:top;border-top:1px solid #e5ece9;background:#fff}
.toll-processing-table input{width:100%;min-width:0;height:42px;box-sizing:border-box}
.toll-mobile-label{display:none}
.toll-operation-result{display:grid;gap:6px;margin-bottom:7px}
.toll-result-line{display:grid;grid-template-columns:23px minmax(92px,max-content) minmax(74px,1fr) max-content;align-items:center;gap:8px;padding:7px 9px;border-radius:9px;background:var(--store-theme-faint,#f3f8f6);line-height:1.35}
.toll-result-line i{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--store-theme,#176b57);color:#fff;font-style:normal;font-size:11px}
.toll-result-line em{font-style:normal;color:#71817c;overflow-wrap:anywhere}
.toll-result-line strong{color:var(--store-theme,#176b57);white-space:nowrap}
.toll-empty-result{display:block;padding:3px 0;color:#899691;font-size:12px}
.toll-processing-note{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;margin:0 30px 24px;padding:13px 16px;border-radius:12px;background:var(--store-theme-faint,#f3f8f6);color:#667772;font-size:12px}
.toll-processing-note b{color:var(--store-theme,#176b57)}
.order-mode-switch .order-mode-option,.processing-detail-button,.toll-remove-row{pointer-events:auto!important;position:relative;z-index:3;cursor:pointer}

@media(max-width:1050px){
  .order-mode-switch{grid-template-columns:1fr}.order-mode-options{grid-template-columns:repeat(2,1fr)}.order-mode-current{display:none}.toll-mode-hero{grid-template-columns:1fr}.toll-mode-facts{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:760px){
  .order-mode-switch{grid-template-columns:1fr;padding:12px 16px}.order-mode-options{grid-template-columns:1fr}
  .toll-mode-hero,.toll-section-title{padding-left:16px;padding-right:16px}.toll-mode-facts{grid-template-columns:1fr}
  .toll-section-title{align-items:flex-start;flex-direction:column}
  .toll-processing-table{padding:0 16px 16px;overflow:visible!important}
  .toll-processing-table table,.toll-processing-table thead,.toll-processing-table tbody,.toll-processing-table tr,.toll-processing-table td{display:block;width:100%}
  .toll-processing-table thead{display:none}.toll-processing-table table{border:0;overflow:visible}
  .toll-processing-table tr{margin-bottom:14px;border:1px solid #dfe9e5;border-radius:14px;overflow:hidden;background:#fff}
  .toll-processing-table td{padding:9px 12px;border-top:1px solid #eef2f0}.toll-processing-table td:first-child{border-top:0}
  .toll-mobile-label{display:block;margin-bottom:5px;color:#6f7f79;font-size:11px;font-weight:700}
  .toll-result-line{grid-template-columns:23px minmax(80px,auto) 1fr}.toll-result-line strong{grid-column:2/-1}
  .toll-processing-note{margin:0 16px 18px;align-items:flex-start;flex-direction:column}
}
