/* Pola popup HP Flamboyan 4. PC tetap dialog tengah. Tanpa important. */
#credentialModal{position:fixed;inset:0;z-index:650;display:grid;place-items:center;padding:18px;background:rgba(17,33,26,.74)}
#credentialModal>.f4-bank-credential-panel{width:min(420px,100%);max-height:90dvh;overflow:auto;box-shadow:0 16px 48px #18271a55}
@media(max-width:1023px){
 #f4-direct-dialog{inset:var(--f4-login-visible-top,0px) 0 auto;height:var(--f4-login-visible-height,100dvh);align-items:end;justify-items:stretch;padding:0;background:rgba(15,25,38,.54)}
 #f4-direct-dialog section{--f4-sheet-available-height:calc(var(--f4-login-visible-height,100dvh) - 10px);width:100%;max-height:var(--f4-sheet-available-height);overflow-y:auto;border-radius:22px 22px 0 0;padding:22px 20px calc(22px + env(safe-area-inset-bottom,0px));box-shadow:0 -15px 40px #15233933;animation:f4-sheet-up .23s ease-out}
 #f4-direct-dialog section:before{content:"";display:block;margin:-12px auto 18px;width:42px;height:4px;border-radius:4px;background:#d5dbe3}
 #f4-direct-dialog .f4-login-actions button{min-height:44px}
 #f4-superadmin-confirm{align-items:end;justify-items:stretch;padding:0;background:rgba(18,29,45,.56)}
 #f4-superadmin-confirm .f4-sa-confirm-panel{width:100%;max-height:88dvh;overflow-y:auto;border:0;border-radius:22px 22px 0 0;padding:22px 20px calc(22px + env(safe-area-inset-bottom,0px));animation:f4-sheet-up .23s ease-out}
 #f4-superadmin-confirm .f4-sa-confirm-panel:before{content:"";display:block;margin:-12px auto 19px;width:42px;height:4px;border-radius:4px;background:#d5dbe3}
 #f4-superadmin-confirm .f4-sa-confirm-actions{flex-wrap:nowrap}
 #f4-superadmin-confirm .f4-sa-confirm-actions button{flex:1;min-height:47px}
 body .v21-modal:not(.v21-lightbox){display:flex;align-items:flex-end;justify-content:stretch;padding:0;background:rgba(15,32,24,.54)}
 body .v21-modal:not(.v21-lightbox)>.v21-modal-card{width:100%;min-height:0;max-height:88dvh;border-radius:22px 22px 0 0;animation:f4-sheet-up .23s ease-out}
 body .v21-modal:not(.v21-lightbox)>.v21-modal-card:before{content:"";display:block;flex:none;margin:10px auto 1px;width:42px;height:4px;border-radius:10px;background:#d9e2dc}
 body .v21-modal:not(.v21-lightbox)>.v21-modal-card .v21-modal-body{padding-bottom:calc(18px + env(safe-area-inset-bottom,0px))}
 #credentialModal:not(.hidden){display:flex;align-items:flex-end;justify-content:stretch;padding:0}
 #credentialModal>.f4-bank-credential-panel{width:100%;max-height:84dvh;border-radius:22px 22px 0 0;padding-bottom:calc(18px + env(safe-area-inset-bottom,0px));animation:f4-sheet-up .23s ease-out}
 #credentialModal>.f4-bank-credential-panel:before{content:"";display:block;margin:0 auto 12px;width:42px;height:4px;border-radius:4px;background:#d7e1da}

 /* Editor perkembangan Bank Sampah. */
 body .v24-edit-overlay{
  display:flex;align-items:flex-end;justify-content:center;
  padding:0;background:rgba(15,32,24,.54)
 }
 body .v24-edit-overlay .v24-edit-card{
  position:relative;flex:none;width:100%;max-height:88dvh;min-height:0;
  overflow-y:auto;overscroll-behavior:contain;
  padding:22px 17px calc(19px + env(safe-area-inset-bottom,0px));
  border-radius:22px 22px 0 0;
  animation:f4-sheet-up .23s ease-out
 }
 body .v24-edit-overlay .v24-edit-card:before{
  content:"";display:block;width:42px;height:4px;
  border-radius:10px;margin:-10px auto 17px;background:#d7e1da
 }
 /* Popup kegiatan dan perkembangan; penampil foto penuh tetap dikecualikan. */
 body .f4-activity-dialog{
  display:flex;align-items:flex-end;justify-content:center;
  padding:0;background:rgba(15,32,24,.54)
 }
 body .f4-activity-dialog .f4-activity-dialog-panel{
  position:relative;flex:none;width:100%;max-height:88dvh;
  border-radius:22px 22px 0 0;
  padding-bottom:env(safe-area-inset-bottom,0px);
  animation:f4-sheet-up .23s ease-out
 }
 body .f4-activity-dialog .f4-activity-dialog-panel:before{
  content:"";display:block;flex:none;width:42px;height:4px;
  margin:10px auto 0;border-radius:10px;background:#d7e1da
 }
 /* Superadmin: editor akun, laporan Jersey dan kalender Pusat Keuangan. */
 body .sa-account-shade,
 body .f4-jersey-print-veil,
 body .tc-date-overlay{
  display:flex;align-items:flex-end;justify-content:center;
  padding:0;background:rgba(21,30,43,.54)
 }
 body .sa-account-shade .sa-account-modal,
 body .f4-jersey-print-veil .f4-jersey-print-dialog,
 body .tc-date-overlay .tc-date-dialog{
  position:relative;flex:none;width:100%;min-width:0;max-height:88dvh;
  overflow-y:auto;overscroll-behavior:contain;
  padding:22px 18px calc(20px + env(safe-area-inset-bottom,0px));
  border:0;border-radius:22px 22px 0 0;
  animation:f4-sheet-up .23s ease-out
 }
 body .sa-account-shade .sa-account-modal:before,
 body .f4-jersey-print-veil .f4-jersey-print-dialog:before,
 body .tc-date-overlay .tc-date-dialog:before{
  content:"";display:block;width:42px;height:4px;
  margin:-10px auto 17px;border-radius:10px;background:#d7dce8
 }
 body .sa-account-modal-actions button{min-height:45px}
 /* Pastikan kontainer yang dibangkitkan JS menempel pada dasar viewport. */
 body :is(.v21-modal:not(.v21-lightbox),.v24-edit-overlay,.f4-activity-dialog,.sa-account-shade,.f4-jersey-print-veil,.tc-date-overlay){
  align-items:flex-end;justify-content:center;padding:0;
 }
 body .v21-modal:not(.v21-lightbox)>.v21-modal-card,
 body .f4-activity-dialog .f4-activity-dialog-panel{
  max-width:100%;min-width:0;max-height:88dvh;
  overflow:hidden;box-shadow:0 -16px 45px rgba(15,33,22,.21)
 }
 body .v21-modal:not(.v21-lightbox)>.v21-modal-card .v21-modal-body,
 body .f4-activity-dialog .f4-activity-dialog-scroll{
  min-height:0;overflow-y:auto;overscroll-behavior:contain
 }
 body :is(.sa-account-shade .sa-account-modal,.f4-jersey-print-veil .f4-jersey-print-dialog,.tc-date-overlay .tc-date-dialog){
  max-width:100%;box-sizing:border-box
 }

 /* Portal Utama: modal informasi dan formulir naik dari bagian bawah layar. */
 :is(#modal-event-detail,#modal-arisan,#modal-cetak-kas,#modal-keuangan,
     #modal-jersey,#modal-dokumentasi,#modal-gallery-grid,#modal-saran){
  align-items:flex-end;justify-content:center;padding:0;
  overscroll-behavior:contain
 }
 :is(#modal-event-detail,#modal-arisan,#modal-cetak-kas,#modal-keuangan,
     #modal-jersey,#modal-dokumentasi,#modal-gallery-grid,#modal-saran)>div{
  width:100%;max-width:100%;max-height:88dvh;min-height:0;min-width:0;
  margin:0;border-radius:22px 22px 0 0;
  overflow-y:auto;overscroll-behavior:contain;
  box-shadow:0 -15px 42px rgba(19,28,54,.22);
  animation:f4-sheet-up .23s ease-out
 }
 :is(#modal-event-detail,#modal-arisan,#modal-cetak-kas,#modal-keuangan,
     #modal-jersey,#modal-dokumentasi,#modal-gallery-grid,#modal-saran)>div:before{
  content:"";display:block;flex:none;width:42px;height:4px;
  margin:10px auto 0;border-radius:12px;background:#d8dced
 }
 #modal-saran>div{transform:none}
 #modal-saran>div>div:last-child{padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))}
 /* Pembukuan: edit pembayaran, kas, pinjaman dan tanggal migrasi. */
 #modal-edit:not(.hidden){
  display:flex;align-items:flex-end;justify-content:center;
  padding:0;overflow:hidden
 }
 #modal-edit>.f4-book-edit-center{
  min-height:0;width:100%;max-height:90dvh;
  align-items:flex-end;justify-content:center
 }
 #modal-edit .f4-book-edit-card{
  width:100%;max-width:100%;max-height:90dvh;min-height:0;
  display:flex;flex-direction:column;
  border:0;border-radius:22px 22px 0 0;
  animation:f4-sheet-up .23s ease-out
 }
 #modal-edit .f4-book-edit-card:before{
  content:"";display:block;flex:none;width:42px;height:4px;
  border-radius:12px;background:#dad6eb;margin:10px auto 2px
 }
 #modal-edit .f4-book-edit-form{
  min-height:0;overflow-y:auto;overscroll-behavior:contain;
  padding-bottom:calc(22px + env(safe-area-inset-bottom,0px))
 }
 .edit-modal.open{
  align-items:flex-end;justify-content:center;padding:0;
  overscroll-behavior:contain
 }
 .edit-modal.open>.edit-modal-card,
 #modal-koreksi-migrasi>div{
  width:100%;max-width:100%;max-height:88dvh;min-height:0;
  box-sizing:border-box;margin:0;
  overflow-y:auto;overscroll-behavior:contain;
  border:0;border-radius:22px 22px 0 0;
  padding:20px 18px calc(20px + env(safe-area-inset-bottom,0px));
  animation:f4-sheet-up .23s ease-out
 }
 .edit-modal.open>.edit-modal-card:before,
 #modal-koreksi-migrasi>div:before{
  content:"";display:block;width:42px;height:4px;
  border-radius:10px;background:#dad6eb;margin:-8px auto 18px
 }
 #modal-koreksi-migrasi{
  align-items:flex-end;justify-content:center;padding:0;
  overscroll-behavior:contain
 }
 /* Rapat: notulensi tetap bisa di-zoom, tetapi panel muncul dari bawah. */
 #modal-doc-rapat:not(.hidden){
  align-items:flex-end;justify-content:center;
  padding:0;overscroll-behavior:contain
 }
 #modal-doc-rapat>div{
  width:100%;max-width:100%;min-width:0;
  height:92dvh;max-height:92dvh;min-height:0;
  margin:0;border-radius:22px 22px 0 0;
  display:flex;flex-direction:column;overflow:hidden;
  box-shadow:0 -14px 40px rgba(24,28,49,.24);
  animation:f4-sheet-up .23s ease-out
 }
 #modal-doc-rapat>div:before{
  content:"";display:block;flex:none;width:42px;height:4px;
  border-radius:10px;background:#d7d9e5;margin:10px auto 5px
 }
 /* Dokumentasi: sheet album lebarnya selalu mengikuti layar HP,
    tingginya mengikuti jumlah media; penampil foto tetap fullscreen. */
 .f4p-album-overlay:not([hidden]){
  display:flex;align-items:flex-end;justify-content:stretch;
  padding:0;width:100%;height:var(--f4-shell-viewport,100dvh);overscroll-behavior:contain
 }
 .f4p-album-overlay>.f4p-album-card{
  flex:0 1 auto;width:100%;max-width:none;min-width:0;min-height:0;
  height:auto;max-height:88dvh;margin:0;
  border-radius:20px 20px 0 0;
  box-shadow:0 -15px 42px rgba(14,26,36,.24);
  animation:f4-sheet-up .23s ease-out
 }
 .f4p-album-overlay>.f4p-album-card:before{
  content:"";display:block;flex:none;width:42px;height:4px;
  border-radius:10px;background:#ded8eb;margin:10px auto 0
 }
 .f4p-album-overlay .f4p-album-grid{
  flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  padding-bottom:calc(18px + env(safe-area-inset-bottom,0px))
 }

 /* Konfirmasi proyek yang dibangun dinamis oleh editor Superadmin. */
 body .f4-pm-shade{
  align-items:flex-end;justify-content:center;padding:0;
  overscroll-behavior:contain
 }
 body .f4-pm-shade>.f4-pm-dialog{
  width:100%;max-width:100%;min-width:0;max-height:85dvh;
  box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;
  border-radius:22px 22px 0 0;
  padding:23px 20px calc(22px + env(safe-area-inset-bottom,0px));
  box-shadow:0 -14px 40px rgba(18,31,24,.2);
  animation:f4-sheet-up .23s ease-out
 }
 body .f4-pm-shade>.f4-pm-dialog:before{
  content:"";display:block;width:42px;height:4px;
  border-radius:10px;background:#d8e3db;margin:-10px auto 17px
 }
 /* Pemilihan tahun di Keuangan Warga. */
 body #keuangan .f4-user-year-popover{
  position:fixed;inset:auto 0 0;top:auto;bottom:0;left:0;right:0;
  width:100%;min-width:0;max-width:100%;max-height:72dvh;
  box-sizing:border-box;padding:22px 15px calc(18px + env(safe-area-inset-bottom,0px));
  border:0;border-radius:22px 22px 0 0;
  overflow-y:auto;overscroll-behavior:contain;
  box-shadow:0 0 0 100vmax rgba(22,25,46,.45),0 -14px 40px rgba(28,25,53,.18);
  animation:f4-sheet-up .23s ease-out
 }
 body #keuangan .f4-user-year-popover:before{
  content:"";display:block;width:42px;height:4px;
  border-radius:10px;background:#ded9ee;margin:-10px auto 14px
 }

 /* CCTV: pengaturan gateway, bukan penampil video. */
 #modal-gateway{
  align-items:flex-end;justify-content:center;
  padding:0;overscroll-behavior:contain
 }
 #modal-gateway>div{
  width:100%;max-width:100%;max-height:85dvh;
  overflow-y:auto;overscroll-behavior:contain;
  box-sizing:border-box;margin:0;
  border-radius:22px 22px 0 0;
  padding:22px 20px calc(22px + env(safe-area-inset-bottom,0px));
  box-shadow:0 -14px 40px rgba(0,0,0,.34);
  animation:f4-sheet-up .23s ease-out
 }
 #modal-gateway>div:before{
  content:"";display:block;width:42px;height:4px;
  border-radius:10px;background:#64748b;margin:-8px auto 18px
 }

}
@keyframes f4-sheet-up{from{transform:translateY(calc(100% + var(--f4-sheet-safe-bottom,0px)))}to{transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){
 #f4-direct-dialog section,#f4-superadmin-confirm .f4-sa-confirm-panel,
 body .v21-modal:not(.v21-lightbox)>.v21-modal-card,
 #credentialModal>.f4-bank-credential-panel,
 body .v24-edit-overlay .v24-edit-card,
 body .f4-activity-dialog .f4-activity-dialog-panel,
 body 
 body .sa-account-shade .sa-account-modal,
 body .f4-jersey-print-veil .f4-jersey-print-dialog,
 body .tc-date-overlay .tc-date-dialog{animation:none}
}


.f4-sheet-handle,.f4-sheet-handle[hidden]{display:none}
/* Pegangan interaktif untuk setiap bottom sheet. Hanya aktif di HP.
   Handle ditambahkan di akhir konten agar selector :first-child lama tidak berubah. */
@media(max-width:1023px){
 body .f4-sheet-draggable:not(dialog):not(.f4-user-year-popover){
  position:relative
 }
 body .f4-sheet-draggable{box-sizing:border-box}
 body :is(#f4-direct-dialog section,#f4-superadmin-confirm .f4-sa-confirm-panel,
  #credentialModal .f4-bank-credential-panel,#f4-tx-receipt-dialog>.f4-tx-card,#modal-edit .f4-book-edit-card,
  #modal-doc-rapat>div,#modal-gateway>div,.v21-modal-card,.v24-edit-card,
  .f4-activity-dialog-panel,.sa-account-modal,
  .f4-jersey-print-dialog,.tc-date-dialog,.f4p-album-card,
  .f4-pm-dialog,.f4-user-year-popover,.f4-ui-dialog-panel,
  .f4-work-notice-panel,.edit-modal-card,#modal-koreksi-migrasi>div,
  #modal-event-detail>div,#modal-arisan>div,#modal-cetak-kas>div,
  #modal-keuangan>div,#modal-jersey>div,#modal-dokumentasi>div,
  #modal-gallery-grid>div,#modal-saran>div).f4-sheet-draggable{
  padding-top:32px
 }
 body :is(#f4-direct-dialog section,#f4-superadmin-confirm .f4-sa-confirm-panel,
  #credentialModal .f4-bank-credential-panel,#f4-tx-receipt-dialog>.f4-tx-card,#modal-edit .f4-book-edit-card,
  #modal-doc-rapat>div,#modal-gateway>div,.v21-modal-card,.v24-edit-card,
  .f4-activity-dialog-panel,.sa-account-modal,
  .f4-jersey-print-dialog,.tc-date-dialog,.f4p-album-card,
  .f4-pm-dialog,.f4-user-year-popover,.f4-ui-dialog-panel,
  .f4-work-notice-panel,.edit-modal-card,#modal-koreksi-migrasi>div,
  #modal-event-detail>div,#modal-arisan>div,#modal-cetak-kas>div,
  #modal-keuangan>div,#modal-jersey>div,#modal-dokumentasi>div,
  #modal-gallery-grid>div,#modal-saran>div).f4-sheet-draggable::before{
  content:none;display:none
 }
 .f4-sheet-draggable>.f4-sheet-handle:not([hidden]){
  position:absolute;inset:0 0 auto;width:100%;height:30px;
  display:flex;align-items:center;justify-content:center;
  border:0;padding:0;margin:0;background:transparent;
  touch-action:none;user-select:none;-webkit-user-select:none;
  cursor:grab;z-index:8;box-sizing:border-box
 }
 .f4-sheet-draggable :is(.f4-tx-top,.f4-chat-sheet-head,.f4p-album-head,.rp-history-head,.f4-resident-sheet-top,.f4g-head,.f4-ui-dialog-header,.f4-activity-dialog-header,.v21-modal-header){touch-action:none;cursor:grab}
 .f4-sheet-draggable>.f4-sheet-handle::before{
  content:"";display:block;width:42px;height:5px;
  border-radius:99px;background:#c5cbd2;
  box-shadow:0 0 0 1px rgba(255,255,255,.3)
 }
 .f4-sheet-draggable>.f4-sheet-handle[aria-disabled="true"]{pointer-events:none}
 .f4-sheet-draggable>.f4-sheet-handle:focus-visible{
  outline:2px solid #6c71ab;outline-offset:-4px;border-radius:12px
 }
 .f4-sheet-draggable.f4-sheet-dragging{
  animation:none;transition:none
 }
 .f4-sheet-draggable.f4-sheet-dragging>.f4-sheet-handle{cursor:grabbing}
 #modal-edit>.f4-book-edit-center:has(.f4-book-edit-card.f4-sheet-expanded){
  max-height:calc(100dvh - 10px);
  height:calc(100dvh - 10px)
 }
 body :is(#f4-direct-dialog section,#f4-superadmin-confirm .f4-sa-confirm-panel,
  #credentialModal .f4-bank-credential-panel,#f4-tx-receipt-dialog>.f4-tx-card,#modal-edit .f4-book-edit-card,
  #modal-doc-rapat>div,#modal-gateway>div,.v21-modal-card,.v24-edit-card,
  .f4-activity-dialog-panel,.sa-account-modal,
  .f4-jersey-print-dialog,.tc-date-dialog,.f4p-album-card,.f4-pm-dialog,
  .f4-user-year-popover,.f4-ui-dialog-panel,.f4-work-notice-panel,
  .edit-modal-card,#modal-koreksi-migrasi>div,
  #modal-event-detail>div,#modal-arisan>div,#modal-cetak-kas>div,
  #modal-keuangan>div,#modal-jersey>div,#modal-dokumentasi>div,
  #modal-gallery-grid>div,#modal-saran>div).f4-sheet-draggable.f4-sheet-dragging{
  animation:none
 }
 .f4-sheet-draggable.f4-sheet-expanded{
  border-radius:18px 18px 0 0
 }
}
@media(prefers-reduced-motion:reduce){
 .f4-sheet-draggable,.f4-sheet-draggable.f4-sheet-dragging{
  animation:none;transition:none
 }
}


