/* STANDARDPAY-UI-FINAL-CLOSEOUT-F01
 * Shared operational presentation layer for Super Admin and Merchant Portal.
 * It does not add routes, permissions, financial actions, or business state.
 */
:root {
  --sp-op-page-x: clamp(28px, 2.4vw, 48px);
  --sp-op-page-y: 32px;
  --sp-op-control-h: 40px;
  --sp-op-row-h: 46px;
  --sp-op-radius: 8px;
  --sp-op-shadow: 0 8px 24px rgba(2, 12, 27, .16);
  --sp-op-success: #22c55e;
  --sp-op-progress: #38bdf8;
  --sp-op-warning: #f59e0b;
  --sp-op-review: #d97706;
  --sp-op-danger: #ef4444;
  --sp-op-disabled: #64748b;
  --sp-op-unknown: #94a3b8;
  --sp-op-recovery: #8b5cf6;
  --sp-align-page-title: 24px;
  --sp-align-page-title-lh: 32px;
  --sp-align-section-title: 17px;
  --sp-align-section-title-lh: 24px;
  --sp-align-body: 13px;
  --sp-align-body-lh: 20px;
  --sp-align-table-head: 12px;
  --sp-align-table-head-lh: 18px;
  --sp-align-table-body: 13px;
  --sp-align-table-body-lh: 20px;
  --sp-align-form-label: 12px;
  --sp-align-form-label-lh: 18px;
  --sp-align-button-text: 13px;
  --sp-align-status-text: 11px;
  --sp-align-nav-height: 44px;
  --sp-align-nav-icon-box: 20px;
  --sp-align-button-height: 38px;
  --sp-align-status-height: 24px;
}

html[data-theme="light"] body.sp-final-closeout {
  --sp-muted: #475569;
  --sp-faint: #475569;
  --sp-op-success: #15803d;
  --sp-op-progress: #0369a1;
  --sp-op-warning: #92400e;
  --sp-op-review: #92400e;
  --sp-op-danger: #b91c1c;
  --sp-op-disabled: #475569;
  --sp-op-unknown: #475569;
}

html:not([data-theme="light"]) body.sp-final-closeout {
  --sp-op-danger: #f87171;
  --sp-op-disabled: #94a3b8;
  --sp-op-unknown: #94a3b8;
}

.sp-final-closeout {
  font-family: var(--sp-font, "Geist", "Segoe UI", "Microsoft YaHei", sans-serif) !important;
  font-size: var(--sp-align-body);
  line-height: var(--sp-align-body-lh);
  letter-spacing: 0 !important;
  font-variant-numeric: tabular-nums;
}

body.sp-final-closeout { overflow-x: hidden !important; }

html:not([data-theme="light"]) body.sp-final-closeout {
  --sp-bg: #101419;
  --sp-bg-2: #12171c;
  --sp-surface-low: #151b20;
  --sp-surface: #181f25;
  --sp-surface-high: #20282f;
  --sp-surface-bright: #29333b;
}

.sp-final-closeout :where(.modern-content, .merchant-content, .wallet-modern-shell) {
  background-image: none !important;
}

.sp-final-closeout :where(h1, h2, h3, p, span, strong, button, a, th, td, label) {
  letter-spacing: 0 !important;
}

.sp-final-closeout .wallet-modern-shell,
.sp-final-closeout .modern-page,
.sp-final-closeout .merchant-page-shell,
.sp-final-closeout .security-page,
.sp-final-closeout .google-page,
.sp-final-closeout .ledger-page,
.sp-final-closeout .addr-page,
.sp-final-closeout .payin-page,
.sp-final-closeout .payout-page {
  width: min(100%, 1720px);
  margin-inline: auto;
  padding: var(--sp-op-page-y) var(--sp-op-page-x) 48px;
}

.sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head) h1,
.sp-final-closeout :where(.security-panel, .google-panel, .ledger-panel, .addr-panel) > h1 {
  margin: 0 0 8px;
  font-size: var(--sp-align-page-title) !important;
  font-weight: 600 !important;
  line-height: var(--sp-align-page-title-lh) !important;
}

.sp-final-closeout[data-sp-portal="merchant"] :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head) h1 {
  font-size: var(--sp-align-page-title) !important;
}

.sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head) p {
  max-width: 76ch;
  margin: 0;
  color: var(--sp-muted) !important;
  font-size: var(--sp-align-body) !important;
  line-height: var(--sp-align-body-lh);
}

.sp-final-closeout :where(.modern-panel, .modernized-panel, .wallet-section, .payin-panel, .payout-panel,
  .security-panel, .google-panel, .ledger-panel, .addr-panel) {
  border: 1px solid var(--sp-line) !important;
  border-radius: var(--sp-op-radius) !important;
  box-shadow: var(--sp-op-shadow) !important;
}

.sp-final-closeout :where(.modern-panel-head, .wallet-section-head, .modernized-panel-head) h2,
.sp-final-closeout .wallet-title-pair {
  margin: 0;
  font-size: var(--sp-align-section-title) !important;
  font-weight: 650;
  line-height: var(--sp-align-section-title-lh);
}

.sp-final-closeout :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea,
  .layui-input, .layui-select, .modern-input, .wallet-input, .wallet-select) {
  min-height: var(--sp-op-control-h) !important;
  border-radius: 6px !important;
  font: inherit !important;
}

