/* Match the client financial cards while retaining the trading report figures. */
.history-page .history-summary {
  margin-bottom: 16px;
}

.history-page .history-summary [data-slot="card-content"] {
  padding: 16px 18px;
}

.history-page .history-summary h2 {
  font-size: 16px;
  font-weight: 700;
  color: #19254b;
}

.history-page .history-summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.history-page .history-summary-heading .history-page-tabs {
  margin: 0;
}

.history-page .history-summary-heading .history-page-tabs button {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.history-page .history-summary-heading .history-page-tabs svg {
  width: 16px;
  height: 16px;
}

.history-page .history-metrics {
  gap: 12px;
  margin-top: 14px;
}

.history-page .history-metric {
  position: relative;
  display: block;
  min-height: 80px;
  padding: 18px 64px 15px 16px;
  overflow: hidden;
  border-radius: 9px;
}

.history-page .history-metric.invested { background: #efecff; }
.history-page .history-metric.profit { background: #eaf9f2; }
.history-page .history-metric.completed { background: #eaf4ff; }

.history-page .history-metric > svg {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 0;
  background: none;
  stroke-width: 1.7;
  opacity: .24;
}

.history-page .history-metric.invested > svg { color: #4f35dc; }
.history-page .history-metric.profit > svg { color: #00a75a; }
.history-page .history-metric.completed > svg { color: #1475ed; }

.history-page .history-metric dt,
.history-page .history-metric p {
  margin: 0;
  color: #7b86a7;
  font-size: 13px;
  line-height: 1.3;
}

.history-page .history-metric dd {
  margin: 2px 0 0;
  color: #4f35dc;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.history-page .history-metric.profit dd { color: #00a75a; }
.history-page .history-metric.profit dd.negative { color: #e53255; }
.history-page .history-metric.completed dd { color: #1475ed; }
.history-page .history-metric p { margin-top: 3px; font-size: 11px; }
.history-page .history-report-note { margin-top: 12px; }

@media (max-width: 900px) {
  .history-page .history-metric { padding-right: 52px; }
  .history-page .history-metric > svg { width: 38px; height: 38px; }
}

/* Keep the table footer in view and scroll rows inside the table card. */
.client-tabs-content > .history-page {
  height: 100%;
  min-height: 0;
}

.history-page .history-trades-card,
.history-page .history-data-table {
  min-height: 0;
}

@media (max-width: 640px) {
  .client-tabs-content > .history-page { height: auto; min-height: 100%; }
  .history-page .history-data-table { min-height: 180px; }
}
