/* ============================================================
   datapanel.css — 「日度面板」页签样式（2026-11-26）
   版式对标能化板块「仓单日报变化面板」：红头信息条 + 密集热度表 + 排行条 + 成对走势图。
   只作用于 .nfdp-* 前缀，不改动既有页签样式；改版须顶 index.html 的 ?v=N。
   ============================================================ */

.nfdp { display: flex; flex-direction: column; gap: 14px; }

/* 工具条 */
.nfdp-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 14px; border-radius: var(--nf-r-sm);
  background: var(--nf-card); border: 1px solid var(--nf-line);
  box-shadow: var(--nf-shadow);
}
.nfdp-info { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; flex: 1 1 auto; min-width: 200px; }
.nfdp-info b { font-size: 15px; letter-spacing: .01em; color: var(--nf-ink); }
.nfdp-asof { font-size: 12px; color: var(--nf-mute); font-variant-numeric: tabular-nums; }
.nfdp-tip { font-size: 11.5px; color: var(--nf-mute); }
.nfdp-exp {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  color: #fff; padding: 8px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  background: linear-gradient(135deg, #8f1f22, #b8342c);
  box-shadow: 0 2px 8px rgba(143, 31, 34, .22);
}
.nfdp-exp:hover { filter: brightness(1.06); }
.nfdp-exp:disabled { opacity: .6; cursor: default; }

/* 导出范围选择 */
.nfdp-pickrow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 0 4px; margin-top: -4px;
}
.nfdp-picklab { font-size: 12px; color: var(--nf-mute); }
.nfdp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.nfdp-chip {
  border: 1px solid var(--nf-line); background: var(--nf-card); color: var(--nf-ink);
  font: inherit; font-size: 12px; line-height: 1; padding: 6px 13px; border-radius: 999px;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.nfdp-chip:hover { background: color-mix(in srgb, var(--nf-ink) 5%, transparent); }
.nfdp-chip.is-on {
  background: var(--nf-gold-dim); border-color: var(--nf-gold); color: var(--nf-gold); font-weight: 600;
}
.nfdp-picknote { font-size: 11.5px; color: var(--nf-mute); }

/* 区块 */
.nfdp-sec { padding: 14px 14px 10px; }
.nfdp-sec .nf-h { margin: 0 0 4px; }

/* 表格 */
.nfdp-tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; }
.nfdp-tbl {
  width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums;
  font-size: 12.5px; min-width: 880px;
}
.nfdp-tbl thead th {
  position: sticky; top: 0; z-index: 2;
  background: #1f2733; color: #e8ecf2; font-weight: 600; font-size: 11.5px;
  padding: 8px 10px; white-space: nowrap; text-align: right;
}
:root[data-theme="dark"] .nfdp-tbl thead th { background: #232c3a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nfdp-tbl thead th { background: #232c3a; }
}
.nfdp-tbl thead th.l { text-align: left; }
.nfdp-tbl thead th.r { text-align: right; }
.nfdp-unit { display: block; font-size: 10px; font-weight: 400; opacity: .62; letter-spacing: .02em; }
.nfdp-tbl td {
  padding: 7px 10px; border-bottom: 1px solid var(--nf-line-soft);
  white-space: nowrap; text-align: right; color: var(--nf-ink);
}
.nfdp-tbl td.l { text-align: left; }
.nfdp-tbl td.r { text-align: right; }
.nfdp-tbl tbody tr:nth-child(even) { background: color-mix(in srgb, var(--nf-ink) 2.2%, transparent); }
.nfdp-tbl tbody tr:hover { background: color-mix(in srgb, var(--nf-gold) 8%, transparent); }
.nfdp-name { font-weight: 700; }
.nfdp-mute { color: var(--nf-mute); }

/* 数据色：国内习惯 涨红跌绿 */
.nfdp .is-up { color: var(--nf-red); }
.nfdp .is-down { color: var(--nf-green); }
.nfdp .heat-hot { background: rgba(176, 42, 38, .13); color: var(--nf-red); font-weight: 700; }
.nfdp .heat-cold { background: rgba(20, 122, 83, .12); color: var(--nf-green); font-weight: 700; }
.nfdp .heat-mid { background: color-mix(in srgb, var(--nf-ink) 4%, transparent); color: var(--nf-ink); }
.nfdp .st-ok { color: var(--nf-green); }
.nfdp .st-delay { color: var(--nf-gold); }
.nfdp .st-stop { color: var(--nf-mute); }
.nfdp-tbl tr.is-stale td { color: var(--nf-mute); }
.nfdp-tbl tr.is-stale td.nfdp-name { color: var(--nf-mute); }

/* 图表 */
.nfdp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
@media (max-width: 900px) { .nfdp-grid2 { grid-template-columns: 1fr; } }
.nfdp-chartcard {
  border: 1px solid var(--nf-line); border-radius: var(--nf-r-sm);
  background: var(--nf-card-sunk); padding: 8px 8px 4px;
}
.nfdp-charttitle {
  font-size: 12.5px; font-weight: 600; color: var(--nf-ink);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 4px;
}
.nfdp-badge { font-size: 11px; font-weight: 500; color: var(--nf-mute); }
.nfdp-chart { width: 100%; }

/* 口径说明 */
.nfdp-cal { margin: 6px 0 0; padding-left: 18px; color: var(--nf-mute); font-size: 12px; line-height: 1.75; }
.nfdp-cal li { margin: 2px 0; }

/* 导出预览 */
.nfdp-mask {
  position: fixed; inset: 0; z-index: 9999; background: rgba(8, 12, 18, .62);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.nfdp-modal {
  width: min(760px, 100%); max-height: 92vh; display: flex; flex-direction: column;
  background: var(--nf-card); border-radius: var(--nf-r); border: 1px solid var(--nf-line);
  box-shadow: var(--nf-shadow-lift); overflow: hidden;
}
.nfdp-modal-hd {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--nf-line); font-size: 12.5px; color: var(--nf-mute);
}
.nfdp-modal-hd b { color: var(--nf-ink); font-size: 13px; }
.nfdp-modal-hd span { flex: 1 1 auto; }
.nfdp-x {
  appearance: none; border: 1px solid var(--nf-line); background: transparent; cursor: pointer;
  color: var(--nf-ink); font: inherit; font-size: 12px; padding: 5px 12px; border-radius: 999px;
}
.nfdp-modal-bd { overflow: auto; padding: 12px; background: var(--nf-card-sunk); }
.nfdp-img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: var(--nf-shadow); }
.nfdp-modal-ft { padding: 10px 14px; display: flex; justify-content: flex-end; border-top: 1px solid var(--nf-line); }
