/* XRBitcoin exchange/workbench shell v1.0
   Separate XRBitcoin project presentation layer.
   Mirrors the accepted XRBitcoinCash exchange-shell information architecture.
   Visual-only: no wallet, transaction, Xaman, quote, or ledger behavior.
*/

body.xrb-exchange-shell{
  --xrb-ex-bg:#08090b;
  --xrb-ex-sidebar:#0a0b0d;
  --xrb-ex-surface:#0d0f12;
  --xrb-ex-surface-2:#121419;
  --xrb-ex-surface-3:#1a1d22;
  --xrb-ex-border:#272a30;
  --xrb-ex-border-soft:#1c1f24;
  --xrb-ex-text:#f4f6f8;
  --xrb-ex-muted:#969eaa;
  --xrb-ex-blue:#4f7cff;
  --xrb-ex-blue-hover:#648cff;
  --xrb-ex-green:#28c980;
  --xrb-ex-yellow:#f0b94b;
  --xrb-ex-red:#ff5a6f;
  --xrb-ex-sidebar-width:220px;
  min-height:100dvh;
  box-sizing:border-box;
  padding-left:var(--xrb-ex-sidebar-width);
  background:var(--xrb-ex-bg)!important;
  background-image:none!important;
  color:var(--xrb-ex-text)!important;
}
html[data-theme="light"] body.xrb-exchange-shell{
  --xrb-ex-bg:#f7f8fa;
  --xrb-ex-sidebar:#fff;
  --xrb-ex-surface:#fff;
  --xrb-ex-surface-2:#f3f4f6;
  --xrb-ex-surface-3:#e9ebef;
  --xrb-ex-border:#d7dbe1;
  --xrb-ex-border-soft:#e6e8ec;
  --xrb-ex-text:#101216;
  --xrb-ex-muted:#66707d;
  --xrb-ex-blue:#315fd6;
  --xrb-ex-blue-hover:#244fbf;
  --xrb-ex-green:#0b8f58;
  --xrb-ex-yellow:#9a6715;
  --xrb-ex-red:#d73f55;
}

