/* ==========================================================================
 * 骑骑养车 ERP · 手机/平板主题层（对齐 tn.qiqiyc.com 手机端）
 * --------------------------------------------------------------------------
 * 加载位置：appshell-mobile.css **之后**（同优先级后写覆盖）。
 * 回滚：注释掉 index.html 里这一行 <link> 即可。
 *
 * 对齐要点（tn 手机端实测）：
 *   · 底部按模块平铺、可横向滚动（模块数多于一屏时不挤成一格）
 *   · 九宫格图标统一淡蓝圆角方块 + 蓝色线性图标
 *   · 卡片 10px 圆角 + 细边框（不做大阴影）
 *   · 主色 #2b7de9
 * ========================================================================== */

@media (max-width: 1199px) {

  :root {
    --mblue: #2b7de9;
    --mblue-d: #1f6ad4;
    --mline: #d6e4f5;
    --mbg: #f4f8fd;
  }

  body { background: var(--mbg); }

  /* ---------- 顶部导航条：更紧凑，贴近金蝶移动端 ---------- */
  #mtop { height: 46px; border-bottom: 1px solid var(--mline); padding: 0 8px; }
  #mtop .mt-title { font-size: 15px; font-weight: 600; color: #12293d; }
  #mtop .mt-btn { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; color: #2b7de9; }
  #mtop .mt-act { height: 30px; padding: 0 10px; border-radius: 6px; font-size: 13px; }
  #mtop .mt-act.solid { background: var(--mblue); color: #fff; }
  #mtop .mt-shop { font-size: 12.5px; padding: 5px 7px; border-radius: 6px; color: #41556b; }
  #mtop .mt-app { background: #e8f2ff; color: var(--mblue); }
  #mtop .mt-pop { border-radius: 10px; border: 1px solid var(--mline); box-shadow: 0 10px 26px rgba(16, 38, 61, .18); }
  #mtop .mt-pop a { font-size: 14px; border-radius: 6px; }

  /* ---------- 底部模块 Tab：横向滚动，模块多也不挤 ---------- */
  .mtab {
    display: flex; overflow-x: auto; overflow-y: hidden;
    justify-content: flex-start; align-items: stretch;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--mline);
    box-shadow: 0 -1px 6px rgba(16, 38, 61, .06);
    padding: 2px 4px calc(2px + env(safe-area-inset-bottom));
  }
  .mtab::-webkit-scrollbar { display: none; }
  .mtab-item {
    flex: 0 0 auto; min-width: 62px; min-height: 48px; padding: 5px 6px 4px;
    gap: 2px; color: #7b8a99; border-radius: 8px;
  }
  .mtab-item svg { width: 20px; height: 20px; opacity: .9; }
  .mtab-item span { font-size: 10.5px; }
  .mtab-item.on { color: var(--mblue); }
  .mtab-item.on svg { opacity: 1; }
  .mtab-item.on span { font-weight: 600; }
  .mtab-item.on::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 22px; height: 2px; border-radius: 0 0 2px 2px; background: var(--mblue);
  }
  /* 选中项始终滚进可视区（JS 里 scrollIntoView 兜底前先给个平滑行为） */
  .mtab { scroll-behavior: smooth; }

  /* 内容区底部留白跟着 Tab 高度走 */
  .content { padding: 10px 10px calc(58px + env(safe-area-inset-bottom)); }

  /* ---------- 卡片：细边框、小圆角，不再大投影 ---------- */
  .card {
    border-radius: 8px; border: 1px solid var(--mline); box-shadow: none;
    padding: 12px; margin-bottom: 10px; background: #fff;
  }
  .card-h { font-size: 14px; font-weight: 600; color: #1f4470; }

  /* ---------- 九宫格：淡蓝图标方块（同金蝶应用中心） ---------- */
  .mn-sec {
    background: #fff; border-radius: 8px; border: 1px solid var(--mline);
    margin-bottom: 10px; overflow: hidden;
  }
  .mn-sec-h {
    padding: 11px 12px 7px; font-size: 13px; font-weight: 600; color: #1f4470;
    display: flex; align-items: center; gap: 6px;
  }
  .mn-sec-h svg { color: var(--mblue); }
  .mn-sec-h em { color: #9fb0c2; font-size: 11px; font-weight: 400; margin-left: auto; }
  .mn-grid { gap: 2px; padding: 2px 4px 8px; }
  .mn-cell { padding: 9px 2px; border-radius: 8px; gap: 5px; }
  .mn-cell .ic {
    width: 38px; height: 38px; border-radius: 10px;
    background: #eaf2fe !important; color: var(--mblue) !important;
  }
  .mn-cell span { font-size: 11.5px; color: #33475b; }
  .mn-cell:active { background: #f0f7ff; }
  .mn-cell.mn-logout .ic { background: #fdecea !important; color: #e5493a !important; }
  .mn-cell.mn-logout span { color: #e5493a; }

  /* 功能搜索框 */
  .msearch { background: #f1f6fc; border: 1px solid var(--mline); border-radius: 8px; height: 38px; }
  .msearch svg { color: #7b8a99; }
  .msearch input { color: #12293d; }

  /* ---------- 首页：hero 收敛成金蝶式浅蓝块 ---------- */
  .mh-hero {
    background: linear-gradient(135deg, #2b7de9, #5aa0f0); border-radius: 10px;
    padding: 13px 14px 11px; margin-bottom: 10px;
  }
  .mh-hero .v { font-size: 25px; }
  .mh-todo, .mh-kpi .k {
    border: 1px solid var(--mline); border-radius: 8px; box-shadow: none; background: #fff;
  }
  .mh-kpi .k .v { font-size: 19px; font-weight: 700; color: #12293d; }

  /* 列表卡片（窄屏表格转卡片）也统一边框口径 */
  .mcard > li.mc { border: 1px solid var(--mline); border-radius: 8px; box-shadow: none; }

  /* 浮动按钮保持主色 */
  .mfab { background: var(--mblue); box-shadow: 0 6px 16px rgba(43, 125, 233, .34); }
  .mfab:active { background: var(--mblue-d); }
}
