.pay-wrap {
  padding: 0 10px calc(20px + env(safe-area-inset-bottom));
}

.pay-top {
  display: flex;
  align-items: center;
  margin-top: 8px;
  padding: 5px 6px;
  background: #FFFFFF;
  border: 1px solid #E5E6EB;
}

.pay-back {
  color: #1D2129;
  font-size: 12px;
  text-decoration: none;
  padding: 2px 8px;
  background: #F7F8FA;
  border: 1px solid #E5E6EB;
}

.pay-back:active {
  transform: translateY(1px);
  background: #EDEFF2;
}

.pay-head-title {
  flex: 1 1 auto;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #1D2129;
  padding-right: 46px;
}

.pay-balance {
  margin-top: 8px;
  padding: 14px 12px;
  background: #FFFFFF;
  border: 1px solid #E5E6EB;
}

.pay-balance-label {
  color: #86909C;
  font-size: 12px;
}

.pay-balance-num {
  margin-top: 4px;
  color: #F53F3F;
  font-size: 26px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.2;
}

.pay-balance-sub {
  margin-top: 6px;
  color: #86909C;
  font-size: 11px;
}

.pay-tip {
  margin-top: 8px;
  padding: 7px 10px;
  background: #FFF7E8;
  border: 1px solid #FFCF8B;
  color: #D25F00;
  font-size: 12px;
}

.pay-tip.ok {
  background: #E8FFEA;
  border-color: #7BE188;
  color: #00B42A;
}

.pay-tip.err {
  background: #FFECE8;
  border-color: #FBACA3;
  color: #F53F3F;
}

.pay-panel {
  margin-top: 10px;
  background: #FFFFFF;
  border: 1px solid #E5E6EB;
}

.pay-panel .panel-title {
  padding: 4px 8px;
  background: #F7F8FA;
  border-bottom: 1px solid #E5E6EB;
  color: #1D2129;
  font-size: 12px;
  font-weight: 700;
}

.pay-panel-title2 {
  margin-top: 12px;
  border-top: 1px solid #EEF0F3;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
}

.amount-btn {
  padding: 12px 0;
  background: #F7F8FA;
  color: #1D2129;
  border: 1px solid #E5E6EB;
  border-radius: 3px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.amount-btn:active {
  transform: translateY(1px);
  background: #EDEFF2;
}

.amount-btn.active {
  background: #EDEFF2;
  border: 2px solid #165DFF;
  font-weight: 700;
}

.amount-custom {
  display: flex;
  align-items: center;
  margin: 0 10px 10px;
  padding: 0 8px;
  height: 34px;
  background: #F7F8FA;
  border: 1px solid #E5E6EB;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.08);
}

.amount-unit {
  color: #86909C;
  font-size: 13px;
  margin-right: 4px;
}

.amount-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: #1D2129;
}

.amount-input::placeholder {
  color: #C9CDD4;
  font-size: 12px;
}

.pay-ways {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pay-way {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: #F7F8FA;
  border: 1px solid #E5E6EB;
  cursor: pointer;
}

.pay-way.active {
  background: #EDEFF2;
  border: 2px solid #165DFF;
}

.pay-way.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pay-way-name {
  font-size: 13px;
  font-weight: 700;
  color: #1D2129;
}

.pay-way-desc {
  font-size: 11px;
  color: #86909C;
}

.pay-submit {
  display: block;
  width: calc(100% - 20px);
  margin: 0 10px 12px;
  padding: 11px 0;
  background: #F7F8FA;
  color: #1D2129;
  border: 1px solid #E5E6EB;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.pay-submit:active {
  transform: translateY(1px);
  background: #EDEFF2;
}

.pay-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pay-notes {
  margin: 0;
  padding: 10px 10px 10px 26px;
  color: #4E5969;
  font-size: 12px;
  line-height: 1.9;
}

.pay-empty {
  padding: 24px 0;
  text-align: center;
  color: #C9CDD4;
  font-size: 12px;
}

.rec-list {
  display: flex;
  flex-direction: column;
}

.rec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
}

.rec-item + .rec-item {
  border-top: 1px solid #EEF0F3;
}

.rec-left {
  min-width: 0;
}

.rec-right {
  text-align: right;
  flex: 0 0 auto;
  margin-left: 8px;
}

.rec-amount {
  font-size: 13px;
  font-weight: 700;
  color: #1D2129;
}

.rec-no {
  margin-top: 2px;
  font-size: 11px;
  color: #86909C;
  word-break: break-all;
}

