.wallet-panel {
  --wallet-ink: #19283a;
  --wallet-secondary: #546479;
  --wallet-line: #dae1e8;
  --wallet-wash: #f5f7fa;
  --wallet-accent: #244a71;
  --wallet-gutter: clamp(16px, 2vw, 28px);
  color: var(--wallet-ink);
  font: 14px/1.55 Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  overflow-wrap: anywhere;
}
.wallet-panel *, .wallet-pay { box-sizing: border-box; }
.wallet-panel [hidden] { display: none !important; }
.wallet-panel :is(h2,h3,h4,p,dl,dd,ul) { margin: 0; }
.wallet-panel h2 { font-size: 21px; line-height: 1.35; }
.wallet-panel h3 { font-size: 18px; line-height: 1.45; }
.wallet-panel h4 { font-size: 15px; }
.wallet-panel small, .wallet-panel dt { color: var(--wallet-secondary); font-size: 12px; }
.wallet-panel button, .order-actions .wallet-pay {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 6px 13px; border: 1px solid #c8d2dc; border-radius: 8px;
  background: #fff; color: #24384d; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.wallet-panel button:hover:enabled, .order-actions .wallet-pay:hover { border-color: #889bab; background: #f5f8fb; filter: none; }
.wallet-panel button:disabled { opacity: .5; cursor: default; }
.wallet-panel :is(button,input,select,summary,a):focus-visible { outline: 3px solid #427aa7; outline-offset: 3px; }
.wallet-panel button[type=submit], .wallet-panel button:is([data-pay],[data-recharge]) {
  background: var(--wallet-ink); color: #fff; border-color: var(--wallet-ink);
}
.wallet-panel button[type=submit]:hover:enabled, .wallet-panel button:is([data-pay],[data-recharge]):hover:enabled { background: #304760; color: #fff; }
.wallet-panel label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.wallet-panel input:not([type=checkbox],[type=file]), .wallet-panel select {
  display: block; width: 100%; min-width: 0; min-height: 41px; margin: 0; padding: 8px 11px;
  border: 1px solid #c7d1db; border-radius: 8px; background: #fff; color: var(--wallet-ink); font: inherit; font-weight: 400;
}
.wallet-panel input::placeholder { color: #717e8b; }
.wallet-heading, .wallet-form-actions, .wallet-pages, .wallet-method-title, .wallet-review-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.wallet-panel .wallet-refresh { border-color: transparent; color: var(--wallet-secondary); }
.wallet-refresh::before { content: "↻"; font: 21px/1 "Segoe UI Symbol", sans-serif; }
.wallet-panel .wallet-chip {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 2px 8px;
  border-radius: 20px; background: #edf1f5; color: #47586b; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.wallet-chip[data-state=approved] { background: #eaf4ee; color: #286341; }
.wallet-chip[data-state=pending] { background: #fff2d8; color: #7d5315; }
.wallet-chip[data-state=rejected] { background: #f8eeec; color: #924c41; }
.wallet-admin {
  display: grid; gap: 18px; width: 100%; max-width: 1180px; margin: 0 auto;
}
.wallet-admin .wallet-page-title { font-size: clamp(24px,2.25vw,32px); letter-spacing: -.045em; }
.wallet-method, .wallet-queue {
  background: white; border: 1px solid var(--wallet-line); border-radius: 16px;
  box-shadow: 0 5px 18px -14px #22374f4a; min-width: 0;
}
.wallet-method { padding: 17px var(--wallet-gutter); }
.wallet-method-bar { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 20px; }
.wallet-panel .wallet-sample {
  position: relative; isolation: isolate; width: 96px; height: 82px; padding: 6px 15px;
  border: 1px solid #dce6ef; border-radius: 10px; overflow: hidden; background-color: #f0f5fa;
  background-image: radial-gradient(#c7d5e3 .7px, transparent .8px); background-size: 7px 7px;
}
.wallet-sample::before { content: ""; position: absolute; z-index: -1; width: 45px; height: 59px; transform: translate(4px,1px) rotate(8deg); border-radius: 3px; background: #a6bfd6; }
.wallet-sample img { height: 100%; max-width: 100%; object-fit: contain; box-shadow: 0 2px 5px #273a552e; }
.wallet-method-title { justify-content: flex-start; flex-wrap: wrap; gap: 10px; }
.wallet-method-title .wallet-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wallet-panel .wallet-link { padding: 2px 0; border: 0; background: transparent; color: var(--wallet-accent); min-height: 28px; }
.wallet-panel .wallet-link:hover:enabled { text-decoration: underline; background: transparent; }
.wallet-panel [data-edit-method]::after { content: ""; border: solid currentColor; border-width: 0 1.5px 1.5px 0; width: 6px; height: 6px; transform: translateY(-2px) rotate(45deg); margin-left: 4px; }
.wallet-panel [data-edit-method][aria-expanded=true]::after { transform: translateY(2px) rotate(225deg); }
.wallet-method form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px 30px; padding-top: 18px; margin-top: 17px; border-top: 1px solid var(--wallet-line); }
.wallet-panel .wallet-upload { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 3px 12px; padding: 12px 15px; border: 1px dashed #a8b9ca; border-radius: 10px; cursor: pointer; }
.wallet-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.wallet-upload:focus-within { outline: 3px solid #427aa7; outline-offset: 2px; }
.wallet-upload small { grid-column: 1 / -1; font-weight: 400; }
.wallet-file-choice { justify-self: end; font-size: 12px; color: var(--wallet-accent); max-width: 100%; }
.wallet-panel .wallet-toggle { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.wallet-toggle input { appearance: none; position: relative; width: 38px; height: 22px; min-height: 0; margin: 0; padding: 0; border: 1px solid #98a4b2; border-radius: 16px; background: #a5afb9; cursor: pointer; }
.wallet-toggle input::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: white; }
.wallet-toggle input:checked { background: var(--wallet-accent); border-color: var(--wallet-accent); }
.wallet-toggle input:checked::after { transform: translateX(16px); }
.wallet-form-actions { grid-column: 1/-1; justify-content: flex-end; }
.wallet-panel [data-setting-message]:not(:empty), .wallet-panel [data-message]:not(:empty), .wallet-review [role=status]:not(:empty) {
  margin-top: 10px; padding: 8px 12px; border-radius: 7px; background: var(--wallet-wash); color: var(--wallet-ink);
}
.wallet-queue { padding: 19px var(--wallet-gutter) 0; }
.wallet-filters { display: flex; gap: 24px; margin-top: 11px; border-bottom: 1px solid var(--wallet-line); }
.wallet-filters button { position: relative; border: none; border-radius: 0; min-height: 42px; padding: 4px 1px; background: white; color: var(--wallet-secondary); }
.wallet-filters button[aria-pressed=true] { color: var(--wallet-accent); }
.wallet-filters button[aria-pressed=true]::after { content: ""; position: absolute; inset: auto 0 -1px; height: 3px; border-radius: 2px; background: var(--wallet-accent); }
.wallet-queue-state { display: grid; align-content: center; justify-items: center; gap: 14px; min-height: 205px; padding: 28px 10px; color: var(--wallet-secondary); }
.wallet-empty-art { position: relative; width: 52px; height: 58px; isolation: isolate; }
.wallet-empty-art::before, .wallet-empty-art i { content: ""; position: absolute; inset: 7px 8px 3px; border: 1.5px solid #a5b7c9; border-radius: 5px; background: #f0f5fa; transform: rotate(-13deg) translate(-3px,-1px); }
.wallet-empty-art i { transform: rotate(5deg); background: white; }
.wallet-empty-art i::after { content: ""; position: absolute; left: 7px; right: 7px; top: 11px; height: 2px; background: #a7bacb; box-shadow: 0 7px #c1cfdb,0 14px #d4dee7; }
.wallet-empty-art::after { content: "✓"; position: absolute; bottom: 0; right: 0; width: 21px; height: 21px; display: grid; place-items: center; color: #45667c; background: #e2ebf2; border: 2px solid white; border-radius: 50%; font: 600 13px/1 sans-serif; }
.wallet-review { padding: 18px 0; }
.wallet-review + .wallet-review, .wallet-pages { border-top: 1px solid var(--wallet-line); }
.wallet-review-amount { text-align: right; }
.wallet-review-amount strong, .wallet-entry-amount b, .wallet-balance strong { display: block; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.wallet-review-amount strong { font-size: 22px; }
.wallet-facts { display: grid; grid-template-columns: .7fr 1fr 1.4fr; gap: 12px; padding: 13px 0; }
.wallet-facts dd { font-size: 13px; }.wallet-facts dt { margin-bottom: 3px; }
.wallet-review details { border-radius: 8px; background: var(--wallet-wash); padding: 9px 13px; }
.wallet-review summary { cursor: pointer; font-weight: 600; color: var(--wallet-accent); }
.wallet-review details[open] > :not(summary) { margin-top: 12px; }
.wallet-review [data-approve] { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wallet-pages { padding: 13px 0; justify-content: flex-end; color: var(--wallet-secondary); font-size: 13px; }
.wallet-dialog { width: min(500px,calc(100% - 24px)); max-height: 90dvh; margin: auto; padding: 0 22px 22px; border: 1px solid var(--wallet-line); border-radius: 19px; color: var(--wallet-ink); background: white; overflow: auto; box-shadow: 0 24px 80px #152b4133; }
.wallet-dialog::backdrop { background: rgb(22 32 45 / .42); }
.wallet-dialog header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 6px; padding: 16px 0 12px; background: white; }
.wallet-dialog header button { min-height: 34px; min-width: 34px; padding: 0; color: var(--wallet-secondary); border-radius: 50%; font-size: 18px; }
.wallet-preview { width: fit-content; max-width: calc(100% - 24px); }
.wallet-preview img { width: auto; max-width: 100%; max-height: 69dvh; height: auto; object-fit: contain; display: block; margin: 0 auto; }
.wallet-balance { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 10px; align-items: center; padding: 20px; border-radius: 13px; border: 1px solid #dce5ed; background: linear-gradient(110deg,white,#f2f6fa); }
.wallet-balance small, .wallet-balance strong { grid-column: 1; }
.wallet-balance strong { font-size: clamp(26px,5vw,37px); line-height: 1.18; }
.wallet-balance button { grid-column: 2; grid-row: 1 / 3; }
.wallet-dialog .wallet-heading { margin-top: 19px; }
.wallet-dialog h3 { font-size: 16px; }
.wallet-box { border: 1px solid var(--wallet-line); padding: 16px; margin-top: 12px; border-radius: 12px; }
.wallet-box [data-order-label], .wallet-box [data-instructions] { margin-top: 5px; color: var(--wallet-secondary); font-size: 13px; }
.wallet-box .wallet-due { font-weight: 680; font-size: 18px; margin: 12px 0; }
.wallet-dialog:has([data-deposit]:not([hidden])) { width: min(680px,calc(100% - 24px)); }
.wallet-deposit-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.wallet-scan { padding: 13px; border-radius: 9px; background: var(--wallet-wash); text-align: center; }
.wallet-scan .wallet-transfer-note { margin-top: 4px; color: var(--wallet-secondary); font-size: 12px; }
.wallet-transfer-note strong { color: var(--wallet-ink); user-select: all; }
.wallet-code { display: block; width: min(100%,245px); height: auto; margin: 10px auto; }
.wallet-scan a { color: var(--wallet-accent); text-underline-offset: 3px; font-size: 13px; }
.wallet-deposit-layout:has(.wallet-scan[hidden]) { grid-template-columns: 1fr; }
.wallet-box form { display: grid; align-content: start; gap: 12px; }
.wallet-panel .wallet-records { padding: 0; list-style: none; }
.wallet-records li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--wallet-line); }
.wallet-records li:last-child { border-bottom: 0; }
.wallet-entry-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 11px; color: var(--wallet-accent); background: #edf2f7; font: 19px/1 sans-serif; }
.wallet-entry-detail small { display: block; margin-top: 2px; }
.wallet-entry-amount { text-align: right; }.wallet-entry-amount b { font-size: 17px; }
.wallet-panel .wallet-history-empty { margin-top: 4px; padding: 25px 12px; text-align: center; color: var(--wallet-secondary); border-top: 1px solid var(--wallet-line); }
@media (max-width: 600px) {
  .wallet-admin { gap: 12px; }
  .wallet-method { padding: 14px; }
  .wallet-method-bar { gap: 10px; }
  .wallet-panel .wallet-sample { width: 55px; height: 62px; padding: 6px; }
  .wallet-sample::before { width: 30px; height: 45px; }
  .wallet-method-title { gap: 4px 7px; }.wallet-method-title h3 { font-size: 16px; }
  .wallet-method form, .wallet-review [data-approve], .wallet-deposit-layout { grid-template-columns: 1fr; }
  .wallet-facts { grid-template-columns: 1fr 1fr; }.wallet-facts > :last-child { grid-column: 1 / -1; }
  .wallet-queue-state { min-height: 158px; }
  .wallet-dialog { padding: 0 15px 17px; }
  .wallet-dialog header { padding-top: 12px; }
  .wallet-balance, .wallet-box { padding: 13px; }
  .wallet-scan { padding: 10px; }.wallet-code { width: min(100%,235px); }
}
@media (max-width: 380px) {
  .wallet-method-title { align-items: start; flex-direction: column; }
  .wallet-panel [data-edit-method] { padding-inline: 8px; }
}
