/* Report-specific cards over the native admitted Insights::Table. All
   selectors stay inside the three sales reports; the shared chrome is intact. */
.insights-sales-report { min-width: 0; }
.insights-sales-report__context {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--color-line-strong);
  border-radius: 0 var(--radius-ui) var(--radius-ui) 0;
  background: var(--color-card, #fff);
}
.insights-sales-report__breakdown { display: grid; gap: 1rem; min-width: 0; }
.insights-sales-report__breakdown-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.insights-sales-report__breakdown-heading > div { min-width: 0; flex: 1 1 16rem; }
.insights-sales-report__cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.insights-sales-report__card { min-width: 0; overflow: visible; }
.insights-sales-report__card-heading { padding: 1rem 1.25rem 0; overflow-wrap: anywhere; }
.insights-sales-report__eyebrow { font-size: 0.8125rem; font-weight: 600; color: var(--color-muted); }
.insights-sales-report__figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem 1.25rem;
}
.insights-sales-report__figures > div { min-width: 0; }
.insights-sales-report__value {
  margin-top: 0.25rem;
  color: var(--color-ink);
  font-size: 1.125rem;
  line-height: 1.45;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.insights-sales-report__card-total { background: var(--color-accent-soft); }
.insights-sales-report__timing { border-top: 1px solid var(--color-line); }
.insights-sales-report__timing > p { padding: 0 1.25rem; }
.insights-sales-report__timing-toggle,
.insights-sales-report__table-toggle {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--color-accent-strong);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.insights-sales-report__timing-toggle::-webkit-details-marker,
.insights-sales-report__table-toggle::-webkit-details-marker,
.insights-sales-report__sort > summary::-webkit-details-marker { display: none; }
.insights-sales-report__timing-toggle > svg,
.insights-sales-report__table-toggle > svg,
.insights-sales-report__sort-option > svg { width: 1rem; height: 1rem; flex: none; }
.insights-sales-report__sort { position: relative; }
.insights-sales-report__sort > summary { min-height: 44px; cursor: pointer; list-style: none; }
.insights-sales-report__sort-options {
  position: absolute;
  z-index: 10;
  right: 0;
  display: grid;
  width: min(19rem, calc(100vw - 3rem));
  max-height: 24rem;
  margin-top: 0.375rem;
  padding: 0.375rem;
  overflow-y: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-ui);
  background: var(--color-card, #fff);
  box-shadow: var(--shadow-lift);
}
.insights-sales-report__sort-option {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: var(--color-ink);
  font-size: 0.9375rem;
}
.insights-sales-report__sort-option:hover,
.insights-sales-report__sort-option[aria-current] { background: var(--color-accent-soft); }
.insights-sales-report__table { min-width: 0; border-top: 1px solid var(--color-line); }
.insights-sales-report__table > .ui-card { margin-top: 0.25rem; }
@media (min-width: 960px) {
  .insights-sales-report__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insights-sales-report__card-total .insights-sales-report__figures {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 639px) {
  /* On a phone the Sort button often wraps under the heading at the left
     edge: anchored to the button's right, its list ran off the screen. The
     list spans the heading's width instead, wherever the button sits. */
  .insights-sales-report__breakdown-heading { position: relative; }
  .insights-sales-report__sort { position: static; }
  .insights-sales-report__sort-options { left: 0; right: 0; width: auto; }
  .insights-sales-report__context { padding: 1rem; }
  .insights-sales-report__card-heading { padding-inline: 1rem; }
  .insights-sales-report__figures { padding-inline: 1rem; }
  .insights-sales-report__timing-toggle { padding-inline: 1rem; }
  .insights-sales-report__timing > p { padding-inline: 1rem; }
}
@media print {
  .insights-sales-report__sort { display: none; }
}
