/* Kerangka aplikasi untuk HP dan tablet. Di layar lebar semua elemen ini disembunyikan. */
.mbx-actions,.mbx-nav,.mhx{display:none}.mbx-sheet{display:none}.mbx-sheet[open]{display:block}
.off-svg{width:1em;height:1em;flex:none;display:block}
@media(max-width:1080px){
 :root{--mbx-nav:68px;--mbx-safe:env(safe-area-inset-bottom,0px)}
 html{-webkit-text-size-adjust:100%}
 body.portal-body{padding-bottom:calc(var(--mbx-nav) + var(--mbx-safe))}
 .portal-body input,.portal-body select,.portal-body textarea{max-width:100%;min-width:0}
 .portal-body a,.portal-body button{-webkit-tap-highlight-color:#ff5b1b22}
 /* Header ringkas */
 body.portal-body .site-header{display:block!important;position:sticky!important;top:0!important;left:0!important;right:0!important;width:auto!important;z-index:60;height:auto;border-radius:0!important;background:#fffffff5;box-shadow:0 2px 14px #1b2f4714;transform:none!important}
 body.portal-body .site-header .nav{width:auto!important;max-width:none;height:64px!important;min-height:64px!important;margin:0;padding:0 max(14px,env(safe-area-inset-right,0px)) 0 max(14px,env(safe-area-inset-left,0px));display:flex;align-items:center;gap:10px}
 body.portal-body .brand{min-width:0;font-size:19px}body.portal-body .brand img{width:48px;height:44px}body.portal-body .brand small{font-size:13px}
 body.portal-body #main-nav,body.portal-body .menu-toggle,body.portal-body .citizen-account,body.portal-body .ptx-bell,body.portal-body .site-tools,.citizen-back-bar{display:none!important}
 body.portal-body .resident-login{margin-left:auto;padding:9px 14px;font-size:13px;white-space:nowrap}
 .mbx-actions{display:flex;align-items:center;gap:10px;margin-left:auto}.mbx-actions~.resident-login{display:none!important}
 .portal-body .mbx-bell{position:relative;width:44px;height:44px;display:grid;place-items:center;border-radius:50%;color:var(--theme-navy,#082654);font-size:25px}.mbx-bell b{position:absolute;right:3px;top:3px;min-width:17px;height:17px;padding:0 3px;box-sizing:border-box;display:grid;place-items:center;border:2px solid #fff;border-radius:99px;background:#e8301f;color:#fff;font-size:9px;font-weight:800}
 .portal-body .mbx-avatar{width:44px;height:44px;flex:none;border-radius:50%;overflow:hidden;background:#ffe9d8}.mbx-avatar img{display:block;width:100%;height:100%;object-fit:cover}
 .mbx-bell:focus-visible,.mbx-avatar:focus-visible,.mbx-nav a:focus-visible,.mbx-nav button:focus-visible,.mbx-sheet a:focus-visible,.mbx-sheet button:focus-visible{outline:2px solid #ff5b1b;outline-offset:1px}
 /* Navigasi bawah */
 .mbx-nav{position:fixed;left:0;right:0;bottom:0;z-index:70;padding:6px max(8px,env(safe-area-inset-right,0px)) calc(6px + var(--mbx-safe)) max(8px,env(safe-area-inset-left,0px));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;background:#fff;border-radius:18px 18px 0 0;box-shadow:0 -6px 22px #1b2f471c}
 .portal-body .mbx-nav a,.portal-body .mbx-nav button{min-height:56px;padding:6px 2px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;border-radius:14px;background:transparent;color:#465f80;font-family:inherit;font-size:11.5px;font-weight:700;line-height:1.1;cursor:pointer;box-shadow:none}.mbx-nav .off-svg{font-size:25px}.portal-body .mbx-nav .active{background:#ffefe4;color:#e8501a;font-weight:800}
 /* Lembar menu */
 .mbx-sheet[open]{position:fixed;inset:auto 0 0 0;width:100%;max-width:640px;max-height:82vh;margin:auto auto 0;padding:14px 16px calc(16px + var(--mbx-safe));box-sizing:border-box;overflow-y:auto;border:0;border-radius:22px 22px 0 0;background:#fff;color:var(--theme-navy,#082654)}.mbx-sheet::backdrop{background:#0a1d3b73}.mbx-sheet header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.mbx-sheet h2{margin:0;color:var(--theme-navy,#082654);font:900 19px Nunito,Arial,sans-serif}.portal-body .mbx-sheet header button{width:44px;height:44px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:#f4f6f9;color:var(--theme-navy,#082654);font-size:21px;box-shadow:none}
 .mbx-sheet-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.portal-body .mbx-sheet-grid a{min-height:92px;padding:9px 5px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;border-radius:14px;background:var(--bg,#f4f6f9);color:var(--theme-navy,#082654);font-size:12.5px;font-weight:700;line-height:1.2;text-align:center}.mbx-sheet-grid span{width:40px;height:40px;display:grid;place-items:center;border-radius:11px;background:#fff;color:var(--fg,#1467c9);font-size:23px}.mbx-sheet .tint-orange{--bg:#fff3ea;--fg:#e8701a}.mbx-sheet .tint-blue{--bg:#edf5ff;--fg:#1467c9}.mbx-sheet .tint-green{--bg:#e9f9f1;--fg:#0c8a4c}.mbx-sheet .tint-purple{--bg:#f4eeff;--fg:#6a31cc}.mbx-sheet .tint-red{--bg:#fff0f3;--fg:#d41f58}
 .portal-body .mbx-sheet-exit,.portal-body .mbx-sheet-login{min-height:48px;margin-top:12px;display:flex;align-items:center;justify-content:center;gap:9px;border-radius:12px;font-size:14.5px;font-weight:800}.portal-body .mbx-sheet-exit{border:1px solid #fbc9c9;background:#fff5f5;color:#c92a3b}.portal-body .mbx-sheet-login{background:linear-gradient(90deg,#ff7a24,#f4490f);color:#fff}.mbx-sheet-exit .off-svg,.mbx-sheet-login .off-svg{font-size:20px}
 /* Tombol mengambang di atas navigasi bawah */
 body.portal-body .live-chat-float{right:14px!important;bottom:calc(var(--mbx-nav) + var(--mbx-safe) + 12px)!important;left:auto!important;width:54px!important;min-width:0!important;height:54px!important;padding:0!important;display:grid!important;place-items:center;border-radius:50%!important}.portal-body .live-chat-float>span:last-child{display:none!important}.portal-body .live-chat-logo{margin:0!important}
 body.portal-body .wa-float{right:14px;bottom:calc(var(--mbx-nav) + var(--mbx-safe) + 12px)}
 body.portal-body .live-chat-widget{right:10px!important;left:10px!important;width:auto!important;bottom:calc(var(--mbx-nav) + var(--mbx-safe) + 8px)!important;max-height:calc(100dvh - var(--mbx-nav) - 90px)}
 /* Halaman bersidebar */
 .citizen-letter-sidebar{display:none!important}.citizen-letter-body .letter-page,.citizen-letter-body .letter-request-page,.citizen-letter-body .portal-footer{margin-left:0!important}
 .cdx-page,.pfx-page,.inf-page,.ctc-page{padding-bottom:18px!important}.cdx-tools{display:none!important}.cdx-top{min-height:54px}
 /* Beranda warga versi aplikasi */
 .ptx-page{display:none}.mhx{display:grid;gap:12px;padding:10px 12px 18px;background:#fffaf4;color:var(--theme-navy,#082654)}
 .mhx-hero{position:relative;min-height:clamp(190px,50vw,300px);padding:clamp(14px,4vw,30px) clamp(14px,4vw,30px);box-sizing:border-box;display:flex;align-items:center;border-radius:18px;background:linear-gradient(100deg,#fff7ec,#fffaf3 55%);overflow:hidden}.mhx-hero>img{position:absolute;right:0;bottom:0;width:58%;height:100%;object-fit:cover;object-position:right bottom;-webkit-mask-image:linear-gradient(90deg,transparent,#000 22%);mask-image:linear-gradient(90deg,transparent,#000 22%)}.mhx-copy{position:relative;z-index:1;width:58%;min-width:0}.mhx-copy small{display:block;color:#f04b17;font-size:clamp(9.500px,2.500vw,13px);font-weight:800;letter-spacing:.14em}.mhx-copy h1{margin:4px 0 5px;color:var(--theme-navy,#082654);font:900 clamp(22px,6.200vw,40px)/1.08 Nunito,Arial,sans-serif;letter-spacing:-.02em}.mhx-copy h1 b{display:block;color:#ff5317;font-size:.86em;white-space:nowrap}.mhx-copy p{margin:0 0 10px;color:#27466f;font-size:clamp(11.500px,3.100vw,16px);line-height:1.35}.portal-body .mhx-cta{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:99px;background:linear-gradient(90deg,#ff6a24,#f4490f);color:#fff;font-size:clamp(12.500px,3.300vw,15px);font-weight:800;box-shadow:0 7px 14px #ff552b33}.mhx-cta .off-svg{font-size:18px}
 .mhx-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.portal-body .mhx-stats a{--c:#f4490f;--bg:#fff1e7;position:relative;min-height:104px;padding:9px 8px;box-sizing:border-box;display:flex;flex-direction:column;border-radius:14px;background:var(--bg);color:var(--theme-navy,#082654)}.portal-body .mhx-stats .blue{--c:#1160d8;--bg:#e6f0fe}.portal-body .mhx-stats .green{--c:#0c9458;--bg:#e4f8ed}.portal-body .mhx-stats .purple{--c:#7c3fe0;--bg:#f0e9ff}.mhx-stats span{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#ffffffb8;color:var(--c);font-size:20px}.mhx-stats b{margin-top:5px;font-size:19px;font-weight:900;line-height:1.1}.mhx-stats small{font-size:11px;font-weight:600;line-height:1.2}.mhx-stats i{position:absolute;right:6px;top:8px;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#fff;color:var(--c);font-size:14px}
 .mhx-card{min-width:0;padding:12px;border:1px solid #f0ece6;border-radius:16px;background:#fff;box-shadow:0 6px 18px #26344c0a}.mhx-card>header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.mhx-card h2{display:flex;align-items:center;gap:8px;margin:0;color:var(--theme-navy,#082654);font:900 16.5px/1.2 Nunito,Arial,sans-serif}.mhx-card h2 .off-svg{color:var(--theme-accent,#f0501a);font-size:21px}.portal-body .mhx-card>header>a{min-height:32px;display:inline-flex;align-items:center;gap:5px;color:#e8501a;font-size:12.5px;font-weight:800;white-space:nowrap}
 .mhx-services{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.portal-body .mhx-services a{--bg:#fff5ec;--c:#e8701a;min-height:112px;padding:9px 5px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:2px;border-radius:13px;background:var(--bg);color:var(--theme-navy,#082654);text-align:center}.portal-body .mhx-services .blue{--bg:#eef5ff;--c:#1467c9}.portal-body .mhx-services .green{--bg:#ebf9f2;--c:#0c8a4c}.portal-body .mhx-services .red{--bg:#fff0f3;--c:#d41f58}.portal-body .mhx-services .purple{--bg:#f4eeff;--c:#6a31cc}.mhx-services span{width:42px;height:42px;margin-bottom:3px;display:grid;place-items:center;border-radius:11px;background:#fff;color:var(--c);font-size:24px}.mhx-services strong{font-size:12.5px;font-weight:800;line-height:1.2}.mhx-services small{color:#526d91;font-size:11px;line-height:1.25}
 .mhx-list{display:grid;gap:8px}.portal-body .mhx-list>a{min-height:66px;display:grid;grid-template-columns:54px minmax(0,1fr) 18px;align-items:center;gap:9px;color:inherit}.mhx-date{height:58px;display:grid;place-content:center;justify-items:center;border-radius:11px;background:#fff3e8;color:#e8501a}.mhx-date b{font-size:20px;font-weight:900;line-height:1}.mhx-date small{margin-top:2px;color:#27466f;font-size:11.5px;font-weight:600}.mhx-item{min-width:0;display:grid;gap:2px;padding:8px 10px;border:1px solid #edf0f4;border-radius:11px}.mhx-item strong{font-size:13px;font-weight:800;line-height:1.25}.mhx-item small{color:#526d91;font-size:11.5px;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.mhx-item .meta{display:flex;flex-wrap:wrap;gap:2px 10px}.mhx-item .meta span{display:inline-flex;align-items:center;gap:4px}.mhx-item .meta .off-svg{font-size:13px;color:#e8501a}.mhx-list>a>.off-svg{color:#e8501a;font-size:18px}.mhx-empty{margin:0;padding:12px;border-radius:10px;background:#f8fafc;color:#5f708a;font-size:12.5px}
 /* Formulir: nyaman disentuh, tanpa zoom otomatis iOS */
 .portal-body input:not([type=checkbox]):not([type=radio]),.portal-body select,.portal-body textarea{font-size:16px!important}
}
/* Tablet: isi beranda memanfaatkan lebar layar */
@media(min-width:700px) and (max-width:1080px){
 .mhx{padding:14px 20px 22px;gap:14px}.mhx-services{grid-template-columns:repeat(6,minmax(0,1fr))}.mhx-duo{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}.mhx-stats{gap:12px}.mhx-copy{width:50%}.mhx-hero>img{width:60%}
}
@media(max-width:699px){.mhx-copy{width:54%}.mhx-hero>img{width:50%}.mhx-duo{display:grid;gap:12px}.mhx-list>a:nth-child(n+3){display:none}}
@media(max-width:340px){.mhx-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.mhx-services{grid-template-columns:repeat(2,minmax(0,1fr))}.mhx-copy{width:66%}.mhx-hero>img{opacity:.45}.mbx-sheet-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* HP: tabel warga menjadi kartu, tata letak satu kolom */
@media(max-width:640px){
 body.portal-body .cdx-scroll{overflow:visible;border:0}body.portal-body .cdx-table{display:block;min-width:0}body.portal-body .cdx-table thead{display:none}body.portal-body .cdx-table tbody{display:grid;gap:10px}body.portal-body .cdx-table tr{display:block;padding:8px 12px;border:1px solid #edf0f4;border-radius:13px;background:#fff}body.portal-body .cdx-table tr[hidden]{display:none}body.portal-body .cdx-table td{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:7px 0;border:0;border-bottom:1px solid #f3f5f8;text-align:right;overflow-wrap:anywhere}body.portal-body .cdx-table td:last-child{border-bottom:0}body.portal-body .cdx-table td[data-label]:before{content:attr(data-label);flex:none;max-width:42%;color:#5f708a;font-size:12px;font-weight:700;text-align:left}body.portal-body .cdx-table td:not([data-label]){display:block;text-align:left;border:0}body.portal-body .cdx-table td small{margin-top:1px}.cdx-card{padding:13px!important}body.portal-body .cdx-metrics{gap:8px}body.portal-body .cdx-metrics>*{min-height:0;padding:11px 13px;gap:12px}body.portal-body .cdx-metrics .cdx-icon{width:46px;height:46px;font-size:25px}body.portal-body .cdx-metrics strong{font-size:21px}.cdx-metrics small,.cdx-metrics em{font-size:12px}.cdx-mark{display:none!important}.cpx-tabs{flex:1 1 100%!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;margin:0 -12px;padding:2px 12px}.portal-body .cpx-tabs button{flex:none}.cpx-tools .cpx-search{flex:1 1 100%!important}.cpx-notice{padding:11px 13px!important;gap:10px!important}.cpx-notice>span{width:34px!important;height:34px!important;font-size:24px!important}.cpx-notice>div{flex:1 1 70%!important}.cpx-notice strong{font-size:14px!important}.cpx-notice p{font-size:12.5px!important}.portal-body .cpx-notice>a{width:100%;box-sizing:border-box;justify-content:center;min-height:44px}body.portal-body .cpx-filters select{flex:1 1 40%!important;width:auto!important;min-width:0}.cpx-range{flex:1 1 100%!important}.cdx-page .cdx-metrics.four{grid-template-columns:repeat(2,minmax(0,1fr))!important}.cdx-metrics.four>*{flex-direction:column;align-items:flex-start}.pe-control input,.pe-control textarea,.pe-control select{width:100%;min-width:0}.portal-body .cpx-detail,.portal-body .cpx-delete{min-height:40px}.cdx-page .cdx-report{width:100%;box-sizing:border-box;justify-content:center}.cdx-hero-icon{width:52px!important;height:52px!important;font-size:28px!important}.cdx-hero{min-height:0!important;padding:14px!important;gap:12px!important}.cdx-hero h1{font-size:26px!important}.cdx-hero p{font-size:13px!important}.cdx-crumb{display:none}.pe-grid,.cpx-panel{grid-template-columns:minmax(0,1fr)!important}.fnx-chart{height:190px}.fnx-bars i{width:34%}.fnx-grid-lines b{font-size:10px}
}
@media print{.mbx-nav,.mbx-sheet,.mhx,.mbx-actions{display:none!important}}
.pe-page{overflow-x:clip}.pe-page input[type=file]{position:absolute;left:0;width:1px;height:1px;opacity:0}

/* Menu akun warga: sama dengan pilihan A admin */
.portal-body .citizen-account[open]>summary,.portal-body .cdx-account[open]>summary{background:#eaf1f9}.acx-caret{display:block;color:#17375f;transition:transform .2s}.acx-caret svg{display:block}[open]>summary .acx-caret{transform:rotate(180deg)}
.portal-body .acx-menu,.portal-body .cdx-account>.acx-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:80;width:330px;max-width:calc(100vw - 20px);padding:0;box-sizing:border-box;border:1px solid #e8edf3;border-radius:18px;background:#fff;box-shadow:0 22px 55px #152b482b;overflow:hidden;animation:acx-in .16s ease both}.portal-body .acx-menu:before{display:none}@keyframes acx-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.portal-body .acx-menu>header{display:flex;align-items:center;gap:13px;margin:0;padding:18px;border:0;background:linear-gradient(110deg,#fff3e6,#ffe6d3)}.portal-body .acx-menu>header img{width:56px;height:56px;flex:0 0 56px;border:3px solid #fff;border-radius:50%;object-fit:cover;box-sizing:border-box}.portal-body .acx-menu>header strong{display:block;color:var(--theme-navy,#082654);font-size:17px;font-weight:900;overflow-wrap:anywhere}.portal-body .acx-menu>header small{display:inline-flex;align-items:center;gap:6px;margin-top:4px;padding:3px 9px;border-radius:99px;background:#fff;color:#0a7a43;font-size:11.5px;font-weight:800}.acx-menu>header small i{width:7px;height:7px;flex:none;border-radius:50%;background:#16a765}
.portal-body .acx-menu .acx-list{display:grid;gap:2px;margin:0;padding:8px}.portal-body .acx-menu .acx-list a{display:flex;align-items:center;gap:12px;min-height:58px;margin:0;padding:9px 10px;box-sizing:border-box;border:0;border-radius:12px;background:transparent;color:var(--theme-navy,#082654);font-size:14px;transition:background .14s}.portal-body .acx-menu .acx-list a:hover{background:#fff4e8}.portal-body .acx-menu a:focus-visible{outline:2px solid #ff5b1b;outline-offset:-2px}.portal-body .acx-list b{width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;border-radius:11px;font-size:20px}.portal-body .acx-list b.blue{background:#e6f1ff;color:#1467c9}.portal-body .acx-list b.amber{background:#fff0d9;color:#d9770f}.portal-body .acx-list span{flex:1;min-width:0}.portal-body .acx-list strong,.portal-body .acx-list small{display:block}.portal-body .acx-list strong{font-size:14px;font-weight:800}.portal-body .acx-list small{margin-top:1px;color:#5f708a;font-size:12px;font-weight:600}.portal-body .acx-list i{flex:none;color:#9aa8ba;font-size:18px;font-style:normal}.portal-body .acx-list a:hover i{color:#e8501a}
.portal-body .acx-menu a.acx-logout{height:44px;margin:4px 16px 16px;padding:0;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid #fbc9c9;border-radius:12px;background:#fff5f5;color:#c92a3b;font-size:14px;font-weight:800;transition:background .14s}.portal-body .acx-menu a.acx-logout:hover{background:#ffe6e8}.acx-logout .off-svg{font-size:19px}
@media(prefers-reduced-motion:reduce){.portal-body .acx-menu{animation:none}}
.portal-body .acx-menu .acx-list a svg{display:block!important}.portal-body .acx-menu .acx-list i{transform:none!important}
/* Kartu baris tabel di mobile boleh menyusut (cegah grid blowout yang membuat halaman bergeser). */ body.portal-body .cdx-table tbody{grid-template-columns:minmax(0,1fr)} body.portal-body .cdx-table td{min-width:0}
/* Teks keadaan kosong di tabel boleh membungkus (sel tabel desktop memakai nowrap). */ body.portal-body .cdx-table td.cpx-empty,body.portal-body .cdx-table td.cpx-empty *{white-space:normal}
