/* T-0158 销售报表（客户销售统计 / 货品销售统计 / 销售明细 / 毛利分析）独立样式。
   CSP style-src 'self'：不使用行内样式，列宽统一用 colgroup + 本文件选择器。 */
.srp-page{min-width:0;padding:var(--sp-8) 0 var(--sp-12)}
.srp-query{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--sp-8) var(--sp-12);padding:var(--sp-12) var(--sp-16) var(--sp-4)}
.srp-query label{display:flex;flex-direction:column;gap:var(--sp-4);min-width:0;font-size:var(--fs-body);color:var(--text)}
.srp-query input,.srp-query select{height:30px;min-width:0;width:100%;border:1px solid var(--line);border-radius:var(--radius);padding:0 var(--sp-8);font-size:var(--fs-body);background:var(--surface);color:var(--text)}
.srp-toolbar{display:flex;justify-content:flex-end;gap:var(--sp-8);padding:var(--sp-8) var(--sp-16) var(--sp-4);flex-wrap:wrap}
.srp-toolbar button{height:30px;padding:0 var(--sp-12);border-radius:var(--radius);border:1px solid var(--line);background:var(--surface);color:var(--brand-strong);}
.srp-toolbar button.primary{background:var(--action-fill);border-color:var(--brand);color:var(--on-action)}
.srp-toolbar button:disabled{opacity:.55;cursor:not-allowed}
.srp-group-bar{margin:0 var(--sp-16) var(--sp-4);padding:0 var(--sp-8);height:28px;line-height:var(--lh);border:1px dashed var(--line);border-radius:var(--radius);background:var(--bg);color:var(--text-2);font-size:var(--fs-body)}
.srp-table{margin:0 var(--sp-16);border:1px solid var(--line);border-radius:var(--radius);overflow:auto;max-height:calc(100vh - 350px);background:var(--surface)}
.srp-table table{width:100%;border-collapse:collapse;table-layout:fixed}
.srp-table thead th{position:sticky;top:0;z-index:2;height:34px;padding:0 var(--sp-8);background:var(--brand-soft);color:var(--text);font-weight:700;text-align:left;white-space:nowrap;border-bottom:1px solid var(--line)}
.srp-table td{height:32px;padding:0 var(--sp-8);color:var(--text);border-bottom:1px solid var(--line);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.srp-table tbody tr:nth-child(even){background:var(--bg)}
.srp-table tbody tr:hover{background:var(--bg)}
.srp-table .num,.srp-table th.num{text-align:right;font-variant-numeric:tabular-nums}
.srp-table tfoot td{position:sticky;bottom:0;height:32px;padding:0 var(--sp-8);background:var(--bg);border-top:1px solid var(--line);font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.srp-table tfoot td.num{text-align:right;font-variant-numeric:tabular-nums}
.srp-table tr.srp-missing-row td{color:var(--text-2)}
.srp-sort{border:0;background:transparent;padding:0;margin:0;font:inherit;font-weight:700;color:var(--text);cursor:pointer}
.srp-sort:hover{color:var(--text-2)}
.srp-empty{padding:var(--sp-32) 0;text-align:center;color:var(--text-2);font-size:var(--fs-sm)}
.srp-msg{margin:var(--sp-4) var(--sp-16) 0;min-height:16px;font-size:var(--fs-body);color:var(--warn-text)}
.srp-pager{display:flex;justify-content:flex-end;align-items:center;gap:var(--sp-8);margin:var(--sp-8) var(--sp-16) 0;font-size:var(--fs-body);color:var(--text);flex-wrap:wrap}
.srp-pager button{height:28px;padding:0 var(--sp-8);border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--brand-strong);}
.srp-pager button:disabled{opacity:.5;cursor:not-allowed}
.srp-pager input{width:54px;height:28px;border:1px solid var(--line);border-radius:var(--radius);text-align:center;font-size:var(--fs-body)}
.srp-pager .srp-size{display:flex;align-items:center;gap:var(--sp-4);flex:0 0 auto;font-size:var(--fs-body);color:var(--text)}
.srp-pager .srp-size button{height:26px;min-width:34px;padding:0 var(--sp-4);}
.srp-pager .srp-size button.on{background:var(--action-fill);border-color:var(--brand);color:var(--on-action)}
.srp-tag{display:inline-block;height:20px;line-height:var(--lh);padding:0 var(--sp-4);border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);color:var(--text);font-size:var(--fs-body)}
.srp-tag.warn{background:var(--warn-soft);border-color:var(--warn);color:var(--warn-text)}
.srp-tag.bad{background:var(--danger-soft);border-color:var(--danger);color:var(--danger-text)}

/* 列宽 */
.srp-table table.srp-customer col:nth-child(1){width:24%}
.srp-table table.srp-customer col:nth-child(2){width:8%}
.srp-table table.srp-customer col:nth-child(3){width:12%}
.srp-table table.srp-customer col:nth-child(4){width:16%}
.srp-table table.srp-customer col:nth-child(5){width:14%}
.srp-table table.srp-customer col:nth-child(6){width:14%}
.srp-table table.srp-customer col:nth-child(7){width:12%}

.srp-table table.srp-product col:nth-child(1){width:12%}
.srp-table table.srp-product col:nth-child(2){width:20%}
.srp-table table.srp-product col:nth-child(3){width:15%}
.srp-table table.srp-product col:nth-child(4){width:5%}
.srp-table table.srp-product col:nth-child(5){width:9%}
.srp-table table.srp-product col:nth-child(6){width:14%}
.srp-table table.srp-product col:nth-child(7){width:10%}
.srp-table table.srp-product col:nth-child(8){width:9%}
.srp-table table.srp-product col:nth-child(9){width:6%}

.srp-table table.srp-product-group col:nth-child(1){width:24%}
.srp-table table.srp-product-group col:nth-child(2){width:10%}
.srp-table table.srp-product-group col:nth-child(3){width:12%}
.srp-table table.srp-product-group col:nth-child(4){width:22%}
.srp-table table.srp-product-group col:nth-child(5){width:14%}
.srp-table table.srp-product-group col:nth-child(6){width:10%}
.srp-table table.srp-product-group col:nth-child(7){width:8%}

.srp-table table.srp-detail col:nth-child(1){width:9%}
.srp-table table.srp-detail col:nth-child(2){width:16%}
.srp-table table.srp-detail col:nth-child(3){width:14%}
.srp-table table.srp-detail col:nth-child(4){width:12%}
.srp-table table.srp-detail col:nth-child(5){width:8%}
.srp-table table.srp-detail col:nth-child(6){width:4%}
.srp-table table.srp-detail col:nth-child(7){width:6%}
.srp-table table.srp-detail col:nth-child(8){width:8%}
.srp-table table.srp-detail col:nth-child(9){width:10%}
.srp-table table.srp-detail col:nth-child(10){width:7%}
.srp-table table.srp-detail col:nth-child(11){width:6%}

.srp-table table.srp-margin col:nth-child(1){width:24%}
.srp-table table.srp-margin col:nth-child(2){width:16%}
.srp-table table.srp-margin col:nth-child(3){width:14%}
.srp-table table.srp-margin col:nth-child(4){width:13%}
.srp-table table.srp-margin col:nth-child(5){width:10%}
.srp-table table.srp-margin col:nth-child(6){width:6%}
.srp-table table.srp-margin col:nth-child(7){width:17%}
