/* 移动端适配：只在 ≤700px 生效，桌面样式零改动
   加载位置：构建时注入到所有业务页 </head> 之前，排在页面内联 <style> 之后，
   因此靠层叠顺序 + 必要的 !important 覆盖内联声明。 */
@media (max-width:700px) {

  /* ---------- 骨架：左侧竖栏改为顶部横滑，把 76px 宽度还给内容 ---------- */
  .app{flex-direction:column}
  .sidebar{width:100%;flex-direction:row;align-items:center;overflow-x:auto;overflow-y:hidden;
    padding:6px 8px;gap:2px;border-right:0;border-bottom:1px solid #eaedf2;
    position:sticky;top:0;z-index:60;background:#fff;-webkit-overflow-scrolling:touch}
  .sidebar::-webkit-scrollbar{height:0}
  .nav-item{width:auto;flex:0 0 auto;padding:6px 9px;font-size:10px;gap:2px}
  .nav-item .ico{width:20px;height:20px;font-size:13px}
  .nav-item.active::before{display:none}
  .nav-item.logo{margin-bottom:0;margin-right:2px}
  .nav-item.logo .ico{width:28px;height:28px;font-size:13px}
  .main{min-width:0;width:100%}
  .content{padding:12px 12px 34px;max-width:100%}

  /* ---------- 顶栏 / 页头 ---------- */
  .topbar{height:auto;min-height:42px;padding:8px 12px;flex-wrap:wrap;gap:6px;font-size:12px}
  .topbar .crumb{font-size:12.5px}
  .page-head{flex-direction:column;align-items:stretch;gap:10px;margin-bottom:12px}
  .page-head h1{font-size:18px;letter-spacing:0}
  .page-head .desc{font-size:11.5px}
  .head-btns{width:100%}
  .head-btns .btn{flex:1 1 auto}

  /* ---------- 统计卡：统一两列，压掉行内 repeat(4/5,1fr) ---------- */
  .stats,.stats.c3,.stats.c4,.stats.c5,#cards{grid-template-columns:repeat(2,1fr)!important;gap:10px!important;margin-bottom:14px}
  .stat{padding:12px 13px}
  .stat .lb{font-size:11px}
  .stat .num{font-size:20px;margin-top:5px}
  .stat .sub{font-size:10px}
  .stat .ic{font-size:16px;right:10px;top:10px}

  /* ---------- 筛选条：每项独占一行，select 不再被最长选项撑宽 ---------- */
  .filter{padding:11px 12px;gap:10px;margin-bottom:12px}
  .filter .fitem,.fitem{flex:1 1 100%;min-width:0}
  .filter .fitem input,.filter .fitem select,
  .fitem input,.fitem select{width:100%;min-width:0;max-width:100%}
  .filter .f-btns{margin-left:0;width:100%}
  .filter .f-btns .btn{flex:1 1 auto}
  .quick{gap:6px;margin-bottom:11px}
  .chip{padding:7px 12px}

  /* ---------- 表格：横向可滑，字号收一档，首列不换行 ------------- */
  .tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .table-card{overflow:hidden}
  thead th{font-size:10.5px;padding:8px 8px}
  td{padding:0 8px;font-size:11px;height:40px}
  .th-bar{padding:10px 12px;flex-wrap:wrap;gap:8px}
  .pager{padding:10px 12px;flex-wrap:wrap;gap:8px}

  /* ---------- 触摸目标：按钮不再只有 22px 高 ---------- */
  .btn{padding:10px 14px;font-size:13px}
  .link-btn{padding:8px 6px;font-size:13px}
  .mini-btn{padding:6px 10px;font-size:11px;min-height:30px}
  .pager button{min-height:34px;padding:6px 12px;font-size:12px}
  .tab{padding:11px 14px}
  .modal-hd button{padding:6px 10px}

  /* ---------- 弹窗：接近全屏，表单改单列 --------------------------- */
  .modal-mask{padding:8px;align-items:flex-end}
  .modal{max-width:100%;max-height:92vh;border-radius:12px 12px 0 0}
  .modal-bd{padding:14px}
  .f-grid,.f-grid.c2,.detail-grid,.detail-grid.c2{grid-template-columns:1fr;gap:10px}
  .dt-item .v{font-size:13px}

  /* ---------- 登录页 ------------------------------------------------- */
  .login-card{width:100%;max-width:390px;padding:24px 20px}
  .login-card h2{font-size:19px}

  /* ---------- 工作台模块卡（行内网格，用 !important 覆盖） ---------- */
  .m-grid{grid-template-columns:repeat(2,1fr)!important;gap:10px!important}
  .m-grid .qcard{padding:12px!important;gap:9px!important}
  .m-grid .qcard>div:first-child{width:34px!important;height:34px!important;font-size:17px!important}
  .m-grid2{grid-template-columns:1fr!important}

  /* ---------- 车辆 / 资产页自有网格 ---------------------------------- */
  .vh-due-grid,.vh-kv,.q-grid{grid-template-columns:1fr!important}

  /* ---------- 提示条、时间轴 ---------------------------------------- */
  .note{padding:10px 12px;font-size:11px}
  .timeline{padding-left:10px;margin-left:2px}

  /* 给固定页脚留安全区，避免压住最后一行内容 */
  body{padding-bottom:26px}
}
