
/* Demo shell layout: grid rhythm, topbar, sidebar, metrics bar, typography */
:root{
  --sidebar-w:260px;
  --header-h:56px;
  --subbar-h:52px;
}
body{
  grid-template-rows:56px 52px auto!important;
  grid-template-columns:260px minmax(0,1fr)!important;
}
#unifiedTopbar.terminal-topbar, #header.terminal-topbar{
  min-height:56px!important;
  height:56px!important;
  padding:0 16px!important;
}
.section-metrics-bar{
  min-height:52px!important;
  height:52px!important;
  padding:0 18px!important;
}
#sidebar{
  width:260px;
}
#main{
  padding:0!important;
  padding-bottom:0!important;
}
.terminal-topbar .brand-logo{
  width:34px!important;
  height:34px!important;
  border-radius:10px!important;
  font-size:16px!important;
}
.terminal-topbar .brand-title{
  font-size:22px!important;
  font-weight:900!important;
  letter-spacing:-.03em!important;
  line-height:1!important;
}
.terminal-topbar .brand-sub{
  font-size:10px!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
}
.terminal-topbar .topnav-link{
  height:36px!important;
  padding:0 14px!important;
  border-radius:10px!important;
  font-size:13px!important;
  font-weight:900!important;
}
.terminal-topbar .quick-metric{
  min-width:138px!important;
  padding:7px 10px!important;
  border-radius:10px!important;
}
.terminal-topbar .quick-metric .label{
  font-size:9.5px!important;
  font-weight:900!important;
  letter-spacing:.08em!important;
}
.terminal-topbar .quick-metric .value{
  font-size:12px!important;
  font-weight:900!important;
}
.terminal-topbar .theme-toggle.icon-only{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  border-radius:10px!important;
}
.metric-title-icon{
  width:30px!important;
  height:30px!important;
  border-radius:8px!important;
  flex-basis:30px!important;
}
.metric-strip-heading{
  font-size:15px!important;
  font-weight:900!important;
  letter-spacing:-.02em!important;
}
.metric-title-sep{
  height:18px!important;
}
.metric-strip-label{
  font-size:9.5px!important;
  line-height:1!important;
  font-weight:700!important;
  letter-spacing:.1em!important;
}
.metric-strip-value{
  font-size:13px!important;
  line-height:1.1!important;
  font-weight:700!important;
}
.metric-strip-stats .metric-strip-item{
  min-width:148px!important;
  padding:0 22px!important;
}
.sb-section{
  padding:14px 14px 10px!important;
}
.sb-label{
  font-size:9.5px!important;
  letter-spacing:.12em!important;
  font-weight:700!important;
  margin-bottom:10px!important;
}
.sidebar-title{
  font-size:15px!important;
  font-weight:900!important;
  letter-spacing:-.02em!important;
}
.sidebar-sub,
.side-link small,
.hero-email{
  font-size:11px!important;
}
.side-link{
  min-height:38px!important;
  padding-left:10px!important;
  padding-right:10px!important;
  border-radius:9px!important;
  font-size:12px!important;
  font-weight:800!important;
}
.side-link b{
  font-size:12px!important;
}
.avatar-xl{
  width:60px!important;
  height:60px!important;
  border-radius:16px!important;
}
.section-toolbar{
  padding:14px 16px!important;
}
.section-toolbar h2{
  font-size:16px!important;
  font-weight:900!important;
  letter-spacing:-.02em!important;
}
.section-toolbar p,
.card-sub,
.kpi-sub{
  font-size:12px!important;
}
.card-title{
  font-size:15px!important;
  font-weight:900!important;
  letter-spacing:-.02em!important;
}
.panel-grid{
  gap:12px!important;
  padding:14px!important;
}
.panel-card{
  border-radius:14px!important;
  padding:14px!important;
}
.kpi-grid{
  gap:10px!important;
  margin-bottom:14px!important;
}
.kpi-card{
  border-radius:13px!important;
  padding:13px!important;
}
.kpi-label{
  font-size:9.5px!important;
  font-weight:800!important;
  letter-spacing:.1em!important;
}
.kpi-value{
  font-size:22px!important;
  font-weight:900!important;
}
.action-btn{
  height:32px!important;
  padding:0 12px!important;
  border-radius:8px!important;
  font-size:12px!important;
  font-weight:900!important;
}
@media(max-width:1100px){
  body{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:56px 52px auto!important;
    grid-template-areas:"header" "subbar" "main"!important;
  }
  #sidebar{
    width:min(330px,86vw)!important;
    top:108px!important;
  }
  #sidebar-backdrop{
    inset:108px 0 0 0!important;
  }
  .section-metrics-bar{
    overflow-x:auto;
    justify-content:flex-start;
  }
}
@media(max-width:700px){
  body{display:block!important;}
  #unifiedTopbar.terminal-topbar, #header.terminal-topbar{
    height:56px!important;
    min-height:56px!important;
    padding:0 10px!important;
  }
  .section-metrics-bar{
    top:56px!important;
    height:auto!important;
    min-height:52px!important;
    flex-direction:column!important;
    align-items:stretch!important;
    padding:0!important;
    overflow-x:hidden!important;
  }
  #main{padding:12px!important;padding-bottom:36px!important;}
}


