/* 展示端页面级样式（补充在 app.css 之后） */

.hero {
  padding: clamp(48px, 8vw, 96px) 0 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.hero p.lead { max-width: 560px; color: var(--text-2); font-size: 17px; margin: 20px 0 0; }
.hero-metrics { display: flex; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 44px; }
.metric { flex: 1; background: var(--bg-1); padding: 18px 22px; min-width: 0; }
.metric b { display: block; font-family: var(--mono); font-size: 30px; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.metric b em { color: var(--nv); font-style: normal; font-size: 18px; margin-left: 2px; }
.metric span { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
@media (max-width: 760px) { .hero-metrics { flex-wrap: wrap; } .metric { flex: 1 1 45%; } }

/* 首页标题条：单行标题 + 一句说明 + 数据时间，不再占整屏首屏 */
.hero { padding: 40px 0 28px; }
.hero-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-title { font-size: clamp(26px, 3vw, 34px); font-weight: 900; letter-spacing: -0.03em; color: var(--text); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 0 16px; flex-wrap: wrap; }
.result-count { font-size: 13px; color: var(--text-3); }
.result-count b { color: var(--text); font-family: var(--mono); }
.view-toggle { display: flex; border: 1px solid var(--line-strong); }
.view-toggle button { background: transparent; border: 0; color: var(--text-3); padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
.view-toggle button.on { background: var(--nv); color: #000; }

.list-view { border: 1px solid var(--line); }
.lv-row {
  display: grid; grid-template-columns: 96px minmax(0, 1.6fr) 180px 150px 120px 32px;
  align-items: center; gap: 18px; padding: 16px 20px; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.lv-row:last-child { border-bottom: 0; }
.lv-row:hover { background: var(--bg-1); }
.lv-row:hover .lv-go { color: var(--nv-hot); transform: translateX(3px); }
.lv-go { transition: transform 0.15s ease, color 0.15s ease; color: var(--text-3); }
.lv-title { font-weight: 700; }
.lv-sub { font-size: 12px; color: var(--text-3); }
.lv-price { font-family: var(--mono); font-weight: 700; text-align: right; }
@media (max-width: 860px) { .lv-row { grid-template-columns: 1fr; gap: 6px; } .lv-price { text-align: left; } }

.cta {
  border: 1px solid var(--line); padding: 22px; background:
    linear-gradient(120deg, rgba(118, 185, 0, 0.10), transparent 55%), var(--bg-1);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.cta h3 { font-size: 17px; margin-bottom: 8px; }
.cta p { color: var(--text-2); font-size: 14px; margin: 0 0 16px; }

.price-block { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.price-block .big { font-family: var(--mono); font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -0.03em; }
.price-block .cur { color: var(--text-3); font-size: 14px; }
.price-block .rebate {
  text-align: right; font-size: 13px; color: var(--text-2);
}
.price-block .rebate b { display: block; font-family: var(--mono); font-size: 22px; color: var(--nv-hot); }

.side-stack { display: flex; flex-direction: column; gap: 20px; }
.side-card { border: 1px solid var(--line); background: var(--bg-1); padding: 20px; }
.side-card h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }

.foot-links { display: flex; gap: 18px; }
.foot-links a:hover { color: var(--nv-hot); }

/* 邀请码门户 */
.gate-form { display: flex; flex-direction: column; gap: 14px; }
.gate-code {
  width: 100%; height: 56px; padding: 0 16px; font-family: var(--mono); font-size: 22px; letter-spacing: 0.32em;
  background: var(--bg-3); border: 1px solid var(--line-strong); color: var(--text); text-transform: uppercase; text-align: center;
}
.gate-code:focus { border-color: var(--nv); box-shadow: 0 0 0 3px var(--nv-glow); outline: none; }
.gate-err { color: var(--danger); font-size: 13px; min-height: 18px; }

/* 邀请码门户：左栏正文与右侧表单同为竖直居中；免责提示单独吸附到页面底边 */
.gate-main { width: 100%; }
.gate-notice { width: 100%; padding-top: 24px; margin-bottom: 24px; font-size: 12px; color: var(--text-3); position: relative; z-index: 1; }
@media (min-width: 901px) {
  .gate-notice { position: absolute; left: 0; bottom: 0; margin: 0; padding: 0; }
  body.is-gate .gate-left > .gate-notice { padding-left: clamp(32px, 5vw, 80px); padding-right: clamp(32px, 5vw, 80px); }
}
@media (max-width: 720px) {
  body.is-gate .gate-left > * { padding-left: clamp(16px, 5vw, 80px); padding-right: clamp(16px, 5vw, 80px); }
  body.is-gate .gate-stats { margin-bottom: 24px; }
  .gate-notice { margin-top: 24px; padding-top: 0; }
}

/* 加载态：页脚先不展示，避免“运营入口”与版本号在确认登录状态前露出 */
body.is-loading .foot { display: none; }

.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px; border: 1px solid rgba(242, 169, 0, 0.4); background: rgba(242, 169, 0, 0.08);
  font-size: 13px; color: var(--text-2); margin-top: 18px;
}

/* 移动端修正 */
@media (max-width: 640px) {
  .price-block { flex-direction: column; align-items: flex-start; gap: 14px; }
  .price-block .rebate { text-align: left; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .offer-grid { grid-template-columns: 1fr; }
  .hero-metrics { flex-wrap: wrap; }
  .metric { flex: 1 1 45%; }
  .filter-label { width: 100%; }
  .nav-inner { gap: 12px; }
}

/* ---------------------------------------------------------------- v0.2 列表页 */
.ledger { border: 1px solid var(--line); background: var(--bg-1); }
.ledger-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.ledger-head h2 { font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.ledger-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ledger-tools .search { min-width: 240px; flex: 1; }
.ledger-tools .search .input { height: 36px; }
.ledger-tools .select { height: 36px; width: auto; min-width: 116px; }
.ledger-scroll { overflow-x: auto; }
table.ledger-tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 1080px; }
.ledger-tbl th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); padding: 10px 14px; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.ledger-tbl th.sortable { cursor: pointer; user-select: none; }
.ledger-tbl th.sortable:hover { color: var(--nv-hot); }
.ledger-tbl th .arrow { margin-left: 4px; opacity: 0.5; }
.ledger-tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ledger-tbl tbody tr { cursor: pointer; }
.ledger-tbl tbody tr:hover td { background: rgba(118, 185, 0, 0.06); }
.ledger-tbl tbody tr:last-child td { border-bottom: 0; }
.ledger-tbl .num { font-family: var(--mono); text-align: right; white-space: nowrap; }
.ledger-tbl .code { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.ledger-tbl .title { font-weight: 700; }
.ledger-tbl .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ledger-tbl .price { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.ledger-tbl .cap { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; }
.ledger-tbl .tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.ledger-tbl .tags .tag { height: 21px; font-size: 11px; padding: 0 7px; }
.ledger-tbl .go { color: var(--nv-hot); font-weight: 700; white-space: nowrap; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager .info { font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.pager .pages { display: flex; gap: 6px; align-items: center; }
.pager button {
  min-width: 32px; height: 30px; padding: 0 9px; background: transparent; border: 1px solid var(--line-strong);
  color: var(--text-2); font-size: 13px; cursor: pointer; border-radius: 2px;
}
.pager button:hover:not(:disabled) { border-color: var(--nv); color: var(--nv-hot); }
.pager button.on { background: var(--nv); border-color: var(--nv); color: #000; font-weight: 700; }
.pager button:disabled { opacity: 0.35; cursor: not-allowed; }

/* 详情页：规格 + 保函 + 罚则 三段 */
.detail-section { margin-top: 40px; }
.detail-section h2 { font-size: 20px; margin-bottom: 6px; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 16px; }
.detail-list .item { background: var(--bg-1); padding: 14px 16px; min-width: 0; }
.detail-list .item dt { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.detail-list .item dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; word-break: break-word; }
.detail-list .item.empty dd { color: var(--text-3); font-weight: 400; }
@media (max-width: 640px) { .detail-list { grid-template-columns: 1fr; } }

/* 邀请码门户页：隐藏导航头与页脚，避免与全屏门户布局冲突（窄屏尤其明显），
   也避免页脚在门户下方撑出滚动条 */
body.is-gate .nav,
body.is-gate .foot { display: none; }

/* 邀请码待填写页：隐藏“货源总览”导航、右栏“浏览货源”与页脚运营入口
   权重需高于 app.css 里的 .nav-links / .nav-right { display: flex } */
body.is-gate .nav .nav-links,
body.is-gate .nav .nav-links a,
body.is-gate .nav .nav-right,
body.is-gate .foot .foot-links a { display: none; }

/* 加载态：ID 选择器的优先级高于 app.css 的 .nav-links / .nav-right，
   确认登录状态期间先按门户处理，避免“货源总览”导航、页脚运营入口与版本号露出 */
body.is-loading #nav-links,
body.is-loading #nav-right,
body.is-loading .nav-links a,
body.is-loading .foot .foot-links a,
body.is-loading #build-tag { display: none; }
