/* mySIMAN Master C345 — tombol popup standard, approved Update Excel C343.
   Scope: only six named BUTTON popup owners. Does not change page layouts, the
   canonical Update Excel modal, spreadsheet data, login or backend behavior.
   CSS-only: no MutationObservers, reparenting, or popup event changes. */
:root {
  --ms345-bg:#081d35;
  --ms345-head:#091f34;
  --ms345-card:#0b2940;
  --ms345-ink:#e8f7ff;
  --ms345-muted:#b3cad7;
  --ms345-line:#245675;
  --ms345-cyan:#0bb3c5;
  --ms345-footer-room:78px;
}

/* Leave the canonical mySIMAN Expand / weekday / clock / WIB visible. */
html body:is(
 :has(#pspBasePdfModal.is-open),
 :has(#locationMoveModal[aria-hidden="false"]),
 :has(#exportModal.show),
 :has(#simanDbrDblModalV500[aria-hidden="false"]),
 :has(#simanFloorPlanModalV528[aria-hidden="false"]),
 :has(#simanProfilSatkerModalV502[aria-hidden="false"])
) > #simanCanonicalFooterV1081 {
  position:fixed!important;
  z-index:2147483646!important;
  --sf-z:2147483646;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:none!important;
}

/* Overlay geometry follows Update Excel; do not override hidden/open display. */
html body #pspBasePdfModal,
html body #locationMoveModal,
html body #exportModal,
html body #simanDbrDblModalV500,
html body #simanFloorPlanModalV528,
html body #simanProfilSatkerModalV502 {
  box-sizing:border-box!important;
  position:fixed!important;
  inset:0 0 var(--ms345-footer-room) 0!important;
  height:auto!important;
  width:100vw!important;
  max-width:100vw!important;
  padding:7px 10px 0!important;
  z-index:2147483000!important;
  align-items:center!important;
  justify-content:center!important;
  overscroll-behavior:contain!important;
}

/* One shell geometry; tab/page content remains native and functional. */
html body #pspBasePdfModal > .pspb-panel,
html body #locationMoveModal > .location-move-panel,
html body #exportModal > .export-panel,
html body #simanDbrDblModalV500 > .siman-dbr-dialog-v500,
html body #simanFloorPlanModalV528 > .siman-floor-dialog-v528,
html body #simanProfilSatkerModalV502 > .siman-profile-dialog-v502 {
  box-sizing:border-box!important;
  flex:0 1 auto!important;
  display:flex!important;
  flex-direction:column!important;
  width:calc(100vw - 20px)!important;
  min-width:0!important;
  max-width:calc(100vw - 20px)!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  padding:0!important;
  margin:0 auto!important;
  border:1px solid var(--ms345-line)!important;
  border-radius:18px!important;
  background:var(--ms345-bg)!important;
  color:var(--ms345-ink)!important;
  overflow:hidden!important;
  isolation:isolate!important;
  box-shadow:0 22px 70px rgba(0,0,0,.5),0 0 0 1px rgba(0,229,255,.05) inset!important;
  font-family:system-ui,"Segoe UI",Arial,sans-serif!important;
}

/* Shared header frame. */
html body #pspBasePdfModal .pspb-head,
html body #locationMoveModal .location-move-header,
html body #exportModal .export-header,
html body #simanDbrDblModalV500 .siman-dbr-toolbar-head-v914,
html body #simanFloorPlanModalV528 .siman-floor-head-v528,
html body #simanProfilSatkerModalV502 .siman-profile-head-v502 {
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  position:relative!important;
  top:auto!important;
  display:grid!important;
  grid-template-columns:48px minmax(0,1fr) 46px!important;
  align-items:center!important;
  gap:13px!important;
  width:100%!important;
  min-height:74px!important;
  height:auto!important;
  margin:0!important;
  padding:11px 18px!important;
  border-bottom:1px solid var(--ms345-line)!important;
  background:var(--ms345-head)!important;
  box-shadow:none!important;
  text-align:left!important;
  overflow:visible!important;
  z-index:5!important;
}
/* Use the existing icon for DBR and one synthetic icon for other shells. */
html body #pspBasePdfModal .pspb-head::before,
html body #locationMoveModal .location-move-header::before,
html body #exportModal .export-header::before,
html body #simanFloorPlanModalV528 .siman-floor-head-v528::before,
html body #simanProfilSatkerModalV502 .siman-profile-head-v502::before {
  grid-column:1!important;
  display:grid!important;
  place-items:center!important;
  content:""!important;
  width:46px!important;height:46px!important;
  border:1px solid #2b718e!important;
  border-radius:13px!important;
  background:linear-gradient(160deg,#12516c,#0a314b)!important;
  color:#8af3ff!important;
  font:800 20px/1 system-ui,"Segoe UI",Arial,sans-serif!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05)!important;
}
html body #pspBasePdfModal .pspb-head::before{content:"P"!important;}
html body #locationMoveModal .location-move-header::before{content:"L"!important;}
html body #exportModal .export-header::before{content:"E"!important;}
html body #simanFloorPlanModalV528 .siman-floor-head-v528::before{content:"D"!important;}
html body #simanProfilSatkerModalV502 .siman-profile-head-v502::before{content:"P"!important;}

/* DBR/DBL already has a D icon; preserve its real element. */
html body #simanDbrDblModalV500 .siman-dbr-title-icon-v914 {
  grid-column:1!important;
  width:46px!important;height:46px!important;
  display:grid!important;place-items:center!important;
  margin:0!important;align-self:center!important;
  border-radius:13px!important;
  border:1px solid #2b718e!important;
  background:linear-gradient(160deg,#12516c,#0a314b)!important;
  font:800 20px/1 system-ui,"Segoe UI",Arial,sans-serif!important;
  color:#8af3ff!important;
}
html body #pspBasePdfModal .pspb-head > div,
html body #locationMoveModal .location-move-header > div,
html body #exportModal .export-header > div,
html body #simanDbrDblModalV500 .siman-dbr-heading-v500,
html body #simanFloorPlanModalV528 .siman-floor-title-v528,
html body #simanProfilSatkerModalV502 .siman-profile-title-v502 {
  grid-column:2!important;
  grid-row:1!important;
  display:flex!important;flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  min-width:0!important;
  text-align:left!important;
  margin:0!important;
}
html body #pspBasePdfModal .pspb-head h2,
html body #locationMoveModal .location-move-title,
html body #exportModal .export-title,
html body #simanDbrDblModalV500 .siman-dbr-heading-v500 h2,
html body #simanFloorPlanModalV528 .siman-floor-title-v528 h2,
html body #simanProfilSatkerModalV502 .siman-profile-title-v502 h2 {
  margin:0!important;
  color:#f2fbff!important;
  font-family:system-ui,"Segoe UI",Arial,sans-serif!important;
  font-size:20px!important;
  font-weight:800!important;
  letter-spacing:0!important;
  line-height:1.3!important;
  text-align:left!important;
  text-transform:none!important;
}
html body #pspBasePdfModal #pspbClose,
html body #locationMoveModal #closeLocationMoveModal,
html body #exportModal #closeExportModal,
html body #simanDbrDblModalV500 #simanDbrCloseV500,
html body #simanFloorPlanModalV528 #simanFloorCloseV528,
html body #simanProfilSatkerModalV502 #simanProfilSatkerCloseV502 {
  box-sizing:border-box!important;
  grid-column:3!important;grid-row:1!important;
  justify-self:end!important;align-self:center!important;
  display:grid!important;place-items:center!important;
  width:44px!important;height:44px!important;
  margin:0!important;padding:0!important;
  border-radius:12px!important;
  border:1px solid #285d7a!important;
  background:#0a304a!important;
  color:#f0fbff!important;
  font-size:22px!important;font-weight:650!important;
  cursor:pointer!important;
}

