:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --border: #e8e8e8;
  --text: #333333;
  --muted: #666666;
  --accent: #1890ff;
  --accent-hover: #096dd9;
  --accent-soft: rgba(24, 144, 255, 0.08);
  --danger: #f5222d;
  --radius: 8px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  --page-max: 1760px;
  --page-width: min(var(--page-max), 96vw);
  --page-gutter: clamp(0.75rem, 1.5vw, 1.5rem);
  --shadow-nav: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);
  /* 报告页卡片（类百度统计层次） */
  --report-line: #e8e8e8;
  --report-surface: #ffffff;
  --report-title: #262626;
  --shadow-report: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  --focus-ring: 0 0 0 2px rgba(24, 144, 255, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

.muted {
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 4px;
  text-decoration: none !important;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: var(--page-gutter);
  top: 0.75rem;
  outline: none;
  box-shadow: var(--focus-ring);
}

a:focus-visible:not(.skip-link),
button:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* 顶部横向导航 + 主内容区 */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topnav {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-nav);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-topnav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  width: var(--page-width);
  max-width: none;
  margin: 0 auto;
  padding: 0.55rem var(--page-gutter);
}

.app-topnav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: #1f1f1f;
  text-decoration: none;
  white-space: nowrap;
}
.app-topnav-brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.app-topnav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.25rem;
  flex: 1;
  min-width: 0;
}

