/* Account and global controls live in the sidebar; preserve their own handlers. */
html body.liquid-glass-home #portal-shell #portal-sidebar .topbar{display:flex!important;flex-direction:column;align-items:stretch;gap:6px!important;width:100%;height:auto!important;min-height:0!important;padding:6px 2px 8px!important;margin:0 0 6px!important;border-bottom:1px solid #cbd9e4;flex-shrink:0}
html body.liquid-glass-home #portal-shell #portal-sidebar .topbar-heading{display:flex;justify-content:flex-start;font-size:12px;gap:0}
html body.liquid-glass-home #portal-shell #portal-sidebar .account{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px;width:100%;font-size:12px}
html body.liquid-glass-home #portal-shell #portal-sidebar #portal-user{display:block!important;min-width:0;max-width:100%;overflow-wrap:anywhere;line-height:1.4}
html body.liquid-glass-home #portal-shell #portal-sidebar .topbar :is(button,summary){min-height:28px!important;padding:3px 7px!important;font-size:12px!important;box-sizing:border-box}
html body.liquid-glass-home #portal-shell #portal-sidebar .oa-language-switch{position:static!important;display:flex;flex-wrap:wrap;width:100%;max-width:100%;margin:0!important;gap:4px}
html body.liquid-glass-home #portal-shell #portal-sidebar .oa-language-switch button{flex:1;min-width:0}
html body.liquid-glass-home #portal-shell #portal-sidebar .oa-demo-tools{position:static!important;max-width:100%;margin:0;padding:2px 0;font-size:12px}
html body.liquid-glass-home #portal-shell #portal-sidebar .oa-demo-tools>summary{cursor:pointer}
html body.liquid-glass-home #portal-shell #portal-sidebar .oa-demo-switch{display:flex;flex-wrap:wrap;max-width:100%;min-width:0;gap:4px;padding:4px 0}
html body.liquid-glass-home #portal-shell #portal-sidebar .oa-demo-switch button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
#portal-workspace-tools{flex-shrink:0}#portal-workspace-tools .oa-workspace-trail{display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:2px 0 8px}#portal-workspace-tools .oa-workspace-trail[hidden]{display:none!important}#portal-workspace-tools .oa-workspace-trail strong{font-size:12px;line-height:1.4;padding:2px 6px}#portal-workspace-tools #portal-function-finder{width:100%;font-size:12px;min-height:28px;padding:4px 7px}
html body.liquid-glass-home #portal-shell>.portal-content{padding-top:6px!important}#oa-workspace{margin-top:0!important}
@media(min-width:761px){
 #portal-shell>#sidebar-toggle{display:none!important}
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar .topbar-heading,html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar #portal-user,#portal-shell.sidebar-collapsed #portal-workspace-tools strong{display:none!important}
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar .topbar{align-items:center;padding:2px 0 7px!important}
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar .account{justify-content:center}
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar #portal-logout{width:36px;font-size:0!important;padding:3px!important}
 #portal-shell.sidebar-collapsed #portal-logout span{display:none!important}#portal-shell.sidebar-collapsed #portal-logout::after{content:'⏻';font-size:19px}
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar .oa-language-switch{flex-direction:column;align-items:center}
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar .oa-language-switch button{flex:0 0 auto;width:36px;font-size:0!important;padding:3px!important}
 #portal-shell.sidebar-collapsed .oa-language-switch button[data-language='zh-Hant']::after{content:'中';font-size:13px}#portal-shell.sidebar-collapsed .oa-language-switch button[data-language='vi']::after{content:'VI';font-size:12px}
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar .oa-demo-tools>summary{font-size:0!important;width:36px;text-align:center;list-style:none}
 #portal-shell.sidebar-collapsed .oa-demo-tools>summary::after{content:'⇄';font-size:20px}
 #portal-shell.sidebar-collapsed #portal-function-finder{font-size:0!important;width:36px;margin:auto}#portal-shell.sidebar-collapsed #portal-function-finder::after{content:'⌕';font-size:23px}
 #portal-shell.sidebar-collapsed .oa-language-status{max-width:50px;overflow-wrap:anywhere}
}
@media(max-width:760px){
 html body.liquid-glass-home #portal-shell>#sidebar-toggle{display:block!important;position:fixed;top:8px;left:8px;z-index:60;width:36px;height:36px;padding:3px}
 html body.liquid-glass-home #portal-shell>.portal-content{padding-top:46px!important}
}