:root{
  --sidebar-w:260px!important;
  --topnav-h:56px;
  --header-h:52px!important;
  --subbar-h:52px!important;
}
body{
  grid-template-rows:56px 52px auto!important;
  grid-template-columns:260px minmax(0,1fr)!important;
  grid-template-areas:"topnav topnav" "subbar subbar" "sidebar main"!important;
}
#unifiedTopbar.terminal-topbar, #header.terminal-topbar{
  grid-area:topnav!important;
  min-height:56px!important;
  height:56px!important;
  display:grid!important;
  grid-template-columns:minmax(220px,280px) minmax(0,1fr) auto!important;
  gap:16px!important;
  align-items:center!important;
  align-content:center!important;
  padding:0 16px!important;
}
.terminal-topbar .topbar-left,.terminal-topbar .brand,.terminal-topbar .topbar-right{gap:10px!important}
.terminal-topbar .quick-metric.user-balance{
  min-width:138px!important;
  padding:7px 10px!important;
  border-radius:10px!important;
  line-height:normal!important;
}
.terminal-topbar .quick-metric .label{font-size:9.5px!important;font-weight:900!important;letter-spacing:.08em!important;line-height:normal!important}
.terminal-topbar .quick-metric .value{font-size:12px!important;font-weight:900!important;line-height:normal!important}
.terminal-topbar .theme-toggle.icon-only{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  padding:0!important;
  border-radius:10px!important;
  display:inline-grid!important;
  place-items:center!important;
}
.terminal-topbar .theme-toggle.icon-only .theme-toggle-icon,.terminal-topbar .theme-toggle.icon-only .theme-toggle-icon svg{width:14px!important;height:14px!important;display:block!important}
.section-metrics-bar{
  grid-area:subbar!important;
  min-height:52px!important;
  height:52px!important;
  top:56px!important;
  padding:0 18px!important;
  position:sticky!important;
}
.metric-strip-title{
  min-width:0!important;
  max-width:none!important;
  flex:1 1 auto!important;
  align-self:stretch!important;
  padding-right:18px!important;
}
.metric-title-icon{width:30px!important;height:30px!important;border-radius:8px!important;flex:0 0 30px!important}
.metric-strip-heading{font-size:15px!important;line-height:1!important;font-weight:900!important;letter-spacing:-.02em!important}
.metric-title-row{min-height:24px!important;gap:10px!important}
.metric-title-row::after{height:18px!important}
.metric-title-status{height:24px!important;font-size:11px!important;font-weight:900!important}
.metric-strip-stats{align-self:stretch!important;display:flex!important;align-items:stretch!important;gap:0!important;flex-shrink:0!important}
.metric-strip-stats .metric-strip-item{
  min-width:148px!important;
  height:auto!important;
  align-self:stretch!important;
  padding:0 22px!important;
  gap:4px!important;
}
#sidebar{grid-area:sidebar!important;width:260px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
#sidebarContent{flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden}
#sidebarContent::-webkit-scrollbar{width:3px}
#sidebarContent::-webkit-scrollbar-thumb{background:var(--panel-edge)}
#global-monitor-panel{flex-shrink:0;border-top:1px solid var(--line)}
#main{grid-area:main!important;min-height:0!important;overflow:visible!important;padding:0!important;padding-bottom:0!important}
.content-shell{border-radius:0!important;border-left:0!important;border-right:0!important;border-bottom:0!important}

