/* 管理端全局紧凑与滚动修复：避免“显示不全/无法滚动” */
.mp-body.mp-compact .mp-main { height: auto !important; min-height: 100dvh; overflow: auto; padding-bottom: calc(64px + var(--mp-safe-area-bottom)); }
.mp-body.mp-compact .mp-content { overflow: visible !important; }
.mp-body.mp-compact .mp-table-container { max-height: unset; overflow: auto; }
.mp-body.mp-compact .mp-page-header { margin-bottom: 12px; padding-bottom: 8px; }
.mp-body.mp-compact .mp-page-actions .mp-btn { padding: 6px 10px; }

/* 全站移动端适配增量样式（不入侵各页面模板） */

/* 通用：缩小外边距与内边距 */
@media (max-width: 900px) {
  .mp-main { padding-bottom: calc(64px + var(--mp-safe-area-bottom)); }
  .mp-content { padding: 10px; }
  .mp-page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .mp-page-actions { width: 100%; display:flex; gap:10px; }
  .mp-page-actions .mp-btn { flex: 1; }
  .mp-function-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (max-width: 600px) {
  .mp-function-grid { grid-template-columns: 1fr; }
}

/* 表格紧凑化 */
@media (max-width: 1024px) {
  .mp-table-container { overflow-x: auto; }
  .mp-table { min-width: 840px; }
}

@media (max-width: 768px) {
  .mp-table td, .mp-table th { padding: 6px 8px; }
}

/* 表单栅格：自动变单列 */
@media (max-width: 900px) {
  .mp-form-grid { grid-template-columns: 1fr !important; }
}

/* 订单管理页按钮折叠 */
@media (max-width: 900px) {
  .mp-actions { display:flex; flex-wrap: wrap; gap:6px; }
  .mp-actions .mp-btn { padding: 6px 8px; }
}

/* 游戏管理自适应网格 */
@media (max-width: 1100px) {
  .mp-games-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; }
}
@media (max-width: 600px) {
  .mp-games-grid { grid-template-columns: 1fr !important; }
}

/* 钱包管理：卡片换行 */
@media (max-width: 1100px) {
  .mp-wallet-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
}
@media (max-width: 600px) {
  .mp-wallet-stats { grid-template-columns: 1fr; }
}

/* 底部TabBar固定并保留安全区 */
.mp-tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; padding-bottom: calc(var(--mp-space-xs) + var(--mp-safe-area-bottom)); }

