/* NEXEI v3.6.2 - targeted visual fixes over validated v3.6.1. */
:root{--nexei-sidebar-v362:104px}

/* Sidebar: absolute geometry. Hover/focus cannot reflow any icon. */
@media (min-width:901px){
  html body:not(.page-login) .sidebar,
  html body:not(.page-login) .sidebar:hover,
  html body:not(.page-login) .sidebar:focus,
  html body:not(.page-login) .sidebar:focus-within,
  html body:not(.page-login) .sidebar-v351,
  html body:not(.page-login) .sidebar-v351:hover,
  html body:not(.page-login) .sidebar-v352,
  html body:not(.page-login) .sidebar-v352:hover{
    position:fixed!important;left:0!important;top:0!important;bottom:0!important;
    width:var(--nexei-sidebar-v362)!important;min-width:var(--nexei-sidebar-v362)!important;max-width:var(--nexei-sidebar-v362)!important;
    margin:0!important;padding:0!important;overflow:hidden!important;box-sizing:border-box!important;
    transform:none!important;translate:none!important;scale:1!important;transition:none!important;animation:none!important;
  }
  html body:not(.page-login) .sidebar .brand,
  html body:not(.page-login) .sidebar:hover .brand{
    position:absolute!important;left:0!important;top:10px!important;width:var(--nexei-sidebar-v362)!important;height:52px!important;
    padding:0!important;margin:0!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:0!important;
    transform:none!important;translate:none!important;scale:1!important;transition:none!important;animation:none!important;
  }
  html body:not(.page-login) .sidebar .brand-mark,
  html body:not(.page-login) .sidebar .brand-mark img,
  html body:not(.page-login) .sidebar:hover .brand-mark,
  html body:not(.page-login) .sidebar:hover .brand-mark img{
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important;max-height:44px!important;
    padding:0!important;margin:0!important;object-fit:contain!important;transform:none!important;translate:none!important;scale:1!important;transition:none!important;animation:none!important;
  }
  html body:not(.page-login) .sidebar .brand-copy-v351,
  html body:not(.page-login) .sidebar:hover .brand-copy-v351,
  html body:not(.page-login) .sidebar .brand>div:not(.brand-mark),
  html body:not(.page-login) .sidebar:hover .brand>div:not(.brand-mark),
  html body:not(.page-login) .sidebar .nav-text,
  html body:not(.page-login) .sidebar:hover .nav-text{
    display:none!important;visibility:hidden!important;opacity:0!important;width:0!important;height:0!important;overflow:hidden!important;margin:0!important;padding:0!important;
  }
  html body:not(.page-login) .sidebar nav,
  html body:not(.page-login) .sidebar:hover nav{
    position:absolute!important;left:0!important;top:70px!important;width:var(--nexei-sidebar-v362)!important;height:auto!important;
    margin:0!important;padding:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:4px!important;
    transform:none!important;translate:none!important;scale:1!important;transition:none!important;animation:none!important;
  }
  html body:not(.page-login) .sidebar nav a,
  html body:not(.page-login) .sidebar nav a:hover,
  html body:not(.page-login) .sidebar nav a:focus,
  html body:not(.page-login) .sidebar nav a:active,
  html body:not(.page-login) .sidebar:hover nav a{
    position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;inset:auto!important;
    width:50px!important;min-width:50px!important;max-width:50px!important;height:44px!important;min-height:44px!important;max-height:44px!important;flex:0 0 44px!important;
    margin:0!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:0!important;box-sizing:border-box!important;
    transform:none!important;translate:none!important;scale:1!important;transition:none!important;animation:none!important;
  }
  html body:not(.page-login) .sidebar nav a *,
  html body:not(.page-login) .sidebar nav a:hover *,
  html body:not(.page-login) .sidebar nav a:focus *,
  html body:not(.page-login) .sidebar nav a:active *,
  html body:not(.page-login) .sidebar:hover nav a *{
    margin:0!important;transform:none!important;translate:none!important;scale:1!important;transition:none!important;animation:none!important;
  }
  html body:not(.page-login) .sidebar .nav-icon,
  html body:not(.page-login) .sidebar .nav-icon:hover{
    width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;max-width:30px!important;max-height:30px!important;
    padding:0!important;margin:0!important;display:grid!important;place-items:center!important;transform:none!important;translate:none!important;scale:1!important;
  }
  html body:not(.page-login) .sidebar .nav-icon img,
  html body:not(.page-login) .sidebar .nav-icon svg{
    width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;max-width:28px!important;max-height:28px!important;
    margin:0!important;padding:0!important;object-fit:contain!important;transform:none!important;translate:none!important;scale:1!important;
  }
  html body:not(.page-login) .sidebar .user-card-v351,
  html body:not(.page-login) .sidebar:hover .user-card-v351{
    position:absolute!important;left:21px!important;right:auto!important;bottom:12px!important;width:62px!important;height:82px!important;max-height:82px!important;
    margin:0!important;padding:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;
    transform:none!important;translate:none!important;scale:1!important;transition:none!important;animation:none!important;
  }
  html body:not(.page-login) .sidebar .sidebar-profile-v351,
  html body:not(.page-login) .sidebar .sidebar-profile-v351:hover,
  html body:not(.page-login) .sidebar .sidebar-logout-v351,
  html body:not(.page-login) .sidebar .sidebar-logout-v351:hover{
    margin:0!important;padding:0!important;transform:none!important;translate:none!important;scale:1!important;transition:none!important;animation:none!important;
  }
  html body:not(.page-login) main.main,
  html body:not(.page-login) .sidebar:hover~main.main,
  html body:not(.page-login) .sidebar:hover+.main{margin-left:var(--nexei-sidebar-v362)!important}
  html body.page-admin_workflow_canvas main.main{margin:0!important;padding:0!important}
  html body.page-admin_workflow_canvas .bpmn-page-v359{left:var(--nexei-sidebar-v362)!important;right:0!important;width:auto!important;margin:0!important;padding:0!important}
}

