/* Shared terminal chrome. Theme changes preserve the community's accent. */
:root{--trade-accent:var(--accent)}
[data-trade-theme="dark"]{color-scheme:dark}
[data-trade-theme="light"]{color-scheme:light;--bg:#eef1f5;--panel:#ffffff;--panel-2:#f5f7fa;--line:#dce2e9;--text:#182433;--muted:#637386;--green:#00875c;--red:#ce3e57;--trade-accent:color-mix(in srgb,var(--accent) 52%,#102c38);--accent-soft:color-mix(in srgb,var(--accent) 12%,white)}
.trading-shell .view-content.terminal-content,.trading-shell .view-content.pro-content{max-width:none}
.trading-mode-bar{height:48px;min-height:48px;flex:0 0 48px;display:flex;align-items:center;gap:14px;margin:0 0 10px;padding:0 2px;color:var(--text)}
.trading-mode-title{display:flex;align-items:center;gap:9px;min-width:0;flex:1}
.trade-back,.trade-fullscreen,.trade-focus-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:30px;min-height:30px;border-radius:6px;color:var(--muted);font-size:11px}
.trade-back svg{transform:rotate(180deg)}
.trade-back:hover,.trade-fullscreen:hover,.trade-focus-toggle:hover{background:var(--panel-2);color:var(--text)}
.trade-brand{display:flex;align-items:center;gap:9px;min-width:0;text-align:left;color:var(--trade-accent)}
.trade-brand>span{font-size:11px;letter-spacing:.025em;font-weight:650;color:var(--text);max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trade-brand small{display:block;font-size:8px;letter-spacing:.13em;color:var(--muted);font-weight:500;margin-top:3px}
.trade-brand>svg:last-child{color:var(--muted);transform:rotate(90deg)}
.trading-modes{margin:0;background:var(--panel);border:1px solid var(--line);border-radius:7px;padding:2px;gap:2px}
.trading-modes>button{min-height:28px;min-width:68px;padding:5px 12px;border-radius:5px;font-size:11px}
.trading-modes>button.active{background:var(--panel-2);color:var(--text);box-shadow:none}
.trading-modes>button[data-value=pro].active{background:var(--accent-soft);color:var(--trade-accent)}
.trade-shell-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:1}
.trading-desk-link{min-height:30px;gap:6px;padding:0 8px;color:var(--muted);font-size:11px}
.trading-desk-link:hover{color:var(--trade-accent)}
.trade-theme-switch{display:flex;align-items:center;border:1px solid var(--line);border-radius:7px;background:var(--panel);padding:2px;gap:2px}
.trade-theme-switch button{display:flex;align-items:center;gap:5px;min-height:27px;min-width:30px;border-radius:5px;padding:4px 7px;font-size:10px;color:var(--muted)}
.trade-theme-switch button.active{background:var(--panel-2);color:var(--text);box-shadow:0 1px 3px #00000008}
.trade-focus-toggle{padding:0 8px;white-space:nowrap}
.trade-focus-toggle.active{color:var(--trade-accent);background:var(--accent-soft)}
.trade-immersive.app-shell{padding:0;min-height:100dvh}
.trade-immersive>.space-rail,.trade-immersive>.topbar,.trade-immersive>.mobile-tabbar{display:none}
.trade-immersive .shell-body{min-height:100dvh}
.trade-immersive .view-content.terminal-content,.trade-immersive .view-content.pro-content{padding:0 6px 6px;margin:0;width:100%;max-width:none}
.trade-immersive .trading-mode-bar{padding:0 9px;margin-bottom:0;border-bottom:1px solid var(--line)}
.trade-immersive .view-content.page-enter{animation:none}
@media(min-width:1050px) and (min-height:650px){
  .trade-immersive .shell-body{height:100dvh;min-height:0;overflow:hidden}
  .trade-immersive .view-content.terminal-content,.trade-immersive .view-content.pro-content{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
}
@media(max-width:1049px),(max-height:649px){
  .trade-immersive .trading-mode-bar{position:sticky;top:0;z-index:25;background:var(--bg)}
}
.trading-mode-bar.is-native{margin:0;padding:0 13px;height:44px;min-height:44px;gap:10px;border-bottom:1px solid var(--line);background:var(--bg)}
.trading-mode-bar.is-native .trading-mode-title,.trading-mode-bar.is-native .trading-desk-link{display:none}
.trading-mode-bar.is-native .trade-shell-actions{flex:1}
.trading-shell .native-mobile-content{display:flex;flex-direction:column;min-height:0}
.trading-shell .native-mobile-content>.trading-mode-bar{flex:0 0 44px}
.trading-shell .native-mobile-content>.m-native{flex:1;height:auto;min-height:0;width:100%}
[data-trade-theme="light"] body{background:var(--bg);color:var(--text)}
[data-trade-theme="light"] .topbar{background:#ffffffed;border-color:var(--line)}
[data-trade-theme="light"] .space-rail{background:#e6ebf1}
[data-trade-theme="light"] .platform-mark{color:#273647}
[data-trade-theme="light"] .top-nav{background:#eff2f6;border-color:#e2e7ed}
[data-trade-theme="light"] .top-nav button.active{background:#fff;color:#172334;box-shadow:0 1px 4px #20304b10}
[data-trade-theme="light"] .space-btn{color:#748092;background:#ffffff55}
[data-trade-theme="light"] .space-btn.active{background:var(--accent-soft);color:var(--trade-accent);border-color:color-mix(in srgb,var(--accent) 35%,#e1e8ec)}
[data-trade-theme="light"] .brand-domain,[data-trade-theme="light"] .brand-chevron{color:#65758a}
[data-trade-theme="light"] .mobile-tabbar{background:#ffffffed;border-color:var(--line)}
[data-trade-theme="light"] .mobile-tabbar button.active{color:var(--trade-accent)}
[data-trade-theme="light"] .view-switch,[data-trade-theme="light"] .view-switch-mobile{background:#edf1f5;border-color:#dce3ec}
[data-trade-theme="light"] .view-switch button.active{background:white;color:#24354a}
[data-trade-theme="light"] input,[data-trade-theme="light"] select,[data-trade-theme="light"] textarea{background:var(--panel-2);color:var(--text);border-color:var(--line)}
[data-trade-theme="light"] input::placeholder,[data-trade-theme="light"] textarea::placeholder{color:#7b8898}
[data-trade-theme="light"] .btn{background:#f6f8fb;border-color:#dce3eb;color:#33465c}
[data-trade-theme="light"] .btn.primary{background:#1b2b3f;border-color:#1b2b3f;color:white}
[data-trade-theme="light"] .btn.danger{color:var(--red);background:#fff5f6;border-color:#efc7d0}
[data-trade-theme="light"] .icon-btn:hover{color:#172638;background:#e8eef4}
[data-trade-theme="light"] .modal-overlay{background:#20354e55}
[data-trade-theme="light"] .modal-box{background:#fff;color:#182433;border:1px solid #dbe3ed;box-shadow:0 24px 90px #243b5633}
[data-trade-theme="light"] .modal-box p,[data-trade-theme="light"] .modal-box small{color:#637386}
[data-trade-theme="light"] .modal-close{color:#637386;background:#eff3f7}
[data-trade-theme="light"] .space-choice{background:#f6f8fb;border-color:#e0e6ed;color:#25364c}
[data-trade-theme="light"] .space-choice:hover,[data-trade-theme="light"] .space-choice.is-current{background:var(--accent-soft);border-color:var(--line)}
[data-trade-theme="light"] .space-choice-mark{background:#e7edf3}
[data-trade-theme="light"] .space-list small,[data-trade-theme="light"] .search-result small{color:#64758a}
[data-trade-theme="light"] .search-result:hover,[data-trade-theme="light"] .search-result.selected{background:#eaf0f6;color:#19334a}
[data-trade-theme="light"] .toast{background:#fff;color:#273d52;border-color:#d6e2eb;box-shadow:0 8px 30px #16314e1a}
[data-trade-theme="light"] ::-webkit-scrollbar-thumb{background:#c6d0dc}
[data-trade-theme="light"] .m-native,[data-trade-theme="light"] .m-phone-screen{background:#f2f5f8}
@media(max-width:900px){.trade-shell-actions{gap:5px}.trade-theme-switch button span{display:none}.trade-brand>span{max-width:140px}.trade-focus-toggle span{display:none}.trading-mode-bar{gap:9px}}
@media(max-width:700px){.trading-mode-title{display:flex}.trading-desk-link{display:none}.trade-brand>span{max-width:100px;font-size:10px}.trade-brand small{font-size:7px}.trading-mode-bar{flex-wrap:nowrap}.trade-shell-actions{gap:3px}.trading-modes>button{min-width:59px;padding:5px 9px}.trade-focus-toggle{padding:0 6px}.trade-theme-switch button{padding:4px 6px}}
@media(max-width:620px){.trade-brand{display:none}.trading-mode-title{flex:0}.trade-back{min-width:27px}.trade-immersive .trading-mode-bar{padding-left:3px;padding-right:3px}.trading-mode-bar{gap:5px}.trade-shell-actions{flex:1}.trade-fullscreen{min-width:27px}.trade-focus-toggle{min-width:27px}.trade-theme-switch{gap:0}}
@media(max-width:350px){.trade-fullscreen{display:none}}
@media(prefers-reduced-motion:reduce){.trading-shell *{scroll-behavior:auto!important}}
