.matching-toolbar-button,.upload-matching-open{color:#246942!important;border-color:#bed8c8!important;background:#edf6f0!important}
.upload-matching-open{margin-top:10px;width:100%}
#orderMatchingDialog{width:1280px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);padding:26px;border:1px solid #d7e1d8;border-radius:18px;overflow:auto;color:#263c30;background:#fff}
#orderMatchingDialog::backdrop{background:rgba(20,37,28,.4)}
#orderMatchingDialog *{box-sizing:border-box}
#orderMatchingDialog .matching-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}
#orderMatchingDialog h2{font-size:24px;line-height:1.4;margin:3px 0 0}
#orderMatchingDialog .matching-eyebrow{margin:0;color:#42805b;font-size:12px;font-weight:750;letter-spacing:.05em}
#orderMatchingDialog .matching-context{font-size:13px;color:#637267;margin:12px 0;overflow-wrap:anywhere}
#orderMatchingDialog .matching-help{font-size:14px;line-height:1.65;padding:13px 16px;background:#f3f6f2;border-radius:8px;margin:0 0 19px}
#orderMatchingDialog .matching-tools{display:flex;align-items:center;gap:12px;margin-bottom:12px}
#orderMatchingDialog .matching-tools label{font-size:13px;font-weight:700;white-space:nowrap}
#orderMatchingDialog .matching-tools input{width:290px;min-width:0}
#orderMatchingDialog #matchingCountLabel{margin-left:auto;font-size:13px;white-space:nowrap;color:#67756a}
#orderMatchingDialog .matching-table-wrap{max-height:280px;overflow:auto;overflow-anchor:none;border:1px solid #dbe3db;border-radius:10px}
#orderMatchingDialog .wf-dialog-content{overflow-anchor:none}
#orderMatchingDialog:has(#matchingEditor:not([hidden])) .matching-table-wrap{max-height:175px}
#orderMatchingDialog table{width:100%;min-width:1040px;table-layout:fixed;border-collapse:collapse;font-size:14px}
#orderMatchingDialog th{position:sticky;top:0;text-align:left;background:#f1f5ef;color:#647366;font-size:12px;white-space:nowrap;z-index:1}
#orderMatchingDialog th,#orderMatchingDialog td{padding:12px 14px;border-bottom:1px solid #e3e9e1;vertical-align:middle}
#orderMatchingDialog td:first-child,#orderMatchingDialog td:nth-child(2){overflow-wrap:anywhere}
#orderMatchingDialog td:first-child strong{line-height:1.6}
#orderMatchingDialog td:last-child{padding-left:8px;padding-right:8px}
#orderMatchingDialog td:last-child button{padding-left:10px;padding-right:10px;white-space:nowrap}
#orderMatchingDialog td:nth-child(3),#orderMatchingDialog td:nth-child(4){white-space:nowrap;font-variant-numeric:tabular-nums}
#orderMatchingDialog td small{display:block;color:#7a8177;font-size:11px;line-height:1.6;margin-top:3px}
#orderMatchingDialog .matching-unresolved{background:#fff8ec}
#orderMatchingDialog .matching-selected{background:#edf7ef;box-shadow:inset 4px 0 #35714e}
#orderMatchingDialog .matching-arrow{color:#6b9978;margin-right:6px}
#orderMatchingDialog .matching-amount{color:#246942;font-size:16px}
#orderMatchingDialog .matching-warning{color:#9c6015;font-weight:650}
#orderMatchingDialog button{min-height:42px;cursor:pointer}
#orderMatchingDialog button:disabled{cursor:not-allowed}
#orderMatchingDialog input,#orderMatchingDialog select{min-height:44px;padding:9px 11px;border:1px solid #bfcfc2;border-radius:7px;background:#fff;font-size:17px;color:#223a2c;width:100%}
#orderMatchingDialog :focus-visible{outline:3px solid #7aab8c;outline-offset:2px}
#orderMatchingDialog #matchingEditor{border:1px solid #bed8c3;background:#fbfdfb;border-radius:12px;margin-top:18px;padding:20px}
#orderMatchingDialog .matching-editor-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:17px}
#orderMatchingDialog .matching-editor-title span{font-size:12px;color:#647564}
#orderMatchingDialog h3{margin:4px 0 0;font-size:20px;overflow-wrap:anywhere}
#orderMatchingDialog .matching-fields{display:grid;grid-template-columns:minmax(0,1fr) 160px 115px;gap:16px}
#orderMatchingDialog .matching-fields label,#orderMatchingDialog .matching-box-fields label{display:block;font-size:13px;font-weight:750}
#orderMatchingDialog label input,#orderMatchingDialog label select{display:block;margin-top:6px}
#orderMatchingDialog .matching-original{font-size:12px;color:#667565;margin:11px 0 15px;line-height:1.6}
#orderMatchingDialog fieldset{border:1px solid #d4e2d4;border-radius:9px;margin:0 0 14px;padding:12px 16px 16px}
#orderMatchingDialog legend{font-size:14px;font-weight:750;padding:0 5px;color:#2d6342}
#orderMatchingDialog fieldset p{font-size:12px;color:#6a786c;margin:0 0 12px}
#orderMatchingDialog .matching-box-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}
#orderMatchingDialog .matching-pack-hint{font-size:13px;line-height:1.7;background:#f3f0fa;border:1px solid #ddd2ed;border-radius:8px;padding:12px 14px;color:#66507f}
#orderMatchingDialog #matchingCalculation{background:#e9f4eb;border-radius:9px;padding:14px 18px;display:flex;align-items:center;gap:18px;flex-wrap:wrap}
#orderMatchingDialog #matchingCalculation>span{font-size:13px;font-weight:700}
#orderMatchingDialog #matchingCalculation>strong{font-size:23px;color:#24643e;font-variant-numeric:tabular-nums}
#orderMatchingDialog #matchingCalculation b{font-size:20px;color:#82a28b;padding:0 12px}
#orderMatchingDialog #matchingCalculation small{margin-left:auto;font-size:12px;color:#53735c}
#orderMatchingDialog #matchingCalculation.matching-invalid{background:#fff3df}
#orderMatchingDialog #matchingError{color:#a33229;font-size:13px;line-height:1.5;margin:10px 0}
#orderMatchingDialog #matchingError:empty,#orderMatchingDialog #matchingNotice:empty{display:none}
#orderMatchingDialog .matching-editor-actions{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:15px}
#orderMatchingDialog .matching-editor-actions span{font-size:12px;color:#6d796e}
#orderMatchingDialog #matchingSave{background:#246942;color:white;min-width:175px}
#orderMatchingDialog #matchingNotice{font-size:14px;line-height:1.6;color:#22643e;padding:12px;background:#eff7f0;border-radius:8px}
#orderMatchingDialog .matching-footer{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #e1e7df;padding-top:17px;margin-top:18px}
#orderMatchingDialog .matching-empty{padding:30px 12px;color:#657365;text-align:center}
@media(max-width:650px){
 #orderMatchingDialog{padding:17px;max-height:calc(100dvh - 16px);max-width:calc(100vw - 12px);border-radius:13px}
 #orderMatchingDialog h2{font-size:20px}
 #orderMatchingDialog .matching-tools{flex-wrap:wrap;gap:8px}
 #orderMatchingDialog .matching-tools input{width:100%;order:3}
 #orderMatchingDialog .matching-tools label{font-size:12px}
 #orderMatchingDialog table{min-width:1040px}
 #orderMatchingDialog .matching-table-wrap{max-height:200px}
 #orderMatchingDialog #matchingEditor{padding:14px}
 #orderMatchingDialog .matching-fields{grid-template-columns:1fr 100px;gap:12px}
 #orderMatchingDialog .matching-target{grid-column:1/-1}
 #orderMatchingDialog h3{font-size:17px}
 #orderMatchingDialog .matching-editor-title button{font-size:12px;flex-shrink:0;padding:8px}
 #orderMatchingDialog .matching-box-fields{gap:10px}
 #orderMatchingDialog #matchingCalculation{gap:8px;padding:13px}
 #orderMatchingDialog #matchingCalculation>span,#orderMatchingDialog #matchingCalculation small{width:100%;margin-left:0}
 #orderMatchingDialog #matchingCalculation>strong{font-size:22px}
 #orderMatchingDialog .matching-editor-actions{flex-direction:column;align-items:stretch}
 #orderMatchingDialog .matching-footer button{flex:1;font-size:13px}
}
