.cds-history {
  --cds-ink: #1d2940;
  --cds-muted: #627087;
  --cds-line: #e4eaf7;
  --cds-purple: #7759e8;
  --cds-pink: #e83b7d;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 24px 0;
  padding: 16px;
  border: 1px solid #e8ecf9;
  border-radius: 15px;
  background: #f8faff;
  color: var(--cds-ink);
  font-family: inherit;
  line-height: 1.45;
}
.cds-history *, .cds-history *::before, .cds-history *::after { box-sizing: border-box; }
.cds-history h2, .cds-history h3, .cds-history p { margin: 0; }
.cds-history p { color: var(--cds-muted); }
.cds-history svg { width: 1em; height: 1em; flex: none; }

.cds-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 20px;
  align-items: start;
  padding: 1px 3px 4px;
}
.cds-head h2 { grid-column: 1; font-size: clamp(18px, 2vw, 23px); line-height: 1.22; font-weight: 750; letter-spacing: -.025em; }
.cds-head p { grid-column: 1; max-width: 780px; margin-top: 5px; font-size: 11.5px; line-height: 1.5; }
.cds-text-link {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 99px;
  background: #edf1fd;
  color: #344b83 !important;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none !important;
}
.cds-text-link:hover, .cds-text-link:focus { background: #e0e8ff; }

.cds-kpis, .cds-charts { grid-column: 1 / -1; display: grid; gap: 8px; }
.cds-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cds-kpi {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  min-height: 86px;
  padding: 12px 10px;
  border: 1px solid var(--cds-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(34, 52, 94, .025);
}
.cds-kpi-icon, .cds-chart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #f0ebff;
  color: #7047de;
  font-size: 19px;
}
.cds-kpi-icon--percent { background: #ffeaf1; color: #df3470; }
.cds-kpi-icon--gift { background: #e5f8ef; color: #128761; }
.cds-kpi-icon--clock { background: #e8f2ff; color: #2576da; }
.cds-kpi-copy { display: flex; flex-direction: column; min-width: 0; }
.cds-kpi-value { font-size: 20px; line-height: 1.1; font-weight: 800; letter-spacing: -.025em; }
.cds-kpi-label { margin-top: 3px; font-size: 10.5px; line-height: 1.2; font-weight: 700; }
.cds-kpi-note { margin-top: 3px; color: var(--cds-muted); font-size: 9px; line-height: 1.25; }

.cds-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cds-chart {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--cds-line);
  border-radius: 11px;
  background: #fff;
}
.cds-chart-head { display: flex; align-items: flex-start; gap: 9px; min-height: 47px; }
.cds-chart-icon { width: 29px; height: 29px; font-size: 16px; }
.cds-chart-promotions .cds-chart-icon { background: #ffeaf1; color: var(--cds-pink); }
.cds-chart h3 { font-size: 12px; font-weight: 750; line-height: 1.25; }
.cds-chart-head p { margin-top: 3px; font-size: 9.5px; line-height: 1.35; }
.cds-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  list-style: none;
  margin: 11px 0 0;
  padding: 0 2px;
  background: repeating-linear-gradient(to top, #e9edf6 0, #e9edf6 1px, transparent 1px, transparent 31px);
}
.cds-bars li { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.cds-bar-track { position: relative; display: block; width: 100%; height: 125px; }
.cds-bar-fill {
  position: absolute;
  bottom: 0;
  left: 13%;
  width: 74%;
  height: var(--cds-height);
  border-radius: 3px 3px 0 0;
  background: var(--cds-purple);
}
.cds-chart-promotions .cds-bar-fill { background: var(--cds-pink); }
.cds-bar-value { position: absolute; bottom: calc(var(--cds-height) + 3px); left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 700; }
.cds-bar-label { width: 100%; padding-top: 5px; background: #fff; color: #3d4961; text-align: center; font-size: 9px; }
.cds-chart-empty { display: flex; align-items: center; justify-content: center; min-height: 153px; margin-top: 11px !important; border-radius: 7px; background: #f8faff; text-align: center; font-size: 11px; }

.cds-insights, .cds-cta {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e8e5ff;
  border-radius: 11px;
  background: #f4f2ff;
}
.cds-insights h3, .cds-cta h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 750; line-height: 1.3; }
.cds-insights h3 svg { color: #7256e8; font-size: 17px; }
.cds-insights { counter-reset: cds-insight; }
.cds-insights p { position: relative; min-height: 20px; margin-top: 5px; padding-left: 26px; font-size: 10.5px; line-height: 1.35; }
.cds-insights p::before {
  counter-increment: cds-insight;
  content: counter(cds-insight);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #e3dcff;
  color: #6944d4;
  font-size: 9px;
  font-weight: 750;
}
.cds-cta { grid-column: 2; display: flex; flex-direction: column; border-color: #ffe3ec; background: #fff4f8; }
.cds-cta h3 svg { color: #e13875; font-size: 17px; }
.cds-cta p { font-size: 10.5px; line-height: 1.45; }
.cds-button {
  display: block;
  margin-top: auto;
  padding: 9px 12px;
  border-radius: 7px;
  background: #e82f75;
  color: #fff !important;
  text-align: center;
  text-decoration: none !important;
  font-size: 10.5px;
  font-weight: 700;
}
.cds-button:hover, .cds-button:focus { background: #c91b5d; }
.cds-period {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid #dfeaff;
  border-radius: 10px;
  background: #f4f8ff;
}
.cds-period svg { flex: none; width: 27px; height: 27px; padding: 6px; border-radius: 50%; background: #e4efff; color: #2779da; }
.cds-period p { font-size: 9.5px; line-height: 1.4; }
.cds-period strong { color: var(--cds-ink); font-weight: 750; }

@media (max-width: 600px) {
  .cds-head { grid-template-columns: minmax(0, 1fr); }
  .cds-text-link { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
}
@media (max-width: 600px) {
  .cds-history { padding: 12px; gap: 9px; }
  .cds-charts { grid-template-columns: 1fr; }
  .cds-insights, .cds-cta { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .cds-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .cds-kpi { padding: 10px 7px; gap: 6px; }
  .cds-kpi-icon { width: 27px; height: 27px; font-size: 16px; }
}
