.metric-card {
  appearance: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(31, 50, 80, 0.24);
  filter: saturate(1.08);
}

.metric-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95);
  outline-offset: -6px;
}

.metric-card em {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.metric-card.red {
  background: linear-gradient(135deg, #f04465, #ce2f55);
}

.metric-card:hover em,
.metric-card:focus-visible em {
  opacity: 1;
  transform: translateX(0);
}

.trend-chart-shell {
  position: relative;
}

.trend-point {
  fill: #fff;
  stroke: #5546ee;
  stroke-width: 2.5;
  cursor: crosshair;
  transition: r 140ms ease, fill 140ms ease, stroke-width 140ms ease;
}

.trend-point:hover,
.trend-point.active,
.trend-point:focus {
  fill: #5546ee;
  stroke: #fff;
  stroke-width: 3;
  r: 7;
  outline: none;
}

.trend-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 112px;
  padding: 9px 11px;
  border: 1px solid rgba(67, 55, 190, 0.18);
  border-radius: 9px;
  background: rgba(32, 38, 65, 0.96);
  color: #fff;
  box-shadow: 0 8px 22px rgba(20, 29, 54, 0.26);
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.trend-tooltip[hidden] {
  display: none;
}

.trend-tooltip strong,
.trend-tooltip span,
.trend-tooltip small {
  display: block;
}

.orders-date-range {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -2px 0 14px;
  padding: 11px 13px;
  border: 1px solid #dce9e4;
  border-radius: 11px;
  background: #f7fbf9;
  color: #58756c;
  font-size: 13px;
}

.orders-date-range > span {
  color: #174e42;
  font-weight: 750;
}

.orders-date-range label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.orders-date-range input {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #bfd5cd;
  border-radius: 8px;
  background: #fff;
  color: #174e42;
}

.orders-date-range small {
  color: #80978f;
}

.orders-date-clear {
  border: 0;
  background: transparent;
  color: #17725e;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dashboard-actions select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.fulfilment.aftersales {
  color: #a6254a;
  background: #fde4ed;
}

.after-sales-row {
  background: #fffafd;
}

.after-sales-row td strong {
  color: #a6254a;
}

@media (max-width: 760px) {
  .orders-date-range {
    align-items: stretch;
  }

  .orders-date-range label {
    width: 100%;
    justify-content: space-between;
  }

  .orders-date-range input {
    flex: 1;
  }
}

.trend-tooltip strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.trend-tooltip span {
  color: #cdd5ff;
  font-size: 13px;
  font-weight: 700;
}

.trend-tooltip small {
  margin-top: 2px;
  color: #bdc7d9;
  font-size: 11px;
}

@media (prefers-reduced-motion: reduce) {
  .metric-card,
  .metric-card em,
  .trend-point {
    transition: none;
  }
}
