/* ============================================================
   融翼通 移动端响应式适配 mobile.css
   —— 由 js/footer.js 动态注入，≤768px 生效，桌面端零影响
   策略：容器纵向堆叠 / 表格横向滚动 / 弹层全宽 / 触控尺寸
   ============================================================ */
@media (max-width: 768px) {

  /* ---- 全局 ---- */
  body {
    font-size: 14px;
    padding-bottom: 48px !important;
    overflow-x: hidden;
  }
  * { -webkit-tap-highlight-color: transparent; }

  /* ---- 页头 ---- */
  .header {
    padding: 14px 14px !important;
  }
  .header h1 { font-size: 18px !important; }
  .header p { font-size: 12px !important; }

  /* ---- 容器 ---- */
  .container {
    padding: 12px !important;
    max-width: 100% !important;
  }

  /* ---- 统计卡：纵向堆叠 ---- */
  .stats {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .stat-card { padding: 14px 16px !important; }
  .stat-card .value { font-size: 22px !important; }

  /* ---- 工具栏：纵向 ---- */
  .toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px !important;
  }
  .toolbar input, .toolbar select {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* ---- 表格：横向滚动保真 ---- */
  .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- 详情页/内容面板：整面板横滑兜底 ----
     覆盖 JS 动态生成的裸 <table>、.exec-table、.lz-fin-table、
     .incubate-wrap 等没有 .table-wrap 容器的场景；
     子模块全部注入 .main-panel 内，项目详情等页面用 .container。
     仅手机端生效，桌面端零影响（内容不超宽时不产生滚动条）。 */
  .main-panel, .container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- 模块卡片/折叠体：允许横向滚动 ----
     修复：.sub-module / .sub-module-body 等卡片在模块 CSS 中定义为
     overflow:hidden，会在手机端把宽表格/宽 flex 行直接裁掉（内容被截断、
     且不出现横滑）。这里仅放开 X 轴，Y 轴仍 hidden 以保留折叠动画。 */
  .sub-module,
  .sub-module-body,
  .biz-doc-module,
  .biz-shareholder-group,
  .admin-card {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  table { min-width: 560px !important; }
  th, td {
    padding: 8px 10px !important;
    max-width: 180px !important;
  }
  /* 表格内操作按钮：手机端保持紧凑，避免挤压/溢出 */
  .table-wrap .btn, #orig-shareholder-list .btn, .sub-module .btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
  }

  /* ---- 顶部导航：横向滚动 ---- */
  .top-nav {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
  }
  .nav-tab {
    flex: 0 0 auto !important;
    padding: 8px 14px !important;
    white-space: nowrap !important;
  }

  /* ---- Tab 栏 ---- */
  .tab-bar { overflow-x: auto !important; }
  .tab { white-space: nowrap !important; }

  /* ---- 表单栅格：单列 ---- */
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* ---- 弹层：全宽 ---- */
  .modal-dialog {
    width: 96% !important;
    max-width: 96% !important;
    max-height: 90vh !important;
  }
  .modal-body, .modal-header, .modal-footer {
    padding: 12px 14px !important;
  }

  /* ---- 分页 ---- */
  .pagination { flex-wrap: wrap !important; }

  /* ---- 按钮触控尺寸 ---- */
  .btn {
    padding: 10px 16px !important;
    font-size: 15px !important;
  }

  /* ---- 底部状态栏：手机端 hover 不可用，改触控 ---- */
  .sys-footer {
    height: auto !important;
    min-height: 30px;
    line-height: 22px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
    overflow-x: auto !important;
  }
  .sys-footer .sf-ver { margin-left: 0 !important; }
  .sys-footer .sf-env { padding-right: 6px !important; }

  /* 二维码浮层在手机端点击展开 */
  .sf-mobile .sf-qr {
    display: none;
    position: fixed;
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    z-index: 10000;
  }
  .sf-mobile.open .sf-qr { display: block; }

  /* ---- 隐藏桌面专属 -- */
  .desktop-only { display: none !important; }
}
