/**
 * 百优体育 · 子系统通用移动端优化（在 style.css / portal.css 之后引入）
 * 适配：表格横向滚动 / 表单与按钮触屏尺寸 / 侧边栏遮罩 / 弹窗 / 布局
 */
@media (max-width: 768px) {
  /* 侧边栏遮罩：若子系统已用 .sidebar-backdrop 且默认 display:none，这里启用 */
  .sidebar-backdrop { display: block; }

  /* 内容区边距 */
  .content { padding: 14px; }

  /* 表格横向滚动（避免撑破页面） */
  .table-wrap,
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
    width: 100%;
  }
  .table-wrap table { min-width: 560px; } /* 窄表自动出现横向滚动条 */

  /* 筛选栏换行 */
  .filter-bar,
  .stat-grid,
  .card-header { flex-wrap: wrap; gap: 8px; }
  .filter-bar .btn, .filter-bar .form-control, .filter-bar select, .filter-bar input { margin-bottom: 4px; }

  /* 触屏友好按钮/输入 */
  .btn { min-height: 36px; }
  .btn-sm { min-height: 30px; }
  .form-control, .filter-bar input, .filter-bar select, textarea.form-control {
    min-height: 40px;
    font-size: 16px; /* 防 iOS 聚焦自动放大 */
  }
  .btn, .form-control { font-size: 14px; }

  /* 弹窗适配 */
  .modal-body { max-height: 72vh; overflow: auto; -webkit-overflow-scrolling: touch; }
  .modal-footer { flex-wrap: wrap; gap: 8px; }
  .modal-footer .btn { flex: 1; min-width: 0; }

  /* 通用网格收窄 */
  .chart-row, .checkin-grid, .detail-grid,
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }

  /* 统计卡 2 列 */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .value { font-size: 20px; }
  .stat-card .label { font-size: 12px; }

  /* 文本基础尺寸 */
  body { font-size: 14px; }
  .card-title { font-size: 14px; }
  .text-sm { font-size: 12px; }

  /* 表格单元格最小行高，触屏易点 */
  td, th { padding: 8px 10px; }

  /* 头像/缩略图 */
  .avatar { width: 40px; height: 40px; }
}
