.treasury-panel {
  margin-top: 18px;
}

.treasury-header {
  align-items: flex-start;
}

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

.treasury-title-row h2 {
  margin: 0;
}

.treasury-state-badge,
.treasury-mode,
.treasury-status,
.treasury-count {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .7rem;
  line-height: 1;
  white-space: nowrap;
}

.treasury-state-badge.safe,
.treasury-status.success {
  color: var(--accent);
  border-color: rgba(23, 211, 154, .4);
}

.treasury-state-badge.danger,
.treasury-status.failed,
.treasury-status.rejected,
.treasury-status.blocked {
  color: var(--negative);
  border-color: rgba(255, 110, 124, .45);
}

.treasury-state-badge.warning,
.treasury-status.pending,
.treasury-status.uncertain,
.treasury-status.attention,
.treasury-status.submitting,
.treasury-status.validating {
  color: var(--warning);
  border-color: rgba(250, 190, 80, .45);
}

.treasury-message {
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.treasury-message.error {
  color: var(--negative);
  border-color: rgba(255, 110, 124, .45);
  background: rgba(255, 110, 124, .06);
}

.treasury-safety-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.treasury-safety-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 13px;
  min-width: 0;
}

.treasury-safety-card > span,
.treasury-safety-card > strong,
.treasury-safety-card > small {
  display: block;
}

.treasury-safety-card > span {
  color: var(--muted);
  font-size: .72rem;
  margin-bottom: 7px;
}

.treasury-safety-card > strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.treasury-safety-card > small {
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.35;
}

.treasury-lock-section,
.treasury-activity-section {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.treasury-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.treasury-section-header h3 {
  margin: 0 0 3px;
}

.treasury-section-header p {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.treasury-lock-list {
  display: grid;
  gap: 8px;
}

.treasury-lock-card {
  display: grid;
  grid-template-columns:
    minmax(100px, .8fr)
    minmax(75px, .6fr)
    minmax(140px, 1.7fr)
    auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(250, 190, 80, .35);
  border-radius: 10px;
  background: rgba(250, 190, 80, .04);
}

.treasury-lock-field span,
.treasury-lock-field strong {
  display: block;
}

.treasury-lock-field span {
  color: var(--muted);
  font-size: .67rem;
  margin-bottom: 3px;
}

.treasury-lock-field strong {
  overflow-wrap: anywhere;
}

.treasury-empty {
  padding: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.treasury-activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .79rem;
}

.treasury-activity-table th,
.treasury-activity-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.treasury-activity-table th {
  color: var(--muted);
  font-weight: 600;
}

.treasury-mode.simulation {
  color: var(--muted);
}

.treasury-mode.live {
  color: var(--warning);
  border-color: rgba(250, 190, 80, .4);
}

.treasury-request-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.treasury-footnote {
  margin-top: 14px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}

.treasury-request-dialog[open] {
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
}

.treasury-request-content {
  padding: 18px;
}

.treasury-request-content > section,
.treasury-request-content > details,
.treasury-request-content > .treasury-message {
  margin-top: 16px;
}

.treasury-request-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 14px;
}

.treasury-request-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.treasury-request-heading h3 {
  margin: 0;
}

.treasury-request-id {
  margin-top: 11px;
}

.treasury-request-id span,
.treasury-request-grid span,
.treasury-request-times span {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  margin-bottom: 3px;
}

.treasury-request-id strong {
  display: block;
  overflow-wrap: anywhere;
}

.treasury-request-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.treasury-request-grid > div,
.treasury-request-times > div {
  min-width: 0;
}

.treasury-request-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.treasury-request-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}

.treasury-history-list {
  display: grid;
  gap: 8px;
}

.treasury-history-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px;
  background: var(--surface-2);
}

.treasury-history-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.treasury-history-card p {
  margin: 0;
  line-height: 1.45;
}

.treasury-history-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.45;
}

.treasury-manual-release {
  border: 1px solid rgba(255, 110, 124, .45);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 110, 124, .05);
}

.treasury-manual-release h3 {
  margin-top: 0;
}

.treasury-manual-release label {
  display: block;
  margin-top: 12px;
  font-size: .78rem;
}

.treasury-manual-release textarea,
.treasury-manual-release input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
}

.treasury-manual-release code {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.treasury-release-warning {
  margin-top: 10px;
  color: var(--warning);
  line-height: 1.45;
}

.treasury-release-button {
  margin-top: 12px;
}

.treasury-json-details {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.treasury-json-details summary {
  cursor: pointer;
  padding: 10px 12px;
}

.treasury-json {
  margin: 0;
  padding: 12px;
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid var(--border);
  font-size: .72rem;
}

@media (max-width: 900px) {
  .treasury-safety-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .treasury-lock-card {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 620px) {
  .treasury-safety-grid,
  .treasury-request-grid,
  .treasury-request-times,
  .treasury-lock-card {
    grid-template-columns: 1fr;
  }

  .treasury-section-header,
  .treasury-request-heading {
    flex-direction: column;
  }

  .treasury-header {
    flex-direction: column;
  }
}

.treasury-type {
  font-weight: 600;
  white-space: nowrap;
}

.treasury-ownership-section {
  margin-top: 24px;
}

.treasury-ownership-ledger-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  margin-bottom: 12px;
}

.treasury-ownership-ledger-header h3 {
  margin-bottom: 4px;
}

.treasury-ownership-ledger-header p {
  margin: 0;
}

.treasury-ownership-table {
  width: 100%;
}

.treasury-ownership-table td,
.treasury-ownership-table th {
  white-space: nowrap;
}


/* Treasury ownership polish v1 */

.treasury-ownership-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.treasury-ownership-section
.treasury-section-header {
  margin-bottom: 12px;
}

.treasury-ownership-section
.treasury-section-header p,
.treasury-ownership-ledger-header p {
  max-width: 760px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.treasury-ownership-section .table-scroll {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}

.treasury-ownership-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .8rem;
}

.treasury-ownership-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .055em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.treasury-ownership-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.treasury-ownership-table
tbody tr:last-child td {
  border-bottom: 0;
}

#treasuryOwnershipBalanceBody
td:first-child strong {
  font-weight: 700;
}

#treasuryOwnershipBalanceBody
td:last-child strong {
  color: var(--accent);
  font-size: .92rem;
  font-weight: 700;
}

#treasuryOwnershipLedgerBody
td:nth-child(5) strong {
  font-weight: 700;
}

.treasury-ownership-ledger-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  margin-bottom: 10px;
  padding-top: 4px;
}

.treasury-ownership-ledger-header h3 {
  margin: 0 0 3px;
  font-size: .92rem;
}

.treasury-request-link {
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 500;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.treasury-request-link:hover {
  text-decoration-thickness: 2px;
}

.treasury-request-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (max-width: 760px) {
  .treasury-ownership-ledger-header {
    flex-direction: column;
  }
}

/* Treasury withdrawal preparation UI v1 */

.treasury-withdrawal-section {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.treasury-withdrawal-form {
  display: grid;
  grid-template-columns:
    minmax(260px, 2fr)
    minmax(160px, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.treasury-withdrawal-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: .78rem;
}

.treasury-withdrawal-form select,
.treasury-withdrawal-form input {
  width: 100%;
  box-sizing: border-box;
}

.treasury-withdrawal-destination-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.treasury-withdrawal-summary-field {
  min-width: 0;
}

.treasury-withdrawal-summary-field span,
.treasury-withdrawal-summary-field strong {
  display: block;
}

.treasury-withdrawal-summary-field span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.treasury-withdrawal-summary-field strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treasury-withdrawal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.treasury-withdrawal-preflight {
  margin-top: 14px;
}

.treasury-withdrawal-preflight-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius:
    var(--radius)
    var(--radius)
    0
    0;
  background: var(--surface);
}

.treasury-withdrawal-preflight-head.valid {
  border-color: var(--positive);
}

.treasury-withdrawal-preflight-head.invalid {
  border-color: var(--negative);
}

.treasury-withdrawal-preflight-head.valid strong {
  color: var(--positive);
}

.treasury-withdrawal-preflight-head.invalid strong {
  color: var(--negative);
}

.treasury-withdrawal-preflight-head span {
  color: var(--muted);
  font-size: .75rem;
  text-align: right;
}

.treasury-withdrawal-preflight-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius:
    0
    0
    var(--radius)
    var(--radius);
  overflow: hidden;
  background: var(--border);
}

.treasury-withdrawal-preflight-grid > div {
  min-width: 0;
  padding: 11px;
  background: var(--surface-2);
}

.treasury-withdrawal-preflight-grid span,
.treasury-withdrawal-preflight-grid strong {
  display: block;
}

.treasury-withdrawal-preflight-grid span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .7rem;
}

.treasury-withdrawal-safety-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.5;
}

.treasury-withdrawal-table {
  width: 100%;
  border-collapse: collapse;
}

.treasury-withdrawal-table th,
.treasury-withdrawal-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.treasury-withdrawal-table th {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
}