.sp-final-closeout :where(button, .btn, .layui-btn, .modern-btn, .wallet-btn, [role="button"]) {
  height: auto !important;
  min-height: var(--sp-align-button-height) !important;
  border-radius: 6px !important;
  font-size: var(--sp-align-button-text) !important;
  font-weight: 600 !important;
  line-height: var(--sp-align-body-lh) !important;
}

/* R2 contrast gate: interactive surfaces must expose a deterministic solid
 * background to rendered-color checks. Individual component rules below keep
 * their existing background-color while removing hidden gradient layers. */
.sp-final-closeout :where(button, [role="button"], a.btn, a.layui-btn, a.modern-btn, a.wallet-btn,
  a[class$="-btn"], .merchant-quickbar a, .bc-quickbar a) {
  background-image: none !important;
}

.sp-final-closeout :where(.modern-table-wrap, .table-responsive, .wallet-table-wrap, .payin-table-wrap, .payout-table-wrap) {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border-radius: var(--sp-op-radius);
}

.sp-final-closeout .payin-table-wrap { position: relative; }
.sp-final-closeout .payin-table th:first-child,
.sp-final-closeout .payin-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  box-shadow: 10px 0 18px -18px rgba(2, 12, 27, .72);
}
.sp-final-closeout .payin-table th:last-child,
.sp-final-closeout .payin-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  box-shadow: -10px 0 18px -18px rgba(2, 12, 27, .72);
}
.sp-final-closeout .payin-table th:first-child,
.sp-final-closeout .payin-table th:last-child { background: var(--sp-surface-high) !important; }
.sp-final-closeout .payin-table td:first-child,
.sp-final-closeout .payin-table td:last-child { background: var(--sp-surface) !important; }
.sp-final-closeout .payin-table tr:hover td:first-child,
.sp-final-closeout .payin-table tr:hover td:last-child { background: var(--sp-surface-high) !important; }

.sp-final-closeout :where(table, .layui-table) {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 14px !important;
}

.sp-final-closeout :where(table, .layui-table) thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 44px;
  padding: 12px 14px !important;
  color: var(--sp-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35;
  text-transform: none !important;
  white-space: nowrap;
}

.sp-final-closeout :where(table, .layui-table) tbody td {
  min-height: var(--sp-op-row-h);
  padding: 13px 14px !important;
  line-height: 1.45;
  vertical-align: middle !important;
}

.sp-final-closeout .sp-col-number { text-align: right !important; white-space: nowrap; }
.sp-final-closeout .sp-col-status { text-align: left !important; white-space: nowrap; }
.sp-final-closeout .sp-col-action { text-align: right !important; white-space: nowrap; }

.sp-final-closeout .sp-identifier {
  display: inline-block;
  max-width: min(30ch, 30vw);
  overflow: hidden;
  color: var(--sp-text);
  font-family: var(--sp-mono) !important;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.sp-final-closeout .sp-copy-id {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  margin-left: 4px;
  padding: 0 !important;
  border: 0;
  background: transparent;
  color: var(--sp-primary);
}

.sp-final-closeout .sp-copy-glyph {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid currentColor;
  border-radius: 2px;
}
.sp-final-closeout .sp-copy-glyph::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  top: -6px;
  left: -6px;
  border: 2px solid currentColor;
  border-radius: 2px;
  background: var(--sp-surface);
}

.sp-final-closeout .sp-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.sp-final-closeout .sp-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sp-final-closeout .sp-status[data-tone="success"] { color: var(--sp-op-success); }
.sp-final-closeout .sp-status[data-tone="progress"] { color: var(--sp-op-progress); }
.sp-final-closeout .sp-status[data-tone="warning"],
.sp-final-closeout .sp-status[data-tone="review"] { color: var(--sp-op-warning); }
.sp-final-closeout .sp-status[data-tone="failed"],
.sp-final-closeout .sp-status[data-tone="blocked"] { color: var(--sp-op-danger); }
.sp-final-closeout .sp-status[data-tone="recovery"] { color: var(--sp-op-recovery); }
.sp-final-closeout .sp-status[data-tone="disabled"] { color: var(--sp-op-disabled); }
.sp-final-closeout .sp-status[data-tone="unknown"] { color: var(--sp-op-unknown); }

.sp-final-closeout .sp-empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  min-height: 148px;
  padding: 28px 20px;
  color: var(--sp-muted);
  text-align: center;
  white-space: normal;
}
.sp-final-closeout .sp-empty-state i { font-size: 28px !important; color: var(--sp-primary); }
.sp-final-closeout .sp-empty-state strong { color: var(--sp-text); font-size: 16px; }
.sp-final-closeout .sp-empty-state span { max-width: 56ch; font-size: 14px; }

.sp-final-closeout .sp-generated-label {
  display: block;
  margin: 0 0 7px;
  color: var(--sp-muted);
  font-size: 14px;
  font-weight: 650;
}

.sp-final-closeout .sp-scroll-hint {
  margin: 12px 18px 0;
  padding: 9px 12px;
  border-left: 3px solid var(--sp-primary);
  background: color-mix(in srgb, var(--sp-primary) 8%, var(--sp-surface));
  color: var(--sp-muted);
}

.sp-final-closeout .sp-credential-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--sp-op-control-h);
  padding: 0 13px;
  border: 1px solid var(--sp-line);
  border-radius: 6px;
  background: var(--sp-surface);
  color: var(--sp-text);
  font-weight: 680;
}
.sp-final-closeout .sp-credential-status i { color: var(--sp-op-success); }

