.dashboard-widgets {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.widget-card {
  background: var(--color-white);
  border: 0.0625rem solid var(--color-gray-100);
  border-radius: 0.875rem;
  box-shadow: rgba(17, 24, 39, 0.06) 0rem 0.5rem 1.5rem;
  overflow: hidden;
}

.widget-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.125rem;
}

.widget-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-900);
  margin: 0;
}

.widget-card__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1b77ee;
  text-decoration: none;
}

.widget-card__body {
  padding: 0 1.125rem 1.125rem;
}

.widget-card--chart .widget-card__body {
  padding-top: 0.25rem;
}

.widget-card__header-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chart-legend {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.chart-legend__dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
}

.chart-legend__dot--revenue {
  background: #1b77ee;
}

.chart-legend__dot--orders {
  background: #22c55e;
}

.chart-legend__text {
  font-size: 0.8125rem;
  color: var(--color-gray-600);
  font-weight: 500;
}

.chart-range-dropdown {
  position: relative;
}

.chart-range-trigger {
  height: 2.375rem;
  border: 0.0625rem solid var(--color-gray-200);
  border-radius: 0.75rem;
  background: var(--color-white);
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: var(--color-gray-700);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.chart-range-trigger:hover {
  border-color: #c7d2fe;
}

.chart-range-trigger:focus-visible {
  outline: 0.125rem solid #465fff;
  outline-offset: 0.125rem;
}

.chart-range-trigger__chev {
  color: var(--color-gray-400);
  font-size: 0.875rem;
  transform: translateY(0.03125rem);
  transition: transform 0.18s ease;
}

.chart-range-trigger[aria-expanded="true"] .chart-range-trigger__chev {
  transform: rotate(180deg);
}

.chart-range-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  height: 10rem;
  overflow-y: scroll;
  width: 12.5rem;
  background: var(--color-white);
  border: 0.0625rem solid var(--color-gray-200);
  border-radius: 0.5rem;
  box-shadow: rgba(17, 24, 39, 0.14) 0rem 0.75rem 1.875rem;
  padding: 0.375rem;
  z-index: 30;
}

.chart-range-option {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 0.625rem;
  padding: 0.625rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
  margin-bottom:0.25rem;
}

.chart-range-option:hover {
  background: #f3f4f6;
  color: var(--color-gray-900);
}

.chart-range-option.is-active {
  background: #ecf2fe;
  color: #1b77ee;
}

.chart-range-divider {
  height: 0.0625rem;
  background: var(--color-gray-100);
  margin: 0.375rem 0.375rem;
}

.chart-canvas-wrap {
  height: 16.5rem;
}

.best-selling {
  display: flex;
  flex-direction: column;
}

.best-selling__head,
.best-selling__row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 0.7fr 1fr;
  align-items: center;
}

.best-selling__head {
  background: #f3f4f6;
  border: 0.0625rem solid var(--color-gray-100);
  border-radius: 0.625rem;
  min-height: 2.875rem;
  padding: 0 0.875rem;
}

.best-selling__col {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-800);
}

.best-selling__col--sold {
  text-align: center;
}

.best-selling__col--revenue {
  text-align: right;
}

.best-selling__row {
  min-height: 3.75rem;
  padding: 0.25rem 0.875rem;
  text-decoration: none;
  border-bottom: 0.0625rem solid var(--color-gray-100);
  transition: background-color 0.16s ease;
  font-size: 0.9375rem;
}

.best-selling__row:last-child {
  border-bottom: 0;
}

.best-selling__row:hover {
  background: #fafafa;
}

.best-selling__product {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.best-selling__thumb {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  flex-shrink: 0;
  border: 0.0625rem solid var(--color-gray-100);
  background-color: #f1f5f9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.best-selling__thumb--empty {
  background-image: radial-gradient(circle at 30% 25%, #ffffff 0%, #f1f5f9 50%, #e5e7eb 100%);
}

.best-selling__empty {
  margin: 0;
  padding: 1.25rem 0.875rem;
  font-size: 0.875rem;
  color: var(--color-gray-500);
  text-align: center;
}

.best-selling__name {
  color: var(--color-gray-900);
  font-size: inherit;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.best-selling__sold,
.best-selling__revenue {
  color: var(--color-gray-900);
  font-size: inherit;
  font-weight: 500;
}

.best-selling__sold {
  text-align: center;
}

.best-selling__revenue {
  text-align: right;
}

@media (max-width: 64rem) {
  .dashboard-widgets {
    grid-template-columns: 1fr;
  }
}