/* Denah's manager indicator is meaningful, but must not displace the X. */
html body #simanFloorPlanModalV528 .siman-floor-head-v528 {grid-template-columns:48px minmax(0,1fr) auto 46px!important;}
html body #simanFloorPlanModalV528 .siman-floor-manager-status-v528 {grid-column:3!important;grid-row:1!important;min-width:0!important;margin:0!important;font-size:11px!important;}
html body #simanFloorPlanModalV528 #simanFloorCloseV528 {grid-column:4!important;}

/* Remove only descriptive subheaders; never status, field labels or alerts. */
html body #pspBasePdfModal .pspb-head p,
html body #pspBasePdfModal .pspb-badge,
html body #locationMoveModal .location-move-subtitle,
html body #simanDbrDblModalV500 #simanDbrSubTitleV500,
html body #simanFloorPlanModalV528 .siman-floor-title-v528 p,
html body #simanProfilSatkerModalV502 .siman-profile-title-v502 p,
html body #pspBasePdfModal .pspb-drop span,
html body #pspBasePdfModal .pspb-help,
html body #pspBasePdfModal .pspb-footer-note,
html body #pspBasePdfModal .pspb-account-copy span,
html body #locationMoveModal .location-drop-help,
html body #simanFloorPlanModalV528 .siman-floor-foot-v528 > span,
html body #simanProfilSatkerModalV502 .siman-profile-foot-v502 .hint,
html body #exportModal .export-option small {
  display:none!important;
}

