/* «Продажи» (section-sales): та же подача, что «Сводная по затратам по месяцам» в «Расходах». */

.sales-report {
  margin-top: 1rem;
}

.sales-report__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.sales-report__title {
  margin: 0;
  font-size: 1.05rem;
}

.sales-report__meta {
  margin: 0.45rem 0 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.sales-report__status.is-bad {
  color: #b91c1c;
}

html[data-theme="dark"] .sales-report__status.is-bad {
  color: #f87171;
}

.sales-report__status {
  min-height: 1.2em;
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.sales-report__year {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.sales-report__year select {
  width: auto;
  min-width: 6rem;
}

.sales-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.sales-report-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.sales-report-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.sales-report-table th.sales-report-num,
.sales-report-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sales-report-num--total,
.sales-report-sum td,
.sales-report-sum th {
  font-weight: 700;
}

/* ---------- сводная по месяцам ---------- */

.sales-report__scroll {
  overflow-x: auto;
}

#sales-report-summary .sales-report-table {
  width: max-content;
  min-width: 100%;
}

.sales-report-table .sales-report__label {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 10.5rem;
  text-align: left;
  white-space: nowrap;
  background: var(--surface, #fff);
  box-shadow: inset -1px 0 0 var(--border);
}

.sales-report-table tbody .sales-report__label {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
}

.sales-report-table .sales-report-sum .sales-report__label {
  font-weight: 700;
}

.sales-report-table .sales-report-sum td,
.sales-report-table .sales-report-sum th {
  border-bottom-width: 2px;
}

.sales-report-table .sales-report__group th,
.sales-report-table .sales-report__group td {
  padding-top: 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.sales-report-table tr.is-sub .sales-report__label {
  padding-left: 1.4rem;
  font-weight: 500;
}

.sales-report-table tr.is-sub td {
  color: var(--muted);
}

.sales-report-table tr.is-other th,
.sales-report-table tr.is-other td,
.sales-report-table td.is-other,
.sales-report-table tr.is-muted td {
  color: var(--muted);
  font-style: italic;
}

.sales-report__month {
  vertical-align: bottom;
}

.sales-report__current {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #1d4ed8;
}

html[data-theme="dark"] .sales-report__current {
  color: #93c5fd;
}

.sales-report__all {
  border-left: 1px solid var(--border);
}