/* v9: Hidden overlays must not intercept taps on mobile OR desktop. */
body :is(#f4-direct-dialog,#f4-superadmin-confirm,#credentialModal,
  .v21-modal,.v24-edit-overlay,.f4-activity-dialog,
  .sa-account-shade,.f4-jersey-print-veil,.tc-date-overlay,.f4-ui-dialog,
  #f4-work-notice,.f4-pm-shade,#modal-event-detail,#modal-arisan,
  #modal-cetak-kas,#modal-keuangan,#modal-jersey,#modal-dokumentasi,
  #modal-gallery-grid,#modal-saran,#modal-edit,.edit-modal,
  #modal-koreksi-migrasi,#modal-doc-rapat,.f4p-album-overlay,
  #modal-gateway):is(.hidden,[hidden]) {
  display:none;
  pointer-events:none;
 }
@media (max-width:1023px) {
 
 body .f4-sheet-draggable.f4-sheet-settling {
  animation:none;
 }
 #modal-edit > .f4-book-edit-center:has(.f4-sheet-dragging) {
  height:calc(100dvh - 10px);
  max-height:calc(100dvh - 10px);
 }
}
@media (prefers-reduced-motion:reduce) {
 body .f4-sheet-draggable,
 body .f4-sheet-draggable.f4-sheet-settling {animation:none}
}

