/* LAMPID Leuwibatu - UI03 / Semua peran / Mobile-first.
   Overrides tampilan saja. Tidak mengubah mesin data atau cetak. */
:root {
  --lv3-blue:#1877e7; --lv3-green:#0faa70; --lv3-deep:#075d75;
  --lv3-orange:#f59a24; --lv3-red:#e85b65; --lv3-purple:#8259da;
  --lv3-ink:#163149; --lv3-muted:#65788e; --lv3-surface:#fff;
  --lv3-line:#e3eaf4; --lv3-bg:#f4f8fd; --lv3-shadow:0 8px 26px rgba(22,63,103,.065);
}
*,*:before,*:after{box-sizing:border-box}
html{scroll-behavior:smooth}
body.lv3-unified{--shell-sidebar:228px;margin:0;background:var(--lv3-bg);color:var(--lv3-ink);font-family:'Plus Jakarta Sans',system-ui,sans-serif}
.lv3-unified a,.lv3-login a{-webkit-tap-highlight-color:transparent}
.lv3-unified :focus-visible,.lv3-login :focus-visible{outline:3px solid #f6ba36;outline-offset:2px}
.lv3-unified .lampid-shell-content{min-width:0}
.lv3-unified .lampid-main{max-width:1540px;padding:18px 22px 36px}
.lv3-unified .lampid-shell-footer{color:#778da0!important;font-size:.72rem}
.lv3-unified .lampid-sidebar{background:linear-gradient(168deg,#074b69 0%,#07576b 45%,#075443 100%);}
.lv3-unified .lampid-sidebar-brand{padding:14px 14px 18px}
.lv3-unified .lampid-brand-mark,.lv3-unified .lampid-brand-mark--logo{background:white;padding:2px;border-radius:13px;overflow:hidden;box-shadow:0 5px 14px rgba(5,30,64,.14)}
.lv3-unified .lampid-brand-mark--logo img{width:100%;height:100%;object-fit:contain}
.lv3-unified .lampid-brand-copy strong{font-size:1.15rem;letter-spacing:-.02em}
.lv3-unified .lampid-brand-copy small{font-size:.73rem;font-weight:600}
.lv3-unified .lampid-side-link{min-height:45px;font-size:.8rem;border-radius:12px}
.lv3-unified .lampid-side-link.active{background:#fff;color:#075d8b}
.lv3-unified .lampid-side-link:hover{background:rgba(255,255,255,.16)}
.lv3-unified .lampid-side-link.active:hover{background:white}
.lv3-unified .lampid-topbar{min-height:66px;padding:11px 20px;border-color:var(--lv3-line);background:rgba(255,255,255,.97)}
.lv3-unified .lampid-topbar-page strong{font-size:.89rem;color:var(--lv3-ink)}
.lv3-unified .lampid-topbar-page span{font-size:.68rem}
.lv3-unified .lampid-menu-toggle{border-radius:13px;width:43px;height:43px;background:#e9f3ff;color:#1371b2}
.lv3-unified .lampid-menu-toggle:hover{background:#d9eaff}
.lv3-unified .lampid-top-avatar{background:linear-gradient(140deg,#147ac0,#139b80)}
.lv3-unified .lampid-notification{border:0;color:#175d90}
.lv3-unified .lampid-top-user strong{font-size:.75rem}
.lv3-unified .lampid-top-user small{font-size:.62rem}
.lv3-mobile-brand{display:none;text-decoration:none;color:var(--lv3-ink);align-items:center;gap:7px}
.lv3-mobile-brand img{object-fit:contain;border-radius:8px;background:white}
.lv3-mobile-brand span{display:flex;flex-direction:column;line-height:1.12}
.lv3-mobile-brand strong{font-size:.9rem;font-weight:800}
.lv3-mobile-brand small{font-size:.58rem;color:#768aa0}
.lv3-unified .card,.lv3-unified .dash-panel,.lv3-unified .rt-panel,
.lv3-unified .dashboard-panel,.lv3-unified .penduduk-summary-card,
.lv3-unified .penduduk-admin-table-card{border-radius:17px;border-color:var(--lv3-line);box-shadow:var(--lv3-shadow)}
.lv3-unified .alert{border-radius:13px}
.lv3-unified .btn{border-radius:11px;font-weight:700;min-height:38px}
.lv3-unified .btn-sm{min-height:36px;padding:.48rem .75rem;font-size:.78rem}
.lv3-unified .btn-success{background:#0e9f70;border-color:#0e9f70}
.lv3-unified .btn-success:hover{background:#087b59;border-color:#087b59}
.lv3-unified .form-label{font-weight:700;color:#25425a}
.lv3-unified .form-control,.lv3-unified .form-select,.lv3-unified textarea{border-color:#d6e1ec;border-radius:11px;min-height:43px}
.lv3-unified .form-control:focus,.lv3-unified .form-select:focus{border-color:#43a2e8;box-shadow:0 0 0 .2rem rgba(36,134,218,.14)}
.lv3-unified .form-control[readonly],.lv3-unified .form-control:disabled{background:#f1f6fb}
.lv3-unified .badge{font-weight:700}
.lv3-unified .modal-header{border-color:#e6edf5;background:linear-gradient(110deg,#f0f8ff,#f5fff9)}
.lv3-unified .modal-title{font-weight:800;color:#204660}
.lv3-unified .modal-footer{border-color:#e6edf5;background:white}
.lv3-unified .modal-content{border-radius:18px;overflow:hidden;border:1px solid var(--lv3-line)}
.lv3-unified .modal-body{overscroll-behavior:contain}
.lv3-unified .table thead th{background:#eaf4fc;color:#234e70;white-space:nowrap;font-weight:800}
.lv3-unified .table td{vertical-align:middle}
.lv3-unified .table-responsive{-webkit-overflow-scrolling:touch;max-width:100%;min-width:0}
.lv3-unified .table-responsive.lv3-table-wrapper{overflow-x:auto}
.lv3-unified .lv3-card-expand{display:none!important}
.lv3-unified .lampid-data-table-note{font-size:.75rem}
.lv3-unified .penduduk-admin-hero{padding:20px 22px;margin-bottom:14px!important;border-radius:18px}
.lv3-unified .penduduk-admin-hero h1{font-size:clamp(1.12rem,2vw,1.6rem)}
.lv3-unified .penduduk-admin-hero p{font-size:.78rem}
.lv3-unified .penduduk-filter-panel{border-radius:16px}
.lv3-unified .dash-page-head,.lv3-unified .rt-welcome-head{margin-bottom:12px}
.lv3-unified .dash-page-head h1,.lv3-unified .rt-welcome-head h1{font-size:clamp(1.25rem,2.2vw,1.75rem);color:#16344e}
.lv3-unified .dash-page-head p,.lv3-unified .rt-welcome-head p{font-size:.8rem;color:var(--lv3-muted)}
.lv3-kicker{font-size:.68rem;font-weight:800;letter-spacing:.09em;color:#1475b9}
.lv3-section-heading{margin-bottom:14px!important}
.lv3-section-heading h1{font-weight:800;color:#173b59}
.lv3-subline{font-size:.79rem;color:#72899c}
.lv3-action-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:0 0 16px}
.lv3-action{min-width:0;display:flex;align-items:center;gap:12px;text-decoration:none;border:1px solid #dbe8f6;border-radius:15px;background:#fff;padding:12px 13px;color:#214260;box-shadow:var(--lv3-shadow);font-size:.85rem;font-weight:800;transition:transform .16s,box-shadow .16s}
.lv3-action i{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:12px;font-size:1.25rem;background:#e5f1ff;color:var(--lv3-blue)}
.lv3-action:hover{color:#114d79;transform:translateY(-2px);box-shadow:0 9px 18px rgba(40,81,124,.11)}
.lv3-action-blue{background:linear-gradient(145deg,#fff,#edf6ff)}
.lv3-action-green{background:linear-gradient(145deg,#fff,#e9faf0)}
.lv3-action-orange{background:linear-gradient(145deg,#fff,#fff4e7)}
.lv3-action-purple{background:linear-gradient(145deg,#fff,#f3edff)}
.lv3-action-green i{background:#e0f7e9;color:#0b9755}
.lv3-action-orange i{background:#fff1dc;color:#db810b}
.lv3-action-purple i{background:#f0e9ff;color:#7e4fd5}
.lv3-action-red i{background:#ffe8eb;color:#d84d5c}
.lv3-unified .dash-stat-card,.lv3-unified .rt-stat-card{border-radius:17px;border:1px solid var(--lv3-line);padding:14px;box-shadow:var(--lv3-shadow);background:linear-gradient(145deg,#fff 40%,var(--soft,#eef7ff))}
.lv3-unified .dash-stat-icon,.lv3-unified .rt-stat-icon{border-radius:13px}
.lv3-unified .dash-stat-main small,.lv3-unified .rt-stat-top small{font-size:.76rem;line-height:1.45;letter-spacing:0}
.lv3-unified .dash-stat-main strong,.lv3-unified .rt-stat-top strong{font-size:1.65rem;font-weight:800}
.lv3-unified .dash-stat-meta,.lv3-unified .rt-stat-meta{font-size:.68rem;color:#6c7e90;line-height:1.35}
.lv3-unified .dash-grid h3,.lv3-unified .rt-panel-title h3{font-size:1rem;font-weight:800;color:#183953}
.lv3-unified .dash-panel-title p,.lv3-unified .rt-panel-title p{font-size:.72rem;color:#70879b}
.lv3-unified .rt-report-big-icon{width:63px;height:63px;flex:0 0 63px;font-size:1.6rem;background:#e5f8ed}
.lv3-unified .rt-report-status-body{align-items:flex-start;gap:14px;padding:7px 0}
.lv3-unified .rt-report-copy>small{font-size:.77rem}
.lv3-unified .rt-report-copy h2{font-size:1.05rem}
.lv3-unified .rt-report-copy p{font-size:.72rem}
.lv3-unified .rt-report-actions .btn{font-size:.77rem;min-height:42px}
.lv3-unified .rt-change-grid>div{min-height:78px}
.lv3-unified .rt-change-grid p,.lv3-unified .verify-mini-grid p{font-size:.77rem}
.lv3-unified .rt-change-grid p small,.lv3-unified .verify-mini-grid p small{font-size:.66rem}
.lv3-unified .rt-need-report>strong{font-size:.77rem}
.lv3-unified .rt-need-report li{font-size:.72rem}
.lv3-unified .rt-need-report .btn{font-size:.76rem;min-height:40px}
.lv3-unified .rt-history-item p strong,.lv3-unified .rt-check-list p strong{font-size:.73rem}
.lv3-unified .rt-history-item p small,.lv3-unified .rt-check-list p small{font-size:.65rem}
.lv3-unified .rt-table-wrap .table th,.lv3-unified .rt-table-wrap .table td,
.lv3-unified .dash-table th,.lv3-unified .dash-table td{font-size:.75rem}
.lv3-unified .rt-revision-alert{border-radius:14px}
.lv3-unified .dash-quick-actions .btn{font-size:.75rem}
.lv3-rw-stats .stat-label{font-size:.75rem;letter-spacing:0;line-height:1.3;text-transform:none}
.lv3-rw-stats .stat-value{font-size:1.65rem}
.lv3-rw-stats .bg-grad-gray{background:linear-gradient(135deg,#8761d8,#6545b2);color:#fff}
.lv3-rw-stats .stat-card{min-height:114px}
.lv3-rw-list .table thead th{font-size:.8rem}
.lv3-unified .rt-month-summary .rt-change-grid{border-radius:13px}
.lv3-unified .rt-period-card{border-color:#d8e7f6}
.lv3-unified .penduduk-table-card{border-radius:17px}
.lv3-unified .penduduk-admin-table-head{border-color:#e5edf5}
/* Compact report header: the top of the page is for work, not advertising. */
.rt-report-refresh.lv3-unified .rtv-hero{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,300px);grid-template-rows:auto auto auto;
  column-gap:22px;padding:16px 20px 18px;border-radius:17px;min-height:0;margin-bottom:12px;
  background:linear-gradient(112deg,#0965ab,#087f8b);box-shadow:0 8px 23px rgba(22,96,144,.11);
}
.rt-report-refresh.lv3-unified .rtv-hero-identity{grid-column:1/-1;grid-row:1;margin:0 0 9px;gap:12px}
.rt-report-refresh.lv3-unified .rtv-hero-brand{gap:7px}
.rt-report-refresh.lv3-unified .rtv-hero-brand img{width:39px;height:39px;flex:0 0 39px;border-radius:10px}
.rt-report-refresh.lv3-unified .rtv-hero-brand strong{font-size:.95rem}
.rt-report-refresh.lv3-unified .rtv-hero-brand small{font-size:.64rem}
.rt-report-refresh.lv3-unified .rtv-hero-area{font-size:.68rem;padding:6px 10px}
.rt-report-refresh.lv3-unified .rtv-hero-copy{grid-column:1;grid-row:2}
.rt-report-refresh.lv3-unified .rtv-hero-copy h1{font-size:clamp(1.3rem,2vw,1.75rem);margin:3px 0 4px}
.rt-report-refresh.lv3-unified .rtv-kicker{font-size:.63rem;letter-spacing:.07em}
.rt-report-refresh.lv3-unified .rtv-hero-copy p{margin:0;font-size:.77rem}
.rt-report-refresh.lv3-unified .rtv-hero-status{grid-column:2;grid-row:2/4;align-self:stretch;padding:12px;border-radius:13px;box-shadow:none;max-width:none;gap:9px}
.rt-report-refresh.lv3-unified .rtv-status-symbol{width:36px;height:36px;flex:0 0 36px;font-size:17px;border-radius:11px}
.rt-report-refresh.lv3-unified .rtv-hero-status strong{font-size:.88rem}
.rt-report-refresh.lv3-unified .rtv-hero-status span:last-child{font-size:.68rem}
.rt-report-refresh.lv3-unified .rtv-hero-actions{grid-column:1;grid-row:3;align-self:end;margin:10px 0 0;gap:8px}
.rt-report-refresh.lv3-unified .rtv-hero-actions a{min-height:39px;padding:8px 12px;border-radius:10px;font-size:.74rem}
.rt-report-refresh.lv3-unified .rtv-period-toolbar{margin-bottom:12px}
.rt-report-refresh.lv3-unified .rtv-overview-head h2,.rt-report-refresh.lv3-unified .rtv-workflow h2{font-size:1.15rem}
.rt-report-refresh.lv3-unified .rtv-main-stat{min-height:96px;padding:13px}
.rt-report-refresh.lv3-unified .rtv-event-stat{min-height:110px;padding:13px}
.rt-report-refresh.lv3-unified .rtv-main-stat strong{font-size:1.65rem}
.rt-report-refresh.lv3-unified .rtv-event-stat strong{font-size:1.35rem}
.rt-report-refresh.lv3-unified .rtv-step-card{border-radius:14px}
.rt-report-refresh.lv3-unified .rtv-edit-label{margin-top:17px}
/* Shared bottom navigation for all three roles (no navigation duplication). */
.lv3-bottomnav{display:none}
/* Interactive tables become readable resident cards on phones; enhanced by v3 JS. */
@media(max-width:1199.98px){
  body.lv3-unified{--shell-sidebar:214px}
  .lv3-unified .dash-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:991.98px){
  .lv3-unified .lampid-topbar-page{display:flex}
  .lv3-unified .dash-grid-3{grid-template-columns:1fr}
  .lv3-unified .lampid-main{padding:14px 16px 36px}
}
@media(max-width:767.98px){
  body.lv3-unified{overflow-x:hidden;background:#f4f8fe}
  .lv3-unified .lampid-main{padding:13px 12px calc(94px + env(safe-area-inset-bottom))!important}
  .lv3-unified .lampid-shell-footer{display:none}
  .lv3-unified .lampid-topbar{height:62px;min-height:62px;padding:8px 12px}
  .lv3-unified .lampid-topbar-left{gap:8px}
  .lv3-unified .lampid-menu-toggle{width:40px;height:40px;font-size:1.3rem}
  .lv3-unified .lampid-topbar-page{display:none}
  .lv3-unified .lv3-mobile-brand{display:flex}
  .lv3-unified .lampid-topbar-right{gap:4px}
  .lv3-unified .lampid-notification{width:38px;height:38px;padding:0;font-size:1.2rem}
  .lv3-unified .lampid-top-user{padding:0}
  .lv3-unified .lampid-top-avatar{width:34px;height:34px;flex-basis:34px}
  .lv3-unified .dash-page-head,.lv3-unified .rt-welcome-head{flex-direction:column;align-items:stretch;gap:9px}
  .lv3-unified .dash-page-head h1,.lv3-unified .rt-welcome-head h1{font-size:1.25rem}
  .lv3-unified .dash-page-head p,.lv3-unified .rt-welcome-head p{font-size:.77rem}
  .lv3-unified .dash-period-select{width:100%;min-height:42px}
  .lv3-unified .dash-stat-grid,.lv3-unified .rt-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .lv3-unified .rt-stat-card:first-child{grid-column:span 2}
  .lv3-unified .dash-stat-card,.lv3-unified .rt-stat-card{min-height:107px;padding:13px;grid-column:auto}
  .lv3-unified .dash-stat-main,.lv3-unified .rt-stat-top{flex-direction:column;align-items:flex-start;gap:8px}
  .lv3-unified .dash-stat-main small,.lv3-unified .rt-stat-top small{font-size:.74rem}
  .lv3-unified .dash-stat-main strong,.lv3-unified .rt-stat-top strong{font-size:1.5rem}
  .lv3-unified .dash-stat-icon,.lv3-unified .rt-stat-icon{width:38px;height:38px;flex-basis:38px}
  .lv3-unified .dash-stat-meta,.lv3-unified .rt-stat-meta{font-size:.65rem;margin-top:7px}
  .lv3-unified .dash-spark-wrap{opacity:.28;right:7px;bottom:6px;left:auto;max-width:65px}
  .lv3-unified .rt-stat-card:first-child .rt-stat-top{flex-direction:row;align-items:center}
  .lv3-unified .dash-grid-3,.lv3-unified .dash-grid-bottom,.lv3-unified .dash-grid-extra,.lv3-unified .rt-main-grid,.lv3-unified .rt-lower-grid,.lv3-unified .rt-extra-grid{display:grid;grid-template-columns:1fr;gap:11px}
  .lv3-unified .dash-panel,.lv3-unified .rt-panel{padding:14px;border-radius:16px}
  .lv3-unified .rt-report-big-icon{width:47px;height:47px;flex:0 0 47px;font-size:1.3rem}
  .lv3-unified .rt-report-status-body{flex-direction:row;align-items:flex-start}
  .lv3-unified .rt-report-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .lv3-unified .rt-report-actions .btn{font-size:.7rem;min-height:43px;padding:9px 6px}
  .lv3-unified .rt-change-grid{display:grid;grid-template-columns:1fr 1fr}
  .lv3-unified .rt-change-grid>div{min-height:73px;padding:8px;gap:7px;border-bottom:1px solid #eef2f6}
  .lv3-unified .rt-change-grid>div:nth-child(odd){border-right:1px solid #eef2f6!important}
  .lv3-unified .rt-change-grid>div:nth-child(even){border-right:0!important}
  .lv3-unified .rt-change-grid>div:nth-last-child(-n+2){border-bottom:0}
  .lv3-unified .rt-change-grid p{font-size:.72rem}
  .lv3-unified .rt-change-grid p strong{font-size:1.25rem}
  .lv3-unified .rt-change-layout{grid-template-columns:1fr;gap:9px}
  .lv3-unified .rt-need-report{padding:11px}
  .lv3-unified .rt-history-item{grid-template-columns:33px minmax(0,1fr) 15px}
  .lv3-unified .rt-history-item .status-pill{grid-column:2}
  .lv3-unified .rt-revision-alert{grid-template-columns:26px 1fr}
  .lv3-unified .dash-grid-bottom>:last-child,.lv3-unified .dash-grid-extra>:last-child{grid-column:auto}
  .lv3-unified .rt-period-card{width:auto;align-self:flex-start;min-height:37px}
  .lv3-unified .dash-main-chart{min-height:175px}
  .lv3-unified .dash-chart-panel{min-height:280px}
  .lv3-unified .penduduk-admin-hero{padding:16px}
  .lv3-unified .penduduk-summary-card{padding:12px}
  .lv3-unified .modal-dialog{margin:0;max-width:none;height:100dvh}
  .lv3-unified .modal-dialog:not(.modal-fullscreen-sm-down) .modal-content{max-height:100dvh}
  .lv3-unified .modal-dialog-scrollable .modal-content{max-height:100dvh}
  .lv3-unified .modal-content{border-radius:18px 18px 0 0}
  .lv3-unified .modal-header{padding:14px 16px}
  .lv3-unified .modal-body{padding:16px;overflow-y:auto;min-height:0;-webkit-overflow-scrolling:touch}
  .lv3-unified .modal-footer{padding:11px 15px calc(11px + env(safe-area-inset-bottom))}
  .lv3-unified .modal-footer .btn{min-height:46px;flex:1}
  .lv3-unified .form-control,.lv3-unified .form-select,.lv3-unified textarea{min-height:46px;font-size:16px}
  .lv3-unified .form-label{font-size:.85rem}
  .lv3-action-strip{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:13px}
  .lv3-action{flex-direction:column;align-items:center;text-align:center;justify-content:flex-start;gap:7px;padding:10px 4px;min-height:89px;font-size:.66rem;line-height:1.25;border-radius:14px}
  .lv3-action i{width:41px;height:41px;flex:0 0 41px;font-size:1.2rem;border-radius:12px}
  .lv3-bottomnav{position:fixed;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;z-index:1020;bottom:0;left:0;right:0;background:rgba(255,255,255,.985);border-top:1px solid #dce8f5;box-shadow:0 -8px 26px rgba(17,57,100,.08);padding:6px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));backdrop-filter:blur(12px)}
  .lv3-bottomnav>a,.lv3-bottomnav>button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;min-height:54px;min-width:0;padding:6px 2px;background:transparent;border:0;border-radius:13px;color:#73869a;text-decoration:none;font:700 .65rem 'Plus Jakarta Sans',sans-serif;line-height:1.2}
  .lv3-bottomnav i{font-size:1.22rem;line-height:1.2}
  .lv3-bottomnav>a.active,.lv3-bottomnav>button[aria-expanded=true]{background:#e9f3ff;color:#0968bd}
  .lv3-unified.sidebar-open .lv3-bottomnav{pointer-events:none}
  .lv3-unified.lv3-keyboard .lv3-bottomnav{transform:translateY(130%);pointer-events:none}
  .lv3-unified .rtv-bottom-nav{display:none!important}
  /* Mobile cards: the list remains a real table for print and desktop. */
  .lv3-unified .table-responsive.lv3-table-wrapper{overflow:visible!important;max-height:none!important}
  .lv3-unified table.lv3-mobile-cards{display:block!important;width:100%!important;min-width:0!important;max-width:100%;border:0!important;background:transparent!important}
  .lv3-unified table.lv3-mobile-cards thead{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .lv3-unified table.lv3-mobile-cards tbody{display:grid;grid-template-columns:1fr;gap:10px}
  .lv3-unified table.lv3-mobile-cards tr{display:block;min-width:0;padding:12px 12px 9px;background:#fff;border:1px solid #e1eafa;border-radius:15px;box-shadow:var(--lv3-shadow)}
  .lv3-unified table.lv3-mobile-cards tr.lv3-empty{padding:0;background:transparent;box-shadow:none}
  .lv3-unified table.lv3-mobile-cards tr.lv3-empty td{display:block!important}
  .lv3-unified table.lv3-mobile-cards td{display:none!important;position:static!important;min-width:0!important;max-width:none!important;width:auto!important;text-align:left!important;white-space:normal!important;text-overflow:clip!important;overflow:visible!important;box-shadow:none!important;border:0!important;padding:4px 0!important;background:transparent!important;font-size:.76rem!important;line-height:1.4}
  .lv3-unified table.lv3-mobile-cards tr:not(.lv3-empty) td.lv3-core-cell{display:flex!important;align-items:start;justify-content:space-between;gap:8px}
  .lv3-unified table.lv3-mobile-cards td.lv3-name-cell{display:flex!important;flex-direction:column;align-items:stretch;gap:5px;font-size:.88rem!important;font-weight:800;color:#153e60}
  .lv3-unified table.lv3-mobile-cards td.lv3-name-cell strong{font-size:.93rem}
  .lv3-unified table.lv3-mobile-cards td.lv3-action-cell{display:block!important;border-top:1px solid #ebf1f8!important;margin-top:8px;padding-top:9px!important}
  .lv3-unified table.lv3-mobile-cards td[data-lv3-label]::before{content:attr(data-lv3-label);font-size:.67rem;font-weight:700;color:#72889e;flex:0 0 38%;white-space:normal}
  .lv3-unified table.lv3-mobile-cards td.lv3-name-cell::before{display:none}
  .lv3-unified table.lv3-mobile-cards td.lv3-action-cell::before{display:none}
  .lv3-unified table.lv3-mobile-cards tr.lv3-expanded td:not(.lv3-empty-cell){display:flex!important;align-items:flex-start;gap:8px}
  .lv3-unified table.lv3-mobile-cards tr.lv3-expanded td.lv3-name-cell{display:flex!important;flex-direction:column;align-items:stretch}
  .lv3-unified table.lv3-mobile-cards tr.lv3-expanded td.lv3-action-cell{display:block!important}
  .lv3-unified table.lv3-mobile-cards td .d-flex{flex-wrap:wrap;justify-content:flex-start!important}
  .lv3-unified table.lv3-mobile-cards td .btn{min-width:39px;min-height:39px;margin:2px}
  .lv3-unified table.lv3-mobile-cards .lv3-card-expand{display:inline-flex!important}
  .lv3-card-expand{align-self:start;border:1px solid #d8e7f8;background:#f0f7ff;color:#196bad;border-radius:8px;font:700 .7rem 'Plus Jakarta Sans',sans-serif;padding:6px 9px;margin-top:4px}
  .lv3-unified table.lv3-mobile-cards .badge{font-size:.67rem}
  .lv3-unified .lampid-data-table-note{display:none}
  /* Older RT CSS forces 1230px tables with !important. Override at equal/higher
     specificity only AFTER JS has activated the card view. */
  body.rt-penduduk-page.lv3-unified.lampid-shell-body .penduduk-table-wrap.lv3-table-wrapper {
    overflow:visible!important;max-height:none!important;height:auto!important;
  }
  body.rt-penduduk-page.lv3-unified.lampid-shell-body table.penduduk-table.lv3-mobile-cards {
    display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;
    table-layout:auto!important;
  }
  body.rt-penduduk-page.lv3-unified.lampid-shell-body table.penduduk-table.lv3-mobile-cards td {
    white-space:normal!important;width:auto!important;max-width:none!important;
    padding:4px 0!important;font-size:.76rem!important;
  }
  body.rt-penduduk-page.lv3-unified.lampid-shell-body table.penduduk-table.lv3-mobile-cards td.lv3-name-cell {
    font-size:.88rem!important;
  }
  /* Laporan: compact, status and period visible without a scroll marathon. */
  .rt-report-refresh.lv3-unified .lampid-main{padding:12px 11px calc(95px + env(safe-area-inset-bottom))!important}
  .rt-report-refresh.lv3-unified .rtv-hero{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto;padding:13px 14px 14px;border-radius:16px;margin-bottom:10px;gap:0}
  .rt-report-refresh.lv3-unified .rtv-hero-identity{grid-column:1;grid-row:1;margin:0 0 8px}
  .rt-report-refresh.lv3-unified .rtv-hero-brand img{width:33px;height:33px}
  .rt-report-refresh.lv3-unified .rtv-hero-brand strong{font-size:.86rem}
  .rt-report-refresh.lv3-unified .rtv-hero-brand small{font-size:.59rem}
  .rt-report-refresh.lv3-unified .rtv-hero-area{font-size:.59rem;padding:5px 7px;max-width:47%}
  .rt-report-refresh.lv3-unified .rtv-hero-copy{grid-column:1;grid-row:2}
  .rt-report-refresh.lv3-unified .rtv-kicker{font-size:.58rem}
  .rt-report-refresh.lv3-unified .rtv-hero-copy h1{font-size:1.2rem;margin:3px 0}
  .rt-report-refresh.lv3-unified .rtv-hero-copy p{font-size:.69rem;margin:0 0 9px}
  .rt-report-refresh.lv3-unified .rtv-hero-status{grid-column:1;grid-row:3;display:flex;align-items:center;padding:9px 10px;gap:9px;border-radius:12px}
  .rt-report-refresh.lv3-unified .rtv-status-symbol{width:31px;height:31px;flex:0 0 31px;font-size:15px}
  .rt-report-refresh.lv3-unified .rtv-hero-status small{font-size:.6rem}
  .rt-report-refresh.lv3-unified .rtv-hero-status strong{font-size:.79rem}
  .rt-report-refresh.lv3-unified .rtv-hero-status span:last-child{font-size:.66rem;line-height:1.3}
  .rt-report-refresh.lv3-unified .rtv-hero-actions{grid-column:1;grid-row:4;display:grid;grid-template-columns:1.35fr .65fr;gap:8px;margin:9px 0 0}
  .rt-report-refresh.lv3-unified .rtv-hero-actions a{min-height:40px;padding:8px 6px;font-size:.69rem;border-radius:10px}
  .rt-report-refresh.lv3-unified .rtv-main-stat{min-height:86px;padding:10px}
  .rt-report-refresh.lv3-unified .rtv-event-stat{min-height:92px;padding:10px}
  .rt-report-refresh.lv3-unified .rtv-event-stat strong{font-size:1.3rem}
  .rt-report-refresh.lv3-unified .rtv-event-stat .rtv-event-icon{width:34px;height:34px;font-size:18px}
  .rt-report-refresh.lv3-unified .rt-period-info{display:none!important}
  .rt-report-refresh.lv3-unified .rtv-workflow{margin-bottom:11px}
  .rt-report-refresh.lv3-unified .rtv-step-card{min-height:65px}
  .rt-report-refresh.lv3-unified .rtv-step-list{gap:8px}
  .rt-report-refresh.lv3-unified .rtv-edit-label{margin:15px 3px 10px}
  .lv3-rw-list .table-responsive{overflow:visible}
}
@media(max-width:359.98px){
  .lv3-unified .lv3-action{font-size:.61rem;padding:8px 2px}
  .lv3-unified .dash-stat-main strong,.lv3-unified .rt-stat-top strong{font-size:1.35rem}
  .lv3-unified .lampid-topbar{padding-inline:8px}
  .lv3-unified .lv3-mobile-brand strong{font-size:.83rem}
  .rt-report-refresh.lv3-unified .rtv-hero-actions a{font-size:.65rem}
}
/* Modern login; completely separate from authenticated layouts. */
body.lv3-login{min-height:100dvh;margin:0;padding:0;background:#eef6fc;color:#193854;font-family:'Plus Jakarta Sans',system-ui,sans-serif}
.lv3-login-layout{display:grid;grid-template-columns:minmax(0,1.02fr) minmax(390px,.98fr);min-height:100dvh;max-width:1600px;margin:auto;background:#fff}
.lv3-login-showcase{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;padding:40px clamp(30px,5.5vw,82px);background:linear-gradient(145deg,#095b8c,#0d83ad 47%,#11a477);color:#fff}
.lv3-login-showcase:before{content:'';position:absolute;top:-175px;right:-100px;width:420px;height:420px;border-radius:50%;border:1px solid rgba(255,255,255,.19);box-shadow:0 0 0 65px rgba(255,255,255,.035),0 0 0 135px rgba(255,255,255,.03)}
.lv3-login-showcase:after{content:'';position:absolute;left:-100px;bottom:-180px;width:440px;height:420px;border-radius:50%;background:rgba(255,255,255,.035)}
.lv3-showcase-head{display:flex;align-items:center;gap:12px;position:relative;z-index:1}
.lv3-showcase-head img{object-fit:contain;border-radius:17px;background:#fff;padding:3px;box-shadow:0 10px 20px rgba(8,55,91,.12)}
.lv3-showcase-head>div{display:flex;flex-direction:column;gap:2px}
.lv3-showcase-head strong{font-size:1.45rem;line-height:1.1}
.lv3-showcase-head span{font-size:.85rem;color:#d4f9ef}
.lv3-showcase-main{position:relative;z-index:1;padding:50px 0}
.lv3-showcase-tag{display:inline-flex;align-items:center;gap:9px;padding:9px 14px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.09);border-radius:999px;font-size:.76rem;font-weight:700}
.lv3-showcase-main h1{font-size:clamp(2.4rem,4.3vw,4.7rem);font-weight:800;letter-spacing:-.055em;line-height:1.13;max-width:650px;margin:25px 0 16px}
.lv3-showcase-main h1 em{font-style:normal;color:#ffdb65}
.lv3-showcase-main p{max-width:490px;font-size:.99rem;line-height:1.8;color:#e5f7ff}
.lv3-showcase-icons{display:flex;gap:13px;margin-top:30px}
.lv3-showcase-icons span{display:grid;place-items:center;width:56px;height:56px;border-radius:18px;background:rgba(255,255,255,.13);font-size:1.6rem}
.lv3-showcase-icons span:nth-child(1){color:#ffd07a}.lv3-showcase-icons span:nth-child(2){color:#a6e7ff}.lv3-showcase-icons span:nth-child(3){color:#b9f8d0}.lv3-showcase-icons span:nth-child(4){color:#f6c8ff}
.lv3-showcase-foot{position:relative;z-index:1;color:#d1eaf8;font-size:.75rem}
.lv3-login-side{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:32px 24px}
.lv3-login-card{width:100%;max-width:438px;margin:auto 0;}
.lv3-login-mobile-head{display:none}
.lv3-login-eyebrow{display:inline-flex;align-items:center;gap:7px;color:#0b8e7b;font-size:.68rem;letter-spacing:.1em;font-weight:800}
.lv3-login-intro h2{font-size:clamp(1.8rem,2.7vw,2.4rem);font-weight:800;letter-spacing:-.03em;margin:12px 0 8px}
.lv3-login-intro p{color:#6f8191;font-size:.88rem;line-height:1.65;margin:0 0 24px}
.lv3-login-form .form-label{font-weight:800;font-size:.81rem;color:#254766;margin-bottom:8px}
.lv3-login-field{height:53px;display:flex;align-items:center;border-radius:13px;border:1px solid #dbe5f0;background:#f9fcff;transition:border-color .16s,box-shadow .16s}
.lv3-login-field:focus-within{border-color:#318fd9;box-shadow:0 0 0 4px rgba(49,143,217,.12)}
.lv3-login-field>i{flex:0 0 44px;text-align:center;font-size:1.13rem;color:#2f83b3}
.lv3-login-field input{border:0!important;outline:none!important;box-shadow:none!important;background:transparent!important;min-width:0;width:100%;font-size:16px;color:#1f4462;height:100%;padding:0 10px 0 0}
.lv3-login-field input::placeholder{color:#93a5b3}
.lv3-login-field button{flex:0 0 46px;align-self:stretch;border:0;background:transparent;color:#5587aa;font-size:1.1rem}
.lv3-login-submit{display:flex;justify-content:center;align-items:center;gap:12px;width:100%;min-height:54px;border:0;border-radius:14px;margin-top:24px;background:linear-gradient(105deg,#0c9d6e,#0d7897);box-shadow:0 9px 21px rgba(9,134,115,.23);color:#fff;font-weight:800;font-size:1rem}
.lv3-login-submit:hover{background:linear-gradient(105deg,#088b62,#0c6587)}
.lv3-login-help{margin:19px 0 15px;font-size:.75rem;color:#607a90;display:flex;gap:8px;line-height:1.5}
.lv3-login-roles{display:flex;gap:11px;flex-wrap:wrap;color:#47728e;font-size:.7rem;font-weight:700}
.lv3-login-roles>span{display:flex;gap:6px;align-items:center;padding:7px 10px;background:#eef8ff;border-radius:9px}
.lv3-login-roles i{color:#16a678}
.lv3-login-error{display:flex;gap:10px;align-items:flex-start;font-size:.8rem;border-radius:12px}
.lv3-login-copy{margin:22px 0 0;color:#95a5b4;font-size:.72rem}
@media(max-width:850px){.lv3-login-layout{grid-template-columns:minmax(0,1fr)}.lv3-login-showcase{display:none}.lv3-login-side{min-height:100dvh;padding:22px 20px;background:linear-gradient(155deg,#e8f9fc 0%,#f1f7ff 42%,#fff 100%)}.lv3-login-card{max-width:460px;padding:25px 22px 24px;border-radius:21px;background:#fff;box-shadow:0 16px 39px rgba(38,104,149,.13);border:1px solid #e1edf6}.lv3-login-mobile-head{display:flex;align-items:center;gap:11px;justify-content:center;margin:0 0 22px}.lv3-login-mobile-head img{width:68px;height:68px;object-fit:contain}.lv3-login-mobile-head div{display:flex;flex-direction:column}.lv3-login-mobile-head strong{font-size:1.42rem;line-height:1.1;color:#066d95}.lv3-login-mobile-head small{font-size:.75rem;color:#65849b}.lv3-login-intro h2{font-size:1.55rem}.lv3-login-intro p{font-size:.82rem;margin-bottom:19px}.lv3-login-copy{margin:12px 0 0}}
@media(max-width:440px){.lv3-login-side{padding:17px 13px}.lv3-login-card{padding:22px 18px}.lv3-login-mobile-head img{width:57px;height:57px}.lv3-login-intro h2{font-size:1.42rem}.lv3-login-field{height:50px}.lv3-login-submit{min-height:51px}.lv3-login-roles{justify-content:center}.lv3-login-help{font-size:.69rem}}
@media print{.lv3-bottomnav,.lv3-action-strip,.lv3-mobile-brand{display:none!important}.lv3-unified table.lv3-mobile-cards{display:table!important;min-width:0!important}.lv3-unified table.lv3-mobile-cards thead{position:static!important;width:auto;height:auto;overflow:visible;clip:auto}.lv3-unified table.lv3-mobile-cards tbody{display:table-row-group}.lv3-unified table.lv3-mobile-cards tr{display:table-row;border:0;box-shadow:none;padding:0}.lv3-unified table.lv3-mobile-cards td{display:table-cell!important}.lv3-card-expand{display:none!important}}

@media print{.lv3-unified table.lv3-mobile-cards .lv3-card-expand{display:none!important}}

/* UI-07: readable, touch-friendly mobile administration; leave print untouched. */
@media screen and (max-width:767.98px) {
  .lv3-unified .lampid-main .btn-sm,
  .lv3-unified .lampid-main .btn.btn-outline-warning,
  .lv3-unified .lampid-main .btn.btn-outline-danger {min-height:44px;}
  .lv3-unified .lampid-main .btn-sm {padding:9px 11px;}
  .lv3-unified .lampid-main :is(.form-select-sm,.form-control-sm) {min-height:44px;font-size:16px;}
  .lv3-unified table.lv3-mobile-cards tr {padding:12px 13px;}
  .lv3-unified table.lv3-mobile-cards td.lv3-core-cell {align-items:flex-start;}
  .lv3-unified table.lv3-mobile-cards td.lv3-core-cell:not(.lv3-name-cell) {overflow-wrap:anywhere;}
  .lv3-unified table.lv3-mobile-cards td.lv3-name-cell {font-size:.91rem!important;}
  .lv3-unified table.lv3-mobile-cards .lv3-card-expand {
    min-height:44px;align-items:center;justify-content:center;max-width:max-content;
    padding:9px 13px;margin-top:7px;font-size:.75rem;border-radius:11px;
  }
  .lv3-unified table.lv3-mobile-cards td.lv3-action-cell .btn {
    min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;
  }
  .lv3-unified table.lv7-verify-cards td.lv3-name-cell {
    border-bottom:1px solid #e5edf6!important;padding-bottom:8px!important;
  }
  .lv3-unified table.lv7-verify-cards td.lv3-name-cell::after {
    content:'Wilayah pengirim laporan';display:block;color:#678099;font-size:.64rem;font-weight:500;
  }
  .lv3-unified .lv7-matrix-hint {font-size:.74rem;font-weight:700;margin:8px 0;
    padding:10px 12px;background:#e7f3ff;border:1px solid #cde6fc;border-radius:11px;color:#1a5f95;}
  .lv3-unified .lv7-matrix-wrapper {width:100%;max-width:100%;max-height:none!important;
    overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;outline-offset:2px;border:1px solid #e2ebf4;border-radius:10px;}
  .lv3-unified .lv7-matrix-wrapper table.table {min-width:1100px!important;table-layout:auto!important;
    width:max-content!important;max-width:none!important;font-size:.8rem;}
  .lv3-unified .lv7-matrix-wrapper table.table th,
  .lv3-unified .lv7-matrix-wrapper table.table td {white-space:nowrap!important;min-width:53px;padding:9px 8px!important;font-size:.8rem!important;}
  .lv3-unified .lv7-matrix-wrapper table.table thead th:first-child,
  .lv3-unified .lv7-matrix-wrapper table.table tbody td:first-child:not([colspan]) {
    position:sticky;left:0;z-index:1;background:#fff;min-width:65px;box-shadow:2px 0 4px rgba(22,49,73,.08);
  }
  .lv3-unified .lv7-matrix-wrapper table.table thead th:first-child {z-index:3;background:#eaf4fc;}
  .lv3-unified .lv7-matrix-wrapper table.table tbody tr.table-success td:first-child:not([colspan]) {background:#d8eee3;}
  .lv3-unified .lv7-region-form button {min-width:44px;min-height:44px;}
  .lv3-unified .lv7-region-title {font-size:.8rem;font-weight:600;margin:0 0 8px;}
  .lv3-unified .lv7-region-add-rt {display:grid;grid-template-columns:1fr 1fr;}
  .lv3-unified .lv7-region-add-rt > .col-4 {width:auto;grid-column:1;}
  .lv3-unified .lv7-region-add-rt > .col-5 {width:auto;grid-column:2;}
  .lv3-unified .lv7-region-add-rt > .col-3 {width:auto;grid-column:1 / -1;}
}
/* Put the resident name / RT identity first, even when the original HTML table
   has the KK, region, or row number in earlier desktop columns. */
@media screen and (max-width:767.98px) {
  .lv3-unified table.lv3-mobile-cards:is(.lv7-resident-cards,.lv7-verify-cards) tr:not(.lv3-empty) {
    display:flex!important;flex-direction:column;gap:2px;
  }
  .lv3-unified table.lv3-mobile-cards:is(.lv7-resident-cards,.lv7-verify-cards) tr:not(.lv3-empty) td.lv3-name-cell {
    order:-5;display:flex!important;flex-direction:row;align-items:center;justify-content:space-between;
    flex-wrap:wrap;column-gap:12px;row-gap:4px;font-size:.92rem!important;
    margin-bottom:3px;padding-bottom:7px!important;border-bottom:1px solid #e4edf6!important;
  }
  .lv3-unified table.lv3-mobile-cards:is(.lv7-resident-cards,.lv7-verify-cards) tr:not(.lv3-empty) td.lv3-name-cell .lv3-card-expand {
    margin-top:0;
  }
  .lv3-unified table.lv3-mobile-cards:is(.lv7-resident-cards,.lv7-verify-cards) tr.lv3-expanded td.lv3-name-cell {
    display:flex!important;flex-direction:row;align-items:center;
  }
  .lv3-unified table.lv7-verify-cards td.lv3-name-cell::after {display:none;}
}
@media screen and (max-width:390px) {
  .lv3-unified .lv7-region-add-rt {grid-template-columns:1fr;}
  .lv3-unified .lv7-region-add-rt > .col-4,
  .lv3-unified .lv7-region-add-rt > .col-5,
  .lv3-unified .lv7-region-add-rt > .col-3 {grid-column:1;width:100%;}
}
