/* ===== ZX 面板 · 移动端适配（≤900px）v1 ===== */
@media (max-width: 900px) {
  html, body { overflow-x: hidden !important; }

  /* 侧边栏 → 抽屉 */
  .ant-layout-sider {
    position: fixed !important;
    top: 0 !important; left: 0 !important; bottom: 0 !important;
    height: 100vh !important;
    width: 74vw !important;
    min-width: 0 !important;
    max-width: 300px !important;
    flex: 0 0 auto !important;
    z-index: 1301 !important;
    transform: translateX(-105%);
    transition: transform .26s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 12px 48px rgba(0,0,0,.7);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.zxm-nav-open .ant-layout-sider { transform: translateX(0); }

  #zxm-mask {
    position: fixed; inset: 0; z-index: 1300;
    background: rgba(0,0,0,.52);
    opacity: 0; pointer-events: none;
    transition: opacity .26s;
  }
  body.zxm-nav-open #zxm-mask { opacity: 1; pointer-events: auto; }

  /* 顶部条 */
  #zxm-topbar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 1200;
    margin: -12px -12px 12px;
    padding: 10px 12px;
    background: rgba(13,15,18,.97);
    border-bottom: 1px solid rgba(40,45,50,.95);
  }
  #zxm-burger {
    width: 40px; height: 40px; flex: 0 0 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(74,82,95,.95); border-radius: 10px;
    background: rgba(32,36,43,.95); color: #d8dbe1;
    font-size: 17px; line-height: 1; padding: 0; cursor: pointer;
  }
  #zxm-burger:active { background: rgba(60,68,80,.95); }
  #zxm-brand { min-width: 0; flex: 1 1 auto; }
  #zxm-brand b { display: block; font-size: 14px; font-weight: 600; color: #dbdde3; }
  #zxm-brand span { display: block; font-size: 11px; color: #8b93a1; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* 内容区 */
  .ant-layout-content { padding: 12px !important; width: 100% !important; }
  .ant-layout-header { padding: 0 12px !important; }

  /* 多列网格 → 单列 */
  div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  /* 卡片内边距 */
  div[style*="border-radius: 12px"][style*="padding: 16px"] { padding: 12px !important; }

  /* 表格可横滑 */
  .ant-table-wrapper, .ant-table-container, .ant-table-content { overflow-x: auto !important; }
  .ant-table { font-size: 12px !important; }
  .ant-table-cell { padding: 8px 6px !important; }

  /* 网格子项防被内容撑破 */
  div[style*="grid-template-columns"] > * { min-width: 0 !important; }

  /* 应用预览：缩小 + 可横滑，不撑出屏幕 */
  div[style*="zoom: 0.7"] { zoom: .45 !important; width: 100% !important; }
  div[style*="zoom: 0.7"] > div { flex-wrap: wrap !important; justify-content: center !important; }
  div:has(> div[style*="zoom: 0.7"]) { max-width: 100% !important; }

  /* 自定义浮层适配 */
  div[style*="position: fixed"][style*="z-index: 50"] > div { width: 92vw !important; max-width: 92vw !important; }

  /* 横向行允许换行，避免成排行内元素顶出屏幕 */
  div[style*="display: flex"] { flex-wrap: wrap !important; }
  div[style*="height: 32px"][style*="border-radius: 8px"] { height: auto !important; min-height: 32px; }

  /* 标题缩放 */
  .rc-header { font-size: 16px !important; }
  h1 { font-size: 20px !important; }
  h2 { font-size: 17px !important; }
  h3 { font-size: 15px !important; }

  .ant-drawer-content-wrapper { max-width: 100vw !important; }
}
