*{box-sizing:border-box}
:root{color-scheme:dark}
html,body{min-height:100%}
body{margin:0;background:#101720;color:#e9eff6;font:16px system-ui;padding-bottom:25px}
button,input,.button-link{font:inherit;padding:9px 10px;border-radius:8px;border:1px solid #53667c;background:#1e2c3d;color:inherit;text-decoration:none}
button,.button-link{cursor:pointer}
body.light{background:#f1f5fa;color:#152438;color-scheme:light}
body.light button,body.light .button-link{background:#fff;color:#152438;border-color:#b8c5d4}
body.light button:hover,body.light .button-link:hover{background:#e7eef6}
.app-header{position:fixed;z-index:60;top:0;left:0;right:0;min-height:56px;display:flex;align-items:center;gap:16px;padding:8px 18px;border-bottom:1px solid #2b3949;background:#0f1720}
.app-header__brand{display:flex;align-items:center;gap:10px;font-size:1.05rem;white-space:nowrap}
.app-header__brand-image{width:34px;height:34px;border-radius:8px;object-fit:cover;object-position:left center}
.app-header__actions{margin-left:auto;display:flex;align-items:center;gap:9px;min-width:0}
.app-header__actions #user{white-space:nowrap}
.app-header__theme{width:40px;height:40px;padding:0;display:grid;place-items:center;font-size:1.12rem;line-height:1}
#market-ticker{position:fixed;z-index:50;left:0;right:0;top:var(--app-header-height,56px)}
.workspace{display:flex;align-items:stretch;min-height:calc(100vh - var(--app-header-height,56px) - var(--ticker-height,0px) - 25px);margin-top:calc(var(--app-header-height,56px) + var(--ticker-height,0px))}
#sidebar{display:flex}#view{display:flex;min-width:0;flex:1}
.muted{color:#91a6bd}.hidden{display:none!important}
.app-statusbar{position:fixed;z-index:30;left:0;right:0;bottom:0;height:25px;display:flex;align-items:center;gap:7px;padding:0 10px;border-top:1px solid #2b3949;background:#0d141d;color:#71869d;font-size:11px;font-variant-numeric:tabular-nums}
.app-statusbar__indicator{width:6px;height:6px;border-radius:50%;background:#4fba79;box-shadow:0 0 6px rgba(79,186,121,.4)}
.app-statusbar.is-error{color:#d58a8a}.app-statusbar.is-error .app-statusbar__indicator{background:#d85f68;box-shadow:0 0 6px rgba(216,95,104,.4)}
body.light .app-statusbar{background:#f8fafc;border-color:#d8e0e9;color:#718096}
body.light .app-header{background:#fff;border-color:#d8e0e9}
.auth-page{min-height:100vh;display:grid;place-items:center}
.auth-shell{width:100%;max-width:560px;margin:0 auto;padding:24px}
.auth-card{border:1px solid #53667c;border-radius:16px;padding:32px;background:#162231;box-shadow:0 18px 50px rgba(0,0,0,.22)}
.auth-brand{font-size:24px;font-weight:700;margin-bottom:28px}.auth-card h1{margin:0 0 14px}.auth-card p{line-height:1.6}
body.light .auth-card{background:#fff;border-color:#c7d2df;box-shadow:0 18px 50px rgba(21,36,56,.10)}
.auth-button-stack{display:grid;gap:10px;margin-top:18px}.auth-button-stack .button-link,.auth-button-stack button{width:100%;text-align:center}.secondary-auth-button{background:transparent}.mobile-only{margin-top:14px;font-size:14px}
@media(max-width:760px){#sidebar{position:absolute;width:0}.workspace{min-height:calc(100vh - var(--app-header-height,56px) - var(--ticker-height,0px) - 25px)}.app-header{padding:7px 10px}.app-header__actions{gap:6px}.app-header__actions #user{max-width:120px;overflow:hidden;text-overflow:ellipsis}.app-header__actions #auth-message{display:none}.app-header__brand-image{width:32px;height:32px}}


/* On phones, let the brand and market board scroll away with the page. */
@media(max-width:760px){
  .app-header{position:relative;top:auto;left:auto;right:auto}
  .app-header__actions #user{display:none}
  #market-ticker{position:relative;top:auto;left:auto;right:auto}
  .workspace{margin-top:0}
  html{scroll-padding-top:72px}
}
