:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-soft: #fff6f8;
  --ink: #172033;
  --muted: #647084;
  --line: #dfe5ee;
  --primary: #e83f65;
  --primary-strong: #c92c51;
  --teal: #13a989;
  --blue: #2f79e8;
  --amber: #d98412;
  --red: #d93636;
  --green: #15a46c;
  --shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
  color-scheme: light;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(232, 63, 101, 0.07), transparent 280px),
    var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 48px;
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.brand-stage {
  display: grid;
  gap: 24px;
}

.brand-mark,
.app-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 14px 28px rgba(232, 63, 101, 0.25);
}

.logo-image {
  object-fit: cover;
}

.brand-stage h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.brand-stage p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 640px;
}

.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.metric b {
  display: block;
  font-size: 24px;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.auth-card,
.panel,
.summary-card,
.stat,
.channel-card,
.order-card,
.account-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 24px;
}

.auth-tabs,
.portal-tabs,
.user-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-tabs button,
.portal-tabs button,
.user-tabs button,
.segmented button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 10px 14px;
  min-height: 42px;
}

.auth-tabs button.active,
.portal-tabs button.active,
.user-tabs button.active,
.segmented button.active {
  border-color: rgba(232, 63, 101, 0.26);
  background: var(--primary);
  color: #fff;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

.field textarea {
  min-height: 78px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(232, 63, 101, 0.62);
  box-shadow: 0 0 0 3px rgba(232, 63, 101, 0.1);
}

.captcha-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.captcha-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 104px;
  padding: 0 12px;
  border-radius: 8px;
  background: #eef7f4;
  color: #09614f;
  font-weight: 800;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  min-width: 112px;
  min-height: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.btn.primary {
  background: var(--primary);
}

.btn.primary:hover {
  background: var(--primary-strong);
}

.btn.soft {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.btn.blue {
  background: var(--blue);
}

.btn.green {
  background: var(--green);
}

.btn.warn {
  background: var(--amber);
}

.btn.danger {
  background: var(--red);
}

.btn.icon {
  width: 42px;
  padding: 0;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.brand-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-mark {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.brand-inline strong {
  display: block;
  font-size: 18px;
}

.brand-inline span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.portal-tabs {
  justify-content: center;
}

.user-chip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.page-head h2 {
  margin: 0;
  font-size: 28px;
}

.page-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px;
  box-shadow: none;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.stat b {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.stat small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.content-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.side-nav {
  display: grid;
  gap: 8px;
  align-self: start;
}

.side-nav button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.side-nav button.active {
  border-color: rgba(232, 63, 101, 0.28);
  background: var(--panel-soft);
  color: var(--primary-strong);
  font-weight: 700;
}

.panel {
  padding: 18px;
}

.section-stack {
  display: grid;
  gap: 18px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.section-title h3 {
  margin: 0;
  font-size: 18px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.channel-card,
.order-card,
.account-row {
  padding: 16px;
  box-shadow: none;
}

.account-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.account-row p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.receipt-box {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  border: 1px dashed #c8d2df;
  border-radius: 8px;
  background: #f9fbfd;
  padding: 12px;
}

.receipt-box p {
  margin: 6px 0 0;
}

.receipt-qr {
  display: grid;
  place-items: center;
  min-height: 82px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  overflow: hidden;
  word-break: break-all;
  padding: 8px;
}

.receipt-qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-mini {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.qr-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-box {
  display: grid;
  grid-template-columns: 88px minmax(112px, auto);
  gap: 10px;
  align-items: center;
}

.upload-preview {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
}

.upload-preview .qr-mini {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 0;
}

.upload-button {
  width: 112px;
}

.upload-field input[type="file"] {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.platform-view .btn {
  min-width: 124px;
  width: 124px;
}

.platform-view .button-row .btn,
.platform-view .account-row > .btn {
  flex: 0 0 124px;
}

.channel-card header,
.order-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.channel-card h4,
.order-card h4 {
  margin: 0;
  font-size: 16px;
}

.channel-card p,
.order-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.wallet-box,
.copy-box {
  display: grid;
  gap: 8px;
  border: 1px dashed #b9c4d3;
  border-radius: 8px;
  background: #f9fbfd;
  padding: 14px;
  word-break: break-all;
}

.wallet-box code,
.copy-box code {
  color: #1d4e89;
  font-family: "Cascadia Mono", Consolas, monospace;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 3px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.green {
  background: var(--green);
}

.badge.blue {
  background: var(--blue);
}

.badge.amber {
  background: var(--amber);
}

.badge.red {
  background: #f04726;
}

.badge.gray {
  background: #7b8798;
}

.badge.teal {
  background: var(--teal);
}

.mini-list {
  display: grid;
  gap: 10px;
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  background: #f4f7fb;
  color: #435064;
  font-weight: 700;
  white-space: nowrap;
}

tbody tr:hover {
  background: #eef8ff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.toolbar .field {
  min-width: 190px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100% - 36px));
  border-radius: 8px;
  padding: 12px 14px;
  background: #172033;
  color: #fff;
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.24);
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.danger-text {
  color: var(--red);
}

.payment-proof-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.payment-proof-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.payment-proof-card.empty-proof {
  grid-template-columns: 1fr;
  color: var(--muted);
}

.payment-proof-card p {
  margin: 4px 0 0;
}

.payment-proof-thumb {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}

.payment-proof-thumb img,
.payment-proof-upload .upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audit-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.order-card.needs-audit {
  border-color: rgba(47, 121, 232, 0.38);
  box-shadow: 0 12px 30px rgba(47, 121, 232, 0.1);
}

.text-link {
  display: inline-flex;
  margin-top: 6px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.success-text {
  color: var(--green);
}

.mt-18 {
  margin-top: 18px;
}

.m-0 {
  margin: 0;
}

@media (max-width: 960px) {
  .app-header {
    position: static;
    background: #fff;
    backdrop-filter: none;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .header-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
    padding: 10px 0;
  }

  .portal-tabs {
    justify-content: flex-start;
    overflow: visible;
    flex-wrap: wrap;
    gap: 6px;
  }

  .portal-tabs button {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .user-chip {
    justify-content: space-between;
    gap: 6px;
  }

  .user-chip .btn {
    flex: 0 0 auto;
  }

  .page-head,
  .content-layout,
  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding-bottom: 0;
  }

  .side-nav button {
    min-width: 0;
    min-height: 38px;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    font-size: 12px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .auth-shell,
  .main,
  .header-inner {
    width: min(100% - 16px, 1280px);
  }

  .auth-shell {
    gap: 16px;
    padding: 18px 0;
  }

  .main {
    padding: 14px 0 28px;
  }

  .brand-mark,
  .app-mark {
    width: 34px;
    height: 34px;
  }

  .brand-stage h1 {
    font-size: 34px;
  }

  .brand-stage p {
    font-size: 13px;
    line-height: 1.55;
  }

  .metric {
    padding: 12px;
  }

  .metric b {
    font-size: 19px;
  }

  .metric span {
    font-size: 12px;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-card,
  .panel {
    padding: 12px;
  }

  .auth-tabs,
  .portal-tabs,
  .user-tabs {
    gap: 6px;
  }

  .auth-tabs button,
  .portal-tabs button,
  .user-tabs button,
  .segmented button {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .btn {
    min-width: 88px;
    min-height: 36px;
    height: 36px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .button-row .btn,
  .form-grid .btn {
    width: 100%;
  }

  .user-chip {
    align-items: stretch;
  }

  .user-chip .btn {
    flex: 1 1 88px;
  }

  .brand-inline {
    gap: 8px;
  }

  .brand-inline strong {
    font-size: 16px;
  }

  .brand-inline span,
  .user-chip {
    font-size: 12px;
  }

  .page-head {
    gap: 8px;
    margin-bottom: 12px;
  }

  .account-row,
  .receipt-box {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .captcha-line {
    grid-template-columns: 1fr;
  }

  .page-head h2 {
    font-size: 21px;
  }

  .page-head p {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.45;
  }

  .grid-4 {
    gap: 8px;
  }

  .stat {
    padding: 11px;
  }

  .stat span,
  .stat small {
    font-size: 11px;
  }

  .stat b {
    margin-top: 4px;
    font-size: 18px;
  }

  .content-layout {
    gap: 12px;
    margin-top: 12px;
  }

  .section-stack {
    gap: 12px;
  }

  .section-title {
    margin-bottom: 10px;
  }

  .section-title h3 {
    font-size: 17px;
  }

  .section-title span,
  .hint,
  .field label {
    font-size: 12px;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 38px;
    padding: 8px 10px;
  }
}


.google-bind-panel {
  display: grid;
  gap: 18px;
}
.google-bind-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(233, 190, 106, 0.35);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(233, 190, 106, 0.12), rgba(20, 28, 48, 0.82));
}
.qr-img {
  width: 220px;
  height: 220px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.secret-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  color: #f7d88b;
  word-break: break-all;
}
.secret-box code {
  font-size: 16px;
  letter-spacing: 1px;
  color: #fff8df;
}
@media (max-width: 720px) {
  .google-bind-box {
    flex-direction: column;
    align-items: flex-start;
  }
  .qr-img {
    width: 190px;
    height: 190px;
  }
}

@media (max-width: 560px) {
  .payment-proof-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding: 8px;
  }

  .payment-proof-thumb {
    width: 76px;
    height: 76px;
  }

  .payment-proof-upload .upload-box {
    grid-template-columns: 76px minmax(96px, 1fr);
  }

  .payment-proof-upload .upload-preview {
    width: 76px;
    height: 76px;
  }
}


/* MERCHANT_QR_UPLOAD_PATCH_V1 */
.merchant-receipt-row {
  grid-template-columns: 64px minmax(0, 1fr) auto;
}
.merchant-receipt-row .qr-mini span,
.receipt-qr span,
.upload-preview span {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.merchant-qr-upload-box .upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* MERCHANT_QR_SAVE_FIX_V2 */
.merchant-receipt-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}
.qr-mini,
.receipt-qr,
.upload-preview {
  border: 1px dashed #d9dee8;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.qr-mini {
  width: 68px;
  height: 68px;
}
.qr-mini img,
.receipt-qr img,
.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.merchant-qr-upload-box .upload-preview {
  width: 92px;
  height: 92px;
}
.merchant-qr-status {
  margin-top: 8px;
  font-weight: 600;
}
textarea[name="account"] {
  min-height: 86px;
  resize: vertical;
}


/* PLATFORM_EDIT_MERCHANT_RECEIPT_V1 */
.platform-receipt-edit-panel {
  border: 1px solid rgba(234, 179, 8, 0.35);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
.platform-receipt-edit-panel .full-span {
  grid-column: 1 / -1;
}
.platform-receipt-edit-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
}
.compact-buttons {
  gap: 6px;
  flex-wrap: wrap;
}
.compact-buttons .btn {
  padding: 6px 10px;
  min-width: 54px;
}
@media (max-width: 768px) {
  .platform-receipt-edit-info {
    grid-template-columns: 1fr;
  }
}


/* MERCHANT_RECEIPT_BUTTON_OVERFLOW_FIX_V1 */
/* 修复商家端收款账户卡片按钮超出边框 */
.merchant-receipt-row,
.account-row.merchant-receipt-row {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
}

.merchant-receipt-row > div,
.account-row.merchant-receipt-row > div {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.merchant-receipt-row .button-row,
.account-row.merchant-receipt-row .button-row {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.merchant-receipt-row .button-row .badge,
.account-row.merchant-receipt-row .button-row .badge {
  grid-column: 1 / -1;
  width: fit-content;
  max-width: 100%;
}

.merchant-receipt-row .button-row .btn,
.account-row.merchant-receipt-row .button-row .btn {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: nowrap;
  padding-left: 10px;
  padding-right: 10px;
}

.merchant-receipt-row .button-row .btn.danger,
.account-row.merchant-receipt-row .button-row .btn.danger {
  width: 100%;
}

/* 小屏幕进一步压缩，防止右侧溢出 */
@media (max-width: 768px) {
  .merchant-receipt-row,
  .account-row.merchant-receipt-row {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .merchant-receipt-row .qr-mini,
  .account-row.merchant-receipt-row .qr-mini {
    width: 54px;
    height: 54px;
  }

  .merchant-receipt-row .button-row,
  .account-row.merchant-receipt-row .button-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .merchant-receipt-row .button-row .btn,
  .account-row.merchant-receipt-row .button-row .btn {
    height: 42px;
    font-size: 14px;
  }
}

/* 极窄屏幕，按钮一行一个 */
@media (max-width: 420px) {
  .merchant-receipt-row .button-row,
  .account-row.merchant-receipt-row .button-row {
    grid-template-columns: 1fr;
  }
}





/* PLATFORM_COMMISSION_RULES_EDIT_V1 */
.txpay-commission-rule-card {
  padding: 14px;
}
.txpay-commission-rule-card .span-3,
.form-grid .span-3 {
  grid-column: 1 / -1;
}
.txpay-commission-rule-card input,
.txpay-commission-rule-card select {
  min-width: 0;
}


/* TXPAY_MERCHANT_QR_UPLOAD_FINAL_V1 */
.merchant-qr-field {
  grid-column: 1 / -1;
}
.merchant-qr-upload-box {
  align-items: center;
}
.upload-box input[type="file"] {
  display: none;
}
.upload-preview,
.qr-mini,
.receipt-qr {
  overflow: hidden;
}
.upload-preview img,
.qr-mini img,
.receipt-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.upload-preview {
  min-height: 130px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, .75);
  background: rgba(248, 250, 252, .9);
  display: grid;
  place-items: center;
}
.qr-mini {
  width: 86px;
  height: 86px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .55);
  background: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 86px;
}
.merchant-receipt-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
@media (max-width: 760px) {
  .merchant-receipt-row {
    grid-template-columns: 1fr;
  }
  .qr-mini {
    width: 120px;
    height: 120px;
  }
}


/* TXPAY_RESTORE_MERCHANT_QR_UPLOAD_BUTTON_V2 */
.txpay-qr-upload-wrap {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.txpay-qr-preview {
  width: 120px;
  height: 120px;
  border: 1px dashed rgba(148, 163, 184, .8);
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.txpay-qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.txpay-qr-empty {
  color: #64748b;
  font-size: 13px;
  text-align: center;
}
.txpay-qr-upload-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.txpay-qr-upload-btn input[type="file"] {
  display: none;
}
.txpay-qr-actions {
  min-width: 0;
}
@media (max-width: 720px) {
  .txpay-qr-upload-wrap {
    grid-template-columns: 1fr;
  }
}


/* TXPAY_SINGLE_MERCHANT_QR_UPLOAD_V1 */
.txpay-single-qr-field {
  grid-column: 1 / -1 !important;
}

.txpay-single-qr-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 520px !important;
}

.txpay-single-qr-preview {
  width: 130px !important;
  height: 130px !important;
  flex: 0 0 130px !important;
  border: 1px dashed rgba(148, 163, 184, .85) !important;
  border-radius: 14px !important;
  background: #fff !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 13px !important;
  writing-mode: horizontal-tb !important;
}

.txpay-single-qr-preview img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

.txpay-single-qr-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.txpay-single-qr-button {
  cursor: pointer !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
}

.txpay-single-qr-button input[type="file"] {
  display: none !important;
}

.txpay-single-qr-actions .hint,
.txpay-single-qr-actions p {
  writing-mode: horizontal-tb !important;
  white-space: normal !important;
  word-break: normal !important;
  line-height: 1.5 !important;
  max-width: 360px !important;
  margin: 0 !important;
}

@media (max-width: 720px) {
  .txpay-single-qr-wrap {
    align-items: flex-start !important;
  }
}
