/* Shared BioBuddy navigation. Scoped classes avoid changing scientific tool layouts. */
:root{--ba-header-height:64px;--ba-bg:rgba(255,255,255,.96);--ba-text:#24354e;--ba-muted:#60708a;--ba-line:#dce5f0;--ba-blue:#2563eb;--ba-hover:#eff6ff;--ba-panel:#fff;--ba-shadow:0 12px 32px #16335b21}
html[data-theme=dark]{--ba-bg:rgba(17,26,40,.97);--ba-text:#e6eefb;--ba-muted:#b4c2d9;--ba-line:#34445d;--ba-blue:#a0bdff;--ba-hover:#213650;--ba-panel:#18263b;--ba-shadow:0 12px 32px #0005;color-scheme:dark}
.ba-header{position:sticky;top:0;z-index:45;display:flex;align-items:center;gap:28px;flex:none;width:100%;height:var(--ba-header-height);padding:0 clamp(16px,4vw,64px);border-bottom:1px solid var(--ba-line);background:var(--ba-bg);color:var(--ba-text);box-shadow:0 3px 16px #18335608;backdrop-filter:blur(16px);font:500 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;text-align:left}
.ba-header *{box-sizing:border-box}
.ba-header [hidden]{display:none!important}
.ba-header a{color:var(--ba-text);text-decoration:none}
.ba-header button,.ba-header summary{font:inherit;color:inherit;cursor:pointer}
.ba-header a:focus-visible,.ba-header button:focus-visible,.ba-header summary:focus-visible{outline:3px solid var(--ba-blue);outline-offset:2px;border-radius:6px}
.ba-brand{display:flex;align-items:center;gap:9px;flex:none;min-height:44px;white-space:nowrap}
.ba-brand span{font-size:22px;font-weight:750;letter-spacing:-.7px}
.ba-brand img{width:30px;height:30px;display:block;flex:none}
.ba-primary{height:100%;display:flex;align-items:stretch;gap:22px;white-space:nowrap}
.ba-primary a{position:relative;display:flex;align-items:center;min-height:44px}
.ba-header a:hover,.ba-header a[aria-current=page]{color:var(--ba-blue)}
.ba-primary a[aria-current=page]{font-weight:650}
.ba-primary a[aria-current=page]::after{position:absolute;content:"";bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--ba-blue);left:0;right:0}
.ba-actions{margin-left:auto;display:flex;align-items:center;gap:8px;min-width:0}
.ba-help>a,.ba-theme,.ba-login,.ba-header summary{display:flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;padding:0 10px;border:0;border-radius:8px;background:transparent;white-space:nowrap}
.ba-help>a:hover,.ba-theme:hover,.ba-header summary:hover{background:var(--ba-hover)}
.ba-theme{padding:0;flex:none}
.ba-header .ba-login{background:#2563eb;color:white;padding-inline:18px}
.ba-header .ba-login:hover{background:#1d4ed8;color:white}
.ba-header details{position:relative;margin:0;border:0;padding:0}
.ba-header summary{list-style:none}
.ba-header summary::-webkit-details-marker{display:none}
.ba-account summary{max-width:160px;border:1px solid var(--ba-line)}
.ba-account [data-ba-name]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:118px}
.ba-account summary svg{flex:none}
.ba-popover{position:absolute;right:0;top:calc(100% + 10px);width:230px;max-width:calc(100vw - 24px);padding:8px;background:var(--ba-panel);color:var(--ba-text);border:1px solid var(--ba-line);border-radius:12px;box-shadow:var(--ba-shadow);display:flex;flex-direction:column;gap:2px;max-height:calc(100dvh - 90px);overflow:auto}
.ba-popover>a,.ba-popover>button{display:flex;align-items:center;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:7px;background:transparent;text-align:left;font:inherit;color:var(--ba-text)}
.ba-popover>a:hover,.ba-popover>button:hover,.ba-popover>a[aria-current=page]{background:var(--ba-hover);color:var(--ba-blue)}
.ba-identity{display:flex;flex-direction:column;gap:3px;padding:8px 12px 12px;margin-bottom:4px;border-bottom:1px solid var(--ba-line);overflow-wrap:anywhere;white-space:normal}
.ba-identity b{font-size:12px;color:var(--ba-muted);font-weight:500}
.ba-identity span{font-size:13px}
.ba-mobile{display:none}
.ba-header .ba-skip{position:absolute;left:16px;top:-100px;padding:10px 16px;background:var(--ba-panel);border:1px solid var(--ba-line);border-radius:8px;z-index:2}
.ba-header .ba-skip:focus{top:8px}
.ba-message{position:absolute;right:12px;top:calc(100% + 8px);max-width:calc(100vw - 24px);padding:8px 12px;border:1px solid var(--ba-line);background:var(--ba-panel);border-radius:10px;box-shadow:var(--ba-shadow);display:flex;gap:8px;align-items:center}
.ba-message button{min-height:44px;border:0;color:var(--ba-blue);background:transparent;white-space:nowrap}
@media(max-width:1100px){.ba-header{gap:18px;padding-inline:20px}.ba-primary{gap:16px}.ba-actions{gap:4px}.ba-account summary{max-width:132px}}
@media(max-width:960px){.ba-primary,.ba-help{display:none}.ba-mobile{display:block}.ba-header{gap:12px;padding-inline:16px}}
@media(max-width:480px){.ba-header{gap:8px;padding-inline:12px}.ba-brand{gap:6px}.ba-brand span{font-size:18px}.ba-brand img{width:26px;height:26px}.ba-actions{gap:3px}.ba-account summary{max-width:78px;padding-inline:7px}.ba-account summary svg{display:none}.ba-header .ba-login{padding-inline:12px}}

/* Existing application content retains its layout and uses the same blue palette. */
html.ba-product{--accent:#2563eb;--accent-2:#1d4ed8;--accent-soft:#edf4ff;--accent-glow:#2563eb24;--brand:#193f75;--brand-2:#214d87;--brand-hi:#a0c3ff;--bg:#f4f7fb;--surface-2:#f7f9fc;--surface-3:#edf2f8;color-scheme:light}
html.ba-product[data-theme=dark]{--bg:#101925;--surface:#182438;--surface-2:#152033;--surface-3:#23324a;--ink:#e9eff9;--ink-2:#d6e0ef;--muted:#bac7da;--faint:#a9b9d0;--line:#33435a;--line-2:#4e617b;--accent:#a0bdff;--accent-2:#c0d2ff;--accent-ink:#11213a;--accent-soft:#213654;--brand:#223d60;--brand-2:#284972;--ok:#96dbb0;--ok-soft:#183d2c;--bad:#ffb2a9;--bad-soft:#452728;--warn:#f3d19a;--warn-soft:#3d3320;--idle:#b3c2d6;color-scheme:dark}
html.ba-product #app{height:100vh;height:100dvh;display:flex;flex-direction:column}
html.ba-product .shell{height:auto;flex:1;min-height:0}
.workspace-toolbar{display:none;flex:none;align-items:center;padding:0 12px;height:44px;border-bottom:1px solid var(--line);background:var(--surface)}
.workspace-toolbar button{min-height:44px;min-width:44px;padding:0 10px;border:0;background:transparent;font:inherit;color:var(--accent);cursor:pointer}
.workspace-status{padding:10px 10px 14px;border-bottom:1px solid var(--line);margin-bottom:16px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.workspace-status>span,.workspace-status>a{display:block;margin:4px 0}
.workspace-status .dot{display:inline-block;width:7px;height:7px;background:var(--ok);border-radius:50%;margin-right:6px}
.workspace-status .dot.busy{background:var(--warn)}
html.ba-product .sidebar .side-nav{display:none}
html.ba-product .with-drawer .drawer{top:var(--ba-header-height)}
html.ba-product .login-body{display:block;padding:0;min-height:100dvh}
html.ba-product .login-wrap{margin:40px auto;width:min(1040px,calc(100% - 32px))}
@media(max-width:820px){.workspace-toolbar{display:flex}html.ba-product .sidebar,html.ba-product .with-drawer .drawer{top:calc(var(--ba-header-height) + 44px)}html.ba-product .login-wrap{margin:20px auto}}
@media(prefers-reduced-motion:reduce){.ba-header *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