.sp-final-closeout .sp-audit-approve {
  min-height: 48px !important;
  border: 2px solid var(--sp-op-warning) !important;
  background: color-mix(in srgb, var(--sp-op-warning) 14%, var(--sp-surface)) !important;
  color: var(--sp-op-warning) !important;
  font-weight: 760 !important;
}
.sp-final-closeout .sp-audit-approve::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
}

.sp-final-closeout .sp-page-state {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 104px;
  margin: 16px 0;
  padding: 20px;
  border: 1px solid var(--sp-line);
  border-left: 4px solid var(--sp-op-unknown);
  border-radius: var(--sp-op-radius);
  background: var(--sp-surface);
}
.sp-final-closeout .sp-page-state::before {
  content: "i";
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--sp-op-unknown);
  font-weight: 800;
}
.sp-final-closeout .sp-page-state strong { display: block; margin-bottom: 3px; font-size: 16px; }
.sp-final-closeout .sp-page-state span { display: block; color: var(--sp-muted); font-size: 14px; }
.sp-final-closeout .sp-page-state[data-state="loading"] { border-left-color: var(--sp-op-progress); }
.sp-final-closeout .sp-page-state[data-state="loading"]::before { content: "…"; color: var(--sp-op-progress); }
.sp-final-closeout .sp-page-state[data-state="error"] { border-left-color: var(--sp-op-danger); }
.sp-final-closeout .sp-page-state[data-state="error"]::before { content: "!"; color: var(--sp-op-danger); }
.sp-final-closeout .sp-page-state[data-state="permission"] { border-left-color: var(--sp-op-warning); }
.sp-final-closeout .sp-page-state[data-state="permission"]::before { content: "×"; color: var(--sp-op-warning); }
.sp-final-closeout .sp-page-state[data-state="disabled"] { border-left-color: var(--sp-op-disabled); }
.sp-final-closeout .sp-page-state[data-state="disabled"]::before { content: "−"; color: var(--sp-op-disabled); }
.sp-final-closeout .sp-page-state[data-state="data"] { border-left-color: var(--sp-op-success); }
.sp-final-closeout .sp-page-state[data-state="data"]::before { content: "✓"; color: var(--sp-op-success); }