@media(max-width:1100px){
  body{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:56px 52px auto!important;grid-template-areas:"topnav" "subbar" "main"!important}
  #unifiedTopbar.terminal-topbar, #unifiedTopbar.terminal-topbar,#header.terminal-topbar{grid-template-columns:minmax(0,1fr) auto!important}
  #sidebar{width:min(330px,86vw)!important;top:108px!important}
  #sidebar-backdrop{inset:108px 0 0 0!important}
  .section-metrics-bar{top:56px!important;overflow-x:auto!important;justify-content:flex-start!important}
  .metric-strip-title{min-width:320px!important;max-width:420px!important;position:sticky!important;left:0!important;z-index:2!important}
}
@media(max-width:700px){
  body{display:block!important}
  #unifiedTopbar.terminal-topbar, #unifiedTopbar.terminal-topbar,#header.terminal-topbar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    z-index:100!important;
    height:56px!important;
    min-height:56px!important;
    padding:8px 10px!important;
  }
  #sectionMetricsBar{margin-top:56px!important}
  .section-metrics-bar{position:sticky!important;top:56px!important;height:auto!important;min-height:52px!important;flex-direction:column!important;align-items:stretch!important;padding:0!important;overflow-x:hidden!important;}
  #sidebar{top:56px!important}
  #sidebar-backdrop{inset:56px 0 0 0!important}
  #main{padding:0!important;padding-bottom:0!important}
}

/* shared unified header class */
.terminal-topbar.topnav,.topnav.terminal-topbar{
  grid-area:topnav!important;
  min-height:56px!important;
  height:56px!important;
  display:grid!important;
  grid-template-columns:minmax(220px,280px) minmax(0,1fr) auto!important;
  gap:16px!important;
  align-items:center!important;
  align-content:center!important;
  padding:0 16px!important;
  background:rgba(15,19,32,.96);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(10px);
  position:sticky;
  top:0;
  z-index:40;
}
:root[data-theme="light"] .terminal-topbar.topnav,:root[data-theme="light"] .topnav.terminal-topbar{background:rgba(255,255,255,.96)}
.terminal-topbar .topbar-right.topnav-right{display:flex!important;align-items:center!important;gap:10px!important;justify-content:flex-end!important}
.terminal-topbar.auth-topbar-mode{
  grid-template-columns:minmax(220px,280px) minmax(0,1fr) 34px!important;
  position:sticky!important;
}
.terminal-topbar.auth-topbar-mode .topnav-main{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  justify-self:auto!important;
  margin:0!important;
}
.terminal-topbar.auth-topbar-mode .topbar-right.topnav-right{
  justify-self:end!important;
}
.terminal-topbar .unified-theme-btn.icon-only{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  padding:0!important;
  border-radius:10px!important;
  background:var(--panel-high)!important;
  border:1px solid var(--line)!important;
  color:var(--fg-dim)!important;
  display:inline-grid!important;
  place-items:center!important;
}
.terminal-topbar .unified-theme-btn.icon-only:hover{color:var(--fg)!important;border-color:var(--line-strong)!important}
.terminal-topbar .topnav-logout-btn{
  height:34px!important;
  padding:0 12px!important;
  border-radius:10px!important;
  border:1px solid var(--down-border)!important;
  background:var(--down-bg)!important;
  color:var(--down)!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1!important;
  white-space:nowrap!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  transition:filter .15s,border-color .15s,color .15s!important;
}
.terminal-topbar .topnav-logout-btn:hover{
  filter:brightness(1.12)!important;
  border-color:color-mix(in srgb,var(--down) 45%,var(--down-border))!important;
}
@media(max-width:1100px){.terminal-topbar.topnav,.topnav.terminal-topbar{grid-template-columns:minmax(0,1fr) auto!important}.terminal-topbar .topnav-main{display:none!important}.terminal-topbar .user-balance{display:none!important}.terminal-topbar.auth-topbar-mode{grid-template-columns:minmax(0,1fr) auto!important}}
@media(max-width:700px){.terminal-topbar.topnav,.topnav.terminal-topbar{display:flex!important;gap:8px!important;padding:8px 10px!important}.terminal-topbar .topnav-logout-btn{width:34px!important;min-width:34px!important;padding:0!important;font-size:0!important}.terminal-topbar .topnav-logout-btn::before{content:'';display:block;width:15px;height:15px;background-repeat:no-repeat;background-position:center;background-size:15px 15px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M14 7V5a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-2' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10 12h10' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='m17 7 5 5-5 5' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}}