/* Body scroll and footer ownership are separated, as in Update Excel. */
html body #pspBasePdfModal .pspb-body,
html body #locationMoveModal .location-move-body,
html body #exportModal .export-options,
html body #simanDbrDblModalV500 .siman-dbr-body-v500,
html body #simanFloorPlanModalV528 .siman-floor-body-v528,
html body #simanProfilSatkerModalV502 .siman-profile-body-v502 {
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  background:var(--ms345-bg)!important;
}
html body #pspBasePdfModal .pspb-body,
html body #locationMoveModal .location-move-body,
html body #exportModal .export-options,
html body #simanDbrDblModalV500 .siman-dbr-body-v500,
html body #simanProfilSatkerModalV502 .siman-profile-body-v502 {overflow-y:auto!important;}

html body #pspBasePdfModal .pspb-footer,
html body #simanDbrDblModalV500 .siman-dbr-footer-v500,
html body #simanFloorPlanModalV528 .siman-floor-foot-v528,
html body #simanProfilSatkerModalV502 .siman-profile-foot-v502 {
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  margin:0!important;
  min-height:62px!important;
  padding:9px 18px!important;
  background:var(--ms345-head)!important;
  border-top:1px solid var(--ms345-line)!important;
  color:var(--ms345-muted)!important;
  font-size:12px!important;
  z-index:5!important;
}
html body #pspBasePdfModal .pspb-btn,
html body #locationMoveModal .location-action,
html body #exportModal .export-option,
html body #simanDbrDblModalV500 .siman-dbr-print-v500,
html body #simanFloorPlanModalV528 button,
html body #simanProfilSatkerModalV502 button {
  font-family:system-ui,"Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:700!important;
  letter-spacing:0!important;
  line-height:1.3!important;
}
html body #pspBasePdfModal .pspb-btn,
html body #locationMoveModal .location-action,
html body #simanFloorPlanModalV528 :is(.siman-floor-sidebar-v528 button,.siman-floor-foot-v528 button),
html body #simanProfilSatkerModalV502 :is(.siman-profile-foot-v502 button,.siman-profile-body-v502 button){
  min-height:39px!important;
  border-radius:10px!important;
}
html body #pspBasePdfModal :is(.pspb-field,.pspb-search,.pspb-field-label,.pspb-card,.pspb-meta,.pspb-status,.pspb-account-copy strong),
html body #locationMoveModal :is(input,select,label,.location-status),
html body #simanDbrDblModalV500 :is(button,input,select),
html body #simanFloorPlanModalV528 :is(input,select,label),
html body #simanProfilSatkerModalV502 :is(input,select,label,textarea){
  font-family:system-ui,"Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;
  letter-spacing:0!important;
}

/* Upload PSP — correct miniature typography and preserve warning/status. */
html body #pspBasePdfModal .pspb-body{display:grid!important;grid-template-columns:minmax(290px,30%) minmax(0,1fr)!important;gap:12px!important;padding:12px 16px!important;overflow:hidden!important;}
html body #pspBasePdfModal :is(.pspb-side,.pspb-main){min-width:0!important;min-height:0!important;overflow-y:auto!important;scroll-behavior:auto!important;}
html body #pspBasePdfModal .pspb-card{margin:0 0 10px!important;border-radius:12px!important;box-shadow:none!important;}
html body #pspBasePdfModal .pspb-card h3{font-size:12px!important;font-weight:750!important;line-height:1.3!important;padding:10px 12px!important;text-transform:none!important;}
html body #pspBasePdfModal .pspb-card-body{padding:12px!important;font-size:12px!important;line-height:1.4!important;}
html body #pspBasePdfModal .pspb-field-label{font-size:11px!important;font-weight:700!important;text-transform:none!important;}
html body #pspBasePdfModal :is(.pspb-drop strong,.pspb-meta,.pspb-account-copy strong,.pspb-empty,.pspb-search){font-size:12px!important;font-weight:650!important;}
html body #pspBasePdfModal .pspb-summary-item span{font-size:10px!important;}
html body #pspBasePdfModal .pspb-summary-item strong{font-size:16px!important;}
html body #pspBasePdfModal .pspb-toolbar{gap:8px!important;flex-wrap:wrap!important;}
html body #pspBasePdfModal .pspb-status,
html body #pspBasePdfModal .pspb-progress-text,
html body #pspBasePdfModal .pspb-completion-copy span{font-size:11px!important;}
html body #pspBasePdfModal .pspb-footer{gap:8px!important;}