.sp-final-closeout .sp-action-primary { background: var(--sp-primary) !important; color: #fff !important; }
.sp-final-closeout .sp-action-tertiary {
  border-color: color-mix(in srgb, var(--sp-primary) 56%, var(--sp-line)) !important;
  background: transparent !important;
  color: var(--sp-primary) !important;
  box-shadow: none !important;
}
.sp-final-closeout .sp-action-destructive { border-color: var(--sp-op-danger) !important; color: var(--sp-op-danger) !important; }
.sp-final-closeout .sp-action-financial {
  min-height: 48px !important;
  border: 2px solid var(--sp-op-danger) !important;
  background: color-mix(in srgb, var(--sp-op-danger) 12%, var(--sp-surface)) !important;
  color: var(--sp-op-danger) !important;
}

html[data-theme="light"] .sp-final-closeout .sp-action-financial {
  border-color: #991b1b !important;
  background: #fff7f7 !important;
  color: #991b1b !important;
}

html:not([data-theme="light"]) .sp-final-closeout .sp-action-financial {
  border-color: #fca5a5 !important;
  background: #2f1116 !important;
  color: #fca5a5 !important;
}

.sp-final-closeout .sp-portal-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.sp-final-closeout .sp-tool-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0 !important;
  border: 1px solid #64748b;
  background-image: none !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
  font-family: var(--sp-font) !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

html[data-theme="dark"] .sp-final-closeout .sp-tool-button,
html:not([data-theme="light"]) .sp-final-closeout .sp-tool-button {
  border-color: #94a3b8;
  background-image: none !important;
  background-color: #1f2937 !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
}

.sp-final-closeout .sp-tool-button:hover,
.sp-final-closeout .sp-tool-button:focus-visible {
  border-color: var(--sp-primary);
  outline: 2px solid color-mix(in srgb, var(--sp-primary) 55%, transparent);
  outline-offset: 2px;
}

.modern-login-page.sp-final-closeout .lang button {
  width: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  background-image: none !important;
  background-color: #1f2937 !important;
  color: #f8fafc !important;
  filter: none !important;
  opacity: 1 !important;
}

.modern-login-page.sp-final-closeout .links a {
  display: inline-flex !important;
  align-items: center !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding-inline: 4px !important;
}

html[data-theme="light"] .modern-login-page.sp-final-closeout .lang button {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

html[data-theme="light"] .modern-login-page.sp-final-closeout .lang button.active {
  background-color: #dce7ff !important;
  color: #123ca0 !important;
}

/* Login, registration and password recovery share the same primary-action
 * contract. White on #1d4ed8 exceeds 6.5:1 and remains deterministic in every
 * interaction state, including disabled and loading states. */
.modern-login-page.sp-final-closeout :where(.submit, .modern-login-submit, button[type="submit"]),
.modern-login-page.sp-final-closeout :where(.submit, .modern-login-submit, button[type="submit"]):hover,
.modern-login-page.sp-final-closeout :where(.submit, .modern-login-submit, button[type="submit"]):focus,
.modern-login-page.sp-final-closeout :where(.submit, .modern-login-submit, button[type="submit"]):focus-visible,
.modern-login-page.sp-final-closeout :where(.submit, .modern-login-submit, button[type="submit"]):disabled,
.modern-login-page.sp-final-closeout :where(.submit, .modern-login-submit, button[type="submit"])[aria-busy="true"],
.modern-login-page.sp-final-closeout .code-row button,
.modern-login-page.sp-final-closeout .code-row button:disabled {
  background-image: none !important;
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  filter: none !important;
  opacity: 1 !important;
}

body.modern-login-page.sp-final-closeout button.submit,
body.modern-login-page.sp-final-closeout button.submit:hover,
body.modern-login-page.sp-final-closeout button.submit:focus,
body.modern-login-page.sp-final-closeout button.submit:focus-visible,
body.modern-login-page.sp-final-closeout button.submit:disabled,
body.modern-login-page.sp-final-closeout button.submit[aria-busy="true"] {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  filter: none !important;
  opacity: 1 !important;
}

.modern-login-page.sp-final-closeout .standardpay-password-toggle {
  background-image: none !important;
  background-color: #1f2937 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  filter: none !important;
  opacity: 1 !important;
}

html[data-theme="light"] .modern-login-page.sp-final-closeout .standardpay-password-toggle {
  background-color: #eef4ff !important;
  color: #123ca0 !important;
  -webkit-text-fill-color: #123ca0 !important;
}

html[data-theme="light"] .modern-login-page.sp-final-closeout :where(label, .sub, .links, .notice, .hint) {
  color: #334155 !important;
}

html[data-theme="light"] .modern-login-page.sp-final-closeout input::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

html:not([data-theme="light"]) .modern-login-page.sp-final-closeout input::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

.modern-login-page.sp-final-closeout .notice:empty {
  min-height: 0 !important;
  margin-top: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="light"] .sp-final-closeout :where(input, textarea)::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

html:not([data-theme="light"]) .sp-final-closeout :where(input, textarea)::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

.sp-final-closeout .sp-theme-glyph {
  display: block;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.sp-final-closeout .sp-scroll-hint { font-size: 13px; }
.sp-final-closeout :where(.wallet-en, .addr-en, .payin-en, .payout-en, .withdraw-en) { display: none !important; }
html[lang^="en"] .sp-final-closeout [data-sp-zh],
html[lang^="en"] .sp-final-closeout [data-fee-zh] { display: none !important; }
html:not([lang^="en"]) .sp-final-closeout [data-sp-en],
html:not([lang^="en"]) .sp-final-closeout [data-fee-en] { display: none !important; }
html[lang^="en"] .sp-final-closeout :where(.wallet-en, .addr-en, .payin-en, .payout-en, .withdraw-en) { display: inline !important; }
html[lang^="en"] .sp-final-closeout [data-rf-zh] { display: none !important; }
html:not([lang^="en"]) .sp-final-closeout [data-rf-en] { display: none !important; }

.sp-final-closeout .sp-nav-group > a { cursor: default; }
.sp-final-closeout :where(.bc-sidebar-nav, .merchant-nav-panel, .bc-quickbar, .merchant-quickbar) a {
  display: flex !important;
  align-items: center;
  height: auto !important;
  min-height: var(--sp-align-nav-height) !important;
}
.sp-final-closeout :where(.modern-sidebar, .merchant-sidebar, .bc-sidebar, .merchant-nav-panel) :where(a, .sp-nav-text, .sp-nav-icon) {
  color: #cbd5e1 !important;
}
.sp-final-closeout :where(.modern-sidebar, .merchant-sidebar, .bc-sidebar, .merchant-nav-panel) a:is(.active, [aria-current="page"]) :where(.sp-nav-text, .sp-nav-icon),
.sp-final-closeout :where(.modern-sidebar, .merchant-sidebar, .bc-sidebar, .merchant-nav-panel) a:is(.active, [aria-current="page"]) {
  color: #ffffff !important;
}

body.sp-final-closeout .bc-sidebar-nav #side-menu a,
body.sp-final-closeout .merchant-nav-panel #side-menu a,
body.sp-final-closeout .bc-quickbar a,
body.sp-final-closeout .merchant-quickbar a {
  height: auto !important;
  min-height: var(--sp-align-nav-height) !important;
}

body.sp-final-closeout button,
body.sp-final-closeout .modern-btn,
body.sp-final-closeout .wallet-btn,
body.sp-final-closeout .layui-btn {
  height: auto !important;
  min-height: var(--sp-align-button-height) !important;
}
.sp-final-closeout :where(.bc-sidebar-nav, .merchant-nav-panel) a[aria-current="page"] {
  border-left-color: var(--sp-primary) !important;
  background: color-mix(in srgb, var(--sp-primary) 16%, var(--sp-surface)) !important;
  color: var(--sp-text) !important;
}

@media (max-width: 1100px) {
  :root { --sp-op-page-x: 24px; }
  .sp-final-closeout :where(.modern-filter-bar, .wallet-toolbar, .payin-filter, .payout-filter) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  :root { --sp-op-page-x: 18px; --sp-op-page-y: 24px; }
  .sp-final-closeout[data-sp-portal="merchant"] :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head) h1 {
    font-size: var(--sp-align-page-title) !important;
  }
  .sp-final-closeout :where(.modern-filter-bar, .wallet-toolbar, .payin-filter, .payout-filter) {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
  .sp-final-closeout :where(.modern-filter-bar, .wallet-toolbar, .payin-filter, .payout-filter) > * { width: 100% !important; }
  .sp-final-closeout .sp-identifier { max-width: 20ch; }
}

@media (max-width: 430px) {
  :root { --sp-op-page-x: 16px; }
  .sp-final-closeout .sp-identifier { max-width: 15ch; }
  .sp-final-closeout :where(.wallet-asset-actions, .modern-action-row, .merchant-actions) { gap: 8px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-final-closeout *, .sp-final-closeout *::before, .sp-final-closeout *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* STANDARDPAY-P0-GLOBAL-ALIGNMENT-SYSTEM
 * One geometry contract shared by Admin, Merchant and embedded operational
 * surfaces. Table cells keep native table layout; their generated inner layer
 * supplies the requested flex alignment without corrupting column geometry.
 */
.sp-final-closeout {
  --sp-icon-text-gap: 8px;
  --sp-button-icon-gap: 7px;
  --sp-status-icon-gap: 6px;
  --sp-nav-icon-gap: 10px;
}

.sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head, .fee-page-head,
  .modern-topbar, .merchant-topbar, .qa-head) {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head, .fee-page-head) h1,
.sp-final-closeout :where(.security-panel, .google-panel, .ledger-panel, .addr-panel) > h1,
.sp-final-closeout .qa-head h1 {
  margin: 0 !important;
  font-size: var(--sp-align-page-title) !important;
  font-weight: 700 !important;
  line-height: var(--sp-align-page-title-lh) !important;
}

.sp-final-closeout :where(.modern-panel-head, .wallet-section-head, .modernized-panel-head) h2,
.sp-final-closeout :where(.modern-panel, .modernized-panel, .wallet-section, .payin-panel, .payout-panel,
  .security-panel, .google-panel, .ledger-panel, .addr-panel, .fee-band) > h2,
.sp-final-closeout .wallet-title-pair {
  margin-block: 0 !important;
  font-size: var(--sp-align-section-title) !important;
  font-weight: 600 !important;
  line-height: var(--sp-align-section-title-lh) !important;
}

.sp-final-closeout :where(p, li, dd, dt, .help, .hint, .meta, small) {
  font-size: var(--sp-align-body) !important;
  line-height: var(--sp-align-body-lh) !important;
}

/* Preserve the lowercase Material Symbols ligature when its parent kicker is
 * visually uppercased. */
.sp-final-closeout .wallet-kicker .fa,
.sp-final-closeout .wallet-kicker .fa::before {
  text-transform: none !important;
}

.sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head, .fee-page-head) p {
  margin-top: 4px !important;
  font-size: var(--sp-align-body) !important;
  line-height: var(--sp-align-body-lh) !important;
}

.sp-final-closeout :where(table, .layui-table) {
  font-size: var(--sp-align-table-body) !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.sp-final-closeout :where(table, .layui-table) :where(th, td) {
  box-sizing: border-box;
  vertical-align: middle !important;
}

.sp-final-closeout :where(table, .layui-table) thead th {
  height: 42px;
  min-height: 42px;
  padding: 0 14px !important;
  font-size: var(--sp-align-table-head) !important;
  font-weight: 600 !important;
  line-height: var(--sp-align-table-head-lh) !important;
}

.sp-final-closeout :where(table, .layui-table) tbody td {
  height: var(--sp-op-row-h);
  min-height: var(--sp-op-row-h);
  padding: 0 14px !important;
  font-size: var(--sp-align-table-body) !important;
  font-weight: 400;
  line-height: var(--sp-align-table-body-lh) !important;
}

.sp-final-closeout :where(th, td) > .sp-cell-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sp-icon-text-gap);
  width: 100%;
  min-width: 0;
  min-height: inherit;
  line-height: inherit;
  text-align: left;
}

.sp-final-closeout thead th > .sp-cell-inner { min-height: 42px; }
.sp-final-closeout tbody td > .sp-cell-inner { min-height: var(--sp-op-row-h); }
.sp-final-closeout :where(th, td).sp-align-number > .sp-cell-inner,
.sp-final-closeout :where(th, td).sp-align-action > .sp-cell-inner { justify-content: flex-end; text-align: right; }
.sp-final-closeout :where(th, td).sp-align-checkbox > .sp-cell-inner { justify-content: center; text-align: center; }
.sp-final-closeout :where(th, td).sp-align-status > .sp-cell-inner,
.sp-final-closeout :where(th, td).sp-align-asset > .sp-cell-inner,
.sp-final-closeout :where(th, td).sp-align-text > .sp-cell-inner { justify-content: flex-start; text-align: left; }
.sp-final-closeout tbody td.sp-align-text > .sp-cell-inner {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.sp-final-closeout :where(.sp-align-number, .sp-number, .amount, .value, .wallet-balance,
  .payin-money, .payin-fee, .payout-money, .payout-fee) {
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1 !important;
}
.sp-final-closeout :where(th, td).sp-align-number { text-align: right !important; white-space: nowrap; }
.sp-final-closeout :where(th, td).sp-align-action { text-align: right !important; white-space: nowrap; }
.sp-final-closeout :where(th, td).sp-align-status { text-align: left !important; white-space: nowrap; }
.sp-final-closeout :where(th, td).sp-align-checkbox { text-align: center !important; }

.sp-final-closeout .sp-status {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--sp-status-icon-gap) !important;
  box-sizing: border-box;
  height: var(--sp-align-status-height) !important;
  min-height: var(--sp-align-status-height) !important;
  padding: 0 9px !important;
  border-radius: 999px !important;
  font-size: var(--sp-align-status-text) !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  white-space: nowrap;
}
.sp-final-closeout :where(.payin-status, .payout-status, .refund-status, .wallet-status, .fee-status,
  .risk-status, .status-badge).sp-status {
  height: var(--sp-align-status-height) !important;
  min-height: var(--sp-align-status-height) !important;
  padding: 0 9px !important;
  font-size: var(--sp-align-status-text) !important;
  line-height: 1 !important;
}
.sp-final-closeout .sp-status::before {
  width: 6px !important;
  height: 6px !important;
  flex: 0 0 6px;
}
.sp-final-closeout .sp-status > .sp-status-text {
  display: inline-flex;
  align-items: center;
  min-height: 11px;
  line-height: 1;
}
.sp-final-closeout .sp-status.warning { color: var(--sp-op-warning); }
.sp-final-closeout .sp-status.success { color: var(--sp-op-success); }
.sp-final-closeout .sp-status.processing { color: var(--sp-op-progress); }
.sp-final-closeout .sp-status.risk,
.sp-final-closeout .sp-status.error { color: var(--sp-op-danger); }
.sp-final-closeout .sp-status.recovery { color: var(--sp-op-recovery); }
.sp-final-closeout .sp-status.disabled { color: var(--sp-op-disabled); }
.sp-final-closeout .sp-status[data-tone="success"] { color: var(--sp-op-success) !important; }
.sp-final-closeout .sp-status[data-tone="progress"] { color: var(--sp-op-progress) !important; }
.sp-final-closeout .sp-status[data-tone="warning"],
.sp-final-closeout .sp-status[data-tone="review"] { color: var(--sp-op-warning) !important; }
.sp-final-closeout .sp-status[data-tone="failed"],
.sp-final-closeout .sp-status[data-tone="blocked"] { color: var(--sp-op-danger) !important; }
.sp-final-closeout .sp-status[data-tone="recovery"] { color: var(--sp-op-recovery) !important; }
.sp-final-closeout .sp-status[data-tone="disabled"] { color: var(--sp-op-disabled) !important; }
.sp-final-closeout .sp-status[data-tone="unknown"] { color: var(--sp-op-unknown) !important; }

.sp-final-closeout :where(button, .btn, .layui-btn, .modern-btn, .wallet-btn, [role="button"],
  .fee-btn, .fee-icon-btn, .refund-icon-btn).sp-button-system,
.sp-final-closeout :where(button, .btn, .layui-btn, .modern-btn, .wallet-btn, [role="button"]) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--sp-button-icon-gap) !important;
  min-height: var(--sp-align-button-height) !important;
  padding-block: 0 !important;
  font-size: var(--sp-align-button-text) !important;
  font-weight: 600 !important;
  line-height: var(--sp-align-body-lh) !important;
}
.sp-final-closeout .sp-button-icon,
.sp-final-closeout :where(.sp-table-action-icon, .sp-status-icon) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto;
}
.sp-final-closeout .sp-button-icon,
.sp-final-closeout .sp-table-action-icon { width: 16px !important; height: 16px !important; font-size: 16px !important; line-height: 16px !important; }
.sp-final-closeout .sp-status-icon { width: 14px !important; height: 14px !important; font-size: 14px !important; line-height: 14px !important; }

