/* 基差合同 · 合同详情 */
:root {
  --color-primary: #FF620A;
  --color-primary-deep: #FF8002;
  --color-gold: #FFA921;
  --color-purple: #C53DFA;
  --color-red: #E43A3A;
  --color-copy: #EA7632;
  --color-link: #ff6a00;
  --color-bg: #fafafa;
  --color-card: #ffffff;
  --color-text: #333333;
  --color-text-secondary: #666666;
  --gradient-btn: linear-gradient(180deg, #FFA921 0%, #FF8002 100%);
  --gradient-header: linear-gradient(135deg, #FF9A3D 0%, #FF6A14 55%, #FF8018 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 37.5px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; color: var(--color-text); background: #e9edf2;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--color-bg); padding-bottom: 2.13333rem; overflow-x: hidden; }

.nav {
  position: sticky; top: 0; z-index: 100;
  height: 50px; display: flex; align-items: center; justify-content: center;
  background: var(--gradient-header); color: #fff;
}
.nav__back {
  position: absolute; left: 12px; top: 0; bottom: 0;
  display: flex; align-items: center; color: #fff; background: none; border: 0; padding: 0 8px; cursor: pointer;
}
.nav__title { font-size: 17px; font-weight: 600; }

.detail-header {
  background-color: #FF8018;
  background-image: linear-gradient(135deg, #FF9A3D 0%, #FF6A14 55%, #FF8018 100%);
  padding: 0.26667rem 0.53333rem 0.4rem 0.66667rem;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 1.78667rem; color: #fff;
}
.detail-header__status { font-size: 18px; font-weight: 600; margin-bottom: 0.13333rem; color: #fff; }
.detail-header__shop { font-size: 15px; color: #fff; }

.box {
  background: #FFFFFF; border-radius: 0.16rem; border: 1px solid #FFFFFF;
  margin: 0.26667rem 0.4rem; padding: 0.4rem; position: relative;
}
.product-name { color: #333; font-size: 16px; font-weight: 600; }

.labels { margin-top: 0.13333rem; display: flex; flex-wrap: wrap; }
.label {
  margin-right: 0.13333rem; height: 0.53333rem; line-height: 0.53333rem;
  text-align: center; margin-bottom: 0.13333rem; font-size: 13px; padding: 0 0.13333rem;
  border-radius: 0.08rem;
}
.label--purple { color: #C53DFA; border: 1px solid #C53DFA; }
.label--orange { background: #FFF0E6; color: #FB6E0F; }

.info { margin-top: 5px; color: #666; font-size: 15px; }
.info__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  min-height: 22px;
  width: 100%;
}
.info__label { color: #666; flex-shrink: 0; }
.info__val { color: #333; font-weight: 600; text-align: right; margin-left: 12px; }
.info__key { color: #E43A3A; font-style: normal; font-weight: 600; }
.info__actions {
  margin-top: 0.34667rem; padding-top: 0.37333rem;
  border-top: 1px dashed #eee; display: flex; gap: 0.32rem;
}
.info__btn {
  flex: 1; min-width: 0; height: 0.96rem; line-height: 0.96rem; text-align: center;
  background: #FFFFFF; border-radius: 0.58667rem;
  border: 1px solid #FF8204; color: #FF8002; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; display: block;
}
.info__btn--primary {
  background: linear-gradient(180deg, #FFA921 0%, #FF8002 100%);
  border: none; color: #fff; margin-left: 0;
}

.meta { color: #666; font-size: 15px; }
.meta__item {
  margin-bottom: 0.13333rem; display: flex; flex-wrap: wrap;
  font-family: PingFangSC-Regular, PingFang SC;
}
.meta__item:last-child { margin-bottom: 0; }
.meta__label { min-width: 2rem; }

.sign-row {
  display: flex; justify-content: space-between; align-items: center;
  color: #333; font-size: 16px; font-weight: 500;
}
.sign-row__name { color: #666; font-size: 15px; font-weight: 400; }

.contract-extra { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; }
.contract-extra__title { color: #333; font-size: 16px; font-weight: 500; margin-right: 0.66667rem; }
.contract-extra__actions { display: flex; flex-direction: column; align-items: flex-end; }
.contract-view { display: flex; align-items: center; gap: 4px; color: #666; font-size: 15px; cursor: pointer; }
.copy-pdf { font-size: 0.37333rem; color: #ff6a00; line-height: 0.69333rem; margin-top: 0.05333rem; cursor: pointer; }

.section-title { color: #333; font-size: 16px; font-weight: 500; margin-bottom: 0.4rem; }
.info-line { color: #666; font-size: 15px; margin-bottom: 0.13333rem; }
.copy-btn { color: #EA7632; margin-left: 0.26667rem; font-size: 13px; font-weight: 500; cursor: pointer; }

.stamp {
  position: absolute; right: 0.13333rem; bottom: 0.4rem;
  width: 1.68rem; height: 1.28rem;
  border: 2px solid rgba(255,98,10,0.45); border-radius: 6px;
  color: rgba(255,98,10,0.55); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-18deg); pointer-events: none;
}

.contact-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 1.30667rem;
  background: #fff; display: flex; justify-content: space-around; align-items: center;
  padding: 0 1.06667rem; box-shadow: 0 0 0.13333rem rgba(0,0,0,0.1); z-index: 50;
  box-sizing: border-box;
}
.contact-bar__item {
  color: #666; display: flex; align-items: center; font-size: 18px; gap: 0.26667rem;
}

.label--xt {
  background: linear-gradient(90deg, #FF8618 0%, #FF620A 100%);
  color: #fff; border: 0;
}

.ledger {
  margin-top: 0.4rem; padding-top: 0.32rem; border-top: 1px dashed #eee;
}
.ledger__title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 0.21333rem; }
.ledger__row {
  display: flex; align-items: center; gap: 0.16rem;
  padding: 0.16rem 0; font-size: 14px;
}
.ledger__lbl { color: #666; min-width: 4.5em; }
.ledger__val { color: #333; font-weight: 700; flex: 1; }
.ledger__row--hl .ledger__val { color: #FF620A; }
.ledger__link { color: #468DF1; font-size: 13px; white-space: nowrap; }
.ledger__link--muted { color: #999; font-size: 12px; }
.ledger__sub {
  margin: -0.08rem 0 0.08rem 4.5em; font-size: 12px; color: #B85A1A;
}
.ledger__sub a { color: #468DF1; }

.source-banner {
  margin: 0.26667rem 0 0.32rem; padding: 0.26667rem;
  background: #FFF8F2; border-radius: 0.10667rem;
  font-size: 13px; color: #B85A1A; line-height: 1.55;
}
.source-banner a { color: #468DF1; }

.action-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; gap: 0.21333rem;
  padding: 0.26667rem 0.4rem calc(0.26667rem + env(safe-area-inset-bottom));
  background: #fff; box-shadow: 0 -2px 8px rgba(0,0,0,.06); z-index: 50;
  box-sizing: border-box;
}
.action-bar__btn {
  flex: 1; height: 1.06667rem; line-height: 1.06667rem; text-align: center;
  border-radius: 0.10667rem; font-size: 14px; font-weight: 600;
  background: linear-gradient(90deg, #FF8618 0%, #FF620A 100%); color: #fff;
}
.action-bar__btn--plain {
  background: #fff; color: #FF620A; border: 1px solid #FF620A; line-height: calc(1.06667rem - 2px);
}
.app { padding-bottom: 2.4rem; }