body.xrb-exchange-shell .xrb-header{
  position:fixed!important;
  inset:0 auto 0 0!important;
  z-index:90!important;
  width:var(--xrb-ex-sidebar-width)!important;
  height:100dvh!important;
  min-height:100dvh!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:10px!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:18px 12px 14px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  border:0!important;
  border-right:1px solid var(--xrb-ex-border)!important;
  background:var(--xrb-ex-sidebar)!important;
  background-image:none!important;
  box-shadow:none!important;
}
body.xrb-exchange-shell .xrb-header-top{
  display:contents!important;
}
body.xrb-exchange-shell .brand{
  order:1!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  min-height:54px!important;
  margin:0!important;
  padding:4px 6px 11px!important;
  border:0!important;
  border-bottom:1px solid var(--xrb-ex-border-soft)!important;
  color:var(--xrb-ex-text)!important;
  background:transparent!important;
  text-decoration:none!important;
}
body.xrb-exchange-shell .brand-mark{
  width:38px!important;
  height:38px!important;
  flex:0 0 38px!important;
  display:grid!important;
  place-items:center!important;
  border:0!important;
  border-radius:50%!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.xrb-exchange-shell .brand-mark img{
  width:38px!important;
  height:38px!important;
  object-fit:contain!important;
  border-radius:50%!important;
  filter:none!important;
}
body.xrb-exchange-shell .brand>span:last-child{
  min-width:0!important;
  color:var(--xrb-ex-text)!important;
  font-size:.94rem!important;
  font-weight:820!important;
  line-height:1.15!important;
  letter-spacing:-.02em!important;
}
body.xrb-exchange-shell .brand small{
  display:block!important;
  margin-top:3px!important;
  color:var(--xrb-ex-muted)!important;
  font-size:.56rem!important;
  font-weight:650!important;
  line-height:1.25!important;
  letter-spacing:.06em!important;
  white-space:normal!important;
}

body.xrb-exchange-shell .xrb-header-tools{
  order:2!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  width:100%!important;
  margin:0!important;
  padding:2px 0 8px!important;
  gap:4px!important;
  border:0!important;
  border-bottom:1px solid var(--xrb-ex-border-soft)!important;
  background:transparent!important;
}
body.xrb-exchange-shell .xrb-header-tools a{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:100%!important;
  min-height:38px!important;
  box-sizing:border-box!important;
  padding:8px 10px!important;
  border:1px solid transparent!important;
  border-radius:8px!important;
  background:transparent!important;
  color:#d7dbe2!important;
  font-size:.74rem!important;
  font-weight:700!important;
  line-height:1.2!important;
  text-align:left!important;
  text-decoration:none!important;
  white-space:normal!important;
}
body.xrb-exchange-shell .xrb-header-tools a:hover,
body.xrb-exchange-shell .xrb-header-tools a:focus-visible{
  border-color:var(--xrb-ex-border)!important;
  background:var(--xrb-ex-surface-2)!important;
  color:#fff!important;
  outline:none!important;
}
body.xrb-exchange-shell .xrb-header-tools a[aria-current="page"]{
  border-color:#183775!important;
  background:#102659!important;
  color:#78a0ff!important;
}
body.xrb-exchange-shell .xrb-header-tools a[href="#manageHeading"]{
  color:#9fc0ff!important;
}

body.xrb-exchange-shell .xrb-ecosystem-links{
  order:3!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0 0 8px!important;
  gap:4px!important;
  border-bottom:1px solid var(--xrb-ex-border-soft)!important;
}
body.xrb-exchange-shell .xrb-ecosystem-links a{
  display:flex!important;
  align-items:center!important;
  min-height:31px!important;
  box-sizing:border-box!important;
  padding:6px 8px!important;
  border:1px solid var(--xrb-ex-border-soft)!important;
  border-radius:7px!important;
  background:var(--xrb-ex-surface)!important;
  color:var(--xrb-ex-muted)!important;
  font-size:.61rem!important;
  font-weight:680!important;
  line-height:1.2!important;
  text-decoration:none!important;
}
body.xrb-exchange-shell .xrb-ecosystem-links a:hover{
  color:var(--xrb-ex-text)!important;
  border-color:var(--xrb-ex-border)!important;
}

body.xrb-exchange-shell .xrb-header-controls{
  order:4!important;
  margin-top:auto!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 42px!important;
  gap:6px!important;
  width:100%!important;
  align-items:stretch!important;
}
body.xrb-exchange-shell .xrb-header-controls.xrb-theme-only{
  grid-template-columns:1fr!important;
}
body.xrb-exchange-shell .xrb-connect-shortcut{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:42px!important;
  box-sizing:border-box!important;
  padding:8px 10px!important;
  border:1px solid var(--xrb-ex-blue)!important;
  border-radius:8px!important;
  background:var(--xrb-ex-blue)!important;
  color:#fff!important;
  font-size:.72rem!important;
  font-weight:800!important;
  text-decoration:none!important;
}
body.xrb-exchange-shell .xrb-connect-shortcut:hover{
  background:var(--xrb-ex-blue-hover)!important;
  border-color:var(--xrb-ex-blue-hover)!important;
}
body.xrb-exchange-shell #themeToggle.theme{
  width:42px!important;
  min-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid var(--xrb-ex-border)!important;
  border-radius:8px!important;
  background:var(--xrb-ex-surface-2)!important;
  color:var(--xrb-ex-text)!important;
  box-shadow:none!important;
}

body.xrb-exchange-shell main#main{
  box-sizing:border-box!important;
  width:auto!important;
  max-width:none!important;
  margin:0!important;
  padding:16px 18px 54px!important;
}
body.xrb-exchange-shell .xrb-hero{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:end!important;
  gap:18px!important;
  margin:0 0 10px!important;
  padding:7px 2px 12px!important;
  border:0!important;
  border-bottom:1px solid var(--xrb-ex-border-soft)!important;
  background:transparent!important;
}
body.xrb-exchange-shell .xrb-hero .eyebrow{
  margin:0 0 4px!important;
  color:#78a0ff!important;
  font-size:.64rem!important;
  letter-spacing:.09em!important;
}
body.xrb-exchange-shell .xrb-hero h1{
  max-width:none!important;
  margin:0!important;
  color:var(--xrb-ex-text)!important;
  font-size:1.7rem!important;
  line-height:1.08!important;
  letter-spacing:-.04em!important;
}
body.xrb-exchange-shell .xrb-hero h1 span{
  color:#78a0ff!important;
}
body.xrb-exchange-shell .xrb-hero p:last-child{
  margin:6px 0 0!important;
  color:var(--xrb-ex-muted)!important;
  font-size:.76rem!important;
  line-height:1.48!important;
}
body.xrb-exchange-shell .xrb-hero-status{
  max-width:240px!important;
  gap:7px!important;
  color:var(--xrb-ex-muted)!important;
  font-size:.65rem!important;
}
body.xrb-exchange-shell .hero-badge{
  padding:6px 9px!important;
  border:1px solid var(--xrb-ex-border)!important;
  border-radius:999px!important;
  background:var(--xrb-ex-surface-2)!important;
  color:#9fc0ff!important;
  box-shadow:none!important;
}