.sp-final-closeout :where(.bc-sidebar-nav, .merchant-nav-panel, .bc-quickbar, .merchant-quickbar) a {
  display: flex !important;
  align-items: center !important;
  gap: var(--sp-nav-icon-gap) !important;
  box-sizing: border-box;
  height: var(--sp-align-nav-height) !important;
  min-height: var(--sp-align-nav-height) !important;
  font-size: 13px !important;
  line-height: 20px !important;
}
.sp-final-closeout .sp-nav-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--sp-align-nav-icon-box) !important;
  height: var(--sp-align-nav-icon-box) !important;
  flex: 0 0 var(--sp-align-nav-icon-box) !important;
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 18px !important;
}
.sp-final-closeout .sp-nav-text {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 13px;
  line-height: 20px;
}
.sp-final-closeout :where(.bc-sidebar-nav, .merchant-nav-panel) a[aria-current="page"],
.sp-final-closeout :where(.bc-sidebar-nav, .merchant-nav-panel) a.active {
  font-weight: 600 !important;
}

.sp-final-closeout :where(.sp-coin, .sp-asset-pair) {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0;
  line-height: 20px;
}
.sp-final-closeout :where(table, .sp-asset-cell) .sp-coin__logo,
.sp-final-closeout .sp-asset-icon-box {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  width: 28px !important;
  height: 28px !important;
  flex: 0 0 28px !important;
  object-fit: contain;
}
.sp-final-closeout :where(table, .sp-asset-cell) .sp-coin__logo { padding: 2px; }
.sp-final-closeout .sp-coin__code { line-height: 20px; text-align: left; }