/* Pindah Lokasi — compact two-column form, actions remain visible while scrolling. */
html body #locationMoveModal .location-move-content{width:100%!important;max-width:100%!important;padding:14px 16px!important;transform:none!important;}
html body #locationMoveModal .location-move-grid{gap:12px!important;align-items:stretch!important;}
html body #locationMoveModal .location-move-card{border-radius:12px!important;min-width:0!important;}
html body #locationMoveModal .location-move-card h3{font-size:12px!important;font-weight:750!important;margin:0 0 9px!important;line-height:1.3!important;}
html body #locationMoveModal .location-privacy-note{padding:9px 12px!important;font-size:11px!important;line-height:1.35!important;}
html body #locationMoveModal .location-actions{position:sticky!important;bottom:0!important;z-index:6!important;margin-top:12px!important;padding:10px 0!important;background:var(--ms345-head)!important;border-top:1px solid var(--ms345-line)!important;}

/* DBR — icon + title on first row, navigation/search on second row. */
html body #simanDbrDblModalV500 .siman-dbr-toolbar-v500{box-sizing:border-box!important;flex:0 0 auto!important;min-width:0!important;background:var(--ms345-head)!important;}
html body #simanDbrDblModalV500 .siman-dbr-toolbar-controls-v914{min-height:62px!important;padding:8px 16px!important;gap:9px!important;}
html body #simanDbrDblModalV500 .siman-dbr-heading-v500 h2{font-size:20px!important;text-align:left!important;}
html body #simanDbrDblModalV500 .siman-dbr-footer-v500{font-size:11px!important;}

/* Denah — keep canvas/pins fully interactive, remove only long sidebar prose. */
html body #simanFloorPlanModalV528 .siman-floor-body-v528{min-width:0!important;overflow:hidden!important;}
html body #simanFloorPlanModalV528 .siman-floor-sidebar-v528{overflow-y:auto!important;min-width:0!important;scroll-behavior:auto!important;}
html body #simanFloorPlanModalV528 .siman-floor-main-v528{min-height:0!important;min-width:0!important;}
html body #simanFloorPlanModalV528 .siman-floor-foot-v528{min-height:42px!important;}
html body #simanFloorPlanModalV528 .siman-floor-sidebar-v528 :is(h3,h4){font-size:12px!important;font-weight:750!important;text-transform:none!important;}
html body #simanFloorPlanModalV528 .siman-floor-sidebar-v528 p{font-size:11px!important;line-height:1.35!important;}

/* Profil Satker — modal header like Update Excel; preserve editable data. */
html body #simanProfilSatkerModalV502 .siman-profile-body-v502{padding:12px 16px!important;overflow-y:auto!important;}
html body #simanProfilSatkerModalV502 #simanProfileSyncPanelV583 :is(h2,h3){font-size:12px!important;font-weight:750!important;line-height:1.3!important;}
html body #simanProfilSatkerModalV502 .siman-profile-foot-v502{min-height:42px!important;}

/* Export — cards in an even grid, no decorative subtitles. */
html body #exportModal .export-options{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:minmax(68px,max-content)!important;align-content:start!important;gap:10px!important;padding:16px!important;overflow-y:auto!important;}
html body #exportModal .export-option{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;min-width:0!important;min-height:68px!important;padding:12px!important;border-radius:12px!important;border:1px solid var(--ms345-line)!important;background:#0a2940!important;color:var(--ms345-ink)!important;}
html body #exportModal .export-option strong{font-size:13px!important;font-weight:750!important;}
html body #exportModal .export-option .export-icon{flex:0 0 auto!important;}
html body #exportModal .export-panel::after{content:"";display:block;flex:0 0 1px;border-top:1px solid var(--ms345-line);background:var(--ms345-head);}

