/* Shared dark palette. Light styles and geometry remain defined by each page. */
html[data-theme=dark]{background:#0d121b!important;color-scheme:dark;scrollbar-color:#39485f #0d121b}
html[data-theme=dark] body,body.dark{--bg1:#0d121b;--bg2:#101824;--bg3:#111925;--bg4:#0d121b;--card:#151e2c;--card-border:#2c3a50;--text:#edf2fa;--muted:#a5b2c7;--primary:#8ba9ff;--primary-2:#a7bdff;--accent:#65d8c2;--soft:#1b2739;--soft-2:#213048;--line:#2c3a50;--green:#65d8b1;--red:#ff8999;--danger:#ff8999;--danger-bg:#3b2230;--warning:#f3ce88;--warning-bg:#302b23;--warning-line:#67563a;--shadow:0 12px 40px #00000026;--chart-up:#65d8b1;--chart-down:#ff8999;background:#0d121b!important;color:var(--text)!important;color-scheme:dark}
body.dark :is(.topbar,.topbar.scrolled,.mobile-menu,.language-menu){background:#151e2cf5!important;border-color:var(--line)!important;box-shadow:0 8px 24px #0003!important}
body.dark :is(.card,.panel,.portfolio-panel,.strip-card,.hero-card,.adv-card,.login-card,.faq-side,.faq-main,.contact-card,.modal-card,.auth-loading-card,.address-card,.summary,.history-item){background:var(--card)!important;border-color:var(--line)!important;color:var(--text)!important;box-shadow:var(--shadow)!important}
body.dark :is(.card-title,.panel-title,.hero-title,.login-card-logo,.faq-title,.contact-title,.modal-title,.modal-heading-copy,.portfolio-head,.portfolio-asset-name strong){color:var(--text)!important}
body.dark :is(.panel-sub,.hero-sub,.strip-label,.strip-sub,.subtext,.min-note,.aml-text,.modal-subtitle,.faq-side-text,.faq-subtitle,.contacts-subtitle,.contact-sub,.contact-meta,.address-label,.auth-field label){color:var(--muted)!important}
body.dark :is(input,select,textarea){color:var(--text)!important;caret-color:var(--primary);color-scheme:dark}
body.dark :is(input,textarea)::placeholder{color:#9aaac1!important;opacity:1}
body.dark :is(.amount,.search,.asset-search,.input-wrap,.auth-field input,.modal-search-wrap){background:#101925!important;border-color:#3a4b64!important;color:var(--text)!important;box-shadow:none!important}
body.dark input:-webkit-autofill{-webkit-text-fill-color:#edf2fa!important;-webkit-box-shadow:0 0 0 1000px #101925 inset!important}
body.dark :is(.currency-picker,.info-chip,.rateBox,.timer,.wallet-exchange-summary,.theme-toggle,.burger,.login-btn,.secondary-btn,.tab-btn,.auth-tab,.faq-tags a,.faq-number,.faq-icon,.icon-box,.contact-row,.contact-action,.modal-close,.modal-tabs button,.language-toggle){background:#1b2739!important;color:#dbe5f7!important;border-color:#344660!important;box-shadow:none!important}
body.dark :is(.primary-btn,.exchange-btn,.auth-submit,.auth-tab.active,.tab-btn.active,.modal-tabs button.active,.contact-action:hover){background:#8ba9ff!important;color:#101b32!important;border-color:#8ba9ff!important;box-shadow:none!important}
body.dark :is(.nav-links a,.mobile-menu a,.language-option,.login-back,.auth-reset){color:#c4d4f5!important}
body.dark :is(.nav-links a.active,.nav-links a:hover,.mobile-menu a:hover,.language-option:hover){background:#233550!important;color:#edf2fa!important}
body.dark :is(.faq-item,.faq-question,.faq-answer,.faq-answer-inner){background:transparent!important;color:var(--text)!important;border-color:var(--line)!important}
body.dark :is(.faq-highlight,.note-box,.info-box){background:#1c2c42!important;border-color:#344c6a!important;color:#d2e1f6!important}
body.dark :is(.asset-card,.asset-item,.asset-option){background:#192536!important;color:var(--text)!important;border-color:#30415a!important}
body.dark :is(.asset-card:hover,.asset-item:hover,.asset-option:hover){background:#263852!important;border-color:#8ba9ff!important}
body.dark .portfolio-assets .portfolio-asset{background:#151e2c!important;border-color:#2c3a50!important;color:#edf2fa!important}
body.dark .portfolio-assets .portfolio-asset:is(:hover,.active){background:#1d2b40!important}
body.dark .portfolio-assets :is(.portfolio-asset-name small,.portfolio-asset-numbers span){color:#a5b2c7!important}
body.dark .portfolio-assets .portfolio-quote .positive{color:#65d8b1}body.dark .portfolio-assets .portfolio-quote .negative{color:#ff8999}
body.dark .portfolio-swap-link{background:#233550!important;color:#c4d4ff!important}
body.dark :is(.filfet-footer,.filfet-footer-shell,.filfet-footer-card){background:#111a28!important;border-color:#2c3a50!important;color:var(--text)!important}
body.dark :is(.filfet-footer-text,.filfet-footer-label,.filfet-footer-value){color:#afbdd2!important}
body.dark :is(.filfet-footer-glow,.fx-scene,.fx-cursor-glow){opacity:.15!important}
body.dark :is(button,a,input,select,textarea,[tabindex]):focus-visible{outline:2px solid #a7bdff!important;outline-offset:3px!important}
body.dark ::selection{background:#41639c;color:#fff}
body.dark :is(.error-text,.form-error){color:#ff9eab!important}body.dark :is(.exchange-success,.send-status.success){color:#65d8b1!important}
/* Detail dialog and chart use the same surfaces as the wallet. */
body.dark .coin-detail{background:#111a28;color:#edf2fa;border-color:#344660;box-shadow:0 24px 80px #0008}
body.dark .coin-detail::backdrop{background:#050910b3}
body.dark .coin-detail :is(.cd-market,.cd-about){background:#151e2c;border-color:#2c3a50}
body.dark .coin-detail :is(.cd-holding,.cd-range>div,.cd-hover,.cd-currency,.cd-networks span,.cd-periods,.cd-close,.cd-loading,.cd-empty){background:#1b2739;color:#dbe5f7;border-color:#30415a}
body.dark .coin-detail :is(.cd-header,.cd-caption,.cd-chart-note,.cd-updated,.cd-range span,.cd-holding>span,.cd-holding>small,.cd-about>span,.cd-about p,.cd-premium>span,.cd-premium p,.cd-periods button,.cd-chart-labels,#cdSymbol){color:#a5b2c7}
body.dark .coin-detail .cd-change{background:#243149;color:#dbe5f7}body.dark .coin-detail .cd-change.positive{background:#18372e;color:#65d8b1}body.dark .coin-detail .cd-change.negative{background:#3b2230;color:#ff8999}
body.dark .coin-detail .cd-premium{background:#1a2a44;border-color:#39547a}
body.dark .coin-detail :is(.cd-actions button,.cd-empty button){background:#263852;color:#e4ecfb;border-color:#405776}
body.dark .coin-detail .cd-actions button:first-child{background:#8ba9ff;color:#101b32;border-color:#8ba9ff}
body.dark .coin-detail .cd-periods button[aria-pressed=true]{background:#344b70;color:#fff;box-shadow:none}
body.dark .coin-detail .cd-chart svg line:not(#cdCursor){stroke:#30415a}body.dark .coin-detail .cd-chart svg text{fill:#a5b2c7}body.dark .coin-detail #cdDot{stroke:#151e2c}
body.dark .coin-detail .cd-empty strong{color:#e0e9f8}body.dark .coin-detail .cd-updated{border-color:#2c3a50}
/* Transfers: white is reserved for the scannable QR area. */
body.dark #filfetTransfer{background:#0d121b!important;color:#edf2fa!important;color-scheme:dark!important;--text:#edf2fa;--muted:#a5b2c7;--primary:#8ba9ff;--soft:#1b2739;--card:#151e2c}
body.dark #filfetTransfer :is(.ft-header h2,#ftReceive h2,#sendCoinLabel){color:#edf2fa!important}
body.dark #filfetTransfer #sendPane .input-wrap{background:#182436!important;border-color:#3a4b64!important}
body.dark #filfetTransfer #sendPane input{color:#edf2fa!important}
body.dark #filfetTransfer input::placeholder{color:#a5b2c7!important}
body.dark #filfetTransfer :is(.ft-round,.ft-paste,.ft-coin,.ft-networks,.ft-receive-actions button){background:#23344c!important;color:#dbe5f7!important}
body.dark #filfetTransfer :is(.ft-stats,#sendAvailableLabel,#ftReceiveCaption,#ftQrHint){color:#a5b2c7!important}
body.dark #filfetTransfer :is(#ftMax,.ft-scan,.ft-network-change){color:#a7bdff!important}
body.dark #filfetTransfer .ft-networks button{color:#c1d0e5}body.dark #filfetTransfer .ft-networks button.active,body.dark #filfetTransfer #sendBtn{background:#8ba9ff!important;color:#101b32!important}
body.dark #filfetTransfer .ft-qr-card{background:#151e2c!important;color:#edf2fa!important;border-color:#344660!important;box-shadow:none}
body.dark #filfetTransfer .ft-qr{background:#fff!important;border:8px solid #fff;border-radius:8px;color-scheme:light}
body.dark.filfet-transfer-open #assetModal .modal-card{background:#151e2c!important;color:#edf2fa!important}
body.dark.filfet-transfer-open #assetModal .asset-card{background:#1b2739!important;color:#edf2fa!important;border-color:#344660!important}
@media(prefers-reduced-motion:reduce){html[data-theme=dark] body{transition:none}}
