#detail:has(.ow-form){width:calc(100% - 48px);max-width:1200px;max-height:94vh;background:#f5f6f8;padding:24px}.ow-order-header{display:flex;justify-content:space-between;gap:18px;align-items:center;background:white;border:1px solid #e2e7ec;border-radius:8px;padding:18px 22px;margin-bottom:16px}.ow-order-header small{display:block;color:#8b959d;margin-top:8px}.ow-order-header>span{font-size:13px;color:#a2622e}.ow-card{padding:24px;background:white;border:1px solid #e2e7ec;border-radius:8px;margin-bottom:18px}.ow-card h3{margin:0 0 20px;font-size:18px}.ow-manual-note{background:#fff7ec;border:1px solid #f5ddbd;border-radius:7px;padding:14px 18px;color:#94652d;font-size:13px}.ow-line{margin:16px 0;border:1px solid #e3e8ed;border-radius:8px;padding:18px}.ow-line legend{font-size:13px;color:#89929b;padding:0 8px}.ow-line-top{display:flex;align-items:start;gap:18px}.ow-line-top>.mg-field{flex:1;min-width:0}.ow-remove{color:#b45c43;white-space:nowrap;font-size:13px;padding-top:28px}.ow-totals{display:flex;gap:24px;justify-content:space-between;flex-wrap:wrap;border-top:1px solid #e8edf0;margin-top:14px;padding:20px 0 0;font-size:14px}.ow-totals strong{font-size:26px;color:#d35d10;margin-left:10px}.ow-totals b{margin-left:8px}.ow-sync-state{color:#8b959b!important;max-width:210px}.ow-crm-bar{background:#fff;border:1px solid #e2e7ec;border-radius:8px;padding:18px 22px;display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:20px}.ow-crm-bar span,.ow-crm-bar small{display:block;font-size:13px;color:#8b959b;margin-top:7px}.ow-crm-bar small{color:#b2603b}.od-progress{overflow-x:auto}.od-progress li{min-width:92px;font-size:12px}.ow-form .pe-save-bar{bottom:-24px}@media(max-width:700px){#detail:has(.ow-form){width:100%;height:100dvh;max-height:100dvh;max-width:100%;margin:0;border-radius:0;padding:16px}.ow-card{padding:16px}.ow-card .mg-form-grid{grid-template-columns:1fr}.ow-line{padding:12px}.ow-line-top{display:block}.ow-remove{padding:0 0 14px}.ow-order-header{padding:14px;display:block}.ow-order-header>span{display:block;margin-top:10px}.ow-form .pe-save-bar{bottom:-16px}.ow-totals{gap:14px}.ow-crm-bar{padding:14px}.od-progress li{min-width:90px}}
/* ---------- 订单状态按钮与状态面板 ---------- */
.ow-status-btn{display:inline-flex;align-items:center;gap:3px;cursor:pointer;border:1px solid transparent;font:inherit;white-space:nowrap;transition:border-color .15s,background .15s}
.ow-status-btn:hover{border-color:#f47721;background:#ffe9d6}
.ow-status-btn:focus-visible{outline:2px solid #f47721;outline-offset:1px}
.ow-status-btn i{font-style:normal;font-size:8px;opacity:.7;margin-left:1px;line-height:1}
.ow-status-pop{position:fixed;z-index:120;width:272px;background:#fff;border:1px solid #e6ebee;border-radius:10px;box-shadow:0 14px 34px rgba(20,32,42,.16);padding:10px;font-size:12px;color:#33434d}
.ow-status-pop header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 4px 9px;border-bottom:1px solid #f0f3f5}
.ow-status-pop header b{font-size:12.5px;display:block}
.ow-status-pop header small{display:block;color:#8b979f;font-size:10.5px;margin-top:2px;overflow-wrap:anywhere}
.ow-status-pop header>span{flex-shrink:0;font-size:10.5px;color:#c25f16;background:#fff3e8;border-radius:4px;padding:2px 6px;white-space:nowrap}
.ow-status-pop-list{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:8px 0 6px;max-height:264px;overflow:auto}
.ow-status-opt{display:flex;align-items:center;justify-content:space-between;gap:4px;border:1px solid transparent;background:#f7f9fa;border-radius:5px;padding:6px 8px;font:inherit;font-size:11.5px;color:#3c4b54;cursor:pointer;text-align:left}
.ow-status-opt:hover{border-color:#f47721;background:#fff6ee;color:#c25f16}
.ow-status-opt.is-on{background:#fff3e8;color:#c25f16;font-weight:500}
.ow-status-opt em{font-style:normal;font-size:9.5px;color:#9aa4ab}
.ow-status-opt.is-on em{color:#c25f16}
.ow-status-pop>p{margin:2px 4px 0;font-size:10.5px;color:#8b979f;line-height:1.5}
@media(max-width:520px){.ow-status-pop{width:calc(100vw - 24px)}.ow-status-pop-list{max-height:min(52vh,320px);overscroll-behavior:contain}}

/* V101 状态面板只列合法下一步；退回项与空态提示 */
.ow-status-pop-list{grid-template-columns:1fr}
.ow-status-opt.is-back{background:#fbf7f3;color:#8a6a4f}
.ow-status-opt.is-back:hover{border-color:#c9a98c;background:#f6efe8;color:#6f5237}
.ow-status-opt.is-back em{color:#ad8b6d}
.ow-status-empty{margin:2px 0 0;font-size:11.5px;line-height:1.6;color:#6b7680;background:#f5f8fa;border-radius:6px;padding:9px 10px}
.ow-status-opt.is-stop{background:#fdf1f0;color:#b42318}
.ow-status-opt.is-stop:hover{border-color:#e0a9a3;background:#fbe7e5;color:#93221a}
.ow-status-opt.is-stop em{color:#c98a84}

/* 订单编辑：付款待审核卡片 */
.ow-pay-review{margin:0 0 14px;padding:12px 14px;border:1px solid #f6c09a;border-radius:8px;background:#fff7f0}
.ow-pay-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.ow-pay-badge{padding:1px 6px;border-radius:4px;background:#fde3cf;color:#b45309;font-size:10.5px;font-weight:600}
.ow-pay-head b{font-size:13px;color:#8a4b1a}
.ow-pay-head small{font-size:11px;color:#9a7b5f}
.ow-pay-file{display:inline-flex;align-items:center;gap:8px;margin-bottom:10px;padding:6px;border:1px solid #f0d9c7;border-radius:6px;background:#fff;text-decoration:none}
.ow-pay-file img{display:block;width:72px;height:72px;border-radius:4px;object-fit:cover;background:#f6f8f9}
.ow-pay-file small{max-width:200px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;color:#6b757d}
.ow-pay-file-pdf span{display:grid;place-items:center;width:44px;height:44px;border-radius:4px;background:#fef3f2;color:#b42318;font-size:11px;font-weight:600}
.ow-pay-file-none{font-size:11px;color:#a5aeb6;background:#f6f8f9;border-color:#e8edf1;padding:6px 8px}
.ow-pay-actions{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.ow-pay-actions .outline{padding:6px 10px;font-size:12px}
.ow-pay-link{font-size:11.5px;color:#d2600f;text-decoration:none}
.ow-pay-link:hover{text-decoration:underline}
.ow-pay-form{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px 14px;align-items:center}
.ow-pay-check{display:flex;align-items:center;gap:6px;font-size:12px;color:#8a4b1a;white-space:nowrap}
.ow-pay-check input{accent-color:#f47721}
.ow-pay-note{display:flex;align-items:center;gap:6px;font-size:11.5px;color:#9a7b5f}
.ow-pay-note input{flex:1;min-width:0;padding:5px 8px;border:1px solid #eed6c2;border-radius:4px;background:#fff;font-size:12px;color:#2f3a44}
.ow-pay-review>.note{margin:8px 0 0}
@media (max-width:760px){.ow-pay-form{grid-template-columns:1fr}.ow-pay-check{white-space:normal}}

/* ===== 订单编辑：四页签 + 商品明细左列表 / 右抽屉 ===== */
#detail:has(.ow-form){width:calc(100% - 40px);max-width:1240px}
.ow-tabs{display:flex;align-items:stretch;gap:2px;background:#fff;border:1px solid #e2e7ec;border-radius:9px;padding:4px;margin-bottom:16px;position:sticky;top:-24px;z-index:6;box-shadow:0 4px 14px rgba(32,45,56,.04)}
.ow-tabs button{flex:0 0 auto;border:0;background:transparent;border-radius:6px;padding:9px 16px;font-size:13px;color:#6b7680;cursor:pointer;white-space:nowrap;display:inline-flex;align-items:center;gap:6px}
.ow-tabs button:hover{background:#f7f9fa;color:#b15e1e}
.ow-tabs button.active{background:#fff3e8;color:#b15e1e;font-weight:600}
.ow-tabs button small{font-size:10.5px;font-weight:400;background:#eef1f3;color:#7c8a93;border-radius:999px;padding:1px 7px}
.ow-tabs button.active small{background:#fde3cf;color:#b15e1e}
.ow-panel[hidden]{display:none}

.ow-items-card{padding:18px}
.ow-items-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:12px}
.ow-items-head h3{margin:0;font-size:17px;display:flex;align-items:center;gap:9px}
.ow-items-head h3 span{font-size:11.5px;font-weight:400;color:#8a939a;background:#f4f6f7;border-radius:999px;padding:2px 8px}
.ow-items-head p{margin:7px 0 0;font-size:12px;color:#8a939a;line-height:1.6}
.ow-items-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.ow-search{display:flex;align-items:center;gap:6px;height:32px;border:1px solid #e4e9ed;border-radius:7px;padding:0 9px;background:#fff;min-width:210px}
.ow-search span{color:#a1aab0}
.ow-search input{border:0;outline:0;background:transparent;font-size:12px;min-width:0;width:100%}
.ow-items-tools select{height:32px;border:1px solid #e4e9ed;border-radius:7px;background:#fff;font-size:12px;color:#5c666d;padding:0 6px}
.ow-items-tools .outline{height:32px;font-size:12px;padding:0 11px}
.ow-check{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:#6b7680;white-space:nowrap;cursor:pointer}
.ow-check input{accent-color:#ff6a00}

.ow-batch{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 10px;background:#fff7ef;border:1px solid #f3d8c2;border-radius:8px;margin-bottom:10px;font-size:11.5px;color:#8a5a31}
.ow-batch[hidden]{display:none}
.ow-batch>b{color:#b15e1e;font-size:12px}
.ow-batch label{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.ow-batch input,.ow-batch select{height:28px;border:1px solid #eed6c2;border-radius:5px;background:#fff;font-size:11.5px;padding:0 6px;color:#3d4a52}
.ow-batch input[type=date]{width:132px}
.ow-batch input[type=number]{width:64px}
.ow-batch .outline{height:28px;font-size:11.5px;padding:0 9px;border-color:#f2d6be;background:#fff;color:#b15e1e}
.ow-batch .outline:hover{background:#ff6a00;border-color:#ff6a00;color:#fff}
.ow-batch-sep{width:1px;height:18px;background:#f0d8c4}
.ow-batch-clear{border:0;background:none;color:#a0896f;font-size:11.5px;cursor:pointer;padding:4px 2px}
.ow-batch-clear:hover{color:#b42318}

.ow-items-split{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:14px;min-height:320px;align-items:start}
.ow-items-split.is-open{grid-template-columns:minmax(0,1fr) 292px}
.ow-items-list{min-width:0;max-height:min(42vh,430px);overflow:auto;border:1px solid #e6eaed;border-radius:8px;background:#fff}
.ow-items-table{width:100%;border-collapse:separate;border-spacing:0;font-size:12px;table-layout:fixed;min-width:780px}
.ow-items-table th{position:sticky;top:0;z-index:2;background:#f7f9fa;color:#7c8a93;font-weight:500;font-size:10.5px;text-align:left;padding:8px 7px;border-bottom:1px solid #e8edf0;white-space:nowrap}
.ow-items-table td{padding:7px;border-bottom:1px solid #f1f4f5;vertical-align:middle;min-width:0}
.ow-items-table tr:last-child td{border-bottom:0}
.ow-items-table th:nth-child(1),.ow-items-table td:nth-child(1){width:30px;padding-left:9px;padding-right:0}
.ow-items-table th:nth-child(2){width:29%}
.ow-items-table th:nth-child(3){width:112px}
.ow-items-table th:nth-child(4){width:66px}
.ow-items-table th:nth-child(5){width:82px}
.ow-items-table th:nth-child(6){width:92px}
.ow-items-table th:nth-child(7){width:94px}
.ow-items-table th:nth-child(8){width:82px}
.ow-items-table th:nth-child(9){width:48px}
.ow-items-table th:nth-child(10){width:90px}
.ow-items-table th:nth-child(11){width:130px}
.ow-items-table .ow-num{text-align:right}
.ow-items-table th.ow-num{text-align:right}
.ow-line-row{cursor:pointer;transition:background .12s}
.ow-line-row:hover{background:#fafcfe}
.ow-line-row.is-selected{background:#f2f7ff}
.ow-line-row.is-active{background:#fff7ef;box-shadow:inset 3px 0 #ff6a00}
.ow-line-row.is-overdue{box-shadow:inset 2px 0 #d4553f}
.ow-line-row.is-active.is-overdue{box-shadow:inset 3px 0 #ff6a00,inset 6px 0 #d4553f}
.ow-line-row.is-cancelled td{opacity:.55}
.ow-pick-col{text-align:center}
.ow-pick-col input{accent-color:#ff6a00;cursor:pointer}
.ow-prod{min-width:0}
.ow-prod b{display:block;font-weight:600;color:#2e3435;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
.ow-prod small{display:block;margin-top:2px;font-size:10.5px;color:#8a939a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ow-sku{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:10.5px;color:#5c666d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ow-qty-input,.ow-price-input{width:100%;max-width:76px;height:28px;border:1px solid #e0e5e8;border-radius:5px;padding:0 5px;font-size:11.5px;text-align:right;font-variant-numeric:tabular-nums;background:#fff;color:#2e3435}
.ow-qty-input{max-width:56px}
.ow-qty-input:focus,.ow-price-input:focus{border-color:#ff9a52;outline:2px solid #ffe4cf}
.ow-qty-input:disabled{background:#f6f8f9;color:#9aa5ad;cursor:not-allowed}
.ow-amount{font-variant-numeric:tabular-nums;font-weight:600;color:#2e3435;white-space:nowrap}
.ow-date{white-space:nowrap;font-variant-numeric:tabular-nums;color:#5c666d;font-size:11.5px}
.ow-date small{display:block;font-size:10px;color:#b42318;margin-top:1px}
.ow-date.is-overdue{color:#b42318;font-weight:600}
.ow-shipped{color:#5c666d;font-variant-numeric:tabular-nums}
.ow-brand-cell,.ow-req-cell{font-size:11px;color:#6b7680;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ow-chip{display:inline-block;font-size:10.5px;line-height:1;padding:4px 7px;border-radius:999px;background:#f4f6f7;color:#6b7680;white-space:nowrap}
.ow-chip.shipped{background:#eef7f2;color:#36735e}
.ow-chip.preparing{background:#fff6e8;color:#a35700}
.ow-chip.unshipped{background:#eef4ff;color:#3b5bdb}
.ow-chip.cancelled{background:#f4f6f7;color:#9aa5ad;text-decoration:line-through}
.ow-group-row td{background:#f8fafb;border-bottom:1px solid #e8edf0;padding:6px 9px}
.ow-group-btn{display:flex;align-items:center;gap:7px;width:100%;border:0;background:none;padding:0;cursor:pointer;font:inherit;color:#3d4a52;text-align:left}
.ow-group-btn i{font-style:normal;font-size:10px;color:#8a939a;width:10px}
.ow-group-btn b{font-size:11.5px;font-weight:600}
.ow-group-btn small{font-size:10.5px;color:#8a939a}
.ow-group-btn em{margin-left:auto;font-style:normal;font-size:11px;color:#b15e1e;font-variant-numeric:tabular-nums}
.ow-items-empty{padding:40px 12px;text-align:center;font-size:12px;color:#a1aab0}
.ow-items-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;font-size:11.5px;color:#8a939a;flex-wrap:wrap}
.ow-pager{display:flex;align-items:center;gap:9px}
.ow-pager .outline{height:28px;font-size:11.5px;padding:0 10px}
.ow-pager .outline:disabled{opacity:.45;cursor:not-allowed}
.ow-pager span{font-variant-numeric:tabular-nums;color:#6b7680}

.ow-drawer{display:flex;flex-direction:column;min-width:0;max-height:min(42vh,430px);border:1px solid #e3e8ed;border-radius:8px;background:#fff;overflow:hidden}
.ow-drawer[hidden]{display:none}
.ow-drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:10px 12px;border-bottom:1px solid #eef1f3;background:#fbfcfd}
.ow-drawer-head b{display:block;font-size:12.5px}
.ow-drawer-head small{display:block;font-size:10.5px;color:#8a939a;margin-top:2px}
.ow-drawer-head-actions{display:flex;align-items:center;gap:6px;flex:none}
.ow-head-del{border:0;background:none;color:#b42318;font-size:10.5px;cursor:pointer;padding:4px 2px;white-space:nowrap}
.ow-head-del:disabled{color:#b9c1c7;cursor:not-allowed}
.ow-head-done{height:26px;font-size:11px;padding:0 10px;border-radius:5px}
.ow-drawer-x{border:0;background:none;font-size:18px;line-height:1;color:#9aa5ad;cursor:pointer;padding:0 2px}
.ow-drawer-x:hover{color:#b42318}
.ow-drawer-body{padding:10px 12px 12px;overflow:auto;display:flex;flex-direction:column;gap:8px;min-height:0}
.ow-source{display:flex;align-items:center;gap:6px;background:#f7f9fa;border:1px solid #eef1f3;border-radius:6px;padding:6px 8px;font-size:10.5px;color:#8a939a}
.ow-source b{color:#3d4a52;font-size:11px}
.ow-source em{font-style:normal;margin-left:auto;font-size:9.5px;color:#a1aab0;background:#fff;border-radius:4px;padding:2px 5px}
.ow-ro{background:#fbfcfd;border:1px solid #f0f3f5;border-radius:6px;padding:6px 8px;min-width:0}
.ow-ro span{display:block;font-size:10px;color:#a1aab0;margin-bottom:2px}
.ow-ro b{display:block;font-size:11.5px;color:#3d4a52;font-weight:600;line-height:1.45;overflow-wrap:anywhere}
.ow-ro em{display:block;font-style:normal;font-size:9.5px;color:#a1aab0;margin-top:2px;line-height:1.4}
.ow-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:10.5px!important}
.ow-product-ro b{font-size:12px}
.ow-product-ro em{font-size:10px;color:#8a939a;line-height:1.5}
.ow-product-ro em .ow-mono{font-size:10px!important;color:#5c666d}
.ow-f{display:flex;flex-direction:column;gap:3px;font-size:10.5px;color:#8a939a;min-width:0}
.ow-f input,.ow-f select,.ow-f textarea{width:100%;border:1px solid #e0e5e8;border-radius:5px;background:#fff;font-size:11.5px;color:#2e3435;padding:5px 7px;min-width:0}
.ow-f input,.ow-f select{height:29px}
.ow-f textarea{resize:vertical;min-height:54px;line-height:1.5}
.ow-f input:focus,.ow-f select:focus,.ow-f textarea:focus{border-color:#ff9a52;outline:2px solid #ffe4cf}
.ow-f select:disabled{background:#f6f8f9;color:#9aa5ad}
.ow-f-full{grid-column:1/-1}
.ow-grid2{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.ow-auto b{font-variant-numeric:tabular-nums;color:#b15e1e}
.ow-drawer-note{margin:2px 0 0;font-size:10px;line-height:1.5;color:#a1aab0;background:#fafbfc;border-radius:5px;padding:6px 7px}
.ow-drawer-foot{display:flex;align-items:center;gap:8px;padding:9px 12px;border-top:1px solid #eef1f3;background:#fff}
.ow-drawer-foot .ow-del{border:0;background:none;color:#b42318;font-size:11.5px;cursor:pointer;padding:6px 0;margin-right:auto}
.ow-drawer-foot .ow-del:disabled{color:#b9c1c7;cursor:not-allowed}
.ow-drawer-foot .primary{height:32px;font-size:12px;padding:0 16px}
.ow-save-bar .ow-reason{display:flex;align-items:center;gap:6px;font-size:11.5px;color:#8a939a;white-space:nowrap}
.ow-save-bar .ow-reason input{height:30px;width:210px;border:1px solid #e0e5e8;border-radius:5px;padding:0 8px;font-size:12px;color:#2e3435}
.ow-ship-table-wrap{overflow:auto}
.ow-ship-table{width:100%;border-collapse:collapse;font-size:12px}
.ow-ship-table th{background:#f7f9fa;color:#7c8a93;font-weight:500;font-size:10.5px;text-align:left;padding:8px 9px;border-bottom:1px solid #e8edf0;white-space:nowrap}
.ow-ship-table td{padding:8px 9px;border-bottom:1px solid #f1f4f5;vertical-align:middle}
.ow-ship-table td b{display:block;font-weight:600;color:#2e3435}
.ow-ship-table td small{display:block;font-size:10.5px;color:#8a939a;margin-top:2px}
@media(max-width:1080px){
  .ow-items-split.is-open{grid-template-columns:minmax(0,1fr)}
  .ow-items-split.is-open .ow-drawer{position:absolute;right:0;top:0;bottom:0;width:min(320px,92%);max-height:none;z-index:5;box-shadow:-10px 0 28px rgba(23,35,45,.16);border-radius:8px}
}
@media(max-width:760px){
  #detail:has(.ow-form){width:100%;max-width:100%;padding:14px}
  .ow-tabs{top:-14px;overflow-x:auto}
  .ow-tabs button{padding:8px 12px;font-size:12px}
  .ow-items-card{padding:12px}
  .ow-items-head{display:block}
  .ow-items-tools{margin-top:10px;justify-content:flex-start}
  .ow-search{min-width:0;flex:1 1 100%}
  .ow-items-list{max-height:52vh}
  .ow-items-table{min-width:760px}
  .ow-items-split.is-open .ow-drawer{width:100%;left:0}
  .ow-save-bar .ow-reason{width:100%;white-space:normal}
  .ow-save-bar .ow-reason input{flex:1;width:auto;min-width:0}
}

