/* The prototype sheets are copied byte for byte. Adapt only the existing
   authenticated frame and real states absent in the demo. */
/* Account navigation retains legacy CSS in kael-compatibility. Its !important
   sticky rules outrank unlayered !important rules, so override in that layer.
   The shared frame reserves 248px for .kael-sidebar; native pages use
   .account-sidebar and must keep that sidebar out of the main panel's flow. */
@layer kael-compatibility {
  body.account-page .native-account-shell .account-sidebar .account-subnav { padding:0 8px 0 28px!important; }
  @media(min-width:901px) {
    body.account-page .native-account-shell>.account-sidebar { position:absolute!important; inset:0 auto 0 0!important; width:248px!important; height:100%!important; max-height:100%; margin:0!important; }
    html[dir="rtl"] body.account-page .native-account-shell>.account-sidebar { inset:0 0 0 auto!important; }
  }
}
.native-account-shell .transfer-fields { padding:0; margin:0; border:0; min-width:0; }
.native-account-shell .transfer-fields:disabled { opacity:.65; }
.native-account-shell .transfer-receipt { margin-top:24px; padding-top:20px; border-top:1px solid #eceef1; font-size:13px; overflow-wrap:anywhere; }
.native-account-shell .transfer-records td:not([colspan]) { height:auto; padding:16px 10px; text-align:start; }
.native-account-shell .transfer-confirm+.transfer-confirm { margin-inline-start:12px; }
.native-account-shell .modal-backdrop { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:20px; background:#11101680; }
.native-account-shell .transfer-review { box-sizing:border-box; width:min(440px,100%); padding:28px; border-radius:18px; background:#fff; color:#20242b; }
.native-account-shell .transfer-review h2 { margin-top:0; font-size:20px; }
.native-account-shell .transfer-review p { overflow-wrap:anywhere; font-size:14px; }
.native-account-shell dialog.transfer-review { border:0; max-height:85vh; overflow:auto; }
.native-account-shell dialog.transfer-review::backdrop { background:#11101680; }
.native-account-shell .wallet-native-address code { display:block; margin:18px 0; overflow-wrap:anywhere; font-size:12px; }
.native-account-shell .wallet-native-qr { display:block; width:232px; height:232px; max-width:100%; object-fit:contain; }
.native-account-shell .wallet-private-image { display:block; max-width:100%; max-height:260px; object-fit:contain; margin:12px 0; }
.native-account-shell .wallet-native-form textarea { box-sizing:border-box; width:100%; min-height:90px; margin-top:8px; padding:11px 13px; border:1px solid #e3e8ef; border-radius:8px; background:#f8f9fb; font:inherit; }
.native-account-shell .wallet-amount-summary,
.native-account-shell .transfer-account-summary { margin:16px 0; padding:8px 16px; border-radius:12px; background:#f7f8fa; color:#485260; font-size:13px; }
.native-account-shell :is(.wallet-amount-summary, .transfer-account-summary)>div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 16px; align-items:baseline; padding:9px 0; }
.native-account-shell :is(.wallet-amount-summary, .transfer-account-summary)>div+div { border-top:1px solid #e8ecf1; }
.native-account-shell :is(.wallet-amount-summary, .transfer-account-summary) dd { margin:0; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.native-account-shell .transfer-account-summary .transfer-account-purpose { grid-column:1/-1; color:#687382; font-size:11px; }
.native-account-shell .wallet-tips a+a { margin-inline-start:14px; }
.native-account-shell .wallet-native-form .wallet-form-link { margin:12px 0; }
.native-account-shell .wallet-address-book input { display:block; width:100%; margin:8px 0; box-sizing:border-box; }
.native-account-shell .wallet-address-book label span { color:#465365; font-size:12px; }
.native-account-shell .wallet-hash { max-width:220px; overflow-wrap:anywhere; }
.native-account-shell .transfer-table-wrap { overflow-x:auto; }
.native-account-shell .wallet-records table { width:100%; border-collapse:collapse; font-size:12px; }
.native-account-shell .wallet-records :is(th,td) { padding:16px 10px; text-align:start; border-bottom:1px solid #edf0f3; }
.native-account-shell .wallet-records header { display:flex; align-items:center; justify-content:space-between; }
/* Keep the prototype's desktop table and labelled narrow-screen cards. */
.native-account-shell .wallet-deposit-records { container:wallet-deposits / inline-size; }
.native-account-shell .wallet-deposit-table { table-layout:fixed; color:#343c47; line-height:1.6; }
.native-account-shell .wallet-deposit-table th { color:#939ba6; font-weight:400; }
.native-account-shell .wallet-deposit-table th:nth-child(1) { width:14%; }
.native-account-shell .wallet-deposit-table th:nth-child(2) { width:9%; }
.native-account-shell .wallet-deposit-table th:nth-child(3) { width:22%; }
.native-account-shell .wallet-deposit-table th:nth-child(4) { width:11%; }
.native-account-shell .wallet-deposit-table th:nth-child(5) { width:26%; }
.native-account-shell .wallet-deposit-table th:nth-child(6) { width:18%; }
.native-account-shell .wallet-deposit-table td { vertical-align:top; }
.native-account-shell .wallet-deposit-table .wallet-record-value { display:block; min-width:0; overflow-wrap:anywhere; }
.native-account-shell .wallet-record-amount { font-weight:500; font-variant-numeric:tabular-nums; }
.native-account-shell .wallet-record-routing { display:block; margin-top:4px; color:#939ba6; font-size:11px; line-height:1.6; }
.native-account-shell .wallet-record-routing a { color:#8b7532; text-decoration:underline; text-underline-offset:2px; }
.native-account-shell .wallet-deposit-table .wallet-hash { max-width:none; }
.native-account-shell .wallet-record-hash { font-variant-numeric:tabular-nums; }
.native-account-shell .wallet-deposit-records .wallet-pagination:empty { display:none; }
@container wallet-deposits (max-width:720px) {
  .native-account-shell .wallet-deposit-table-wrap { overflow:visible; }
  .native-account-shell .wallet-deposit-table { display:block; }
  .native-account-shell .wallet-deposit-table thead { display:none; }
  .native-account-shell .wallet-deposit-table tbody { display:grid; gap:12px; width:100%; }
  .native-account-shell .wallet-deposit-table tbody tr { display:block; padding:12px; border:1px solid #edf0f4; border-radius:12px; background:#f8f9fb; }
  .native-account-shell .wallet-deposit-table td[data-label] { display:flex; justify-content:space-between; gap:14px; padding:7px 0; border:0; text-align:end; }
  .native-account-shell .wallet-deposit-table td[data-label]::before { content:attr(data-label); flex:0 0 78px; color:#929dad; text-align:start; }
  .native-account-shell .wallet-deposit-table .wallet-record-value { flex:1; text-align:end; }
}
.native-account-shell button.wallet-address-link { padding:0; border:0; background:none; cursor:pointer; }
.native-account-shell .wallet-pagination { display:flex; gap:16px; margin-top:18px; }
.native-account-shell .wallet-request-row { display:block; width:100%; padding:12px 0; text-align:start; border:0; border-bottom:1px solid #edf0f3; background:none; font:inherit; cursor:pointer; }
.native-account-shell .wallet-request-history { margin-top:24px; font-size:12px; }
.native-account-shell .wallet-request-empty { padding:16px 0; color:#687382; text-align:center; }
.native-account-shell .wallet-request-empty p { margin:0; }
.native-account-shell .wallet-request-detail { padding:18px 0; font-size:12px; overflow-wrap:anywhere; }
.native-account-shell .wallet-request-detail>code { display:block; margin:12px 0; }
.native-account-shell .wallet-active-order { margin-top:18px; padding:12px 16px; border-radius:9px; background:#f7f8fa; font-size:12px; }
.native-account-shell .wallet-active-order :is(p,.wallet-address-link) { margin:0; }
.native-account-shell .verification-consent { display:flex; gap:10px; align-items:flex-start; }
.native-account-shell .verification-consent input { width:16px; height:16px; margin:2px 0; flex:none; }
.native-account-shell .verification-consent input[type="checkbox"]:focus:not(:focus-visible) { outline:none; }
.native-account-shell .verification-consent input[type="checkbox"]:focus-visible { outline:2px solid #536582; outline-offset:2px; }
.native-account-shell .verification-form button:enabled:not(.wallet-address-link) { background:#ecd078; color:#35312a; cursor:pointer; }
.native-account-shell .verification-form button.wallet-address-link { cursor:pointer; color:#857037; border-radius:0; }
.native-account-shell .verification-card .verification-note { max-width:none; margin:23px 0 0; text-align:start; }

.native-account-shell .fund-recent-records article { padding:16px 0; border-bottom:1px solid #edf0f3; font-size:13px; }
.native-account-shell .fund-recent-records small { display:block; margin-top:8px; color:#89909a; font-size:11px; }
.native-account-shell .transfer-review .transfer-form { width:100%; max-width:100%; }
/* Dialog uses a body portal so it remains above the clipped account frame. */
body.account-page dialog.transfer-review { box-sizing:border-box; width:min(440px,calc(100% - 32px)); max-height:85dvh; margin:auto; padding:28px; border:0; border-radius:18px; overflow:auto; background:#fff; color:#20242b; font:inherit; }
body.account-page dialog.transfer-review::backdrop { background:#11101680; }
dialog.transfer-review h2 { margin:0 0 20px; font-size:20px; font-weight:600; }
dialog.transfer-review p { font-size:14px; overflow-wrap:anywhere; }
dialog.transfer-review .transfer-error { color:#df6470; font-size:11px; }
dialog.transfer-review .fund-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:12px; margin-top:24px; }
dialog.transfer-review .fund-actions button { padding:11px 20px; border:0; border-radius:22px; background:#f2f3f5; color:#343c47; font:inherit; font-size:12px; cursor:pointer; }
dialog.transfer-review .fund-actions .transfer-confirm { background:#f0b90b; color:#20242b; }
dialog.transfer-review .fund-actions button:disabled { background:#f1f2f4; color:#b3b9c1; cursor:not-allowed; }
.native-account-shell .transfer-amount input { min-width:0; }
.native-account-shell .transfer-amount :is(span,button) { flex-shrink:0; }
.native-account-shell .transfer-form :is(button,input,select):focus-visible,dialog.transfer-review button:focus-visible { outline:2px solid #a87900; outline-offset:3px; }
.native-account-shell .transfer-history-asset { display:inline-flex; align-items:center; gap:8px; margin-block:6px 14px; color:#687382; font-size:12px; }
.native-account-shell .transfer-history-asset select { min-height:32px; padding:4px 10px; border:1px solid #e1e5ea; border-radius:8px; color:#343c47; background:#fff; font:inherit; }
.native-account-shell .transfer-history-asset select:focus-visible { outline:2px solid #a87900; outline-offset:3px; }

/* Real funding states follow the prototype's light cards and gold actions. */
.native-account-shell .fund-layout > *, .native-account-shell .fund-primary > * { min-width:0; }
.native-account-shell .transfer-amount input { color:#343c47; caret-color:#343c47; -webkit-text-fill-color:#343c47; color-scheme:light; }
.native-account-shell .transfer-amount input::placeholder { color:#939ba6; -webkit-text-fill-color:#939ba6; opacity:1; }
.native-account-shell .transfer-amount:focus-within { box-shadow:0 0 0 1px #b18b24; }
.native-account-shell .transfer-amount input:focus-visible { outline:none; }
.native-account-shell .transfer-amount input:disabled { color:#687382; -webkit-text-fill-color:#687382; }
.native-account-shell .fund-transfer-link { display:inline-flex; align-items:center; min-height:32px; color:#8b7532; font-size:12px; text-decoration:none; white-space:nowrap; }
.native-account-shell .fund-transfer-link:hover { color:#66551e; }
.native-account-shell .fund-transfer-link:focus-visible { outline:2px solid #a87900; outline-offset:3px; border-radius:4px; }
.native-account-shell .fund-recent-records article { padding:20px 0; }
.native-account-shell .fund-recent-records article:last-child { border-bottom:0; padding-bottom:0; }
.native-account-shell .fund-record-title { display:block; color:#343c47; font-size:13px; font-weight:500; line-height:1.6; overflow-wrap:anywhere; }
.native-account-shell .fund-recent-records p { margin:12px 0 0; font-size:14px; line-height:1.6; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.native-account-shell .fund-record-credit { color:#269b78; }
.native-account-shell .fund-record-debit { color:#343c47; }
.native-account-shell .transfer-receipt { max-width:540px; margin:0 auto; padding:12px 0; border:0; text-align:center; color:#343c47; }
.native-account-shell .transfer-success-icon { display:grid; place-items:center; width:52px; height:52px; margin:0 auto 16px; border-radius:50%; background:#e9f6ef; color:#269b78; }
.native-account-shell .transfer-success-icon svg { width:28px; height:28px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.native-account-shell .transfer-receipt h2 { font-size:20px; font-weight:600; }
.native-account-shell .transfer-success-amount { margin:20px 0 24px; overflow-wrap:anywhere; }
.native-account-shell .transfer-success-amount strong { font-size:30px; line-height:1.4; font-weight:600; font-variant-numeric:tabular-nums; }
.native-account-shell .transfer-success-amount span { font-size:12px; color:#89909a; }
.native-account-shell .transfer-receipt-details { margin:0; padding:8px 18px; border-radius:12px; background:#f7f8fa; font-size:12px; text-align:start; }
.native-account-shell .transfer-receipt-details > div { display:flex; justify-content:space-between; gap:20px; padding:10px 0; }
.native-account-shell .transfer-receipt-details dt { flex-shrink:0; color:#89909a; }
.native-account-shell .transfer-receipt-details dd { margin:0; text-align:end; overflow-wrap:anywhere; min-width:0; }
.native-account-shell .transfer-receipt-id { font-size:11px; font-family:ui-monospace,monospace; }
.native-account-shell .transfer-receipt .fund-actions { justify-content:center; flex-wrap:wrap; align-items:center; }
.native-account-shell .transfer-receipt .transfer-confirm { margin:0; cursor:pointer; }
.native-account-shell .transfer-receipt .fund-actions a { background:#f2f3f5; }
