.rv2-page {
  --rv2-ink: #172033;
  --rv2-muted: #637083;
  --rv2-subtle: #8792a2;
  --rv2-line: #dfe4eb;
  --rv2-line-soft: #edf0f4;
  --rv2-blue: #1769d2;
  --rv2-blue-deep: #0f4f9c;
  --rv2-blue-soft: #eef5ff;
  --rv2-attention: #a96300;
  --rv2-attention-soft: #fff7e8;
  --rv2-risk: #c43e48;
  --rv2-risk-soft: #fff1f2;
  color: var(--rv2-ink);
}

.rv2-page * { box-sizing: border-box; }
.rv2-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.rv2-toolbar h3,
.rv2-panel h3 { margin: 0; color: var(--rv2-ink); letter-spacing: 0; }
.rv2-toolbar h3 { margin-top: 3px; font-size: 22px; font-weight: 760; }
.rv2-toolbar p,
.rv2-panel header p { margin: 4px 0 0; color: var(--rv2-muted); font-size: 12px; line-height: 1.6; }
.rv2-eyebrow { color: var(--rv2-subtle); font-size: 10px; font-weight: 700; letter-spacing: 0; }
.rv2-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.rv2-account-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; overflow: hidden; border: 1px solid var(--rv2-line); border-radius: 7px; background: #fff; }
.rv2-account-strip article { min-width: 0; min-height: 88px; padding: 14px 16px; border-right: 1px solid var(--rv2-line-soft); }
.rv2-account-strip article:last-child { border-right: 0; }
.rv2-account-strip article.is-attention { background: var(--rv2-attention-soft); }
.rv2-account-strip span { display: block; color: var(--rv2-muted); font-size: 11px; font-weight: 650; }
.rv2-account-strip strong { display: block; margin-top: 6px; color: var(--rv2-ink); font-size: 20px; font-weight: 760; }
.rv2-account-strip small { display: block; margin-top: 4px; overflow: hidden; color: var(--rv2-subtle); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rv2-account-strip .is-attention strong,
.rv2-account-strip .is-attention small { color: var(--rv2-attention); }

.rv2-checkout-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.rv2-panel { min-width: 0; overflow: hidden; border: 1px solid var(--rv2-line); border-radius: 7px; background: #fff; }
.rv2-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 13px 16px; border-bottom: 1px solid var(--rv2-line); }
.rv2-panel > header > div:first-child { display: flex; align-items: center; gap: 10px; }
.rv2-panel > header h3 { margin-top: 2px; font-size: 14px; font-weight: 740; }
.rv2-panel-body { padding: 16px; }
.rv2-step { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 6px; background: var(--rv2-blue-soft); color: var(--rv2-blue-deep); font-size: 10px; font-weight: 800; }

.rv2-field { margin-bottom: 17px; }
.rv2-field > label { display: block; margin-bottom: 8px; color: var(--rv2-ink); font-size: 11px; font-weight: 700; }
.rv2-field > small { display: block; margin-top: 6px; color: var(--rv2-subtle); font-size: 9px; }
.rv2-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rv2-amount { height: 42px; border: 1px solid var(--rv2-line); border-radius: 6px; background: #fff; color: var(--rv2-ink); font: inherit; font-size: 12px; font-weight: 720; cursor: pointer; }
.rv2-amount:hover { border-color: #9bbce6; background: #f8fbff; }
.rv2-amount.active { border-color: var(--rv2-blue); background: var(--rv2-blue-soft); color: var(--rv2-blue-deep); box-shadow: inset 0 0 0 1px var(--rv2-blue); }
.rv2-custom { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; overflow: hidden; border: 1px solid var(--rv2-line); border-radius: 6px; }
.rv2-custom:focus-within { border-color: var(--rv2-blue); box-shadow: 0 0 0 2px rgba(23, 105, 210, .11); }
.rv2-custom > span { text-align: right; color: var(--rv2-muted); font-size: 13px; font-weight: 700; }
.rv2-custom input { min-width: 0; height: 42px; padding: 0 9px; border: 0 !important; outline: 0; box-shadow: none !important; }
.rv2-custom .btn { margin-right: 5px; }
.rv2-divider { height: 1px; margin: 20px 0 16px; background: var(--rv2-line); }
.rv2-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rv2-section-title h3 { font-size: 13px; }
.rv2-section-title p { margin: 2px 0 0; color: var(--rv2-muted); font-size: 10px; }

.rv2-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rv2-method { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 58px; padding: 8px 10px; border: 1px solid var(--rv2-line); border-radius: 6px; background: #fff; color: var(--rv2-ink); text-align: left; cursor: pointer; }
.rv2-method:hover:not(.disabled) { border-color: #9bbce6; background: #f8fbff; }
.rv2-method.active { border-color: var(--rv2-blue); background: var(--rv2-blue-soft); box-shadow: inset 0 0 0 1px var(--rv2-blue); }
.rv2-method.disabled { background: #f7f8fa; color: var(--rv2-subtle); cursor: not-allowed; }
.rv2-method-mark,
.rv2-pay-method-mini { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: #fff; font-size: 11px; font-style: normal; font-weight: 800; }
.rv2-method-mark.alipay,
.rv2-pay-method-mini.alipay { background: #1677ff; }
.rv2-method-mark.wechat,
.rv2-pay-method-mini.wechat { background: #168a4a; }
.rv2-method b { display: block; font-size: 11px; }
.rv2-method small { display: block; margin-top: 2px; color: var(--rv2-muted); font-size: 9px; }
.rv2-method.disabled small { color: var(--rv2-subtle); }
.rv2-method > i { color: var(--rv2-subtle); font-size: 9px; font-style: normal; }
.rv2-method.active > i { color: var(--rv2-blue-deep); font-weight: 700; }
.rv2-method-loading { grid-column: 1 / -1; min-height: 58px; padding: 20px; border: 1px dashed var(--rv2-line); border-radius: 6px; color: var(--rv2-muted); font-size: 10px; text-align: center; }
.rv2-form-message { min-height: 18px; margin-top: 10px; color: var(--rv2-muted); font-size: 10px; line-height: 1.5; }
.rv2-form-message.error { color: var(--rv2-risk); }
.rv2-form-message.info { color: var(--rv2-blue-deep); }

.rv2-summary-panel { position: sticky; top: 72px; }
.rv2-summary-panel > header > div:first-child { display: block; }
.rv2-balance-figure { padding: 17px; border-radius: 7px; background: #f7f9fc; text-align: center; }
.rv2-balance-figure span { color: var(--rv2-muted); font-size: 10px; }
.rv2-balance-figure strong { display: block; margin-top: 4px; color: var(--rv2-ink); font-size: 30px; font-weight: 780; }
.rv2-summary-list { margin: 14px 0; }
.rv2-summary-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; border-bottom: 1px solid var(--rv2-line-soft); }
.rv2-summary-list dt { color: var(--rv2-muted); font-size: 10px; }
.rv2-summary-list dd { margin: 0; color: var(--rv2-ink); font-size: 11px; font-weight: 700; }
.rv2-summary-list .total { min-height: 44px; border-bottom: 0; }
.rv2-summary-list .total dt,
.rv2-summary-list .total dd { color: var(--rv2-blue-deep); font-size: 12px; }
.rv2-submit { width: 100%; min-height: 42px; }
.rv2-submit:disabled { border-color: #d8dde5 !important; background: #e9edf2 !important; color: #7d8796 !important; cursor: not-allowed; }
.rv2-secure-note { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 8px; margin-top: 12px; padding: 10px; border: 1px solid var(--rv2-line); border-radius: 6px; background: #fafbfc; }
.rv2-secure-note > span { width: 7px; height: 7px; margin-top: 4px; border: 2px solid var(--rv2-blue); border-radius: 50%; }
.rv2-secure-note p { margin: 0; color: var(--rv2-muted); font-size: 9px; line-height: 1.6; }

.rv2-records > header > div:first-child { display: block; }
.rv2-filter { display: flex; align-items: center; gap: 3px; padding: 9px 16px; border-bottom: 1px solid var(--rv2-line); }
.rv2-filter button { min-width: 58px; height: 28px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--rv2-muted); font: inherit; font-size: 10px; font-weight: 650; cursor: pointer; }
.rv2-filter button:hover { background: var(--rv2-blue-soft); color: var(--rv2-blue-deep); }
.rv2-filter button.active { background: var(--rv2-blue); color: #fff; }
.rv2-order-head,
.rv2-order { display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(120px, .8fr) 100px 78px 150px; align-items: center; gap: 12px; }
.rv2-order-head { min-height: 36px; padding: 0 16px; border-bottom: 1px solid var(--rv2-line); background: #fafbfc; color: var(--rv2-muted); font-size: 10px; font-weight: 700; }
.rv2-order { min-height: 66px; padding: 9px 16px; border-bottom: 1px solid var(--rv2-line-soft); }
.rv2-order:last-child { border-bottom: 0; }
.rv2-order > div:first-child { min-width: 0; }
.rv2-order > div:first-child b { display: block; color: var(--rv2-ink); font-size: 11px; }
.rv2-order code { display: block; margin-top: 3px; overflow: hidden; color: var(--rv2-subtle); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.rv2-order > div:nth-child(2) { display: flex; align-items: center; gap: 7px; color: var(--rv2-muted); font-size: 10px; }
.rv2-pay-method-mini { width: 24px; height: 24px; border-radius: 5px; font-size: 9px; }
.rv2-order > strong { font-size: 12px; }
.rv2-order time { color: var(--rv2-muted); font-size: 10px; }
.rv2-order-status { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 24px; border-radius: 5px; background: var(--rv2-blue-soft); color: var(--rv2-blue-deep); font-size: 9px; font-weight: 700; }
.rv2-order-status.pending { background: var(--rv2-attention-soft); color: var(--rv2-attention); }
.rv2-order-status.closed { background: #f1f3f5; color: #737d8b; }
.rv2-loading { display: grid; place-items: center; min-height: 120px; color: var(--rv2-muted); font-size: 10px; }
.rv2-empty { display: grid; place-items: center; min-height: 130px; padding: 20px; text-align: center; }
.rv2-empty b { font-size: 12px; }
.rv2-empty p { margin: 5px 0 0; color: var(--rv2-muted); font-size: 10px; }

body[data-av-shell="app"] .modal-recharge-v2 { width: min(540px, calc(100vw - 32px)); }
.rv2-pay { text-align: center; }
.rv2-pay-summary span { display: block; color: var(--rv2-muted); font-size: 10px; }
.rv2-pay-summary strong { display: block; margin-top: 4px; font-size: 28px; font-weight: 780; }
.rv2-pay-summary code { display: block; margin-top: 5px; color: var(--rv2-subtle); font-size: 9px; }
.rv2-qr { display: grid; place-items: center; width: 224px; height: 224px; margin: 14px auto 8px; padding: 10px; border: 1px solid var(--rv2-line); border-radius: 7px; background: #fff; }
.rv2-qr svg { display: block; width: 100%; height: 100%; }
.rv2-qr-error { display: grid; place-items: center; gap: 4px; width: 100%; height: 100%; background: var(--rv2-risk-soft); color: var(--rv2-risk); }
.rv2-qr-error b { font-size: 12px; }
.rv2-qr-error span { font-size: 9px; }
.rv2-countdown { color: var(--rv2-muted); font-size: 10px; }
.rv2-countdown b { color: var(--rv2-ink); font-variant-numeric: tabular-nums; }
.rv2-pay-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 15px 0 10px; }
.rv2-pay-steps span { min-height: 28px; padding: 7px 3px; border-radius: 5px; background: #f1f3f6; color: var(--rv2-subtle); font-size: 8px; }
.rv2-pay-steps span.active { background: var(--rv2-blue-soft); color: var(--rv2-blue-deep); font-weight: 700; }
.rv2-pay-status { min-height: 36px; padding: 9px 10px; border-radius: 6px; background: #f7f9fc; color: var(--rv2-muted); font-size: 10px; line-height: 1.6; }
.rv2-pay-status.error,
.rv2-pay-status.expired { background: var(--rv2-risk-soft); color: var(--rv2-risk); }
.rv2-pay-status.checking { background: var(--rv2-blue-soft); color: var(--rv2-blue-deep); }
.rv2-pay-meta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--rv2-line); border-radius: 6px; text-align: left; }
.rv2-pay-meta span { color: var(--rv2-muted); font-size: 9px; }
.rv2-pay-meta code { overflow: hidden; color: var(--rv2-ink); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.rv2-pay-meta button { border: 0; background: transparent; color: var(--rv2-blue-deep); font: inherit; font-size: 9px; font-weight: 700; cursor: pointer; }
.rv2-pay-success { display: grid; place-items: center; min-height: 330px; text-align: center; }
.rv2-pay-success > span { width: 54px; height: 54px; border: 8px solid var(--rv2-blue-soft); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--rv2-blue); }
.rv2-pay-success h3 { margin: 14px 0 0; font-size: 18px; }
.rv2-pay-success strong { margin-top: 5px; color: var(--rv2-blue-deep); font-size: 28px; }
.rv2-pay-success p { margin: 6px 0 0; color: var(--rv2-muted); font-size: 10px; }
.rv2-pay-success code { margin-top: 12px; color: var(--rv2-subtle); font-size: 9px; }

@media (max-width: 900px) {
  .rv2-checkout-grid { grid-template-columns: 1fr; }
  .rv2-summary-panel { position: static; }
}

@media (max-width: 640px) {
  .rv2-toolbar { display: block; }
  .rv2-toolbar-actions { margin-top: 12px; }
  .rv2-toolbar-actions .btn { flex: 1 1 auto; }
  .rv2-account-strip { grid-template-columns: 1fr 1fr; }
  .rv2-account-strip article:nth-child(2) { border-right: 0; }
  .rv2-account-strip article:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--rv2-line-soft); border-right: 0; }
  .rv2-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv2-methods { grid-template-columns: 1fr; }
  .rv2-order-head { display: none; }
  .rv2-order { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; min-height: 0; margin: 10px; padding: 12px; border: 1px solid var(--rv2-line); border-radius: 6px; }
  .rv2-order > div:first-child { grid-column: 1 / -1; }
  .rv2-order > div:nth-child(2),
  .rv2-order > strong,
  .rv2-order > .rv2-order-status,
  .rv2-order > time { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
  .rv2-order > div:nth-child(2)::before,
  .rv2-order > strong::before,
  .rv2-order > .rv2-order-status::before,
  .rv2-order > time::before { content: attr(data-label); margin-right: auto; color: var(--rv2-subtle); font-size: 9px; font-weight: 500; }
  .rv2-order > strong,
  .rv2-order > time,
  .rv2-order > .rv2-order-status { grid-column: 1 / -1; width: 100%; }
  .rv2-order-status { background: transparent !important; }
  .rv2-filter { overflow-x: auto; }
  .rv2-filter button { white-space: nowrap; }
  .rv2-qr { width: min(224px, 72vw); height: min(224px, 72vw); }
}

@media (prefers-reduced-motion: reduce) {
  .rv2-page *,
  .modal-recharge-v2 * { scroll-behavior: auto !important; }
}