.sp-final-closeout :where(label, .form-label, .sp-form-label) {
  font-size: var(--sp-align-form-label) !important;
  font-weight: 500 !important;
  line-height: var(--sp-align-form-label-lh) !important;
}
.sp-final-closeout .sp-form-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}
.sp-final-closeout .sp-form-field > :where(label, .form-label, .sp-form-label) {
  display: flex;
  align-items: flex-start;
  min-height: 18px;
  margin: 0 0 6px !important;
}
.sp-final-closeout [data-sp-form-row] {
  display: grid;
  grid-template-columns: repeat(var(--sp-form-columns, 2), minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}
.sp-final-closeout [data-sp-form-row] .sp-form-field > :where(label, .form-label, .sp-form-label) { min-height: 36px; }
.sp-final-closeout :where(input:not([type="checkbox"]):not([type="radio"]), select, .layui-input, .layui-select,
  .modern-input, .wallet-input, .wallet-select, .sp-form-control) {
  box-sizing: border-box;
  height: var(--sp-op-control-h) !important;
  min-height: var(--sp-op-control-h) !important;
  font-size: var(--sp-align-body) !important;
  line-height: var(--sp-align-body-lh) !important;
}
.sp-final-closeout textarea { min-height: 80px !important; font-size: var(--sp-align-body) !important; line-height: var(--sp-align-body-lh) !important; }

@media (max-width: 768px) {
  .sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head, .fee-page-head, .qa-head) {
    flex-wrap: wrap;
  }
  .sp-final-closeout [data-sp-form-row] { grid-template-columns: 1fr; }
  .sp-final-closeout [data-sp-form-row] .sp-form-field > :where(label, .form-label, .sp-form-label) { min-height: 18px; }
}

