/* One permission-filtered Dock for desktop and mobile; intro stays isolated. */
body:not(.login-mode){--ps-bottom-inset:112px}
body:not(.login-mode) header{gap:16px}
body:not(.login-mode) header #search-form{min-width:150px;flex:1}
body:not(.login-mode) #mobile-menu{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;padding:0;border:0;background:transparent;border-radius:12px}
body:not(.login-mode) #mobile-menu svg{width:24px;height:24px}
body:not(.login-mode) #main{padding-bottom:var(--ps-bottom-inset)}
body:not(.login-mode) #sidebar{padding-bottom:var(--ps-bottom-inset)}
body:not(.login-mode) .app-dock{display:flex;align-items:center;justify-content:center;gap:6px;position:fixed;inset:auto auto 16px 50%;transform:translateX(-50%);z-index:45;width:max-content;max-width:calc(100% - 24px);min-height:76px;padding:9px;border:1px solid var(--ps-line);border-radius:24px;background:#f2fefef2;box-shadow:0 10px 35px #183a2d24,0 1px 3px #183a2d14;backdrop-filter:blur(20px) saturate(150%);-webkit-backdrop-filter:blur(20px) saturate(150%);overflow:visible}
body:not(.login-mode) .app-dock .dock-item{position:relative;display:flex;flex:0 0 56px;align-items:center;justify-content:center;flex-direction:column;gap:4px;min-width:44px;min-height:56px;padding:6px;border:0;border-radius:16px;background:transparent;color:var(--ps-muted);transition:transform .16s ease,background-color .16s ease;transform-origin:bottom center}
body:not(.login-mode) .app-dock .dock-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#fff;box-shadow:0 1px 2px #183a2d0b}
body:not(.login-mode) .app-dock svg{width:25px;height:25px}
body:not(.login-mode) .app-dock .dock-item.active{background:var(--ps-mint-soft);color:var(--ps-action)}
body:not(.login-mode) .app-dock .dock-item.active::after{content:"";position:absolute;bottom:1px;width:4px;height:4px;border-radius:50%;background:var(--ps-mint)}
body:not(.login-mode) .app-dock .dock-label{position:absolute;bottom:calc(100% + 15px);left:50%;transform:translateX(-50%);visibility:hidden;opacity:0;white-space:nowrap;background:var(--ps-ink);color:white;padding:5px 9px;border-radius:7px;font-size:12px;line-height:1.5;pointer-events:none}
body:not(.login-mode) .app-dock .dock-item:focus-visible .dock-label{visibility:visible;opacity:1}
body:not(.login-mode) .app-dock [hidden]{display:none!important}
body:not(.login-mode) .sidebar-top{display:flex;align-items:flex-start;gap:8px}
body:not(.login-mode) .sidebar-top .company{flex:1;min-width:0}
body:not(.login-mode) .sidebar-close{display:none;flex-shrink:0;min-width:44px;min-height:44px;padding:0;font-size:26px}
body:not(.login-mode) .sidebar-order-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px;color:var(--ps-muted);font-size:12px}
body:not(.login-mode) .sidebar-order-toolbar button{min-height:36px;padding:6px 10px;font-size:12px}
body:not(.login-mode) .menu-order-hint{font-size:13px;line-height:1.6;color:var(--ps-muted);margin:0 0 12px}
body:not(.login-mode) .menu-order-actions{display:flex;flex-wrap:wrap;gap:8px;position:sticky;top:0;padding:8px 0 12px;z-index:2;background:var(--ps-sidebar)}
body:not(.login-mode) .menu-order-actions button{min-height:40px;padding:8px 10px;font-size:12px}
body:not(.login-mode) .menu-order-row{display:flex;align-items:center;gap:4px;min-height:48px;padding:4px 0;border-bottom:1px solid var(--ps-line);cursor:grab}
body:not(.login-mode) .menu-order-row.dragging{opacity:.45}
body:not(.login-mode) .menu-order-label{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}
body:not(.login-mode) .menu-grip{color:var(--ps-muted);font-size:16px}
body:not(.login-mode) .menu-order-row button{width:32px;min-width:32px;min-height:40px;padding:0;font-size:17px}
body:not(.login-mode) #toast{bottom:var(--ps-bottom-inset)}
@media(min-width:761px){
 body.sidebar-collapsed:not(.login-mode) #sidebar{transform:translateX(-102%);visibility:hidden}
 body.sidebar-collapsed:not(.login-mode) #main{margin-left:0}
 body:not(.login-mode) #sidebar{transition:transform .18s ease}
 body.chat-page:not(.login-mode) #messenger{height:calc(100dvh - 64px - var(--ps-bottom-inset) - 32px);min-height:300px}
}
@media(hover:hover) and (pointer:fine){body:not(.login-mode) .app-dock .dock-item:hover{transform:translateY(-5px) scale(1.1);background:var(--ps-mint-soft)}body:not(.login-mode) .app-dock .dock-item:hover .dock-label{visibility:visible;opacity:1}}
@media(max-width:760px){
 body:not(.login-mode){--ps-bottom-inset:calc(104px + env(safe-area-inset-bottom))}
 body:not(.login-mode) header{gap:8px;padding-left:12px;padding-right:12px}
 body:not(.login-mode) header .brand{min-width:0}
 body:not(.login-mode) .sidebar-close{display:block}
 body:not(.login-mode) #sidebar{margin:0;padding-bottom:calc(24px + env(safe-area-inset-bottom))}
 body:not(.login-mode) .sidebar-order-toolbar button,body:not(.login-mode) .menu-order-actions button{min-height:44px;font-size:14px}
 body:not(.login-mode) .menu-order-label{font-size:15px}
 body:not(.login-mode) .menu-order-row button{width:44px;min-width:44px;min-height:44px}
 body:not(.login-mode) .app-dock{inset:auto auto calc(8px + env(safe-area-inset-bottom)) 50%;width:min(calc(var(--dock-items,5) * 64px + 12px),calc(100% - 24px));max-width:420px;min-height:76px;gap:2px;padding:5px;border-radius:22px}
 body:not(.login-mode) .app-dock .dock-item{flex:1 1 0;min-width:44px;min-height:64px;padding:3px 0 7px;border-radius:16px;gap:2px}
 body:not(.login-mode) .app-dock .dock-icon{width:32px;height:32px;background:transparent;box-shadow:none}
 body:not(.login-mode) .app-dock .dock-label{position:static;transform:none;visibility:visible;opacity:1;padding:0;background:transparent;color:inherit;font-size:12px;line-height:1.4;letter-spacing:-.3px}
 body:not(.login-mode) .app-dock .dock-item.active::after{bottom:2px}
 body.chat-page:not(.login-mode) #messenger{height:calc(100dvh - 58px - env(safe-area-inset-top) - var(--ps-bottom-inset));min-height:0}
 body.chat-page:not(.login-mode) #main{padding-bottom:var(--ps-bottom-inset)}
}
@media(prefers-reduced-motion:reduce){body:not(.login-mode) .app-dock .dock-item,body:not(.login-mode) #sidebar{transition:none}body:not(.login-mode) .app-dock .dock-item:hover{transform:none}}
@media print{body:not(.login-mode) .app-dock{display:none!important}}

@media(max-width:360px){body:not(.login-mode) header{gap:6px}body:not(.login-mode) header .brand{gap:6px;font-size:13px}body:not(.login-mode) header .brand img{width:28px;height:28px}body:not(.login-mode) header .head-tools{gap:0}}

/* Only the compact sidebar toolbar uses icon-only labels. Menu names stay visible. */
body:not(.login-mode) .sidebar-order-toolbar .sidebar-order-edit{display:inline-grid;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0}
body:not(.login-mode) .sidebar-order-toolbar .sidebar-order-edit svg{width:23px;height:23px;stroke-width:2}

/* Category accordions start expanded; only the account/session keeps collapses. */
body:not(.login-mode) .sidebar-order-toolbar:empty{display:none}
body:not(.login-mode) .sidebar-order-toolbar:has(.sidebar-order-edit){justify-content:flex-end}
body:not(.login-mode) #sidebar .sidebar-menu-group{margin-top:12px}
body:not(.login-mode) #sidebar .sidebar-group-toggle{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:44px;padding:8px 10px;background:transparent;border:0;color:var(--ps-ink);font-size:13px;font-weight:750;text-align:left}
body:not(.login-mode) #sidebar .sidebar-group-toggle:hover{background:var(--ps-inset)}
body:not(.login-mode) #sidebar .sidebar-group-content[hidden]{display:none!important}
body:not(.login-mode) #sidebar .sidebar-group-content{display:grid;gap:2px}
body:not(.login-mode) :is(#sidebar .nav-icon,.app-dock .dock-icon,.sidebar-group-chevron){display:inline-grid;place-items:center;flex-shrink:0;border-radius:7px;background:var(--ps-on-mint);color:var(--ps-mint);opacity:1}
body:not(.login-mode) #sidebar .nav-icon{width:28px;height:28px}
body:not(.login-mode) #sidebar .nav-icon svg{width:20px;height:20px;stroke-width:2;color:var(--ps-mint);opacity:1}
body:not(.login-mode) .sidebar-group-chevron{width:22px;height:22px}
body:not(.login-mode) .sidebar-group-chevron svg{width:17px;height:17px;transition:transform .16s ease}
body:not(.login-mode) [aria-expanded=false]>.sidebar-group-chevron svg{transform:rotate(-90deg)}
body:not(.login-mode) .app-dock .dock-icon svg{color:var(--ps-mint);opacity:1}
@media(max-width:760px){body:not(.login-mode) #sidebar .sidebar-group-toggle{font-size:14px}body:not(.login-mode) .app-dock .dock-icon{background:var(--ps-on-mint)}}
@media(prefers-reduced-motion:reduce){body:not(.login-mode) .sidebar-group-chevron svg{transition:none}}
/* Full-width category rows, with clear separators like the supplied sidebar reference. */
body:not(.login-mode) #sidebar .sidebar-menu-group{margin:0 -8px;border-top:1px solid var(--ps-line)}
body:not(.login-mode) #sidebar .sidebar-menu-list>.sidebar-menu-group:first-of-type{margin-top:12px}
body:not(.login-mode) #sidebar .sidebar-group-content{padding:0 8px 12px}
