/* Stage 1 shell; existing 3D, catalog and business logic remain untouched. */
:root{--shell-width:248px;--shell-header:72px}
body.shell-collapsed{--shell-width:76px}
#user-avatar-img[hidden],#user-avatar-fallback[hidden]{display:none!important}
.topbar{position:fixed;inset:0 0 auto;height:var(--shell-header);padding:12px 24px;gap:14px;z-index:110;flex-wrap:nowrap}
.topbar .brand{margin-right:auto;min-width:0}.brand-badge{display:none}
.shell-icon{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;background:rgba(112,197,212,.05);color:var(--text-main);border:1px solid var(--border-subtle);border-radius:12px;cursor:pointer;font:20px var(--font);list-style:none}
summary::-webkit-details-marker{display:none}summary{cursor:pointer;list-style:none}
.user-menu{gap:8px}.shell-profile,.shell-language, .shell-currency,.shell-notifications{position:relative}
.user-pill{min-height:44px;color:var(--text-main)}
.shell-popover{position:absolute;right:0;top:calc(100% + 12px);width:260px;max-width:calc(100vw - 28px);padding:20px;background:#101824;border:1px solid var(--border);border-radius:16px;box-shadow:0 18px 60px #0009;font-size:13px;line-height:1.7;z-index:140}
.shell-popover p{color:var(--text-dim);margin:10px 0}.shell-popover a{color:var(--cyan)}
.shell-popover button,.shell-popover select{width:100%;min-height:44px;background:#0a1019;color:var(--text-main);border:1px solid var(--border);padding:10px;border-radius:9px;margin-top:10px}
#shell-sidebar{position:fixed;top:var(--shell-header);bottom:0;left:0;width:var(--shell-width);z-index:100;background:linear-gradient(160deg,#0c131e,#080d15);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:18px 12px;transition:width .2s,transform .2s}
.shell-side-head{display:flex;align-items:center;justify-content:space-between;color:var(--gold);font:10px var(--mono);letter-spacing:2px;padding:4px 12px 18px}
#shell-close{display:none}#shell-sidebar nav{overflow-y:auto;min-height:0;flex:1}
.shell-link{display:flex;align-items:center;gap:12px;min-height:46px;margin:3px 0;padding:10px 12px;border:1px solid transparent;border-radius:10px;text-decoration:none;color:var(--text-dim);font-size:12px;font-weight:600;transition:background .18s,color .18s}
.shell-link i{font-style:normal;display:grid;place-items:center;font-size:20px;min-width:24px}.shell-link:hover{background:#70c5d410;color:var(--cyan)}
.shell-link[aria-current="page"]{background:linear-gradient(100deg,#d4b87820,#70c5d410);border-color:#d4b87845;color:var(--gold-bright)}
.shell-side-bottom{border-top:1px solid var(--border-subtle);padding-top:12px;margin-top:12px}
#shell-logout-slot .btn-logout{width:100%;min-height:44px;text-align:left;border-radius:10px;font-size:12px}
.shell-collapsed .shell-link span,.shell-collapsed .shell-side-head span{display:none}.shell-collapsed .shell-link{padding:10px 12px}.shell-collapsed .shell-side-head{padding:0}
.control-room{position:fixed;top:var(--shell-header);bottom:0;left:var(--shell-width);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;min-height:0;margin-left:0;margin-right:0;max-width:none;width:calc(100% - var(--shell-width));padding:28px clamp(18px,3vw,48px) 64px;transition:left .2s,width .2s}
.control-room>section{scroll-margin-top:92px;min-width:0}.control-room>section[id^="shell-"]{margin-bottom:24px}
#shell-backdrop{position:fixed;inset:var(--shell-header) 0 0;background:#020610aa;backdrop-filter:blur(3px);z-index:95;border:0;width:100%}
:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
@media(min-width:901px) and (max-width:1200px){.hero-deck{grid-template-columns:1fr}.cards-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.charts-grid,.api-deck{grid-template-columns:minmax(0,1fr)}}
@media(max-width:900px){:root,body.shell-collapsed{--shell-width:260px;--shell-header:64px}.topbar{padding:10px 12px;gap:8px}.topbar .brand{gap:7px;font-size:12px}.topbar .brand img{width:24px;height:24px}.user-info{display:none}.user-menu{gap:4px}.user-pill{padding:4px}.shell-icon{width:40px;min-height:44px}.control-room{left:0;margin:0;width:100%;padding:20px 14px calc(28px + env(safe-area-inset-bottom))}#shell-sidebar{transform:translateX(-100%);width:min(280px,86vw)}.shell-open #shell-sidebar{transform:translateX(0)}#shell-close{display:grid}.shell-collapsed .shell-link span,.shell-collapsed .shell-side-head span{display:initial}.shell-collapsed .shell-side-head{padding:4px 12px 18px}.shell-open{overflow:hidden}.shell-language .shell-popover,.shell-notifications .shell-popover{position:fixed;right:14px;top:72px}.hero-deck{grid-template-columns:minmax(0,1fr)}}
@media(max-width:380px){.topbar .brand span{font-size:10px}.topbar{gap:4px}.user-menu{gap:2px}}
@media(prefers-reduced-motion:reduce){#shell-sidebar,.control-room,.shell-link{transition:none}}

.control-room>[hidden]{display:none!important}.shell-link[aria-current="page"]{border-color:var(--gold);color:var(--gold-bright)}

.language-summary{display:flex;align-items:center;justify-content:center;gap:4px;min-width:58px;height:40px;padding:0 11px;border:1px solid var(--border-subtle);border-radius:10px;background:rgba(112,197,212,.05);color:var(--cyan-bright);font:700 11px var(--mono);letter-spacing:.5px;cursor:pointer}.language-summary:hover{border-color:var(--cyan);background:rgba(112,197,212,.12)}.shell-language .shell-popover{min-width:220px}
@media(max-width:900px){.language-summary{min-width:48px;height:40px;padding:0 8px}.shell-language .shell-popover{right:8px;top:60px}}

#web-purchase-form{display:grid;gap:20px;max-width:720px;margin-top:24px}#web-purchase-form label{display:grid;gap:10px;color:var(--text-dim)}#web-purchase-form input,#web-purchase-form select{min-height:48px;border:1px solid var(--border);border-radius:10px;background:#080e17;color:var(--text-main);padding:12px;font:14px var(--font)}#web-purchase-form button{min-height:44px;border:1px solid var(--border);border-radius:10px;background:#11202d;color:var(--gold-bright);padding:10px 14px;cursor:pointer}.purchase-presets{display:flex;flex-wrap:wrap;gap:8px}.purchase-quote{display:grid;gap:12px;padding:24px;border:1px solid var(--border-cyan);border-radius:16px;background:#70c5d409}.purchase-quote strong{font-size:38px;color:var(--cyan)}#web-purchase-form button[disabled]{opacity:.5;cursor:not-allowed}

#web-key-create{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0;align-items:center}#web-key-create input{padding:12px;background:#080f18;color:var(--text-main);border:1px solid var(--border);border-radius:10px;min-width:0;max-width:100%}#api-access button{min-height:44px;padding:10px 14px;border:1px solid var(--border);border-radius:10px;background:#102330;color:var(--gold-bright);cursor:pointer}.web-key-row{padding:20px 0;border-bottom:1px solid var(--border-subtle)}.web-key-row p{color:var(--text-dim);font-size:12px;line-height:1.8;overflow-wrap:anywhere}#web-key-secret{padding:18px;border:1px solid var(--border-cyan);border-radius:14px}#web-key-secret code{display:block;overflow-wrap:anywhere;user-select:all;margin:16px 0}

html,body{height:100%;height:100dvh;min-height:0;overflow:hidden!important}#shell-sidebar{min-height:0;max-height:calc(100dvh - var(--shell-header))}.shell-side-head,.shell-side-bottom{flex-shrink:0}#shell-sidebar nav{overscroll-behavior-y:contain;overflow-x:hidden;scrollbar-width:thin}.shell-open .control-room{overflow-y:hidden}.dashboard-foot{position:static;flex-shrink:0;margin-top:32px;padding-bottom:env(safe-area-inset-bottom)}.control-room>section{scroll-margin-top:20px}