/* v10: after the first gesture the original entrance animation must not restart.
   Gesture sizing is controlled by the shared panel controller. */
@media (max-width:1023px) {
 body :is(#f4-direct-dialog section,#f4-superadmin-confirm .f4-sa-confirm-panel,
  #credentialModal .f4-bank-credential-panel,#f4-tx-receipt-dialog>.f4-tx-card,#modal-edit .f4-book-edit-card,
  #modal-doc-rapat>div,#modal-gateway>div,.v21-modal-card,.v24-edit-card,
  .f4-activity-dialog-panel,.sa-account-modal,
  .f4-jersey-print-dialog,.tc-date-dialog,.f4p-album-card,.f4-pm-dialog,
  .f4-user-year-popover,.f4-ui-dialog-panel,.f4-work-notice-panel,
  .edit-modal-card,#modal-koreksi-migrasi>div,
  #modal-event-detail>div,#modal-arisan>div,#modal-cetak-kas>div,
  #modal-keuangan>div,#modal-jersey>div,#modal-dokumentasi>div,
  #modal-gallery-grid>div,#modal-saran>div).f4-sheet-gesture-ready {
  animation:none;
 }
 body .f4-sheet-draggable:is(.f4-sheet-dragging,.f4-sheet-settling,.f4-sheet-dismissing) {
  will-change:height,transform;
  backface-visibility:hidden;
 }

}