/* shared unified header exact final button */
.terminal-topbar .unified-theme-btn.icon-only{box-sizing:border-box!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;padding:0!important}
.mobile-menu-btn svg{display:block;width:15px;height:15px}

/* Scanner page: subbar is hidden, so sidebar/backdrop start right below topbar */
body.scanner-page-active #sidebar{top:56px!important;}
body.scanner-page-active #sidebar-backdrop{inset:56px 0 0 0!important;}

/* Scanner frame: align with fixed header on mobile */
@media(max-width:1100px){
  body.scanner-page-active .scanner-frame-root{top:56px!important;}
}


/* ── Mobile sidebar accordion ─────────────────────────────── */
/* Mobile nav hidden on desktop, shown in hamburger sidebar */
.mob-sidebar-nav { display: none; }
.desk-sidebar-nav { display: block; }

@media(max-width:1100px) {
  .hero-profile { display: none !important; }
  .mob-sidebar-nav { display: block; }
  .desk-sidebar-nav { display: none; }
}

/* Accordion container */
.mob-accordion {
  padding: 8px 0;
}

/* Each top-level item */
.mob-acc-item {
  border-bottom: 1px solid var(--line);
}
.mob-acc-item:last-child { border-bottom: 0; }

/* Header button (page name row) */
.mob-acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--fg-dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s;
  text-align: left;
}
.mob-acc-head:hover,
.mob-acc-item.is-open > .mob-acc-head,
.mob-acc-item.is-active-page > .mob-acc-head { color: var(--fg); }

/* Arrow */
.mob-acc-arr {
  font-style: normal;
  font-size: 14px;
  color: var(--fg-mute);
  flex-shrink: 0;
  transition: transform .2s;
  line-height: 1;
}
.mob-acc-item.is-open > .mob-acc-head > .mob-acc-arr { color: var(--brand); }

/* Active dot for no-child pages */
.mob-acc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

/* Collapsible body */
.mob-acc-body {
  display: none;
  padding: 0 10px 10px;
}
.mob-acc-item.is-open > .mob-acc-body { display: block; }

/* Group label inside body */
.mob-acc-group-label {
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--fg-mute);
  padding: 8px 6px 6px;
}

/* Subsection button */
.mob-acc-sub {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  margin-bottom: 3px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-dim);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s, color .15s;
}
.mob-acc-sub:hover {
  background: var(--panel-high);
  border-color: var(--line);
  color: var(--fg);
}
.mob-acc-sub.is-current {
  background: var(--panel-high);
  border-color: var(--line);
  color: var(--fg);
}

/* Badge in subsection */
.mob-acc-badge {
  font-style: normal;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--fg-mute);
  flex-shrink: 0;
}

/* Active page highlight on no-child header */
.mob-acc-item.is-active-page > .mob-acc-head {
  color: var(--brand);
}

/* Keep sidebar independent from page scrolling. */
html,
body{
  height:100vh!important;
  min-height:100vh!important;
  overflow:hidden!important;
}

body{
  grid-template-rows:56px 52px minmax(0,1fr)!important;
}

#sidebar,
#main{
  min-height:0!important;
}

#main{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
}

#sidebarContent{
  overscroll-behavior:contain;
}

@media(max-width:1100px){
  body{
    grid-template-rows:56px 52px minmax(0,1fr)!important;
  }
}

