.reports-page {
  min-width: 0;
}

.reports-intro,
.reports-page > .shop-note {
  max-width: 58rem;
}

.reports-filter {
  margin-block: 2rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid var(--color-border);
}

.reports-filter fieldset {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.reports-filter legend {
  margin-block-end: 1rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
}

.reports-filter__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 1.25rem;
}

.reports-filter__fields > div,
.reports-filter .form-control {
  min-width: 0;
}

.reports-filter .form-control {
  min-height: 2.75rem;
}

.reports-filter__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.reports-page .btn {
  max-width: 100%;
  min-height: 2.75rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.reports-period {
  margin-block: 1.5rem;
  font-size: 0.85rem;
  line-height: 1.8;
}

.reports-message,
.reports-empty {
  padding: 1.25rem;
  border-inline-start: 3px solid var(--color-primary);
  background: #eeebe4;
}

.reports-message h2 {
  font-size: 1.5rem;
}

.reports-message > :where(:last-child) {
  margin-block-end: 0;
}

.report-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-block: 2rem 1.25rem;
}

.report-metric {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
}

.report-metric dt {
  min-height: 2.5em;
  margin-block-end: 1rem;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
}

.report-metric dd {
  margin: 0;
  color: var(--color-primary);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.report-metric--net {
  background: #e8ece2;
}

.reports-section {
  margin-block: 3rem;
}

.reports-section h2 {
  margin-block-end: 1rem;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.reports-section > :where(p) {
  max-width: 58rem;
  font-size: 0.85rem;
  line-height: 1.8;
}

.reports-section__heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-block-end: 1.25rem;
}

.reports-section__heading h2 {
  margin: 0;
}

.report-statuses {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 1.5rem;
}

.report-statuses > div {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  min-width: 0;
  padding-block: 0.8rem;
  border-block-end: 1px solid var(--color-border);
}

.report-statuses dt {
  font-size: 0.85rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.report-statuses dd {
  margin: 0;
  color: var(--color-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.report-table-wrap {
  max-width: 100%;
  margin-block: 1.25rem;
  overflow: auto;
}

.report-table {
  width: 100%;
  font-size: 0.85rem;
}

.report-table caption {
  padding-block: 0 1rem;
  color: #646b61;
  caption-side: top;
  font-size: 0.8rem;
}

.report-table th,
.report-table td {
  padding: 0.9rem 0.8rem;
  border-block-end: 1px solid var(--color-border);
  vertical-align: top;
}

.report-table th {
  color: var(--color-primary);
  font-weight: 600;
}

.report-table tbody th {
  color: var(--color-text);
  font-weight: 400;
}

.report-table tfoot {
  font-weight: 600;
  background: #eeebe4;
}

.report-table--daily {
  min-width: 54rem;
}

.report-table--products {
  min-width: 40rem;
}

.report-table--stock {
  min-width: 39rem;
}

.report-money,
.report-table time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (width >= 576px) {
  .report-metrics,
  .report-statuses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width >= 768px) {
  .reports-filter__fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (width >= 1200px) {
  .report-metrics,
  .report-statuses {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (width < 576px) {
  .reports-section__heading .btn {
    width: 100%;
  }
}
