.command-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 22px;
  margin-bottom: 16px;
  background: #172b4d;
  color: #fff;
  border-radius: 10px;
}
.command-band .eyebrow {
  display: inline-block;
  color: #a9d6ff;
  font-size: 13px;
  margin-bottom: 8px;
}
.command-band h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.35;
}
.command-band p,
.command-meta span {
  margin: 0;
  color: #d4e2f3;
}
.command-meta {
  display: grid;
  justify-items: end;
  gap: 12px;
  min-width: 220px;
}
.command-meta button {
  border-color: #d4e2f3;
  color: #172b4d;
  background: #fff;
}
.task-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -4px 0 16px;
  padding: 14px 16px;
  border: 1px solid #d9e2ec;
  border-left-width: 5px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
}
.task-progress .eyebrow {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}
.task-progress strong {
  display: block;
  color: #101828;
  font-size: 16px;
}
.task-progress p {
  margin: 4px 0 0;
  color: #475467;
  font-size: 13px;
}
.task-progress.running {
  border-left-color: #1570ef;
  background: #f5f9ff;
}
.task-progress.waiting_login,
.task-progress.failed {
  border-left-color: #d92d20;
  background: #fff6f5;
}
.task-progress.completed {
  border-left-color: #12b76a;
  background: #f6fef9;
}
.task-progress.stopped {
  border-left-color: #667085;
  background: #f9fafb;
}
.dashboard-stats {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}
.stats article {
  border-radius: 8px;
}
.stats article small {
  display: block;
  color: #98a2b3;
  margin-top: 6px;
}
.dashboard-filter-card {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.dashboard-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 12px;
}
.dashboard-filters label {
  display: grid;
  gap: 6px;
  color: #667085;
  font-size: 13px;
}
.dashboard-filters input,
.dashboard-filters select {
  width: 100%;
}
.period-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.period-switch > span {
  color: #667085;
  margin-right: 4px;
}
.period-switch button.active,
.result-tabs button.active {
  border-color: #087f73;
  background: #087f73;
  color: #fff;
}
.risk-section {
  margin: 14px 0;
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  padding: 14px 14px 12px;
}
.risk-heading,
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
#clear-risk-filter {
  display: none;
}
.risk-heading h2,
.section-title h2 {
  margin: 0 0 3px;
  font-size: 18px;
}
.risk-heading p,
.section-title span {
  margin: 0;
  color: #667085;
  font-size: 13px;
}
.risk-cards {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
}
.risk-card {
  display: grid;
  gap: 5px;
  text-align: left;
  flex: 0 0 176px;
  min-height: 92px;
  padding: 13px 14px;
  border-left-width: 4px;
  border-radius: 8px;
  scroll-snap-align: start;
}
.risk-card strong {
  font-size: 25px;
}
.risk-card small {
  color: #667085;
}
.risk-card.active {
  box-shadow: 0 0 0 2px #087f7333;
}
.risk-cards::-webkit-scrollbar,
.action-list::-webkit-scrollbar,
.owner-board::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.risk-cards::-webkit-scrollbar-thumb,
.action-list::-webkit-scrollbar-thumb,
.owner-board::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
.risk-critical { border-left-color: #d92d20; background: #fff6f5; }
.risk-warning { border-left-color: #f79009; background: #fffaeb; }
.risk-idle { border-left-color: #7f56d9; background: #f9f5ff; }
.risk-overstock { border-left-color: #1570ef; background: #eff8ff; }
.risk-scm { border-left-color: #475467; background: #f8fafc; }
.smart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .75fr);
  gap: 14px;
  margin-top: 14px;
  margin-bottom: 16px;
}
.smart-panel {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  padding: 16px;
}
.action-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 2fr) auto minmax(0, 1fr);
  height: 423px;
  overflow: hidden;
}
.action-list {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}
.link-action-list {
  margin-top: 6px;
  max-height: none;
}
.split-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 10px 0 6px;
  padding-top: 8px;
  border-top: 1px solid #edf0f4;
}
.split-title h2 {
  margin: 0;
  font-size: 17px;
}
.split-title span {
  color: #667085;
  font-size: 13px;
}
.action-item {
  display: grid;
  grid-template-columns: 54px minmax(160px, 280px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #edf0f4;
  border-left-width: 4px;
  border-radius: 7px;
  background: #fff;
  min-height: 34px;
}
.action-item b {
  display: inline-grid;
  place-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #f2f4f7;
  font-size: 13px;
}
.action-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.action-item span {
  color: #344054;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.action-item.danger { border-left-color: #d92d20; }
.action-item.warn { border-left-color: #f79009; }
.action-item.neutral { border-left-color: #667085; }
.owner-board {
  display: grid;
  gap: 8px;
  max-height: 458px;
  overflow-y: auto;
  padding-right: 4px;
}
.owner-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #edf0f4;
}
.owner-row strong,
.owner-row span {
  display: block;
}
.owner-row span {
  color: #667085;
  font-size: 13px;
  margin-top: 3px;
}
.risk-text {
  color: #b42318;
}
.result-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 14px 0 12px;
  flex-wrap: wrap;
}
.result-tab-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-supplier-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 13px;
}
.detail-supplier-filter select {
  min-width: 130px;
  padding: 8px 10px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.result-table {
  max-height: 620px;
}
.result-table table {
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
}
.result-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #475467;
  border-bottom: 1px solid #d9e0ea;
}
.result-table td,
.result-table th {
  padding: 10px 12px;
  vertical-align: middle;
}
.result-table tbody tr:nth-child(even) {
  background: #fbfcfe;
}
.result-table tbody tr:hover {
  background: #f3f8fb;
}
.result-table th:nth-child(1),
.result-table td:nth-child(1) {
  width: 74px;
}
.result-table th:nth-child(2),
.result-table td:nth-child(2),
.result-table th:nth-child(5),
.result-table td:nth-child(5) {
  width: 82px;
}
.result-table th:nth-child(3),
.result-table td:nth-child(3) {
  min-width: 240px;
  max-width: 340px;
}
.result-table th:nth-child(4),
.result-table td:nth-child(4) {
  width: 142px;
  font-family: Consolas, "Microsoft YaHei", monospace;
}
.result-table th:nth-child(n+6),
.result-table td:nth-child(n+6) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.result-table th:last-child,
.result-table td:last-child {
  text-align: center;
  width: 92px;
}
.result-table td.product {
  min-width: 240px;
  white-space: normal;
  line-height: 1.4;
}
.amount-row {
  margin: 15px 0;
}
.amount-row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.amount-track {
  height: 8px;
  background: #edf2f5;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 7px;
}
.amount-fill {
  height: 100%;
  background: #087f73;
  border-radius: 999px;
}
.badge.danger {
  background: #fee4e2;
  color: #b42318;
}
.badge.warn {
  background: #fffaeb;
  color: #b54708;
}
.badge.neutral {
  background: #f2f4f7;
  color: #475467;
}
.table-wrap tbody tr:nth-child(even) {
  background: #fbfcfe;
}
.table-wrap tbody tr:hover {
  background: #f3f8fb;
}
.table-wrap th {
  background: #f8fafc;
  color: #475467;
}
.table-wrap td:nth-last-child(n+3):not(.product) {
  font-variant-numeric: tabular-nums;
}
.empty-state {
  text-align: center;
  color: #98a2b3;
  padding: 50px 15px !important;
}
.empty-state.compact {
  padding: 22px 10px !important;
}
@media (max-width: 1180px) {
  .dashboard-stats { grid-template-columns: repeat(3, 1fr); }
  .risk-cards { grid-template-columns: repeat(3, 1fr); }
  .smart-grid,
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .command-band { grid-template-columns: 1fr; }
  .command-meta { justify-items: start; min-width: 0; }
  .dashboard-stats,
  .dashboard-filters,
  .risk-cards { grid-template-columns: 1fr; }
  .action-item { grid-template-columns: 46px minmax(0, 1fr); }
  .action-item span { grid-column: 2; }
}

/* 报表式筛选区：参考用户给的明细表界面 */
.dashboard-filter-card {
  padding: 18px 18px 14px;
  border-radius: 10px;
  border-color: #dde5ef;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}
.dashboard-filters {
  grid-template-columns: minmax(240px, 1.25fr) repeat(4, minmax(170px, 1fr));
  gap: 14px;
  align-items: end;
}
.dashboard-filters label {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}
.dashboard-filters input,
.dashboard-filters select {
  height: 44px;
  border-color: #d8e0ea;
  border-radius: 8px;
  color: #344054;
  font-weight: 600;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, .03);
}
.dashboard-filters input::placeholder {
  color: #8a96a8;
  font-weight: 500;
}
.period-switch {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #edf0f4;
}
.period-switch button,
.result-tab-buttons button {
  border-color: #d8e0ea;
  border-radius: 8px;
  padding: 9px 15px;
  font-weight: 700;
  color: #344054;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.period-switch button.active,
.result-tabs button.active {
  border-color: #28a59b;
  background: #e9fbf8;
  color: #087f73;
  box-shadow: 0 0 0 1px rgba(40, 165, 155, .35);
}
.result-tabs {
  background: transparent;
  margin: 16px 0 10px;
}
.detail-supplier-filter {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  padding: 7px 10px;
}
.result-table {
  border-radius: 10px;
  border-color: #dce4ee;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
}
.result-table table {
  min-width: 1180px;
  table-layout: fixed;
}
.result-table th {
  height: 38px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}
.result-table td {
  height: 38px;
  color: #344054;
  font-size: 12px;
}
.result-table td.product {
  font-weight: 700;
  color: #1d2939;
  font-size: 12px;
  line-height: 1.28;
}
.cell-owner {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-weight: 800;
}
.cell-shop {
  color: #475467;
  font-weight: 700;
}
.cell-id {
  color: #344054;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-weight: 700;
  letter-spacing: .2px;
}
.cell-stock {
  display: inline-block;
  min-width: 38px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2px;
}
.cell-stock.jst {
  color: #1d2939;
}
.cell-stock.transit {
  color: #b54708;
}
.cell-stock.scm {
  color: #475467;
}
.cell-money {
  color: #101828;
  font-size: 12px;
  font-weight: 900;
}
.cell-outbound {
  color: #1570ef;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cell-outbound.strong {
  color: #0b63ce;
  font-weight: 950;
}
.cell-average {
  color: #6941c6;
  font-weight: 900;
}
.sellable {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
}
.sellable.danger {
  background: #fee4e2;
  color: #b42318;
}
.sellable.warn {
  background: #fffaeb;
  color: #b54708;
}
.sellable.ok {
  background: #ecfdf3;
  color: #067647;
}
.sellable.watch {
  background: #eef4ff;
  color: #3538cd;
}
.sellable.idle {
  background: #f2f4f7;
  color: #475467;
}
.link-title {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3538cd;
  font-weight: 800;
}
.reason {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #475467;
}
.result-table a,
.result-table .link-like {
  color: #1570ef;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.badge.danger {
  font-weight: 800;
}
.badge.warn,
.badge.ok,
.badge.neutral {
  font-weight: 700;
}
@media (max-width: 1280px) {
  .dashboard-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
