.rp-tabs{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin-bottom:22px;padding:5px;background:#e9efdf;border:1px solid var(--line);border-radius:11px;width:fit-content}
.rp-tabs a,.rp-tabs button{padding:9px 17px;border-radius:8px;background:transparent;color:var(--muted);font-size:12px}
.rp-tabs .active{background:white;color:var(--green);font-weight:700;box-shadow:0 1px 4px #173a2610}
.rp-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}
.rp-metric{padding:18px 22px;border:1px solid var(--line);border-radius:14px;background:white}
.rp-metric span,.rp-metric small{display:block;color:var(--muted);font-size:12px}
.rp-metric strong{display:block;margin:4px 0;font-size:28px;line-height:1.4;color:var(--green);font-variant-numeric:tabular-nums}
.rp-metric.danger strong{color:#ab3d36}.rp-metric.warning strong{color:#a67518}
.rp-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:18px 22px;border-bottom:1px solid var(--line)}
.rp-filters .control{width:auto;min-width:120px;max-width:350px}.rp-filters .search-wrap{min-width:190px;flex:1;max-width:420px}.rp-filters .search-wrap .control{width:100%;max-width:none}
.rp-filters label{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}
.rp-source{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding:17px 22px}.rp-source select{min-width:230px;max-width:560px;width:auto}
.rp-table{overflow:auto}.rp-table table{width:100%;font-size:12px}.rp-table th{white-space:nowrap}.rp-table td{vertical-align:middle}
.rp-table .rp-product{min-width:170px;max-width:250px;white-space:normal;overflow-wrap:anywhere}.rp-table .rp-warehouse{min-width:130px;max-width:220px;white-space:normal}
.rp-table .rp-number{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.rp-table .rp-row-note{font-size:11px;color:var(--muted);max-width:180px;white-space:normal}
.rp-table tbody tr.rp-critical{background:#fff8f6}.rp-badge{display:inline-flex;white-space:nowrap;font-size:11px;padding:3px 8px;border-radius:5px;background:#edf0eb;color:#71807a}
.rp-badge.critical{color:#a32c2c;background:#ffe1dc}.rp-badge.urgent{color:#ad4a37;background:#ffede5}.rp-badge.reorder{color:#94620c;background:#fff0c5}.rp-badge.normal{color:#3c6a4b;background:#eaf3e3}
.rp-pager{display:flex;gap:16px;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:18px 22px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.rp-pager-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.rp-pager select{width:105px}.rp-pager input{width:70px}.rp-pager form{display:flex;gap:6px;align-items:center}.rp-pager .control{min-height:34px;height:34px}
.rp-rulebox{margin-top:20px;border:1px solid var(--line);border-radius:13px;background:white;padding:16px 22px}.rp-rulebox summary{cursor:pointer;font-weight:600;font-size:13px}.rp-rulebox p{margin-top:10px;font-size:12px;color:var(--muted)}
.rp-rule-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:15px}.rp-rule-grid div{padding:11px;background:#f5f8f0;border-radius:8px}.rp-rule-grid strong,.rp-rule-grid span{display:block;font-size:12px}.rp-rule-grid span{margin-top:3px;color:var(--muted)}
.rp-audit-list{margin:12px 0 0;padding-left:20px;color:var(--muted);font-size:12px}.rp-audit-list li{margin:4px 0}
.rp-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.rp-form-wide{grid-column:1/-1}.rp-upload{padding:18px;border:1px dashed #b4c6a9;border-radius:10px;background:#f8faf3}.rp-upload input{max-width:100%}.rp-form-help{font-size:12px;color:var(--muted);margin-top:8px}.rp-error{padding:12px;background:#fff0e9;border-radius:8px;font-size:12px;color:#a04435}.rp-progress{color:var(--green);font-size:12px}
.rp-report-heading{padding:18px 22px;display:flex;gap:15px;justify-content:space-between;align-items:center;flex-wrap:wrap}.rp-report-heading .rp-tabs{margin:0}.rp-report-subtitle{font-size:12px;color:var(--muted);margin-top:4px}
.rp-stock-summary{font-size:12px;padding:12px 22px;color:var(--muted);border-top:1px solid var(--line)}
@media(max-width:1000px){.rp-rule-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.rp-metrics{gap:10px}.rp-metric{padding:14px}.rp-metric strong{font-size:24px}}
@media(max-width:700px){.rp-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.rp-rule-grid{grid-template-columns:1fr 1fr}.rp-form-grid{grid-template-columns:1fr}.rp-filters{padding:15px}.rp-source select{max-width:100%;min-width:0;width:100%}.rp-pager-controls{justify-content:flex-start}.rp-pager{gap:10px}.rp-table table{font-size:11px}}

.rp-table .rp-priority{min-width:280px;max-width:420px;white-space:normal;font-size:12px;color:var(--muted)}
.rp-form-grid .field{display:flex;flex-direction:column;gap:8px;justify-content:flex-start}.rp-form-grid .field>.control{min-height:39px;flex:none}

.rp-metrics.rp-stock-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1000px){.rp-metrics.rp-stock-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.rp-metrics.rp-stock-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

.rp-stock-list{border-top:1px solid #dfe7f1}.rp-stock-list table{table-layout:fixed;min-width:640px;border-collapse:collapse;color:#173555}
.rp-stock-list table th{background:#f2f6fb;color:#52667e;font-size:12px;font-weight:600;letter-spacing:0;padding:10px 9px;text-align:left;text-transform:none}
.rp-stock-list table td,.rp-stock-list table th{border-right:1px solid #dfe7f1;border-bottom:1px solid #dfe7f1}
.rp-stock-list table td:last-child,.rp-stock-list table th:last-child{border-right:0}
.rp-stock-list table tbody tr:nth-child(even){background:#f8fafc}.rp-stock-list table tbody tr:nth-child(odd){background:white}
.rp-stock-list table td{padding:8px 9px;vertical-align:middle;line-height:1.6}.rp-stock-list .rp-stock-list-warehouses{padding:4px 8px}
.rp-stock-list .rp-product-heading{text-align:center}.rp-stock-list .rp-total-heading,.rp-stock-list .rp-stock-list-total{text-align:right}
.rp-stock-list .rp-stock-list-product{font-size:14px;white-space:normal;overflow-wrap:anywhere;color:#173555}
.rp-stock-list .rp-stock-list-sku{font-size:12px;white-space:normal;overflow-wrap:anywhere}.rp-stock-list .rp-stock-list-total{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.rp-warehouse-line{display:flex;justify-content:space-between;align-items:baseline;gap:12px;min-height:24px;line-height:24px;border-bottom:1px solid #dfe7f1;font-size:12px}
.rp-warehouse-line:last-child{border-bottom:0}.rp-warehouse-line-name{font-weight:600;overflow-wrap:anywhere}.rp-warehouse-account{font-size:11px;font-weight:400;color:#7d8c9f}
.rp-warehouse-quantity{color:#697e99;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;flex:none;text-align:right;min-width:36px}
.rp-warehouse-quantity.is-zero,.rp-warehouse-quantity.is-negative{color:#ff1738}.rp-warehouse-quantity.is-missing{color:#8994a4;font-weight:400}


.rp-stock-list table{min-width:840px}.rp-stock-list table .rp-number-heading,.rp-stock-list table .rp-stock-list-number{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.rp-stock-list table .rp-stock-list-number{font-size:13px}

.rp-warehouse-quantities{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:0 12px;flex:none}
.rp-warehouse-metric{display:inline-flex;align-items:baseline;gap:4px;white-space:nowrap}
.rp-warehouse-metric-label{font-size:11px;color:#7d8c9f;font-weight:400}
.rp-warehouse-metric .rp-warehouse-quantity{min-width:0}

.rp-stock-list table tbody tr.rp-stock-group-odd{background:#fff}
.rp-stock-list table tbody tr.rp-stock-group-even{background:#f8fafc}
.rp-stock-list table .rp-stock-warehouse-row td{padding-top:4px;padding-bottom:4px;line-height:24px}
.rp-stock-list table .rp-stock-list-warehouse{font-size:12px;white-space:normal;overflow-wrap:anywhere}
.rp-stock-list table .rp-stock-list-number{vertical-align:middle}

.rp-stock-list table{min-width:1000px}
.rp-stock-list table .rp-combined-heading{text-align:right;white-space:normal}
.rp-combined-heading small{display:block;font-size:11px;font-weight:400;color:#7d8c9f;margin-top:2px}
.rp-stock-list table .rp-stock-combined{text-align:right;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;color:#194e46;background:#f5f8ef;white-space:nowrap}

/* Match the source report's level fills and keep all report fields within the page. */
.rp-report-table{overflow:visible;max-width:100%;min-width:0}
.rp-report-table table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse}
.rp-report-table table th,.rp-report-table table td{padding:10px 7px;white-space:normal;overflow-wrap:anywhere;line-height:1.6}
.rp-report-table table th{font-size:11px;letter-spacing:0;text-transform:none}
.rp-report-table table .rp-product,.rp-report-table table .rp-warehouse,.rp-report-table table .rp-priority{min-width:0;max-width:none}
.rp-report-table table .rp-number{white-space:normal}
.rp-report-table .subline{white-space:normal;overflow-wrap:anywhere;font-size:11px}
.rp-cell-line{display:flex;justify-content:space-between;align-items:baseline;gap:3px;line-height:1.7}
.rp-cell-line>span{flex:none;font-size:11px;color:var(--muted)}
.rp-cell-line>strong{font-size:12px;font-weight:500;font-variant-numeric:tabular-nums;text-align:right;min-width:0;overflow-wrap:anywhere}
.rp-priority-item+.rp-priority-item{margin-top:4px}
.rp-report-table .rp-level-cell{border-left:1px solid var(--line);border-right:1px solid var(--line)}
.rp-report-table .rp-level-critical,.rp-badge.critical{background:#ff9999;color:#111}
.rp-report-table .rp-level-urgent,.rp-badge.urgent{background:#ffc7ce;color:#111}
.rp-report-table .rp-level-reorder,.rp-badge.reorder{background:#ffe699;color:#111}
.rp-report-table .rp-level-normal,.rp-badge.normal{background:#c6e0b4;color:#111}
.rp-report-table .rp-level-storage,.rp-badge.storage{background:#ffd700;color:#111}
.rp-report-table .rp-level-slow,.rp-badge.slow{background:#c4a7e7;color:#111}
.rp-report-table .rp-level-normal .rp-row-note,.rp-report-table .rp-level-storage .rp-row-note,.rp-report-table .rp-level-slow .rp-row-note{color:#333}
.rp-report-table .rp-level-critical .rp-row-note,.rp-report-table .rp-level-urgent .rp-row-note,.rp-report-table .rp-level-reorder .rp-row-note{color:#333}
.rp-report-table .rp-level-cell .rp-badge{padding:2px 4px;font-weight:600;font-size:12px;max-width:100%;white-space:normal}
@media(max-width:1400px){.rp-report-table table th,.rp-report-table table td{padding:8px 5px;font-size:11px}.rp-cell-line{flex-wrap:wrap;gap:0 3px}.rp-cell-line>strong{font-size:11px}}
@media(max-width:700px){.rp-report-table table,.rp-report-table thead,.rp-report-table tbody,.rp-report-table tr,.rp-report-table td{display:block;width:100%}.rp-report-table colgroup,.rp-report-table thead{display:none}.rp-report-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid var(--line)}.rp-report-table table td{box-sizing:border-box;min-width:0}.rp-report-table td::before{display:block;font-size:10px;font-weight:600;color:var(--muted);margin-bottom:3px}.rp-report-table td:nth-child(1)::before{content:'商品编号／产品名称'}.rp-report-table td:nth-child(2)::before{content:'仓库'}.rp-report-table td:nth-child(3)::before{content:'库存（件）'}.rp-report-table td:nth-child(4)::before{content:'出库（件）'}.rp-report-table td:nth-child(5)::before{content:'日均出库'}.rp-report-table td:nth-child(6)::before{content:'可售天数'}.rp-report-table td:nth-child(7)::before{content:'预警／紧急'}.rp-report-table td:nth-child(8)::before{content:'预警线数量'}.rp-report-table td:nth-child(9)::before{content:'建议补货'}.rp-report-table td:nth-child(10)::before{content:'等级／备注'}.rp-report-table td:nth-child(11){grid-column:1/-1}.rp-report-table td:nth-child(11)::before{content:'各仓紧急程度'}.rp-report-table .rp-number{text-align:left}.rp-cell-line{flex-wrap:nowrap;justify-content:flex-start;gap:8px}}