@media(max-width:700px){
  html,
  body{
    height:100dvh!important;
    min-height:100dvh!important;
    overflow:hidden!important;
  }

  #main{
    height:calc(100dvh - 108px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
}

/* Refined shell refresh for demo pages only. Scanner iframe keeps its own UI. */
body:not(.scanner-page-active) .terminal-topbar.topnav,
body:not(.scanner-page-active) .topnav.terminal-topbar{
  padding:0 18px!important;
  background:color-mix(in srgb,var(--panel) 94%,var(--bg))!important;
  border-bottom:1px solid var(--line-strong)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.035) inset!important;
  backdrop-filter:blur(14px)!important;
}

:root[data-theme="light"] body:not(.scanner-page-active) .terminal-topbar.topnav,
:root[data-theme="light"] body:not(.scanner-page-active) .topnav.terminal-topbar{
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 1px 0 rgba(15,23,42,.04)!important;
}

body:not(.scanner-page-active) .terminal-topbar .brand{gap:11px!important}
body:not(.scanner-page-active) .terminal-topbar .brand-logo{
  width:34px!important;
  height:34px!important;
  border-radius:10px!important;
  background:var(--fg)!important;
  color:var(--bg)!important;
  box-shadow:none!important;
}
body:not(.scanner-page-active) .terminal-topbar .brand-logo::after{display:none!important}
body:not(.scanner-page-active) .terminal-topbar .brand-title{font-size:14px!important;letter-spacing:-.02em!important}
body:not(.scanner-page-active) .terminal-topbar .brand-sub{color:var(--fg-mute)!important;letter-spacing:.1em!important}

body:not(.scanner-page-active) .terminal-topbar .topnav-main{
  justify-self:center!important;
  justify-content:center!important;
  gap:2px!important;
  height:38px!important;
  padding:3px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--panel-sunken)!important;
  box-shadow:none!important;
}

body:not(.scanner-page-active) .terminal-topbar .topnav-link{
  height:30px!important;
  padding:0 12px!important;
  border-radius:7px!important;
  color:var(--fg-mute)!important;
  font-size:12px!important;
  border:1px solid transparent!important;
  background:transparent!important;
  box-shadow:none!important;
}

body:not(.scanner-page-active) .terminal-topbar .topnav-link:hover{
  color:var(--fg)!important;
  background:var(--panel-high)!important;
  border-color:var(--line)!important;
}

body:not(.scanner-page-active) .terminal-topbar .topnav-link.active{
  color:var(--fg)!important;
  background:var(--panel-high)!important;
  border-color:var(--line-strong)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset!important;
}

body:not(.scanner-page-active) .terminal-topbar .quick-metric.user-balance{
  min-width:148px!important;
  padding:6px 10px!important;
  border-radius:9px!important;
  background:var(--panel-sunken)!important;
  border-color:var(--line)!important;
  box-shadow:none!important;
}

body:not(.scanner-page-active) .terminal-topbar .quick-metric.user-balance .label{color:var(--fg-mute)!important}
body:not(.scanner-page-active) .terminal-topbar .quick-metric.user-balance .value{color:var(--up)!important}
body:not(.scanner-page-active) .terminal-topbar .unified-theme-btn.icon-only,
body:not(.scanner-page-active) .terminal-topbar .topnav-logout-btn{
  border-radius:9px!important;
  box-shadow:none!important;
}

body:not(.scanner-page-active) #sidebar{
  background:var(--sidebar)!important;
  border-right:1px solid var(--line-strong)!important;
  box-shadow:none!important;
}

:root[data-theme="light"] body:not(.scanner-page-active) #sidebar{background:#f8fafc!important}
body:not(.scanner-page-active) #sidebarContent{padding:12px 10px!important}

body:not(.scanner-page-active) .sb-section{
  margin:0 0 12px!important;
  padding:0 0 12px!important;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

body:not(.scanner-page-active) .sb-section:last-child{border-bottom:0!important}
body:not(.scanner-page-active) .hero-profile{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr)!important;
  grid-template-areas:"avatar name" "avatar email" "badges badges"!important;
  column-gap:10px!important;
  row-gap:2px!important;
  align-items:center!important;
  padding:2px 2px 14px!important;
  text-align:left!important;
  overflow:visible!important;
}