@media(max-width:760px){
 :root{--ms345-footer-room:calc(78px + env(safe-area-inset-bottom,0px));}
 html body #pspBasePdfModal,
 html body #locationMoveModal,
 html body #exportModal,
 html body #simanDbrDblModalV500,
 html body #simanFloorPlanModalV528,
 html body #simanProfilSatkerModalV502{padding:4px 4px 0!important;}
 html body #pspBasePdfModal > .pspb-panel,
 html body #locationMoveModal > .location-move-panel,
 html body #exportModal > .export-panel,
 html body #simanDbrDblModalV500 > .siman-dbr-dialog-v500,
 html body #simanFloorPlanModalV528 > .siman-floor-dialog-v528,
 html body #simanProfilSatkerModalV502 > .siman-profile-dialog-v502{width:calc(100vw - 8px)!important;max-width:calc(100vw - 8px)!important;border-radius:12px!important;}
 html body #pspBasePdfModal .pspb-head,
 html body #locationMoveModal .location-move-header,
 html body #exportModal .export-header,
 html body #simanDbrDblModalV500 .siman-dbr-toolbar-head-v914,
 html body #simanFloorPlanModalV528 .siman-floor-head-v528,
 html body #simanProfilSatkerModalV502 .siman-profile-head-v502{min-height:58px!important;padding:8px 10px!important;grid-template-columns:38px minmax(0,1fr) 38px!important;gap:9px!important;}
 html body #simanFloorPlanModalV528 .siman-floor-head-v528{grid-template-columns:38px minmax(0,1fr) 0 38px!important;}
 html body #simanFloorPlanModalV528 .siman-floor-manager-status-v528{display:none!important;}
 html body #pspBasePdfModal .pspb-head::before,
 html body #locationMoveModal .location-move-header::before,
 html body #exportModal .export-header::before,
 html body #simanFloorPlanModalV528 .siman-floor-head-v528::before,
 html body #simanProfilSatkerModalV502 .siman-profile-head-v502::before,
 html body #simanDbrDblModalV500 .siman-dbr-title-icon-v914{width:38px!important;height:38px!important;font-size:17px!important;border-radius:11px!important;}
 html body #pspBasePdfModal .pspb-head h2,
 html body #locationMoveModal .location-move-title,
 html body #exportModal .export-title,
 html body #simanDbrDblModalV500 .siman-dbr-heading-v500 h2,
 html body #simanFloorPlanModalV528 .siman-floor-title-v528 h2,
 html body #simanProfilSatkerModalV502 .siman-profile-title-v502 h2{font-size:16px!important;}
 html body #pspBasePdfModal #pspbClose,
 html body #locationMoveModal #closeLocationMoveModal,
 html body #exportModal #closeExportModal,
 html body #simanDbrDblModalV500 #simanDbrCloseV500,
 html body #simanFloorPlanModalV528 #simanFloorCloseV528,
 html body #simanProfilSatkerModalV502 #simanProfilSatkerCloseV502{width:38px!important;height:38px!important;}
 html body #pspBasePdfModal .pspb-body{grid-template-columns:1fr!important;overflow-y:auto!important;padding:9px!important;}
 html body #pspBasePdfModal :is(.pspb-side,.pspb-main){overflow:visible!important;}
 html body #exportModal .export-options{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding:10px!important;}
 html body #simanProfilSatkerModalV502 .siman-profile-body-v502{padding:8px!important;}
}
@media(max-width:420px){
 html body #exportModal .export-options{grid-template-columns:1fr!important;}
 html body #locationMoveModal .location-move-content{padding:8px!important;}
}

/* C345 final: keep native action row at the bottom of an otherwise empty Location form. */
html body #locationMoveModal .location-move-body{
  display:flex!important;flex-direction:column!important;
}
html body #locationMoveModal .location-move-content{
  display:flex!important;flex-direction:column!important;
  flex:1 0 auto!important;min-height:100%!important;
}
html body #locationMoveModal .location-move-grid{flex:0 0 auto!important;}
html body #locationMoveModal .location-actions{margin-top:auto!important;}
/* Stable popup geometry without legacy scale/slide animation on opening. */
html body #exportModal .export-panel,
html body #pspBasePdfModal .pspb-panel,
html body #locationMoveModal .location-move-panel,
html body #simanDbrDblModalV500 .siman-dbr-dialog-v500,
html body #simanFloorPlanModalV528 .siman-floor-dialog-v528,
html body #simanProfilSatkerModalV502 .siman-profile-dialog-v502{
  animation:none!important;transform:none!important;
}
/* DBR toolbar: remove page-style inner frame so the header fills the popup shell. */
html body #simanDbrDblModalV500 .siman-dbr-toolbar-v500{
  padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
  background:var(--ms345-head)!important;
}
html body #simanDbrDblModalV500 .siman-dbr-toolbar-head-v914{
  margin:0!important;width:100%!important;max-width:100%!important;
  border-radius:0!important;
}
