/* mySIMAN Master C341 — Update Excel modal layout correction.
   CSS-only changes to modal flow. No data, backend or authentication changes. */
html body > #syncExcelModal.sync-modal.show {
  position:fixed!important;
  inset:0!important;
  top:0!important;right:0!important;bottom:0!important;left:0!important;
  width:100vw!important;height:100dvh!important;
  box-sizing:border-box!important;
  padding:6px 10px 0!important;
  display:flex!important;align-items:flex-start!important;justify-content:center!important;
  background:#061221!important;
  overflow:hidden!important;
  z-index:2147483000!important;
}
/* Reserve the same 80px dock/clock footer area for all three tabs. */
html body > #syncExcelModal.sync-modal.show > .sync-panel {
  box-sizing:border-box!important;
  width:calc(100vw - 20px)!important;
  max-width:calc(100vw - 20px)!important;
  height:calc(100dvh - 88px)!important;
  max-height:calc(100dvh - 88px)!important;
  min-height:0!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border-radius:18px!important;
  background:#081d35!important;
}
/* An opaque, non-scrolling header is required; text must not appear behind it. */
html body #syncExcelModal .sync-header {
  position:relative!important;
  z-index:25!important;
  isolation:isolate!important;
  flex:0 0 74px!important;
  box-sizing:border-box!important;
  min-height:74px!important;max-height:74px!important;
  padding:12px 18px!important;
  margin:0!important;
  overflow:hidden!important;
  background:#081d35!important;
  border-bottom:1px solid #1d536d!important;
  box-shadow:0 4px 0 #081d35!important;
}
html body #syncExcelModal .sync-header::before {
  z-index:1!important;
  content:'E'!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  color:#a3fbff!important;background:#12445d!important;
  width:46px!important;height:46px!important;
  border-radius:12px!important;border:1px solid #266d87!important;
  font-size:20px!important;font-weight:800!important;
}
html body #syncExcelModal .sync-title{font-size:20px!important;font-weight:800!important;}
html body #syncExcelModal .sync-close{width:44px!important;height:44px!important;}
/* Content has one main scrollport, completely clipped under the opaque header. */
html body #syncExcelModal .sync-scroll-body-c143,
html body #syncExcelModal.c308-deletion-active #syncExcelScrollBodyC143 {
  box-sizing:border-box!important;
  z-index:1!important;
  position:relative!important;
  flex:1 1 0%!important;
  min-height:0!important;
  width:100%!important;
  max-width:100%!important;
  max-height:none!important;
  padding:12px 18px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scroll-behavior:auto!important;
  background:#081d35!important;
  isolation:isolate!important;
}
html body #syncExcelModal .c308-tabs {margin:0 0 12px!important;width:100%!important;}
/* This section MUST NOT be sticky. Its earlier sticky position caused overlap on scroll. */
html body #syncExcelModal .sync-decision-mode-v419 {
  position:relative!important;
  top:auto!important;
  z-index:1!important;
  isolation:isolate!important;
  overflow:hidden!important;
  margin-top:10px!important;
  background:#082b3e!important;
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
}
html body #syncExcelModal .sync-decision-mode-help-v419,
html body #syncExcelModal .sync-item-manager-help{display:none!important;}
html body #syncExcelModal .sync-item-manager{background:#091e32!important;}
html body #syncExcelModal .sync-item-manager-head{background:#0b2a3d!important;}
/* Uniform content width in Update Excel, Penghapusan and Edit Data. */
html body #syncExcelModal #syncDropZone,
html body #syncExcelModal #syncPreview,
html body #syncExcelModal #c308DeletionPane,
html body #syncExcelModal #c333ManualPane {
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
/* Penghapusan uses remaining available height; its list, not the entire dialog, scrolls. */
html body #syncExcelModal.c308-deletion-active #syncExcelScrollBodyC143{
  display:flex!important;
  flex-direction:column!important;
}
html body #syncExcelModal #c308DeletionPane:not([hidden]){
  display:flex!important;
  flex:1 0 auto!important;
  flex-direction:column!important;
  min-width:0!important;
  min-height:calc(100dvh - 235px)!important;
  gap:9px!important;
  padding:0!important;
}
html body #syncExcelModal #c308List {
  position:relative!important;
  isolation:isolate!important;
  flex:1 1 auto!important;
  height:auto!important;
  min-height:170px!important;
  max-height:min(50dvh,570px)!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  contain:paint!important;
  background:#081d35!important;
  border-radius:9px!important;
}
html body #syncExcelModal .c313-asset-header {
  z-index:10!important;
  background:#143c52!important;
  box-shadow:0 2px 0 #143c52!important;
}
html body #syncExcelModal .c308-footer{
  position:sticky!important;
  bottom:0!important;
  z-index:5!important;
  flex:0 0 auto!important;
  margin-top:auto!important;
  background:#081d35!important;
  box-shadow:0 -5px 0 #081d35!important;
}
html body #syncExcelModal .sync-actions{
  position:relative!important;
  z-index:20!important;
  flex:0 0 auto!important;
  bottom:auto!important;
  box-sizing:border-box!important;
  background:#081d35!important;
  padding:10px 18px 13px!important;
  border-top:1px solid #1d536d!important;
  box-shadow:0 -5px 0 #081d35!important;
}
/* Show original Expand/clock footer above the overlay. Never clone the controls. */
html body.sync-modal-open > #simanBottomPortalV987.c337-expand-above-modal,
html body.sync-modal-open > #simanBottomPortalV987.c341-portal-visible{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  position:fixed!important;
  left:0!important;right:0!important;top:auto!important;bottom:0!important;
  width:100%!important;max-width:100%!important;
  min-height:80px!important;
  z-index:2147483500!important;
  pointer-events:none!important;
  overflow:visible!important;
  background:#061422!important;
  border-top:1px solid #22445b!important;
  padding:0 10px 4px!important;
}
html body.sync-modal-open > #simanBottomPortalV987 :is(#simanBottomControlRow,#expandMenu,#topDateTime){
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
html body.sync-modal-open > #simanBottomPortalV987 #simanBottomControlRow{
  display:flex!important;
  position:relative!important;
  z-index:2!important;
  min-height:75px!important;
  margin:0!important;
  align-items:center!important;
  background:#061422!important;
}
html body.sync-modal-open > #simanBottomPortalV987 #simanBottomMenuDock.is-open{
  z-index:3!important;
  pointer-events:auto!important;
  overflow:visible!important;
}
@media(max-width:760px){
 html body > #syncExcelModal.sync-modal.show{padding:4px 4px 0!important;}
 html body > #syncExcelModal.sync-modal.show > .sync-panel{
   width:calc(100vw - 8px)!important;max-width:calc(100vw - 8px)!important;
   height:calc(100dvh - 74px - env(safe-area-inset-bottom,0px))!important;
   max-height:calc(100dvh - 74px - env(safe-area-inset-bottom,0px))!important;
   border-radius:12px!important;
 }
 html body #syncExcelModal .sync-header{flex-basis:58px!important;min-height:58px!important;max-height:58px!important;padding:8px 10px!important;}
 html body #syncExcelModal .sync-header::before{width:38px!important;height:38px!important;}
 html body #syncExcelModal .sync-title{font-size:17px!important;}
 html body #syncExcelModal .sync-scroll-body-c143,html body #syncExcelModal.c308-deletion-active #syncExcelScrollBodyC143{padding:8px 9px!important;}
 html body #syncExcelModal #c308DeletionPane:not([hidden]){min-height:calc(100dvh - 208px)!important;}
 html body #syncExcelModal #c308List{min-height:160px!important;max-height:48dvh!important;}
 html body #syncExcelModal .sync-actions{padding:8px 10px 10px!important;}
 html body.sync-modal-open > #simanBottomPortalV987.c341-portal-visible{min-height:70px!important;padding:0 6px 3px!important;}
}
/* Override C313's separate Penghapusan-only sizing owner (4-class specificity).
   Without this rule, that owner still limits the modal to 1150px and content-height. */