/* User-approved compact sidebar controls: keep accessible names and handlers. */
html body.liquid-glass-home #portal-shell #portal-sidebar #sidebar-rail-toggle{width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;margin:0 0 6px auto!important;border-radius:50%!important;gap:0!important}
#portal-sidebar #sidebar-rail-toggle .rail-toggle-copy{display:none!important}
#portal-sidebar #sidebar-rail-toggle .rail-toggle-icon{font-size:12px!important;line-height:1}
html body.liquid-glass-home #portal-shell #portal-sidebar .oa-language-switch{flex-direction:row!important;justify-content:flex-start;gap:6px}
html body.liquid-glass-home #portal-shell #portal-sidebar .oa-language-switch button{flex:0 0 30px!important;width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;font-size:0!important;border-radius:50%!important;display:inline-flex;align-items:center;justify-content:center}
#portal-shell #portal-sidebar .oa-language-switch button[data-language='zh-Hant']::after{content:'繁';font-size:12px!important}
#portal-shell #portal-sidebar .oa-language-switch button[data-language='vi']::after{content:'Vn';font-size:11px!important}
@media(min-width:761px){html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar .oa-language-switch{justify-content:center}}

/* Embedded modules fill the space actually available after moving global chrome. */
@media screen{
 html body.liquid-glass-home:has(#oa-workspace:not([hidden])) #portal-shell>.portal-content{height:100dvh;min-height:0!important;display:flex;flex-direction:column;overflow:hidden;padding:6px 10px 8px!important;box-sizing:border-box}
 #portal-shell .portal-content>#oa-workspace:not([hidden]){flex:1 1 0;min-height:0;display:flex;flex-direction:column;width:100%;overflow:hidden}
 #oa-workspace .oa-shell-frames{flex:1 1 0;min-height:0;overflow:hidden}
 #oa-workspace .oa-module-frame:not([hidden]){height:100%!important;min-height:0!important;width:100%;max-width:100%;border-radius:6px}
 #oa-workspace .oa-shell-status{flex:none;margin:0}
 #portal-shell .portal-content>.hr-ribbon{flex:none}
}
@media screen and (max-width:760px){html body.liquid-glass-home:has(#oa-workspace:not([hidden])) #portal-shell>.portal-content{padding:46px 4px 4px!important}}

/* UI-20261102-005: account actions stay compact; permissions live in admin. */
html body.liquid-glass-home #portal-shell #portal-sidebar .account{justify-content:flex-start;gap:6px;flex-wrap:wrap}
html body.liquid-glass-home #portal-shell #portal-sidebar #portal-user{font-size:11px;max-width:calc(100% - 36px);overflow-wrap:normal}
html body.liquid-glass-home #portal-shell #portal-sidebar #portal-logout{min-width:0!important;min-height:24px!important;padding:2px 0!important;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:3px!important;font-size:11px!important;white-space:nowrap;color:#315b75}
html body.liquid-glass-home #portal-shell #portal-sidebar #portal-logout:hover{text-decoration:underline;color:#064f9e}
html body.liquid-glass-home #portal-shell #portal-sidebar #portal-language-row{display:flex;align-items:center;gap:6px;width:100%;min-width:0}
html body.liquid-glass-home #portal-shell #portal-sidebar #portal-language-host{flex:1;min-width:0}
html body.liquid-glass-home #portal-shell #portal-sidebar #portal-language-row #sidebar-rail-toggle{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 30px;margin:0 0 0 auto!important}
@media(min-width:761px){
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar #portal-language-row{flex-direction:column}
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar #portal-language-host{flex:none;width:100%}
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar #portal-language-row #sidebar-rail-toggle{margin:0 auto!important}
 html body.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar #portal-logout{padding:3px!important}
}

html body #portal-shell #portal-sidebar .oa-language-switch button[data-language='zh-Hans']::after{content:'简';font-size:12px!important}

/* UI-20261102-019: stable sidebar tracks; only the hovered row lifts. */
#portal-sidebar #portal-workspace-tools{height:40px;min-height:40px;flex:0 0 40px;box-sizing:border-box;overflow:hidden}
#portal-sidebar #portal-workspace-tools .oa-workspace-trail strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-height:36px;line-height:16px}
#portal-sidebar{overflow-anchor:none;scrollbar-gutter:stable}
@media screen and (min-width:761px){
 html body.oa-ui.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar #portal-workspace-tools{height:0;min-height:0;flex-basis:0}
}


/* UI029: inset floating navigation, shared rail width and original handlers. */
html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar{inset:16px auto 16px 16px!important;height:calc(100dvh - 32px)!important;max-height:calc(100dvh - 32px)!important;border:1px solid #b8cfdf!important;border-radius:calc(var(--oa-sidebar-card-radius) + var(--oa-sidebar-card-inset))!important;box-shadow:inset 0 1px 0 #ffffffb3,0 8px 24px rgba(31,65,92,.09)!important;box-sizing:border-box;overflow-y:auto!important}
@media(min-width:761px){
 html body.oa-ui.liquid-glass-home #portal-shell>.portal-content{margin-left:calc(var(--sidebar-width) + 32px)!important;width:calc(100% - var(--sidebar-width) - 32px)!important}
}
@media(max-width:760px){
 html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar{width:min(246px,calc(100vw - 32px))!important}
 html body.oa-ui.liquid-glass-home #portal-shell:not(.menu-open) #portal-sidebar{transform:translateX(calc(-100% - 32px))!important}
 html body.oa-ui.liquid-glass-home #portal-shell.menu-open #portal-sidebar{transform:none!important}
}

/* UI030: a slim neutral thumb, no painted rail through the rounded panel. */
html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar{scrollbar-width:auto;scrollbar-color:auto}
html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar::-webkit-scrollbar{width:6px;height:6px;background:transparent}
html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar::-webkit-scrollbar-track{background:transparent;border:0;box-shadow:none;margin-block:20px}
html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar::-webkit-scrollbar-thumb{background:#c2c7cc;border:1px solid transparent;background-clip:padding-box;border-radius:999px;min-height:32px;box-shadow:none}
html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar::-webkit-scrollbar-thumb:hover{background-color:#b1b8bf}
html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar::-webkit-scrollbar-corner{background:transparent}
html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar::-webkit-scrollbar-button{display:none;width:0;height:0}
@supports not selector(::-webkit-scrollbar){html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar{scrollbar-width:thin;scrollbar-color:#c2c7cc transparent}}

html body.oa-ui.liquid-glass-home #portal-shell #portal-sidebar nav>.nav-label:first-child{margin-top:6px!important}

/* Keep the native scroll lane on the right and reserve matching space on the left. */
@media(min-width:761px){
 html body.oa-ui.liquid-glass-home #portal-shell:not(.sidebar-collapsed){--sidebar-width:220px!important}
}
html body.oa-ui.oa-ui.liquid-glass-home #portal-shell #portal-sidebar {
 --oa-sidebar-card-radius:10px;
 --oa-sidebar-child-inset:8px;
 --oa-sidebar-child-radius:8px;
 --oa-sidebar-card-inset:16px;
 --oa-sidebar-scroll-gutter:6px;
 --oa-sidebar-frame-border:1px;
 padding-inline:calc(var(--oa-sidebar-card-inset) - var(--oa-sidebar-scroll-gutter) - var(--oa-sidebar-frame-border))!important;
 scrollbar-gutter:stable both-edges;
}
@media(min-width:761px){
 html body.oa-ui.oa-ui.liquid-glass-home #portal-shell:not(.sidebar-collapsed) #portal-sidebar {--oa-sidebar-card-inset:24px}
 html body.oa-ui.oa-ui.liquid-glass-home #portal-shell.sidebar-collapsed #portal-sidebar {--oa-sidebar-card-inset:14px}
}
html body.oa-ui.oa-ui.liquid-glass-home #portal-shell #portal-sidebar :is(nav,.sidebar-bottom) {
 width:100%!important;
 min-width:0;
 box-sizing:border-box;
 padding-inline:0!important;
 justify-items:stretch;
}
html body.oa-ui.oa-ui.liquid-glass-home #portal-shell #portal-sidebar :is(nav>.nav-item,.sidebar-bottom>.nav-item) {
 width:100%!important;
 max-width:none!important;
 box-sizing:border-box;
 margin-inline:0!important;
 border-radius:var(--oa-sidebar-card-radius)!important;
}
html body.oa-ui.oa-ui.liquid-glass-home #portal-shell #portal-sidebar .shell-sub-menu {
 width:100%!important;
 min-width:0;
 margin-inline:0!important;
 padding-inline:var(--oa-sidebar-child-inset)!important;
}
html body.oa-ui.oa-ui.liquid-glass-home #portal-shell #portal-sidebar .shell-sub-item {
 border-radius:var(--oa-sidebar-child-radius)!important;
}
#portal-sidebar .sidebar-wave-space{pointer-events:none;visibility:hidden;box-sizing:border-box;flex-shrink:0}

html body.liquid-glass-home #portal-shell #portal-sidebar .topbar-heading{align-items:center;justify-content:space-between;gap:8px}
.oa-motion-control{position:relative;display:inline-flex;align-items:center;gap:5px;min-height:28px;cursor:pointer;font-weight:600;font-size:11px;white-space:nowrap}
.oa-motion-control input{position:absolute;width:1px;height:1px;opacity:0}
.oa-motion-track{position:relative;display:block;width:32px;height:18px;border:1px solid #b1c8da;border-radius:999px;background:#29475e}
.oa-motion-track::after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff}
.oa-motion-control input:checked+.oa-motion-track{background:#176fae;border-color:#b8e4ff}
.oa-motion-control input:checked+.oa-motion-track::after{left:16px}
.oa-motion-control input:focus-visible+.oa-motion-track{outline:2px solid #fff;outline-offset:3px}
@media(max-width:760px){.oa-motion-control{min-height:44px}}