body:not(.scanner-page-active) .hero-profile::before{display:none!important}
body:not(.scanner-page-active) .avatar-xl{
  grid-area:avatar!important;
  width:42px!important;
  height:42px!important;
  margin:0!important;
  border-radius:12px!important;
  background:var(--panel-high)!important;
  border:1px solid var(--line-strong)!important;
  box-shadow:none!important;
  color:var(--fg)!important;
}

body:not(.scanner-page-active) .hero-name{grid-area:name!important;font-size:13px!important;font-weight:900!important;letter-spacing:-.01em!important}
body:not(.scanner-page-active) .hero-email{grid-area:email!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body:not(.scanner-page-active) .hero-badges{grid-area:badges!important;justify-content:flex-start!important;margin-top:8px!important}
body:not(.scanner-page-active) .sb-label,
body:not(.scanner-page-active) .mob-acc-group-label{color:var(--fg-faint)!important;padding-left:2px!important}

body:not(.scanner-page-active) .side-link{
  position:relative!important;
  min-height:38px!important;
  margin-bottom:4px!important;
  padding:0 9px 0 12px!important;
  border-radius:8px!important;
  background:transparent!important;
  border:1px solid transparent!important;
  overflow:hidden!important;
}

body:not(.scanner-page-active) .side-link::before{
  content:'';
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:2px;
  border-radius:99px;
  background:transparent;
}

body:not(.scanner-page-active) .side-link:hover{
  background:var(--panel-sunken)!important;
  border-color:var(--line)!important;
  color:var(--fg)!important;
}

body:not(.scanner-page-active) .side-link.is-current,
body:not(.scanner-page-active) .side-link[aria-selected="true"]{
  background:var(--panel-high)!important;
  border-color:var(--line-strong)!important;
  color:var(--fg)!important;
  box-shadow:none!important;
}

body:not(.scanner-page-active) .side-link.is-current::before,
body:not(.scanner-page-active) .side-link[aria-selected="true"]::before{background:var(--brand)}
body:not(.scanner-page-active) .side-link em,
body:not(.scanner-page-active) .mob-acc-badge{
  min-width:18px!important;
  height:18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid var(--line)!important;
  background:var(--panel-sunken)!important;
  border-radius:5px!important;
  padding:0 5px!important;
  line-height:1!important;
}

body:not(.scanner-page-active) #global-monitor-panel{
  margin:0 10px 10px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--panel-sunken)!important;
  overflow:hidden!important;
}

body:not(.scanner-page-active) .mobile-menu-btn{
  border-radius:8px!important;
  background:var(--panel-sunken)!important;
  border-color:var(--line)!important;
}

@media(max-width:1100px){
  body:not(.scanner-page-active) #sidebar{padding:10px!important;background:var(--sidebar)!important}
  body:not(.scanner-page-active) #sidebarContent{padding:0!important}
  body:not(.scanner-page-active) .mob-accordion{display:grid!important;gap:6px!important;padding:0!important}
  body:not(.scanner-page-active) .mob-acc-item{border:1px solid var(--line)!important;border-radius:10px!important;overflow:hidden!important;background:transparent!important}
  body:not(.scanner-page-active) .mob-acc-head{padding:12px 13px!important;color:var(--fg-dim)!important}
  body:not(.scanner-page-active) .mob-acc-item.is-open>.mob-acc-head,
  body:not(.scanner-page-active) .mob-acc-item.is-active-page>.mob-acc-head{color:var(--fg)!important;background:var(--panel-high)!important}
  body:not(.scanner-page-active) .mob-acc-sub.is-current{background:var(--panel-high)!important;border-color:var(--line-strong)!important}
}