.treasury-withdrawal-table
tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 980px) {
  .treasury-withdrawal-destination-summary {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .treasury-withdrawal-form,
  .treasury-withdrawal-destination-summary,
  .treasury-withdrawal-preflight-grid {
    grid-template-columns: 1fr;
  }

  .treasury-withdrawal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .treasury-withdrawal-actions .button {
    width: 100%;
  }

  .treasury-withdrawal-preflight-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .treasury-withdrawal-preflight-head span {
    text-align: left;
  }
}

/* Treasury withdrawal request lifecycle UI v1 */

.treasury-withdrawal-confirmation {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.treasury-withdrawal-confirmation label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: .78rem;
}

.treasury-withdrawal-confirmation code {
  display: block;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: .75rem;
}

.treasury-withdrawal-confirmation input {
  width: 100%;
  box-sizing: border-box;
}

.treasury-withdrawal-lifecycle
.treasury-withdrawal-safety-note {
  margin-bottom: 10px;
}

/* M4.38 Withdrawal lifecycle progress clarity v1 */

.treasury-withdrawal-progress {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    rgba(255, 255, 255, .012);
}

.treasury-withdrawal-progress-rail {
  overflow-x: auto;
  padding-bottom: 3px;
}

.treasury-withdrawal-progress-track {
  display: grid;
  grid-template-columns:
    repeat(7, minmax(92px, 1fr));
  min-width: 720px;
}

.treasury-withdrawal-progress-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.treasury-withdrawal-progress-step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 15px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 2px;
  background: var(--border);
}

.treasury-withdrawal-progress-step.complete:not(:last-child)::after {
  background: var(--positive);
}

.treasury-withdrawal-progress-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.treasury-withdrawal-progress-step.complete
.treasury-withdrawal-progress-marker {
  border-color: var(--positive);
  color: var(--positive);
}

.treasury-withdrawal-progress-step.current
.treasury-withdrawal-progress-marker {
  border-color: var(--warning);
  color: var(--warning);
  box-shadow:
    0 0 0 4px rgba(250, 190, 80, .08);
}

.treasury-withdrawal-progress-step.failed
.treasury-withdrawal-progress-marker {
  border-color: var(--negative);
  color: var(--negative);
}

.treasury-withdrawal-progress-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.25;
}

.treasury-withdrawal-progress-step.complete
.treasury-withdrawal-progress-label,
.treasury-withdrawal-progress-step.current
.treasury-withdrawal-progress-label {
  color: var(--text);
  font-weight: 650;
}

.treasury-withdrawal-progress-step.failed
.treasury-withdrawal-progress-label {
  color: var(--negative);
  font-weight: 700;
}

.treasury-withdrawal-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: .72rem;
}

.treasury-withdrawal-progress-meta strong {
  color: var(--text);
}

.treasury-withdrawal-progress-meta span {
  color: var(--muted);
  text-align: right;
}

@media (max-width: 720px) {
  .treasury-withdrawal-progress {
    padding: 12px 10px;
  }

  .treasury-withdrawal-progress-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .treasury-withdrawal-progress-meta span {
    text-align: left;
  }
}


/* BEGIN account-scoped user transfer UI */

/*
 * Account-scoped Gate user transfer
 */

.treasury-user-transfer-form {
  display: grid;
  grid-template-columns:
    minmax(180px, 1fr)
    minmax(190px, 1fr)
    minmax(300px, 1.45fr)
    minmax(160px, 0.8fr);
  gap: 16px;
  align-items: end;
  margin-top: 20px;
}

.treasury-user-transfer-form > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-weight: 600;
}

.treasury-user-transfer-form select,
.treasury-user-transfer-form input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.treasury-user-transfer-form select {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treasury-user-transfer-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

#treasuryUserTransferPreviewButton {
  width: auto;
  min-width: 180px;
}


/* Persistent user-transfer outcome */

.treasury-user-transfer-outcome {
  display: grid;
  grid-template-columns:
    auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(120, 160, 145, 0.24);
  border-radius: 12px;
}

.treasury-user-transfer-outcome.success {
  border-color: rgba(68, 190, 139, 0.48);
  background: rgba(68, 190, 139, 0.055);
}

.treasury-user-transfer-outcome.uncertain {
  border-color: rgba(212, 170, 78, 0.52);
  background: rgba(212, 170, 78, 0.055);
}

.treasury-user-transfer-outcome-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 800;
}

.treasury-user-transfer-outcome.success
  .treasury-user-transfer-outcome-icon {
  color: #49c596;
}

.treasury-user-transfer-outcome.uncertain
  .treasury-user-transfer-outcome-icon {
  color: #d4aa4e;
}

.treasury-user-transfer-outcome-body {
  min-width: 0;
}

.treasury-user-transfer-outcome-body > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.treasury-user-transfer-outcome-body p {
  margin: 0;
  color: var(--muted, #8fa39b);
  line-height: 1.5;
}

.treasury-user-transfer-outcome-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
  color: var(--muted, #8fa39b);
  font-size: 0.76rem;
}

.treasury-user-transfer-outcome-meta strong {
  color: var(--text, #f1f5f3);
  overflow-wrap: anywhere;
}

.treasury-user-transfer-outcome-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 680px) {
  .treasury-user-transfer-outcome {
    grid-template-columns: 1fr;
  }

  .treasury-user-transfer-outcome-actions {
    justify-content: stretch;
  }

  .treasury-user-transfer-outcome-actions .button {
    width: 100%;
  }
}


/* Review result */

.treasury-user-transfer-preview {
  margin-top: 18px;
}

.treasury-user-transfer-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.treasury-user-transfer-card {
  min-width: 0;
  min-height: 78px;
  padding: 16px 18px;
  border: 1px solid rgba(120, 160, 145, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.treasury-user-transfer-card > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted, #8fa39b);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.25;
}

.treasury-user-transfer-card > strong {
  display: block;
  min-width: 0;
  color: var(--text, #f1f5f3);
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.treasury-user-transfer-number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Compact state chips */

.treasury-user-transfer-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(160, 180, 170, 0.22);
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: normal;
}

.treasury-user-transfer-chip.success {
  border-color: rgba(68, 190, 139, 0.38);
  background: rgba(68, 190, 139, 0.08);
}

.treasury-user-transfer-chip.safe {
  border-color: rgba(68, 190, 139, 0.38);
  background: rgba(68, 190, 139, 0.08);
}

.treasury-user-transfer-chip.warning {
  border-color: rgba(212, 170, 78, 0.40);
  background: rgba(212, 170, 78, 0.08);
}

.treasury-user-transfer-chip.danger {
  border-color: rgba(208, 92, 92, 0.42);
  background: rgba(208, 92, 92, 0.08);
}

.treasury-user-transfer-chip.neutral {
  opacity: 0.8;
}


/*
 * The disabled live arm is a deliberate safe operating
 * condition, so give this card a subtle visual distinction.
 */

.treasury-user-transfer-arm-card {
  border-color: rgba(68, 190, 139, 0.30);
  background: rgba(68, 190, 139, 0.025);
}


/* Confirmation */

.treasury-user-transfer-confirmation {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(120, 160, 145, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
}

.treasury-user-transfer-confirmation > p {
  margin: 0 0 14px;
  color: var(--muted, #8fa39b);
}

#treasuryUserTransferRequiredConfirmation {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text, #f1f5f3);
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

#treasuryUserTransferConfirmation {
  width: min(100%, 660px);
  box-sizing: border-box;
}

#treasuryUserTransferConfirmationBlock
  .treasury-user-transfer-actions {
  margin-top: 14px;
}

#executeTreasuryUserTransfer:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}


/* Medium desktop / tablet */

@media (max-width: 1180px) {
  .treasury-user-transfer-form {
    grid-template-columns:
      repeat(2, minmax(220px, 1fr));
  }

  .treasury-user-transfer-preview-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}


/* Mobile */

@media (max-width: 680px) {
  .treasury-user-transfer-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .treasury-user-transfer-actions {
    grid-column: 1;
  }

  #treasuryUserTransferPreviewButton,
  #executeTreasuryUserTransfer {
    width: 100%;
  }

  .treasury-user-transfer-preview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .treasury-user-transfer-number {
    white-space: normal;
    overflow: visible;
  }
}

/* END account-scoped user transfer UI */

/* 3J18 Treasury compact workspace v1 */

#tab-wallet
.treasury-panel {
  padding: 16px;
}


#tab-wallet
.treasury-header {
  align-items: center;

  margin-bottom: 10px;
}


#tab-wallet
.treasury-header p {
  max-width: 760px;

  font-size: .78rem;
  line-height: 1.42;
}


#tab-wallet
.treasury-safety-grid {
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 0;

  margin-top: 10px;

  overflow: hidden;

  border:
    1px solid var(--border-soft);

  border-radius: 10px;

  background:
    var(--surface-muted);
}


#tab-wallet
.treasury-safety-card {
  min-height: 68px;

  padding: 9px 11px;

  border: 0;
  border-left:
    1px solid var(--border-soft);

  border-radius: 0;

  background:
    rgba(255, 255, 255, .008);
}


#tab-wallet
.treasury-safety-card:first-child {
  border-left: 0;
}


#tab-wallet
.treasury-safety-card > span {
  margin-bottom: 4px;

  font-size: .68rem;
}


#tab-wallet
.treasury-safety-card > strong {
  font-size: .86rem;

  font-variant-numeric:
    tabular-nums;
}


#tab-wallet
.treasury-safety-card > small {
  margin-top: 3px;

  font-size: .65rem;
  line-height: 1.32;
}


#tab-wallet
.treasury-actions-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.08fr)
    minmax(0, .92fr);

  gap: 10px;

  align-items: start;

  margin-top: 12px;
}


#tab-wallet
.treasury-actions-grid
> .treasury-withdrawal-section {
  margin-top: 0;

  padding: 13px;

  border-color:
    var(--border-soft);

  border-radius: 11px;

  background:
    linear-gradient(
      145deg,
      rgba(17, 30, 26, .58),
      rgba(10, 21, 18, .46)
    );
}


#tab-wallet
.treasury-actions-grid
.treasury-section-header {
  margin-bottom: 8px;
}


#tab-wallet
.treasury-actions-grid
.treasury-section-header h3 {
  font-size: .88rem;
}


#tab-wallet
.treasury-actions-grid
.treasury-section-header p {
  max-width: 680px;

  font-size: .71rem;
  line-height: 1.4;
}


#tab-wallet
.treasury-actions-grid
.treasury-count {
  padding: 4px 7px;

  font-size: .65rem;
}


#tab-wallet
.treasury-user-transfer-form {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;

  margin-top: 12px;
}


#tab-wallet
.treasury-user-transfer-form > label,
#tab-wallet
.treasury-withdrawal-form label {
  gap: 5px;

  font-size: .71rem;
}


#tab-wallet
.treasury-user-transfer-form > label {
  font-weight: 550;
}


#tab-wallet
.treasury-user-transfer-form select,
#tab-wallet
.treasury-user-transfer-form input,
#tab-wallet
.treasury-withdrawal-form select,
#tab-wallet
.treasury-withdrawal-form input {
  min-height: 34px;

  padding: 7px 8px;
}


#tab-wallet
.treasury-user-transfer-actions {
  gap: 8px;

  margin-top: 0;
}


#tab-wallet
#treasuryUserTransferPreviewButton {
  min-width: 150px;
}


