/* pages.css —— 模拟运行验证页 & 方案与投资测算页 共用样式
   明亮主题：浅灰蓝底 + 白色卡片 + 青色/橙色高亮，与 3D 主页信息层级一致 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #edf1f7;
  --bg-card: #ffffff;
  --bg-card-2: #f4f7fb;
  --border: rgba(11,43,69, 0.09);
  --text: #22303f;
  --text-dim: #64748b;
  --cyan: #0e7490;
  --orange: #f59e0b;
  --red: #0891b2;
  --green: #0fb981;
  --yellow: #b45309;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html { background: var(--bg); }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(6, 148, 180, 0.05), transparent 60%),
    radial-gradient(900px 420px at 10% 0%, rgba(245,158,11, 0.04), transparent 55%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  min-height: 100vh;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---- 顶部导航 ---- */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; letter-spacing: 0.5px; color: #0b2b45;
  white-space: nowrap;
}
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, #00c2d1, var(--orange));
  box-shadow: 0 0 8px rgba(6, 148, 180, 0.4);
  flex: none;
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  color: var(--text-dim); text-decoration: none;
  padding: 7px 16px; border-radius: 8px; font-size: 13.5px;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(11,43,69, 0.05); }
.nav-links a.active {
  color: var(--cyan);
  background: rgba(6, 148, 180, 0.08);
  border-color: rgba(6, 148, 180, 0.35);
}

/* ---- 章节 ---- */
.sec { padding: 34px 0 6px; }
.sec-title {
  font-size: 21px; font-weight: 700; color: #0b2b45;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; letter-spacing: 0.5px;
}
.sec-tag {
  font-size: 12px; font-weight: 600; color: var(--cyan);
  border: 1px solid rgba(6, 148, 180, 0.35);
  background: rgba(6, 148, 180, 0.07);
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: 1px; flex: none;
}

