body[data-page="withdraw"] {
  --withdraw-surface: rgba(255, 255, 255, 0.045);
  --withdraw-surface-hover: rgba(154, 124, 255, 0.12);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body[data-page="withdraw"] [hidden] { display: none !important; }

.withdraw-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.withdraw-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.withdraw-topbar .withdraw-brand,
.withdraw-card button,
.withdraw-topbar button {
  -webkit-user-select: none;
  user-select: none;
}

.withdraw-topbar {
  position: relative;
  z-index: 3;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 18px 0;
}

.withdraw-topbar .withdraw-brand { gap: 10px; white-space: nowrap; }
.withdraw-brand img,
.withdraw-option__logo,
.withdraw-option__network {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  pointer-events: none;
}

.withdraw-topbar .brand-badge img { width: 36px; height: 36px; }

.withdraw-topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.withdraw-header-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--withdraw-surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.withdraw-header-control:hover,
.withdraw-language[open] .withdraw-header-control {
  background: var(--withdraw-surface-hover);
  border-color: var(--line-strong);
}

.withdraw-header-control .withdraw-icon { width: 16px; height: 16px; }
.withdraw-language { position: relative; }
.withdraw-language summary { list-style: none; }
.withdraw-language summary::-webkit-details-marker { display: none; }
.withdraw-language[open] summary .withdraw-icon { transform: rotate(180deg); }

.withdraw-language-options,
.withdraw-options {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #19192b;
  box-shadow: 0 18px 40px rgba(4, 5, 14, 0.54);
}

.withdraw-language-options {
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  width: 132px;
}

.withdraw-language-options button,
.withdraw-option {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}

.withdraw-language-options button:hover,
.withdraw-language-options button[aria-pressed="true"],
.withdraw-option:hover,
.withdraw-option[aria-selected="true"],
.withdraw-option[data-selected="true"] {
  background: var(--withdraw-surface-hover);
  border-color: var(--line);
}

.withdraw-language-options button[aria-pressed="true"]::after {
  content: "✓";
  float: right;
  color: #bba8ff;
}

.withdraw-mobile-help { color: #bba8ff; }

.withdraw-content {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  min-height: calc(100dvh - 120px);
  padding: 12px 0 max(42px, env(safe-area-inset-bottom));
}

.withdraw-card {
  width: min(100%, 620px);
  min-width: 0;
  padding: clamp(18px, 3.5vw, 32px);
}

.withdraw-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  margin-bottom: 20px;
}

.withdraw-heading h1 {
  color: var(--text);
  font-size: clamp(25px, 5.2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.withdraw-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(6, 8, 24, 0.35);
}

.withdraw-tabs button {
  min-height: 38px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
}

.withdraw-tabs button:hover { color: var(--text); }
.withdraw-tabs button[aria-selected="true"] {
  border-color: var(--line);
  background: var(--withdraw-surface-hover);
  color: #e6deff;
}

.withdraw-flow,
.withdraw-form,
.withdraw-field {
  display: grid;
  min-width: 0;
}

.withdraw-flow,
.withdraw-form { gap: 15px; }
.withdraw-field { gap: 7px; }

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

.withdraw-field-label {
  min-width: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.25;
}

.withdraw-picker { position: relative; }

.withdraw-select,
.withdraw-input-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--withdraw-surface);
  color: var(--text);
}

.withdraw-select {
  justify-content: space-between;
  gap: 6px;
  text-align: left;
  cursor: pointer;
}

.withdraw-select:not(:disabled):hover,
.withdraw-select[aria-expanded="true"],
.withdraw-input-row:focus-within { border-color: var(--line-strong); }

.withdraw-select[aria-expanded="true"] .withdraw-chevron { transform: rotate(180deg); }
.withdraw-chevron { width: 14px; height: 14px; color: var(--text-muted); }

.withdraw-options {
  inset-inline: 0;
  inset-block-start: calc(100% + 5px);
  max-height: 245px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.withdraw-selection,
.withdraw-option,
.withdraw-request-asset {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.withdraw-option__mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
}

.withdraw-option__logo {
  display: block;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: contain;
}

.withdraw-option__network {
  position: absolute;
  inset-inline-end: -3px;
  inset-block-end: -3px;
  display: block;
  width: 13px;
  height: 13px;
  padding: 1px;
  border: 1px solid #252438;
  border-radius: 50%;
  background: #181826;
  object-fit: contain;
}

.withdraw-option__label,
.withdraw-option__meta {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.withdraw-option__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-inline-end: 2px;
}

.withdraw-route-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
}

.withdraw-option__meta { color: var(--text-muted); font-size: 12px; }
.withdraw-native-select { appearance: auto; }

.withdraw-label-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px 12px;
}