/* STANDARDPAY-F01-R4-FINAL-ADMIN-MERCHANT-UI-CLOSEOUT
 * Frozen presentation contract. This block intentionally operates only on
 * rendered structure and never introduces application actions or state.
 */
.sp-final-closeout :where(.wallet-modern-shell, .modern-page, .merchant-page-shell, .security-page,
  .google-page, .ledger-page, .addr-page, .payin-page, .payout-page, .fee-page, .risk-page,
  .refund-page, .wallet-control, .wallet-coverage, .sol-proof) {
  width: min(100%, 1520px) !important;
  margin-inline: auto !important;
  padding-inline: clamp(24px, 2vw, 32px) !important;
}

.sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head, .fee-page-head,
  .refund-page-head, .wc-head, .coverage-head, .sol-proof-head, .qa-head) h1 {
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 32px !important;
}

.sp-final-closeout :where(.modern-panel-head, .wallet-section-head, .modernized-panel-head,
  .fee-section-head, .refund-section-head, .sp-section-head) h2,
.sp-final-closeout :where(.modern-panel, .modernized-panel, .wallet-section, .payin-panel,
  .payout-panel, .security-panel, .google-panel, .ledger-panel, .addr-panel, .fee-band,
  .refund-panel) > h2 {
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 24px !important;
}

.sp-final-closeout :where(.card-title, .modern-card-title, .wallet-card-title, .metric-title,
  .sp-provider-card h3, .fee-card h3, .risk-card h3) {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 20px !important;
}

.sp-final-closeout :where(.help, .hint, .meta, .form-help, .field-help, .sp-fee-hint,
  .modern-helper, .wallet-help, .payin-help, .payout-help, small) {
  font-size: 12px !important;
  line-height: 18px !important;
}

.sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head, .fee-page-head,
  .refund-page-head, .wc-head, .coverage-head, .sol-proof-head, .qa-head) > :last-child,
.sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head, .fee-page-head,
  .refund-page-head) :where(.modern-action-row, .merchant-actions, .fee-head-actions, .refund-head-actions) {
  margin-inline-start: auto;
  justify-content: flex-end;
}

.sp-final-closeout :where(.modern-filter-bar, .wallet-toolbar, .payin-filter, .payout-filter,
  .refund-filter, .fee-preview-form, [data-sp-filter-bar]) {
  width: 100%;
  align-items: end;
}

.sp-final-closeout :where(.sp-action-review, [data-sp-action="review-approval"]) {
  border-color: #b45309 !important;
  background-color: #b45309 !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px rgba(180, 83, 9, .16) !important;
}

.sp-final-closeout :where(.sp-action-financial, [data-sp-action="irreversible-financial"]) {
  border-color: #b91c1c !important;
  background-color: #b91c1c !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, .18) !important;
}

.sp-final-closeout :where(.sp-action-destructive, [data-sp-action="destructive"]) {
  border-color: #dc2626 !important;
  background-color: transparent !important;
  color: #dc2626 !important;
}

