/* Cost maintenance: a quiet operational UI, scoped to its own entry and dialogs. */
:root{--cost-blue:#2964ed;--cost-ink:#24334b;--cost-muted:#68778d;--cost-line:#e3e9f2;--cost-surface:#f6f8fc;--cost-radius:12px}
.import-entry{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:38px;padding:4px 13px 4px 5px;border:1px solid #a8c0ae;border-radius:8px;background:#f3f8f4;color:#244f3d;font-size:13px;font-weight:650;line-height:1.2;white-space:nowrap;cursor:pointer;box-shadow:0 1px 3px rgba(33,68,49,.09);transition:background .15s,border-color .15s,box-shadow .15s}
.import-entry-icon{display:grid;place-items:center;width:28px;height:28px;flex:none;border-radius:5px;background:#307758;color:#fff}
.import-entry-icon svg{width:16px;height:16px}
.import-entry:hover{border-color:#6f9b7e;background:#eaf4ec;box-shadow:0 2px 6px rgba(33,68,49,.13)}
.import-entry:active{background:#e0eee4;box-shadow:0 1px 2px rgba(33,68,49,.1)}
.import-entry:focus-visible{outline:3px solid #9fcbaa;outline-offset:2px}
.cost-toolbar{flex-wrap:wrap;gap:10px}
.cost-entry{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:40px;padding:0 17px;border:1px solid #245bdd;border-radius:8px;background:var(--cost-blue);color:#fff;font-size:13px;font-weight:600;box-shadow:0 3px 7px #2964ed20;transition:background .15s,box-shadow .15s}
.cost-entry svg{width:20px;height:20px;flex:none}.cost-entry:hover{background:#2055cf;box-shadow:0 4px 10px #2964ed30}.cost-entry:focus-visible{outline:3px solid #96b9ff;outline-offset:3px}
.cost-backdrop{background:rgba(24,39,64,.38);backdrop-filter:blur(3px);padding:24px}
.cost-modal{width:min(940px,100%);max-height:calc(100dvh - 48px);display:flex;flex-direction:column;border:1px solid #ffffffba;border-radius:16px;overflow:hidden;box-shadow:0 24px 80px rgba(21,38,68,.22);color:var(--cost-ink);outline:none}
.cost-modal-other-expense{width:min(980px,100%)}
.other-expense-content{gap:16px}.other-expense-content .cost-card h3{margin:0 0 6px}.other-expense-content .cost-card .cost-field-help{margin:4px 0 14px}
.other-expense-form-actions,.other-expense-pages{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:14px}
.other-expense-filter{display:flex;align-items:end;flex-wrap:wrap;gap:10px}.other-expense-filter label{display:grid;gap:5px;color:#52617a;font-size:12px}.other-expense-filter input{height:40px;border:1px solid #dce4ef;border-radius:8px;padding:0 10px}
.other-expense-table{max-height:260px;overflow:auto;border:1px solid #dce4ef;border-radius:8px}.other-expense-table table{min-width:650px}.other-expense-table td,.other-expense-table th{padding:10px 12px;text-align:left}.other-expense-table td:last-child{white-space:nowrap}.other-expense-pages span{color:#63738b;font-size:12px}
.other-expense-table td:last-child button+button{margin-left:8px}
.other-expense-status{min-height:18px;margin:8px 0 0;color:#227361;font-size:12px}.other-expense-status.is-error{color:#b73333}
.other-expense-date-hint{color:var(--cost-muted);font-size:12px;line-height:1.6;font-weight:400;overflow-wrap:anywhere}.other-expense-date-hint.is-error{color:#b73333}.cost-modal-other-expense input[aria-invalid="true"]{border-color:#b73333}
.expense-store-picker{min-width:0;width:100%}.expense-store-picker .store-picker-trigger{width:100%;height:42px;max-width:none;font-size:13px}.expense-store-picker .store-picker-label{min-width:0}.single-store-picker-backdrop{position:fixed;inset:0;z-index:1350;background:transparent}.single-store-picker-panel{z-index:1351}.single-store-picker-close{width:26px;height:26px;flex-shrink:0;border:0;border-radius:5px;background:transparent;color:var(--sp-muted);font-size:21px!important;line-height:1}.single-store-picker-panel .store-matrix-card[hidden]{display:none!important}.single-store-picker-panel .store-matrix-empty[hidden]{display:none!important}
.other-expense-store-field{display:grid;gap:6px;min-width:0;align-content:start}.other-expense-store-label{font-size:12px;font-weight:600;color:#52617a}
.cost-modal-shipping{width:min(1000px,100%)}.cost-modal-sku{width:min(850px,100%)}.cost-modal-order{width:min(880px,100%)}
.cost-modal svg{width:18px;height:18px;flex:none;vertical-align:middle}.cost-modal .modal-head{flex:none;gap:14px;padding:24px 28px;border-bottom:1px solid var(--cost-line);background:#fff;align-items:center}
.cost-head-icon{display:grid;place-items:center;width:48px;height:48px;border:1px solid #dfe9ff;border-radius:13px;color:var(--cost-blue);background:#eff4ff;flex:none}.cost-head-icon svg{width:25px;height:25px}
.cost-modal .modal-title-group{flex:1;min-width:0}.cost-modal .modal-head h2{font-size:20px;line-height:1.4;font-weight:650;color:var(--cost-ink);margin:0}.cost-modal .modal-title-group p{color:var(--cost-muted);font-size:12px;line-height:1.6;margin:5px 0 0}
.cost-modal #modal-close{display:grid;place-items:center;width:34px;height:34px;flex:none;border:1px solid var(--cost-line);border-radius:8px;background:#fff;color:#7e8ba0;font-size:23px;line-height:1;padding:0}.cost-modal #modal-close:hover{color:var(--cost-ink);background:var(--cost-surface)}
.cost-modal .modal-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:0;background:var(--cost-surface)}.cost-modal .modal-body>form{display:flex;flex-direction:column;flex:1;min-height:0}
.cost-content{padding:24px 28px;overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable;flex:1}.cost-settings-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:20px;align-items:stretch}
.cost-card{background:#fff;border:1px solid var(--cost-line);border-radius:var(--cost-radius);padding:20px;min-width:0}.cost-card-heading{display:flex;align-items:center;gap:10px;margin-bottom:20px}.cost-card-heading>div{flex:1;min-width:0}.cost-card h3,.cost-rates-heading h3{font-size:15px;color:var(--cost-ink);line-height:1.5;margin:0;font-weight:650}.cost-card-heading p{font-size:12px;color:var(--cost-muted);line-height:1.5;margin-top:4px}
.cost-section-icon{width:36px;height:36px;border-radius:9px;background:#eef3ff;color:#4772ca;display:grid;place-items:center;flex:none}.cost-section-icon.teal{background:#ecf7f3;color:#288b77}.cost-section-icon svg{width:20px;height:20px}
.cost-count{display:inline-flex;align-items:center;white-space:nowrap;background:#f1f4f9;border:1px solid #e8edf4;color:#67768d;font-size:11px;font-weight:500;border-radius:6px;padding:3px 8px;flex:none}
.cost-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:26px 14px;border:1px dashed #dce5f0;border-radius:10px;background:#fafbfd;color:#7c8ba0}.cost-empty>span{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#edf2f9;color:#8ba0be;margin-bottom:12px}.cost-empty svg{width:25px;height:25px}.cost-empty strong{font-size:13px;color:#52637c;font-weight:600}.cost-empty p{font-size:12px;line-height:1.7;margin:7px 0 0}
.cost-supplier-list{max-height:240px;overflow:auto}.cost-supplier-row{display:flex;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid #edf1f6}.cost-supplier-row:last-child{border-bottom:0}.cost-supplier-row strong{font-size:13px;overflow-wrap:anywhere;flex:1;min-width:0}.supplier-initial{width:32px;height:32px;display:grid;place-items:center;background:#f1f5fc;color:#6682b4;border:1px solid #e6edf8;border-radius:8px;font-size:13px;font-weight:600;flex:none}
.cost-status{font-size:11px;white-space:nowrap;color:#76869c}.cost-status.teal{color:#27866f;background:#edf8f3;border-radius:5px;padding:4px 7px}
.cost-modal .primary,.cost-modal .ghost,.cost-edit-plan{display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:40px;padding:0 15px;border-radius:8px;font-size:13px;font-weight:600;white-space:nowrap;transition:background .15s}.cost-modal .primary{background:var(--cost-blue);border:1px solid var(--cost-blue);color:#fff;box-shadow:0 2px 5px #2964ed17}.cost-modal .primary:hover{background:#2257d2}.cost-modal .ghost{border:1px solid #d8e1ef;color:#52657f;background:white}.cost-modal .ghost:hover{background:#f4f7fc}
.cost-supplier-form{padding-top:20px;margin-top:18px;border-top:1px solid #edf1f6}.cost-supplier-form label{font-size:12px;font-weight:600;color:#52617a;display:block;margin-bottom:8px}.cost-supplier-form>div{display:flex;gap:8px}.cost-supplier-form input{flex:1;min-width:0;width:100%;height:40px;padding:0 12px;border:1px solid #dce4ef;border-radius:8px;font-size:13px;color:var(--cost-ink);outline:0}.cost-supplier-form .primary{padding:0 12px}
.cost-plan+.cost-plan{border-top:1px solid var(--cost-line);padding-top:20px;margin-top:20px}.cost-plan-title{display:flex;align-items:center;gap:8px;justify-content:space-between}.cost-plan-title strong{font-size:14px;color:#34435a;line-height:1.6;overflow-wrap:anywhere}.cost-plan-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0;padding:16px 0;border-top:1px solid #edf1f6;border-bottom:1px solid #edf1f6}.cost-plan-stats>div+div{border-left:1px solid #e9eef5;padding-left:14px}.cost-plan-stats span{font-size:11px;color:var(--cost-muted);display:block;margin-bottom:8px}.cost-plan-stats strong{font-size:21px;font-weight:600;color:#34445d;font-variant-numeric:tabular-nums}.cost-plan-stats small{font-size:11px;font-weight:400;color:#7b8ba2}
.cost-restrictions{font-size:12px;color:#9a7541;line-height:1.6;margin-bottom:16px}.cost-edit-plan{border:1px solid #d7e3fc;background:#f4f7ff;color:#3564bf;width:100%}.cost-edit-plan:hover{background:#eaf1ff;border-color:#aac4f8}.cost-edit-plan svg:last-child:not(:first-child){margin-left:auto}.cost-edit-plan svg:first-child{margin-right:1px}
.cost-note{display:flex;align-items:flex-start;gap:10px;padding:13px 15px;margin-top:20px;border:1px solid #e2eaf6;border-radius:9px;background:#eef3fc;color:#5b7396}.cost-note p{font-size:12px;line-height:1.8;margin:0}.cost-note svg{width:16px;height:16px;margin-top:3px;color:#7092c6}.cost-note.warn{background:#fff9ee;color:#8c713d;border-color:#f0e5cf}.cost-note.warn svg{color:#b19151}
.cost-actions{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 28px;background:white;border-top:1px solid var(--cost-line);flex:none;box-shadow:0 -4px 12px #24334b03}.cost-actions>div{display:flex;gap:10px;margin-left:auto}.cost-action-hint{font-size:11px;color:#8290a4;display:flex;gap:6px;align-items:center;line-height:1.5}.cost-action-hint svg{width:14px;height:14px}
.cost-modal .field-grid{gap:18px 20px}.cost-modal .field-grid label{position:relative;font-size:12px;font-weight:600;color:#52617a;gap:9px}.cost-modal .field-grid input,.cost-modal .field-grid select{height:42px;border:1px solid #dce4ef;border-radius:8px;background:#fff;color:var(--cost-ink);font-size:13px;padding:0 12px;font-weight:400;outline:0;min-width:0;width:100%}.cost-modal input::placeholder{color:#a2adbd;font-weight:400}.cost-modal input:focus,.cost-modal select:focus{border-color:#7da4f5;box-shadow:0 0 0 3px #edf3ff}.cost-modal button:focus-visible,.cost-modal summary:focus-visible{outline:3px solid #abc7fc;outline-offset:2px}
.cost-fields{grid-template-columns:1fr!important}.cost-input{display:flex;align-items:center;position:relative;font-weight:400}.cost-modal .cost-input input{padding-right:78px;font-variant-numeric:tabular-nums}.cost-unit{position:absolute;right:12px;color:#8a97ab;font-size:12px;pointer-events:none}.cost-field-help{font-size:11px;line-height:1.7;color:#8492a7;margin-top:13px}
.cost-identity{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:20px;padding:14px 17px;background:#edf3ff;border:1px solid #dce7fc;border-radius:9px;font-size:12px;color:#7384a0}.cost-identity-label{color:#4776cb;font-size:11px}.cost-identity strong{color:#34547f;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.cost-identity>span:last-child{margin-left:auto;font-size:11px}
.cost-plan-basics .field-grid{grid-template-columns:minmax(0,1fr) 220px}.cost-plan-basics .cost-card-heading{margin-bottom:18px}.cost-rates-section{margin-top:24px}.cost-rates-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:14px}.cost-rates-heading h3{display:flex;align-items:center;gap:9px}.cost-rates-heading p{font-size:12px;color:var(--cost-muted);line-height:1.6;margin-top:5px}.cost-region-search{display:flex;align-items:center;gap:8px;height:38px;width:190px;flex:none;border:1px solid #dce4ef;border-radius:8px;padding:0 10px;background:white;color:#8c9bb0}.cost-region-search:focus-within{border-color:#7da4f5;box-shadow:0 0 0 3px #edf3ff}.cost-region-search svg{width:16px;height:16px}.cost-region-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;font-size:12px;color:var(--cost-ink)}.cost-region-search input:focus{box-shadow:none}
.cost-modal .shipping-rate-table{max-height:320px;overflow:auto;overscroll-behavior:contain;margin:0;border:1px solid var(--cost-line);border-radius:10px;background:white}.cost-modal .shipping-rate-table .table-wrap{overflow:visible}.cost-modal table{min-width:0;width:100%}.cost-modal .shipping-rate-table table{table-layout:fixed;min-width:580px}.cost-modal th{padding:12px 16px;font-size:12px;font-weight:600;color:#63738b;background:#f0f4fa;border-top:0;border-bottom:1px solid #dfe6f0}.cost-modal .shipping-rate-table th{position:sticky;top:0;z-index:1}.cost-modal th small{font-size:10px;font-weight:400;color:#8c98a9;margin-left:4px}.cost-modal td{padding:10px 16px;font-size:13px;color:#53627a;border-bottom:1px solid #edf1f6;vertical-align:middle;font-variant-numeric:tabular-nums}.cost-modal td strong{color:#3b4c65;font-weight:500}.cost-modal tr[hidden]{display:none}.cost-modal tbody tr:hover{background:#fafcff}
.cost-rate-input{position:relative;max-width:130px}.cost-modal .shipping-rate-table input[type=number]{width:100%;height:34px;padding:0 10px 0 24px;border:1px solid #dce4ef;border-radius:6px;background:#fff;font-size:13px;color:#354760;outline:0;font-variant-numeric:tabular-nums}.cost-rate-input>span{position:absolute;left:10px;top:9px;font-size:12px;color:#8e9bb0;pointer-events:none}.cost-region-empty{text-align:center;font-size:12px;padding:20px;color:#7b8ba2;background:white;border:1px solid var(--cost-line);border-radius:8px;margin-top:12px}
.cost-blocked-toggle{display:inline-flex;align-items:center;gap:9px;position:relative;cursor:pointer;font-size:11px;color:#6f8199;white-space:nowrap}.cost-blocked-toggle input{position:absolute;opacity:0;width:32px;height:20px;margin:0;cursor:pointer}.cost-switch{display:inline-block;width:30px;height:17px;border-radius:9px;background:#ced8e7;position:relative;transition:background .15s;pointer-events:none}.cost-switch:after{content:"";width:13px;height:13px;background:white;border-radius:50%;position:absolute;left:2px;top:2px;box-shadow:0 1px 3px #21395e30;transition:transform .15s}.cost-blocked-toggle.is-blocked{color:#a47432}.cost-blocked-toggle input:checked+.cost-switch{background:#d7a156}.cost-blocked-toggle input:checked+.cost-switch:after{transform:translateX(13px)}.cost-blocked-toggle input:focus-visible+.cost-switch{outline:3px solid #abc7fc;outline-offset:3px}
.cost-order-items{margin-bottom:20px}.cost-order-items .table-wrap{max-height:220px;overflow:auto;border:1px solid var(--cost-line);border-radius:8px}.cost-order-items th{position:sticky;top:0}.cost-order-actual .cost-card-heading{margin-bottom:18px}.cost-required{position:absolute;right:0;top:0;color:#a37d40;font-size:10px;font-weight:400}
.cost-modal .cost-quote{margin:20px 0 0;padding:0;border:1px solid #dfe7f3;border-radius:9px;background:#f8faff;overflow:hidden}.cost-modal .cost-quote>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;padding:14px 16px;margin:0;font-size:12px;color:#5376ac;font-weight:600;cursor:pointer}.cost-quote>summary::-webkit-details-marker{display:none}.cost-quote>summary>span:first-child{display:flex;align-items:center;gap:8px}.cost-quote-chevron{font-size:16px;transition:transform .15s}.cost-quote[open] .cost-quote-chevron{transform:rotate(180deg)}.cost-modal .cost-quote>.field-grid{padding:0 16px 16px;align-items:end}.cost-quote-result{margin:0;padding:12px 16px;background:#eef3fc;color:#6c83a4;font-size:12px;line-height:1.7}.cost-modal .form-error{margin-bottom:18px;border:1px solid #efd6ce;padding:12px 15px;border-radius:8px;outline:none}
@media(max-width:760px){.cost-backdrop{padding:12px}.cost-modal{max-height:calc(100dvh - 24px);border-radius:13px}.cost-modal .modal-head{padding:18px;gap:10px}.cost-head-icon{width:40px;height:40px;border-radius:10px}.cost-head-icon svg{width:22px;height:22px}.cost-modal .modal-head h2{font-size:18px}.cost-modal .modal-title-group p{font-size:11px}.cost-content{padding:18px}.cost-settings-grid{grid-template-columns:1fr;gap:16px}.cost-card{padding:18px}.cost-actions{padding:14px 18px}.cost-action-hint{display:none}.cost-modal .field-grid,.cost-plan-basics .field-grid{grid-template-columns:1fr}.cost-modal .field-grid label.span-2{grid-column:auto}.cost-rates-heading{align-items:flex-start;flex-direction:column}.cost-region-search{width:100%}.cost-identity{align-items:flex-start;gap:8px}.cost-identity>span:last-child{width:100%;margin-left:0}.products-page .panel-head{flex-wrap:wrap;gap:14px}}
.cost-batch-toolbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:14px 16px;margin:0 0 16px;background:#f1f5ff;border:1px solid #dce6fc;border-radius:9px;color:#627491;font-size:12px}.cost-batch-toolbar small{margin-left:auto;font-size:11px;color:#8090a7}.cost-select-label{display:inline-flex;align-items:center;gap:8px;color:#516580;font-size:12px;cursor:pointer;line-height:1.6}.cost-select-label input,.cost-sku-checkbox{width:16px;height:16px;margin:0;accent-color:var(--cost-blue);cursor:pointer;flex:none}.cost-selection-summary strong{color:var(--cost-blue);font-size:14px}.cost-batch-entry{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:var(--cost-blue);color:white;border:1px solid var(--cost-blue);border-radius:7px;height:36px;padding:0 13px;font-size:12px;font-weight:600}.cost-batch-entry svg{width:16px;height:16px}.cost-batch-entry:disabled{opacity:.45;cursor:not-allowed}.cost-product-select{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 12px;background:#fafcff;border-bottom:1px solid #e5ebf4}.cost-select-heading{font-size:11px;white-space:nowrap}.cost-row-selected{background:#eff5ff!important}.cost-batch-field+.cost-batch-field{margin-top:22px;padding-top:20px;border-top:1px solid #edf1f6}.cost-batch-field .cost-select-label{font-size:13px;font-weight:600;color:#52617a}.cost-batch-control{margin-top:10px}.cost-batch-control select,.cost-batch-control input[type=number]{width:100%;height:42px;border:1px solid #dce4ef;border-radius:8px;padding:0 12px;font-size:13px;color:var(--cost-ink);background:#fff}.cost-batch-control input:disabled,.cost-batch-control select:disabled{background:#f5f7fa;color:#9aa5b6;cursor:not-allowed;opacity:1}.cost-batch-field p{font-size:11px;color:#8b98aa;margin-top:8px;line-height:1.7}.cost-batch-field.is-active p{color:#5378bc}.cost-batch-scope{margin-bottom:20px;background:white;border:1px solid var(--cost-line);border-radius:9px;overflow:hidden}.cost-batch-scope summary{padding:12px 16px;cursor:pointer;font-size:12px;color:#607797}.cost-batch-scope ul{list-style:none;margin:0;padding:0 16px 12px;max-height:190px;overflow:auto}.cost-batch-scope li{display:flex;gap:12px;align-items:baseline;padding:10px 0;border-top:1px solid #edf1f6;font-size:12px}.cost-batch-scope li strong{font-size:11px;font-weight:500;color:#45628e;flex:none}.cost-batch-scope li span{flex:1;min-width:0;overflow-wrap:anywhere;color:#68778d}.cost-batch-scope li small{font-size:10px;color:#8b98aa;flex:none}
@media(max-width:760px){.cost-batch-toolbar{gap:12px}.cost-batch-toolbar small{width:100%;margin-left:0}.cost-batch-scope li{flex-wrap:wrap;gap:6px}.cost-batch-scope li small{width:100%}}
@media(prefers-reduced-motion:reduce){.cost-entry,.cost-modal button,.cost-switch,.cost-switch:after,.cost-quote-chevron{transition:none}}

/* Spreadsheet-style SKU cost editor. */
.cost-modal-batch{width:min(1320px,100%)}
.cost-editor-bulk{padding:17px 18px;margin-bottom:18px;background:#fff;border:1px solid var(--cost-line);border-radius:10px}
.cost-editor-bulk-title{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:14px}.cost-editor-bulk-title strong,.cost-editor-heading strong{font-size:14px;color:var(--cost-ink)}.cost-editor-bulk-title span,.cost-editor-heading span{font-size:11px;color:#7b8ba2}
.cost-editor-bulk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.cost-editor-bulk-grid>label{display:block;min-width:0;font-size:11px;font-weight:600;color:#5b6b81}.cost-editor-bulk-grid>label>span{display:block;margin-top:7px}.cost-editor-bulk-grid input,.cost-editor-bulk-grid select{width:100%;min-width:0;height:36px;padding:0 9px;border:1px solid #dce4ef;border-radius:6px;background:#fff;color:var(--cost-ink);font-size:12px}
.cost-editor-bulk-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:14px}.cost-editor-bulk-actions span{color:#7b8ba2;font-size:11px}.cost-modal .cost-editor-bulk-actions button{height:36px;min-width:96px;padding:0 16px;font-size:12px}.cost-modal .cost-editor-bulk-actions button:disabled{opacity:.5;cursor:not-allowed}
.cost-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}.cost-editor-heading>div{display:flex;gap:12px;align-items:baseline}.cost-editor-heading b{color:var(--cost-blue)}.cost-editor-heading input{height:36px;width:235px;max-width:45%;border:1px solid #dce4ef;border-radius:7px;padding:0 10px;font-size:12px}
.cost-editor-status{margin:0 0 10px;padding:9px 12px;border:1px solid #dce6fc;border-radius:7px;background:#f1f5ff;color:#526b96;font-size:12px;line-height:1.5}.cost-editor-table tr.cost-editor-dirty{background:#eef8f3!important}
.cost-editor-table{overflow:auto;max-height:min(49vh,570px);background:#fff;border:1px solid var(--cost-line);border-radius:9px;overscroll-behavior:contain}.cost-modal .cost-editor-table table{min-width:940px;table-layout:fixed}.cost-modal .cost-editor-table th{position:sticky;top:0;z-index:1;padding:11px 10px;white-space:nowrap}.cost-modal .cost-editor-table td{padding:9px 10px}.cost-editor-table th:first-child,.cost-editor-table td:first-child{width:42px;text-align:center}.cost-editor-table th:nth-child(2){width:290px}.cost-editor-table th:nth-child(3),.cost-editor-table th:nth-child(5){width:185px}.cost-editor-table th:nth-child(4),.cost-editor-table th:nth-child(6){width:145px}.cost-editor-table input[type=checkbox]{width:16px;height:16px;accent-color:var(--cost-blue);cursor:pointer}.cost-editor-table input[type=number],.cost-editor-table select{width:100%;min-width:0;height:35px;border:1px solid #dce4ef;border-radius:6px;padding:0 8px;background:#fff;color:var(--cost-ink);font-size:12px}.cost-editor-table input:focus,.cost-editor-table select:focus,.cost-editor-heading input:focus,.cost-editor-bulk-grid input:focus,.cost-editor-bulk-grid select:focus{border-color:#7da4f5;outline:none;box-shadow:0 0 0 3px #edf3ff}.cost-editor-sku strong{display:block;overflow-wrap:anywhere;color:#466693!important;font-size:11px}.cost-editor-sku small{display:block;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7d8da3;font-size:11px}.cost-editor-table tr:has([data-batch-select]:checked){background:#f8faff}
@media(max-width:950px){.cost-editor-bulk-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.cost-editor-bulk-grid{grid-template-columns:1fr}.cost-editor-bulk-actions{align-items:stretch;flex-direction:column}.cost-editor-bulk-actions button{width:100%}.cost-editor-heading{align-items:stretch;flex-direction:column}.cost-editor-heading input{width:100%;max-width:none}}

/* Excel import uses the same cost dialog hierarchy as the SKU editor. */
.cost-modal-import{width:min(920px,100%);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif}
.cost-modal-import .sku-import-template-link{display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto;padding:7px 2px;border:0;background:transparent;color:#2463d7;font-size:13px;font-weight:600;line-height:1.4;text-decoration:underline;text-decoration-color:#8daff0;text-underline-offset:4px;cursor:pointer}
.cost-modal-import .sku-import-template-link svg{width:16px;height:16px}
.cost-modal-import .sku-import-template-link:hover{color:#174ba9;text-decoration-color:currentColor}
.cost-modal-import .cost-content{display:grid;gap:14px;background:#f7f9fc}
.cost-modal-import .cost-card{margin:0;border-color:#e1e7ef;border-radius:10px;box-shadow:0 1px 2px #1b2f4d08}
.cost-modal-import .cost-card h3{display:flex;align-items:center;gap:10px;margin:0 0 10px;font-size:15px;font-weight:650;color:#26364c}
.cost-modal-import .sku-import-template .cost-field-help{margin-bottom:12px}
.sku-import-template-scroll{overflow-x:auto;border:1px solid #dce5f1;border-radius:8px;background:#fff;scrollbar-color:#cbd8e9 transparent}
.sku-import-template-scroll:focus-visible{outline:3px solid #abc7fc;outline-offset:2px}
.sku-import-template-row{display:grid;grid-template-columns:135px 160px 130px 135px 140px 105px 130px 110px 145px;min-width:max-content}
.sku-import-template-row span{display:flex;align-items:center;min-height:36px;padding:8px 10px;border-right:1px solid #e4eaf3;white-space:nowrap;font-size:11px}
.sku-import-template-row span:last-child{border-right:0}
.sku-import-template-head{background:#eef3fa;color:#3e5575;font-weight:600}
.sku-import-template-head b{margin-left:3px;color:#d92d35}
.sku-import-template-hint{border-top:1px solid #dce5f1;color:#8390a1}
.sku-import-template-foot{margin:9px 0 0;color:#72829a;font-size:11px;line-height:1.5}
.sku-import-step{display:grid;place-items:center;width:27px;height:27px;border:1px solid #d5e0ee;border-radius:7px;background:#f4f7fb;color:#42638f;font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}
.cost-modal-import .cost-field-help{margin:0 0 15px;color:#56667b;font-size:12px;line-height:1.75}
.sku-import-file{position:relative;display:flex;align-items:center;gap:14px;width:100%;min-height:86px;padding:16px 18px;border:1px solid #cbd6e5;border-radius:9px;background:#fbfcfe;color:#24364d;cursor:pointer;transition:border-color .18s,background .18s,box-shadow .18s}
.sku-import-file:hover{border-color:#8ba8d2;background:#f7faff;box-shadow:0 2px 9px #23446d0d}
.sku-import-file:focus-within{border-color:#4c78c7;outline:3px solid #dbe8ff;outline-offset:2px}
.sku-import-file.is-selected{border-color:#91b5a5;background:#f8fcfa}
.sku-import-file input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.sku-import-file-icon{display:grid;place-items:center;width:42px;height:42px;flex:none;border:1px solid #dce5f0;border-radius:9px;background:#f0f4fa;color:#4773b1;pointer-events:none}
.sku-import-file-icon svg{width:20px;height:20px}
.sku-import-file-text{display:grid;gap:5px;flex:1;min-width:0;pointer-events:none}
.sku-import-file-text strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#24364d;font-size:14px;font-weight:600}
.sku-import-file-text small{color:#64758c;font-size:12px;font-weight:400}
.sku-import-file-action{display:inline-flex;align-items:center;justify-content:center;min-width:88px;height:35px;padding:0 12px;border:1px solid #c9d7eb;border-radius:7px;background:#fff;color:#315d9d;font-size:12px;font-weight:600;pointer-events:none}
.sku-import-file:hover .sku-import-file-action{border-color:#91acd2;background:#f5f8fd}
.sku-import-upload [data-sku-import-result]{margin-top:11px;color:#56667b;font-size:12px;line-height:1.6}
.sku-import-summary{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;padding:12px 14px;margin:14px 0 0;border:1px solid #cfe8dd;border-radius:8px;background:#f1faf5;color:#35765d;font-size:12px}.sku-import-summary.has-errors{border-color:#edd6d1;background:#fff6f4;color:#9a5047}.sku-import-summary strong{color:inherit}.sku-import-preview{max-height:320px;overflow:auto;margin-top:12px;border:1px solid var(--cost-line);border-radius:8px}.cost-modal .sku-import-preview table{min-width:650px}.sku-import-preview th{position:sticky;top:0;z-index:1}.sku-import-preview td{font-size:11px;overflow-wrap:anywhere}.sku-import-preview td:nth-child(1){width:76px}.sku-import-preview td:nth-child(2){width:230px}.sku-import-preview td:nth-child(3){width:90px}.sku-import-preview td small{display:block;color:#8794a7;margin-top:4px}.sku-import-invalid{background:#fff8f6}
.shipping-import-save-result{margin-top:14px;padding:12px 14px;border:1px solid #e8d4b5;border-radius:8px;background:#fffaf3;color:#70522d;font-size:12px;line-height:1.6}.shipping-import-save-result strong{font-size:13px}.shipping-import-save-result p{margin:5px 0}.shipping-import-save-result ul{max-height:170px;overflow:auto;margin:5px 0 0;padding-left:20px}.shipping-import-save-result li{margin:3px 0;overflow-wrap:anywhere}
.cost-modal-shipping-import{width:min(1120px,100%);color:#293443}
.cost-modal-shipping-import .cost-content{gap:18px}
.cost-modal-shipping-import .cost-card{padding:20px;box-shadow:none}
.cost-modal-shipping-import .cost-card h3{font-size:16px;font-weight:600}
.cost-modal-shipping-import .cost-field-help{margin:0 0 16px;color:#536171;font-size:14px;line-height:1.7}
.cost-modal-shipping-import .sku-import-template .cost-field-help{margin-bottom:0}
.cost-modal-shipping-import .cost-identity{font-size:13px}
.cost-modal-shipping-import .sku-import-file-text strong{font-size:15px}
.cost-modal-shipping-import .sku-import-file-text small,.cost-modal-shipping-import .sku-import-file-action{font-size:13px}
.cost-modal-shipping-import [data-shipping-import-result]{margin-top:12px;color:#536171;font-size:13px;line-height:1.65}
.shipping-import-tabs{display:flex;gap:24px;border-bottom:1px solid var(--cost-line);padding:0 4px;background:transparent}
.shipping-import-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;padding:10px 2px;color:#6a788a;font-size:14px;font-weight:600;cursor:pointer}
.shipping-import-tabs button[aria-selected="true"]{border-bottom-color:#35765d;color:#2f6e56}
.shipping-import-tabs button:focus-visible{outline:2px solid #8fb6a2;outline-offset:3px}
.shipping-import-upload-pane{display:grid;gap:18px}
[data-shipping-pane][hidden],[data-shipping-import-save][hidden]{display:none}
.shipping-history-pane h3 .ghost{margin-left:auto}
.shipping-history-filters{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin:18px 0}
.shipping-history-filters label{display:grid;gap:7px;flex:1;min-width:180px;color:#536171;font-size:13px}
.shipping-history-filters input{width:100%;height:38px;padding:8px 10px;border:1px solid #dce3ed;border-radius:6px;font:inherit;background:#fff;color:#293443}
.shipping-history-table{overflow-x:auto;border:1px solid var(--cost-line);border-radius:8px}
.cost-modal .shipping-history-table table{width:100%;min-width:940px;table-layout:fixed}
.shipping-history-table th,.shipping-history-table td{padding:16px 14px;vertical-align:top;color:#354252;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.shipping-history-table th{padding-top:12px;padding-bottom:12px;background:#f4f6f8;color:#536171;font-weight:600}
.shipping-history-table th:nth-child(1){width:14%}.shipping-history-table th:nth-child(2){width:24%}.shipping-history-table th:nth-child(3){width:20%}.shipping-history-table th:nth-child(4){width:24%}.shipping-history-table th:nth-child(5){width:18%}
.shipping-history-table td strong{font-weight:600;color:#293443}
.shipping-history-table td small{display:block;margin-top:5px;color:#647181;font-size:13px}.shipping-history-table td p{margin:0}
.shipping-history-table time{white-space:nowrap;font-variant-numeric:tabular-nums}
.shipping-history-filename{display:block;margin-top:6px;line-height:1.6;color:#536171}
.shipping-history-store{display:block}.shipping-history-store+.shipping-history-store{margin-top:6px}
.shipping-history-download{display:inline-flex;align-items:center;gap:6px;padding:6px 0;margin-top:7px;border:0;background:transparent;color:#2f6e56;font:inherit;font-weight:500;cursor:pointer}
.shipping-history-download svg{width:15px;height:15px}.shipping-history-download:hover{color:#235340;text-decoration:underline;text-underline-offset:3px}
.shipping-history-download:focus-visible{outline:2px solid #8fb6a2;outline-offset:3px;border-radius:3px}.shipping-history-download:disabled{opacity:.6;cursor:wait}
.shipping-history-table td details{margin-top:8px}.shipping-history-table td summary{cursor:pointer;color:#315d9d}.shipping-history-table td ul{margin:6px 0;padding-left:16px}
.shipping-history-status{display:inline-block;padding:2px 8px;border-radius:4px;background:#edf2f7;color:#5d6c80;font-size:12px;font-weight:500}
.shipping-history-status.complete{background:#eaf5ef;color:#307357}.shipping-history-status.partial{background:#fff2df;color:#996421}.shipping-history-status.not_imported{background:#fff0ed;color:#a85e51}
.shipping-history-amount{display:block;margin-top:10px;font-variant-numeric:tabular-nums;white-space:nowrap}.shipping-history-amount strong{margin-left:5px;font-size:14px}
.shipping-history-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;color:#647181;font-size:13px}
.shipping-history-pagination>div{display:flex;gap:8px}
.shipping-unmatched-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.shipping-unmatched-table table{min-width:780px}.shipping-unmatched-table td{overflow-wrap:anywhere;vertical-align:top}
.shipping-unmatched-table small{display:block;margin-top:6px;white-space:normal}
.shipping-unmatched-table th:nth-child(1),.shipping-unmatched-table td:nth-child(1){width:14%}
.shipping-unmatched-table th:nth-child(2),.shipping-unmatched-table td:nth-child(2){width:27%}
.shipping-unmatched-table th:nth-child(3),.shipping-unmatched-table td:nth-child(3){width:25%}
.shipping-unmatched-table th:nth-child(4),.shipping-unmatched-table td:nth-child(4){width:34%}
.cost-modal-import .primary:disabled{background:#e5eaf1;border-color:#e5eaf1;box-shadow:none;color:#738197;opacity:1;cursor:not-allowed}
@media(max-width:560px){.sku-import-file{gap:10px;padding:12px;min-height:76px}.sku-import-file-icon{width:36px;height:36px}.sku-import-file-action{min-width:0;padding:0 9px}.sku-import-file-text strong{font-size:12px}.sku-import-file-text small{font-size:11px}}
@media(max-width:560px){.cost-modal-import .sku-import-template h3{flex-wrap:wrap}.cost-modal-import .sku-import-template-link{font-size:12px}}
.sku-import-overwrite-note{margin:12px 0 0;padding:10px 12px;border:1px solid #e8d4b5;border-radius:6px;background:#fffaf3;color:#77552d;font-size:12px;line-height:1.5}.sku-import-group{margin-top:14px}.sku-import-group h4{margin:0;color:#344761;font-size:12px;font-weight:600}.sku-import-group h4 span{color:#75869c;font-weight:400}.sku-import-group .sku-import-preview{max-height:185px;margin-top:7px}.sku-import-existing{background:#fffaf3}.cost-modal-import [data-sku-import-save="new"]:disabled{opacity:.5;cursor:not-allowed}

/* Tabbed supplier and shipping lists. */
.cost-manager-tabs{display:flex;gap:24px;border-bottom:1px solid var(--cost-line);margin:-4px 0 18px}
.cost-manager-tabs button{display:inline-flex;align-items:center;gap:7px;border:0;border-bottom:2px solid transparent;background:transparent;color:#68778d;padding:10px 4px 12px;font-size:14px;font-weight:600;cursor:pointer}
.cost-manager-tabs button[aria-selected="true"]{color:var(--cost-blue);border-bottom-color:var(--cost-blue)}
.cost-manager-tabs span{font-size:11px;padding:2px 6px;border-radius:12px;background:#edf2fb}
.cost-manager-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.cost-manager-toolbar p{margin:0;color:var(--cost-muted);font-size:12px}
.cost-list-card .table-wrap,.cost-rate-preview .table-wrap{overflow:auto;border:1px solid var(--cost-line);border-radius:9px}
.cost-list-card table,.cost-rate-preview table{min-width:660px}
.cost-list-card td,.cost-rate-preview td{overflow-wrap:anywhere}
.cost-list-card td:first-child{min-width:130px}
.cost-row-actions{display:flex;gap:6px}
.cost-row-actions .ghost,.cost-edit-rates .ghost{min-height:30px;padding:0 9px;font-size:11px}
.cost-modal .cost-danger{color:#a44747;border-color:#f0d6d6;background:#fff}
.cost-modal .cost-danger:hover{background:#fff4f4}
.cost-default-tag{display:inline-block;margin-left:7px;border-radius:5px;padding:2px 5px;background:#eef4ff;color:#4169b9;font-size:10px}
.cost-rate-preview{margin-top:16px}
.cost-rate-preview h3{margin:0 0 14px}
.cost-supplier-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.cost-default-check{display:flex!important;align-items:center;gap:8px!important}
.cost-modal .cost-default-check input{width:16px;height:16px;accent-color:var(--cost-blue)}
.cost-edit-rates table{min-width:780px;table-layout:auto!important}
.cost-edit-rates td input:not([type=checkbox]){width:100%;min-width:90px;height:34px;border:1px solid #dce4ef;border-radius:6px;padding:0 9px;background:white;color:var(--cost-ink)}
.cost-edit-rates td:first-child input{min-width:130px}
.cost-edit-rates td:last-child{width:74px}
@media(max-width:760px){.cost-manager-toolbar{align-items:flex-start}.cost-manager-toolbar p{line-height:1.5}.cost-manager-toolbar .primary{padding:0 10px}.cost-supplier-fields{grid-template-columns:1fr}}
.expense-delete-backdrop{position:fixed;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(24,39,64,.24)}
.expense-delete-dialog{width:min(460px,100%);max-height:calc(100dvh - 48px);overflow:auto;padding:26px;border:1px solid #e6eaf1;border-radius:14px;background:#fff;color:#24334b;box-shadow:0 22px 70px rgba(21,38,68,.24);outline:none}
.expense-delete-heading{display:flex;gap:14px;align-items:flex-start}.expense-delete-icon{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:50%;background:#fff0ee;color:#c44038;font-size:23px;font-weight:700}
.expense-delete-heading h2{margin:0 0 8px;font-size:17px}.expense-delete-heading p{margin:0;color:#6b788e;font-size:12px;line-height:1.7}
.expense-delete-record{margin:20px 0;padding:14px 16px;border:1px solid #e5eaf2;border-radius:8px;background:#f8faff}.expense-delete-record>div{display:flex;gap:16px;padding:5px 0;font-size:12px;line-height:1.6}.expense-delete-record dt{width:60px;flex:none;color:#7c899c}.expense-delete-record dd{margin:0;flex:1;overflow-wrap:anywhere;color:#35465f}.expense-delete-record dd.expense-delete-amount{font-weight:700;color:#c44038;font-variant-numeric:tabular-nums}
.expense-delete-error{margin:0 0 18px;font-size:12px;line-height:1.6;color:#b73333}
.expense-delete-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:4px}.expense-delete-actions button{min-width:86px;height:36px;padding:0 15px;border-radius:6px;font-size:12px}.expense-delete-submit{border:1px solid #c94038;background:#cf443c;color:#fff;font-weight:600}.expense-delete-submit:hover{background:#b93630}.expense-delete-actions button:disabled{opacity:.55;cursor:wait}
.finance-missing-freight-export{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.finance-missing-freight-export svg{width:15px;height:15px}
.recon-cost-status dl{display:grid;gap:12px;margin:18px 0 0;font-size:12px}
.recon-cost-status dl>div{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.recon-cost-status dt{color:#6b7280;white-space:nowrap}
.recon-cost-status dd{margin:0;text-align:right;color:#334155;overflow-wrap:anywhere}

/* Missing-freight export: selection and real background progress. */
.cost-modal-freight-export{width:min(620px,calc(100vw - 32px))}
.cost-modal-freight-export .modal-body{padding:24px}
.freight-export-scope{display:grid;gap:8px;padding:16px;background:#f2f6ff;border:1px solid #dce6fc;border-radius:8px;margin-bottom:20px;font-size:13px;line-height:1.7}
.freight-export-scope span{color:#64748b}
.freight-export-label,.freight-export-custom{display:grid;gap:8px;margin-bottom:16px;font-weight:600;font-size:14px}
.freight-export-label select,.freight-export-custom input{width:100%;min-height:40px}
.freight-export-custom[hidden],.freight-export-warning[hidden]{display:none}
.freight-export-warning{padding:12px 14px;background:#fff8e8;border:1px solid #f3d69d;border-radius:6px;color:#956318;font-size:13px;line-height:1.7;margin:14px 0}
.freight-export-warning:empty{display:none}
.freight-export-error{color:#b42318;font-size:13px}
.freight-export-progress-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.freight-export-progress-title strong{font-size:17px;color:#253653}
.freight-export-progress-title span{font-size:12px;color:#728097;white-space:nowrap}
.freight-export-progress progress{width:100%;height:12px;accent-color:#2d65df;border:0;border-radius:10px;overflow:hidden}
.freight-export-progress progress::-webkit-progress-bar{background:#eaf0fa;border-radius:10px}
.freight-export-progress progress::-webkit-progress-value{background:#2d65df;border-radius:10px}
.freight-export-progress p{font-size:13px;color:#65748c;line-height:1.8}
.freight-export-progress dl{display:grid;gap:14px;margin:24px 0}
.freight-export-progress dl div{display:flex;justify-content:space-between;gap:12px;font-size:13px}
.freight-export-progress dt{color:#718098}.freight-export-progress dd{margin:0;font-weight:600;color:#283c5b;text-align:right}
.freight-export-download{display:inline-flex;align-items:center;justify-content:center;gap:7px;text-decoration:none;padding:9px 15px;border-radius:5px;background:#2d65df;color:white;font-size:14px}
.freight-export-download svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}
@media(max-width:600px){.cost-modal-freight-export .modal-body{padding:16px}.cost-modal-freight-export .cost-actions{align-items:stretch;gap:12px;flex-direction:column}.cost-modal-freight-export .cost-actions>div{justify-content:flex-end;flex-wrap:wrap}.freight-export-progress-title strong{font-size:15px}.freight-export-progress dl div{gap:8px}}
