/* ===== 米宠 jzsp 移动端自适应补丁 (added 2026-08-31) ===== */
@media (max-width: 768px) {
  html, body { overflow-x: hidden !important; }
  *, *::before, *::after { box-sizing: border-box !important; max-width: 100% !important; }
  img, video, canvas, svg, iframe { max-width: 100% !important; height: auto !important; }
  table { max-width: none !important; }
  .table-wrap, [class*="table-wrap"] { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }

  .topbar { padding: 0 12px !important; height: 56px; min-height: 56px !important; }
  .topbar-ver { display: none !important; }

  .body-wrap { flex-direction: column !important; overflow: visible !important; }
  .sidebar {
    width: 100% !important; min-width: 0 !important;
    flex-direction: row !important;
    overflow-x: auto !important; overflow-y: hidden !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    height: auto !important; align-items: center;
  }
  .sidebar-section { display: none !important; }
  .sidebar-nav { display: flex !important; flex-direction: row !important; flex: 0 0 auto !important; }
  .sidebar-item { padding: 10px 14px !important; border-left: none !important; white-space: nowrap; }
  .sidebar-item.sub { padding-left: 14px !important; }

  .main-content { padding: 16px 14px !important; width: 100% !important; }

  .form-row { flex-direction: column !important; }
  [class*="grid"] { grid-template-columns: 1fr !important; }
  .card, [class*="card"] { width: 100% !important; }

  .modal-content { width: 94% !important; max-width: 94% !important; margin: 16px auto !important; }
  .form-actions { flex-direction: column !important; }
  .actions-cell, .platform-cell { white-space: normal !important; }
}
@media (max-width: 480px) {
  .main-content { padding: 12px 10px !important; }
  .topbar { padding: 0 10px !important; }
}
