/* Aftersales Board · Jushuitan Return-in-Transit & Tracking Numbers */
.aftersales-work {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.af-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #d6e1d3;
  border-radius: 13px;
  background: #f1f6ed;
  padding: 15px 0;
  color: #214333;
}
.af-kpi-grid > div {
  padding: 0 18px;
}
.af-kpi-grid > div + div {
  border-inline-start: 1px solid #d0decd;
}
.af-kpi-grid dt {
  font-size: 0.78rem;
  color: #556c5b;
}
.af-kpi-grid dd {
  margin-top: 4px;
  font-size: 1.42rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.af-kpi-grid dd small {
  margin-inline-start: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #5b7163;
}
.af-kpi-grid dd.is-transit {
  color: #9e5a14;
}
.af-kpi-grid dd.is-signed {
  color: #1f6643;
}
.af-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
}
.af-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.af-tab {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #d5e0d5;
  background: #fff;
  color: #485d50;
  font-size: 0.84rem;
  font-weight: 550;
}
.af-tab[aria-pressed='true'] {
  background: #1f5c42;
  border-color: #1f5c42;
  color: #fff;
}
.af-search {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  width: min(340px, 100%);
  padding: 0 10px;
  border: 1px solid #d2ded2;
  border-radius: 8px;
  background: #f9fbf8;
  color: #5b7062;
}
.af-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.86rem;
}
.af-table-wrap {
  overflow: auto;
}
.af-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.af-table thead th {
  padding: 11px 12px;
  background: #f6f8f4;
  color: #52675a;
  font-size: 0.79rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #e2e9e0;
  white-space: nowrap;
}
.af-table tbody td,
.af-table tbody th {
  padding: 11px 12px;
  border-bottom: 1px solid #ebefe9;
  vertical-align: middle;
}
.af-table tbody tr:hover {
  background: #f9fbf8;
}
.af-prod {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}
.af-prod-copy strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}
.af-prod-copy small {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  color: #627569;
}
.af-tracking-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.af-tracking-code {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 6px;
  background: #edf4ee;
  border: 1px solid #d4e3d6;
  color: #184e36;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 650;
}
.af-tracking-code:hover {
  background: #dfeee1;
}
.af-tracking-missing {
  color: #8b968f;
  font-size: 0.79rem;
}
.af-state-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}
.af-state-pill.in_transit {
  background: #fdf2dc;
  color: #8d510e;
}
.af-state-pill.signed_pending {
  background: #e4f3e7;
  color: #1b5c3d;
}
.af-state-pill.other {
  background: #eef2ee;
  color: #536459;
}
.af-qty-group {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}
.af-qty-group b {
  color: var(--pine);
}
.af-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 17px;
  font-size: 0.8rem;
  color: var(--muted);
}
.af-banner-msg {
  margin: 10px 17px 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: #eef6ec;
  border: 1px solid #cde0cb;
  color: #215239;
  font-size: 0.82rem;
}
.af-banner-msg[hidden] {
  display: none;
}
@media (max-width: 900px) {
  .af-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
  }
  .af-kpi-grid > div:nth-child(odd) {
    border-inline-start: 0;
  }
}
