/* Item 400: combined Payment history on View details and Client 360. */
.item400-history .item400-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.item400-check,
.item400-mismatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  vertical-align: middle;
}
.item400-check {
  background: var(--admin-success-bg, #e0f3e8);
  color: var(--admin-success, #167047);
}
.item400-mismatch {
  background: #fff2ca;
  color: #865900;
}
.item400-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.item400-summary article {
  border: 1px solid var(--admin-line, #d7e1e6);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fbfb;
  min-width: 0;
}
.item400-summary article.out {
  background: var(--admin-success-bg, #e0f3e8);
  border-color: #b9e3d5;
}
.item400-summary article.warn {
  background: #fff8e8;
  border-color: #efd48a;
}
.item400-summary dt {
  margin: 0;
  color: var(--admin-muted, #647488);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.item400-summary dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.item400-summary .sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-muted, #647488);
}
.item400-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.item400-filters .admin-button { min-height: 36px; }
.item400-history .admin-table-region { overflow-x: auto; min-height: 0; }
.item400-history table.admin-table { width: 100%; table-layout: fixed; min-width: 980px; }
.item400-history .admin-table th {
  white-space: normal;
  line-height: 1.25;
  overflow-wrap: break-word;
  vertical-align: top;
}
.item400-history .admin-table td { vertical-align: top; }
.item400-history .col-date { width: 128px; }
.item400-history .col-type { width: 118px; }
.item400-history .col-amt,
.item400-history .col-bal { width: 128px; text-align: right; }
.item400-history .col-by { width: 110px; }
.item400-history .col-remark { width: 140px; }
.item400-history .amt,
.item400-history .bal {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  white-space: nowrap;
}
.item400-history .plus { color: var(--admin-danger, #a63b35); }
.item400-history .minus { color: var(--admin-success, #167047); }
.item400-history .fee { color: var(--admin-ink, #0e2440); }
.item400-history .fee-note {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 650;
  color: var(--admin-muted, #647488);
}
.item400-history .desc strong { display: block; color: var(--admin-ink, #0e2440); }
.item400-history .desc small {
  display: block;
  margin-top: 2px;
  color: var(--admin-muted, #647488);
  font-size: 11px;
}
.item400-history .date {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.item400-history .date .t { color: var(--admin-muted, #647488); font-size: 11px; }
.item400-history tr.reversal td { background: #fdf6f5; }
.item400-history tr.settlement td { background: #f3faf6; }
.item400-history tr.is-hidden { display: none; }
.item400-type-release { color: #275f9f; background: #e7effa; }
.item400-type-payment { color: #167047; background: #e0f3e8; }
.item400-type-extension { color: #078b80; background: #eef8f7; }
.item400-type-late { color: #865900; background: #fff2ca; }
.item400-type-credit,
.item400-type-voucher,
.item400-type-charge { color: #275f9f; background: #e7effa; }
.item400-type-reversal { color: #a63b35; background: #fce9e7; }
.item400-type-writeoff { color: #596775; background: #eef2f5; }
.item400-empty { margin: 0; color: var(--admin-muted, #647488); }
.item400-c360-history { margin-top: 16px; }
@media (max-width: 1100px) {
  .item400-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item400-history table.admin-table { table-layout: auto; }
}
