/* 基础 */
:root{
  --bg:#f2f3f5;
  --card:#ffffff;
  --text:#111827;
  --sub:#6b7280;
  --line:#e5e7eb;
  --blue:#1677ff;
  --blue2:#2a6fff;
  --danger:#ef4444;
  --ok:#10b981;
  --warn:#f59e0b;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* 顶栏 */
.topbar{
  height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 12px;
  background: #f6f7f9;
  border-bottom:1px solid var(--line);
}
.title{
  font-size:18px;
  font-weight:600;
  letter-spacing:.5px;
}
.icon-btn{
  width:40px;height:40px;
  border:none;
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  cursor:pointer;
}
.icon-btn:active{background:rgba(0,0,0,.05)}
.chev{
  display:none;
  width:10px;height:10px;
  border-left:2px solid #111;
  border-bottom:2px solid #111;
  transform:rotate(45deg);
  margin-left:6px;
}
.dots{display:none; gap:4px}
.dots i{
  width:4px;height:4px;border-radius:50%;
  background:#111;
  display:inline-block;
}

/* 页面 */
.page{
  max-width:520px;
  margin:0 auto;
  padding:14px 14px 28px;
}

/* 卡片 */
.card{
  background:var(--card);
  border-radius:18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
  overflow:hidden;
}
.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 16px;
}
.row-link{
  display: none;
  cursor:pointer;
}
.row-link:active{background:rgba(0,0,0,.02)}
.left{display:flex; align-items:center; gap:10px}
.badge{
  width:28px;height:28px;border-radius:14px;
  background:rgba(22,119,255,.10);
  color:var(--blue);
  display:flex; align-items:center; justify-content:center;
  font-weight:700;
}
.label{color:var(--sub); font-size:14px}
.right{display:flex; align-items:center; gap:10px}
.value{font-size:15px}
.arrow{
  width:8px;height:8px;
  border-right:2px solid #9ca3af;
  border-top:2px solid #9ca3af;
  transform:rotate(45deg);
}

/* 状态：生成中 */
.state{
  padding:14px 16px 2px;
  display:flex;
  align-items:center;
  gap:12px;
}
.spinner{
  width:22px;height:22px;
  border-radius:50%;
  border:3px solid rgba(22,119,255,.20);
  border-top-color: var(--blue);
  animation: spin 1s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.state-title{font-size:14px;font-weight:600}
.state-sub{font-size:13px;color:var(--sub); margin-top:2px}

/* 金额 */
.amount{
  padding:14px 16px 16px;
}
.amount-label{color:var(--sub); font-size:14px; margin-bottom:10px}
.amount-box{
  height:86px;
  border-radius:14px;
  background:#fafafa;
  border:1px solid var(--line);
  display:flex;
  align-items:flex-end;
  padding:18px 16px;
  gap:8px;
}
.currency{
  font-size:32px;
  font-weight:700;
  line-height:1;
}
.amount-value{
  font-size:46px;
  font-weight:800;
  line-height:1;
  letter-spacing:1px;
}
.divider{height:10px;background:var(--bg)}
.list{padding:10px 16px 6px}
.item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 0;
  border-bottom:1px dashed rgba(229,231,235,.9);
}
.item:last-child{border-bottom:none}
.k{color:var(--sub);font-size:14px}
.v{font-size:14px; font-weight:600}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(22,119,255,.25);
  background:rgba(22,119,255,.06);
  font-weight:700;
}
.pill-dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--blue);
}

/* 状态颜色 */
.status{font-weight:800}
.status-pending{color:var(--warn)}
.status-paid{color:var(--ok)}
.status-expired{color:var(--danger)}
.status-unknown{color:#64748b}

/* 提示 */
.hint{
  padding:14px 16px 18px;
  color:var(--sub);
}
.hint-title{
  font-size:13px;
  font-weight:700;
  color:#374151;
  margin-bottom:6px;
}
.hint-text{font-size:13px; line-height:1.5}

/* 底部按钮 */
.footer{margin-top:16px}
.cta-wrap{
  background:transparent;
  padding:6px 2px 0;
}
.cta{
  width:100%;
  height:52px;
  border:none;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(22,119,255,.35), rgba(22,119,255,.85));
  color:#fff;
  font-size:16px;
  font-weight:800;
  letter-spacing:.5px;
  cursor:pointer;
  box-shadow: 0 12px 22px rgba(22,119,255,.18);
}
.cta:active{transform:scale(.995)}
.cta[disabled]{
  cursor:not-allowed;
  filter:saturate(.35);
  opacity:.7;
  box-shadow:none;
}
.safe-text{
  margin-top:10px;
  text-align:center;
  font-size:12px;
  color:#9ca3af;
}

/* toast */
.toast{
  position:fixed;
  left:50%;
  bottom:26px;
  transform:translateX(-50%);
  background:rgba(17,24,39,.92);
  color:#fff;
  padding:10px 14px;
  border-radius:12px;
  font-size:13px;
  max-width:88vw;
  text-align:center;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
}

/* helper */
.hidden{display:none !important}
