/* 发货台账 v3 · 2026-10-16
   #shipLedger 是台账独有根节点；两个 ID 优先于全站纸面皮肤。
   其余子视图沿用原样式，数据计算与事件入口保留。 */
#view:has(#shipLedger){min-width:0!important;overflow:hidden;display:flex;flex-direction:column}
#view #shipLedger {
  --sl-bg:#f3f5f8;--sl-paper:#fff;--sl-ink:#203149;--sl-muted:#69788e;
  --sl-line:#e2e7ee;--sl-soft:#f6f8fb;--sl-blue:#2359b5;--sl-green:#087c66;
  height:100%;min-height:0;margin:0;padding:0 0 4px;gap:12px;flex:1 1 0%;overflow:hidden;
  background:transparent;color:var(--sl-ink);
}
#view #shipLedger .sl-header{display:flex;justify-content:space-between;align-items:center;gap:24px;min-height:72px;padding:0 4px;flex-shrink:0}
#view #shipLedger .sl-eyebrow{font-size:10px;letter-spacing:2px;color:var(--sl-muted);font-weight:650;margin-bottom:6px}
#view #shipLedger .sl-header h1{display:flex;align-items:center;gap:18px;font-size:25px;line-height:1.3;margin:0;color:var(--sl-ink);letter-spacing:.4px;font-weight:750}
#view #shipLedger .sl-header h1 span{padding-left:18px;border-left:1px solid #ccd5e1;font-size:12px;letter-spacing:0;color:var(--sl-muted);font-weight:400}
#view #shipLedger .sl-summary{display:flex;gap:28px;align-items:center}
#view #shipLedger .sl-summary>div{display:grid;grid-template-columns:auto auto;column-gap:12px;align-items:baseline;padding-left:24px;border-left:1px solid var(--sl-line)}
#view #shipLedger .sl-summary span{font-size:12px;color:var(--sl-muted)}
#view #shipLedger .sl-summary strong{color:var(--sl-green);font-size:25px;line-height:1.2;font-weight:750;font-variant-numeric:tabular-nums}
#view #shipLedger .sl-summary small{font-size:14px;margin-left:2px}
#view #shipLedger .sl-summary em{grid-column:1/-1;font-style:normal;font-size:10px;color:var(--sl-muted);text-align:right;margin-top:4px}
/* 六项指标共用一个基线；仅总量用深色强调，颜色只提示业务状态。 */
#view #shipLedger .sl-metrics{display:grid;grid-template-columns:1.05fr 1fr 1fr .85fr 1.15fr 1.25fr;flex-shrink:0;border:1px solid var(--sl-line);border-radius:12px;background:var(--sl-paper);overflow:hidden;box-shadow:0 3px 12px rgba(27,43,67,.025)}
#view #shipLedger .sl-metric{position:relative;min-width:0;padding:16px 20px 14px;min-height:112px;box-sizing:border-box;background:var(--sl-paper)}
#view #shipLedger .sl-metric+.sl-metric:before{content:"";position:absolute;left:0;top:20px;bottom:20px;width:1px;background:var(--sl-line)}
#view #shipLedger .sl-metric-label{font-size:12px;font-weight:550;color:var(--sl-muted);line-height:18px}
#view #shipLedger .sl-metric-number{font-size:32px;font-weight:750;line-height:1.15;margin:6px 0 7px;color:var(--sl-ink);font-variant-numeric:tabular-nums;letter-spacing:-.6px;white-space:nowrap}
#view #shipLedger .sl-metric-number span{font-size:11px;color:var(--sl-muted);font-weight:400;margin-left:7px;letter-spacing:0}
#view #shipLedger .sl-metric-note{font-size:10px;line-height:16px;color:var(--sl-muted);white-space:nowrap}
#view #shipLedger .sl-metric-0{background:#203b60}
#view #shipLedger .sl-metric-0 .sl-metric-label,#view #shipLedger .sl-metric-0 .sl-metric-note,#view #shipLedger .sl-metric-0 .sl-metric-number span{color:#c2d0e3}
#view #shipLedger .sl-metric-0 .sl-metric-number{color:#fff}
#view #shipLedger .sl-metric-1:before{display:none}
#view #shipLedger .sl-metric-1 .sl-metric-number{color:var(--sl-green)}
#view #shipLedger .sl-metric-5 .sl-metric-number{color:#b6464f}
#view #shipLedger .sl-delta{position:absolute;right:16px;top:18px;font-size:10px;line-height:16px;color:var(--sl-muted)}
#view #shipLedger .sl-delta.up-good{color:#087c66}
#view #shipLedger .sl-delta.up-bad{color:#b6464f}
#view #shipLedger .sl-metric-0 .sl-delta{color:#b9e7dc}
/* 导航 / 统计口径 / 检索分行，边界与表格连为一个工作区。 */
#view #shipLedger .sp-actionbar{position:relative;top:auto;flex-shrink:0;margin:0 0 -12px;padding:0;gap:0;border:1px solid var(--sl-line);border-bottom:0;border-radius:12px 12px 0 0;background:var(--sl-paper);box-shadow:none;backdrop-filter:none;overflow:visible}
#view #shipLedger .sp-actionbar:before{display:none}
#view #shipLedger .sp-ab-row{min-height:48px;margin:0;padding:0 16px;gap:16px;box-sizing:border-box}
#view #shipLedger .sp-ab-row:first-child{border-bottom:1px solid var(--sl-line)}
#view #shipLedger .sp-ab-row:first-child>.sp-ab-left>.sp-seg{border:0;border-radius:0;background:transparent!important;padding:0;gap:24px;align-self:stretch}
#view #shipLedger .sp-ab-row:first-child>.sp-ab-left{align-self:stretch;align-items:stretch}
#view #shipLedger .sp-seg-item[data-shipview]{position:relative;padding:15px 0 13px;border-radius:0;font-size:13px;color:var(--sl-muted);font-weight:550;background:transparent;box-shadow:none}
#view #shipLedger .sp-seg-item[data-shipview].active{background:transparent!important;color:var(--sl-blue)!important;box-shadow:none!important;font-weight:750}
#view #shipLedger .sp-seg-item[data-shipview].active:after{content:"";position:absolute;bottom:0;left:0;right:0;height:3px;background:var(--sl-blue);border-radius:2px 2px 0 0}
#view #shipLedger .sp-seg-item .n{font-size:10px;padding:1px 5px;border-radius:4px;background:var(--sl-soft);color:var(--sl-muted);opacity:1}
#view #shipLedger .sp-ab-actions{gap:8px}
#view #shipLedger .sp-btn{font-size:12px;line-height:18px;min-height:32px;padding:6px 12px;border-radius:6px;font-weight:550;box-shadow:none}
#view #shipLedger .sp-btn.primary{background:var(--sl-blue)!important;border-color:var(--sl-blue)!important;color:#fff!important;box-shadow:0 2px 5px rgba(35,89,181,.14)}
#view #shipLedger .sp-btn.ghost{background:var(--sl-paper)!important;color:var(--sl-muted)!important;border-color:#d6dde7!important}
#view #shipLedger .sl-scope{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:8px 16px;background:var(--sl-soft);border-bottom:1px solid var(--sl-line);min-height:42px;box-sizing:border-box}
#view #shipLedger .sp-range{gap:9px}
#view #shipLedger .sp-range-lb{color:var(--sl-muted);font-size:11px}
#view #shipLedger .sp-range-tip{color:var(--sl-muted);font-size:10px}
#view #shipLedger .sp-range .sp-seg{padding:2px;gap:1px;background:#e9edf3;border:0;border-radius:6px}
#view #shipLedger .sp-range .sp-seg-item{padding:4px 11px;border-radius:4px;font-size:11px;color:var(--sl-muted);font-weight:500}
#view #shipLedger .sp-range .sp-seg-item.active{color:var(--sl-blue)!important;background:var(--sl-paper)!important;box-shadow:0 1px 3px #cbd4e3!important;font-weight:650}
#view #shipLedger .sp-ab-row2{border:0;min-height:54px;padding:10px 16px;gap:16px}
#view #shipLedger .sp-tabs{gap:4px}
#view #shipLedger .sp-tab{padding:5px 10px;border:1px solid transparent;border-radius:5px;font-size:11px;color:var(--sl-muted);background:transparent}
#view #shipLedger .sp-tab.active{color:var(--sl-blue);background:#edf3fc;border-color:#d7e4f8}
#view #shipLedger .sp-quick{padding-left:12px;margin:0;gap:6px;border-left:1px solid var(--sl-line)}
#view #shipLedger .sp-qchip{padding:5px 8px;border:1px solid var(--sl-line);border-radius:5px;font-size:11px;background:var(--sl-paper);color:var(--sl-muted);font-weight:400}
#view #shipLedger .sp-qchip.on{background:#edf3fc;border-color:#9ebce8;color:var(--sl-blue)}
#view #shipLedger .sp-search-row{flex:1;min-width:300px;gap:8px}
#view #shipLedger .sp-search{min-height:32px;height:32px;padding:6px 11px;border:1px solid #d6dde7;border-radius:6px;color:var(--sl-ink);font-size:12px;background:var(--sl-paper)}
#view #shipLedger .sp-search:focus{border-color:#719bd5;box-shadow:0 0 0 3px rgba(35,89,181,.08);outline:none}
#view #shipLedger .sp-search::placeholder{color:#8a96a6}
/* 明细用横向节奏读表；弱化竖线，订单号、异常周期保留识别度。 */
#view #shipLedger .sp-panel{min-height:0!important;flex:1 1 0%!important;margin:0;border:1px solid var(--sl-line);border-radius:0 0 12px 12px!important;background:var(--sl-paper);box-shadow:0 4px 12px rgba(27,43,67,.025);overflow:hidden}
#view #shipLedger .sp-tbl-wrap{flex:1 1 0%!important;height:0!important;min-height:0!important;max-height:none;overflow:auto!important;border-radius:0!important}
#view #shipLedger .sp-table-fixed{min-width:1260px}
#view #shipLedger .sp-table-fixed thead th{height:40px;padding:0 12px;color:#5e6e84!important;background:#f0f3f7!important;border-bottom:1px solid #dfe5ed;font-size:11px;font-weight:600;letter-spacing:0}
#view #shipLedger .sp-table-fixed .sp-th-seq,#view #shipLedger .sp-table-fixed thead th:nth-child(11),#view #shipLedger .sp-table-fixed thead th:nth-child(12){text-align:center!important}
#view #shipLedger .sp-table-fixed tbody td{height:44px;padding:0 12px;background:transparent;color:#40516a!important;border-bottom:1px solid #edf0f4;font-size:12px;line-height:1.4;white-space:nowrap!important}
#view #shipLedger .sp-table-fixed th+th,#view #shipLedger .sp-table-fixed td+td{border-left:0!important}
#view #shipLedger .sp-table-fixed tbody tr{background:var(--sl-paper);box-shadow:none}
#view #shipLedger .sp-table-fixed tbody tr:nth-child(even){background:#fafbfd}
#view #shipLedger .sp-table-fixed tbody tr:hover{background:#f0f5fc;box-shadow:none}
#view #shipLedger .sp-table-fixed .sp-cell-seq{padding:0;color:#8793a4!important;font-size:10px}
#view #shipLedger .sp-cell-oid b{color:#254d85!important;font-size:12px;font-weight:650;letter-spacing:.1px}
#view #shipLedger .sp-table-fixed thead th:nth-child(9),#view #shipLedger .sp-table-fixed thead th:nth-child(10),#view #shipLedger .sp-table-fixed .sp-cyc-cell,#view #shipLedger .sp-table-fixed .sp-cell-note{text-align:center!important}
#view #shipLedger .sp-table-fixed .sp-cyc-cell{padding-right:0;font-variant-numeric:tabular-nums}
#view #shipLedger .sp-table-fixed .sp-cell-st,#view #shipLedger .sp-table-fixed .sp-cell-ops{text-align:center}
#view #shipLedger .sp-cell-time{font-size:11px!important;color:#69788e!important;font-variant-numeric:tabular-nums}
#view #shipLedger .sp-table-fixed .sp-cell-cust{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
#view #shipLedger .sp-cell-ops .sp-btn{min-height:26px;padding:3px 7px;font-size:11px;border:0;background:transparent!important;color:#56708e!important;box-shadow:none}
#view #shipLedger .sp-cell-ops .sp-btn:hover{background:#e7eef8!important;color:var(--sl-blue)!important}
#view #shipLedger .sp-cell-ops .sp-btn.red{color:#a96066!important}
#view #shipLedger .sp-badge{font-size:10px;border-radius:4px;padding:3px 7px;font-weight:550}
#view #shipLedger .sp-badge.bio{background:#eaf5f0;color:#21725c}
#view #shipLedger .sp-badge.amber{background:#fff3de;color:#966015}
#view #shipLedger .sp-tag{font-size:10px;padding:2px 5px;border-radius:4px}
#view #shipLedger col.c-seq{width:3%}#view #shipLedger col.c-oid{width:12.5%}#view #shipLedger col.c-cust{width:13.5%}
#view #shipLedger col.c-puri{width:8.5%}#view #shipLedger col.c-p{width:7.5%}#view #shipLedger col.c-time{width:10%}
#view #shipLedger col.c-cyc{width:6%}#view #shipLedger col.c-note{width:8%}#view #shipLedger col.c-st{width:6%}#view #shipLedger col.c-ops{width:10%}
@media(max-width:1500px){
  #view #shipLedger .sl-metric{padding:16px 14px 14px}
  #view #shipLedger .sl-delta{position:static;font-size:10px;line-height:14px;margin-top:3px}
  #view #shipLedger .sl-metric-note{font-size:10px;white-space:normal;line-height:14px}
  #view #shipLedger .sp-ab-row2{flex-wrap:wrap}
  #view #shipLedger .sp-search-row{min-width:330px}
}
@media(max-width:1000px){
  #view #shipLedger .sl-header{flex-wrap:wrap}
  #view #shipLedger .sl-metrics{grid-template-columns:repeat(3,1fr)}
  #view #shipLedger .sl-summary{gap:16px}
  #view #shipLedger .sp-ab-row:first-child{flex-wrap:wrap;padding-bottom:8px}
}
html[data-theme="dark"] #view #shipLedger{--sl-paper:#182638;--sl-ink:#d7e2f1;--sl-muted:#a4b3c7;--sl-line:#304155;--sl-soft:#203044;--sl-blue:#8ab5f1;--sl-green:#78cfb4}
html[data-theme="dark"] #view #shipLedger .sp-table-fixed thead th{background:#203044!important;color:#becfe3!important}
html[data-theme="dark"] #view #shipLedger .sp-table-fixed tbody td{color:#c0cfe0!important;border-color:#2a394c}
html[data-theme="dark"] #view #shipLedger .sp-table-fixed tbody tr:nth-child(even){background:#1c2b3d}
html[data-theme="dark"] #view #shipLedger .sp-table-fixed tbody tr:hover{background:#273b54}
html[data-theme="dark"] #view #shipLedger .sp-cell-oid b{color:#a9c9f7!important}
html[data-theme="dark"] #view #shipLedger .sp-btn.primary{background:#3466ad!important;color:#fff!important}