/* Desktop shell geometry: site header spans full width, page title bar stays after sidebar. */
@media(min-width:1101px){
  body:not(.scanner-page-active){
    grid-template-columns:var(--sidebar-w,260px) minmax(0,1fr)!important;
    grid-template-rows:56px 52px minmax(0,1fr)!important;
    grid-template-areas:
      "topnav topnav"
      "sidebar subbar"
      "sidebar main"!important;
  }

  body:not(.scanner-page-active) #sidebar{
    grid-area:sidebar!important;
    width:var(--sidebar-w,260px)!important;
    height:calc(100vh - 56px)!important;
    align-self:stretch!important;
    position:relative!important;
    top:auto!important;
    z-index:45!important;
  }

  body:not(.scanner-page-active) #unifiedTopbar.terminal-topbar,
  body:not(.scanner-page-active) #header.terminal-topbar,
  body:not(.scanner-page-active) .terminal-topbar.topnav,
  body:not(.scanner-page-active) .topnav.terminal-topbar{
    grid-area:topnav!important;
    width:100%!important;
    left:auto!important;
    right:auto!important;
    top:0!important;
    position:sticky!important;
    border-left:0!important;
  }

  body:not(.scanner-page-active) .section-metrics-bar{
    grid-area:subbar!important;
    width:100%!important;
    top:56px!important;
    left:auto!important;
    right:auto!important;
    position:sticky!important;
    border-left:0!important;
  }

  body:not(.scanner-page-active) #main{
    grid-area:main!important;
    height:calc(100vh - 108px)!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
}

/* Keep site topbar identical on scanner and non-scanner pages. */
body.scanner-page-active .terminal-topbar.topnav,
body.scanner-page-active .topnav.terminal-topbar{
  padding:0 18px!important;
  background:color-mix(in srgb,var(--panel) 94%,var(--bg))!important;
  border-bottom:1px solid var(--line-strong)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.035) inset!important;
  backdrop-filter:blur(14px)!important;
}

:root[data-theme="light"] body.scanner-page-active .terminal-topbar.topnav,
:root[data-theme="light"] body.scanner-page-active .topnav.terminal-topbar{
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 1px 0 rgba(15,23,42,.04)!important;
}

body.scanner-page-active .terminal-topbar .brand{gap:11px!important}
body.scanner-page-active .terminal-topbar .brand-logo{
  width:34px!important;
  height:34px!important;
  border-radius:10px!important;
  background:var(--fg)!important;
  color:var(--bg)!important;
  box-shadow:none!important;
}
body.scanner-page-active .terminal-topbar .brand-logo::after{display:none!important}
body.scanner-page-active .terminal-topbar .brand-title{font-size:14px!important;letter-spacing:-.02em!important}
body.scanner-page-active .terminal-topbar .brand-sub{color:var(--fg-mute)!important;letter-spacing:.1em!important}

body.scanner-page-active .terminal-topbar .topnav-main{
  justify-self:center!important;
  justify-content:center!important;
  gap:2px!important;
  height:38px!important;
  padding:3px!important;
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:var(--panel-sunken)!important;
  box-shadow:none!important;
}

body.scanner-page-active .terminal-topbar .topnav-link{
  height:30px!important;
  padding:0 12px!important;
  border-radius:7px!important;
  color:var(--fg-mute)!important;
  font-size:12px!important;
  border:1px solid transparent!important;
  background:transparent!important;
  box-shadow:none!important;
}

body.scanner-page-active .terminal-topbar .topnav-link:hover{
  color:var(--fg)!important;
  background:var(--panel-high)!important;
  border-color:var(--line)!important;
}

body.scanner-page-active .terminal-topbar .topnav-link.active{
  color:var(--fg)!important;
  background:var(--panel-high)!important;
  border-color:var(--line-strong)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset!important;
}

body.scanner-page-active .terminal-topbar .quick-metric.user-balance{
  min-width:148px!important;
  padding:6px 10px!important;
  border-radius:9px!important;
  background:var(--panel-sunken)!important;
  border-color:var(--line)!important;
  box-shadow:none!important;
}

body.scanner-page-active .terminal-topbar .quick-metric.user-balance .label{color:var(--fg-mute)!important}
body.scanner-page-active .terminal-topbar .quick-metric.user-balance .value{color:var(--up)!important}
body.scanner-page-active .terminal-topbar .unified-theme-btn.icon-only,
body.scanner-page-active .terminal-topbar .topnav-logout-btn{
  border-radius:9px!important;
  box-shadow:none!important;
}
