html, body, #page-wrapper, #login {
    height: 100% !important;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow:hidden;
}
body.swal2-height-auto, html body.swal2-height-auto{height: 100% !important;}
#page-wrapper{
    display:flex;
    flex-direction: row;
    max-height: 100%;
}

#main-wrapper{
    display:flex;
    flex:1 1 auto;
    flex-direction:column;
    min-width:0;
    height:100%;
    max-height:100%;
}

#header-wrapper{
    display:flex;
    flex-direction: row;
    flex: 0 0 auto;
    width:100%;
    height:70px;
    max-height:70px;
    border-bottom: 1px solid #adadad;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2);
    z-index: 10;
}

#sidebar-wrapper #logo{
    display:block;
    flex:0 0 auto;
    height:70px;
    margin:0;
    padding:22px 20px 6px 20px;
    width:calc(100% + 1px);
}
#sidebar-wrapper #logo span{
    background: url(images/logo_300.png) no-repeat center;
    background-size: contain;
    display:block;
    width:220px;
    height:34px;
}


#header-wrapper #document-title {
    padding: 10px 0 0 30px;
    font-size: 20px;
    border-radius: 6px;
    display: inline-block;
    flex: 1 1 auto;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px dashed transparent;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    margin: 10px;
}

#sidebar-wrapper{
    display:flex;
    flex-direction: column;
    flex: 0 0 auto;
    width:300px;
    height:100dvh;
    max-height:100dvh;
}


#sidebar-content{
    width:100%;
    display:block;
    flex:1 1 auto;
    height:100%;
    max-height:100%;
    padding-top:15px;
}

#sidebar-wrapper #toggle-sidebar {
    position: absolute;
    top: 23px;
    right: 5px;
    z-index: 6;
    width: 28px;
    height: 28px;
    text-align: center;
    line-height: 27px;
}

#sidebar-wrapper #toggle-sidebar i{
    font-size:13px;
}


.sidebar-collapsed #sidebar-wrapper #logo{
    display:none;
}
.sidebar-collapsed #sidebar-wrapper{width: 30px;}
.sidebar-collapsed #sidebar-wrapper #toggle-sidebar{
    top: 23px;
    right: 1px;
    width: 28px;
    transform:rotate(180deg);
}
.sidebar-collapsed #sidebar-wrapper #sidebar-content,
.sidebar-collapsed #sidebar-wrapper #sidebar-footer{display:none;}
.sidebar-collapsed #sidebar-wrapper:after {
    background: url(images/logo_300.png) no-repeat;
    background-size: contain;
    content: "";
    width: 192px;
    height: 26px;
    position: absolute;
    transform: rotate(-90deg) translateY(-80px);
    bottom: 95px;
    left: 0;
    display: block;
}


#content-wrapper{
    display:flex;
    flex-direction: row;
    flex: 1 1 auto;
    min-height:0;
    height:100%;
    max-height:100%;
}

#content-header{
    flex: 0 0 auto;
}

#content{
    flex: 1 1 auto;
    display:flex;
    flex-direction: row;
    min-width:0;
    height:100%;
}




#document-agent {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: 400px;
    max-width:400px;
    background: #eee;
    border-right:1px solid #ccc;
}
#document-agent .agent-messages{
    flex: 1 1 auto;
    height:100%;
    max-height:100%;
    overflow-y:scroll;
}
#document-agent .agent-input{
    flex: 0 0 auto;
    min-height:50px;

}
.document-agent .agent-input textarea{
    min-height:50px;
    width:100%;
    min-width:100%;
    max-width: 100%;
}

#app{
    flex: 1 1 auto;
    display:flex;
    flex-direction: column;
}

#header-tabs-wrapper{
    display:none;
    height:0;
}

#bpmn-editor{
    flex: 1 1 auto;
    height:100%;
    width:100%;
    position:relative;
    background:#ffffff;
}

#bpmn-diagram{
    width:100%;
    height:100%;
    background:#ffffff;
    scrollbar-color: #a8becc transparent;
}

#bpmn-editor,
#bpmn-diagram,
#bpmn-diagram * {
    scrollbar-color: #a8becc transparent;
}

#bpmn-editor::-webkit-scrollbar,
#bpmn-editor *::-webkit-scrollbar,
#bpmn-diagram::-webkit-scrollbar,
#bpmn-diagram *::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

