.account-toolbar { display: flex; align-items: center; gap: 12px; }
body > .account-toolbar { position: absolute; inset: 0 0 auto; height: 0; z-index: 40; pointer-events: none; }
body > .account-toolbar > button { position: absolute; top: 8px; pointer-events: auto; }
body > .account-toolbar > .account-profile-trigger { right: 24px; }
body > .account-toolbar > .account-settings-trigger { right: 88px; }
body:has(> .account-toolbar) { --account-header-space: 144px; }
body:has(.workspace-sidebar-toggle) { --account-header-space: 80px; }
body:has(> .account-toolbar) :is(main > header, .topbar) { padding-right: var(--account-header-space); min-height: 44px; }
body:has(> .account-toolbar) #content > :first-child { margin-right: var(--account-header-space); min-height: 44px; }
body .account-toolbar button { width: 52px; min-width: 52px; height: 52px; min-height: 52px; padding: 0; margin: 0; border: 1px solid var(--ln); border-radius: 12px; background: var(--sf); color: var(--ink); font: 28px/1 system-ui, sans-serif; }
body .account-toolbar .account-profile-trigger { border-radius: 50%; }
.account-person-icon { display: block; position: relative; width: 28px; height: 30px; margin: auto; }
.account-person-icon::before { content: ''; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: currentColor; left: 8px; top: 0; }
.account-person-icon::after { content: ''; position: absolute; width: 26px; height: 14px; border-radius: 10px 10px 4px 4px; background: currentColor; left: 1px; bottom: 0; }
.account-popover { position: fixed; inset: auto; margin: 0; box-sizing: border-box; padding: 22px; max-height: calc(100dvh - 100px); overflow: auto; border: 1px solid var(--ln); border-radius: 14px; background: var(--sf); color: var(--ink); box-shadow: 0 12px 32px #0004; font: 18px/1.45 system-ui, sans-serif; }
.account-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.account-menu-heading h2 { font-size: 22px; margin: 0; }
body .account-popover button:not(.theme-switch) { min-height: 48px; padding: 10px 14px; border: 1px solid var(--ln); border-radius: 10px; color: var(--ink); background: var(--bg2); font: inherit; }
body .account-menu-heading button { min-width: 48px; font-size: 26px; }
.account-theme-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.account-popover.account-settings-menu { padding: 16px; font-size: 16px; }
.account-settings-menu .account-menu-heading { margin-bottom: 16px; }
.account-settings-menu .account-menu-heading h2 { font-size: 18px; }
.account-settings-menu .account-theme-row { gap: 12px; }
body .account-settings-menu .theme-switch { width: 84px; min-width: 84px; height: 44px; min-height: 44px; }
.account-settings-menu .theme-switch-thumb { width: 34px; height: 34px; }
.account-settings-menu .theme-switch[aria-checked='true'] .theme-switch-thumb { transform: translateX(40px); }
.account-settings-menu .theme-switch-sun, .account-settings-menu .theme-switch-moon { font-size: 27px; }
.account-settings-menu .theme-switch-sun { left: 8px; }
.account-settings-menu .theme-switch-moon { right: 8px; }
.account-name { font-size: 22px; font-weight: 700; overflow-wrap: anywhere; margin: 0 0 4px; }
.account-login { font-size: 14px; color: var(--mut); overflow-wrap: anywhere; margin: 0 0 15px; }
.account-popover.account-profile-menu { padding: 20px; font-size: 15px; }
.account-role-details summary { color: var(--blue); cursor: pointer; padding: 10px 0; min-height: 44px; box-sizing: border-box; }
.account-profile-menu .account-menu-actions { padding-top: 19px; margin-top: 17px; gap: 10px; }
body .account-profile-menu button { min-height: 44px; padding: 10px 14px; }
.account-caption { color: var(--mut); margin-bottom: 10px; }
.account-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.account-roles span { background: var(--bluebg); color: var(--blue); border-radius: 8px; padding: 7px 12px; overflow-wrap: anywhere; }
.account-menu-actions { display: grid; gap: 10px; border-top: 1px solid var(--ln); margin-top: 24px; padding-top: 20px; }
body .account-popover .account-menu-actions button.account-exit { color: var(--danger-text, #f4a0a8); background: var(--danger-surface, #3b2229); border-color: var(--danger-border, #80414b); }
body:has(.account-toolbar) #logout { display: none; }
.packing-workplace .station-settings .account-toolbar, .packing-workplace .right .account-toolbar { padding: 0; background: transparent; border: 0; }
body:has(.workspace-sidebar-toggle):is(.warehouse-shell,.dispatch-shell,.manager-workspace) .account-settings-trigger { position: fixed; top: auto; right: auto; bottom: 12px; left: 74px; z-index: 111; }
body:has(.workspace-sidebar-toggle):is(.workspace-sidebar-collapsed,.workspace-sidebar-mobile) .account-settings-trigger { position: fixed; top: auto; right: auto; bottom: 76px; left: 10px; z-index: 111; }
body:has(.workspace-sidebar-toggle):is(.warehouse-shell,.dispatch-shell,.manager-workspace) .account-toolbar { justify-content: flex-end; }
body:has(.workspace-drawer) .account-settings-trigger { position: fixed; top: auto; right: auto; bottom: 12px; left: 74px; z-index: 111; }
body:has(.workspace-drawer):is(.workspace-sidebar-collapsed,.workspace-sidebar-mobile) .account-settings-trigger { bottom: 76px; left: 10px; }
body:has(.workspace-drawer) .account-toolbar { justify-content: flex-end; }
html body:is(.workspace-sidebar-collapsed, .workspace-sidebar-mobile):not(:has(> .login:not(.hidden):not([hidden]))) { padding-left: 72px; }
@media screen and (max-width: 600px) {
  html body:is(.workspace-sidebar-collapsed, .workspace-sidebar-mobile):not(:has(> .login:not(.hidden):not([hidden]))) { padding-left: 0; }
  body:has(> .account-toolbar) :is(main > header, .topbar) { padding-right: 0; padding-top: 64px; }
  body:has(> .account-toolbar) #content > :first-child { margin-right: 0; margin-top: 64px; }
  body:has(.workspace-sidebar-toggle):is(.workspace-sidebar-collapsed,.workspace-sidebar-mobile) .account-settings-trigger,
  body:has(.workspace-drawer):is(.workspace-sidebar-collapsed,.workspace-sidebar-mobile) .account-settings-trigger { top: 8px; bottom: auto; left: 12px; right: auto; position: absolute; }
}
@media (max-width: 480px) {
  body > .account-toolbar > .account-profile-trigger { right: 14px; }
  body > .account-toolbar > .account-settings-trigger { right: 78px; }
  .account-popover { padding: 16px; }
}
@media print { body .account-toolbar, body .account-popover { display: none; } }

body:has(.account-toolbar) .workspace-sidebar-toggle { width: 52px; min-width: 52px; height: 52px; min-height: 52px; border-radius: 12px; }
@media (min-width: 1051px) {
  body:has(.account-toolbar) .side.workspace-drawer { height: calc(100dvh - 76px); }
  body:has(.account-toolbar) .manager-workspaces.workspace-drawer { bottom: 76px; }
}
