/* Keep the outer card naming row. Only the inner flow visualization toolbar is
   centered here; the two card levels have separate responsibilities. */
@media (min-width: 1001px) {
  /* Keep the shared naming-row position unchanged.  Only the inner flow
     toolbar is adjusted below; the title/time row must not be moved. */
  .customer-quick-analysis > .company-overview-host > [data-company-flow-card] > .customer-analysis-heading {
    transform: translateY(-10px) !important;
  }

  /* The trend card uses the same two-band template as the flow card.  Its
     shared rules previously left the outer heading at the taller preset
     height, which made both bands drift apart. */
  .customer-quick-analysis > .company-overview-host > [data-company-trend-card] > .customer-analysis-heading {
    box-sizing: border-box !important;
    height: 64px !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    transform: translateY(-10px) !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-trend-card] > .customer-analysis-heading > .customer-analysis-title-group {
    flex: 0 1 60% !important;
    min-width: 0 !important;
    max-width: 60% !important;
    align-self: center !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-trend-card] > .customer-analysis-heading > .customer-analysis-actions {
    flex: none !important;
    align-self: center !important;
    margin: 0 !important;
  }

  /* The contribution card has no blue inner-band change requested.  Apply
     the flow card's outer naming-row geometry only to its red-marked area. */
  .customer-quick-analysis > .company-overview-host > [data-company-contribution-card] > .customer-analysis-heading {
    box-sizing: border-box !important;
    height: 64px !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    transform: translateY(-10px) !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-contribution-card] > .customer-analysis-heading > .customer-analysis-title-group {
    flex: 0 1 60% !important;
    min-width: 0 !important;
    max-width: 60% !important;
    align-self: center !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-contribution-card] > .customer-analysis-heading > .customer-analysis-actions {
    flex: none !important;
    align-self: center !important;
    margin: 0 !important;
  }

  /* The canvas has its own top band.  Reduce that band instead of moving the
     outer naming row, so the toolbar is centered in the actual chart area. */
  .customer-quick-analysis > .company-overview-host > [data-company-flow-card] > .co-canvas {
    padding-top: 16px !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-trend-card] > .co-canvas {
    padding-top: 16px !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-flow-card] .co-sales-flow-section > .co-flow-toolbar {
    box-sizing: border-box !important;
    height: 56px !important;
    min-height: 56px !important;
    /* The canvas padding leaves an extra upper band.  Pull only this inner
       row upward in normal flow; the naming row above remains untouched. */
    margin: -14px 0 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-flow-card] .co-sales-flow-section > .co-flow-toolbar > .co-flow-search-actions,
  .customer-quick-analysis > .company-overview-host > [data-company-flow-card] .co-sales-flow-section > .co-flow-toolbar > .co-flow-total {
    height: 44px !important;
    align-self: center !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-trend-card] .co-trend-section > .co-section-head {
    box-sizing: border-box !important;
    height: 56px !important;
    min-height: 56px !important;
    margin: -14px 0 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #edf1f6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  /* Give the trend visualization the wider/taller display area indicated by
     the reference frame, without changing any of its controls or series. */
  .customer-quick-analysis > .company-overview-host > [data-company-trend-card] > .co-canvas {
    min-height: 0 !important;
    padding-right: 12px !important;
    padding-left: 12px !important;
    padding-bottom: 20px !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-trend-card] .company-overview-trend-layout {
    min-height: 670px !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-trend-card] .company-overview-trend-layout .customer-combo-chart {
    height: 590px !important;
  }

  .customer-quick-analysis > .company-overview-host > [data-company-trend-card] .co-trend-chart {
    padding-top: 44px !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
  }
}

@media (max-width: 1000px) {
  .customer-quick-analysis > .company-overview-host > [data-company-flow-card] .co-sales-flow-section > .co-flow-toolbar {
    height: auto !important;
    min-height: 54px !important;
    padding: 0 !important;
    align-items: center !important;
  }
}

/* The trend plot should sit directly on the card surface like the flow
   graph; remove only its inherited quick-line-plot frame. */
.customer-quick-analysis > .company-overview-host > [data-company-trend-card] .co-trend-chart {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Shipping bars use the dark quantity color; the matching legend swatch must
   use that same token instead of the generic blue quantity color. */
.customer-quick-analysis > .company-overview-host > [data-company-trend-card] .co-trend-legend i.co-quantity {
  background: #111827 !important;
}
