/* MARFA Wallet UI v3.1 - final scoped overrides. Wallet page only. */
#wallets{--w3-bg:#071119;--w3-card:#0a151d;--w3-card2:#0d1921;--w3-line:#263b46;--w3-line2:#3a4b54;--w3-gold:#d9b45a;--w3-text:#dce5e8;--w3-muted:#83969f;--w3-green:#55d8aa;--w3-red:#f47770;direction:rtl}
#wallets>.connected-head{max-width:none!important;margin:0 0 12px!important;padding:0 2px!important;align-items:flex-end!important;flex-direction:row!important}
#wallets>.connected-head small{color:var(--w3-gold);font-size:10px;letter-spacing:.03em}
#wallets>.connected-head h1{font-size:clamp(22px,2.2vw,30px)!important;margin:3px 0!important}
#wallets>.connected-head p{font-size:12px!important;color:var(--w3-muted)!important}
#wallets .wallet-safe{border:1px solid #2f6654!important;color:#67d8ae!important;background:#0b1b17!important;border-radius:999px!important;padding:7px 11px!important;font-size:10px!important;white-space:nowrap}

/* One clean command bar. No negative margins, no translated transforms. Humanity survives. */
#wallets .wallet-search{display:grid!important;grid-template-columns:minmax(145px,.55fr) minmax(360px,1.55fr) 120px 120px!important;grid-template-areas:'name address analyze save' 'network network network network'!important;gap:9px!important;align-items:end!important;padding:14px!important;border:1px solid var(--w3-line)!important;background:linear-gradient(180deg,#0b151c,#081219)!important}
#wallets .wallet-search>label:first-of-type{grid-area:name!important}
#wallets .wallet-search>label:nth-of-type(2){grid-area:address!important}
#wallets .wallet-search>#walletAnalyze{grid-area:analyze!important}
#wallets .wallet-search>#walletTrack{grid-area:save!important}
#wallets .wallet-search>.wallet-network{grid-area:network!important;margin:0!important;min-width:0!important;padding-top:2px!important}
#wallets .wallet-search>#walletAnalyze,#wallets .wallet-search>#walletTrack{width:100%!important;min-width:0!important;min-height:46px!important;margin:0!important;transform:none!important;justify-self:stretch!important;grid-column:auto!important;grid-row:auto!important;border-radius:10px!important}
#wallets .wallet-search>#walletAnalyze{background:linear-gradient(180deg,#e1bf69,#c99d40)!important;color:#161208!important;font-weight:850!important}
#wallets .wallet-search>#walletTrack{background:#0d1820!important;border:1px solid var(--w3-line2)!important;color:#c8d3d7!important}
#wallets .wallet-address-control{display:grid!important;grid-template-columns:minmax(0,1fr) 98px 98px!important;gap:7px!important;direction:ltr!important}
#wallets .wallet-qr-tools{display:contents!important}
#wallets .wallet-qr-tools button{min-width:0!important;min-height:46px!important;margin:0!important;padding:6px 8px!important;border-radius:10px!important;justify-content:center!important;direction:rtl!important}
#wallets .wallet-qr-tools button small{display:none!important}
#wallets .wallet-qr-hint{margin-top:5px!important;font-size:9px!important}
#wallets .wallet-privacy{margin:9px 0 12px!important;padding:9px 12px!important;border-radius:10px!important}

/* Results are full width. Secondary material stays secondary. */
#wallets .wallet-layout{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
#wallets .wallet-result{order:1!important;width:100%!important;min-width:0!important;padding:14px!important;border:1px solid var(--w3-line)!important;background:var(--w3-bg)!important;overflow:hidden!important}
#wallets .wallet-book{order:2!important;width:100%!important;min-height:0!important;margin:0!important;padding:12px 14px!important}
#wallets #walletWatchlist{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
#wallets .wallet-book-item{min-width:0!important}
#wallets .wallet-result-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:12px!important;padding-bottom:11px!important;border-bottom:1px solid var(--w3-line)!important}
#wallets .wallet-result-head b{font-size:13px!important;direction:ltr!important;unicode-bidi:plaintext!important;overflow-wrap:anywhere!important}

