/* =============================================
   亚太统计分析系统 · 看板 / Landing
   ============================================= */

/* 无外部 CDN；如需恢复在线字体，在下方取消注释并重新发布资源即可。 */
/* @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;700;900&display=swap'); */
/* =============================================
   亚太统计分析系统 · 重新设计 v2
   排版：参考图2（高信息密度 + 右侧边栏 + 4列指标卡）
   配色：参考图1（浅蓝渐变 + 柔和蓝色体系）
   字体：思源黑体 + Roboto 数字体
   解决：走查问题清单 10 项全部
   ============================================= */

/* 思源黑体 (Noto Sans SC = 思源黑体 Google Fonts 版) */
/* fonts intentionally omitted: offline-capable single-shell webview deployment */\n/* remove only if future design restores local web/CSS assets */

:root {
  /* 蓝色体系（参考图1柔和蓝） */
  --blue-50:  #F0F7FF;
  --blue-100: #E0EFFF;
  --blue-200: #C7DDFF;
  --blue-300: #A0C4FF;
  --blue-400: #6EA8FE;
  --blue-500: #4080F0;
  --blue-600: #2B6BDB;   /* 主色 */
  --blue-700: #1B56C4;
  --blue-800: #1540A0;
  --blue-900: #0D2B6E;

  /* 辅助色 */
  --teal-50:  #EFFDF6;
  --teal-500: #14B8A6;
  --green-50: #ECFDF5;
  --green-500: #22C55E;
  --green-600: #16A34A;
  --amber-50: #FFFBEB;
  --amber-500: #F59E0B;
  --red-50:   #FEF2F2;
  --red-500:  #EF4444;

  /* 灰阶 */
  --gray-25:  #FCFDFE;
  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-150: #EEF0F2;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.04);

  --font: "Noto Sans SC", "Source Han Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --num: "Roboto", "Roboto Condensed", -apple-system, "Noto Sans SC", sans-serif;
  --mono: "Roboto Condensed", "Roboto", monospace;

  /* 布局 */
  --sidebar-w: 280px;
  --header-h: 52px;
  --content-max: 100%;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--gray-700); background: var(--gray-50); line-height: 1.5; }

/* ============ 顶部导航（参考图1窄导航） ============ */
.header {
  height: var(--header-h);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 48px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 24px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 12px;
}

.header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -0.2px;
}

.header-title-en {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 400;
  margin-left: 2px;
}

/* 搜索栏（参考图1） */
.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.header-search input {
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  color: var(--gray-700);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 7px 14px 7px 34px;
  outline: none;
  transition: all 0.15s;
}

.header-search input:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(64,128,240,0.1);
  background: white;
}

.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 13px;
}

.header-search .search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: var(--blue-600);
  border: none;
  border-radius: 16px;
  padding: 4px 14px;
  cursor: pointer;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

/* 语言切换按钮 */
.lang-toggle {
  padding: 7px 14px;
  background: #fff;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-toggle:hover { border-color: var(--blue-300); color: var(--blue-600); }

.header-year {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
}

.header-year select {
  font-family: var(--num);
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-600);
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  letter-spacing: 0.3px;
}

.header-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-500);
  font-size: 14px;
  transition: all 0.15s;
}

.header-icon-btn:hover { background: var(--gray-50); color: var(--gray-700); }

.header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-300));
  color: white;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ============ 布局主体 ============ */
.layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 48px 40px;
  gap: 20px;
}

.content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============ 标题区 ============ */
.page-header {
  margin-bottom: 20px;
  text-align: center;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.page-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
  font-weight: 400;
}

/* ============ 查询工作台 ============ */
.workbench {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
  margin-bottom: 20px;
}

.wb-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-150);
  padding: 0 20px;
}

.wb-tab {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  background: none;
  border: none;
  padding: 12px 14px 8px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wb-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  border-radius: 1px 1px 0 0;
}

.wb-tab:hover { color: var(--gray-700); }
.wb-tab.active { color: var(--blue-600); font-weight: 600; }
.wb-tab.active::after { background: var(--blue-600); }

.wb-body { padding: 20px; }
.wb-panel { display: none; }
.wb-panel.active { display: block; }

/* 输入行 */
.query-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.query-input {
  flex: 1;
  font-family: var(--font);
  font-size: 13px;
  color: var(--gray-800);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  outline: none;
  transition: all 0.15s;
}

.query-input:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(64,128,240,0.08);
  background: white;
}

.query-input::placeholder { color: var(--gray-400); }