.app-topnav-menu a {
  display: inline-block;
  padding: 0.45rem 0.6rem;
  border-radius: 4px;
  color: #262626;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.app-topnav-menu a:hover {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.app-topnav-menu a.is-active {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.app-topnav-dummy {
  padding: 0.45rem 0.45rem;
  font-size: 0.75rem;
  color: #d9d9d9;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}
.app-topnav-dummy-wide {
  display: none;
}
@media (min-width: 1100px) {
  .app-topnav-dummy-wide {
    display: inline;
  }
}

.nav-user-email {
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  color: #595959;
  word-break: break-all;
  max-width: 200px;
}

.app-topnav-user {
  flex-shrink: 0;
  margin-left: auto;
}

.app-topnav-menu-guest {
  justify-content: flex-end;
  flex: 1;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

main.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem var(--page-gutter) 4rem;
  width: 100%;
}

main.wide {
  max-width: 1100px;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
}

.card.compact {
  padding: 1rem 1.25rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='date'],
input[type='search'],
input[type='number'],
select,
textarea {
  width: 100%;
  max-width: 360px;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #333;
  font-size: 1rem;
}

input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  transition: background-color 0.15s ease, filter 0.15s ease;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.btn.secondary {
  background: #fff;
  border: 1px solid #d9d9d9;
  color: #333;
}
.btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.btn.danger {
  background: var(--danger);
}
.btn.danger:hover {
  filter: brightness(1.05);
}

.alert {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.alert.error {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
}
.alert.success {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
table.data th,
table.data td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
}
table.data th {
  color: var(--muted);
  font-weight: 600;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.embed-box {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  overflow-x: auto;
}
.embed-box code {
  color: #096dd9;
  white-space: pre-wrap;
}

.chart-wrap {
  position: relative;
  height: 280px;
  margin-top: 0.5rem;
}

.pager {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
  color: var(--muted);
}

.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.hero p.lead {
  color: var(--muted);
  max-width: 520px;
  margin: 0.75rem auto 1.5rem;
}

@media (max-width: 768px) {
  .app-topnav-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
  }
  .app-topnav-menu {
    order: 3;
    width: 100%;
    gap: 0.2rem;
    padding-top: 0.25rem;
    border-top: 1px solid #f0f0f0;
  }
  .app-topnav-brand {
    order: 1;
  }
  .app-topnav-user {
    order: 2;
    margin-left: 0;
    align-self: flex-start;
  }
  .nav-user-email {
    max-width: none;
    font-size: 0.72rem;
  }
  .app-topnav-menu a {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 640px) {
  main.container {
    padding: 1.25rem max(0.75rem, var(--page-gutter)) 3rem;
  }
  input[type='text'],
  input[type='email'],
  input[type='password'] {
    max-width: none;
  }
}

/* —— 控制台首页 · 站点表格（宽幅，对齐百度统计类布局） —— */
main.container.wide.tongji-dash-outer {
  max-width: none;
  width: var(--page-width);
  margin-left: auto;
  margin-right: auto;
  padding-top: 1.75rem;
  padding-bottom: 3.5rem;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.tongji-dash {
  padding-bottom: 2rem;
}

.tongji-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  box-shadow: var(--shadow-card);
}

.tongji-dash-tabs {
  flex: 1;
  min-width: 120px;
}

.tongji-dash-tab {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  color: #666;
  border-bottom: 2px solid transparent;
}

.tongji-dash-tab.active {
  color: #1890ff;
  font-weight: 600;
  border-bottom-color: #1890ff;
}

.tongji-dash-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: flex-end;
  max-width: 420px;
}

.tongji-dash-filter-label {
  font-size: 0.85rem;
  color: #666;
  white-space: nowrap;
}

.tongji-dash-search input[type='search'] {
  flex: 1;
  min-width: 120px;
  padding: 0.35rem 0.65rem;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 0.9rem;
  background: #fff;
  color: #333;
}

.tongji-dash-search-btn {
  padding: 0.35rem 0.65rem;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fafafa;
  cursor: pointer;
  color: #666;
}

.tongji-dash-add {
  padding: 0.4rem 0.85rem;
  background: #1890ff;
  color: #fff !important;
  border-radius: 4px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.tongji-dash-add:hover {
  background: #096dd9;
  color: #fff !important;
  text-decoration: none;
}

.tongji-panel {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

.tongji-panel-empty {
  padding: 2rem;
  text-align: center;
  color: #666;
}

.tongji-site-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tongji-site-table thead th {
  background: #fafafa;
  border-bottom: 1px solid #e8e8e8;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.tongji-site-table .sort-hint {
  color: #1890ff;
  font-weight: normal;
}

.tongji-site-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 8px 12px;
  vertical-align: middle;
}

.tongji-site-table tbody tr:hover td {
  background: #fafafa;
}

.tongji-site-table .col-num,
.tongji-site-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tongji-site-table .col-action,
.tongji-site-table .action-cell {
  text-align: center;
  vertical-align: middle;
}

.tongji-site-table .site-cell {
  background: #fff;
  min-width: 180px;
  max-width: 260px;
}

.tongji-site-table .site-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.tongji-site-table .site-domain {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.tongji-site-table .site-meta {
  font-size: 12px;
}

.badge-ok {
  color: #52c41a;
}
.badge-warn {
  color: #faad14;
}

.tongji-site-table .period-label {
  color: #666;
  white-space: nowrap;
  background: #fafafa;
}

.tongji-site-table .muted-num {
  color: #bfbfbf;
}

.tongji-report-link {
  font-weight: 500;
}
.tongji-action-sep {
  color: #d9d9d9;
  margin: 0 0.15rem;
  user-select: none;
}

.tongji-arr {
  margin-left: 4px;
  font-size: 11px;
}
.tongji-arr-up {
  color: #f5222d;
}
.tongji-arr-down {
  color: #52c41a;
}

.tongji-dash-hint {
  margin-top: 1rem;
  font-size: 12px;
  color: #999;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .tongji-dash-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .tongji-dash-search {
    max-width: none;
  }
}

/* —— 实时访客（类百度：灰底、双栏趋势卡、侧栏高亮） —— */
main.report-page.realtime-page {
  background: #f0f2f5;
  padding-top: 0.65rem;
  padding-bottom: 2.5rem;
}

.realtime-page .realtime-page-inner {
  min-height: calc(100vh - 120px);
}

.realtime-report-wrap.report-wrap {
  width: 100%;
}

.report-sidenav-baidu {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.report-sidenav-baidu .report-nav-sub a.active {
  position: relative;
  margin-left: 0;
  padding-left: 1.25rem;
  background: #e6f7ff;
  color: #3385ff;
  font-weight: 600;
  border-radius: 0 4px 4px 0;
}

.report-sidenav-baidu .report-nav-sub a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #3385ff;
  border-radius: 0 2px 2px 0;
}

.realtime-hero-card {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 0;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

@media (max-width: 1000px) {
  .realtime-hero-card {
    grid-template-columns: 1fr;
  }
}

.realtime-hero-left {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid #f0f0f0;
  background: #fafafa;
}

.realtime-hero-label {
  font-size: 13px;
  color: #8c8c8c;
  margin-bottom: 0.5rem;
}

.realtime-hero-num-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.realtime-hero-num {
  font-size: 2.25rem;
  font-weight: 700;
  color: #262626;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.realtime-hero-unit {
  font-size: 15px;
  color: #8c8c8c;
}

.realtime-hero-desc {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.realtime-hero-update {
  font-size: 12px;
  margin: 0;
}

.realtime-hero-chart {
  padding: 0.75rem 1rem 0.5rem;
  min-width: 0;
  background: #fff;
}

.realtime-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
  padding: 0.25rem 0.25rem 0;
}

.realtime-chart-title {
  font-size: 14px;
  font-weight: 600;
  color: #262626;
}

.realtime-chart-canvas-wrap {
  height: 220px;
  position: relative;
  padding: 0 0.25rem 0.25rem;
}

.realtime-detail-card {
  border-radius: 2px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.realtime-detail-card .report-card-hd {
  display: none;
}

.realtime-filter-row {
  padding: 0.75rem 1rem 0;
  border-bottom: 1px solid #f5f5f5;
}

.realtime-device-seg {
  display: inline-flex;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.realtime-device-seg .rt-seg {
  padding: 0.35rem 0.9rem;
  font-size: 13px;
  color: #595959;
  text-decoration: none;
  border-right: 1px solid #e8e8e8;
  background: #fff;
  transition: background 0.12s ease, color 0.12s ease;
}

.realtime-device-seg .rt-seg:last-child {
  border-right: none;
}

.realtime-device-seg .rt-seg:hover {
  color: #3385ff;
}

.realtime-device-seg .rt-seg.active {
  background: #3385ff;
  color: #fff;
  font-weight: 500;
}

.realtime-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.75rem;
  padding: 0.75rem 1rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}

.realtime-search-row .rt-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.realtime-search-row .rt-field-label {
  font-size: 12px;
  color: #8c8c8c;
}

.realtime-search-row input[type='search'],
.realtime-search-row input[type='text'] {
  min-width: 8rem;
  max-width: 16rem;
  padding: 0.4rem 0.5rem;
  font-size: 13px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
}

.realtime-search-row .rt-search-btn {
  margin-bottom: 0;
  padding: 0.4rem 1.1rem;
  font-size: 13px;
  background: #3385ff;
  border-color: #3385ff;
}

.realtime-search-row .rt-search-btn:hover {
  background: #4d94ff;
  border-color: #4d94ff;
}

.realtime-search-row .rt-reset {
  font-size: 13px;
  color: #8c8c8c;
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.realtime-search-row .rt-reset:hover {
  color: #3385ff;
}

.report-realtime-table-baidu th {
  background: #fafafa;
  color: #595959;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid #e8e8e8;
  border-top: none;
  padding: 10px 12px;
}

.report-realtime-table-baidu td {
  font-size: 13px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: top;
  padding: 10px 12px;
}

.report-realtime-table-baidu tbody tr:hover td {
  background: #fafafa;
}

.report-realtime-table-baidu .col-time {
  white-space: nowrap;
  color: #434343;
}

.rt-page-link {
  color: #3385ff;
  text-decoration: none;
  word-break: break-all;
}

.rt-page-link:hover {
  text-decoration: underline;
}

.rt-vid {
  font-size: 12px;
}

/* —— 实时访客（旧摘要块，保留兼容） —— */
.report-realtime-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  background: var(--report-surface);
  border: 1px solid var(--report-line);
  border-radius: 8px;
  box-shadow: var(--shadow-report);
}

.report-realtime-stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.report-realtime-stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: #3385ff;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.report-realtime-stat-label {
  font-size: 14px;
  color: #595959;
}

.report-realtime-meta {
  margin: 0;
  font-size: 12px;
}

.report-realtime-card .report-card-hd {
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}

.report-realtime-table-wrap {
  overflow: auto;
}

.report-realtime-table .cell-num {
  white-space: nowrap;
}

.report-realtime-table .nowrap {
  white-space: nowrap;
}

.report-realtime-table .cell-ua {
  max-width: 14rem;
  font-size: 12px;
}

/* —— 查看报告（网站概况）· 类百度统计版式 —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 与控制台首页同宽幅（百度统计类大屏表格） */
main.report-page {
  max-width: none;
  width: var(--page-width);
  margin-left: auto;
  margin-right: auto;
  padding: 1rem var(--page-gutter) 3rem;
  color: var(--report-title);
}

.report-wrap {
  width: 100%;
}

.report-layout {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.report-sidenav {
  width: 200px;
  flex-shrink: 0;
  background: var(--report-surface);
  border: 1px solid var(--report-line);
  border-radius: 8px;
  padding: 0.4rem 0 0.65rem;
  font-size: 13px;
  box-shadow: var(--shadow-report);
}

.report-sidenav-title {
  padding: 0.65rem 1rem;
  margin: 0 0.5rem 0.6rem;
  background: linear-gradient(90deg, #e6f7ff 0%, #f0f9ff 100%);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  color: var(--report-title);
  font-weight: 600;
}

.report-nav-group summary {
  padding: 0.45rem 1rem;
  cursor: pointer;
  color: #666;
  font-weight: 500;
  list-style: none;
}
.report-nav-group summary::-webkit-details-marker {
  display: none;
}

.report-nav-sub {
  padding: 0 0 0.35rem;
}

.report-nav-sub a {
  display: block;
  padding: 0.35rem 1rem 0.35rem 1.5rem;
  color: #333;
  font-size: 13px;
  text-decoration: none;
  border-radius: 0 4px 4px 0;
}
.report-nav-sub a:hover {
  background: #fafafa;
  color: #1890ff;
}
.report-nav-sub a.active {
  color: #1890ff;
  font-weight: 600;
  background: #f0f7ff;
}

.report-nav-muted {
  display: block;
  padding: 0.25rem 1rem 0.25rem 1.5rem;
  color: #bfbfbf;
  font-size: 12px;
  cursor: default;
}

.report-maincol {
  flex: 1;
  min-width: 0;
  padding-left: 1.15rem;
}

.report-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--report-line);
}

.report-page-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--report-title);
}
.report-title-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.35rem;
  border-radius: 50%;
  background: #52c41a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
}

.report-topbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  font-size: 13px;
}