/* Risk first, with plain-language hierarchy. */
#wallets .wallet-risk-mount{margin:12px 0!important}
#wallets .wallet-risk-hero{grid-template-columns:minmax(0,1.6fr) minmax(240px,.8fr)!important;gap:9px!important}
#wallets .wallet-risk-verdict,#wallets .wallet-main-risk{min-height:108px!important;padding:13px 14px!important}
#wallets .wallet-risk-verdict strong{font-size:20px!important}
#wallets .pri-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
#wallets .pri-kpis>span{padding:10px!important;border:1px solid var(--w3-line)!important;border-radius:10px!important;background:var(--w3-card)!important}
#wallets .pri-gaps{display:flex!important;flex-wrap:wrap!important;gap:6px!important}
#wallets .pri-gap{font-size:9px!important}

#wallets .wallet-kpis-risk{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:7px!important;margin:10px 0!important}
#wallets .wallet-kpis-risk article{min-height:70px!important;padding:10px!important;border:1px solid var(--w3-line)!important;border-radius:10px!important;background:var(--w3-card)!important}
#wallets .wallet-kpis-risk small{font-size:9px!important;color:var(--w3-muted)!important}
#wallets .wallet-kpis-risk b{font-size:15px!important;margin-top:4px!important}

/* Arkham-style evidence graph, but using only our verified labels. */
#wallets .wallet-evm-visuals{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;margin-top:10px!important}
#wallets .wallet-flow-card{width:100%!important;min-width:0!important;padding:14px!important;border:1px solid var(--w3-line)!important;border-radius:14px!important;background:radial-gradient(circle at 50% 48%,rgba(217,180,90,.055),transparent 32%),#08131b!important;overflow:hidden!important}
#wallets .wallet-evm-flow{width:100%!important;overflow:auto!important;padding:2px 0!important}
#wallets .wallet-evm-flow svg{display:block!important;width:100%!important;min-width:760px!important;height:auto!important;max-height:620px!important;margin:auto!important}
#wallets .wallet-flow-legend{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:10px!important;margin-bottom:7px!important;color:var(--w3-muted)!important;font-size:9px!important}
#wallets .wallet-flow-legend .in{color:var(--w3-green)!important}#wallets .wallet-flow-legend .out{color:var(--w3-red)!important}
#wallets .wallet-tags-card{width:100%!important;padding:12px 14px!important;border:1px solid var(--w3-line)!important;border-radius:12px!important;background:var(--w3-card)!important}
#wallets .wallet-entity-tags{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important}
#wallets .wallet-entity-chip{max-width:none!important;min-width:0!important;padding:9px 10px!important}
#wallets .wallet-entity-chip b,#wallets .wallet-entity-chip small{overflow-wrap:anywhere!important}

/* TRON graph receives the same treatment. */
#wallets .wallet-visuals{gap:10px!important}
#wallets .wallet-flow-shell{width:100%!important;overflow:hidden!important}
#wallets .wallet-flow-mount{overflow:auto!important}
#wallets .wallet-graph-arkham{display:block!important;width:100%!important;min-width:760px!important;height:auto!important;max-height:650px!important;margin:auto!important}
#wallets .wallet-flow-toolbar{display:flex!important;flex-wrap:wrap!important;gap:6px!important;direction:rtl!important}
#wallets .wallet-flow-toolbar button{font-size:9px!important}

