@media (max-width: 760px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  body { font-size: 14px; }
  button, input, select, textarea { min-height: 44px; }
  input, select, textarea { max-width: 100%; font-size: 16px; }
  button { touch-action: manipulation; }
  .login-view { padding: 18px; align-items: flex-start; }
  .login-panel { width: 100%; max-width: none; margin-top: 8vh; padding: 22px 18px; }
  .login-panel > * { min-width: 0; }
  .app:not(.home-mode) { display: block; padding-bottom: 76px; }
  .app:not(.home-mode) .sidebar {
    display: flex !important; position: fixed; z-index: 100; inset: auto 0 0 0;
    width: 100%; height: 68px; padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border: 0; border-top: 1px solid #29415f; background: #0d1928f5;
    overflow-x: auto; overflow-y: hidden;
  }
  .sidebar .brand, .sidebar > p, .sidebar > small, .sidebar footer { display: none !important; }
  .sidebar nav { display: flex; flex: 1; gap: 6px; min-width: max-content; }
  .sidebar nav a {
    display: grid; place-items: center; min-width: 86px; min-height: 52px;
    padding: 6px 10px; text-align: center; white-space: nowrap;
  }
  main { width: 100%; min-width: 0; padding-bottom: 8px; }
  .topbar { min-height: 0; height: auto; padding: 14px 16px; gap: 12px; }
  .topbar > div, .topbar-actions, .query, .query > *, .hero-actions { width: 100%; }
  .topbar-actions, .query, .hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .topbar-actions button, .query button, .hero-actions button { flex: 1 1 120px; }
  .view, .content, .page-content { padding: 14px !important; }
  .panel, .hero, .card { border-radius: 9px; }
  .grid, .module-grid, .warehouse-grid, .progress-grid, .account-list,
  .module-checks, .product-create-panel, .access-setting-create,
  .dingtalk-bind-box, .quote-form-grid, .contract-form-grid {
    grid-template-columns: 1fr !important;
  }
  .module-card, .account-card { min-width: 0; }
  .product-list-toolbar, .product-pagination, .panel-head {
    align-items: stretch !important; flex-direction: column; gap: 8px;
  }
  .product-list-toolbar input, .product-list-toolbar select,
  .product-pagination button, .product-pagination select { width: 100%; }
  .table-wrap {
    width: calc(100vw - 28px); max-width: 100%; overflow-x: auto;
    overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; border-radius: 8px;
  }
  table { min-width: 720px; }
  th, td { padding: 11px 9px; }
  dialog, .audit-dialog {
    width: 100vw !important; max-width: 100vw !important; height: 100dvh;
    max-height: 100dvh !important; margin: 0; padding: 16px !important; border-radius: 0 !important;
  }
  .dialog-head { padding-right: 48px; }
  .modal, .modal-overlay { padding: 0 !important; }
  .modal-content, .modal-card, .dialog {
    width: 100vw !important; max-width: 100vw !important;
    max-height: 100dvh !important; border-radius: 0 !important;
  }
  #toast { inset: auto 12px calc(78px + env(safe-area-inset-bottom)) 12px; max-width: none; }
}
