/* Mobile layout owned only by the Sales Lead dashboard. */
@media (max-width: 768px) {
  body #tab-content .stls-dashboard,
  body #tab-content .stls-dashboard :where(.sr-dashboard-controls,.se-panel,.stls-panel,.stls-route-card) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  body #tab-content .stls-dashboard { overflow-x: hidden !important; }
  body #tab-content .stls-dashboard .sr-dashboard-controls {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    align-items: stretch !important;
    gap: 9px !important;
  }
  body #tab-content .stls-dashboard .sr-dashboard-scope-tabs,
  body #tab-content .stls-dashboard .sr-dashboard-period-tabs {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  body #tab-content .stls-dashboard .sr-dashboard-scope-tabs { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body #tab-content .stls-dashboard .sr-dashboard-period-tabs { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  body #tab-content .stls-dashboard .sr-dashboard-scope-tabs button,
  body #tab-content .stls-dashboard .sr-dashboard-period-tabs button {
    width: 100% !important;
    min-width: 0 !important;
    padding-inline: 6px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
  }
  body #tab-content .stls-dashboard .sr-dashboard-period-picker {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
  }
  body #tab-content .stls-dashboard .sr-dashboard-period-picker > *,
  body #tab-content .stls-dashboard .sr-dashboard-period-picker input,
  body #tab-content .stls-dashboard .sr-dashboard-period-picker select,
  body #tab-content .stls-dashboard .sr-dashboard-period-picker button,
  body #tab-content .stls-dashboard .sr-dashboard-fy-picker {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  body #tab-content .stls-dashboard .sr-dashboard-fy-picker input { width: 100% !important; min-width: 0 !important; }
  body #tab-content .stls-dashboard .stls-table-wrap {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }
  body #tab-content .stls-dashboard .stls-main-grid { grid-template-columns: minmax(0,1fr) !important; }
  body #tab-content .stls-dashboard .stls-route-card > header,
  body #tab-content .stls-dashboard .stls-panel > header {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    align-items: start !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}
@media (max-width: 420px) {
  body #tab-content .stls-dashboard .stls-route-summary,
  body #tab-content .stls-dashboard .stls-detail-summary { grid-template-columns: minmax(0,1fr) !important; }
}
