/* ============================================
   信创产业追踪系统 - 全局样式表
   设计：深海军蓝 #1B2A4A + 科技蓝 #008CD4
   风格：严谨科技风，扁平化，高信息密度
   ============================================ */

/* ===== CSS 变量 ===== */
:root {
  --c-primary: #1B2A4A;
  --c-accent: #008CD4;
  --c-accent-light: #4DB8E8;
  --c-bg: #FFFFFF;
  --c-bg-card: #F5F7FA;
  --c-bg-hover: #EDF2F7;
  --c-border: #E2E8F0;
  --c-text: #1A202C;
  --c-text-secondary: #4A5568;
  --c-text-muted: #A0AEC0;

  /* 五维配色 */
  --c-situation: #E53935;
  --c-policy: #008CD4;
  --c-industry: #43A047;
  --c-market: #FB8C00;
  --c-enterprise: #8E24AA;

  /* 状态色 */
  --c-high: #E53935;
  --c-medium: #FB8C00;
  --c-low: #43A047;

  /* 尺寸 */
  --sidebar-width: 240px;
  --header-height: 60px;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --transition: all 0.2s ease;
}

/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--c-accent-light); }

/* ===== 布局 ===== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--c-primary);
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-header {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--c-accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.sidebar-logo .logo-text { line-height: 1.2; }
.sidebar-logo .logo-text small { display: block; font-size: 11px; font-weight: 400; color: rgba(255,255,255,0.6); }

.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav .nav-section { margin-bottom: 8px; }
.sidebar-nav .nav-section-title {
  padding: 8px 20px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-left-color: var(--c-accent);
}
.sidebar-nav a.active {
  color: #fff;
  background: rgba(0,140,212,0.15);
  border-left-color: var(--c-accent);
  font-weight: 600;
}
.sidebar-nav .nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== 顶部栏 ===== */
.topbar {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar h1 { font-size: 18px; font-weight: 700; color: var(--c-primary); }
.topbar .breadcrumb { font-size: 13px; color: var(--c-text-muted); }
.topbar-right { display: flex; align-items: center; gap: 16px; }

/* ===== 移动端菜单按钮与抽屉遮罩 ===== */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-primary);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}
.menu-toggle:hover { background: var(--c-bg-hover); border-color: var(--c-accent); }
.menu-toggle:active { background: var(--c-bg-hover); }
.menu-toggle:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

.sidebar-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(16, 26, 45, 0.5);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sidebar-backdrop.show { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

.topbar .date-display {
  font-size: 13px;
  color: var(--c-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar .badge-live {
  background: #FEE;
  color: var(--c-situation);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.badge-live::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--c-situation);
  border-radius: 50%;
  margin-right: 4px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ===== 页面内容 ===== */
.page-content { padding: 24px; flex: 1; }

/* ===== 卡片 ===== */
.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h2, .card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body { padding: 18px; }
.card-body.no-pad { padding: 0; }

/* ===== 统计卡片 ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.stat-card .stat-info { flex: 1; min-width: 0; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--c-primary); line-height: 1.2; overflow-wrap: anywhere; word-break: break-word; }
.stat-card .stat-label { font-size: 13px; color: var(--c-text-muted); }
.stat-card .stat-trend { font-size: 12px; font-weight: 600; }
.stat-trend.up { color: var(--c-industry); }
.stat-trend.down { color: var(--c-situation); }

/* 维度图标配色 */
.stat-icon.bg-situation { background: rgba(229,57,53,0.1); }
.stat-icon.bg-policy { background: rgba(0,140,212,0.1); }
.stat-icon.bg-industry { background: rgba(67,160,71,0.1); }
.stat-icon.bg-market { background: rgba(251,140,0,0.1); }
.stat-icon.bg-enterprise { background: rgba(142,36,170,0.1); }

/* ===== 栅格 ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }

/* ===== 表格 ===== */
.table-wrapper { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data-table th {
  background: var(--c-bg-card);
  color: var(--c-text-secondary);
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid var(--c-border);
  white-space: nowrap;
}
table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}
table.data-table tr:hover td { background: var(--c-bg-hover); }
table.data-table tr:last-child td { border-bottom: none; }

/* ===== 标签/徽章 ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.tag-situation { background: rgba(229,57,53,0.1); color: var(--c-situation); }
.tag-policy { background: rgba(0,140,212,0.1); color: var(--c-policy); }
.tag-industry { background: rgba(67,160,71,0.1); color: var(--c-industry); }
.tag-market { background: rgba(251,140,0,0.1); color: var(--c-market); }
.tag-enterprise { background: rgba(142,36,170,0.1); color: var(--c-enterprise); }

.tag-high { background: rgba(229,57,53,0.1); color: var(--c-high); }
.tag-medium { background: rgba(251,140,0,0.1); color: var(--c-medium); }
.tag-low { background: rgba(67,160,71,0.1); color: var(--c-low); }

.tag-confirmed { background: rgba(67,160,71,0.1); color: var(--c-industry); }
.tag-pending { background: rgba(251,140,0,0.1); color: var(--c-medium); }

/* 维度颜色条 */
.dimension-bar {
  display: inline-block;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.dimension-bar.situation { background: var(--c-situation); }
.dimension-bar.policy { background: var(--c-policy); }
.dimension-bar.industry { background: var(--c-industry); }
.dimension-bar.market { background: var(--c-market); }
.dimension-bar.enterprise { background: var(--c-enterprise); }

/* ===== 信息条目列表 ===== */
.item-list { display: flex; flex-direction: column; gap: 12px; }
.item-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: var(--transition);
  cursor: pointer;
}
.item-card:hover { box-shadow: var(--shadow-md); }
.item-card.dim-situation { border-left-color: var(--c-situation); }
.item-card.dim-policy { border-left-color: var(--c-policy); }
.item-card.dim-industry { border-left-color: var(--c-industry); }
.item-card.dim-market { border-left-color: var(--c-market); }
.item-card.dim-enterprise { border-left-color: var(--c-enterprise); }

.item-card .item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.item-card .item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.5;
  flex: 1;
}
.item-card .item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--c-text-muted);
}
.item-card .item-summary {
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}
.item-card .item-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.item-card .item-source {
  font-size: 12px;
  color: var(--c-text-muted);
}
.item-card .item-tags { display: flex; gap: 4px; flex-wrap: wrap; }