/* Bank Sampah: native price/schedule dialog and receipt follow existing mobile sheets. */
@media(max-width:1023px){
 
 body.f4-direct-bank dialog.f4-bank-sheet-modal[open]::before{
  content:"";display:block;width:42px;height:4px;margin:-10px auto 17px;
  border-radius:99px;background:#c9d8d0
 }
 body #f4-tx-receipt-dialog:not([hidden]){
  align-items:flex-end;justify-content:center;padding:0;overflow:hidden
 }
 body #f4-tx-receipt-dialog>.f4-tx-card{
  width:100%;max-width:100%;min-width:0;min-height:0;max-height:var(--f4-sheet-collapsed-height,72dvh);
  border-radius:20px 20px 0 0;overflow:hidden;animation:f4-sheet-up .23s ease-out
 }
 body #f4-tx-receipt-dialog>.f4-tx-card.f4-sheet-draggable{padding-top:24px}
 body #f4-tx-receipt-dialog .f4-tx-top{padding:6px 12px 9px;flex:none}
 body #f4-tx-receipt-dialog .f4-tx-top strong{font-size:15px;line-height:1.35;min-width:0}
 body #f4-tx-receipt-dialog .f4-tx-top .f4-tx-close{width:32px;height:32px;min-height:0;padding:0;flex:none;border:0;background:transparent}
 body #f4-tx-receipt-dialog .f4-tx-image-wrap{min-height:0;padding:8px;overscroll-behavior:contain;overflow-anchor:none}
 body #f4-tx-receipt-dialog .f4-tx-actions{padding:8px 10px;gap:6px;flex:none}
 body #f4-tx-receipt-dialog .f4-tx-actions button{min-width:0;min-height:40px;padding:6px 5px;gap:4px;font-size:12px;font-weight:600;white-space:nowrap;flex:1 1 0}
 body #f4-tx-receipt-dialog .f4-tx-actions svg{width:16px;height:16px;flex:none}
 body #f4-tx-receipt-dialog .f4-tx-admin-actions{flex:none;padding:8px 10px;gap:6px}
 body #f4-chat-sheet>.f4-chat-sheet-panel.f4-sheet-draggable{position:relative;padding-top:24px}
 body #f4-chat-sheet[data-keyboard="true"]{--f4-sheet-safe-bottom:0px;--f4-sheet-available-height:calc(var(--f4-chat-vv-height,100dvh) - 8px);--f4-sheet-collapsed-height:var(--f4-sheet-available-height)}
 body #f4-chat-sheet .f4-chat-sheet-head{padding-top:4px}
 body #f4-chat-sheet .f4-chat-sheet-grip{display:none}
}
@media(max-width:1023px) and (prefers-reduced-motion:reduce){
 body.f4-direct-bank dialog.f4-bank-sheet-modal[open],
 body #f4-tx-receipt-dialog>.f4-tx-card{animation:none}
}