.report-site-name {
  color: #666;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-site-select {
  max-width: 220px;
  padding: 0.35rem 1.75rem 0.35rem 0.5rem;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  color: #333;
}

.report-link-muted {
  color: #666;
  text-decoration: none;
  font-size: 13px;
}
.report-link-muted:hover {
  color: #1890ff;
  text-decoration: none;
}

.report-kpi-card {
  background: var(--report-surface);
  border: 1px solid var(--report-line);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-report);
}

.report-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  border-bottom: 1px solid var(--report-line);
}

.report-kpi-head-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--report-title);
}

.report-kpi-table-wrap {
  overflow: auto;
}

.report-kpi-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.report-kpi-table th {
  background: #fafafa;
  border: none;
  border-bottom: 1px solid var(--report-line);
  padding: 11px 10px;
  text-align: center;
  font-weight: 600;
  color: #595959;
  white-space: nowrap;
}
.report-kpi-table td {
  border: none;
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 10px;
  text-align: center;
  vertical-align: middle;
  transition: background-color 0.15s ease;
}
.report-kpi-table tbody tr:last-child td {
  border-bottom: none;
}
.report-kpi-table tbody tr:nth-child(1) td {
  background: rgba(24, 144, 255, 0.04);
}
.report-kpi-table tbody tr:nth-child(1) td.period-cell {
  background: linear-gradient(90deg, #f0f7ff 0%, rgba(24, 144, 255, 0.06) 100%);
}
.report-kpi-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}
.report-kpi-table tbody tr:nth-child(1):hover td {
  background: rgba(24, 144, 255, 0.07);
}
.report-kpi-table tbody tr:nth-child(1):hover td.period-cell {
  background: linear-gradient(90deg, #e6f4ff 0%, rgba(24, 144, 255, 0.09) 100%);
}
.report-kpi-table .period-cell {
  color: #595959;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  padding-left: 14px;
  border-right: 1px solid #f5f5f5;
}
.report-kpi-table .kpi-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--report-title);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.report-kpi-table .kpi-num-sub {
  font-size: 1rem;
  font-weight: 600;
  color: #434343;
  font-variant-numeric: tabular-nums;
}

