/* ============================================================
   panels.css — 面板细节 / 角标 / 图表公共样式
   禽类病原检测数字大屏 Demo
   ============================================================ */

/* ===== 面板四角「L 形」科技角标（左上/右上/左下/右下） ===== */
.panel .corner {
  position: absolute;
  width: 12px;
  height: 12px;
  z-index: 5;
  pointer-events: none;
}
.panel .corner.tl { top: -1px; left: -1px; border-top: 2px solid var(--border-corner); border-left: 2px solid var(--border-corner); border-top-left-radius: 6px; }
.panel .corner.tr { top: -1px; right: -1px; border-top: 2px solid var(--border-corner); border-right: 2px solid var(--border-corner); border-top-right-radius: 6px; }
.panel .corner.bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--border-corner); border-left: 2px solid var(--border-corner); border-bottom-left-radius: 6px; }
.panel .corner.br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--border-corner); border-right: 2px solid var(--border-corner); border-bottom-right-radius: 6px; }

/* ===== 面板底部微光 ===== */
.panel .panel-glow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 34px;
  background: linear-gradient(to top, rgba(0, 212, 255, 0.07), transparent);
  pointer-events: none;
  z-index: 4;
}

/* ===== 图表容器 ===== */
.chart-box {
  width: 100%;
  height: 100%;
}

/* ===== 入场序列（按 A→B→C/D/E→F/G/H→I 依次淡入） ===== */
#stage .header            { animation: panel-in .6s ease-out .00s both; }
#stage .filter-bar        { animation: panel-in .6s ease-out .10s both; }
#stage .kpi-row           { animation: panel-in .6s ease-out .20s both; }
#panel-C, #panel-D, #panel-E { animation-delay: .32s; }
#panel-F, #panel-G, #panel-H { animation-delay: .48s; }
#ticker                  { animation: panel-in .6s ease-out .62s both; }

/* ===== 鼠标进入显示光标 / 空闲 10s 隐藏 ===== */
body { cursor: none; }
body.cursor-visible { cursor: default; }
body.overlay-active, body.overlay-active * { cursor: default; }

/* ===== 报告弹窗文本高亮 ===== */
.report-body .hl { color: var(--accent); }
.report-body .hl-warn { color: var(--warn); }

/* ===== 筛选器激活态 ===== */
.filter-bar.filter-active {
  border-color: rgba(255, 159, 67, 0.55);
  box-shadow: 0 0 16px rgba(255, 159, 67, 0.12);
}

/* ===== ECharts 深色 tooltip 玻璃底（全局覆盖） ===== */
.echarts-tooltip-g {
  background: rgba(5, 10, 23, 0.92) !important;
  border: 1px solid rgba(0, 212, 255, 0.45) !important;
  border-radius: 12px !important;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.15) !important;
  backdrop-filter: blur(6px);
  padding: 10px 12px !important;
  font-family: var(--font-body) !important;
  font-size: 12px !important;
  color: var(--text-main) !important;
  line-height: 1.7 !important;
}
.echarts-tooltip-g .tip-name { color: var(--primary); }
.echarts-tooltip-g .tip-val { color: #fff; font-weight: 700; font-family: var(--font-display); }
.echarts-tooltip-g .tip-sub { color: var(--text-sub); }

/* ===== 地图省份名标注 ===== */
.map-name-label {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-main);
}

/* ===== 无数据 / 加载提示 ===== */
.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 1px;
  z-index: 2;
}
.chart-empty .retry-btn {
  padding: 6px 18px;
  font-size: 12px;
  color: var(--primary);
  border: 1px solid var(--primary);
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}
.chart-empty .retry-btn:hover { background: rgba(0,212,255,.12); }

/* ===== 报告模式二维码位（占位说明） ===== */

/* ============================================================
   双击放大（overlay）相关：面板提示 / 源面板淡化 / 底部滚动条提示
   与 dashboard-v2/css/panels.css 对应区块保持一致（两版通用）
   ============================================================ */

/* 小豆腐块：双击放大提示（V1 面板头右侧为 panel-link/view-toggle，故用固定间距） */
.zoom-hint {
  margin-left: calc(10px * var(--ui-scale));
  font-size: calc(10px * var(--ui-scale));
  color: var(--text-dim);
  letter-spacing: calc(1px * var(--ui-scale));
  white-space: nowrap;
  opacity: .85;
}
.panel:hover .zoom-hint { color: var(--primary); }

/* 打开 overlay 时源面板淡 40% */
.panel.panel-muted, .kpi-row.panel-muted, #ticker.panel-muted {
  opacity: 0.45;
  filter: saturate(0.7);
}

