/* Recovery stays within the existing VALET palette; accents identify actions and state. */
#modeRecovery {
  --collection-bg: #0d1118;
  --collection-panel: #121820;
  --collection-raised: #171e28;
  --collection-border: #28313e;
  --collection-divider: #232b37;
  --collection-text: #f0f3f7;
  --collection-secondary: #bdc5d1;
  --collection-muted: #969fae;
  --collection-green: #5be0ad;
  --collection-cyan: #81cced;
}

.recovery-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 24px;
}
.collection-eyebrow { color: var(--collection-muted); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.recovery-page-heading h1 { font-size: 28px; font-weight: 650; line-height: 1.25; letter-spacing: -.04em; margin-top: 5px; }
.recovery-page-heading__meta { color: var(--collection-muted); font-size: 12px; padding-bottom: 3px; }

.collection-tool.card {
  padding: 0;
  overflow: visible;
  color: var(--collection-text);
  background: var(--collection-bg);
  border: 1px solid var(--collection-border);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: none;
}
.collection-tool.card:hover { border-color: var(--collection-border); }
.collection-tool [hidden] { display: none !important; }
.collection-tool button, .collection-tool input, .collection-tool select, .collection-tool textarea { font: inherit; }
.collection-tool button, .collection-tool summary, .collection-tool input[type="checkbox"] { -webkit-tap-highlight-color: transparent; }
.collection-tool :is(button, summary, input, select, textarea, a):focus-visible,
.recovery-secondary :is(summary, button, input):focus-visible {
  outline: 2px solid var(--collection-cyan);
  outline-offset: 3px;
}
.collection-tool .form-input { background: #0b1017; border-color: #323d4c; border-radius: 9px; min-height: 44px; color: var(--collection-text); font-size: 13px; }
.collection-tool select.form-input { background-color: #0b1017; }
.collection-tool .form-input::placeholder { color: var(--collection-muted); opacity: 1; }
.collection-tool .form-input:focus { border-color: var(--collection-cyan); box-shadow: none; outline: none; }
.collection-tool .form-input:focus-visible { outline: 2px solid var(--collection-cyan); outline-offset: -1px; }
.collection-tool .form-label { color: var(--collection-secondary); font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 500; margin-bottom: 7px; }
.collection-tool .form-hint { color: var(--collection-muted); font-size: 11px; line-height: 1.55; }
.collection-tool .form-group { margin-bottom: 18px; min-width: 0; }
.collection-tool .btn {
  min-height: 44px;
  border-radius: 9px;
  padding: 10px 17px;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
  box-shadow: none;
}
.collection-tool .btn:disabled { opacity: .48; }
.collection-tool .btn--primary { color: #082016; background: #5be0ad; border: 1px solid #7ae9bf; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .17); }
.collection-tool .btn--primary:hover:not(:disabled) { background: #75ebbf; border-color: #94f1d0; box-shadow: 0 3px 14px rgba(91, 224, 173, .1); transform: none; }
.collection-tool .btn--secondary { color: var(--collection-text); background: #202b38; border: 1px solid #3d4b5d; }
.collection-tool .btn--secondary:hover:not(:disabled) { background: #293749; border-color: #526378; }
.collection-tool .btn--ghost { color: var(--collection-secondary); background: transparent; border-color: var(--collection-border); }
.collection-tool .btn--ghost:hover:not(:disabled) { color: var(--collection-text); background: #202a36; }
.collection-tool .collection-text-button { min-height: 44px; padding: 6px 10px; background: transparent; color: var(--collection-secondary); border: 1px solid transparent; white-space: nowrap; }
.collection-tool .collection-text-button:hover:not(:disabled) { color: var(--collection-text); background: rgba(255, 255, 255, .05); border-color: var(--collection-border); }
.collection-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.collection-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 28px; border-bottom: 1px solid var(--collection-divider); }
.collection-header__eyebrow { display: flex; align-items: center; gap: 7px; color: var(--collection-secondary); font-size: 11px; font-weight: 600; }
.collection-network-dot { flex: 0 0 6px; width: 6px; height: 6px; background: var(--collection-green); border-radius: 50%; }
.collection-network-label { padding: 1px 6px; border: 1px solid var(--collection-border); border-radius: 4px; color: var(--collection-muted); font-size: 10px; font-weight: 500; line-height: 1.5; }
.collection-header h2 { margin-top: 10px; font-size: 24px; line-height: 1.25; letter-spacing: -.035em; font-weight: 600; }
.collection-header__copy > p { margin-top: 7px; color: var(--collection-muted); font-size: 12px; line-height: 1.6; }
.collection-protection { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px 14px; background: rgba(91, 224, 173, .055); border: 1px solid rgba(91, 224, 173, .15); border-radius: 11px; }
.collection-protection strong { display: block; font-size: 12px; font-weight: 600; color: #91e7c3; }
.collection-protection span { display: block; color: var(--collection-secondary); font-size: 10px; margin-top: 2px; }

.collection-setup { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 18px; padding: 24px 28px; }
.collection-panel { min-width: 0; padding: 18px; background: var(--collection-panel); border: 1px solid var(--collection-border); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02); }
.collection-panel-heading, .collection-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.collection-panel-heading h3, .collection-review-heading h3 { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; line-height: 1.45; }
.collection-step { display: inline-flex; justify-content: center; align-items: center; flex: 0 0 22px; width: 22px; height: 22px; border: 1px solid #3b4655; border-radius: 6px; background: #1b2430; color: #b6c4d5; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.collection-count { color: var(--collection-muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.collection-tool .collection-keys { display: block; min-height: 132px; resize: vertical; font-family: Consolas, 'Liberation Mono', monospace; line-height: 1.7; font-size: 12px; }
.collection-source-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 5px; }
.collection-source-footer .form-hint { margin: 0; font-size: 10px; }
.collection-connect-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.collection-tool .collection-connect-row .btn { padding-inline: 16px; }
.collection-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; margin-bottom: 5px; }
.collection-field-heading .form-label { margin: 0; }
.collection-wallet-provider, .collection-wallet-picker > summary { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 9px 12px; border: 1px solid #323d4c; border-radius: 9px; background: #0b1017; }
.collection-wallet-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.collection-wallet-name { color: var(--collection-text); font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection-wallet-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; background: #263044; color: #d3c9f7; font-size: 13px; font-weight: 600; object-fit: contain; }
.collection-wallet-provider[data-unavailable="true"] .collection-wallet-name { white-space: normal; font-size: 11px; color: var(--collection-muted); }
.collection-wallet-picker { position: relative; min-width: 0; }
.collection-wallet-picker > summary { justify-content: space-between; cursor: pointer; list-style: none; }
.collection-wallet-picker > summary::-webkit-details-marker { display: none; }
.collection-wallet-picker > summary:hover, .collection-wallet-picker[open] > summary { border-color: #526378; background: #131b26; }
.collection-wallet-picker > summary[aria-disabled="true"] { cursor: default; opacity: .5; }
.collection-wallet-chevron { flex: 0 0 6px; width: 6px; height: 6px; margin: 0 3px 3px 8px; border-right: 1.5px solid var(--collection-muted); border-bottom: 1.5px solid var(--collection-muted); transform: rotate(45deg); }
.collection-wallet-picker[open] .collection-wallet-chevron { transform: rotate(225deg); margin-bottom: -3px; }
.collection-wallet-choices { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; padding: 5px; border: 1px solid #3b485b; border-radius: 11px; background: #171f2b; box-shadow: 0 12px 32px #0006; }
.collection-wallet-choice { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px; border-radius: 7px; cursor: pointer; }
.collection-wallet-choice:hover, .collection-wallet-choice:focus-within { background: #253246; }
.collection-wallet-choice input { margin: 0 0 0 auto; width: 15px; height: 15px; accent-color: var(--collection-green); }
.collection-tool .collection-inline-button { align-self: stretch; padding: 0 3px; background: transparent; border: 0; color: var(--collection-cyan); cursor: pointer; font-size: 10px; }
.collection-inline-button:hover { text-decoration: underline; }
.collection-tool .collection-recipient { font-family: Consolas, 'Liberation Mono', monospace; font-size: 11px; }
.collection-tool .collection-recipient::placeholder { font-family: Inter, sans-serif; font-size: 11px; }
.collection-payer { color: var(--collection-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.collection-payer[data-connected="true"] { color: var(--collection-green); }
.collection-recipient-field { margin-bottom: 0 !important; }
.collection-payer-modes { display: flex; gap: 4px; padding: 4px; margin-bottom: 13px; border: 1px solid var(--collection-border); border-radius: 9px; background: #0b1017; }
.collection-payer-modes button { flex: 1; min-height: 40px; padding: 7px 10px; border: 1px solid transparent; border-radius: 6px; color: var(--collection-secondary); background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.collection-payer-modes button[aria-pressed="true"] { color: var(--collection-text); border-color: #3b485b; background: #202b38; }
.collection-payer-modes button span { display: block; color: var(--collection-muted); font-size: 9px; }
.collection-payer-modes button:disabled { opacity: .5; cursor: default; }
.collection-payer-modes button:focus-visible { outline: 2px solid var(--collection-cyan); outline-offset: 2px; }
.collection-tool .collection-payer-key { font-family: Consolas, 'Liberation Mono', monospace; font-size: 11px; }
.collection-help { border-top: 1px solid var(--collection-divider); margin-top: 7px; padding-top: 3px; }
.collection-help > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: var(--collection-muted); font-size: 11px; list-style: none; }
.collection-help > summary::before { content: '+'; font-size: 14px; width: 10px; color: var(--collection-secondary); }
.collection-help[open] > summary::before { content: '−'; }
.collection-help > summary::-webkit-details-marker { display: none; }
.collection-help > summary:hover { color: var(--collection-text); }
.collection-help__body { color: var(--collection-secondary); font-size: 11px; line-height: 1.7; padding: 4px 0 7px; }
.collection-help__body p + p { margin-top: 10px; }

.collection-review { padding: 0 28px 22px; }
.collection-review-heading { margin-bottom: 14px; }
.collection-review-heading__hint { font-size: 10px; color: var(--collection-muted); }
.collection-scopes { display: flex; flex-wrap: wrap; gap: 6px; }
.collection-tool .collection-scope-button { color: var(--collection-secondary); background: transparent; border: 1px solid var(--collection-border); padding: 8px 13px; font-size: 11px; }
.collection-tool .collection-scope-button:hover:not(:disabled) { background: var(--collection-raised); border-color: #465669; }
.collection-tool .collection-scope-button[aria-pressed="true"] { color: #a2eecf; background: #16342c; border-color: #38725c; }
.collection-scope-hint { margin: -6px 0 0; color: var(--collection-secondary); font-size: 11px; line-height: 1.6; }
.collection-tool #collectionPreview { display: grid; gap: 14px; max-height: none; overflow: visible; margin: 0; }
.collection-wallet-list { display: grid; grid-auto-rows: max-content; align-content: start; gap: 10px; height: 460px; max-height: 60dvh; min-height: 240px; padding: 2px 6px 2px 2px; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #4a5d70 #101720; border-radius: 10px; }
.collection-wallet-list:focus-visible { outline: 2px solid var(--collection-cyan); outline-offset: 4px; }
.collection-preview:empty { display: flex !important; align-items: center; justify-content: center; flex-direction: column; min-height: 112px; padding: 20px; border: 1px dashed #344050; border-radius: 11px; background: #0b1017; text-align: center; }
.collection-preview:empty::before { content: 'Ready to scan'; color: var(--collection-secondary); font-size: 13px; font-weight: 500; }
.collection-preview:empty::after { content: 'Choose a fee payer and add source wallets to preview assets.'; margin-top: 4px; color: var(--collection-muted); font-size: 11px; }
.collection-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.collection-metric { min-width: 0; padding: 14px 15px; border-radius: 10px; background: #151c26; border: 1px solid #303b4a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025); }
.collection-metric-label { display: block; color: var(--collection-muted); font-size: 10px; font-weight: 500; letter-spacing: .01em; }
.collection-metric-value { display: block; max-width: 100%; margin-top: 6px; color: var(--collection-text); font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: normal; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.collection-metric-hint { display: block; margin-top: 4px; color: var(--collection-muted); font-size: 10px; }
.collection-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--collection-secondary); font-size: 11px; }
.collection-toolbar > :first-child { margin-right: auto; }
.collection-toolbar .btn { min-height: 44px; padding: 6px 10px; font-size: 11px; }
.collection-toolbar .form-input, .collection-filter { max-width: 270px; min-height: 36px; }
.collection-tool .collection-filter { padding: 7px 10px; font-size: 11px; }
.collection-selection-summary { color: var(--collection-secondary); font-size: 11px; }
.collection-review-summary, .collection-overview { color: var(--collection-secondary); font-size: 12px; line-height: 1.65; }
.collection-empty { padding: 24px 20px; border: 1px dashed #344050; border-radius: 10px; background: #0b1017; color: var(--collection-muted); font-size: 12px; line-height: 1.65; text-align: center; }
.collection-empty strong { display: block; color: var(--collection-text); font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.collection-empty > span { display: block; margin-top: 4px; color: var(--collection-muted); font-size: 11px; }
.collection-empty p { margin-top: 4px; }

.collection-wallet-card { min-width: 0; border: 1px solid #303b4a; border-radius: 11px; background: #101720; overflow: hidden; }
.collection-wallet-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 58px; padding: 12px 16px; cursor: pointer; list-style: none; background: #171f2a; }
.collection-wallet-summary::-webkit-details-marker { display: none; }
.collection-wallet-summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid var(--collection-muted); border-bottom: 1.5px solid var(--collection-muted); transform: rotate(-45deg); flex: 0 0 6px; margin-right: 4px; }
.collection-wallet-card[open] > .collection-wallet-summary::before { transform: rotate(45deg) translateY(-2px); }
.collection-wallet-summary:hover { background: #1c2734; }
.collection-wallet-summary > :last-child { margin-left: auto; }
.collection-wallet-summary > span:not(.collection-chip):not(.collection-address) { color: var(--collection-muted); font-size: 11px; }
.collection-wallet-select { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; min-width: 44px; min-height: 44px; margin: -5px -6px -5px 0; cursor: pointer; }
.collection-wallet-title { color: var(--collection-text); font-size: 12px; font-weight: 600; }
.collection-wallet-meta { color: var(--collection-muted); font-size: 11px; }
.collection-wallet-body { padding: 2px 16px 12px; border-top: 1px solid var(--collection-border); }
.collection-wallet-actions { display: flex; align-items: center; gap: 6px; padding: 8px 0; }
.collection-wallet-actions .btn { min-height: 44px; padding: 6px 10px; font-size: 10px; }
.collection-wallet-details, .collection-operation-detail { color: var(--collection-muted); font-size: 10px; line-height: 1.65; }
.collection-wallet-details { padding: 9px 0; }
.collection-wallet-details > summary, .collection-operation-detail > summary { min-height: 44px; cursor: pointer; color: var(--collection-secondary); }
.collection-address { font-family: Consolas, 'Liberation Mono', monospace; font-size: 11px; overflow-wrap: anywhere; }
.collection-tool a { color: var(--collection-cyan); text-decoration: none; }
.collection-tool a:hover { color: #b9e5f9; text-decoration: underline; }
.collection-operation { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 12px; min-width: 0; padding: 7px 0; border-top: 1px solid var(--collection-divider); }
.collection-wallet-body > .collection-operation:first-child { border-top: 0; }
.collection-operation-main { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; line-height: 1.5; cursor: pointer; }
.collection-operation-check { display: flex; align-items: center; flex: 0 0 20px; min-height: 28px; }
.collection-tool input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 16px; accent-color: var(--collection-green); cursor: pointer; }
.collection-operation input:disabled { cursor: default; opacity: .6; }
.collection-operation-label { display: block; min-width: 0; flex: 1; color: var(--collection-text); font-size: 12px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.collection-operation-label strong { font-weight: 550; font-variant-numeric: tabular-nums; }
.collection-operation-label small { display: block; color: var(--collection-muted); font-size: 10px; margin-top: 2px; }
.collection-operation-detail { margin: 0; }
.collection-operation-detail > summary { display: flex; align-items: center; gap: 7px; font-size: 10px; list-style: none; }
.collection-operation-detail > summary::-webkit-details-marker { display: none; }
.collection-operation-detail > summary::before { content: '+'; font-size: 13px; width: 8px; }
.collection-operation-detail[open] > summary::before { content: '−'; }
.collection-operation > .collection-operation-detail[open] { grid-column: 1 / -1; }
.collection-operation-detail dl { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 7px 12px; padding: 4px 0 13px; }
.collection-operation-detail dt { color: var(--collection-muted); }
.collection-operation-detail dd { color: var(--collection-secondary); margin: 0; }
.collection-preview > .collection-operation-detail { padding: 0 12px; border: 1px solid var(--collection-border); border-radius: 8px; }
.collection-operation-detail .collection-address { font-size: 10px; }
.collection-chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 3px 7px; border-radius: 5px; background: #243040; border: 1px solid #354356; color: #c2ccda; font-size: 10px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.collection-status-confirmed, .collection-status-success, .collection-status-complete { color: #90e8c3; border-color: #2c6955; background: #152e25; }
.collection-status-pending, .collection-status-warning, .collection-status-unknown, .collection-status-retry { color: #f2cf82; border-color: #6e592d; background: #302819; }
.collection-status-failed, .collection-status-error, .collection-status-expired { color: #ffb2b2; border-color: #794345; background: #351f23; }
.collection-status-skipped { color: var(--collection-secondary); border-color: #424e60; background: #232b38; }
.collection-position { margin: 10px 0 0; padding: 12px; background: #0b111a; border: 1px solid #2b3644; border-radius: 8px; }
.collection-position-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--collection-secondary); font-size: 11px; }
.collection-position-heading strong { font-weight: 500; }
.collection-position-heading label { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.collection-position-heading label > span:not(.collection-address) { color: var(--collection-muted); }
.collection-position-actions { padding-top: 5px; }
.collection-position-actions .collection-operation { padding: 10px 0; }
.collection-position > .collection-operation { grid-template-columns: minmax(0, 1fr); }
.collection-status-warning:not(.collection-chip):not(#collectionStatus) { padding: 10px 12px; border: 1px solid #6e592d; border-radius: 8px; font-size: 11px; line-height: 1.65; }
.collection-status-warning > .btn { margin: 8px 0 0; }
.collection-skip-list { color: var(--collection-muted); padding: 10px 12px; margin-top: 12px; background: #151d26; border-radius: 8px; font-size: 11px; }
.collection-skip-list > summary { cursor: pointer; min-height: 44px; }
.collection-skip-list > :not(summary) { margin-top: 6px; }
.collection-tool .warning { color: #f2cf82; }

.collection-scan-action { display: flex; align-items: center; gap: 12px; }
.collection-actionbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--collection-border); }
.collection-actionbar__context { min-width: 0; }
#collectionSelection { display: block; font-size: 12px; font-weight: 600; color: var(--collection-text); line-height: 1.5; font-variant-numeric: tabular-nums; }
.collection-actionbar__hint { display: block; margin-top: 3px; color: var(--collection-muted); font-size: 10px; }
.collection-actionbar__buttons { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.collection-actionbar__buttons .btn--primary { min-width: 146px; }
.collection-feedback { padding: 14px 28px 18px; }
#collectionStatus { padding: 0 0 0 11px; border-left: 2px solid #53677d; color: var(--collection-secondary); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
#collectionStatus.collection-status-error, #collectionStatus.collection-status-warning, #collectionStatus.collection-status-success,
#collectionStatus.collection-status-complete, #collectionStatus.collection-status-retry { padding: 10px 12px; border: 1px solid; border-radius: 7px; }
#collectionStatus.collection-status-error { color: #ffb2b2; border-color: #794345; }
#collectionStatus.collection-status-success, #collectionStatus.collection-status-complete { color: #90e8c3; border-color: #2c6955; }
#collectionStatus.collection-status-warning, #collectionStatus.collection-status-retry { color: #f2cf82; border-color: #6e592d; }
#collectionStatus.collection-status-preparing, #collectionStatus.collection-status-signing,
#collectionStatus.collection-status-confirming, #collectionStatus.collection-status-scanning { color: #b2def1; border-left-color: var(--collection-cyan); }
.collection-progress { margin: 0 0 12px; }
.collection-progress-label { display: flex; align-items: center; justify-content: space-between; color: var(--collection-secondary); font-size: 11px; font-variant-numeric: tabular-nums; margin-bottom: 7px; }
.collection-progress-track { height: 5px; overflow: hidden; border-radius: 3px; background: #263442; }
.collection-progress-fill { display: block; height: 100%; background: var(--collection-green); border-radius: 3px; transition: width 180ms ease; }
.collection-history { border-top: 1px solid var(--collection-border); border-radius: 0 0 18px 18px; }
.collection-history > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; padding: 16px 28px; color: var(--collection-secondary); font-size: 12px; font-weight: 500; }
.collection-history > summary::-webkit-details-marker { display: none; }
.collection-history > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid var(--collection-muted); border-bottom: 1.5px solid var(--collection-muted); transform: rotate(45deg); margin-left: auto; }
.collection-history[open] > summary::after { transform: rotate(225deg); }
.collection-history > summary:hover { color: var(--collection-text); }
.collection-history__subtitle { color: var(--collection-muted); font-size: 10px; font-weight: 400; }
.collection-history__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 28px 8px; color: var(--collection-muted); font-size: 11px; }
.collection-tool #collectionRecent { max-height: 380px; overflow: auto; padding: 0 28px 18px; }
.collection-history-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 11px 0; border-top: 1px solid var(--collection-divider); font-family: Inter, sans-serif; font-size: 11px; }
.collection-history-row > :last-child { margin-left: auto; }
.collection-history-actions { display: flex; align-items: center; gap: 8px; }
.collection-history-actions .btn { min-height: 44px; padding: 6px 9px; font-size: 10px; }

.recovery-other-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 1px 12px; }
.recovery-other-heading h2 { color: var(--collection-secondary); font-size: 12px; font-weight: 500; }
.recovery-other-heading > span { color: var(--collection-muted); font-size: 10px; }
.recovery-secondary.card { padding: 0; margin-bottom: 10px; background: #0c1017; border-color: #29313e; border-radius: 12px; box-shadow: none; backdrop-filter: none; }
.recovery-secondary > summary { display: flex; align-items: center; gap: 14px; min-height: 76px; list-style: none; padding: 16px 20px; cursor: pointer; }
.recovery-secondary > summary::-webkit-details-marker { display: none; }
.recovery-secondary > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid var(--collection-muted); border-bottom: 1.5px solid var(--collection-muted); transform: rotate(45deg); flex: 0 0 6px; }
.recovery-secondary[open] > summary::after { transform: rotate(225deg); }
.recovery-secondary > summary:hover { background: #121923; }
.recovery-secondary h3 { font-size: 12px; font-weight: 500; color: var(--collection-secondary); }
.recovery-secondary summary p { font-size: 10px; color: var(--collection-muted); margin-top: 3px; }
.recovery-secondary__tag { margin-left: auto; padding: 2px 6px; color: var(--collection-muted); font-size: 10px; background: #19212c; border: 1px solid #303b4a; border-radius: 4px; }
.recovery-secondary__body { padding: 20px; border-top: 1px solid var(--collection-border); }
.recovery-secondary__body > .ops-toolbar { margin-top: 0; }
.recovery-secondary .form-hint { color: var(--collection-muted); }
.recovery-secondary #recoveryList { margin-top: 18px; }
.recovery-secondary .grid-2 { margin-top: 18px; }

@media (max-width: 900px) {
  .collection-header { align-items: flex-start; gap: 18px; }
  .collection-protection { padding: 10px; }
  .collection-protection span { max-width: 140px; }
  .collection-setup { gap: 12px; padding-inline: 22px; }
  .collection-panel { padding: 15px; }
  .collection-review, .collection-feedback { padding-inline: 22px; }
  .collection-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .collection-wallet-list { height: 380px; max-height: 55dvh; }
  .recovery-page-heading { margin-bottom: 18px; }
  .recovery-page-heading h1 { font-size: 25px; }
  .recovery-page-heading__meta { display: none; }
  .collection-header { padding: 22px; flex-wrap: wrap; }
  .collection-header h2 { font-size: 22px; }
  .collection-protection { width: 100%; gap: 9px; padding: 9px 11px; }
  .collection-protection > div { display: flex; align-items: center; flex-wrap: wrap; column-gap: 9px; }
  .collection-protection span { max-width: none; margin: 0; }
  .collection-setup { grid-template-columns: minmax(0, 1fr); padding-top: 18px; padding-bottom: 20px; }
  .collection-panel { padding: 16px; }
  .collection-tool .collection-keys { min-height: 114px; }
  .collection-tool .form-input { font-size: 16px; }
  .collection-tool .collection-recipient { font-size: 16px; }
  .collection-review-heading { align-items: center; gap: 8px; }
  .collection-scan-action { gap: 6px; }
  .collection-review-heading__hint { display: none; }
  .collection-actionbar { gap: 12px; flex-wrap: wrap; }
  .collection-actionbar__context { width: 100%; }
  .collection-actionbar__buttons { width: 100%; }
  .collection-actionbar__buttons .btn { width: 100%; }
  .collection-actionbar__buttons .btn--primary { min-width: 0; }
  .collection-toolbar { gap: 6px; }
  .collection-toolbar > :first-child { width: 100%; margin: 0 0 2px; }
  .collection-toolbar .collection-filter { width: 100%; max-width: none; }
  .collection-wallet-summary { padding: 12px; gap: 8px; }
  .collection-wallet-body { padding-inline: 12px; }
  .collection-operation { display: block; }
  .collection-operation-main { width: 100%; }
  .collection-operation-label { max-width: 100%; overflow-wrap: normal; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .collection-operation-detail { margin-left: 24px; }
  .collection-preview > .collection-operation-detail, .collection-position > .collection-operation-detail { margin-left: 0; }
  .collection-operation-detail dl { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .collection-operation-detail dd + dt { margin-top: 7px; }
  .collection-history > summary { padding: 16px 22px; }
  .collection-history__subtitle { display: none; }
  .collection-history__toolbar, .collection-tool #collectionRecent { padding-inline: 22px; }
  .collection-history-row > :last-child { margin-left: 0; }
  .recovery-secondary > summary { padding: 15px 16px; }
  .recovery-secondary__body { padding: 16px; }
  .recovery-secondary .ops-toolbar .form-group { min-width: 0 !important; width: 100%; }
}

@media (max-width: 420px) {
  .collection-header, .collection-setup, .collection-review, .collection-feedback { padding-left: 15px; padding-right: 15px; }
  .collection-header { gap: 15px; }
  .collection-panel { padding: 13px; }
  .collection-panel-heading h3, .collection-review-heading h3 { font-size: 12px; gap: 7px; }
  .collection-source-footer { align-items: flex-start; }
  .collection-source-footer .form-hint { padding-top: 8px; max-width: 175px; }
  .collection-metrics { gap: 7px; }
  .collection-metric { padding: 12px; }
  .collection-metric-value { font-size: 17px; }
  .collection-operation-main { gap: 8px; flex-wrap: wrap; }
  .collection-operation-main > .collection-chip { margin-left: 24px; }
  .collection-history > summary, .collection-history__toolbar, .collection-tool #collectionRecent { padding-left: 15px; padding-right: 15px; }
  .recovery-secondary__tag { display: none; }
  .recovery-secondary > summary::after { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .collection-tool *, .recovery-secondary * { transition: none !important; animation: none !important; }
}

/* Public execution details stay compact; source and payer secrets never enter this view. */
.collection-nft-outcome { color: var(--collection-muted); font-size: 10px; line-height: 1.65; margin: 3px 0 9px; max-width: 70ch; }
.collection-operation-state { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px 12px; margin: -2px 0 5px 26px; color: var(--collection-muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.collection-operation-state .collection-transaction { white-space: nowrap; }
.collection-progress-time { color: var(--collection-muted); font-size: 10px; }
.collection-current-step { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; color: var(--collection-secondary); font-size: 11px; }
.collection-current-step strong { font-size: 11px; font-weight: 550; }
.collection-current-time { color: var(--collection-muted); font-size: 10px; }
.collection-wait-note { flex-basis: 100%; color: #f2cf82; font-size: 10px; }
.collection-activity { margin-top: 12px; border: 1px solid var(--collection-border); border-radius: 8px; overflow: hidden; background: #0b1017; }
.collection-activity > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--collection-secondary); font-size: 11px; cursor: pointer; list-style: none; }
.collection-activity > summary::-webkit-details-marker { display: none; }
.collection-activity > summary::before { content: '+'; color: var(--collection-muted); }
.collection-activity[open] > summary::before { content: '−'; }
.collection-activity-list { max-height: 260px; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #4a5d70 #101720; padding: 0 12px 8px; }
.collection-activity-row { display: grid; grid-template-columns: 62px 105px minmax(0, 1fr); align-items: start; gap: 8px; border-top: 1px solid var(--collection-divider); padding: 10px 0; color: var(--collection-secondary); font-size: 10px; line-height: 1.6; }
.collection-activity-row time { font-variant-numeric: tabular-nums; color: var(--collection-muted); }
.collection-activity-row .collection-chip { justify-self: start; font-size: 9px; }
.collection-activity-message { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; min-width: 0; overflow-wrap: anywhere; }
.collection-activity-message strong { font-weight: 550; color: var(--collection-text); }
.collection-activity-message > span:not(.collection-address) { flex-basis: 100%; color: var(--collection-muted); }
.collection-status-failed, .collection-status-expired { color: #ffb2b2; }
.collection-status-retry, .collection-status-expiry_wait, .collection-status-unknown { color: #f2cf82; }
.collection-status-preparing, .collection-status-signing, .collection-status-submitting, .collection-status-submitted, .collection-status-renewing { color: var(--collection-cyan); }
@media (max-width: 600px) {
  .collection-activity-row { grid-template-columns: 60px minmax(0, 1fr); gap: 5px 8px; }
  .collection-activity-message { grid-column: 1 / -1; }
  .collection-current-step { align-items: baseline; }
}

.collection-history-detail { flex-basis: 100%; margin-left: 0 !important; }
.collection-history-detail > summary { min-height: 32px; }

.collection-current-description { flex-basis: 100%; color: var(--collection-muted); font-size: 10px; line-height: 1.6; }