.report-range-shell {
  background: var(--report-surface);
  border: 1px solid var(--report-line);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-report);
}

.report-range-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.report-range-tab {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  color: #595959;
  background: #fff;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.report-range-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}
.report-range-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(24, 144, 255, 0.35);
}

.report-chart-row {
  margin-bottom: 1rem;
}

.report-chart-with-side {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1rem;
}

.report-chart-main {
  flex: 1 1 360px;
  min-width: 0;
}

.report-chart-side {
  flex: 0 1 340px;
  min-width: 260px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
}

.report-card-search-kw {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.report-search-kw-bd {
  flex: 1;
  overflow: auto;
  max-height: 320px;
}

.report-card-trend {
  padding-top: 0;
}

.report-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.report-trend-hd-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #262626;
  letter-spacing: -0.02em;
}

.report-trend-hd-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #bfbfbf;
  font-size: 18px;
  line-height: 1;
  user-select: none;
  background: #fafafa;
}

.report-trend-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--report-line);
  background: #fff;
}

.report-metric-segment {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.report-metric-tab {
  margin: 0;
  padding: 0.42rem 1rem;
  border: none;
  border-right: 1px solid #e8e8e8;
  border-radius: 0;
  background: #fff;
  color: #595959;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.report-metric-tab:hover {
  color: #3385ff;
}
.report-metric-tab.active {
  background: #3385ff;
  color: #fff;
}

.report-metric-other-dd {
  display: flex;
  align-items: stretch;
  border-left: 1px solid #e8e8e8;
  margin-left: -1px;
}

.report-metric-select {
  margin: 0;
  padding: 0.42rem 2rem 0.42rem 0.75rem;
  border: none;
  font-size: 13px;
  font-family: inherit;
  color: #595959;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E")
    no-repeat right 0.5rem center;
  cursor: pointer;
  min-width: 5.5rem;
  appearance: none;
  -webkit-appearance: none;
}
.report-metric-select:focus {
  outline: none;
  background-color: #fafafa;
}

.report-compare {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  font-size: 13px;
  color: #595959;
}
.report-compare-label {
  color: #8c8c8c;
}
.report-compare-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  margin: 0;
}
.report-compare-item input {
  margin: 0;
}