/* ===== 进度条 ===== */
.progress-bar {
  height: 8px;
  background: var(--c-bg-card);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.progress-bar .progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  transition: var(--transition);
}
.btn:hover { background: var(--c-bg-hover); border-color: var(--c-accent); }
.btn-primary { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn-primary:hover { background: #0078B0; }

/* ===== 搜索框 ===== */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 8px 14px;
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  width: 100%;
  color: var(--c-text);
}
.search-box input::placeholder { color: var(--c-text-muted); }

/* ===== 筛选器 ===== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-chip {
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 13px;
  border: 1px solid var(--c-border);
  background: #fff;
  cursor: pointer;
  transition: var(--transition);
  color: var(--c-text-secondary);
}
.filter-chip:hover { border-color: var(--c-accent); color: var(--c-accent); }
.filter-chip.active {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

/* ===== 报告列表项 ===== */
.report-item {
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--accent, var(--c-accent));
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
}
.report-item:hover { box-shadow: var(--shadow-md); }

.report-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.report-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.report-item-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-primary);
  cursor: pointer;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.report-item-title:hover { color: var(--c-accent); text-decoration: underline; }

.report-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.report-item-date { white-space: nowrap; }

.report-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--c-accent);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-accent);
  background: #fff;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.report-download:hover { background: var(--c-accent); color: #fff; }

.report-item-summary {
  font-size: 13px;
  color: var(--c-text-secondary);
  margin-bottom: 8px;
  overflow-wrap: break-word;
}
.report-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: #718096;
}
.report-item-meta > span { white-space: nowrap; }

/* ===== 专题报告卡片 ===== */
.special-card {
  display: block;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px;
  transition: var(--transition);
  text-decoration: none;
}
.special-card.is-ready { cursor: pointer; border-left: 4px solid var(--c-industry); }
.special-card.is-ready:hover { box-shadow: var(--shadow-md); border-color: var(--c-accent); }
.special-card.is-idle { cursor: default; }
.special-card.is-idle:hover { border-color: #CBD5E0; }

.special-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.special-card-head .special-icon { font-size: 20px; flex-shrink: 0; }
.special-card-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--c-primary);
}
.special-card-head .special-badge { margin-left: auto; flex-shrink: 0; }
.special-card-meta { font-size: 12px; color: var(--c-text-muted); margin-top: 6px; }

/* ===== 图表容器 ===== */
.chart-container {
  position: relative;
  width: 100%;
}
.chart-container canvas { max-height: 320px; }
.chart-container .xc-chart svg, .xc-chart svg { max-height: 320px; }