/* select 下拉框：隐藏原生箭头，用居中的自定义箭头 */
select.query-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gray-500) 50%),
    linear-gradient(135deg, var(--gray-500) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
  cursor: pointer;
}

select.query-input:hover {
  border-color: var(--blue-300);
}

select.query-input:focus {
  border-color: var(--blue-400);
  background: white;
}

.query-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.query-suggestions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.suggestion-chip {
  font-family: var(--font);
  font-size: 12px;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.12s;
}

.suggestion-chip:hover {
  background: var(--blue-50);
  border-color: var(--blue-200);
  color: var(--blue-600);
}

/* 按钮系统 */
.btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  padding: 9px 18px;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s;
  position: relative;
  line-height: 1.4;
  flex-shrink: 0;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--blue-600);
  color: white;
  border-color: var(--blue-600);
  box-shadow: 0 1px 3px rgba(43,107,219,0.3);
}
.btn-primary:hover { background: var(--blue-700); }

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border-color: var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-300); }

.btn-ghost {
  background: transparent;
  color: var(--blue-600);
  border-color: transparent;
  padding: 9px 12px;
}
.btn-ghost:hover { background: var(--blue-50); }

.btn-text {
  background: none;
  border: none;
  color: var(--blue-600);
  padding: 0;
  font-weight: 500;
}
.btn-text:hover { color: var(--blue-700); text-decoration: underline; }

.btn.loading { opacity: 0.7; pointer-events: none; }
.btn.loading .btn-label { opacity: 0; }
.btn .spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  position: absolute;
}
.btn.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 关键指标卡片区（参考图2 四列） ============ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-badge {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 400;
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 10px;
}

.section-link {
  font-size: 12px;
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.section-link:hover { text-decoration: underline; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  text-align: center;
  transition: box-shadow 0.15s;
}

.metric-card:hover { box-shadow: var(--shadow-md); }

.metric-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

.metric-tag {
  font-size: 10px;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--num);
  color: var(--gray-900);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.metric-unit {
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-500);
  margin-left: 2px;
  font-family: var(--font);
  letter-spacing: 0;
}

.metric-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.metric-change {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--num);
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.metric-change.up { color: var(--green-600); }
.metric-change.down { color: var(--red-500); }

/* 迷你柱状图 */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.mini-bar {
  width: 6px;
  border-radius: 2px;
  background: var(--blue-200);
  transition: height 0.3s;
}

.mini-bar:last-child { background: var(--blue-500); }

/* ============ 快速开始卡片 ============ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.quick-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200);
}

.quick-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.quick-desc {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ============ 侧边栏卡片 ============ */
.side-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.side-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--gray-100);
  cursor: default;
}

.side-card-header.toggleable {
  cursor: pointer;
  user-select: none;
}

.side-card-header.toggleable:hover {
  background: var(--gray-50);
}

/* 折叠箭头 */
.side-card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  transition: transform 0.25s ease, background 0.2s, border-color 0.2s;
  margin-left: 8px;
  flex-shrink: 0;
}

.side-card-arrow svg {
  width: 12px;
  height: 12px;
  stroke: var(--gray-500);
  transition: stroke 0.2s;
}

.side-card-header.toggleable:hover .side-card-arrow {
  background: var(--blue-50);
  border-color: var(--blue-200);
}

.side-card-header.toggleable:hover .side-card-arrow svg {
  stroke: var(--blue-600);
}

/* 折叠状态：箭头旋转 */
.side-card.collapsed .side-card-arrow {
  transform: rotate(-90deg);
}

/* 折叠状态：body 隐藏 + header border 移除 */
.side-card-body {
  padding: 10px 16px 14px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.25s ease;
  max-height: 500px;
  opacity: 1;
}

.side-card.collapsed .side-card-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.side-card.collapsed .side-card-header {
  border-bottom-color: transparent;
}

.side-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 6px;
}

.side-card-title .icon {
  font-size: 14px;
}

.side-card-more {
  font-size: 11px;
  color: var(--blue-600);
  cursor: pointer;
  font-weight: 500;
}

.side-card-more:hover { text-decoration: underline; }

/* 最近查询列表 */
.query-list { list-style: none; }

.query-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.query-item:last-child { border-bottom: none; }
.query-item:hover .query-text { color: var(--blue-600); }

.query-text {
  font-size: 12px;
  color: var(--gray-700);
  line-height: 1.5;
  transition: color 0.12s;
}