.rec-time {
  margin-top: 2px;
  font-size: 11px;
  color: #C9CDD4;
}

.rec-remark {
  font-size: 12px;
  color: #1D2129;
  word-break: break-all;
}

.rec-tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  border: 1px solid;
  text-decoration: none;
}

.rec-ok {
  color: #00B42A;
  border-color: #7BE188;
  background: #E8FFEA;
}

.rec-wait {
  color: #D25F00;
  border-color: #FFCF8B;
  background: #FFF7E8;
}

.rec-fail {
  color: #F53F3F;
  border-color: #FBACA3;
  background: #FFECE8;
}

.rec-delta {
  font-size: 13px;
  font-weight: 700;
}

.rec-in {
  color: #00B42A;
}

.rec-out {
  color: #F53F3F;
}

.rec-left-amt {
  margin-top: 2px;
  font-size: 11px;
  color: #C9CDD4;
}

.pay-modal {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.pay-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.pay-modal-box {
  width: 78%;
  max-width: 300px;
  background: #FFFFFF;
  border: 1px solid #E5E6EB;
  transform: translateY(8px);
  transition: transform 0.18s ease;
}

.pay-modal.show .pay-modal-box {
  transform: translateY(0);
}

.pay-modal-title {
  padding: 5px 8px;
  background: #F7F8FA;
  border-bottom: 1px solid #E5E6EB;
  font-size: 12px;
  font-weight: 700;
  color: #1D2129;
}

.pay-modal-amount {
  padding: 14px 0 4px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #F53F3F;
}

.pay-modal-info {
  padding: 0 12px 12px;
  text-align: center;
  font-size: 11px;
  color: #86909C;
  line-height: 1.8;
}

.pay-modal-btns {
  display: flex;
  border-top: 1px solid #E5E6EB;
}

.pay-modal-btn {
  flex: 1 1 0;
  padding: 9px 0;
  background: #F7F8FA;
  color: #1D2129;
  border: none;
  border-radius: 3px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.pay-modal-btn:active {
  background: #EDEFF2;
}

.pay-modal-btn + .pay-modal-btn {
  border-left: 1px solid #E5E6EB;
}

.pay-modal-ok {
  font-weight: 700;
}

.ml-sum {
  display: flex;
  margin-top: 8px;
  background: #FFFFFF;
  border: 1px solid #E5E6EB;
}

.ml-sum-item {
  flex: 1 1 0;
  padding: 10px 4px;
  text-align: center;
}

.ml-sum-item + .ml-sum-item {
  border-left: 1px solid #EEF0F3;
}

.ml-sum-label {
  font-size: 11px;
  color: #86909C;
}

.ml-sum-num {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #1D2129;
}

.ml-sum-num.ml-in {
  color: #00B42A;
}

.ml-sum-num.ml-out {
  color: #F53F3F;
}

.ml-tabs {
  display: flex;
  margin-top: 10px;
  background: #FFFFFF;
  border: 1px solid #E5E6EB;
}

.ml-tab {
  flex: 1 1 0;
  padding: 8px 0;
  text-align: center;
  font-size: 12px;
  color: #1D2129;
  text-decoration: none;
  background: #F7F8FA;
}

.ml-tab + .ml-tab {
  border-left: 1px solid #E5E6EB;
}

.ml-tab.active {
  background: #FFFFFF;
  font-weight: 700;
  border-bottom: 2px solid #165DFF;
}

.ml-type {
  margin-top: 2px;
  font-size: 11px;
}

.ml-type.rec-in {
  color: #00B42A;
}

.ml-type.rec-out {
  color: #F53F3F;
}

.wd-form {
  padding: 10px;
}

.wd-row {
  margin-bottom: 10px;
}

.wd-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #4E5969;
}

.wd-amount-box {
  margin: 0;
  height: 36px;
}

.wd-all {
  margin-top: 6px;
  padding: 4px 12px;
  background: #F7F8FA;
  color: #1D2129;
  border: 1px solid #E5E6EB;
  border-radius: 3px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.wd-all:active {
  transform: translateY(1px);
  background: #EDEFF2;
}

.wd-types {
  display: flex;
  gap: 6px;
}

.wd-type {
  flex: 1 1 0;
  padding: 8px 0;
  background: #F7F8FA;
  color: #1D2129;
  border: 1px solid #E5E6EB;
  border-radius: 3px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.wd-type.active {
  background: #EDEFF2;
  border: 2px solid #165DFF;
  font-weight: 700;
}

.wd-input {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  background: #F7F8FA;
  border: 1px solid #E5E6EB;
  border-radius: 3px;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  color: #1D2129;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.08);
}

.wd-input::placeholder {
  color: #C9CDD4;
}

.wd-qr {
  width: 96px;
  height: 96px;
  border: 1px dashed #E5E6EB;
  background: #F7F8FA;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.wd-qr-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.wd-qr-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #FFFFFF;
}

.wd-qr-plus {
  font-size: 22px;
  color: #E5E6EB;
  line-height: 1;
}

.wd-qr-text {
  margin-top: 3px;
  font-size: 11px;
  color: #86909C;
}

.wd-tip {
  margin-top: 4px;
  font-size: 11px;
  color: #C9CDD4;
}

.wd-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 10px;
  padding: 8px 10px;
  background: #F7F8FA;
  border: 1px solid #EEF0F3;
  font-size: 12px;
  color: #4E5969;
}

.wd-sum-num {
  font-size: 15px;
  font-weight: 700;
  color: #F53F3F;
}

.wd-remark {
  margin-top: 3px;
  font-size: 11px;
  color: #C9CDD4;
  max-width: 130px;
  word-break: break-all;
}

/* ===== 现代简洁风覆盖 ===== */
.pay-wrap { padding: 0 12px calc(24px + env(safe-area-inset-bottom)); }

.pay-top {
  background: transparent;
  border: none;
  padding: 12px 0 4px;
}
.pay-back {
  background: #F2F3F5;
  border: none;
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 13px;
  color: #4E5969;
}
.pay-back:active { background: #EDEFF2; transform: none; }
.pay-head-title { font-size: 16px; font-weight: 600; color: #1D2129; }

.pay-balance {
  background: linear-gradient(135deg, #165DFF 0%, #3C7EFF 100%);
  border: none;
  border-radius: 3px;
  padding: 20px 18px;
  margin-top: 10px;
  box-shadow: 0 6px 18px rgba(22, 93, 255, 0.18);
}
.pay-balance-label { color: rgba(255,255,255,.8); font-size: 12px; }
.pay-balance-num { color: #FFFFFF; font-size: 32px; font-weight: 700; margin-top: 6px; letter-spacing: .5px; }
.pay-balance-sub { color: rgba(255,255,255,.75); font-size: 11px; margin-top: 8px; }

.pay-tip { border-radius: 3px; padding: 10px 14px; margin-top: 10px; border: none; font-size: 12px; }

.pay-panel {
  background: #FFFFFF;
  border: 1px solid #E5E6EB;
  border-radius: 3px;
  margin-top: 12px;
  overflow: hidden;
}
.pay-panel .panel-title {
  background: transparent;
  border-bottom: 1px solid #F2F3F5;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #1D2129;
}
.pay-panel-title2 { border-top: none; margin-top: 0; }

.amount-grid { gap: 10px; padding: 14px 16px; }
.amount-btn {
  background: #F7F8FA;
  border: 1px solid #E5E6EB;
  border-radius: 3px;
  padding: 14px 0;
  font-size: 15px;
  color: #1D2129;
  transition: all .18s ease;
}
.amount-btn:active { background: #EDEFF2; transform: none; }
.amount-btn.active {
  background: #E8F3FF;
  border: 1.5px solid #165DFF;
  color: #165DFF;
  font-weight: 600;
}

.amount-custom {
  background: #F7F8FA;
  border: 1px solid #E5E6EB;
  border-radius: 3px;
  box-shadow: none;
  height: 46px;
  margin: 0 16px 16px;
}
.amount-unit { color: #86909C; font-size: 15px; }
.amount-input { font-size: 15px; }

.pay-ways { padding: 14px 16px; gap: 10px; }
.pay-way {
  background: #F7F8FA;
  border: 1px solid #E5E6EB;
  border-radius: 3px;
  padding: 13px 14px;
  transition: all .18s ease;
}
.pay-way.active { background: #E8F3FF; border: 1.5px solid #165DFF; }
.pay-way-name { font-size: 14px; font-weight: 600; color: #1D2129; }
.pay-way-desc { font-size: 12px; color: #86909C; }

.pay-submit {
  background: #165DFF;
  color: #FFFFFF;
  border: none;
  border-radius: 3px;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 600;
  margin: 4px 16px 16px;
  width: calc(100% - 32px);
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.22);
  transition: opacity .18s ease;
}
.pay-submit:active { opacity: .85; transform: none; }

.pay-notes { padding: 14px 18px 14px 30px; color: #86909C; font-size: 12px; line-height: 2; }
.pay-empty { color: #C9CDD4; padding: 30px 0; }

.rec-item { padding: 12px 16px; }
.rec-item + .rec-item { border-top: 1px solid #F7F8FA; }
.rec-amount { font-size: 15px; font-weight: 600; }
.rec-no, .rec-time { font-size: 11px; color: #86909C; }
.rec-remark { font-size: 13px; color: #1D2129; }
.rec-tag { border: none; border-radius: 3px; padding: 2px 8px; font-size: 11px; font-weight: 500; }
.rec-ok { background: #E8FFEA; color: #00A22A; }
.rec-wait { background: #FFF7E8; color: #D25F00; }
.rec-fail { background: #FFECE8; color: #F53F3F; }
.rec-delta { font-size: 15px; font-weight: 600; }
.rec-left-amt { font-size: 11px; color: #C9CDD4; }

.pay-modal-box { border: none; border-radius: 3px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15); overflow: hidden; }
.pay-modal-title { background: transparent; border-bottom: 1px solid #F2F3F5; padding: 14px 16px; font-size: 15px; font-weight: 600; }
.pay-modal-amount { color: #1D2129; font-size: 30px; font-weight: 700; }
.pay-modal-info { color: #86909C; font-size: 12px; line-height: 2; }
.pay-modal-btns { border-top: 1px solid #F2F3F5; padding: 10px; gap: 10px; display: flex; }
.pay-modal-btn { background: #F2F3F5; border: none !important; border-radius: 3px; padding: 11px 0; font-size: 14px; color: #4E5969; }
.pay-modal-btn + .pay-modal-btn { border-left: none; }
.pay-modal-ok { background: #165DFF; color: #FFFFFF; font-weight: 600; }

.ml-sum { border: 1px solid #E5E6EB; border-radius: 3px; overflow: hidden; margin-top: 10px; }
.ml-sum-item { padding: 14px 4px; }
.ml-sum-item + .ml-sum-item { border-left: 1px solid #F2F3F5; }
.ml-sum-label { font-size: 11px; color: #86909C; }
.ml-sum-num { font-size: 16px; font-weight: 600; margin-top: 5px; }
.ml-sum-num.ml-in { color: #00A22A; }
.ml-sum-num.ml-out { color: #F53F3F; }

.ml-tabs { border: none; border-radius: 3px; overflow: hidden; background: #F2F3F5; padding: 3px; gap: 2px; display: flex; margin-top: 12px; }
.ml-tab { background: transparent; border: none; border-radius: 3px; padding: 8px 0; font-size: 13px; color: #4E5969; }
.ml-tab + .ml-tab { border-left: none; }
.ml-tab.active { background: #FFFFFF; color: #165DFF; font-weight: 600; border-bottom: none; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ml-type { font-size: 11px; margin-top: 2px; }
.ml-type.rec-in { color: #00A22A; }
.ml-type.rec-out { color: #F53F3F; }

.wd-form { padding: 16px; }
.wd-row { margin-bottom: 16px; }
.wd-label { font-size: 13px; color: #4E5969; margin-bottom: 8px; }
.wd-amount-box { height: 46px; border-radius: 3px; }
.wd-all { background: #F2F3F5; border: none; border-radius: 3px; padding: 6px 14px; font-size: 12px; color: #4E5969; }
.wd-all:active { background: #EDEFF2; transform: none; }
.wd-types { gap: 10px; }
.wd-type { background: #F7F8FA; border: 1px solid #E5E6EB; border-radius: 3px; padding: 11px 0; font-size: 13px; }
.wd-type.active { background: #E8F3FF; border: 1.5px solid #165DFF; color: #165DFF; font-weight: 600; }
.wd-input { background: #F7F8FA; border: 1px solid #E5E6EB; border-radius: 3px; height: 46px; font-size: 14px; box-shadow: none; }
.wd-input:focus { border-color: #165DFF; background: #FFFFFF; }
.wd-qr { border: 1px dashed #C9CDD4; border-radius: 3px; background: #F7F8FA; }
.wd-qr-plus { color: #C9CDD4; }
.wd-qr-text, .wd-tip { font-size: 11px; color: #86909C; }
.wd-sum { background: #F7F8FA; border: none; border-radius: 3px; padding: 12px 14px; font-size: 13px; }
.wd-sum-num { color: #165DFF; font-size: 16px; }
.wd-remark { color: #C9CDD4; }

.tk-head-title, .tk-title { color: #1D2129 !important; }