/* Intelligence table */
#wallets .wallet-tx-toolbar{margin-top:12px!important;padding:8px 0!important}
#wallets .wallet-tx-intel{width:100%!important;max-width:100%!important;overflow:auto!important;border:1px solid var(--w3-line)!important;border-radius:11px!important}
#wallets .wallet-tx-intel table{width:100%!important;min-width:940px!important;table-layout:fixed!important;direction:rtl!important}
#wallets .wallet-tx-intel th,#wallets .wallet-tx-intel td{text-align:right!important;padding:9px 7px!important;vertical-align:top!important}
#wallets .wallet-tx-intel tbody tr:hover{background:#0d1a22!important}
#wallets .wallet-intel-badge{white-space:normal!important;line-height:1.45!important}

/* Screening is evidence detail, not a second competing dashboard. */
#wallets .wallet-screening{margin-top:12px!important;padding:13px!important;border:1px solid var(--w3-line)!important;border-radius:12px!important;background:var(--w3-card)!important}
#wallets .wallet-screening-head{display:flex!important;justify-content:space-between!important;gap:12px!important;align-items:flex-start!important}
#wallets .ws-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important}
#wallets .ws-grid>div{min-width:0!important;padding:9px!important;border:1px solid var(--w3-line)!important;border-radius:9px!important;background:#08131a!important}
#wallets .ws-table-wrap{overflow:auto!important;max-width:100%!important}
#wallets .ws-table{min-width:780px!important}

/* Contract check visually separated from wallet address analysis. */
#wallets #contractCheck{margin:0 0 14px!important;padding:14px!important;border:1px solid #4d4328!important;background:linear-gradient(180deg,#11130f,#0a1217)!important}
#wallets #contractCheck .contract-head h2{font-size:17px!important;margin:3px 0!important}
#wallets #contractCheck .contract-head p{max-width:850px!important;font-size:11px!important;line-height:1.8!important;color:var(--w3-muted)!important}
#wallets #contractCheck .contract-form{display:grid!important;grid-template-columns:minmax(0,1fr) 170px!important;gap:8px!important}

/* Hyperliquid behavior radar is compact until it has useful content. */
#wallets #walletIntelligence{padding:11px 13px!important;margin:9px 0!important;min-height:0!important}
#wallets #walletIntelligence .wi-head h3{font-size:14px!important}
#wallets #walletIntelligence .wi-note{font-size:9px!important}

@media(max-width:1180px){
 #wallets .wallet-search{grid-template-columns:minmax(130px,.5fr) minmax(0,1.5fr)!important;grid-template-areas:'name address' 'analyze save' 'network network'!important}
 #wallets .wallet-search>#walletAnalyze,#wallets .wallet-search>#walletTrack{grid-column:auto!important;grid-row:auto!important}
 #wallets .wallet-kpis-risk{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 #wallets .wallet-entity-tags,#wallets .ws-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #wallets #walletWatchlist{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:760px){
 #wallets>.connected-head{align-items:flex-start!important;flex-direction:column!important}
 #wallets .wallet-search{grid-template-columns:1fr!important;grid-template-areas:'name' 'address' 'network' 'analyze' 'save'!important;padding:11px!important}
 #wallets .wallet-address-control{grid-template-columns:1fr 1fr!important}#wallets .wallet-address-control>#walletAddress{grid-column:1/-1!important}
 #wallets .wallet-search>#walletAnalyze,#wallets .wallet-search>#walletTrack{grid-column:auto!important;grid-row:auto!important}
 #wallets .wallet-risk-hero{grid-template-columns:1fr!important}
 #wallets .pri-kpis,#wallets .wallet-kpis-risk,#wallets .wallet-entity-tags,#wallets .ws-grid,#wallets #walletWatchlist{grid-template-columns:1fr 1fr!important}
 #wallets .wallet-evm-flow svg,#wallets .wallet-graph-arkham{min-width:700px!important;max-height:none!important}
 #wallets .wallet-result{padding:10px!important}
 #wallets #contractCheck .contract-form{grid-template-columns:1fr!important}
}
@media(max-width:480px){#wallets .pri-kpis,#wallets .wallet-kpis-risk,#wallets .wallet-entity-tags,#wallets .ws-grid,#wallets #walletWatchlist{grid-template-columns:1fr!important}}