body.xrb-exchange-shell .xrb-workspace-nav{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  margin:0 0 10px!important;
  padding:0!important;
  overflow-x:auto!important;
  scrollbar-width:none!important;
}
body.xrb-exchange-shell .xrb-workspace-nav::-webkit-scrollbar{display:none}
body.xrb-exchange-shell .xrb-workspace-nav a{
  flex:0 0 auto!important;
  min-height:34px!important;
  padding:7px 10px!important;
  border:1px solid var(--xrb-ex-border)!important;
  border-radius:8px!important;
  background:var(--xrb-ex-surface-2)!important;
  color:var(--xrb-ex-text)!important;
  font-size:.68rem!important;
  font-weight:700!important;
  text-decoration:none!important;
}

body.xrb-exchange-shell :where(.panel,.card,.ownership-callout,.xrb-risk-summary,.xrb-technical-section){
  border-color:var(--xrb-ex-border)!important;
  border-radius:10px!important;
  background:var(--xrb-ex-surface)!important;
  background-image:none!important;
  box-shadow:none!important;
}
body.xrb-exchange-shell :where(.panel,.card):hover{
  border-color:#343841!important;
  box-shadow:none!important;
  transform:none!important;
}
body.xrb-exchange-shell :where(.eyebrow,.form-help,.muted,.panel p,.metric small){
  color:var(--xrb-ex-muted)!important;
}
body.xrb-exchange-shell :where(h1,h2,h3,strong){
  text-shadow:none!important;
}
body.xrb-exchange-shell .metrics{
  gap:7px!important;
}
body.xrb-exchange-shell .metric{
  border-color:var(--xrb-ex-border-soft)!important;
  border-radius:8px!important;
  background:var(--xrb-ex-surface-2)!important;
  box-shadow:none!important;
}
body.xrb-exchange-shell .metric strong{color:var(--xrb-ex-text)!important}

body.xrb-exchange-shell .xrb-trading-grid{
  grid-template-columns:minmax(0,1fr) minmax(330px,370px)!important;
  gap:12px!important;
  align-items:start!important;
}
body.xrb-exchange-shell .xrb-market-column,
body.xrb-exchange-shell .xrb-action-column{
  min-width:0!important;
}
body.xrb-exchange-shell .xrb-action-column>section[aria-labelledby="manageHeading"]{
  position:sticky!important;
  top:16px!important;
  z-index:12!important;
}
body.xrb-exchange-shell .xrb-action-column .panel{
  padding:16px!important;
}
body.xrb-exchange-shell .tabs{
  border:1px solid var(--xrb-ex-border)!important;
  border-radius:9px!important;
  background:var(--xrb-ex-surface-2)!important;
}
body.xrb-exchange-shell .tabs button{
  border-color:transparent!important;
  background:transparent!important;
  color:#cdd2da!important;
  box-shadow:none!important;
}
body.xrb-exchange-shell .tabs button[aria-pressed="true"]{
  background:#f4f6f8!important;
  color:#0c0d0f!important;
}
html[data-theme="light"] body.xrb-exchange-shell .tabs button[aria-pressed="true"]{
  background:#101216!important;
  color:#fff!important;
}
body.xrb-exchange-shell :where(button,input,select,textarea){
  border-color:var(--xrb-ex-border)!important;
  box-shadow:none!important;
}
body.xrb-exchange-shell :where(input,select,textarea){
  background:var(--xrb-ex-surface-2)!important;
  color:var(--xrb-ex-text)!important;
}
body.xrb-exchange-shell :where(input,select,textarea):focus{
  outline:none!important;
  border-color:var(--xrb-ex-blue)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--xrb-ex-blue) 24%,transparent)!important;
}
body.xrb-exchange-shell .primary,
body.xrb-exchange-shell .btn.glow-blue{
  background:var(--xrb-ex-blue)!important;
  border-color:var(--xrb-ex-blue)!important;
  color:#fff!important;
  box-shadow:none!important;
}
body.xrb-exchange-shell .primary:hover:not(:disabled),
body.xrb-exchange-shell .btn.glow-blue:hover:not(:disabled){
  background:var(--xrb-ex-blue-hover)!important;
  border-color:var(--xrb-ex-blue-hover)!important;
}