#tab-wallet
.treasury-user-transfer-preview {
  margin-top: 10px;
}


#tab-wallet
.treasury-user-transfer-preview-grid {
  gap: 8px;
}


#tab-wallet
.treasury-user-transfer-card {
  min-height: 64px;

  padding: 10px 11px;

  border-radius: 9px;
}


#tab-wallet
.treasury-user-transfer-card > span {
  margin-bottom: 5px;

  font-size: .68rem;
}


#tab-wallet
.treasury-user-transfer-card > strong {
  font-size: .82rem;
}


#tab-wallet
.treasury-user-transfer-confirmation {
  margin-top: 10px;

  padding: 12px;
}


#tab-wallet
.treasury-user-transfer-confirmation > p {
  margin-bottom: 9px;

  font-size: .72rem;
}


#tab-wallet
#treasuryUserTransferRequiredConfirmation {
  margin-bottom: 9px;

  padding: 8px 9px;

  font-size: .76rem;
}


#tab-wallet
.treasury-withdrawal-form {
  gap: 10px;

  margin-top: 12px;
}


#tab-wallet
.treasury-withdrawal-destination-summary {
  gap: 7px;

  padding: 9px;
}


#tab-wallet
.treasury-withdrawal-summary-field span {
  font-size: .64rem;
}


#tab-wallet
.treasury-withdrawal-summary-field strong {
  font-size: .78rem;
}


#tab-wallet
.treasury-withdrawal-actions {
  gap: 8px;
}


#tab-wallet
.treasury-withdrawal-preflight {
  margin-top: 10px;
}


#tab-wallet
.treasury-withdrawal-safety-note {
  margin-top: 9px;

  font-size: .68rem;
  line-height: 1.42;
}


#tab-wallet
.treasury-withdrawal-unavailable {
  margin-top: 8px;

  padding: 9px 10px;

  border:
    1px solid var(--border-soft);

  border-radius: 9px;

  background:
    rgba(255, 255, 255, .012);

  color: var(--muted);

  font-size: .71rem;
  line-height: 1.42;
}


#tab-wallet
#treasuryWithdrawalAction.has-no-destinations
.treasury-withdrawal-amount-field,

#tab-wallet
#treasuryWithdrawalAction.has-no-destinations
.treasury-withdrawal-actions,

#tab-wallet
#treasuryWithdrawalAction.has-no-destinations
#treasuryWithdrawalDestinationSummary,

#tab-wallet
#treasuryWithdrawalAction.has-no-destinations
#treasuryWithdrawalPreflight,

#tab-wallet
#treasuryWithdrawalAction.has-no-destinations
.treasury-withdrawal-safety-note {
  display: none;
}


#tab-wallet
.treasury-records {
  margin-top: 12px;

  overflow: hidden;

  border:
    1px solid var(--border-soft);

  border-radius: 11px;

  background:
    rgba(255, 255, 255, .008);
}


#tab-wallet
.treasury-records-summary {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 10px 12px;

  cursor: pointer;

  list-style: none;

  user-select: none;
}


#tab-wallet
.treasury-records-summary::-webkit-details-marker {
  display: none;
}


#tab-wallet
.treasury-records-summary::before {
  content: "▸";

  flex: 0 0 auto;

  color: var(--muted);

  transition:
    transform .15s ease;
}


#tab-wallet
.treasury-records[open]
> .treasury-records-summary::before {
  transform:
    rotate(90deg);
}


#tab-wallet
.treasury-records-summary > div {
  flex: 1 1 auto;

  min-width: 0;
}


#tab-wallet
.treasury-records-summary strong,
#tab-wallet
.treasury-records-summary small {
  display: block;
}


#tab-wallet
.treasury-records-summary strong {
  font-size: .84rem;
}


#tab-wallet
.treasury-records-summary small {
  margin-top: 2px;

  color: var(--muted);

  font-size: .68rem;
  font-weight: 400;
}


#tab-wallet
.treasury-records-summary > span {
  flex: 0 0 auto;

  padding: 4px 7px;

  border:
    1px solid var(--border-soft);

  border-radius: 999px;

  color: var(--muted);

  font-size: .64rem;
}


#tab-wallet
.treasury-records-content {
  padding:
    0 12px 10px;

  border-top:
    1px solid var(--border-soft);
}


#tab-wallet
.treasury-records-content
> .treasury-withdrawal-section,

#tab-wallet
.treasury-records-content
> .treasury-ownership-section,

#tab-wallet
.treasury-records-content
> .treasury-lock-section,

#tab-wallet
.treasury-records-content
> .treasury-activity-section {
  margin-top: 0;

  padding:
    12px 0;

  border: 0;
  border-top:
    1px solid var(--border-soft);

  border-radius: 0;

  background: transparent;
}


#tab-wallet
.treasury-records-content
> :first-child {
  border-top: 0;
}


#tab-wallet
.treasury-records
.treasury-section-header {
  margin-bottom: 8px;
}


#tab-wallet
.treasury-records
.treasury-section-header h3,

#tab-wallet
.treasury-records
.treasury-ownership-ledger-header h3 {
  font-size: .84rem;
}


#tab-wallet
.treasury-records
.treasury-section-header p,

#tab-wallet
.treasury-records
.treasury-ownership-ledger-header p {
  font-size: .69rem;
  line-height: 1.4;
}


#tab-wallet
.treasury-records
.treasury-ownership-ledger-header {
  margin-top: 14px;
  margin-bottom: 8px;
}


#tab-wallet
.treasury-records
.treasury-empty {
  padding: 9px 10px;

  font-size: .72rem;
}


#tab-wallet
.treasury-footnote {
  margin-top: 10px;

  font-size: .68rem;
}


@media (max-width: 1080px) {
  #tab-wallet
  .treasury-actions-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 900px) {
  #tab-wallet
  .treasury-safety-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  #tab-wallet
  .treasury-safety-card:nth-child(3) {
    border-left: 0;

    border-top:
      1px solid var(--border-soft);
  }

  #tab-wallet
  .treasury-safety-card:nth-child(4) {
    border-top:
      1px solid var(--border-soft);
  }
}


