/* Demo settlement layout: keep dense financial values readable. */
.settlement-page .settlement-filter {
  overflow: visible;
}

.settlement-page .settlement-basis-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 620px);
  gap: 0;
  margin-bottom: 10px;
  padding: 3px;
  border: 1px solid #d5e1ef;
  border-radius: 10px;
  background: #f4f7fb;
}

.settlement-page .settlement-basis-tabs button {
  min-width: 0;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid #d5e1ef;
  border-radius: 7px;
  background: transparent;
  color: #52647d;
  font-weight: 700;
  white-space: nowrap;
}

.settlement-page .settlement-basis-tabs button:last-child {
  border-right: 0;
}

.settlement-page .settlement-basis-tabs button.active {
  background: #1688f8;
  color: #fff;
  box-shadow: 0 2px 6px rgba(22, 136, 248, 0.22);
}

.settlement-page .settlement-filter > p {
  margin: 0 0 24px;
  padding: 10px 12px;
  border-left: 3px solid #1688f8;
  border-radius: 0 6px 6px 0;
  background: #f6f9fd;
  line-height: 1.45;
}

.settlement-page .settlement-table-shell {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: #9bb3ce #e8eff7;
  scrollbar-width: thin;
}

.settlement-page .settlement-table-shell::-webkit-scrollbar {
  height: 11px;
}

.settlement-page .settlement-table-shell::-webkit-scrollbar-track {
  border-radius: 8px;
  background: #e8eff7;
}

.settlement-page .settlement-table-shell::-webkit-scrollbar-thumb {
  border: 2px solid #e8eff7;
  border-radius: 8px;
  background: #9bb3ce;
}

.settlement-page .settlement-table {
  width: 2920px;
  min-width: 2920px;
  table-layout: fixed;
}

.settlement-page .settlement-table th,
.settlement-page .settlement-table td {
  width: 160px;
  min-width: 160px;
  box-sizing: border-box;
  padding: 12px 10px;
  overflow: hidden;
  vertical-align: middle;
}

.settlement-page .settlement-table th {
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.settlement-page .settlement-table th:first-child,
.settlement-page .settlement-table td:first-child {
  width: 110px;
  min-width: 110px;
}

.settlement-page .settlement-table th:nth-child(2),
.settlement-page .settlement-table td:nth-child(2),
.settlement-page .settlement-table th:nth-child(3),
.settlement-page .settlement-table td:nth-child(3) {
  width: 175px;
  min-width: 175px;
}

.settlement-page .settlement-stack {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.settlement-page .settlement-stack p {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  line-height: 1.25;
}

.settlement-page .settlement-stack span {
  min-width: 0;
  text-align: left;
  white-space: nowrap;
}

.settlement-page .settlement-stack b {
  min-width: 0;
  overflow: hidden;
  color: #16253a;
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-overflow: clip;
  white-space: nowrap;
}

.settlement-page .settlement-table tfoot td,
.settlement-page .settlement-table tbody tr:last-child td {
  font-weight: 700;
}

@media (max-width: 900px) {
  .settlement-page .settlement-basis-tabs {
    width: 100%;
  }

  .settlement-page .settlement-basis-tabs button {
    padding: 0 8px;
    white-space: normal;
  }
}

/* Dashboard profit cards need two rows at the available card width. */
.dashboard-grid .profit-panel .profit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 12px;
  min-width: 0;
  height: auto;
  min-height: 112px;
  padding: 20px 24px;
  box-sizing: border-box;
}

.dashboard-grid .profit-panel .profit-row > div {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-grid .profit-panel .profit-row > strong {
  min-width: max-content;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}

.dashboard-grid .profit-panel .profit-row > p {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  margin: 0;
  color: #687991;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.dashboard-grid .profit-panel .profit-row > p br {
  display: none;
}

.dashboard-grid .profit-panel .profit-row > p b {
  color: inherit;
  font-weight: 600;
  white-space: nowrap;
}