body.xrb-exchange-shell footer{
  width:auto!important;
  max-width:none!important;
  margin:0!important;
  border-top-color:var(--xrb-ex-border)!important;
  background:var(--xrb-ex-bg)!important;
  box-shadow:none!important;
}

@media(max-width:1180px){
  body.xrb-exchange-shell{
    --xrb-ex-sidebar-width:188px;
  }
  body.xrb-exchange-shell .xrb-trading-grid{
    grid-template-columns:minmax(0,1fr) minmax(300px,340px)!important;
  }
}
/* Shared XRBC layout: keep the scrollable left rail above 900px. */
@media(max-width:900px){
  body.xrb-exchange-shell{
    padding-left:0!important;
  }
  body.xrb-exchange-shell .xrb-header{
    position:sticky!important;
    inset:0 auto auto 0!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    padding:9px 12px!important;
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    align-items:center!important;
    gap:7px 9px!important;
    overflow:visible!important;
    border-right:0!important;
    border-bottom:1px solid var(--xrb-ex-border)!important;
  }
  body.xrb-exchange-shell .xrb-header-top{
    display:contents!important;
  }
  body.xrb-exchange-shell .brand{
    grid-column:1!important;
    grid-row:1!important;
    min-height:40px!important;
    padding:0!important;
    border:0!important;
  }
  body.xrb-exchange-shell .brand>span:last-child{
    display:none!important;
  }
  body.xrb-exchange-shell .xrb-header-tools{
    grid-column:1/-1!important;
    grid-row:2!important;
    flex-direction:row!important;
    overflow-x:auto!important;
    gap:4px!important;
    padding:0!important;
    border:0!important;
    scrollbar-width:none!important;
  }
  body.xrb-exchange-shell .xrb-header-tools::-webkit-scrollbar{display:none}
  body.xrb-exchange-shell .xrb-header-tools a{
    width:auto!important;
    flex:0 0 auto!important;
    min-height:38px!important;
    padding:7px 9px!important;
  }
  body.xrb-exchange-shell .xrb-ecosystem-links{
    display:none!important;
  }
  body.xrb-exchange-shell .xrb-header-controls{
    grid-column:3!important;
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    width:auto!important;
    margin:0!important;
  }
  body.xrb-exchange-shell .xrb-connect-shortcut{
    min-height:40px!important;
    padding:7px 10px!important;
  }
  body.xrb-exchange-shell #themeToggle.theme{
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
  }
  body.xrb-exchange-shell main#main{
    padding:10px 12px 44px!important;
  }
  body.xrb-exchange-shell .xrb-trading-grid{
    grid-template-columns:1fr!important;
  }
  body.xrb-exchange-shell .xrb-action-column>section[aria-labelledby="manageHeading"]{
    position:static!important;
  }
}
@media(max-width:680px){
  body.xrb-exchange-shell .xrb-header{
    padding:8px!important;
  }
  body.xrb-exchange-shell main#main{
    padding:8px 8px 88px!important;
  }
  body.xrb-exchange-shell .xrb-hero{
    grid-template-columns:1fr!important;
  }
  body.xrb-exchange-shell .xrb-hero-status{
    display:none!important;
  }
  body.xrb-exchange-shell .xrb-hero h1{
    font-size:1.45rem!important;
  }
  body.xrb-exchange-shell .metrics{
    grid-template-columns:1fr 1fr!important;
  }
}
@media(max-width:460px){
  body.xrb-exchange-shell .xrb-connect-shortcut{
    font-size:.66rem!important;
    padding:7px 8px!important;
  }
  body.xrb-exchange-shell .metrics{
    grid-template-columns:1fr!important;
  }
}


