/* Customer main/related documents share one page-inset owner.
   The page container supplies the bottom inset; app-main and detail frames do not repeat it. */
@media screen {
 .mis-stage .app-main:has(> .workspace-keepalive:not([hidden]) :is(#xinocler-crm-domestic-view,#xinocler-crm-overseas-view) > .crm-window > div > main > [data-crm-customer-document]:not([hidden])),
 .mis-stage .app-main:has(> :is(#xinocler-crm-domestic-view,#xinocler-crm-overseas-view) > .crm-window > div > main > [data-crm-customer-document]:not([hidden])) { padding-block-end:var(--mis-crm-page-inset-block,0px)!important; }
 :is(#xinocler-crm-domestic-view,#xinocler-crm-overseas-view):has(> .crm-window > div > main > [data-crm-customer-document]:not([hidden])) { display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden; }
 :is(#xinocler-crm-domestic-view,#xinocler-crm-overseas-view):has(> .crm-window > div > main > [data-crm-customer-document]:not([hidden])) > .crm-window { display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden; }
 :is(#xinocler-crm-domestic-view,#xinocler-crm-overseas-view):has(> .crm-window > div > main > [data-crm-customer-document]:not([hidden])) > .crm-window > div:has(> main),
 :is(#xinocler-crm-domestic-view,#xinocler-crm-overseas-view):has(> .crm-window > div > main > [data-crm-customer-document]:not([hidden])) > .crm-window > div > main { display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden; }
 :is(#xinocler-crm-domestic-view,#xinocler-crm-overseas-view) > .crm-window > div > main > .mis-page-banner-stack { flex-shrink:0; }
 [data-crm-customer-document] { display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden; }
 [data-crm-customer-document] > :first-child { flex:0 0 auto; }
 [data-crm-customer-document] > [data-crm-customer-detail-content] { display:flex;flex:1 1 0%;min-height:0;padding-block-end:0;overflow:hidden; }
 [data-crm-customer-document] [data-crm-customer-detail-content] > [data-mis-workspace-shell] { flex:1 1 0%;height:auto;min-height:0;overflow:hidden; }
 [data-crm-customer-document] [data-crm-customer-detail-content] [data-mis-workspace-scroll] { display:flex;flex-direction:column;min-height:0;overflow:hidden; }
 [data-crm-customer-document] [data-crm-customer-detail-content] [data-crm-customer-detail-body] { display:flex;flex-direction:column;flex:1 1 0%;min-height:0;overflow:hidden; }
 [data-crm-customer-document] [data-crm-customer-detail-body] > [data-crm-customer-detail-frame] { display:flex;flex-direction:column;flex:1 1 0%;min-height:0;padding-block-end:0;overflow:hidden; }
 [data-crm-customer-detail-frame] > .mis-detail-workspace { flex:1 1 0%;min-height:0; }
 [data-crm-customer-detail-frame] .mis-detail-aux[data-detail-leading-groups=true] { overflow:auto; }
 [data-crm-customer-inline] { display:flex;flex-direction:column;height:100%;min-height:0; }
 [data-crm-customer-inline] > [data-crm-customer-document] { height:100%;min-height:0; }
 [role="dialog"][data-crm-customer-document] { padding-block-end:var(--mis-page-inset-bottom,24px); }
}
@media screen and (max-width:760px) {
 /* Keep the shared detail control's usable minimum inside the document scroller,
    rather than growing the outer page or hiding the lower auxiliary panel. */
 [data-crm-customer-document] { overflow:auto; }
 [role="dialog"][data-crm-customer-document] { padding-block-end:var(--mis-page-inset-bottom,18px); }
 [data-crm-customer-document] > [data-crm-customer-detail-content] { flex:1 0 var(--mis-detail-default-min-height,480px);min-height:var(--mis-detail-default-min-height,480px); }
}