/* ===== 自包含 SVG 图表引擎（charts.js，无 CDN 依赖） ===== */
.xc-chart { width: 100%; }
.xc-chart svg { display: block; margin: 0 auto; }
.xc-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; justify-content: center; }
.xc-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--c-text-secondary); }
.xc-legend-item i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ===== 纯 CSS 条形图（无 Chart.js 依赖） ===== */
.css-bar-chart { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.css-bar-row { display: grid; grid-template-columns: 90px 1fr 48px; align-items: center; gap: 10px; }
.css-bar-label { font-size: 12px; color: var(--c-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.css-bar-track { height: 18px; background: var(--c-bg-card); border-radius: 4px; overflow: hidden; }
.css-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; min-width: 2px; }
.css-bar-value { font-size: 12px; color: var(--c-text); font-weight: 600; text-align: left; }

/* ===== 时间线 ===== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: var(--c-border);
}
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -20px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c-accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--c-accent);
}
.timeline-item.high::before { background: var(--c-situation); box-shadow: 0 0 0 2px var(--c-situation); }
.timeline-item.medium::before { background: var(--c-medium); box-shadow: 0 0 0 2px var(--c-medium); }
.timeline-item .timeline-date { font-size: 12px; color: var(--c-text-muted); margin-bottom: 4px; }
.timeline-item .timeline-title { font-size: 14px; font-weight: 600; color: var(--c-text); margin-bottom: 4px; }
.timeline-item .timeline-desc { font-size: 13px; color: var(--c-text-secondary); }

/* ===== 企业卡片 ===== */
.company-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px;
  transition: var(--transition);
}
.company-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.company-card .company-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.company-card .company-name { font-size: 16px; font-weight: 700; color: var(--c-primary); }
.company-card .company-cat { font-size: 12px; color: var(--c-text-muted); }
.company-card .company-info { font-size: 13px; color: var(--c-text-secondary); margin-bottom: 6px; }
.company-card .company-info strong { color: var(--c-text); }

/* 活跃度分数 */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.score-badge.high { background: rgba(229,57,53,0.1); color: var(--c-situation); }
.score-badge.medium { background: rgba(251,140,0,0.1); color: var(--c-medium); }
.score-badge.normal { background: rgba(67,160,71,0.1); color: var(--c-industry); }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--c-text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ===== 页脚 ===== */
.page-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--c-border);
  text-align: center;
  font-size: 12px;
  color: var(--c-text-muted);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  body { -webkit-text-size-adjust: 100%; }

  /* ===== 侧边栏抽屉 ===== */
  .sidebar {
    width: 78vw;
    max-width: 300px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.35);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-header { padding: 16px; }
  .sidebar-nav a { padding: 12px 20px; font-size: 15px; }
  .sidebar-nav .nav-icon { font-size: 17px; }
  .sidebar-footer { padding: 12px 16px; }

  /* ===== 主内容区 ===== */
  .main-content { margin-left: 0; width: 100%; min-width: 0; }

  /* ===== 顶栏 ===== */
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 12px; }
  .topbar-left { gap: 10px; min-width: 0; flex: 1; }
  .topbar h1 {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar .date-display { display: none; }
  .topbar-right { gap: 8px; flex-shrink: 0; }

  /* ===== 内容栅格 ===== */
  .page-content { padding: 14px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-card .stat-icon { width: 40px; height: 40px; font-size: 20px; }
  .stat-card .stat-value { font-size: 22px; }

  /* 统计卡片数量为奇数时，最后一张通栏收口，避免右侧留白 */
  .stat-grid > .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat-grid > .stat-card:last-child:nth-child(odd) .stat-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
  }
  .stat-grid > .stat-card:last-child:nth-child(odd) .stat-trend { margin-left: auto; }

  /* ===== 卡片与列表 ===== */
  .card-header { flex-wrap: wrap; row-gap: 6px; }
  .card-body { padding: 14px; }
  .item-card { padding: 12px 14px; }
  .item-card .item-header { flex-wrap: wrap; }
  .item-card .item-meta { font-size: 11px; }
  .css-bar-row { grid-template-columns: 72px 1fr 44px; gap: 8px; }
  .table-wrapper { -webkit-overflow-scrolling: touch; }
  table.data-table th, table.data-table td { padding: 9px 10px; }
  .page-footer { padding: 14px 12px; }

  /* ===== 报告列表项：标题独占一行，日期/下载移入次行 ===== */
  .report-item { padding: 13px 14px; }
  .report-item-head {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
  }
  .report-item-main { flex: 1 1 100%; align-items: flex-start; }
  .report-item-title { font-size: 15px; line-height: 1.45; }
  .report-item-actions {
    flex: 1 1 100%;
    width: 100%;
    justify-content: space-between;
    padding-top: 2px;
  }
  .report-item-summary { font-size: 13px; line-height: 1.65; }
  .report-item-meta { gap: 3px 12px; font-size: 12px; line-height: 1.8; }

  /* ===== 筛选器：加大触控热区 ===== */
  .filter-bar { gap: 8px; margin-bottom: 14px; }
  .filter-chip { padding: 7px 14px; font-size: 13px; }

  /* ===== 专题卡片 ===== */
  .special-card { padding: 13px 14px; }
  .special-card-head { flex-wrap: wrap; row-gap: 4px; }
  .special-card-title { font-size: 14px; }
}

@media (max-width: 420px) {
  .topbar .badge-live { display: none; }
  .page-content { padding: 12px; }
  .card-header { padding: 12px 14px; }
  .card-body { padding: 12px; }

  /* 统计卡片保持双列，让首屏更快露出报告列表；同步收紧内距，保证 320px 下不溢出 */
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 12px; gap: 8px; }
  .stat-card .stat-icon { width: 34px; height: 34px; font-size: 17px; }
  .stat-card .stat-value { font-size: 19px; }
  .stat-card .stat-label { font-size: 12px; line-height: 1.35; }
  .stat-card .stat-trend { line-height: 1.35; }

  /* 报告列表项：进一步收窄留白，保证 320px 宽屏可完整显示 */
  .report-item { padding: 12px; margin-bottom: 10px; }
  .report-item-title { font-size: 14px; }
  .report-item-meta { gap: 3px 10px; font-size: 11px; line-height: 1.75; }
  .report-download { padding: 5px 12px; }
  .special-card { padding: 12px; }
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--c-text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.rounded { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow); }