/* ---- 卡片 ---- */
.card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 18px rgba(11,43,69, 0.06);
  min-width: 0;
  max-width: 100%;
}
.card-title {
  font-size: 14.5px; font-weight: 600; color: #0b2b45;
  margin-bottom: 14px;
  padding-left: 10px; border-left: 3px solid #00c2d1;
}
.chart-note { font-size: 12.5px; color: var(--text-dim); margin-top: 12px; line-height: 1.7; }
.note-link {
  color: var(--cyan); text-decoration: none;
  border-bottom: 1px dashed rgba(6, 148, 180, 0.5);
  transition: color 0.15s, border-color 0.15s;
}
.note-link:hover { color: #0891b2; border-bottom-style: solid; }
canvas { display: block; width: 100%; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* 防止 grid/flex 子项被宽表格等长内容撑破版心（min-width:auto 默认值修复） */
.grid-2 > *, .grid-3 > *, .chain-grid > *, .verdict-grid > *, .stat-grid > *, .tou-grid > * { min-width: 0; }

/* ---- 天气横幅 ---- */
.banner {
  display: flex; flex-direction: column; gap: 16px;
  border-color: rgba(6, 148, 180, 0.28);
  background:
    radial-gradient(600px 200px at 90% 0%, rgba(6, 148, 180, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
}
.banner-src { font-size: 13px; color: var(--text-dim); }
.banner-src strong { color: var(--cyan); font-weight: 600; }

.stat-grid { display: grid; gap: 14px; }
.stat-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat {
  background: #f4f7fb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.stat-label { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--cyan); font-variant-numeric: tabular-nums; }
#sec-forecast .stat-value, #sec-overview .stat-value { color: #0B2B45; }
.stat-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 22px;
  font-size: 14px; cursor: pointer;
  transition: all 0.15s;
}
.tab:hover { color: var(--text); border-color: rgba(6, 148, 180, 0.4); }
.tab.active {
  color: #06202a; font-weight: 700;
  background: linear-gradient(135deg, #00c2d1, #7fe9f2);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(6, 148, 180, 0.3);
}

/* ---- 验证结论卡 ---- */
.verdict-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.verdict {
  display: flex; gap: 12px; align-items: flex-start;
  background: #f4f7fb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
}
.verdict-badge { font-size: 16px; line-height: 1.4; flex: none; }
.verdict-title { font-size: 13px; color: var(--text-dim); margin-bottom: 5px; }
.verdict-nums { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.v-sim { font-size: 18px; font-weight: 700; color: var(--cyan); font-variant-numeric: tabular-nums; }
.v-vs { font-size: 11px; color: var(--text-dim); }
.v-target { font-size: 13px; color: var(--orange); font-variant-numeric: tabular-nums; }
.verdict-note { font-size: 12px; color: var(--text-dim); margin-top: 6px; line-height: 1.6; }

/* ---- 表格 ---- */
.tbl-wrap { overflow: auto; border-radius: 8px; border: 1px solid var(--border); max-width: 100%; }
/* 保险：卡片内未包 .tbl-wrap 的裸表格同样限制在容器内横向滚动 */
.card > table.tbl { display: block; max-width: 100%; overflow-x: auto; }
.tbl-wrap.tall { max-height: 480px; overflow-y: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 7px 10px; text-align: right; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child,
.tbl th:nth-child(2), .tbl td:nth-child(2) { text-align: left; }
/* 长文本列（安装位置、管网路由、模块构成、辅电配置等）：允许换行并限制列宽，
   使表格在 1280 版心内完整显示、不产生横向滚动 */
.tbl th.w, .tbl td.w {
  white-space: normal;
  text-align: left;
  min-width: 96px;
  max-width: 220px;
  line-height: 1.55;
}
.tbl thead th {
  position: sticky; top: 0; z-index: 2;
  background: #eaf1f8;
  color: #0e7490; font-weight: 600; font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.tbl tbody tr { border-bottom: 1px solid rgba(11,43,69, 0.06); }
.tbl tbody tr:hover { background: rgba(6, 148, 180, 0.05); }
.tbl .cold-row { background: rgba(245,158,11, 0.08); }
.tbl .cold-row:hover { background: rgba(245,158,11, 0.13); }
.tbl tr.hl { background: rgba(6, 148, 180, 0.07); }
.tbl tr.subtotal td { color: #0b2b45; font-weight: 600; background: rgba(11,43,69, 0.04); }
.tbl tr.total td { color: var(--orange); font-weight: 700; background: rgba(245,158,11, 0.08); }
.tbl.slim th, .tbl.slim td { text-align: left; }
.tbl .neg, .neg { color: var(--red); }
.tbl .pos, .pos { color: var(--green); }
.dim { color: var(--text-dim); }
.base-tag {
  font-size: 10.5px; color: #06202a; background: #00c2d1;
  border-radius: 4px; padding: 1px 6px; margin-left: 4px; font-weight: 700;
}
.circuit-note {
  font-size: 11px; color: var(--cyan); white-space: nowrap;
  background: rgba(6, 148, 180, 0.08);
  border: 1px solid rgba(6, 148, 180, 0.3);
  border-radius: 4px; padding: 1px 7px; margin-left: 6px;
}

/* ---- 分时电价 ---- */
.tou-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.tou-seg {
  border-radius: 10px; padding: 13px 15px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left-width: 3px;
}
.tou-seg.peak { border-left-color: var(--red); }
.tou-seg.flat { border-left-color: #00c2d1; }
.tou-seg.valley { border-left-color: var(--green); }
.tou-name { font-size: 13px; color: var(--text-dim); }
.tou-price { font-size: 19px; font-weight: 700; color: #0b2b45; margin: 4px 0; font-variant-numeric: tabular-nums; }
.tou-hours { font-size: 12px; color: var(--text-dim); }

/* ---- 逻辑链 ---- */
.chain-grid {
  display: flex; align-items: stretch; gap: 10px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.chain-card {
  flex: 1; min-width: 180px;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border);
  border-top: 2px solid #00c2d1;
  border-radius: 12px;
  padding: 15px 16px;
}
.chain-no {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(6, 148, 180, 0.12); color: var(--cyan);
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.chain-t { font-size: 14px; font-weight: 700; color: #0b2b45; margin-bottom: 6px; }
.chain-d { font-size: 12.3px; color: var(--text-dim); line-height: 1.65; }
.chain-arrow {
  align-self: center; color: var(--orange);
  font-size: 20px; font-weight: 700; flex: none;
}

/* ---- 项目概况卡 ---- */
.proj-card { display: flex; flex-direction: column; gap: 10px; }
.proj-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.proj-name { font-size: 17px; font-weight: 700; color: #0b2b45; }
.proj-area { font-size: 15px; font-weight: 700; color: var(--cyan); font-variant-numeric: tabular-nums; }
.proj-addr { font-size: 12.5px; color: var(--text-dim); }
.proj-status {
  font-size: 12.5px; color: var(--orange);
  background: rgba(245,158,11, 0.07);
  border: 1px solid rgba(245,158,11, 0.25);
  border-radius: 8px; padding: 8px 12px; line-height: 1.6;
}
.proj-blds { list-style: none; }
.proj-blds li {
  font-size: 12.8px; color: var(--text);
  padding: 4px 0 4px 16px; position: relative;
}
.proj-blds li::before {
  content: ""; position: absolute; left: 2px; top: 12px;
  width: 6px; height: 6px; border-radius: 50%; background: #00c2d1;
}
.proj-meta { font-size: 12.5px; color: var(--text-dim); }

/* ---- 徽标行 ---- */
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.badge {
  font-size: 12.5px; color: var(--text);
  background: rgba(11,43,69, 0.05);
  border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.badge.cyan { color: var(--cyan); border-color: rgba(6, 148, 180, 0.35); background: rgba(6, 148, 180, 0.08); }
.badge.orange { color: var(--orange); border-color: rgba(245,158,11, 0.35); background: rgba(245,158,11, 0.07); }

/* ---- 投资汇总 ---- */
.invest-summary { display: flex; flex-direction: column; }
.big-number {
  font-size: 44px; font-weight: 800; color: var(--orange);
  font-variant-numeric: tabular-nums;
  margin: 8px 0 16px;
  text-shadow: 0 0 24px rgba(245,158,11, 0.18);
}
.big-unit { font-size: 16px; font-weight: 600; color: var(--text-dim); margin-left: 8px; }

/* ---- 收费公式 ---- */
.fee-card { border-color: rgba(6, 148, 180, 0.3); }
.fee-formula { font-size: 15px; color: var(--text); margin-bottom: 8px; }
.fee-result {
  font-size: 26px; font-weight: 800; color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

/* ---- 口径说明 ---- */
.source-card { border-left: 3px solid var(--yellow); }
.source-list { list-style: none; }
.source-list li {
  font-size: 13.2px; color: var(--text);
  padding: 9px 0 9px 18px; position: relative;
  border-bottom: 1px solid rgba(11,43,69, 0.07);
  line-height: 1.75;
}
.source-list li:last-child { border-bottom: none; }
.source-list li::before {
  content: ""; position: absolute; left: 2px; top: 18px;
  width: 7px; height: 7px; border-radius: 2px; background: var(--yellow);
}
.source-list strong { color: #0b2b45; }

/* ---- 页脚 ---- */
.footer {
  margin-top: 46px;
  border-top: 1px solid var(--border);
  padding: 22px 0 30px;
  font-size: 12px; color: var(--text-dim);
  line-height: 1.8;
}

/* ---- 图纸档案与查看器 ---- */
.archive-card { display: flex; flex-direction: column; gap: 12px; }
.archive-emph {
  font-size: 12.5px; color: var(--cyan);
  background: rgba(6, 148, 180, 0.08);
  border: 1px solid rgba(6, 148, 180, 0.3);
  border-radius: 8px; padding: 8px 12px; line-height: 1.6;
}
.file-list { list-style: none; }
.file-list li {
  font-size: 12.6px; color: var(--text);
  padding: 4px 0 4px 18px; position: relative;
  border-bottom: 1px dashed rgba(11,43,69, 0.1);
  line-height: 1.6;
}
.file-list li:last-child { border-bottom: none; }
.file-list li::before {
  content: "▸"; position: absolute; left: 2px; top: 4px;
  color: var(--orange); font-size: 11px;
}
.viewer { display: flex; flex-direction: column; gap: 8px; }
.viewer-main {
  position: relative;
  background: #f7f9fd;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  height: 300px;
  display: flex; align-items: center; justify-content: center;
}
.viewer-main img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block;
}
.viewer-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 44px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--cyan); font-size: 22px; line-height: 1;
  border: 1px solid rgba(6, 148, 180, 0.35);
  border-radius: 8px; cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font);
}
.viewer-btn:hover { background: rgba(6, 148, 180, 0.15); }
.viewer-prev { left: 8px; }
.viewer-next { right: 8px; }
.viewer-count {
  position: absolute; right: 10px; bottom: 8px;
  font-size: 11.5px; color: var(--text);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  padding: 2px 9px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.viewer-thumbs {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.viewer-thumbs img {
  width: 56px; height: 42px; object-fit: cover;
  border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border);
  opacity: 0.55;
  transition: opacity 0.15s, border-color 0.15s;
}
.viewer-thumbs img:hover { opacity: 0.85; }
.viewer-thumbs img.on {
  opacity: 1;
  border-color: #00c2d1;
  box-shadow: 0 0 8px rgba(6, 148, 180, 0.35);
}

/* ---- 响应式：平板与小屏笔记本（≤960px） ---- */
@media (max-width: 960px) {
  .wrap { padding: 0 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.cols-3 { grid-template-columns: 1fr; }
  .tou-grid { grid-template-columns: 1fr; }
  .nav-inner {
    flex-direction: column; align-items: flex-start;
    height: auto; padding: 10px 16px; gap: 8px;
  }
  .nav-links {
    width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .sec-title { font-size: 18px; flex-wrap: wrap; }
  .chain-grid { flex-direction: column; }
  .chain-arrow { transform: rotate(90deg); }
  .verdict-grid { grid-template-columns: 1fr; }
  .viewer-main { height: 220px; }
  .viewer-thumbs {
    flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .viewer-thumbs img { flex: none; }
  .tbl-wrap { -webkit-overflow-scrolling: touch; }
}

/* ---- 响应式：手机竖屏（≤640px） ---- */
@media (max-width: 640px) {
  body { font-size: 13px; }
  .nav-brand { font-size: 13px; white-space: normal; }
  .nav-links a { padding: 6px 12px; font-size: 12.5px; }
  .sec { padding: 24px 0 4px; }
  .sec-title { font-size: 16px; gap: 8px; }
  .card { padding: 14px; border-radius: 12px; }
  .stat-value { font-size: 18px; }
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .tab { flex: none; padding: 8px 16px; font-size: 13px; }
  .tbl { font-size: 12px; }
  .tbl th, .tbl td { padding: 6px 9px; }
  /* 横向滚动时首列冻结，日期/项目名始终可见 */
  .tbl th:first-child, .tbl td:first-child {
    position: sticky; left: 0; z-index: 1;
    background: #eaf1f8;
  }
  .tbl thead th:first-child { z-index: 3; background: #eaf1f8; }
  .v-sim { font-size: 16px; }
  .big-number { font-size: 34px; }
  .fee-result { font-size: 21px; }
  .chain-t { font-size: 13.5px; }
  .viewer-main { height: 180px; }
  .viewer-btn { width: 30px; height: 38px; font-size: 18px; }
  .chart-note { font-size: 12px; }
  .footer { font-size: 11.5px; }
}

/* ---------- 未来 72h 预演板块（2026-07-29 新增） ---------- */
.fc-badge {
  float: right;
  font-size: 11px; font-weight: 400;
  border-radius: 6px; padding: 1px 9px; margin-left: 10px;
}
.fc-badge.demo { color: #b45309; border: 1px solid rgba(180, 83, 9, 0.45); background: rgba(180, 83, 9, 0.07); }
.fc-badge.live { color: #0fb981; border: 1px solid rgba(15,185,129, 0.45); background: rgba(15,185,129, 0.07); }
