/**
 * 公开报告 /report/{token} — 手机端适配（v1.1.6）
 * 通过 admin.html / index.html 引入，不修改官方构建产物。
 * 升级 public/assets 后须保留本文件并在 HTML 中重新注入 link。
 */

html {
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 768px) {
  .public-report {
    padding: 0 12px !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .public-report::before {
    height: 140px !important;
  }

  .report-content {
    padding: 12px 0 !important;
    max-width: 100% !important;
  }

  .report-header {
    margin-bottom: 20px !important;
  }

  .report-header h1 {
    font-size: 22px !important;
    line-height: 1.3;
    word-break: break-word;
  }

  .stats-summary {
    padding: 14px !important;
    margin-bottom: 16px !important;
  }

  .stats-cards {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .stat-card {
    flex: none !important;
    width: 100% !important;
    padding: 16px 12px !important;
  }

  .stat-value {
    font-size: 30px !important;
  }

  /* 官方 CSS 只适配了 charts-row，补丁页实际用 charts-section */
  .charts-section,
  [class*="charts-section"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
  }

  .charts-row,
  [class*="charts-row"] {
    grid-template-columns: 1fr !important;
  }

  .chart-card {
    padding: 14px !important;
    min-width: 0 !important;
  }

  .chart-container {
    height: 240px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  .chart-container > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  .platform-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .detail-section {
    padding: 14px !important;
    margin-top: 12px !important;
    overflow: hidden;
  }

  .detail-header,
  .list-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .detail-filters,
  .filters {
    width: 100% !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .filter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .detail-filters .el-select,
  .detail-filters .el-input,
  .filters .el-select,
  .filters .el-input,
  .filter-select,
  .filter-input {
    width: 100% !important;
    max-width: 100% !important;
  }

  .public-report .el-table__inner-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .watermark {
    margin: 20px 0 8px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 480px) {
  .platform-stats {
    grid-template-columns: 1fr !important;
  }

  .stat-value {
    font-size: 26px !important;
  }

  .chart-container {
    height: 220px !important;
  }
}