/* XRBitcoin read-only security reference — same navigation shell, compact reference workspace. */
body.xrb-exchange-shell.xrb-security-shell main#main{
  width:100%!important;
  max-width:1320px!important;
  margin:0 auto!important;
  padding:18px 18px 54px!important;
}
body.xrb-exchange-shell.xrb-security-shell .hero{
  padding:14px 2px 18px!important;
  border-bottom:1px solid var(--xrb-ex-border-soft)!important;
}
body.xrb-exchange-shell.xrb-security-shell .hero h1{
  margin-bottom:12px!important;
  font-size:clamp(1.8rem,3vw,2.8rem)!important;
}
body.xrb-exchange-shell.xrb-security-shell .lead{
  max-width:840px!important;
  color:var(--xrb-ex-muted)!important;
  font-size:.92rem!important;
}
body.xrb-exchange-shell.xrb-security-shell .badges{
  margin:16px 0!important;
}
body.xrb-exchange-shell.xrb-security-shell .card,
body.xrb-exchange-shell.xrb-security-shell .notice{
  background:var(--xrb-ex-surface)!important;
  border-color:var(--xrb-ex-border)!important;
  box-shadow:none!important;
}
body.xrb-exchange-shell.xrb-security-shell .destination{
  background:var(--xrb-ex-surface-2)!important;
  border-color:var(--xrb-ex-border)!important;
}
body.xrb-exchange-shell.xrb-security-shell footer.wrap{
  width:100%!important;
  max-width:1320px!important;
  margin:0 auto!important;
  padding-left:18px!important;
  padding-right:18px!important;
}


/* XRBitcoin wallet + token identity repair v1.1 */
body.xrb-exchange-shell .xrb-action-column #xrb-wallet{margin:0 0 12px!important;scroll-margin-top:18px}
body.xrb-exchange-shell .xrb-wallet-connect-panel{padding:14px!important}
body.xrb-exchange-shell .wallet-connect-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center}
body.xrb-exchange-shell .wallet-connect-actions #connectBtn{min-width:0}
body.xrb-exchange-shell .wallet-details-link{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 10px;border:1px solid var(--xrb-ex-border);border-radius:8px;background:var(--xrb-ex-surface-2);color:var(--xrb-ex-text);font-size:.7rem;font-weight:750;text-decoration:none}
body.xrb-exchange-shell .wallet-security-notice{display:grid;grid-template-columns:24px minmax(0,1fr);gap:8px;align-items:start;margin-top:9px;padding:9px 10px;border:1px solid color-mix(in srgb,var(--xrb-ex-yellow) 55%,var(--xrb-ex-border));border-radius:8px;background:color-mix(in srgb,var(--xrb-ex-yellow) 8%,var(--xrb-ex-surface));color:var(--xrb-ex-text);font-size:.68rem;line-height:1.45}
body.xrb-exchange-shell .wallet-security-notice[hidden]{display:none!important}
body.xrb-exchange-shell .wallet-security-notice p{margin:0}
body.xrb-exchange-shell .wallet-security-icon{color:var(--xrb-ex-yellow);font-weight:900}
body.xrb-exchange-shell .wallet-security-countdown{color:var(--xrb-ex-red);font-weight:850;white-space:nowrap}
body.xrb-exchange-shell #walletWaitStatus{min-height:1.1em;margin:6px 0 0}
body.xrb-exchange-shell .xrb-wallet-details-panel{margin-top:12px!important;scroll-margin-top:18px}
body.xrb-exchange-shell .xrb-pair-heading{display:flex;align-items:center;gap:9px;min-width:0}
body.xrb-exchange-shell .xrb-pair-heading h2{margin:0!important}
body.xrb-exchange-shell .xrb-pair-icons{display:inline-flex;align-items:center;flex:0 0 auto}
body.xrb-exchange-shell .xrb-pair-icons img{width:24px;height:24px;object-fit:contain;border-radius:50%;background:var(--xrb-ex-surface-2)}
body.xrb-exchange-shell .xrb-pair-icons img+img{margin-left:-6px}
body.xrb-exchange-shell .xrb-pair-icons.compact img{width:26px;height:26px}
body.xrb-exchange-shell .xrb-token-label,body.xrb-exchange-shell .xrb-balance-label{display:inline-flex!important;align-items:center;gap:6px}
body.xrb-exchange-shell .xrb-token-label img,body.xrb-exchange-shell .xrb-balance-label img,body.xrb-exchange-shell .token-unit .token-icon{width:16px;height:16px;object-fit:contain;border-radius:50%}
body.xrb-exchange-shell .token-unit .token-icon{width:20px;height:20px}
@media(max-width:850px){body.xrb-exchange-shell #xrb-wallet{order:0!important}body.xrb-exchange-shell .xrb-action-column>section[aria-labelledby="manageHeading"]{order:1!important}body.xrb-exchange-shell .xrb-wallet-details-panel{order:2!important}}
@media(max-width:520px){body.xrb-exchange-shell .wallet-connect-actions{grid-template-columns:1fr 1fr}body.xrb-exchange-shell .wallet-connect-actions #connectBtn{grid-column:1/-1}}