html body > #syncExcelModal.sync-modal.show.c308-deletion-active {
  align-items:flex-start!important;
  justify-content:center!important;
  padding:6px 10px 0!important;
}
html body > #syncExcelModal.sync-modal.show.c308-deletion-active > .sync-panel {
  box-sizing:border-box!important;
  width:calc(100vw - 20px)!important;
  max-width:calc(100vw - 20px)!important;
  height:calc(100dvh - 88px)!important;
  max-height:calc(100dvh - 88px)!important;
  min-height:0!important;
  flex:0 0 auto!important;
  margin:0!important;
  overflow:hidden!important;
  border-radius:18px!important;
}
html body #syncExcelModal.c308-deletion-active .sync-header {
  position:relative!important;top:auto!important;
  z-index:25!important;
  min-height:74px!important;max-height:74px!important;
  flex:0 0 74px!important;
  padding:12px 18px!important;
  background:#081d35!important;
  box-shadow:0 4px 0 #081d35!important;
}
html body #syncExcelModal.c308-deletion-active .sync-scroll-body-c143 {
  flex:1 1 0%!important;
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  max-height:none!important;
  padding:12px 18px!important;
  background:#081d35!important;
}
html body #syncExcelModal.c308-deletion-active .c308-deletion-section {
  flex:1 0 auto!important;
  min-height:calc(100dvh - 235px)!important;
  overflow:visible!important;
}
@media(max-width:760px){
  html body > #syncExcelModal.sync-modal.show.c308-deletion-active {padding:4px 4px 0!important;}
  html body > #syncExcelModal.sync-modal.show.c308-deletion-active > .sync-panel{
    width:calc(100vw - 8px)!important;max-width:calc(100vw - 8px)!important;
    height:calc(100dvh - 74px - env(safe-area-inset-bottom,0px))!important;
    max-height:calc(100dvh - 74px - env(safe-area-inset-bottom,0px))!important;
    border-radius:12px!important;
  }
  html body #syncExcelModal.c308-deletion-active .sync-header {
    flex-basis:58px!important;min-height:58px!important;max-height:58px!important;padding:8px 10px!important;
  }
  html body #syncExcelModal.c308-deletion-active .sync-scroll-body-c143 {padding:8px 9px!important;}
  html body #syncExcelModal.c308-deletion-active .c308-deletion-section {min-height:calc(100dvh - 208px)!important;}
}
/* C341: keep Penghapusan pager in normal flow instead of overlaying the final row. */
html body #syncExcelModal.c308-deletion-active #syncExcelScrollBodyC143 {
  overflow-y:hidden!important;
  overflow-x:hidden!important;
}
html body #syncExcelModal.c308-deletion-active #c308DeletionPane:not([hidden]) {
  flex:1 1 0%!important;
  min-height:0!important;
  height:auto!important;
  overflow:hidden!important;
}
html body #syncExcelModal.c308-deletion-active #c308List {
  flex:1 1 0%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
html body #syncExcelModal.c308-deletion-active .c308-footer {
  position:relative!important;
  bottom:auto!important;
  z-index:5!important;
  flex:0 0 auto!important;
  margin-top:0!important;
  padding:10px 0 0!important;
  background:#081d35!important;
}
html body.sync-modal-open > #simanBottomPortalV987.c341-portal-visible{box-sizing:border-box!important;}
@media(max-height:600px){
  html body #syncExcelModal.c308-deletion-active #syncExcelScrollBodyC143 {overflow-y:auto!important;}
  html body #syncExcelModal.c308-deletion-active #c308DeletionPane:not([hidden]) {overflow:visible!important;flex:1 0 auto!important;min-height:300px!important;}
  html body #syncExcelModal.c308-deletion-active #c308List {min-height:150px!important;max-height:250px!important;}
}
