/* Terminal account controls share one baseline and a clear visual hierarchy. */
html[data-appearance] body .xt-topbar.xt-topbar-polished{background:#0c0e10!important;border-bottom:1px solid #272c30!important;box-shadow:none;direction:ltr;align-items:center;justify-content:space-between;gap:20px}
html[data-appearance] body .xt-topbar-polished .xt-brand{flex-shrink:0;display:flex;align-items:center}
html[data-appearance] body .xt-topbar-polished .xt-identity-logo{width:154px;height:28px;object-fit:contain;display:block}
html[data-appearance] body .xt-topbar-polished .xt-account-actions{display:flex;align-items:center;gap:10px;margin-left:auto;min-width:0;height:100%;direction:ltr}
html[data-appearance] body .xt-topbar-polished .xt-all-tools,html[data-appearance] body .xt-topbar-polished .xt-icon-button{height:40px;min-height:40px;border:1px solid #2b3035;border-radius:11px;background:#171a1d;color:#bbc3cb;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:0 13px;font:600 11px var(--font-ui);line-height:1;white-space:nowrap;box-shadow:inset 0 1px #ffffff03}
html[data-appearance] body .xt-topbar-polished .xt-all-tools i{font-size:13px;color:#a3b19c}
html[data-appearance] body .xt-topbar-polished .xt-icon-button{position:relative;width:40px;flex:0 0 40px;padding:0;font-size:16px}
html[data-appearance] body .xt-topbar-polished .xt-account-picker{position:relative;align-self:center;margin:0;padding:0;flex-shrink:0;border:0}
html[data-appearance] body .xt-topbar-polished .xt-wallet{height:46px;min-height:46px;min-width:208px;display:grid;grid-template-columns:30px minmax(0,1fr) 9px;grid-template-rows:13px 20px;column-gap:10px;row-gap:0;align-items:center;padding:6px 12px;border:1px solid #333b40!important;border-radius:12px;background:#171c1f!important;box-shadow:inset 0 1px #ffffff04;color:#f2f4f5;cursor:pointer;list-style:none;line-height:normal}
html[data-appearance] body .xt-topbar-polished .xt-wallet::-webkit-details-marker{display:none}
html[data-appearance] body .xt-topbar-polished .xt-wallet>.xt-wallet-symbol{display:grid!important;place-items:center;grid-column:1;grid-row:1/3;width:30px;height:30px;border-radius:9px;background:#5dd62c10;color:#72d84b;font-size:13px}
html[data-appearance] body .xt-topbar-polished .xt-wallet>span{display:flex;align-items:center;gap:5px;grid-column:2;grid-row:1;font-size:9px!important;font-weight:500;color:#a8b3bd!important;line-height:13px;white-space:nowrap}
html[data-appearance] body .xt-topbar-polished .xt-wallet .xt-status-dot{display:none}
html[data-appearance] body .xt-topbar-polished .xt-wallet small{display:block;margin:0 0 0 auto;padding-inline-start:8px;font-size:8px;color:#7f8b95;line-height:1}
html[data-appearance] body .xt-topbar-polished .xt-wallet strong{grid-column:2;grid-row:2;font:700 18px/20px var(--font-ui);letter-spacing:-.35px;color:#f2f4f5!important;direction:ltr;white-space:nowrap;text-align:start;font-variant-numeric:tabular-nums}
html[data-appearance] body .xt-topbar-polished .xt-wallet:after{content:'';display:block!important;grid-column:3;grid-row:1/3;width:6px;height:6px;border-right:1.5px solid #9aa7b1;border-bottom:1.5px solid #9aa7b1;transform:rotate(45deg);margin-top:-3px}
html[data-appearance] body .xt-topbar-polished .xt-account-picker[open] .xt-wallet{border-color:#5dd62c88!important;background:#1b2221!important}
html[data-appearance] body .xt-topbar-polished .xt-account-menu{position:absolute;top:calc(100% + 12px);right:0;left:auto;width:min(318px,calc(100vw - 24px));padding:7px;border:1px solid #343b40;background:#14181c!important;border-radius:16px;box-shadow:0 18px 50px #0009;z-index:600}
html[data-appearance] body .xt-topbar-polished .xt-account-menu button{display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;padding:15px;border:0;border-radius:10px;background:transparent;color:#e9eef2;font-size:12px;text-align:start}
html[data-appearance] body .xt-topbar-polished .xt-account-menu button:hover{background:#ffffff06}
html[data-appearance] body .xt-topbar-polished .xt-account-menu small{display:block;margin-top:5px;color:#83909c;font-size:10px;font-weight:400}
html[data-appearance] body .xt-topbar-polished .xt-account-menu strong{font-size:15px;color:#f2f4f5;direction:ltr;font-variant-numeric:tabular-nums}
html[data-appearance] body .xt-topbar-polished .xt-deposit{height:40px;min-height:40px;padding:0 16px;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#5dd62c!important;color:#102009!important;border:1px solid #5dd62c!important;box-shadow:none;font-size:12px;font-weight:700;white-space:nowrap}
html[data-appearance] body .xt-topbar-polished .xt-deposit i{font-size:12px}
html[data-appearance] body .xt-topbar-polished .xt-avatar{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;margin:0 0 0 3px;padding:0;border-radius:50%;border:1px solid #5dd62c66;background:#1b2420;color:#90dd73;overflow:hidden;box-shadow:0 0 0 3px #5dd62c08;font-size:15px}
html[data-appearance] body .xt-topbar-polished .xt-avatar img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
html[data-appearance] body .xt-topbar-polished .xt-header-unread{position:absolute;top:-4px;right:-4px;min-width:15px;height:15px;border-radius:8px;background:#5dd62c;color:#102009;border:2px solid #0c0e10;font:700 8px/11px Arial;text-align:center;padding:0 2px}
html[data-appearance] body .xt-topbar-polished .xt-header-unread[hidden]{display:none!important}
html[data-appearance] body .xt-topbar-polished :is(.xt-all-tools,.xt-icon-button,.xt-wallet,.xt-avatar):hover{border-color:#52614c!important;color:#f2f4f5}
@media(min-width:900px){html[data-appearance] body .xt-topbar.xt-topbar-polished{height:60px;padding:0 20px}}
@media(max-width:899px){
html[data-appearance] body .xt-topbar.xt-topbar-polished{height:70px!important;min-height:70px;padding:10px 14px!important}
html[data-appearance] body .xt-topbar-polished .xt-account-actions{width:100%;gap:10px!important}
html[data-appearance] body .xt-topbar-polished .xt-all-tools,html[data-appearance] body .xt-topbar-polished .xt-deposit{display:none!important}
html[data-appearance] body .xt-topbar-polished .xt-account-actions>.xt-avatar{order:-3;margin-right:auto;flex-basis:38px;width:38px;height:38px}
html[data-appearance] body .xt-topbar-polished .xt-icon-button{order:-2;width:38px!important;height:40px!important;border-radius:11px}
html[data-appearance] body .xt-topbar-polished .xt-account-picker{order:-1}
html[data-appearance] body .xt-topbar-polished .xt-wallet{grid-template-columns:28px minmax(0,1fr) 7px!important;grid-template-rows:13px 20px;min-width:184px!important;height:46px!important;padding:6px 10px!important;column-gap:8px!important;border-radius:12px!important}
html[data-appearance] body .xt-topbar-polished .xt-wallet>.xt-wallet-symbol{grid-column:1!important;grid-row:1/3!important;width:28px;height:28px;font-size:12px}
html[data-appearance] body .xt-topbar-polished .xt-wallet>span{grid-column:2!important;grid-row:1!important;font-size:9px!important}
html[data-appearance] body .xt-topbar-polished .xt-wallet strong{grid-column:2!important;grid-row:2!important;font-size:17px!important;line-height:20px!important}
html[data-appearance] body .xt-topbar-polished .xt-wallet small{font-size:8px!important;margin:0 0 0 auto!important}
}
@media(max-width:360px){html[data-appearance] body .xt-topbar.xt-topbar-polished{padding-inline:10px!important}html[data-appearance] body .xt-topbar-polished .xt-account-actions{gap:8px!important}html[data-appearance] body .xt-topbar-polished .xt-wallet{min-width:170px!important}html[data-appearance] body .xt-topbar-polished .xt-wallet strong{font-size:16px!important}}

html[data-appearance] body .xt-topbar-polished .xt-avatar img{width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;aspect-ratio:1;object-fit:cover!important}

html[data-appearance] body[data-xg-shell]>.xt-topbar-polished{display:flex!important;position:fixed;top:0;left:0;right:0;z-index:1200;--font-ui:Arial,sans-serif}
body[data-xg-shell] .xt-topbar-polished .xt-top-links{display:none}body[data-xg-shell] .xw-heading-actions>a{display:none}
@media(max-width:899px){html[data-appearance] body[data-xg-shell]{padding-top:70px!important}html[data-appearance] body[data-xg-shell]>.xt-topbar-polished{display:flex!important}body[data-xg-shell] .xt-topbar-polished .xt-brand{display:none!important}body[data-xg-shell] .xm-section-header nav>a:not(:last-child){display:none}}

body .xt-topbar-polished a{text-decoration:none!important}body .xt-topbar-polished .xt-account-menu form{margin:0;padding:0;background:transparent;border:0}

body .xt-topbar-polished,body .xt-topbar-polished *{box-sizing:border-box!important}body .xt-topbar-polished .xt-brand{margin:0;padding:0}body .xt-topbar-polished .xt-wallet{margin:0}body .xt-topbar-polished .xt-account-menu button{cursor:pointer}

body .xt-topbar-polished .xt-header-search{display:none!important}
@media(max-width:899px){html[data-appearance] body[data-xg-shell] .xt-topbar-polished .xt-account-picker{display:none!important}html[data-appearance] body[data-xg-shell] .xt-topbar-polished .xt-header-search{display:inline-flex!important;order:-1;width:auto!important;min-width:120px;flex-basis:auto;padding:0 13px;gap:9px;font-size:11px}html[data-appearance] body[data-xg-shell] .xt-header-search i{font-size:14px}body[data-xg-shell] .xw-heading-actions,body[data-xg-shell] .xm-section-header nav{display:none!important}}

body .xt-topbar-polished .xt-mobile-back{display:none!important}
@media(max-width:899px){html[data-appearance] body[data-xg-shell] .xt-topbar-polished .xt-mobile-back{display:inline-flex!important;order:-1;width:40px!important;padding:0;flex:0 0 40px}}
html[lang=ar] .xt-mobile-back svg{transform:rotate(180deg)}

@media(max-width:899px){html[data-appearance] body[data-xg-shell][data-xt-layout=home]>.xt-topbar-polished{display:none!important}html[data-appearance] body[data-xg-shell][data-xt-layout=home]{padding-top:0!important}html[data-appearance] body[data-xt-layout=home] .xw-heading-actions{display:flex!important;align-items:center;gap:9px}html[data-appearance] body[data-xt-layout=home] .xw-heading-actions>a{display:inline-flex!important}html[data-appearance] body[data-xt-layout=home] .xw-heading-actions>button{display:none!important}}

/* Keep the wallet notification bell centered when heading links use flex. */
/* Desktop terminal owns the viewport; legacy centered page containers must not constrain it. */
@media(min-width:900px){
 html:has(>body.xt-terminal){width:100%;height:100%;margin:0;padding:0;overflow:hidden}
 html[data-appearance] body.xt-terminal{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;height:100dvh!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;transform:none!important}
 html[data-appearance] body.xt-terminal>.xt-topbar{position:fixed!important;inset:0 0 auto!important;width:100%!important;max-width:none!important;height:60px!important;min-height:60px!important;margin:0!important;transform:none!important;z-index:1200}
 html[data-appearance] body.xt-terminal>.xt-workspace{position:fixed!important;inset:60px 0 26px 70px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 210px 58px!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;gap:0!important;box-sizing:border-box!important;transform:none!important}
 html[data-appearance] body.xt-terminal .xt-market{display:block!important;position:relative!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important}
 html[data-appearance] body.xt-terminal .xt-chart-card{position:relative!important;display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden}
 html[data-appearance] body.xt-terminal .xt-chart-stage{position:relative!important;flex:1 1 0!important;width:100%!important;height:auto!important;max-height:none!important;min-height:0!important}
 html[data-appearance] body.xt-terminal #chart-box{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;margin:0!important;padding:0!important}
 html[data-appearance] body.xt-terminal #chart-box>canvas.xt-second-canvas{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important}
 html[data-appearance] body.xt-terminal .xt-order-panel{width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important}
 html[data-appearance] body.xt-terminal .xt-order-panel .frow{display:block!important}
 html[data-appearance] body.xt-terminal>.xt-statusbar{position:fixed!important;inset:auto 0 0!important;width:100%!important;max-width:none!important;height:26px!important;margin:0!important;transform:none!important}
 html[data-appearance] body.xt-terminal>.platform-rail{position:fixed!important;left:0!important;top:60px!important;bottom:26px!important;width:70px!important;margin:0!important}
}
@media(min-width:900px) and (max-width:1100px){html[data-appearance] body.xt-terminal>.xt-workspace{grid-template-columns:minmax(0,1fr) 177px 54px!important}}
@media(min-width:1600px){html[data-appearance] body.xt-terminal>.xt-workspace{grid-template-columns:minmax(0,1fr) 230px 62px!important}}
html[data-appearance] body[data-xt-layout=home] .xw-heading-actions a[data-inbox-link]{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 38px;width:38px;height:38px;padding:0!important;border-radius:12px;line-height:1;position:relative;transition:background .18s,border-color .18s,box-shadow .18s}
html[data-appearance] body[data-xt-layout=home] .xw-notification-icon{display:block;width:19px;height:19px;flex:none}
html[data-appearance] body[data-xt-layout=home] .xw-notification-count{display:flex;align-items:center;justify-content:center;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;border:2px solid var(--xt-bg);font:700 9px/1 Arial,sans-serif;box-sizing:content-box}
html[data-appearance] body[data-xt-layout=home] .xw-notification-count[hidden]{display:none!important}
html[data-appearance] body[data-xt-layout=home] a[data-inbox-link]:hover{border-color:#5dd62c!important;box-shadow:0 0 0 3px #5dd62c12!important}
html[data-appearance] body[data-xt-layout=home] a[data-inbox-link]:focus-visible{outline:2px solid #329b1d;outline-offset:3px}
