/* =====================================================
   Mobile Polish — 375px baseline (iPhone SE)
   Phoenix theme handles sidebar collapse via navbar-expand-lg.
   These rules target specific layout issues on priority pages.
   ===================================================== */

@media (max-width: 767px) {

  /* Touch targets */
  .btn-sm { min-height: 40px; }

  /* Trial banner compact */
  div[style*="padding:6px 16px"] { font-size: 11px !important; padding: 4px 8px !important; }

  /* Pipeline Board: horizontal-scroll kanban */
  .kanban-container {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .kanban-column {
    min-width: 85vw !important;
    scroll-snap-align: start;
    flex-shrink: 0 !important;
  }
  .kanban-header .avatar-group { display: none; }

  /* Card Detail: stack main + sidebar */
  .card-detail-wrap { flex-direction: column !important; }
  .card-detail-sidebar { width: 100% !important; order: -1; margin-bottom: 1rem; }
  .card-detail-main { width: 100% !important; }
  .card-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap !important; white-space: nowrap; }
  .card-tabs .nav-item { flex-shrink: 0; }

  /* Analytics: 2x2 now strip */
  .analytics-page .col-md-3 { flex: 0 0 50% !important; max-width: 50% !important; }

  /* Autopsy: sticky scrollable tabs */
  #autopsyTabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap !important;
    position: sticky; top: 0; z-index: 10; background: var(--phoenix-card-bg, #fff); padding-bottom: 0.5rem; }
  #autopsyTabs .nav-item { flex-shrink: 0; }

  /* Stratton panel: full width */
  #stratton-panel { width: 100vw !important; right: -100vw !important; }
  #stratton-panel.stratton-panel--open { right: 0 !important; }

  /* Modals: full screen */
  .modal-dialog { max-width: 100%; margin: 0; }
  .modal-content { border-radius: 0; min-height: 100vh; }

  /* Two-column grids: stack */
  .two-col { grid-template-columns: 1fr !important; }

  /* Wizard: tighter padding */
  .wizard-container { padding: 1rem; }
  .wizard-card { padding: 1.5rem; }
}