/* 底部 LIVE 滚动条「双击看全量」提示 */
.ticker-hint {
  flex: none;
  padding: 0 calc(14px * var(--ui-scale));
  font-size: calc(11px * var(--ui-scale));
  color: var(--text-dim);
  letter-spacing: calc(1px * var(--ui-scale));
  white-space: nowrap;
  border-left: 1px solid var(--border-panel);
  height: 100%;
  display: flex;
  align-items: center;
  background: rgba(0, 212, 255, 0.04);
}

/* ============================================================
   双击放大 Overlay（body 层 fixed，不受 stage scale 影响）
   与 dashboard-v2/css/panels.css 相同（两版通用）
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3, 8, 20, 0.86);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.overlay.open {
  display: flex;
  animation: overlay-in .3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.overlay.closing {
  animation: overlay-out .2s ease-in both;
}
@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes overlay-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.overlay-inner {
  width: calc(100% - 96px);
  height: calc(100% - 96px);
  max-width: calc(1728px * var(--ui-scale));
  max-height: calc(984px * var(--ui-scale));
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid rgba(0, 212, 255, 0.55);
  border-radius: 10px;
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.25), inset 0 0 80px rgba(0, 90, 180, 0.10);
  overflow: hidden;
  transform: scale(0.92);
  animation: overlay-scale-in .3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes overlay-scale-in {
  from { transform: scale(0.92); }
  to   { transform: scale(1); }
}
.overlay-head {
  flex: none;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  background: rgba(0, 212, 255, 0.05);
}
.overlay-title {
  font-size: calc(20px * var(--ui-scale));
  font-weight: 600;
  letter-spacing: calc(3px * var(--ui-scale));
  color: var(--text-main);
  text-shadow: 0 0 12px var(--primary-glow);
}
.overlay-title::before {
  content: "";
  display: inline-block;
  width: calc(5px * var(--ui-scale));
  height: calc(18px * var(--ui-scale));
  margin-right: calc(10px * var(--ui-scale));
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  vertical-align: -3px;
}
.overlay-hint {
  margin-left: auto;
  font-size: calc(12px * var(--ui-scale));
  color: var(--text-dim);
  letter-spacing: 1px;
  white-space: nowrap;
}
.overlay-close {
  width: calc(36px * var(--ui-scale));
  height: calc(36px * var(--ui-scale));
  background: rgba(255, 92, 92, 0.1);
  border: 1px solid rgba(255, 92, 92, 0.45);
  color: var(--warn);
  font-size: calc(20px * var(--ui-scale));
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  transition: border-color .2s, box-shadow .2s, color .2s, background-color .2s, transform .2s, opacity .2s, max-height .2s;
}
.overlay-close:hover {
  background: rgba(255, 92, 92, 0.28);
  box-shadow: 0 0 14px var(--warn-glow);
}
.overlay-body {
  flex: 1;
  min-height: 0;
  position: relative;
  padding: 18px 20px 8px;
}
.overlay-body .ov-chart {
  width: 100%;
  height: 100%;
}
.overlay-foot {
  flex: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 20px;
  border-top: 1px solid rgba(0, 212, 255, 0.14);
  font-size: 13px;
  color: var(--text-sub);
}
.overlay-foot .of-state { color: var(--warn-mid); }
.overlay-foot select, .overlay-foot input {
  height: 30px;
  background: rgba(5, 12, 26, 0.9);
  color: var(--text-main);
  border: 1px solid var(--border-panel);
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-body);
  padding: 0 8px;
  outline: none;
  cursor: pointer;
}
.overlay-foot .of-btn {
  padding: 5px 16px;
  background: rgba(0, 212, 255, 0.12);
  color: var(--primary);
  border: 1px solid rgba(0, 212, 255, 0.5);
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, color .2s, background-color .2s, transform .2s, opacity .2s, max-height .2s;
}
.overlay-foot .of-btn:hover { background: rgba(0, 212, 255, 0.28); }
.overlay-foot .of-btn.danger { color: var(--warn); border-color: rgba(255, 92, 92, 0.5); background: rgba(255, 92, 92, 0.1); }
.overlay-foot .of-btn.danger:hover { background: rgba(255, 92, 92, 0.25); }
.overlay-foot .of-esc { margin-left: auto; font-size: 11px; color: var(--text-dim); letter-spacing: 1px; }

/* ===== Overlay：KPI 大卡 ===== */
.ov-kpi-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 22px;
  padding: 10px 20px;
}
.ov-kpi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(10, 20, 40, 0.6);
  border: 1px solid var(--border-panel);
  border-radius: 10px;
  overflow: hidden;
}
.ov-kpi-card::after {
  content: "";
  position: absolute;
  left: 10%; right: 10%; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.ov-kpi-value {
  font-family: var(--font-display);
  font-size: calc(96px * var(--ui-scale));
  font-weight: 700;
  line-height: 1;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px var(--primary-glow);
}
.ov-kpi-value.green { color: var(--accent); text-shadow: 0 0 26px var(--accent-glow); }
.ov-kpi-value.orange { color: var(--warn-mid); text-shadow: 0 0 26px rgba(255,159,67,.35); }
.ov-kpi-value.red { color: var(--warn); text-shadow: 0 0 26px var(--warn-glow); }
.ov-kpi-label {
  font-size: calc(18px * var(--ui-scale));
  color: var(--text-sub);
  letter-spacing: calc(4px * var(--ui-scale));
}
.ov-kpi-note {
  font-size: calc(12px * var(--ui-scale));
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* ===== Overlay：明细表格（滚动条） ===== */
.ov-table-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ov-table-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
}
.ov-table-tools input {
  flex: 1;
  max-width: 420px;
  height: 32px;
  background: rgba(5, 12, 26, 0.9);
  color: var(--text-main);
  border: 1px solid var(--border-panel);
  border-radius: 4px;
  font-size: 13px;
  padding: 0 10px;
  outline: none;
}
.ov-table-tools span { font-size: 12px; color: var(--text-dim); }
.ov-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 6px;
}
.ov-table-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.ov-table-scroll::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.3); border-radius: 4px; }
.ov-table-scroll::-webkit-scrollbar-track { background: rgba(5, 12, 26, 0.6); }
.ov-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ov-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0C1B33;
  color: var(--primary);
  font-weight: 600;
  padding: 8px 10px;
  text-align: left;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.ov-table th:hover { color: var(--accent); }
