/* 移动端适配补丁 v4：单列布局 + 侧边栏抽屉可正常展开 */
@media (max-width: 900px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  .shell { display: block !important; height: auto !important; min-height: 100vh; }
  /* 仅在未展开时隐藏侧边栏，保证点菜单能打开 */
  .shell:not(.nav-open) > .sidebar { display: none !important; }
  .shell.nav-open > .sidebar {
    display: flex !important;
    visibility: visible !important;
    position: fixed;
    left: 0; top: 52px; bottom: 0;
    width: 224px;
    z-index: 60;
    box-shadow: 3px 0 12px #122c4440;
  }
  .main { overflow: visible !important; min-width: 0 !important; }
  .content { overflow: visible !important; padding: 12px !important; width: auto !important; }
  .stats { grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; }
  .overview-top { grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; }
  .overview-bottom { grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; }
  .stats > *, .overview-top > * { min-width: 0 !important; max-width: 100% !important; }
  .dashboard-grid, .flow, .metric-list, .pack-grid,
  .pack-check-grid, .form-grid, .detail-grid, .company-description {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .stat, .card, .overview-card, .page-panel { min-width: 0 !important; max-width: 100% !important; }
  .overview-card h2 { white-space: normal; padding: 12px 14px !important; }
  .overview-chart { min-height: 170px !important; padding: 10px 4px !important; }
  .overview-chart svg { width: 100% !important; height: auto !important; max-height: 240px !important; }
  svg, img, canvas { max-width: 100% !important; }
  .topbar { height: auto !important; flex-wrap: wrap; padding: 10px 12px !important; }
  .company-select { max-width: 100% !important; }
  .table-wrap { overflow-x: auto; }
  .modal, .modal.wide { width: auto !important; max-width: 100% !important; }
  input, select, textarea { max-width: 100% !important; }
  .heading h1 { font-size: 19px; }
}