/* Viewer: center attachment stack with a slight visual shift to the left. */
body.page-view .viewer .files{display:flex!important;flex-direction:column!important;align-items:center!important;padding:12px 14px 14px 6px!important;box-sizing:border-box!important}
body.page-view .viewer .files>h3{align-self:stretch!important;width:100%!important;text-align:left!important;margin:2px 6px 12px!important}
body.page-view .viewer .file-item{width:100%!important;max-width:178px!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box!important}
body.page-view .viewer .file-main-link{width:100%!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important}
body.page-view .viewer .file-item.sub-file{max-width:178px!important}
body.page-view .viewer .file-sub-link{min-width:0!important}

/* Smart summary can be collapsed without removing its actions. */
.process-ai-v338 .process-ai-head-v330{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;flex-wrap:wrap!important}
.process-ai-v338 .process-ai-head-v330>form{margin-left:auto!important}
.ai-summary-toggle-v362{border:1px solid #dbe3ef;background:#fff;color:#334155;border-radius:9px;padding:6px 9px;font-size:11px;font-weight:800;cursor:pointer}
.process-ai-v338.is-collapsed-v362>:not(.process-ai-head-v330){display:none!important}
.process-ai-v338.is-collapsed-v362 .process-ai-head-v330{margin-bottom:0!important}

/* BPMN context pad: paint is part of the same action group, never a second floating box. */
.bpmn-page-v359 .nexei-bpmn-paint-only-v359{display:none!important}
.bpmn-page-v359 .djs-context-pad .nexei-context-paint-v362{display:flex!important;align-items:center!important;justify-content:center!important;cursor:pointer!important}
.bpmn-page-v359 .djs-context-pad .nexei-context-paint-v362 svg{width:18px!important;height:18px!important;fill:currentColor!important;pointer-events:none!important}
.bpmn-page-v359 .djs-context-pad .nexei-context-paint-v362:hover,
.bpmn-page-v359 .djs-context-pad .nexei-context-paint-v362:focus{transform:none!important;translate:none!important;scale:1!important}

/* Dynamic due dates: hidden always wins even against older !important field layouts. */
#bpmnTestFieldsV359 .bpmn-test-field-v359[data-due-index-v361][hidden],
#bpmnTestFieldsV359 .bpmn-test-field-v359[aria-hidden="true"]{display:none!important;visibility:hidden!important}

/* API tokens assigned to users. */
.api-user-token-note-v362{padding:10px 12px;border:1px solid #dbeafe;background:#eff6ff;border-radius:10px;color:#475569;font-size:12px;line-height:1.4}
.api-credential-owner-v362{display:flex;gap:6px;align-items:center;font-size:12px;color:#475569;margin-top:8px}
.api-credential-owner-v362 b{color:#0f172a}
