/* ================= 知天鉴 自定义样式 ================= */

html { -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }

/* PC 左侧菜单按钮 */
.tab-btn {
  text-align: left;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  transition: all .15s;
  cursor: pointer;
}
.tab-btn:hover { border-color: #7dd3fc; color: #0284c7; }
.tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(14,165,233,.3);
  font-weight: 600;
}

/* 移动端底部 Tab */
.tab-btn-m {
  display: flex; flex-direction: column; align-items: center;
  gap: 1px; padding: 6px 0 8px; font-size: 11px; color: #64748b;
}
.tab-btn-m span { font-size: 18px; line-height: 1.2; }
.tab-btn-m.active { color: #0284c7; font-weight: 600; }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }

/* 面板卡片 */
.panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.panel-title { font-size: 14px; font-weight: 700; color: #334155; margin-bottom: 10px; }

/* 图表容器 */
.chart { width: 100%; height: 300px; }
.chart.tall { height: 360px; }
@media (max-width: 767px) {
  .chart { height: 260px; }
  .chart.tall { height: 300px; }
}

/* 行业切换按钮 */
.ind-btn {
  padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.ind-btn:hover { background: #e0f2fe; color: #0284c7; }
.ind-btn.active {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff; border-color: transparent; font-weight: 600;
}

/* 逐日卡片 */
.day-card {
  min-width: 128px; flex-shrink: 0;
  border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 10px; text-align: center; background: #f8fafc;
}
.day-card.risky { background: #fef2f2; border-color: #fecaca; }

/* 实况统计小格 */
.stat-tile {
  background: #f8fafc; border: 1px solid #eef2f7;
  border-radius: 10px; padding: 8px 10px;
}
.stat-tile .k { font-size: 11px; color: #94a3b8; }
.stat-tile .v { font-size: 15px; font-weight: 700; color: #334155; margin-top: 2px; }

/* 预警条 */
.alert-bar {
  display: flex; align-items: center; gap: 8px;
  border-radius: 10px; padding: 9px 13px; font-size: 13px; font-weight: 600;
}
.alert-red { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-amber { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

/* 阈值输入 */
.thr-input { border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px 8px; width: 100%; font-size: 14px; }

/* 搜索建议项 */
.suggest-item { padding: 8px 12px; font-size: 13px; cursor: pointer; display: flex; justify-content: space-between; }
.suggest-item:hover { background: #f0f9ff; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { border: 1px solid #e2e8f0; padding: 6px 10px; text-align: center; white-space: nowrap; }
.tbl th { background: #f1f5f9; color: #475569; font-weight: 600; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* Leaflet 层级低于弹窗遮罩内容 */
.leaflet-container { z-index: 1; }