.sp-final-closeout .sp-long-token,
.sp-final-closeout .sp-identifier {
  display: inline-block;
  max-width: min(28ch, 34vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.sp-final-closeout .sp-copy-id {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
}

.sp-final-closeout table .sp-align-action:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--sp-surface, #fff);
}

.sp-final-closeout .sp-mobile-table-hint {
  margin: 0 0 8px;
  color: var(--sp-muted, #475569);
  font-size: 12px;
  line-height: 18px;
}

/* Dark-mode repair for the previously divergent risk, fee, reconciliation,
 * dashboard, pay-in, wallet-control and embedded operational surfaces. */
html[data-theme="dark"] body.sp-final-closeout,
html[data-theme="dark"] body.sp-final-closeout :where(.modern-content, .merchant-content) {
  background-color: #0b1220 !important;
  color: #e5edf8 !important;
}

html[data-theme="dark"] .sp-final-closeout :where(.modern-panel, .modernized-panel, .wallet-section,
  .wallet-card, .payin-panel, .payout-panel, .fee-band, .fee-panel, .refund-panel, .risk-card,
  .sp-provider-card, .risk-summary-item, .financial-status-grid > div, .fee-report-card,
  .fee-flag-strip > div, .fee-table-wrap, .refund-table-wrap, .wc-table-wrap, .wc-ton,
  .coverage-table-wrap, .proof-list, .modern-card, .metric-card) {
  border-color: #334155 !important;
  background-color: #111c2d !important;
  color: #e5edf8 !important;
  background-image: none !important;
}

html[data-theme="dark"] .sp-final-closeout :where(th, .fee-table th, .refund-table th,
  .wc-table th, .coverage-table th) {
  border-color: #334155 !important;
  background-color: #18263a !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .sp-final-closeout :where(td, .fee-table td, .refund-table td,
  .wc-table td, .coverage-table td) {
  border-color: #26364b !important;
  background-color: #111c2d !important;
  color: #e5edf8 !important;
}

html[data-theme="dark"] .sp-final-closeout :where(p, small, .help, .hint, .meta, .risk-muted,
  .fee-muted, .modern-muted, .wallet-muted) { color: #aebdd0 !important; }

html[data-theme="dark"] .sp-final-closeout :where(input, select, textarea, .layui-input, .layui-select) {
  border-color: #475569 !important;
  background-color: #0f1a2b !important;
  color: #eef5ff !important;
}

html[data-theme="dark"] .sp-final-closeout :where(.financial-warning-band, .proof-alert,
  .wc-alert, .coverage-band, .modern-alert.warning) {
  border-color: #d97706 !important;
  background-color: #36230b !important;
  color: #fde6b1 !important;
}

@media (min-width: 1600px) {
  .sp-final-closeout :where(.wallet-modern-shell, .modern-page, .merchant-page-shell, .fee-page,
    .risk-page, .refund-page) { padding-inline: 32px !important; }
}

@media (min-width: 1200px) and (max-width: 1599px) {
  .sp-final-closeout :where(.wallet-modern-shell, .modern-page, .merchant-page-shell, .fee-page,
    .risk-page, .refund-page) { padding-inline: 28px !important; }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .sp-final-closeout :where(.wallet-modern-shell, .modern-page, .merchant-page-shell, .fee-page,
    .risk-page, .refund-page) { padding-inline: 24px !important; }
  .sp-final-closeout [data-sp-form-row] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .sp-final-closeout :where(.wallet-modern-shell, .modern-page, .merchant-page-shell, .security-page,
    .google-page, .ledger-page, .addr-page, .payin-page, .payout-page, .fee-page, .risk-page,
    .refund-page, .wallet-control, .wallet-coverage, .sol-proof) {
    padding-inline: 16px !important;
  }
  .sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head, .fee-page-head,
    .refund-page-head, .wc-head, .coverage-head, .sol-proof-head, .qa-head) h1 {
    font-size: 23px !important;
    line-height: 30px !important;
  }
  body.sp-final-closeout .qa-head h1,
  body.sp-final-closeout .modern-page-head h1,
  body.sp-final-closeout .wallet-hero h1,
  body.sp-final-closeout .payin-head h1,
  body.sp-final-closeout .payout-head h1,
  body.sp-final-closeout .fee-page-head h1,
  body.sp-final-closeout .refund-page-head h1 {
    font-size: 23px !important;
    line-height: 30px !important;
  }
  .sp-final-closeout :where(button, .btn, .layui-btn, .modern-btn, .wallet-btn, [role="button"],
    .fee-btn, .fee-icon-btn, .refund-icon-btn).sp-button-system,
  .sp-final-closeout :where(input:not([type="checkbox"]):not([type="radio"]), select,
    .layui-input, .layui-select, .modern-input, .wallet-input, .wallet-select, .sp-form-control) {
    min-height: 44px !important;
  }
  body.sp-final-closeout button.sp-button-system,
  body.sp-final-closeout a.sp-button-system,
  body.sp-final-closeout [role="button"].sp-button-system { min-height: 44px !important; }
  .sp-final-closeout :where(.modern-page-head, .wallet-hero, .payin-head, .payout-head, .fee-page-head,
    .refund-page-head, .qa-head) > :last-child { width: 100%; margin-inline-start: 0; }
  .sp-final-closeout .sp-mobile-cards { min-width: 0 !important; }
  .sp-final-closeout .sp-mobile-cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .sp-final-closeout .sp-mobile-cards :where(tbody, tr, td) { display: block; width: 100%; }
  .sp-final-closeout .sp-mobile-cards tbody tr {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--sp-line, #cbd5e1);
    border-radius: 8px;
    background: var(--sp-surface, #fff);
  }
  .sp-final-closeout .sp-mobile-cards tbody td {
    display: grid;
    grid-template-columns: minmax(108px, 40%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    height: auto !important;
    min-height: 44px !important;
    padding: 7px 12px !important;
    white-space: normal !important;
  }
  .sp-final-closeout .sp-mobile-cards tbody td::before {
    content: attr(data-sp-label);
    color: var(--sp-muted, #475569);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
  }
  .sp-final-closeout .sp-mobile-cards tbody td > .sp-cell-inner {
    min-height: 30px;
    justify-content: flex-end !important;
    text-align: right !important;
  }
  .sp-final-closeout .sp-mobile-cards tbody td.sp-align-action {
    position: static;
    background: transparent;
  }
  .sp-final-closeout .sp-mobile-cards tbody td.sp-align-action > .sp-cell-inner { width: 100%; }
}