.report-card {
  background: var(--report-surface);
  border: 1px solid var(--report-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-report);
  transition: box-shadow 0.2s ease;
}
.report-card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.07);
}

.report-card-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--report-line);
  font-size: 14px;
  font-weight: 600;
  color: var(--report-title);
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}
.report-card-hd .more {
  color: #bfbfbf;
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
}
.report-card-hd > div:first-child {
  min-width: 0;
}
.report-card-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 0.2rem;
  color: #8c8c8c;
}
.report-card-hint {
  font-size: 12px;
  font-weight: 400;
}

.report-chart-canvas-wrap {
  padding: 0 0.5rem 0.75rem;
}

.report-trend-chart {
  height: 300px;
}

.report-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-bottom: 1.1rem;
}

.report-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.report-mini-table th {
  text-align: left;
  padding: 9px 14px;
  background: #fafafa;
  border-bottom: 1px solid var(--report-line);
  color: #595959;
  font-weight: 600;
  font-size: 12px;
}
.report-mini-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
}
.report-mini-table tbody tr:hover td {
  background: rgba(24, 144, 255, 0.03);
}
.report-mini-table .cell-path {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.report-mini-table .cell-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  width: 4.5rem;
}

.report-ratio-cell {
  min-width: 100px;
  max-width: 140px;
}
.report-ratio-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 5px;
}
.report-ratio-fill {
  height: 100%;
  background: linear-gradient(90deg, #91d5ff, #1890ff);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(24, 144, 255, 0.12) inset;
}

.report-newold-head {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-around;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--report-line);
  text-align: center;
  background: linear-gradient(135deg, #f6ffed 0%, #f0f9ff 45%, #faf5ff 100%);
}
.report-newold-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 120% at 20% 0%, rgba(82, 196, 26, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 100% at 85% 100%, rgba(114, 46, 209, 0.08), transparent 50%);
  pointer-events: none;
}
.report-newold-head > div {
  position: relative;
  z-index: 1;
}
.report-newold-big {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.report-newold-big.old {
  color: #722ed1;
}
.report-newold-label {
  font-size: 12px;
  color: #8c8c8c;
  margin-top: 0.35rem;
  max-width: 11rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.45;
}
.report-newold-table .cell-num {
  width: auto;
}

.report-geo-card {
  margin-bottom: 1rem;
}
.report-geo-placeholder {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 13px;
  padding: 1.25rem;
  text-align: center;
  line-height: 1.6;
}

.report-setup {
  margin-top: 1rem;
  border: 1px solid var(--report-line);
  border-radius: 8px;
  background: var(--report-surface);
  box-shadow: var(--shadow-report);
}
.report-setup summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
}
.report-setup summary::-webkit-details-marker {
  display: none;
}
.report-setup .report-setup-inner {
  padding: 0 1rem 1rem;
  border-top: 1px solid #f0f0f0;
}

@media (max-width: 1100px) {
  .report-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .report-layout {
    flex-direction: column;
  }
  .report-sidenav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
  }
  .report-sidenav-title {
    flex: 1 1 100%;
    margin: 0 0 0.35rem;
  }
  .report-nav-group {
    flex: 1 1 auto;
    min-width: 140px;
    border: 1px solid #f5f5f5;
    border-radius: 4px;
    padding: 0.25rem 0;
  }
  .report-maincol {
    padding-left: 0;
    padding-top: 0.75rem;
  }
  .report-trend-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .report-compare {
    justify-content: flex-start;
  }
  .report-chart-with-side {
    flex-direction: column;
  }
  .report-chart-side {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
  }
  .report-search-kw-bd {
    max-height: none;
  }
}

@media print {
  .skip-link,
  .app-topnav {
    display: none !important;
  }
  body {
    background: #fff !important;
  }
  main {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
  }
  .card,
  .tongji-panel,
  .report-card,
  .report-kpi-card,
  .report-range-shell {
    box-shadow: none !important;
    break-inside: avoid;
  }
}