@media (max-width: 680px) {
  #tab-wallet
  .treasury-user-transfer-form {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  .treasury-records-summary {
    align-items: flex-start;
  }
}


@media (max-width: 560px) {
  #tab-wallet
  .treasury-safety-grid {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  .treasury-safety-card {
    border-left: 0;

    border-top:
      1px solid var(--border-soft);
  }

  #tab-wallet
  .treasury-safety-card:first-child {
    border-top: 0;
  }

  #tab-wallet
  .treasury-records-summary > span {
    display: none;
  }
}


@media (prefers-reduced-motion: reduce) {
  #tab-wallet
  .treasury-records-summary::before {
    transition: none;
  }
}

/* End 3J18 Treasury compact workspace v1 */


/* 3J18 Treasury status simplification v1 */

#tab-wallet
.treasury-capability-badge.enabled {
  color: var(--positive);

  border-color:
    rgba(23, 211, 154, .40);

  background:
    rgba(23, 211, 154, .075);
}


#tab-wallet
.treasury-capability-badge.disabled {
  color: var(--warning);

  border-color:
    rgba(250, 190, 80, .42);

  background:
    rgba(250, 190, 80, .065);
}


#tab-wallet
.treasury-message.warning {
  color: var(--warning);

  border-color:
    rgba(250, 190, 80, .38);

  background:
    rgba(250, 190, 80, .055);
}


#tab-wallet
.treasury-action-badges {
  display: flex;

  align-items: center;
  justify-content: flex-end;

  gap: 6px;

  flex-wrap: wrap;
}


#tab-wallet
.treasury-records-badges {
  display: flex;

  align-items: center;

  gap: 6px;

  flex: 0 0 auto;
}


#tab-wallet
.treasury-lock-count.attention {
  color: var(--warning);

  border-color:
    rgba(250, 190, 80, .45);

  background:
    rgba(250, 190, 80, .07);
}


#tab-wallet
.treasury-records-review {
  display: inline-flex;

  align-items: center;

  padding: 4px 7px;

  border:
    1px solid var(--border-soft);

  border-radius: 999px;

  color: var(--muted);

  font-size: .64rem;
}


#tab-wallet
.treasury-records-summary
> .treasury-records-badges {
  margin-left: auto;
}


@media (max-width: 680px) {
  #tab-wallet
  .treasury-action-badges {
    justify-content: flex-start;
  }

  #tab-wallet
  .treasury-records-badges {
    margin-left: 0;

    flex-wrap: wrap;
  }
}

/* End 3J18 Treasury status simplification v1 */


/* 3J18 Treasury final action polish v1 */

#tab-wallet
.treasury-user-transfer-static-field {
  display: flex;

  flex-direction: column;

  gap: 5px;

  min-width: 0;

  color: var(--muted);

  font-size: .71rem;
  font-weight: 550;
}


#tab-wallet
.treasury-user-transfer-static-field > strong {
  display: flex;

  align-items: center;

  min-height: 34px;

  padding: 7px 8px;

  border:
    1px solid var(--border-soft);

  border-radius: 9px;

  background:
    rgba(255, 255, 255, .012);

  color: var(--text);

  font-size: .78rem;
  font-weight: 650;

  overflow-wrap: anywhere;
}


#tab-wallet
.treasury-user-transfer-preview {
  margin-top: 10px;
}


#tab-wallet
.treasury-user-transfer-preview-grid {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 8px;
}


#tab-wallet
.treasury-user-transfer-card {
  min-height: 62px;

  padding: 9px 10px;

  border-radius: 9px;
}


#tab-wallet
.treasury-user-transfer-card > span {
  margin-bottom: 4px;

  font-size: .66rem;
}


#tab-wallet
.treasury-user-transfer-card > strong {
  font-size: .8rem;
}


#tab-wallet
.treasury-user-transfer-review-helpers {
  display: flex;

  align-items: center;

  gap: 6px;

  flex-wrap: wrap;

  margin-top: 8px;
}


#tab-wallet
.treasury-user-transfer-helper {
  display: inline-flex;

  align-items: center;

  min-height: 23px;

  padding: 3px 8px;

  border:
    1px solid var(--border-soft);

  border-radius: 999px;

  font-size: .64rem;
  font-weight: 700;

  letter-spacing: .015em;
}


#tab-wallet
.treasury-user-transfer-helper.success {
  color: var(--positive);

  border-color:
    rgba(23, 211, 154, .38);

  background:
    rgba(23, 211, 154, .065);
}


#tab-wallet
.treasury-user-transfer-helper.warning {
  color: var(--warning);

  border-color:
    rgba(250, 190, 80, .40);

  background:
    rgba(250, 190, 80, .06);
}


#tab-wallet
.treasury-user-transfer-helper-note {
  color: var(--muted);

  font-size: .67rem;
  line-height: 1.35;
}


#tab-wallet
#treasuryWithdrawalAction.has-no-destinations
.treasury-withdrawal-form {
  display: none;
}


@media (max-width: 1180px) {
  #tab-wallet
  .treasury-user-transfer-preview-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}


@media (max-width: 680px) {
  #tab-wallet
  .treasury-user-transfer-preview-grid {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  .treasury-user-transfer-review-helpers {
    align-items: flex-start;
  }
}

/* End 3J18 Treasury final action polish v1 */
/* 3J18 Treasury final form polish v1 */

/* From is account scope, not an editable control. */

#tab-wallet
.treasury-user-transfer-static-field > strong {
  min-height: 0;

  padding: 1px 0 0;

  border: 0;

  border-radius: 0;

  background: transparent;

  font-size: .8rem;
  line-height: 1.35;
}


/* Reset and Review are peer form actions. */

#tab-wallet
.treasury-user-transfer-form
> .treasury-user-transfer-actions {
  display: flex;

  align-items: center;

  gap: 8px;
}


#tab-wallet
#treasuryUserTransferResetButton {
  min-width: 82px;
}


#tab-wallet
#treasuryUserTransferPreviewButton {
  min-width: 140px;
}


/* Compact final confirmation. */

#tab-wallet
.treasury-user-transfer-confirmation {
  margin-top: 8px;

  padding: 9px 10px;

  border-radius: 9px;
}


#tab-wallet
.treasury-user-transfer-confirmation-head {
  display: flex;

  align-items: baseline;

  gap: 8px;

  margin-bottom: 7px;
}


#tab-wallet
.treasury-user-transfer-confirmation-head > strong {
  flex: 0 0 auto;

  font-size: .72rem;
}


#tab-wallet
.treasury-user-transfer-confirmation-head > span {
  min-width: 0;

  color: var(--muted);

  font-size: .66rem;
  line-height: 1.35;
}


#tab-wallet
.treasury-user-transfer-confirmation-row {
  display: grid;

  grid-template-columns:
    minmax(210px, .95fr)
    minmax(210px, 1.2fr)
    auto;

  gap: 7px;

  align-items: center;
}


#tab-wallet
#treasuryUserTransferRequiredConfirmation {
  width: 100%;
  max-width: none;

  margin: 0;

  padding: 7px 8px;

  border-radius: 7px;

  font-size: .68rem;
  line-height: 1.3;
}


#tab-wallet
#treasuryUserTransferConfirmation {
  width: 100%;

  min-height: 34px;

  padding: 7px 9px;
}


#tab-wallet
#executeTreasuryUserTransfer {
  min-height: 34px;

  white-space: nowrap;
}


/*
 * Capability state lives in the action header.
 * Review helpers describe the actual review only.
 */

#tab-wallet
.treasury-user-transfer-review-helpers {
  margin-top: 7px;
}


#tab-wallet
.treasury-user-transfer-helper-note {
  font-size: .65rem;
}


@media (max-width: 880px) {
  #tab-wallet
  .treasury-user-transfer-confirmation-row {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  #executeTreasuryUserTransfer {
    width: 100%;
  }
}


@media (max-width: 680px) {
  #tab-wallet
  .treasury-user-transfer-form
  > .treasury-user-transfer-actions {
    display: grid;

    grid-template-columns: 1fr 1fr;
  }

  #tab-wallet
  #treasuryUserTransferResetButton,

  #tab-wallet
  #treasuryUserTransferPreviewButton {
    width: 100%;
    min-width: 0;
  }

  #tab-wallet
  .treasury-user-transfer-confirmation-head {
    display: block;
  }

  #tab-wallet
  .treasury-user-transfer-confirmation-head > span {
    display: block;

    margin-top: 2px;
  }
}

/* End 3J18 Treasury final form polish v1 */
/* 3J18 Treasury final operational polish v1 */

/* Source scope belongs to the action header. */

#tab-wallet
.treasury-user-transfer-scope {
  display: inline-flex;

  align-items: center;

  gap: 5px;

  min-height: 24px;

  padding: 3px 7px;

  border:
    1px solid var(--border-soft);

  border-radius: 999px;

  background:
    rgba(255, 255, 255, .012);

  color: var(--muted);

  font-size: .62rem;
  font-weight: 650;

  letter-spacing: .025em;
  white-space: nowrap;
}


#tab-wallet
.treasury-user-transfer-scope > strong {
  color: var(--text);

  font-size: .68rem;
  font-weight: 700;

  letter-spacing: 0;
}


/* The operator form is now exactly To / Asset / Amount. */

#tab-wallet
.treasury-user-transfer-form {
  grid-template-columns:
    minmax(170px, 1fr)
    minmax(240px, 1.35fr)
    minmax(130px, .72fr);
}


/* Confirmation is a divider, not another nested panel. */

#tab-wallet
.treasury-user-transfer-confirmation {
  margin-top: 8px;

  padding: 9px 0 0;

  border: 0;
  border-top:
    1px solid var(--border-soft);

  border-radius: 0;

  background: transparent;
}