.query-time {
  font-size: 11px;
  color: var(--gray-400);
  flex-shrink: 0;
}

/* 知识源列表 */
.source-list { list-style: none; }

.source-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 12px;
  color: var(--gray-600);
  cursor: pointer;
}

.source-item:hover { color: var(--blue-600); }

.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-400);
  flex-shrink: 0;
}

/* 统计公报 */
.report-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.report-item:last-child { border-bottom: none; }

.report-file-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.report-file-icon.pdf { background: var(--red-50); }
.report-file-icon.xlsx { background: var(--green-50); }

.report-info { flex: 1; min-width: 0; }

.report-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-date {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 1px;
}

.side-btn {
  width: 100%;
  margin-top: 6px;
}

/* 动态列表 */
.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.activity-item:last-child { border-bottom: none; }

.activity-time {
  font-family: var(--num);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  flex-shrink: 0;
  min-width: 48px;
  letter-spacing: 0.3px;
}

.activity-text {
  font-size: 12px;
  color: var(--gray-700);
  line-height: 1.5;
}

/* ============ 空状态 ============ */
.empty-state {
  text-align: center;
  padding: 32px 20px;
}

.empty-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.empty-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  margin-bottom: 3px;
}

.empty-desc {
  font-size: 12px;
  color: var(--gray-400);
}

/* ============ 表格 ============ */
.data-table-wrap { overflow-x: auto; margin-top: 12px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  font-weight: 600;
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 10px 12px;
  text-align: center;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
  background: var(--gray-25);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  text-align: center;
}

.data-table tr:hover td { background: var(--blue-50); }

.data-table .ind-name {
  font-weight: 500;
  color: var(--gray-900);
  text-align: left;
}

.data-table .num {
  font-family: var(--num);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  letter-spacing: 0.3px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* 表头与数据列对齐 */
.data-table th.th-left { text-align: left; }
.data-table th.th-num { text-align: right; }
.data-table th.th-note { text-align: left; }
.data-table td.note-cell {
  text-align: left;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
}

.tag-blue { background: var(--blue-50); color: var(--blue-600); }
.tag-gray { background: var(--gray-100); color: var(--gray-600); }

.cb {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  flex-shrink: 0;
}

.cb.checked { background: var(--blue-600); border-color: var(--blue-600); }
.cb.checked::after { content: '✓'; color: white; font-size: 9px; font-weight: 700; }

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.skeleton-line { height: 12px; margin-bottom: 8px; }
.skeleton-line:last-child { margin-bottom: 0; width: 60%; }

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--gray-900);
  color: white;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 200;
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--green-600); }
.toast.error { background: var(--red-500); }

/* 响应式 */
@media (max-width: 1100px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .metrics-grid, .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .metrics-grid, .quick-grid { grid-template-columns: 1fr; }
  .header-search { display: none; }
  .query-row { flex-direction: column; }
}

/* ═══════ NLQ 结果区 ═══════ */
.ans-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--gray-25);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray-700);
  min-height: 20px;
}
.ans-box b { color: var(--gray-900); }
.rk { margin: 8px 0; }
.rk table {
  color: var(--gray-700);
  font-size: 12px;
  margin-top: 6px;
  width: 100%;
  border-collapse: collapse;
}
.rk th {
  background: var(--gray-100);
  font-weight: 600;
  padding: 8px 12px;
  text-align: center;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
.rk td {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.rk td, .rk th { border-color: var(--gray-200); }
.rki { margin-left: 12px; margin-top: 4px; color: var(--gray-600); font-size: 12px; }
.kb-ref {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-500);
  font-size: 12px;
  line-height: 1.5;
}

/* ═══════ 自定义分析结果卡片 ═══════ */
.custom-card {
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--blue-50), var(--gray-25));
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  text-align: center;
}
.custom-value {
  font-family: var(--num);
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}
.custom-unit { font-size: 14px; font-weight: 400; color: var(--gray-500); font-family: var(--font); }
.custom-yoy { font-size: 14px; font-weight: 600; margin-top: 6px; font-family: var(--num); }
.custom-yoy.up { color: var(--green-600); }
.custom-yoy.down { color: var(--red-500); }
.custom-expr { margin-top: 8px; font-size: 12px; color: var(--gray-400); }

/* ═══════ 自定义分析新建表单 ═══════ */
.custom-add { margin-top: 12px; }
.var-row { margin-bottom: 4px; }

/* ═══════ 知识库参考文本 ═══════ */
.source-list .source-item { font-size: 12px; }