.ov-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(64, 120, 190, 0.12);
  color: var(--text-sub);
  white-space: nowrap;
}
.ov-table tr:hover td { background: rgba(0, 212, 255, 0.05); }
.ov-table tr.pos-hit td { color: var(--text-main); }
.ov-table tr.pos-hit td.ov-pos { color: var(--warn); font-weight: 600; text-shadow: 0 0 8px var(--warn-glow); }
.ov-table td.ov-date { color: var(--primary); font-family: var(--font-display); font-size: 12px; }

/* ===== Overlay：地图放大专用（v2 panel-M 使用，v1 保留以保持一致） ===== */
.ov-map-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}
.ov-map-chart {
  position: absolute;
  inset: 0;
}
.ov-map-side {
  position: absolute;
  left: 14px;
  top: 12px;
  bottom: 12px;
  width: 210px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(6, 14, 30, 0.72);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 8px;
  padding: 10px;
  backdrop-filter: blur(4px);
  overflow-y: auto;
}
.ov-map-side::-webkit-scrollbar { width: 6px; }
.ov-map-side::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.3); border-radius: 3px; }
.ov-map-side-title {
  flex: none;
  font-size: 12px;
  color: var(--primary);
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  padding-bottom: 6px;
}
.ov-map-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, color .15s, background-color .15s, transform .15s, opacity .15s, max-height .15s;
}
.ov-map-row:hover { background: rgba(0, 212, 255, 0.1); }
.ov-map-row.active { background: rgba(0, 255, 163, 0.12); box-shadow: inset 0 0 0 1px rgba(0, 255, 163, 0.4); }
.ov-map-row .omr-rank { color: var(--text-dim); font-family: var(--font-display); width: 18px; }
.ov-map-row .omr-name { color: var(--text-main); flex: 1; }
.ov-map-row .omr-val { color: var(--accent); font-family: var(--font-display); font-size: 11px; }
.ov-overseas-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  min-width: 300px;
  padding: 12px 18px;
  background: rgba(10, 16, 34, 0.85);
  border: 1px solid rgba(123, 97, 255, 0.6);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 24px rgba(123, 97, 255, 0.3);
}
.ov-overseas-card .ooc-title {
  font-size: 14px;
  font-weight: 600;
  color: #C9B8FF;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ov-overseas-card .ooc-rows {
  margin-top: 8px;
  display: flex;
  gap: 18px;
  font-family: var(--font-display);
}
.ov-overseas-card .ooc-rows b { color: #EAF6FF; font-size: 15px; }
.ov-overseas-card .ooc-rows span { color: var(--text-dim); font-size: 11px; font-family: var(--font-body); }
.ov-overseas-card .ooc-note {
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-dim);
}