/* ★ 2026-10-17：顶部两项交付 KPI 收窄，把释放的表格列宽优先给客户单位。 */
#view #shipLedger .sl-summary{gap:12px}
#view #shipLedger .sl-summary>div{
  grid-template-columns:minmax(0,1fr) auto;column-gap:6px;min-width:132px;box-sizing:border-box;padding-left:12px
}
#view #shipLedger .sl-summary span{font-size:11px}
#view #shipLedger .sl-summary strong{font-size:22px}
#view #shipLedger .sl-summary small{font-size:12px}
#view #shipLedger .sl-summary em{font-size:9px}
#view #shipLedger .sl-header{min-height:56px}
#view #shipLedger .sl-eyebrow{margin-bottom:3px}
#view #shipLedger .sl-summary em{margin-top:2px;line-height:1.1}
#view #shipLedger .sl-metric{min-height:84px;padding:9px 16px 8px}
#view #shipLedger .sl-metric+.sl-metric:before{top:14px;bottom:14px}
#view #shipLedger .sl-metric-label{font-size:11px;line-height:15px}
#view #shipLedger .sl-metric-number{font-size:28px;line-height:1.1;margin:3px 0}
#view #shipLedger .sl-metric-number span{font-size:10px;margin-left:5px}
#view #shipLedger .sl-metric-note{font-size:9px;line-height:13px}
#view #shipLedger .sl-delta{top:10px;right:12px}
#view #shipLedger col.c-seq{width:2.5%}
#view #shipLedger col.c-cust{width:17.5%}
#view #shipLedger col.c-p{width:7%}
#view #shipLedger col.c-ops{width:8.5%}
