/* Only the owner profit page is affected; numbers and controls remain in place. */
.daily-profit-page .automatic-profit-settings > .hub-filters {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 10px !important;
}
.daily-profit-page .automatic-profit-settings > .hub-filters > label {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.daily-profit-page .automatic-profit-settings > .hub-filters > label > input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  min-height: 46px;
  margin: 0;
}
.daily-profit-page .automatic-profit-settings > .hub-filters > button {
  box-sizing: border-box;
  align-self: end !important;
  height: 46px;
  min-height: 46px;
  min-width: 132px;
  width: auto;
  margin: 0;
}

/* Three original summary figures share one compact frame. */
.daily-profit-page .profit-overview {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) !important;
  align-items: stretch;
  gap: 0 !important;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--profit-line, #e8ecf2);
  border-radius: 16px;
  background: var(--profit-paper, #fff);
}
.daily-profit-page .profit-overview > .profit-hero,
.daily-profit-page .profit-overview .profit-small-metric {
  box-sizing: border-box;
  min-width: 0;
  margin: 0 !important;
  padding: 14px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.daily-profit-page .profit-overview > .profit-hero {
  border-right: 1px solid var(--profit-line, #e8ecf2) !important;
}
.daily-profit-page .profit-overview .profit-income-cost {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 0 !important;
  min-width: 0;
}
.daily-profit-page .profit-overview .profit-small-metric.cost {
  border-left: 1px solid var(--profit-line, #e8ecf2) !important;
}
.daily-profit-page .profit-overview .profit-hero-amount {
  margin: 5px 0 6px !important;
  font-size: clamp(24px, 2.2vw, 30px) !important;
  line-height: 1.25 !important;
}
.daily-profit-page .profit-overview .profit-small-metric > strong {
  font-size: clamp(20px, 1.8vw, 25px) !important;
  line-height: 1.3 !important;
}
.daily-profit-page .profit-overview .profit-hero .profit-footnote {
  margin: 4px 0 5px !important;
  line-height: 1.5;
}
.daily-profit-page .profit-overview .profit-hero-footer { gap: 5px 8px; }

/* Keep daily detail, channel revenue and agent stock as distinct measures. */
@supports selector(.profit-section:has(> .profit-day-list)) {
  @media (min-width: 900px) {
    .daily-profit-page .profit-report {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      align-items: start !important;
      gap: 12px !important;
    }
    .daily-profit-page .profit-report > * { grid-column: 1 / -1 !important; min-width: 0; }
    .daily-profit-page .profit-report > .profit-section:has(> .profit-day-list),
    .daily-profit-page .profit-report > .profit-section:has(> .profit-channel-list),
    .daily-profit-page .profit-report > .profit-section:has(> .profit-pickup-card) {
      grid-column: span 1 !important;
    }
  }
  @media (min-width: 1450px) {
    .daily-profit-page .profit-report { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  }
}
.daily-profit-page .profit-report > .profit-section:has(> .profit-day-list),
.daily-profit-page .profit-report > .profit-section:has(> .profit-channel-list),
.daily-profit-page .profit-report > .profit-section:has(> .profit-pickup-card) {
  padding: 14px 16px !important;
  border-radius: 16px !important;
}
.daily-profit-page .profit-report :is(.profit-day-list, .profit-channel-list) { gap: 8px !important; }
.daily-profit-page .profit-report .profit-channel-list {
  display: flex !important;
  flex-direction: column;
}
.daily-profit-page .profit-report :is(.profit-day-list, .profit-channel-list) > .profit-day-card {
  padding: 9px 0 2px;
}
.daily-profit-page .profit-report :is(.profit-day-list, .profit-channel-list, .profit-pickup-card) .profit-money-grid {
  margin: 9px 0 4px;
  gap: 7px;
}
.daily-profit-page .profit-report .profit-pickup-card > .profit-card-heading { padding-top: 9px; }
.daily-profit-page .profit-report .profit-pickup-card .profit-quantity { font-size: 24px; line-height: 1.25; }
.daily-profit-page .profit-report .profit-section-heading { padding-bottom: 8px; }

@media (max-width: 640px) {
  .daily-profit-page .automatic-profit-settings > .hub-filters > button { min-width: 105px; padding-left: 10px; padding-right: 10px; }
  .daily-profit-page .profit-overview { grid-template-columns: minmax(0, 1fr) !important; }
  .daily-profit-page .profit-overview > .profit-hero {
    border-right: 0 !important;
    border-bottom: 1px solid var(--profit-line, #e8ecf2) !important;
  }
  .daily-profit-page .profit-overview > .profit-hero,
  .daily-profit-page .profit-overview .profit-small-metric { padding: 12px !important; }
  .daily-profit-page .profit-report { gap: 10px !important; }
}
