/* NABD desktop sidebar correction: layout-only. No trading or data changes. */
/* Overrides legacy absolute-positioned navigation and the newer sticky layout. */
@media (min-width:1181px) {
  .header {
    position:fixed;
    inset-block:0;
    inset-inline-start:0;
    inset-inline-end:auto;
    top:0;
    width:228px;
    height:100dvh;
    min-height:0;
    max-height:none;
    padding:23px 14px 17px;
    margin:0;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    flex-wrap:nowrap;
    gap:16px;
    float:none;
    box-sizing:border-box;
    overflow-y:auto;
    overflow-x:hidden;
    background:var(--card);
    border:0;
    border-inline-end:1px solid var(--border);
    border-radius:0;
    box-shadow:none;
    z-index:30;
  }
  .header::after {content:none;display:none}
  .header .brand {
    width:100%;
    min-width:0;
    height:auto;
    margin:0;
    display:flex;
    justify-content:center;
    align-items:center;
    flex:0 0 auto;
  }
  .header .brand .brand-logo {
    width:min(100%,155px);
    max-width:155px;
    height:auto;
    object-fit:contain;
  }
  .header .nav {
    position:static;
    inset:auto;
    top:auto;
    right:auto;
    left:auto;
    width:100%;
    max-width:100%;
    height:auto;
    min-height:0;
    padding:0;
    margin:0;
    order:initial;
    flex:1 0 auto;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    align-items:stretch;
    gap:6px;
    overflow:visible;
    border:0;
    background:transparent;
  }
  .header .nav > .nav-button {
    position:relative;
    width:100%;
    max-width:100%;
    flex:0 0 auto;
    min-height:45px;
    padding:10px 13px;
    margin:0;
    display:flex;
    flex-direction:row;
    justify-content:flex-start;
    align-items:center;
    gap:12px;
    font-size:13px;
    line-height:1.55;
    text-align:start;
    white-space:normal;
    border-radius:12px;
    box-sizing:border-box;
    overflow:hidden;
  }
  .header .nav > .nav-button svg {width:20px;height:20px;flex:0 0 20px}
  .header .nav > .nav-button span {display:block;min-width:0;white-space:normal;overflow-wrap:break-word}
  .header .nav-footer {
    position:static;
    inset:auto;
    inset-inline-start:auto;
    inset-inline-end:auto;
    right:auto;
    bottom:auto;
    order:initial;
    flex:0 0 auto;
    align-self:stretch;
    width:100%;
    max-width:100%;
    min-width:0;
    margin:16px 0 0;
    padding:10px;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    box-sizing:border-box;
    z-index:auto;
  }
  .header .nav-footer .nabd-quick-button {position:static;flex:0 0 44px}
  .header > .button {
    width:100%;
    max-width:100%;
    min-width:0;
    margin:0;
    padding-inline:8px;
    min-height:43px;
    display:flex;
    justify-content:center;
    align-items:center;
    white-space:normal;
    text-align:center;
    font-size:12px;
    box-sizing:border-box;
    flex:0 0 auto;
  }
  .main {
    float:none;
    margin:0;
    margin-inline-start:228px;
    margin-inline-end:0;
    width:calc(100% - 228px);
    max-width:none;
    min-width:0;
    padding-inline:clamp(19px,2.6vw,42px);
    box-sizing:border-box;
  }
}
@media (min-width:1181px) and (max-height:680px) {
  .header {padding-block:12px;gap:9px}
  .header .nav {gap:3px}
  .header .nav > .nav-button {min-height:39px;padding-block:7px}
  .header .nav-footer {margin-top:7px;padding:5px}
}

/* Language/theme live buttons: directly after both account actions, never floating on desktop. */
@media (min-width:1181px) {
 .header > .nav-footer {
  position:static!important;inset:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important;
  right:auto!important;bottom:auto!important;top:auto!important;
  order:initial;flex:0 0 auto;width:100%;max-width:100%;min-width:0;
  margin:0!important;padding:0!important;border:0!important;border-radius:0;
  background:transparent!important;box-shadow:none!important;
  display:flex;justify-content:space-between;align-items:center;gap:9px;
 }
 .header > .nav-footer .nabd-quick-button {
  display:inline-flex;position:static;align-items:center;justify-content:center;
  min-width:0;height:44px;min-height:44px;margin:0;padding:0;
  border:1px solid var(--border);border-radius:12px;
  background:var(--card);color:var(--ink);
  box-shadow:0 3px 10px #101a2512;cursor:pointer;
 }
 .header > .nav-footer #nabd-language-quick {
  order:0;flex:1 1 auto;width:auto;gap:7px;padding-inline:10px;
 }
 .header > .nav-footer #nabd-theme-quick {
  order:1;flex:0 0 47px;width:47px;
 }
 .header > .nav-footer .nabd-language-globe {font-size:17px;line-height:1;color:var(--green)}
 .header > .nav-footer .nabd-language-chevron {font-size:17px;line-height:1;color:var(--muted);margin-inline-start:auto}
 .header > .nav-footer .nabd-quick-language {font-size:12px;font-weight:700}
 .header > .nav-footer .nabd-quick-button:hover {border-color:var(--green);background:var(--elevated)}
 .header > .nav-footer .nabd-quick-button:focus-visible {outline:3px solid var(--green);outline-offset:2px}
 .header > .nav-footer :is(.theme-picker,.language-picker) {
  position:absolute!important;inline-size:1px!important;block-size:1px!important;
  min-width:0!important;margin:0!important;padding:0!important;border:0!important;
  overflow:hidden;clip-path:inset(50%);opacity:0;pointer-events:none;
 }
}
@media (min-width:761px) and (max-width:1180px) {
 .header > .nav-footer {position:static!important;inset:auto!important;right:auto!important;bottom:auto!important;
  order:initial;display:flex;flex:0 0 auto;min-width:0;width:auto;max-width:100%;
  margin:0!important;padding:4px!important;gap:6px}
 .header > .nav-footer #nabd-language-quick {display:inline-flex;gap:5px;width:auto;padding-inline:11px}
 .header > .nav-footer .nabd-language-globe {font-size:16px}
 .header > .nav-footer .nabd-language-chevron {font-size:14px}
}
@media (max-width:760px) {
 .header > .nav-footer #nabd-language-quick {display:inline-flex;width:auto;gap:5px;padding-inline:10px}
 .header > .nav-footer .nabd-language-globe {font-size:15px}
 .header > .nav-footer .nabd-language-chevron {font-size:13px}
}