#bpmn-editor::-webkit-scrollbar-track,
#bpmn-editor *::-webkit-scrollbar-track,
#bpmn-diagram::-webkit-scrollbar-track,
#bpmn-diagram *::-webkit-scrollbar-track {
    background: transparent;
}

#bpmn-editor::-webkit-scrollbar-thumb,
#bpmn-editor *::-webkit-scrollbar-thumb,
#bpmn-diagram::-webkit-scrollbar-thumb,
#bpmn-diagram *::-webkit-scrollbar-thumb {
    background: #a8becc;
    border: 3px solid transparent;
    border-radius: 8px;
    background-clip: content-box;
}

#bpmn-editor::-webkit-scrollbar-thumb:hover,
#bpmn-editor *::-webkit-scrollbar-thumb:hover,
#bpmn-diagram::-webkit-scrollbar-thumb:hover,
#bpmn-diagram *::-webkit-scrollbar-thumb:hover {
    background: #8faebe;
    border: 3px solid transparent;
    background-clip: content-box;
}

#bpmn-editor::-webkit-scrollbar-button,
#bpmn-editor *::-webkit-scrollbar-button,
#bpmn-diagram::-webkit-scrollbar-button,
#bpmn-diagram *::-webkit-scrollbar-button {
    background: #a8becc;
}

/* overview mini-map in corner */
#bpmn-overview {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 220px;
    height: 160px;
    overflow: hidden;
    cursor: grab;
    z-index: 4;
}

#bpmn-viewport-actions {
    position: absolute;
    right: 17px;
    bottom: 188px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 13px;
    pointer-events: auto;
}

#bpmn-viewport-actions .viewport-action-menu-wrapper {
    position: relative;
}

#bpmn-viewport-actions .viewport-action-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 13px;
}

#bpmn-viewport-actions .viewport-action-button {
    height: 40px;
    min-width: 40px;
    border: 1px solid #d6dee8;
    border-right: 0;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.96);
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    cursor: pointer !important;
    overflow: hidden;
    box-shadow: 0 0 0 4px rgba(186, 206, 219, 0.4);
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

#bpmn-viewport-actions .viewport-action-button-compact {
    min-width: 40px;
}

#bpmn-viewport-actions .viewport-action-button:hover,
#bpmn-viewport-actions .viewport-action-button:focus,
#bpmn-viewport-actions .viewport-action-menu-wrapper:focus-within .viewport-action-button {
    background: #526a7a;
    border-color: #526a7a;
    color: #fff;
    cursor: pointer;
}

#bpmn-viewport-actions .viewport-action-button:disabled {
    cursor: default;
    opacity: 0.55;
}

#bpmn-viewport-actions .viewport-action-icon {
    width: 40px;
    height: 38px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#bpmn-viewport-actions .viewport-action-label {
    max-width: 0;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    padding-left: 0;
    font-size: 13px;
    font-weight: 500;
    transition: max-width 160ms ease, opacity 160ms ease, padding 160ms ease;
}

#bpmn-viewport-actions .viewport-action-button:hover .viewport-action-label,
#bpmn-viewport-actions .viewport-action-button:focus .viewport-action-label,
#bpmn-viewport-actions .viewport-action-menu-wrapper:focus-within .viewport-action-label {
    max-width: 120px;
    opacity: 1;
    padding-left: 12px;
}

#bpmn-viewport-actions .viewport-download-menu {
    position: absolute;
    top: 0;
    right: 48px;
    min-width: 150px;
    padding: 6px;
    border: 1px solid #d6dee8;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0 0 4px rgba(186, 206, 219, 0.4);
}

#bpmn-viewport-actions .viewport-download-menu[hidden] {
    display: none;
}

#bpmn-viewport-actions .viewport-download-menu button {
    width: 100%;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

#bpmn-viewport-actions .viewport-download-menu button:hover,
#bpmn-viewport-actions .viewport-download-menu button:focus {
    background: #edf3f7;
    color: #0f172a;
}

#bpmn-viewport-actions .viewport-download-menu button i {
    width: 15px;
    text-align: center;
}

#bpmn-empty-state {
    position: absolute;
    inset: 20px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#bpmn-empty-state.hidden {
    display: none;
}

#bpmn-empty-state .empty-state-content {
    max-width: 420px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d9e2ef;
    border-radius: 5px;
    padding: 18px 22px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

#bpmn-empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #1e293b;
}

#bpmn-empty-state p {
    margin: 0;
    font-size: 14px;
    color: #475569;
}



