.dealer-performance-card {
  overflow: hidden;
}

.dealer-performance-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.dealer-performance-head > div:first-child {
  max-width: 620px;
}

.dealer-performance-head span,
.dealer-performance-controls label > span {
  color: #8c714e;
  font-size: 9px;
  letter-spacing: .08em;
}

.dealer-performance-head h3 {
  margin: 7px 0 0;
  font: 500 20px/1.4 Didot, "Songti SC", serif;
}

.dealer-performance-head p,
.dealer-performance-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.dealer-performance-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.dealer-performance-controls label {
  display: grid;
  gap: 6px;
}

.dealer-performance-controls select {
  min-width: 180px;
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: #302a23;
  font-size: 10px;
}

.dealer-performance-controls > div {
  display: flex;
}

.dealer-performance-controls button {
  min-width: 54px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fffaf2;
  color: #655a4f;
  cursor: pointer;
  font-size: 9px;
}

.dealer-performance-controls button + button {
  border-left: 0;
}

.dealer-performance-controls button.selected {
  border-color: #8f7149;
  background: #8f7149;
  color: #fff;
}

.dealer-performance-scroll {
  margin-top: 22px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  scrollbar-width: thin;
}

.dealer-performance-chart {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-width: min-content;
  height: 270px;
  padding: 0 4px;
}

.dealer-performance-column {
  display: grid;
  grid-template-rows: 30px 1fr 18px 18px;
  width: 82px;
  min-width: 82px;
  text-align: center;
}

.dealer-performance-column > b {
  align-self: end;
  overflow: hidden;
  color: #534637;
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dealer-performance-bar {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 7px 12px 5px;
  border-bottom: 1px solid #cfc3b0;
  background: linear-gradient(to top, rgba(197, 173, 127, .08), rgba(197, 173, 127, 0));
}

.dealer-performance-bar i {
  display: block;
  width: 100%;
  min-height: 1px;
  background: linear-gradient(180deg, #c6a465, #8f7149);
  transition: height .2s ease;
}

.dealer-performance-column > strong {
  color: #3c342b;
  font-size: 9px;
  font-weight: 600;
}

.dealer-performance-column > small {
  color: var(--muted);
  font-size: 8px;
}

@media (max-width: 720px) {
  .dealer-performance-head {
    display: grid;
    gap: 16px;
  }

  .dealer-performance-controls {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dealer-performance-controls select {
    width: 100%;
    min-width: 0;
  }

  .dealer-performance-chart {
    height: 240px;
  }
}

@media (max-width: 420px) {
  .dealer-performance-controls {
    grid-template-columns: 1fr;
  }

  .dealer-performance-controls > div button {
    flex: 1;
  }
}
