
/* Final responsive guardrails for modules declared after the base breakpoints. */
@media (max-width: 860px) {
  .profile-management-grid,
  .coach-management-grid,
  .storefront-grid,
  .marketing-sub-grid,
  .ledger-columns,
  .automation-builder-grid,
  .ops-monitor-grid,
  .handoff-guide,
  .handoff-section-grid,
  .handoff-flow-card dl {
    grid-template-columns: 1fr;
  }

  .data-row,
  .checkin-row,
  .report-action-row,
  .class-action-row,
  .finance-action-row,
  .portal-row,
  .inventory-stock-row,
  .run-row,
  .payroll-row,
  .ops-row,
  .handoff-request-table-row {
    --row-template: 1fr;
    align-items: start;
    gap: 6px;
    min-height: 0;
    padding: 13px 14px;
  }

  .data-row em {
    justify-self: start;
    text-align: left;
    white-space: normal;
  }

  .stock-stepper {
    width: min(180px, 100%);
  }

  .checkout-panel {
    position: static;
  }

  .schedule-command-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-view-switcher {
    width: 100%;
  }

  .schedule-view-switcher a {
    min-width: 0;
  }

  .schedule-day-view {
    padding: 12px;
  }

  .schedule-day-view .schedule-event {
    grid-template-columns: minmax(112px, .5fr) minmax(160px, 1fr);
  }

  .schedule-day-view .schedule-event-meta,
  .schedule-day-view .schedule-capacity {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .marketing-totals,
  .storefront-metrics,
  .product-grid,
  .campaign-grid,
  .profile-facts,
  .coach-kpi-strip,
  .assignment-grid,
  .payroll-summary-grid,
  .target-grid,
  .ops-metric-strip,
  .plan-monitor-grid,
  .intake-grid {
    grid-template-columns: 1fr;
  }

  .automation-step-card,
  .cart-row,
  .task-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .automation-step-card .row-actions,
  .cart-row > div:last-child,
  .task-row-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .schedule-period-controls {
    display: grid;
    grid-template-columns: 34px auto 34px;
  }

  .schedule-period-label {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 7px 0 0;
  }

  .schedule-day-view .schedule-event {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .schedule-day-view .schedule-event-meta,
  .schedule-day-view .schedule-capacity {
    grid-column: auto;
  }

  .schedule-event h3 {
    white-space: normal;
  }
}
