/* Account page: quieter surfaces and a consistent spacing rhythm. */
.background-scene { opacity: .17; filter: saturate(.7); }
#app::before { opacity: .1; }
.account-header-actions { display: flex; align-items: center; gap: 24px; }
.back-link { color: #c7d9ce; text-decoration: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.back-link:hover { color: #aaf2c5; }
.account-page { width: min(100%, 920px); margin: 0 auto; padding: 40px 0 60px; }
.account-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.account-eyebrow, .card-kicker { margin: 0 0 7px; color: #9fc9af; font: 700 10px var(--mono); letter-spacing: 1.15px; }
.account-eyebrow { display: flex; align-items: center; gap: 9px; }
.account-eyebrow::before { content: ""; width: 17px; height: 1px; background: #87d8a7; }
.account-heading h1 { margin: 0; color: #f5f8f4; font-size: clamp(31px, 4vw, 40px); line-height: 1.08; font-weight: 800; letter-spacing: -1.3px; }
.account-heading>div>p:last-child { margin: 9px 0 0; color: #b5c6bb; font-size: 13px; line-height: 1.5; }
.account-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #90c4a42e; border-radius: 999px; background: #1a2e23bd; color: #c1dbca; font: 700 9px var(--mono); letter-spacing: .35px; white-space: nowrap; }
.account-badge>span:first-child { width: 6px; height: 6px; border-radius: 50%; background: #8cebb2; box-shadow: 0 0 9px #78e7a484; }

.credit-card { display: grid; grid-template-columns: 1.1fr .9fr; overflow: hidden; border: 1px solid #9bd9b541; border-radius: 12px; background: linear-gradient(120deg, #2b4a3a 0%, #20382d 54%, #1b2e24 100%); box-shadow: 0 16px 38px #0003, inset 0 1px #ffffff0d; }
.credit-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 22px 28px; }
.credit-label { display: flex; align-items: center; gap: 10px; color: #d6ebdc; font-size: 12px; font-weight: 700; }
.credit-mark { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #a7e7bc55; border-radius: 8px; color: #c3f5d1; background: #b4ffd311; font-size: 15px; }
.credit-main>strong { display: block; margin: 12px 0 14px; color: #f5fff7; font-size: clamp(42px, 5vw, 52px); line-height: 1; font-weight: 800; letter-spacing: -1.9px; font-variant-numeric: tabular-nums; }
.credit-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; margin-top: auto; }
.credit-bottom>span { color: #a8c7b2; font: 700 9px var(--mono); letter-spacing: .9px; }
.credit-detail { display: grid; grid-template-columns: 1fr 1fr; align-content: center; column-gap: 20px; row-gap: 14px; padding: 22px 28px; border-left: 1px solid #afe6bf22; }
.credit-detail-title { grid-column: 1 / -1; display: flex; justify-content: space-between; color: #a7c8b2; font: 700 9px var(--mono); letter-spacing: 1px; }
.credit-detail-title span { color: #a7e4bc; font-size: 15px; }
.credit-stat { display: grid; gap: 7px; min-width: 0; }
.credit-stat span { color: #bfd4c5; font-size: 12px; }
.credit-stat strong { color: #f3fbf4; font: 750 15px var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.credit-detail p { grid-column: 1 / -1; margin: 0; color: #acc7b4; font-size: 11px; line-height: 1.45; }
.credit-detail .credit-precision { padding-top: 10px; border-top: 1px solid #afe6bf22; color: #d0e7d7; font: 10px/1.6 var(--mono); overflow-wrap: anywhere; }
.account-error { margin: 14px 0 0; color: #ffded7; font-size: 12px; }

.account-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); grid-template-areas: "keys activity" "connection connection"; align-items: stretch; gap: 14px; margin-top: 18px; }
.keys-card { grid-area: keys; }
.activity-card { grid-area: activity; }
.connection-card { grid-area: connection; }
.account-card { min-width: 0; padding: 22px; border: 1px solid #a5c7b12c; border-radius: 12px; background: #182720f5; box-shadow: 0 12px 32px #0003, inset 0 1px #ffffff08; }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.section-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.section-icon { flex: 0 0 auto; display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid #91c7a832; border-radius: 10px; background: #a6eec20a; color: #b9e7c8; }
.section-icon svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card-kicker { margin-bottom: 5px; font-size: 9px; letter-spacing: .85px; }
.card-heading h2, .connection-card h2 { margin: 0; color: #f0f6f1; font-size: 19px; line-height: 1.15; font-weight: 800; letter-spacing: -.45px; }
.count-badge { padding: 6px 9px; border: 1px solid #98c7a831; border-radius: 999px; color: #c4dfcc; background: #b8f8c908; font: 700 9px var(--mono); letter-spacing: .25px; white-space: nowrap; }
.card-intro, .connection-note, .example p { color: #b2c4b8; font-size: 12px; line-height: 1.55; }
.card-intro { margin: 14px 0; }
.key-list { display: grid; gap: 8px; }
.key-empty, .key-row { border: 1px solid #a0c9ae20; border-radius: 8px; background: #101d17b8; padding: 13px; color: #dceae0; font: 12px/1.45 var(--mono); }
.key-empty { color: #b0c3b6; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.key-row code { font: 700 12px var(--mono); overflow-wrap: anywhere; }
.key-row small { display: block; margin-top: 6px; color: #a7cdb3; font: 10px var(--mono); }
.create-key { width: 100%; min-height: 48px; margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; border: 1px solid #bcf8d1; border-radius: 8px; background: #8be5ad; color: #10251b; font-size: 13px; font-weight: 800; text-align: left; transition: background .16s, transform .16s; }
.create-key:hover:not(:disabled) { background: #a8efc2; }
.create-key:active:not(:disabled) { transform: translateY(1px); }
.create-key span { font-size: 16px; line-height: 1; }
.key-note { display: flex; gap: 8px; margin: 12px 0 0; color: #a9beb0; font-size: 11px; line-height: 1.5; }
.key-note span { color: #9dd8b0; }
.status { margin: 12px 0 0; color: #d1f3da; font-size: 11px; line-height: 1.4; }
.status:empty, .connection-status:empty { display: none; }

.new-key { margin-bottom: 10px; padding: 15px; border: 1px solid #a2e1b66b; border-radius: 8px; background: #2b4635; }
.new-key-head { display: flex; justify-content: space-between; gap: 10px; color: #ddffe6; font: 700 10px var(--mono); }
.new-key label { display: block; margin-top: 13px; font-size: 12px; }
.copy-field { display: flex; margin-top: 8px; }
.copy-field input { min-width: 0; width: 100%; padding: 11px; border: 1px solid #91b99a; border-right: 0; border-radius: 7px 0 0 7px; background: #15261b; color: #f1ffe2; font: 11px var(--mono); }
.copy-field button { padding: 0 13px; border: 1px solid #a8cdb0; border-radius: 0 7px 7px 0; background: #4d7058; color: #fff; font: 700 10px var(--mono); }
.new-key p { margin: 9px 0 0; color: #d4e7d8; font-size: 11px; }

.activity-card { display: flex; flex-direction: column; }
.activity-list { flex: 1; display: flex; flex-direction: column; margin-top: 20px; padding-top: 17px; border-top: 1px solid #a9d1b41d; }
.activity-empty { margin: auto; max-width: 230px; color: #b1c2b7; font-size: 12px; line-height: 1.55; text-align: center; }
.activity-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.activity-row:first-child { padding-top: 0; }
.activity-row + .activity-row { border-top: 1px solid #a9d1b41d; }
.activity-row strong { display: block; color: #eaf5ed; font-size: 12px; }
.activity-row small { display: block; margin-top: 4px; color: #a4bcae; font: 10px var(--mono); }
.activity-amount { color: #b8ffd0; font: 750 12px var(--mono); white-space: nowrap; }
.activity-amount.is-spend { color: #d5d1e2; }

.connection-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr) minmax(0, .82fr); align-items: start; gap: 20px 24px; }
.connection-note { margin: 14px 0 0; max-width: 235px; font-size: 11px; }
.connection { min-width: 0; }
.field-title, .model-line>label { display: flex; justify-content: space-between; align-items: center; min-height: 22px; color: #b3cbb9; font: 700 10px var(--mono); letter-spacing: .65px; }
.connection>code, .model-line code { display: block; min-height: 42px; overflow-wrap: anywhere; margin-top: 8px; padding: 12px; border: 1px solid #98c6a927; border-radius: 7px; background: #101d17b8; color: #e4f3e8; font: 11px/1.45 var(--mono); }
.model-line { min-width: 0; }
.model-line select { width: 100%; min-height: 42px; margin-top: 8px; padding: 10px 12px; border: 1px solid #98c6a950; border-radius: 7px; background: #101d17; color: #e4f3e8; font: 11px/1.45 var(--mono); }
.model-line select:focus-visible { outline: 2px solid #9cedb8; outline-offset: 2px; }
.model-id { margin: 6px 0 0; color: #99b3a0; font: 10px/1.4 var(--mono); overflow-wrap: anywhere; }
.connection-status { grid-column: 1 / -1; margin: -8px 0 0; color: #c7ebd1; font-size: 11px; }
.example { grid-column: 1 / -1; padding-top: 15px; border-top: 1px solid #a9d1b41d; }
.example p { margin: 12px 0; }
.code-wrap { position: relative; }
.code-wrap pre { margin: 0; padding: 32px 12px 12px; border: 1px solid #98c6a927; border-radius: 7px; background: #101b15; color: #dcece0; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.5 var(--mono); }
.gateway-demo { grid-column: 1 / -1; padding: 19px; border: 1px solid #a6d9b52c; border-radius: 10px; background: #0e1c16a3; }
.gateway-demo-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.gateway-demo h3 { margin: 0; color: #ecf7ee; font-size: 15px; letter-spacing: -.2px; }
.gateway-demo-heading p:last-child { margin: 7px 0 0; color: #aec6b4; font-size: 11px; line-height: 1.5; }
.gateway-badge { flex: none; padding: 6px 8px; border: 1px solid #90c4a43a; border-radius: 999px; color: #c5e7ce; font: 700 9px var(--mono); letter-spacing: .3px; }
.gateway-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 11px; margin-top: 17px; }
.gateway-form label { min-width: 0; display: grid; gap: 7px; color: #bfd7c5; font-size: 11px; font-weight: 700; }
.gateway-form input, .gateway-form textarea { width: 100%; min-width: 0; min-height: 46px; padding: 11px; border: 1px solid #91bb9e45; border-radius: 7px; background: #101d17; color: #ecf9ee; font: 12px/1.5 var(--sans); }
.gateway-form input { font-family: var(--mono); }
.gateway-form textarea { height: 46px; resize: vertical; }
.gateway-form input:focus, .gateway-form textarea:focus { outline: 2px solid #9cedb8; outline-offset: 2px; }
.gateway-estimate { margin: 11px 0 0; color: #a9c5b0; font: 10px/1.5 var(--mono); overflow-wrap: anywhere; }
.gateway-economics-link { display: inline-block; margin-top: 10px; color: #b8e9c5; font-size: 11px; text-underline-offset: 3px; }
.gateway-result { margin-top: 14px; padding: 13px; border: 1px solid #98c6a927; border-radius: 7px; background: #182a20; }
.gateway-result p { margin: 0; color: #e7f5e9; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.gateway-result span { display: block; margin-top: 8px; color: #add0b8; font: 10px/1.5 var(--mono); overflow-wrap: anywhere; }

.legacy-import { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; padding: 17px 20px; border: 1px solid #c1dca94d; border-radius: 10px; background: #303b2be8; color: #f0f8dd; }
.legacy-import strong { font-size: 13px; }
.legacy-import div p { max-width: 510px; margin: 5px 0 0; color: #d1dfc6; font-size: 11px; line-height: 1.5; }
.legacy-import>p { flex-basis: 100%; margin: 0; color: #f4e0b2; font-size: 11px; }
.legacy-import>p:empty { display: none; }

/* The wallet dialog uses the same visual language on this page. */
.wallet-dialog { border-color: #a5d0b34a; border-radius: 13px; background: linear-gradient(155deg, #263b30, #17251d 85%); box-shadow: 0 24px 80px #000a, inset 0 1px #ffffff0f; }
.wallet-dialog-inner { padding: 24px; }
.wallet-close { width: 34px; height: 34px; border-color: #a9d1b438; border-radius: 8px; background: #ffffff0c; }
.wallet-dialog h2 { margin: 18px 0 9px; font-size: 24px; letter-spacing: -.6px; }
.wallet-description { font-size: 13px; line-height: 1.55; }
.wallet-option, .wallet-disconnect { min-height: 50px; border-color: #a1cfaf42; border-radius: 8px; background: #20352a; }
.wallet-empty, .wallet-account { border-color: #a1cfaf42; border-radius: 8px; }
.back-link:focus-visible{ outline: 3px solid #c8ffd9; outline-offset: 4px; }

/* Match the pack screen's tactile controls without changing account actions. */
.back-link { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 10px; border: 1px solid #a9d3ba38; border-radius: 11px; background: #172b21c9; box-shadow: inset 0 1px #ffffff10; }
.back-link:hover { border-color: #b5fbd17a; background: #294c38; }
.create-key { min-height: 50px; padding: 8px 10px 8px 14px; border-color: #d2ffe4; border-radius: 12px; background: linear-gradient(160deg, #d4ffe4, #8de9b7 50%, #65cc99); box-shadow: inset 0 1px #fff, 0 3px #2b7651, 0 7px 18px #0004; transition: transform .18s, filter .18s, box-shadow .18s; }
.create-key:hover:not(:disabled) { background: linear-gradient(160deg, #e6ffef, #a0f4c5 52%, #77dfaa); filter: brightness(1.04); transform: translateY(-1px); }
.create-key:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px #ffffffa0, 0 1px #2b7651; }
.create-key span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #23674642; border-radius: 9px; background: #1d68411c; box-shadow: inset 0 1px #ffffff7a; }
.wallet-dialog { border-radius: 20px; background: linear-gradient(155deg, #294638, #14251c 85%); }
.wallet-option, .wallet-disconnect { border-radius: 12px; background: linear-gradient(145deg, #2b4c3a, #1d3528); box-shadow: inset 0 1px #ffffff17, 0 3px 10px #0003; }
@media (max-width: 420px) { .account-header-actions { gap: 6px; } .back-link { min-height: 34px; padding: 6px; font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { .create-key { transition: none; } }

@media(max-width: 720px) {
  .account-page { padding: 34px 0 60px; }
  .account-grid { grid-template-columns: 1fr; grid-template-areas: "keys" "activity" "connection"; }
  .connection-card { grid-template-columns: 1fr 1fr; }
  .connection-heading, .example { grid-column: 1 / -1; }
  .connection-note { max-width: none; }
}
@media(max-width: 520px) {
  .account-heading { align-items: flex-start; margin-bottom: 22px; }
  .account-heading h1 { font-size: 32px; }
  .account-heading>div>p:last-child { font-size: 12px; }
  .account-badge { font-size: 8px; }
  .credit-card { grid-template-columns: 1fr; }
  .credit-main { padding: 22px; }
  .credit-main>strong { margin: 16px 0 20px; font-size: 42px; }
  .credit-detail { padding: 20px 22px; border-left: 0; border-top: 1px solid #afe6bf22; row-gap: 15px; }
  .account-card { padding: 20px; }
  .connection-card { grid-template-columns: 1fr; gap: 17px; }
  .connection-heading, .example { grid-column: auto; }
  .connection-status { grid-column: auto; }
  .gateway-demo { grid-column: auto; padding: 16px; }
  .gateway-form { grid-template-columns: 1fr; }
}
@media(max-width: 420px) {
  .account-header-actions { gap: 10px; }
  .back-link { font-size: 10px; }
  .account-heading { position: relative; display: block; }
  .account-heading h1 { margin-top: 6px; }
  .account-badge { position: absolute; top: 0; right: 0; }
}
