/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 24px;
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-layout {
    grid-template-columns: 1fr;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== P2 移动端响应式补全（在原有 768px 基础上补齐头部/内边距/详情页/表格）===== */
@media (max-width: 768px) {
  /* 头部：版心内边距收紧，导航不挤 */
  .header { padding: 0; height: 56px; }
  .header-inner { padding: 0 14px; }
  .logo { font-size: 18px; gap: 0.3em; }
  .logo svg { display: none; }
  .header-nav { gap: 2px; }
  .header-nav-primary a { padding: 5px 8px; font-size: 12px; }
  .header-nav-secondary a { padding: 4px 6px; font-size: 11px; }
  .header-right { gap: 6px; }
  /* 主内容区与搜索栏：去掉 40px 重内边距 */
  .content-layout { padding: 14px; gap: 14px; }
  #searchPageBar { padding: 12px 14px !important; }
  /* 详情页：标题行纵向堆叠，动作按钮换行 */
  .detail-header .top-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .detail-header .top-row > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
  .detail-header h1 { font-size: 20px; }
  /* 详情/通用大区块内边距收紧 */
  .detail-section, .sidebar { padding: 14px; }
  /* 统计/分类卡内边距 */
  .stats-bar { gap: 10px; }
  .cat-item { padding: 10px; }
}

@media (max-width: 560px) {
  .header { padding: 0; }
  .header-inner { padding: 0 10px; }
  .logo { font-size: 16px; }
  .logo svg { display: none; }
  .header-nav-primary a { padding: 4px 6px; font-size: 12px; }
  .header-nav-secondary a { padding: 3px 5px; font-size: 11px; }
  /* 头部右侧角色徽章在小屏隐藏，腾出空间 */
  .header-right .role-badge { display: none; }
  .content-layout { padding: 10px; }
  /* hero 标题与统计数字 */
  .hero h1 { font-size: 20px; }
  .stats-bar { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  /* 详情动作按钮更紧凑 */
  .detail-header .top-row > div:last-child .btn,
  .detail-header .top-row > div:last-child button,
  .detail-header .top-row > div:last-child a {
    flex: 1 1 auto; text-align: center; }
  /* 参数网格单列 */
  .param-grid { grid-template-columns: 1fr !important; }
}
