/* ============================================================
   横向溢出修复补丁  ·  zovo_card_cdk_auto v1.4.30
   用途：修复后台 3 个页面在移动端/窄屏的横向溢出（scrollWidth > clientWidth）
   用法：放进 web/ 目录，在 web/index.html 的 </head> 前加一行
         <link rel="stylesheet" href="/mobile-fix.css">
   说明：纯 CSS 覆盖，不改上游源码；官方一键热更新会覆盖 web/，
        更新后需重新执行 apply-mobile-fix.sh
   ============================================================ */

/* --- 1. 根因A：长串 / URL / 报错文本不换行，把 grid track 撑宽 --- */
/* 典型：版本更新面板显示 "GitHub: Get "https://api.github.com/...": x509 ..."
   服务器访问不了 GitHub 时必现，不只是预览环境问题 */
.card,
.card *,
.alert,
.alert * {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --- 2. 根因B：Element Plus 复选框长标签不换行 --- */
/* 典型：「确认未扣款/失败后自动换卡（关闭=发 no_auto_card_switch）」
   含无空格长英文串 no_auto_card_switch，min-content 撑到 412px */
.el-checkbox {
  white-space: normal !important;
  max-width: 100%;
}
.el-checkbox__label {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word;
}

/* --- 3. 根因C：Element Plus 分页组件 flex nowrap 不换行 --- */
/* 典型：/008/orders 底部分页在 390px 下撑到 442px */
.el-pagination {
  flex-wrap: wrap !important;
  white-space: normal !important;
  row-gap: 8px;
  max-width: 100%;
}
.el-pagination > * {
  flex-shrink: 1;
}

/* --- 4. 加固：grid / flex 子项默认 min-width:auto 会撑破轨道 --- */
.grid > *,
.flex > *,
.page,
.pb-2,
.space-y-3,
.space-y-5,
.space-y-8 {
  min-width: 0;
}

/* --- 5. 加固：表格自身由 el-table 内部滚动容器接管，不许外溢 --- */
.el-table,
.el-table__inner-wrapper,
.el-scrollbar,
.el-scrollbar__wrap {
  max-width: 100%;
}

/* --- 6. 兜底：任何元素都不得把文档撑出视口 --- */
html,
body {
  overflow-x: hidden;
}