.withdraw-balance {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.withdraw-balance strong { color: var(--text); font-weight: 650; }
.withdraw-number__fraction { font-size: .8em; }

.withdraw-input-row { padding-inline-end: 5px; }
.withdraw-amount-row { min-height: 65px; }

.withdraw-input {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.withdraw-input::placeholder { color: var(--text-muted); opacity: .8; }
.withdraw-input.withdraw-amount {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.withdraw-input.withdraw-address {
  font-family: "Segoe UI Mono", "Cascadia Mono", ui-monospace, monospace;
  font-size: 14px;
}

.withdraw-input-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  margin-inline-start: 4px;
}

.withdraw-input-action {
  display: inline-grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #c9b9ff;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.withdraw-input-action:hover,
.withdraw-input-action[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--withdraw-surface-hover);
}

.withdraw-input-action[data-copied="true"],
.withdraw-input-action.is-pasted { color: var(--success); }

.withdraw-currency {
  min-width: 45px;
  border-color: var(--line);
  background: rgba(154, 124, 255, 0.08);
}

.withdraw-summary {
  display: grid;
  min-width: 0;
  gap: 0;
  margin: 0;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.withdraw-detail {
  display: grid;
  grid-template-columns: minmax(85px, 1fr) minmax(0, 2fr);
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  padding: 11px 0;
  font-size: 14px;
  line-height: 1.3;
}

.withdraw-detail + .withdraw-detail { border-top: 1px solid var(--line); }
.withdraw-detail dt,
.withdraw-detail > span:first-child { color: var(--text-muted); }
.withdraw-detail dd,
.withdraw-detail > strong:last-child {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}

.withdraw-detail dd .withdraw-selection { justify-content: flex-end; }
.withdraw-detail-total dd { font-size: 19px; }

.withdraw-message {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 110, 135, 0.30);
  border-radius: 11px;
  background: rgba(255, 110, 135, 0.08);
  color: #ffcbda;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.withdraw-message[data-tone="info"],
.withdraw-message[data-tone="warning"] {
  border-color: var(--line);
  background: var(--withdraw-surface);
  color: var(--text-muted);
}

.withdraw-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 14px 30px rgba(122, 92, 255, 0.26);
}

.withdraw-card button:disabled,
.withdraw-security-dialog button:disabled {
  opacity: .55;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.withdraw-topbar :focus-visible,
.withdraw-card :focus-visible,
.withdraw-security-dialog :focus-visible {
  outline: 2px solid #cab9ff;
  outline-offset: 3px;
}

.withdraw-input-row input:focus-visible { outline: none; }

.withdraw-subtitle,
.withdraw-center h2,
.withdraw-security-heading h2 {
  color: var(--text);
  font-size: clamp(18px, 4vw, 23px);
  line-height: 1.18;
  letter-spacing: -0.022em;
}

.withdraw-review .withdraw-detail { padding-block: 13px; }

.withdraw-detail--address dd {
  font-family: "Segoe UI Mono", "Cascadia Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
}

@media (min-width: 681px) {
  .withdraw-review .withdraw-detail--address,
  .withdraw-receipt-details .withdraw-detail--address {
    grid-template-columns: minmax(0, .7fr) minmax(0, 2.3fr);
  }
}

.withdraw-actions {
  display: grid;
  grid-template-columns: minmax(90px, 0.65fr) minmax(0, 1.35fr);
  align-items: stretch;
  gap: 8px;
}

.withdraw-actions .withdraw-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  min-height: 48px;
}

.withdraw-center {
  display: grid;
  min-width: 0;
  justify-items: center;
  align-content: center;
  gap: 11px;
  min-height: 158px;
  padding: 12px 0 10px;
  text-align: center;
}

.withdraw-center p,
.withdraw-empty { color: var(--text-muted); line-height: 1.4; font-size: 14px; }
.withdraw-center:has([data-withdraw-retry]:not([hidden])) .withdraw-spinner { display: none; }
.withdraw-guest .withdraw-primary { width: min(100%, 220px); margin-top: 5px; }

.withdraw-guest-icon,
.withdraw-receipt-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #beabff;
  background: rgba(154, 124, 255, 0.12);
  font-size: 20px;
}

.withdraw-guest-icon svg { width: 22px; height: 22px; }

.withdraw-spinner {
  display: block;
  width: 25px;
  height: 25px;
  border: 2px solid var(--line);
  border-top-color: #b499ff;
  border-radius: 50%;
  animation: withdraw-spin 710ms linear infinite;
}

@keyframes withdraw-spin { to { transform: rotate(360deg); } }

.withdraw-receipt {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  text-align: center;
}

.withdraw-receipt-title { font-size: 22px; line-height: 1.2; }
.withdraw-receipt-meta { color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }
.withdraw-receipt-details { width: 100%; margin: 0; text-align: start; }
.withdraw-explorer,
.withdraw-text-button {
  color: #c9b9ff;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.withdraw-text-button {
  justify-self: start;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.withdraw-receipt-icon[data-tone="success"] { background: rgba(44, 215, 154, 0.11); color: #83f8d4; }
.withdraw-receipt-icon[data-tone="danger"] { background: rgba(255, 110, 135, 0.11); color: #ffadbd; }
.withdraw-receipt-icon[data-tone="warning"] { background: rgba(255, 181, 77, 0.11); color: #ffcf91; }

.withdraw-approvals-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.withdraw-refresh { grid-column: 2; }
.withdraw-requests { display: grid; min-width: 0; gap: 9px; }
.withdraw-empty { padding: 18px 0; text-align: center; }

.withdraw-request {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.withdraw-request-head,
.withdraw-request-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.withdraw-request-asset { flex-wrap: wrap; font-weight: 650; }
.withdraw-request-asset > * { min-width: 0; overflow-wrap: anywhere; }
.withdraw-request-details { margin: 0; }
.withdraw-request-note {
  color: var(--text-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.withdraw-request-details .withdraw-detail { padding-block: 8px; grid-template-columns: minmax(78px, .75fr) minmax(0, 2fr); }
.withdraw-request-actions { justify-content: flex-end; }
.withdraw-request-actions .button { min-height: 42px; padding: 8px 13px; font-size: 14px; font-weight: 650; }

.withdraw-status {
  display: inline-flex;
  color: #cbc1f0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--withdraw-surface);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.withdraw-status[data-tone="success"] { color: #87eed2; }
.withdraw-status[data-tone="danger"] { color: #ffacbf; }
.withdraw-status[data-tone="warning"] { color: #ffc98c; }

.withdraw-security-dialog {
  width: min(calc(100% - 28px), 420px);
  max-width: none;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #171728;
  box-shadow: var(--shadow);
  color: var(--text);
  overscroll-behavior: contain;
}

.withdraw-security-dialog::backdrop { background: rgba(5, 6, 15, 0.76); backdrop-filter: blur(4px); }
.withdraw-security-card { display: grid; gap: 14px; padding: 16px; }
.withdraw-security-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.withdraw-security-close { flex: 0 0 42px; padding: 0; }
.withdraw-security-content { display: grid; min-width: 0; gap: 12px; }
.withdraw-security-content label { display: grid; min-width: 0; gap: 6px; color: var(--text-muted); font-size: 14px; }
.withdraw-security-content label > input,
.withdraw-security-content textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--withdraw-surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.withdraw-security-content a { color: #beabff; text-decoration: underline; text-underline-offset: 3px; }
.withdraw-security-content p { color: var(--text-muted); font-size: 14px; line-height: 1.35; }

@media (min-width: 981px) and (hover: hover) and (pointer: fine) {
  .withdraw-mobile-help { display: none; }
}

@media (max-width: 680px) {
  .withdraw-shell { width: calc(100% - 24px); }
  .withdraw-shell .withdraw-topbar { display: flex; flex-direction: row; align-items: center; padding: 12px 0; }
  .withdraw-content { align-items: start; min-height: 0; padding-block-start: 4px; }
  .withdraw-card { border-radius: 20px; }
  .withdraw-card .withdraw-heading { margin-bottom: 16px; }
  .withdraw-card .withdraw-tabs { margin-bottom: 16px; }
  .withdraw-flow,
  .withdraw-form { gap: 13px; }
}

@media (min-width: 681px) and (max-height: 840px) {
  .withdraw-topbar { padding-block: 13px; }
  .withdraw-content { padding-bottom: 28px; }
  .withdraw-card { padding-block: 22px; }
  .withdraw-heading,
  .withdraw-tabs { margin-bottom: 15px; }
  .withdraw-form { gap: 12px; }
  .withdraw-select,
  .withdraw-input-row { min-height: 49px; }
  .withdraw-amount-row { min-height: 57px; }
}

@media (max-width: 420px) {
  .withdraw-topbar .withdraw-brand { gap: 5px; font-size: 14px; }
  .withdraw-topbar .brand-badge img { width: 30px; height: 30px; }
  .withdraw-topbar-actions { gap: 5px; }
  .withdraw-cabinet-link, .withdraw-mobile-help { padding-inline: 0; }
  .withdraw-cabinet-link span, .withdraw-mobile-help span { display: none; }
  .withdraw-route { gap: 8px; }
  .withdraw-route .withdraw-select { padding-inline: 9px; }
  .withdraw-selection, .withdraw-option { gap: 5px; }
}

@media (max-width: 360px) {
  .withdraw-shell { width: calc(100% - 18px); }
  .withdraw-card { padding: 14px; }
  .withdraw-select { font-size: 14px; }
  .withdraw-option__mark, .withdraw-option__logo { flex-basis: 21px; width: 21px; height: 21px; }
  .withdraw-topbar .withdraw-brand { letter-spacing: 0; }
  .withdraw-input-action { min-width: 38px; padding-inline: 5px; }
  .withdraw-detail-total dt { white-space: nowrap; }
  .withdraw-detail-total dd { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .withdraw-card *, .withdraw-topbar * { transition: none; }
  .withdraw-spinner { animation: none; }
}