/* Bank Sampah: allow the same shared drag control on its native dialogs. */
@media(max-width:1023px){
 body.f4-direct-bank dialog.f4-bank-sheet-modal[open]{
  position:fixed;inset:auto 0 0;top:auto;left:0;right:0;bottom:0;
  box-sizing:border-box;display:block;width:100%;max-width:100%;
  height:auto;margin:0;overflow-y:auto;overscroll-behavior:contain;
  padding:23px 18px calc(18px + env(safe-area-inset-bottom,0px));
  border:0;border-radius:22px 22px 0 0;
  box-shadow:0 -14px 40px rgba(14,42,32,.22);
  animation:f4-sheet-up .23s ease-out;
  max-height:calc(100dvh - 8px);min-width:0;overflow-x:hidden
 }
 body.f4-direct-bank .f4-control-panel.f4-sheet-draggable,
 body.f4-direct-bank dialog.f4-bank-sheet-modal.f4-sheet-draggable{padding-top:34px}
 body.f4-direct-bank .f4-control-panel.f4-sheet-draggable::before,
 body.f4-direct-bank dialog.f4-bank-sheet-modal.f4-sheet-draggable::before{display:none}
 body.f4-direct-bank .f4-bank-admin-menu-sheet.f4-sheet-draggable>.f4-bank-admin-menu-handle{display:none}
}