#tab-wallet
.treasury-user-transfer-confirmation-head {
  margin-bottom: 5px;
}


#tab-wallet
#treasuryUserTransferRequiredConfirmation {
  display: block;

  width: fit-content;
  max-width: 100%;

  margin: 0 0 6px;

  padding: 4px 6px;

  border-radius: 6px;

  background:
    rgba(255, 255, 255, .018);

  color: var(--muted);

  font-size: .64rem;
  line-height: 1.3;

  white-space: normal;
  overflow-wrap: anywhere;
}


#tab-wallet
.treasury-user-transfer-confirmation-row {
  grid-template-columns:
    minmax(0, 1fr)
    auto;

  gap: 7px;
}


#tab-wallet
#treasuryUserTransferConfirmation {
  min-width: 0;
}


#tab-wallet
.treasury-user-transfer-helper-note {
  opacity: .76;
}


@media (max-width: 880px) {
  #tab-wallet
  .treasury-user-transfer-form {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  #tab-wallet
  .treasury-user-transfer-form
  > label:last-of-type {
    grid-column: 1 / -1;
  }
}


@media (max-width: 680px) {
  #tab-wallet
  .treasury-user-transfer-form {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  .treasury-user-transfer-form
  > label:last-of-type {
    grid-column: auto;
  }

  #tab-wallet
  .treasury-user-transfer-confirmation-row {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  .treasury-user-transfer-scope {
    width: fit-content;
  }
}

/* End 3J18 Treasury final operational polish v1 */

/* 3J19 Withdraw approved-destination polish v1 */

/*
 * Compact preparation flow:
 * destination -> verification -> amount/actions -> result.
 */
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-form {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-field {
  min-width: 0;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-summary {
  grid-column: auto;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 9px;
  border-color: var(--border-soft);
  border-radius: 9px;
  background:
    rgba(255, 255, 255, .012);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-summary-field span {
  margin-bottom: 2px;
  font-size: .61rem;
  letter-spacing: .035em;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-summary-field strong {
  font-size: .75rem;
  line-height: 1.25;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-execution-row {
  display: grid;
  grid-template-columns:
    minmax(120px, .7fr)
    auto;
  align-items: end;
  gap: 8px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-amount-field {
  min-width: 0;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-actions {
  grid-column: auto;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-actions .button {
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight {
  margin-top: 8px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-head {
  padding: 8px 9px;
  gap: 8px;
  border-radius:
    9px
    9px
    0
    0;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-head span {
  font-size: .68rem;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  border-radius:
    0
    0
    9px
    9px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid > div {
  padding: 8px 9px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid span {
  margin-bottom: 2px;
  font-size: .62rem;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid strong {
  font-size: .74rem;
  line-height: 1.25;
}


@media (max-width: 760px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-destination-summary {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-execution-row {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-actions {
    justify-content: stretch;
  }
}


@media (max-width: 520px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-destination-summary,
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-preflight-grid {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-actions {
    flex-direction: column;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-actions .button {
    width: 100%;
  }
}

/* End 3J19 Withdraw approved-destination polish v1 */

/* 3J25 Withdraw asset/network/recipient preparation v1 */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-builder {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background:
    rgba(255, 255, 255, .012);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-head strong {
  font-size: .76rem;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-head span,
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-owner {
  color: var(--muted);
  font-size: .64rem;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-grid {
  display: grid;
  grid-template-columns:
    minmax(120px, .8fr)
    minmax(150px, 1fr)
    minmax(220px, 1.45fr);
  align-items: end;
  gap: 7px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-asset {
  grid-column: 1;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-network {
  grid-column: 2;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-recipient {
  grid-column: 3;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-memo {
  grid-column: 1 / 3;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-grid label {
  min-width: 0;
  margin: 0;
  font-size: .65rem;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-grid select,
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-grid input {
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  min-height: 34px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-memo.is-required > span::after {
  content: " *";
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-actions .button {
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}


#tab-wallet
#treasuryWithdrawalAction
#prepareTreasuryWithdrawalDestination {
  flex: 1 1 auto;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-status {
  min-height: 18px;
  margin-top: 7px;
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.35;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-status.error {
  color: var(--negative);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-status.success {
  color: var(--positive);
}


@media (max-width: 980px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-asset {
    grid-column: 1;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-network {
    grid-column: 2;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-recipient {
    grid-column: 1 / 3;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-memo {
    grid-column: 1;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-actions {
    grid-column: 2;
  }
}


@media (max-width: 620px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-head > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-grid {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-asset,
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-network,
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-recipient,
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-memo,
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-actions {
    grid-column: 1;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-actions {
    width: 100%;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-actions .button {
    flex: 1 1 0;
  }
}

/* 3J26 Withdrawal recipient manager v1 */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}


#tab-wallet
#treasuryWithdrawalAction
#manageTreasuryWithdrawalRecipients {
  min-height: 28px;
  padding: 5px 8px;
  font-size: .64rem;
  white-space: nowrap;
}


.treasury-withdrawal-recipient-dialog[open] {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}


.treasury-withdrawal-recipient-content {
  padding: 18px;
}


.treasury-recipient-safety-note {
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.5;
}


.treasury-recipient-safety-note strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}


.treasury-recipient-create-form {
  margin: 0 0 14px;
}


.treasury-recipient-address-note {
  margin: 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.45;
}


.treasury-recipient-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 8px;
}


.treasury-recipient-list-head > span {
  color: var(--muted);
  font-size: .68rem;
}


.treasury-recipient-list {
  display: grid;
  gap: 8px;
}


.treasury-recipient-empty {
  padding: 14px;
  border: 1px dashed var(--border-soft);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  font-size: .72rem;
}


.treasury-recipient-card {
  padding: 11px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-2);
}


.treasury-recipient-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}


.treasury-recipient-card-head > div {
  min-width: 0;
}


.treasury-recipient-address-label,
.treasury-recipient-description > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .65rem;
}


.treasury-recipient-card code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: .72rem;
}


.treasury-recipient-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}


.treasury-recipient-status.active {
  color: var(--positive);
}


.treasury-recipient-status.archived {
  color: var(--muted);
}


.treasury-recipient-description {
  display: block;
  margin-top: 10px;
}


.treasury-recipient-description input {
  width: 100%;
  margin: 0;
}


.treasury-recipient-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 9px;
}


.treasury-recipient-actions .button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: .66rem;
}


@media (max-width: 620px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-route-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .treasury-recipient-card-head {
    flex-direction: column;
  }

  .treasury-recipient-actions {
    justify-content: stretch;
  }

  .treasury-recipient-actions .button {
    flex: 1 1 0;
  }
}

/* 3J27 Withdrawal destination review v1 */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-review-button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: .64rem;
  white-space: nowrap;
}


.treasury-withdrawal-destination-review-dialog[open] {
  width: min(940px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
}


.treasury-withdrawal-destination-review-content {
  padding: 18px;
}


.treasury-destination-review-safety {
  padding: 12px 13px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.5;
}


.treasury-destination-review-safety strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}


.treasury-destination-review-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 9px;
}


.treasury-destination-review-list-head > span {
  color: var(--muted);
  font-size: .68rem;
  text-align: right;
}


.treasury-destination-review-list {
  display: grid;
  gap: 10px;
}


.treasury-destination-review-empty {
  padding: 16px;
  border: 1px dashed var(--border-soft);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  font-size: .73rem;
}


.treasury-destination-review-card {
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: var(--surface-2);
}


.treasury-destination-review-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}


.treasury-destination-review-card-head > div {
  min-width: 0;
}


.treasury-destination-review-card-head span,
.treasury-destination-review-grid span,
.treasury-destination-decision label > span,
.treasury-destination-confirmation > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .65rem;
}


.treasury-destination-review-card code {
  overflow-wrap: anywhere;
}


.treasury-destination-review-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: .61rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}


.treasury-destination-review-status.candidate,
.treasury-destination-review-status.pending-verification {
  color: var(--warning);
}


.treasury-destination-review-status.approved {
  color: var(--positive);
}


.treasury-destination-review-status.revoked {
  color: var(--negative);
}


.treasury-destination-review-status.unknown {
  color: var(--muted);
}


.treasury-destination-review-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}


.treasury-destination-review-grid > div {
  min-width: 0;
}


.treasury-destination-review-grid > .wide {
  grid-column: span 2;
}


.treasury-destination-review-grid strong,
.treasury-destination-review-grid code {
  display: block;
  overflow-wrap: anywhere;
}


.treasury-destination-decision {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--border-soft);
}


.treasury-destination-decision label {
  display: block;
}


.treasury-destination-decision textarea,
.treasury-destination-decision input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 5px;
}


.treasury-destination-decision textarea {
  min-height: 76px;
  resize: vertical;
}


.treasury-destination-confirmation {
  margin-top: 10px;
}


.treasury-destination-confirmation code {
  display: block;
  padding: 7px 8px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, .16);
  font-size: .67rem;
}


.treasury-destination-decision
label + .treasury-destination-confirmation,
.treasury-destination-confirmation
+ .treasury-destination-confirmation,
.treasury-destination-confirmation
+ label {
  margin-top: 10px;
}


.treasury-destination-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}


.treasury-destination-review-actions .button {
  min-height: 31px;
  padding: 5px 9px;
  font-size: .66rem;
}


.treasury-destination-terminal {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.45;
}


@media (max-width: 760px) {
  .treasury-destination-review-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .treasury-destination-review-list-head > span {
    text-align: left;
  }

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


@media (max-width: 520px) {
  .treasury-destination-review-grid {
    grid-template-columns: 1fr;
  }

  .treasury-destination-review-grid > .wide {
    grid-column: auto;
  }

  .treasury-destination-review-card-head {
    flex-direction: column;
  }

  .treasury-destination-review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .treasury-destination-review-actions .button {
    width: 100%;
  }
}
/* 3J28C Withdrawal preflight context v1 */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-context {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  margin-top: -1px;
  color: var(--muted);
  font-size: .69rem;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-context strong {
  min-width: 0;
  color: var(--text);
  font-size: .72rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}


/* 3J39 Withdrawal primary workspace v1 */

/*
 * Withdrawal is the primary Treasury operation.
 *
 * Visual hierarchy only:
 * - no JavaScript behavior changes
 * - no lifecycle changes
 * - no backend changes
 */

#tab-wallet
.treasury-actions-grid
> #treasuryWithdrawalAction {
  grid-column: 1 / -1;

  padding: 18px;

  border:
    1px solid rgba(29, 211, 155, .24);

  border-radius: 14px;

  background:
    radial-gradient(
      circle at 94% 2%,
      rgba(29, 211, 155, .065),
      transparent 28%
    ),
    linear-gradient(
      145deg,
      rgba(17, 31, 27, .72),
      rgba(8, 19, 16, .58)
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .018),
    0 14px 34px rgba(0, 0, 0, .10);
}


#tab-wallet
.treasury-actions-grid
> .treasury-user-transfer-section {
  grid-column: 1 / -1;

  padding: 12px 14px;

  border-color:
    rgba(255, 255, 255, .065);

  background:
    rgba(255, 255, 255, .008);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-section-header {
  align-items: flex-start;

  margin-bottom: 0;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-section-header h3 {
  font-size: 1.04rem;
  letter-spacing: -.012em;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-section-header p {
  max-width: 780px;

  margin-top: 4px;

  font-size: .73rem;
  line-height: 1.5;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-action-badges {
  justify-content: flex-end;

  max-width: 48%;
}


/* ----------------------------------------------------------
 * Three-stage workflow
 * ---------------------------------------------------------- */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-flow {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  margin-top: 14px;

  border-top:
    1px solid rgba(255, 255, 255, .055);

  border-bottom:
    1px solid rgba(255, 255, 255, .055);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-flow-item {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 9px;

  padding: 11px 12px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-flow-item
+ .treasury-withdrawal-flow-item {
  border-left:
    1px solid rgba(255, 255, 255, .055);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-flow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 23px;
  height: 23px;

  border:
    1px solid rgba(29, 211, 155, .30);

  border-radius: 999px;

  background:
    rgba(29, 211, 155, .065);

  color:
    rgba(126, 244, 206, .94);

  font-size: .65rem;
  font-weight: 700;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-flow-item
> div {
  display: flex;
  flex-direction: column;

  min-width: 0;

  gap: 1px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-flow-item strong {
  font-size: .72rem;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-flow-item small {
  overflow: hidden;

  color: var(--muted);

  font-size: .62rem;

  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ----------------------------------------------------------
 * Destination preparation
 * ---------------------------------------------------------- */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-builder {
  margin-top: 14px;

  padding: 13px 14px;

  border-radius: 12px;

  background:
    rgba(255, 255, 255, .014);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-head {
  margin-bottom: 10px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-head strong {
  font-size: .79rem;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-grid {
  gap: 9px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-grid select,
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-grid input {
  min-height: 38px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-actions
.button {
  min-height: 38px;
}


/* ----------------------------------------------------------
 * Approved destination + amount/safety workspace
 * ---------------------------------------------------------- */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-form {
  display: grid;

  grid-template-columns:
    minmax(0, 1.34fr)
    minmax(285px, .66fr);

  align-items: start;

  gap: 10px 16px;

  margin-top: 14px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-field {
  grid-column: 1;
  grid-row: 1;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-field
select {
  min-height: 40px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-summary {
  grid-column: 1;
  grid-row: 2;

  padding: 11px 12px;

  border-radius: 11px;

  background:
    rgba(255, 255, 255, .014);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-context {
  grid-column: 1;
  grid-row: 3;

  min-height: 34px;

  padding: 8px 10px;

  border-radius: 9px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-execution-row {
  grid-column: 2;
  grid-row: 1 / span 3;

  display: grid;

  grid-template-columns: 1fr;

  align-content: start;

  min-width: 0;

  gap: 11px;

  padding: 13px;

  border:
    1px solid rgba(255, 255, 255, .065);

  border-radius: 12px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, .022),
      rgba(255, 255, 255, .009)
    );
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-amount-field {
  width: 100%;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-amount-field
input {
  min-height: 42px;

  font-size: .88rem;

  font-variant-numeric:
    tabular-nums;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-actions {
  display: flex;
  flex-direction: column;

  align-items: stretch;

  gap: 8px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-actions
.button {
  width: 100%;

  min-height: 38px;
}


#tab-wallet
#treasuryWithdrawalAction
#treasuryWithdrawalPreflightButton {
  border-color:
    rgba(29, 211, 155, .28);

  background:
    rgba(29, 211, 155, .065);
}


#tab-wallet
#treasuryWithdrawalAction
#treasuryWithdrawalPreflightButton:not(:disabled):hover {
  background:
    rgba(29, 211, 155, .11);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight {
  margin-top: 12px;

  padding: 12px;

  border-radius: 11px;

  background:
    rgba(255, 255, 255, .012);
}


/* ----------------------------------------------------------
 * Secondary registered-user transfer
 * ---------------------------------------------------------- */

#tab-wallet
.treasury-user-transfer-section
.treasury-section-header {
  margin-bottom: 6px;
}


#tab-wallet
.treasury-user-transfer-section
.treasury-section-header h3 {
  font-size: .82rem;
}


#tab-wallet
.treasury-user-transfer-section
.treasury-section-header p {
  max-width: 760px;

  font-size: .68rem;
}


#tab-wallet
.treasury-user-transfer-section
.treasury-user-transfer-form {
  max-width: 940px;

  margin-top: 9px;
}


/* ----------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------- */

@media (max-width: 960px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-form {
    grid-template-columns: 1fr;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-destination-field,
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-destination-summary,
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-preflight-context,
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-execution-row {
    grid-column: 1;
    grid-row: auto;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-execution-row {
    grid-template-columns:
      minmax(160px, .65fr)
      minmax(260px, 1.35fr);

    align-items: end;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-actions {
    flex-direction: row;
  }
}


@media (max-width: 700px) {
  #tab-wallet
  .treasury-actions-grid
  > #treasuryWithdrawalAction {
    padding: 14px;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-action-badges {
    max-width: none;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-flow {
    grid-template-columns: 1fr;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-flow-item
  + .treasury-withdrawal-flow-item {
    border-top:
      1px solid rgba(255, 255, 255, .055);

    border-left: 0;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-flow-item small {
    white-space: normal;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-execution-row {
    grid-template-columns: 1fr;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-actions {
    flex-direction: column;
  }
}


/* End 3J39 Withdrawal primary workspace v1 */


/* 3J39 Withdrawal clarity polish v1 */

/*
 * Readability / density only.
 * Funding values come from the existing read-only
 * withdrawal-capabilities and preflight responses.
 */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-flow-item {
  padding: 9px 12px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-builder {
  margin-top: 12px;

  padding: 11px 12px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-head {
  margin-bottom: 8px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-form {
  margin-top: 12px;

  gap: 8px 14px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-summary {
  padding: 9px 10px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-context {
  min-height: 30px;

  padding: 6px 8px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-execution-row {
  gap: 9px;

  padding: 11px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary {
  display: grid;

  gap: 8px;

  min-width: 0;

  padding: 9px 10px;

  border:
    1px solid rgba(255, 255, 255, .06);

  border-radius: 9px;

  background:
    rgba(255, 255, 255, .012);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 8px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-head strong {
  color: var(--text);

  font-size: .7rem;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-head span {
  color: var(--muted);

  font-size: .58rem;

  text-align: right;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 1px;

  overflow: hidden;

  border:
    1px solid rgba(255, 255, 255, .045);

  border-radius: 7px;

  background:
    rgba(255, 255, 255, .035);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-grid > div {
  display: flex;
  flex-direction: column;

  gap: 2px;

  min-width: 0;

  padding: 7px 8px;

  background:
    rgba(7, 18, 15, .96);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-grid > div span {
  color: var(--muted);

  font-size: .56rem;

  line-height: 1.2;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-grid > div strong {
  overflow: hidden;

  color: var(--text);

  font-size: .66rem;
  font-variant-numeric:
    tabular-nums;

  text-overflow: ellipsis;
  white-space: nowrap;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-grid
> .is-total strong {
  color: var(--accent);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-note {
  color: var(--muted);

  font-size: .56rem;
  line-height: 1.35;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-empty {
  display: flex;
  flex-direction: column;

  gap: 2px;

  color: var(--muted);

  font-size: .6rem;
  line-height: 1.35;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-empty strong {
  color: var(--text);

  font-size: .68rem;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight {
  margin-top: 10px;

  padding: 10px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-callout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  margin-top: 9px;

  padding: 9px 10px;

  border-radius: 8px;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-callout strong {
  flex: 0 0 auto;

  font-size: .67rem;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-callout span {
  max-width: 760px;

  color: var(--muted);

  font-size: .62rem;
  line-height: 1.4;

  text-align: right;
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-callout.warning {
  border:
    1px solid rgba(245, 183, 65, .20);

  background:
    rgba(245, 183, 65, .045);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-callout.warning strong {
  color:
    rgba(247, 200, 102, .96);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-callout.ready {
  border:
    1px solid rgba(29, 211, 155, .18);

  background:
    rgba(29, 211, 155, .035);
}


#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-callout.ready strong {
  color: var(--accent);
}


@media (max-width: 700px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-funding-summary-grid {
    grid-template-columns: 1fr;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-funding-callout {
    flex-direction: column;

    gap: 4px;
  }


  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-funding-callout span {
    text-align: left;
  }
}


/* End 3J39 Withdrawal clarity polish v1 */


/* 3J39 Withdrawal route auto-match safety v1 */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-status.warning {
  color:
    rgba(247, 200, 102, .96);
}


#tab-wallet
#treasuryWithdrawalAction
#treasuryWithdrawalDestination:disabled {
  opacity: 1;

  color: var(--text);

  cursor: default;

  -webkit-text-fill-color:
    var(--text);
}


#tab-wallet
#treasuryWithdrawalAction
#prepareTreasuryWithdrawalDestination:not(.hidden) {
  border-color:
    rgba(245, 183, 65, .24);

  background:
    rgba(245, 183, 65, .045);
}


/* End 3J39 Withdrawal route auto-match safety v1 */


/* 3J39 Withdrawal visual polish v1 */

/*
 * The Asset / Network / Recipient route is authoritative.
 * #treasuryWithdrawalDestination remains in the DOM as an
 * internal compatibility value for existing lifecycle code,
 * while the matched destination summary is user-facing.
 */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-field {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 500;
  line-height: 1.25;
}

#tab-wallet
#treasuryWithdrawalAction
#treasuryWithdrawalDestination {
  display: none;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-summary {
  margin-top: 0;
  min-height: 0;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-execution-row {
  align-self: start;
}

/* End 3J39 Withdrawal visual polish v1 */

/* 3J39 Withdrawal full-width execution layout v1 */

/*
 * Layout only.
 *
 * Destination matching, preflight behavior, request lifecycle,
 * accounting and Gate write behavior are unchanged.
 */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-form {
  grid-template-columns: 1fr;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-field,
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-summary,
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-context,
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-execution-row {
  grid-column: 1;
  grid-row: auto;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-execution-row {
  grid-template-columns:
    minmax(150px, .55fr)
    minmax(320px, 1.35fr)
    minmax(220px, .8fr);
  align-items: stretch;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-actions {
  align-self: stretch;
  justify-content: center;
}

@media (max-width: 960px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-execution-row {
    grid-template-columns:
      minmax(160px, .65fr)
      minmax(260px, 1.35fr);
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }
}

@media (max-width: 700px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-execution-row {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-actions {
    grid-column: auto;
    flex-direction: column;
  }
}

/* End 3J39 Withdrawal full-width execution layout v1 */


/* 3J39 Withdrawal preflight success hierarchy v1 */

/*
 * Presentation only after a valid preflight.
 * Existing route, preflight and request safety logic is unchanged.
 */

#tab-wallet
#treasuryWithdrawalAction.has-valid-preflight
#treasuryWithdrawalPreflightButton {
  border-color: var(--border-soft);
  background: transparent;
  color: var(--muted);
}

#tab-wallet
#treasuryWithdrawalAction.has-valid-preflight
#treasuryWithdrawalPreflightButton:not(:disabled):hover {
  background:
    rgba(255, 255, 255, .035);
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid
> .is-primary strong {
  font-size: .82rem;
  font-weight: 650;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid
> .is-primary.is-recipient strong {
  color: var(--positive);
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid
> .is-secondary {
  background:
    rgba(8, 19, 16, .86);
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid
> .is-secondary strong {
  font-size: .70rem;
  font-weight: 550;
  color: var(--muted);
}

/* End 3J39 Withdrawal preflight success hierarchy v1 */


/* Wallet Treasury compaction J18 */

#treasuryPanel > .panel-header {
  align-items: center;
  margin-bottom: 9px;
}

#treasuryPanel > .panel-header h2 {
  margin-bottom: 2px;
  font-size: 1rem;
}

#treasuryPanel > .panel-header p {
  margin: 0;
  font-size: .72rem;
}

.treasury-withdrawal-section {
  padding: 12px;
}

.treasury-withdrawal-section .treasury-section-header {
  margin-bottom: 8px;
}

.treasury-withdrawal-section .treasury-section-header p {
  margin: 0;
  font-size: .74rem;
  line-height: 1.45;
}

.treasury-withdrawal-flow {
  margin: 8px 0 10px;
}

.treasury-withdrawal-flow-item {
  min-height: 42px;
  padding: 7px 10px;
}

.treasury-withdrawal-flow-number {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  font-size: .67rem;
}

.treasury-withdrawal-route-builder {
  margin-bottom: 8px;
  padding: 10px 11px;
  border-radius: 11px;
}

.treasury-withdrawal-route-head {
  margin-bottom: 8px;
}

.treasury-withdrawal-route-grid {
  gap: 8px;
}

.treasury-withdrawal-route-grid select,
.treasury-withdrawal-route-grid input {
  min-height: 36px;
}

.treasury-withdrawal-route-status {
  min-height: 0;
  margin-top: 7px;
  padding: 6px 8px;
  font-size: .68rem;
  line-height: 1.4;
}

.treasury-withdrawal-form.hidden {
  display: none;
}

.treasury-withdrawal-form {
  margin-top: 8px;
  padding: 9px 10px;
}

.treasury-withdrawal-destination-summary.hidden {
  display: none;
}

.treasury-withdrawal-destination-summary {
  min-height: 0;
  margin-bottom: 8px;
  padding: 7px 9px;
  gap: 7px;
}

.treasury-withdrawal-execution-row {
  gap: 8px;
  grid-template-columns:
    minmax(145px, .42fr)
    minmax(0, 1fr)
    minmax(210px, .62fr);
}

.treasury-withdrawal-amount-field input {
  min-height: 38px;
}

.treasury-withdrawal-funding-summary {
  min-height: 0;
  padding: 8px 9px;
}

.treasury-withdrawal-funding-summary-empty {
  min-height: 38px;
  padding: 7px;
}

.treasury-withdrawal-actions {
  gap: 6px;
}

.treasury-withdrawal-actions .button {
  min-height: 38px;
}

/*
 * Reuse the existing safety renderer's disabled state:
 * disabled means there is no valid preflight yet.
 */
.treasury-withdrawal-preflight {
  margin-top: 8px;
}

.treasury-footnote {
  margin-top: 8px;
  padding: 7px 9px;
  font-size: .67rem;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .treasury-withdrawal-execution-row {
    grid-template-columns: 1fr;
  }
}

/* End Wallet Treasury compaction J18 */

/* Wallet Transfer review Reset J19 */

#tab-wallet
.treasury-user-transfer-confirmation-row {
  grid-template-columns:
    minmax(210px, .95fr)
    minmax(210px, 1.2fr)
    auto
    auto;
}

#tab-wallet
#treasuryUserTransferReviewResetButton {
  min-width: 82px;
}

@media (max-width: 1180px) {
  #tab-wallet
  .treasury-user-transfer-confirmation-row {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  #treasuryUserTransferReviewResetButton,
  #tab-wallet
  #executeTreasuryUserTransfer {
    width: 100%;
    min-width: 0;
  }
}

/* End Wallet Transfer review Reset J19 */

/* Wallet Withdrawal flattening J19S */

/*
 * The route controls already communicate the three preparation
 * stages. Removing the decorative numbered strip saves height
 * without changing route, preflight or execution state.
 */
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-flow {
  display: none;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-route-builder {
  margin-top: 10px;
}

/*
 * After route preparation, repeat only delivery-specific values.
 * Asset/network remain visible in the route selectors above.
 */
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-summary {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 7px;
  padding: 8px 9px;
}

/*
 * Funding = liquidity constraints.
 * Network is intentionally not repeated here.
 */
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-funding-summary-grid {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 0;
}

/*
 * Preflight = transaction outcome only:
 * gross amount, estimated fee, estimated recipient amount.
 */
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight {
  margin-top: 8px;
  padding: 9px;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
}

@media (max-width: 760px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-destination-summary,
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-funding-summary-grid,
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-preflight-grid {
    grid-template-columns: 1fr;
  }
}

/* End Wallet Withdrawal flattening J19S */


/* Wallet action hierarchy J20C2 */

/*
 * Final transfer confirmation:
 * Reset stays available but no longer competes visually
 * with the money-moving Transfer funds action.
 */
#tab-wallet .treasury-user-transfer-confirmation-row {
  grid-template-columns:
    minmax(260px, 1fr)
    auto
    auto;
  align-items: stretch;
}

#tab-wallet #treasuryUserTransferReviewResetButton {
  width: auto;
  min-width: 92px;
  padding-inline: 12px;
  border-color: var(--border-soft);
  background: transparent;
  color: var(--muted);
}

#tab-wallet
  #treasuryUserTransferReviewResetButton:not(:disabled):hover {
  color: var(--text);
  background: rgba(255, 255, 255, .03);
}

#tab-wallet #executeTreasuryUserTransfer:not(:disabled) {
  border-color: rgba(29, 211, 155, .40);
  background: rgba(29, 211, 155, .12);
}

/*
 * After a valid read-only preflight, creating the request
 * becomes the clear next action. Rerunning preflight remains
 * available as a smaller secondary control.
 */
#tab-wallet
  #treasuryWithdrawalAction.has-valid-preflight
  #createTreasuryWithdrawalRequest {
  order: 1;
  min-height: 42px;
  font-weight: 700;
}

#tab-wallet
  #treasuryWithdrawalAction.has-valid-preflight
  #treasuryWithdrawalPreflightButton {
  order: 2;
  width: auto;
  min-height: 29px;
  align-self: center;
  padding: 4px 10px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 500;
}

#tab-wallet
  #treasuryWithdrawalAction.has-valid-preflight
  #treasuryWithdrawalPreflightButton:not(:disabled):hover {
  border-color: var(--border-soft);
  background: rgba(255, 255, 255, .025);
  color: var(--text);
}

@media (max-width: 760px) {
  #tab-wallet .treasury-user-transfer-confirmation-row {
    grid-template-columns: 1fr;
  }

  #tab-wallet #treasuryUserTransferReviewResetButton,
  #tab-wallet #executeTreasuryUserTransfer {
    width: 100%;
    min-width: 0;
  }

  #tab-wallet
    #treasuryWithdrawalAction.has-valid-preflight
    #treasuryWithdrawalPreflightButton {
    width: 100%;
  }
}

/* End Wallet action hierarchy J20C2 */

/* Wallet withdrawal recipient presentation J20C3 */

#tab-wallet #treasuryWithdrawalRecipient {
  min-width: 0;
  text-overflow: ellipsis;
}

/* End Wallet withdrawal recipient presentation J20C3 */

/* Wallet final verification polish J21E */

/*
 * Transfer final confirmation:
 * make the exact required phrase read as a deliberate
 * verification token without competing with Transfer funds.
 */
#tab-wallet
#treasuryUserTransferRequiredConfirmation {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid rgba(29, 211, 155, .24);
  border-radius: 8px;
  background: rgba(29, 211, 155, .045);
  color: var(--text);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: .73rem;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

#tab-wallet
.treasury-user-transfer-confirmation-head {
  margin-bottom: 6px;
}

#tab-wallet
.treasury-user-transfer-confirmation-head > strong {
  color: var(--text);
  font-weight: 700;
}

#tab-wallet
.treasury-user-transfer-confirmation-head > span {
  opacity: .82;
}

#tab-wallet
#treasuryUserTransferConfirmation {
  border-color: var(--border);
  background: rgba(255, 255, 255, .018);
}

#tab-wallet
#treasuryUserTransferConfirmation:focus {
  border-color: rgba(29, 211, 155, .45);
}


/*
 * Matched Withdrawal destination:
 * keep this compact, but make it read as a verified route
 * rather than another generic field group.
 */
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-destination-summary {
  position: relative;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(29, 211, 155, .16);
  border-left: 2px solid rgba(29, 211, 155, .48);
  border-radius: 9px;
  background: rgba(29, 211, 155, .025);
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-summary-field {
  min-width: 0;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-summary-field span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: .61rem;
  font-weight: 650;
  letter-spacing: .035em;
  text-transform: uppercase;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-summary-field strong {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: .73rem;
  font-weight: 650;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-summary-field:first-child strong {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
}


/*
 * Successful Withdrawal preflight:
 * tighten the status bar and make the recipient outcome
 * the visual endpoint of the three-value summary.
 */
#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight {
  margin-top: 8px;
  padding: 8px;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-head {
  justify-content: flex-start;
  padding: 7px 9px;
  gap: 7px;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-head.valid strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-head.valid strong::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 3px rgba(29, 211, 155, .08);
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-head > span {
  margin-left: auto;
  opacity: .82;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid > div {
  padding: 8px 10px;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid
> .is-primary.is-recipient {
  background: rgba(29, 211, 155, .04);
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid
> .is-primary.is-recipient span {
  color: rgba(29, 211, 155, .72);
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-preflight-grid
> .is-primary.is-recipient strong {
  color: var(--positive);
  font-size: .86rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  #tab-wallet
  #treasuryUserTransferRequiredConfirmation {
    width: 100%;
    box-sizing: border-box;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-preflight-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-preflight-head > span {
    margin-left: 0;
    text-align: left;
  }

  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-summary-field strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* End Wallet final verification polish J21E */


/* Wallet Treasury finishing polish J21O1 */

/*
 * After review exists, the upper form Reset is hidden by
 * renderTreasuryUserTransferPreview(). The final-confirmation
 * Reset remains the single visible reset action.
 */

/*
 * A valid preflight keeps Create withdrawal request primary,
 * while Run preflight again remains clearly actionable.
 */
#tab-wallet
#treasuryWithdrawalAction.has-valid-preflight
#treasuryWithdrawalPreflightButton {
  width: auto;
  min-height: 31px;
  align-self: center;
  padding: 5px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .018);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
}

#tab-wallet
#treasuryWithdrawalAction.has-valid-preflight
#treasuryWithdrawalPreflightButton:not(:disabled):hover {
  border-color: rgba(29, 211, 155, .28);
  background: rgba(29, 211, 155, .045);
  color: var(--text);
}

@media (max-width: 760px) {
  #tab-wallet
  #treasuryWithdrawalAction.has-valid-preflight
  #treasuryWithdrawalPreflightButton {
    width: 100%;
  }
}

/* End Wallet Treasury finishing polish J21O1 */


/* ============================================================
   M4.17B2 — INTERNAL DONATION ATTRIBUTION UI
   ============================================================ */

#tab-wallet
.treasury-user-transfer-donation-option {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  cursor: pointer;
}

#tab-wallet
.treasury-user-transfer-donation-option > input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
  flex: 0 0 auto;
}

#tab-wallet
.treasury-user-transfer-donation-option > span {
  min-width: 0;
}

#tab-wallet
.treasury-user-transfer-donation-option strong,
#tab-wallet
.treasury-user-transfer-donation-option small {
  display: block;
}

#tab-wallet
.treasury-user-transfer-donation-option small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

#tab-wallet
.treasury-user-transfer-donation-card {
  border-color: rgba(23, 211, 154, .4);
}

#tab-wallet
.treasury-donation-attribution-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

#tab-wallet
.treasury-donation-attribution-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

#tab-wallet
.treasury-donation-attribution-head strong {
  display: block;
  margin-bottom: 4px;
}

#tab-wallet
.treasury-donation-attribution-head p {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.45;
}

#tab-wallet
.treasury-donation-attribution-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#tab-wallet
.treasury-donation-attribution-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: .72rem;
  font-weight: 600;
}

#tab-wallet
.treasury-donation-attribution-grid select,
#tab-wallet
.treasury-donation-attribution-grid input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
}

#tab-wallet
.treasury-donation-attribution-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#tab-wallet
.treasury-donation-attribution-status,
#tab-wallet
.treasury-donation-attribution-panel > small {
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}

@media (max-width: 680px) {
  #tab-wallet
  .treasury-donation-attribution-head {
    flex-direction: column;
  }

  #tab-wallet
  .treasury-donation-attribution-grid {
    grid-template-columns: 1fr;
  }

  #tab-wallet
  .treasury-donation-attribution-actions {
    display: grid;
  }

  #tab-wallet
  .treasury-donation-attribution-actions .button {
    width: 100%;
  }
}

/* M4.40 Final withdrawal authorization primary action v1 */

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-authorization-primary-actions {
  margin-top: 10px;
  justify-content: flex-end;
}

#tab-wallet
#treasuryWithdrawalAction
.treasury-withdrawal-authorization-primary-actions
#createTreasuryWithdrawalRequest {
  min-width: 240px;
  max-width: 100%;
}

@media (max-width: 640px) {
  #tab-wallet
  #treasuryWithdrawalAction
  .treasury-withdrawal-authorization-primary-actions
  #createTreasuryWithdrawalRequest {
    width: 100%;
    min-width: 0;
  }
}

/* End M4.40 Final withdrawal authorization primary action v1 */