/* Shared safe area: the dock stays put and no sheet content can sit behind it.
   Modal backdrop remains full viewport; only the panel's bottom anchor moves. */
@media(max-width:1023px){
 html[data-f4-shell] body{
  --f4-sheet-safe-bottom:0px;
  --f4-sheet-end-space:env(safe-area-inset-bottom,0px);
  --f4-sheet-available-height:calc(var(--f4-shell-viewport,100dvh) - var(--f4-sheet-safe-bottom) - 8px);
  --f4-sheet-collapsed-height:calc(var(--f4-sheet-available-height) * .72);
 }
 html[data-f4-shell] body.f4-shared-dock:not(.f4-account-open):has(#f4-direct-dock:not([hidden])):not(:has(.f4p-photo-overlay:not([hidden]),.v21-lightbox:not(.hidden):not([hidden]),#lightbox-modal:not(.hidden):not([hidden]))){--f4-sheet-safe-bottom:var(--f4-shell-footer,0px);--f4-sheet-end-space:0px}
 html[data-f4-shell] body :is(#f4-superadmin-confirm,#credentialModal,#f4-tx-receipt-dialog,
  .v21-modal,.v24-edit-overlay,.f4-activity-dialog,.sa-account-shade,.f4-jersey-print-veil,.tc-date-overlay,
  .f4-ui-dialog,#f4-work-notice,.f4-pm-shade,#modal-event-detail,#modal-arisan,
  #modal-cetak-kas,#modal-keuangan,#modal-jersey,#modal-dokumentasi,#modal-gallery-grid,#modal-saran,
  #modal-rekening,#modal-edit,.edit-modal,#modal-koreksi-migrasi,#modal-doc-rapat,.f4p-album-overlay,
  #modal-gateway,.f4g-comment-overlay,#f4-chat-sheet,.f4-resident-sheet-overlay).f4-sheet-overlay-root{
  box-sizing:border-box;padding-bottom:var(--f4-sheet-safe-bottom);overflow:hidden;
 }
 html[data-f4-shell] body :is(#f4-superadmin-confirm .f4-sa-confirm-panel,#credentialModal>.f4-bank-credential-panel,#f4-tx-receipt-dialog>.f4-tx-card,#modal-edit .f4-book-edit-card,#modal-doc-rapat>div,#modal-gateway>div,#modal-event-detail>div,#modal-arisan>div,#modal-cetak-kas>div,#modal-keuangan>div,#modal-jersey>div,#modal-dokumentasi>div,#modal-gallery-grid>div,#modal-saran>div,#modal-rekening>.f4-account-dialog,#modal-koreksi-migrasi>div,.f4-sheet-draggable):not(dialog).f4-sheet-draggable{
  max-height:var(--f4-sheet-collapsed-height);
 }
 html[data-f4-shell] body :is(#modal-edit>.f4-book-edit-center:has(.f4-book-edit-card.f4-sheet-expanded),
  #modal-edit>.f4-book-edit-center:has(.f4-sheet-dragging)){
  max-height:var(--f4-sheet-available-height);
  height:var(--f4-sheet-available-height)
 }
 html[data-f4-shell] body.f4-direct-bank dialog.f4-bank-sheet-modal[open]{
  bottom:var(--f4-sheet-safe-bottom);
  max-height:var(--f4-sheet-collapsed-height);
  padding-bottom:calc(18px + var(--f4-sheet-end-space))
 }
 html[data-f4-shell] body .f4g-comment-overlay>.f4g-panel.f4-sheet-draggable{
  position:relative;padding-top:24px;
  max-height:var(--f4-sheet-collapsed-height);
  height:min(var(--f4-sheet-collapsed-height),660px);
  animation:f4-sheet-up .23s ease-out
 }
}
