*{box-sizing:border-box}body{margin:0;font-family:Arial,sans-serif;background:#f4f7f4;color:#26352b}.overlay{position:fixed;inset:0;background:linear-gradient(135deg,rgba(5,65,38,.9),rgba(30,110,64,.75));z-index:10;display:flex;align-items:center;justify-content:center;padding:20px}.login-card{width:min(430px,100%);background:#fff;padding:36px;border-radius:22px;text-align:center;box-shadow:0 20px 60px #0005}.logo{font-size:54px}.login-card h1{color:#0c6037;margin:8px}.login-card p{color:#667}.login-card input{width:100%;padding:13px;margin:7px 0;border:1px solid #d7e0d8;border-radius:9px}.login-card button{width:100%;padding:13px;border:0;border-radius:9px;font-weight:bold;cursor:pointer}.login-card form button,.primary{background:#16733f;color:#fff}.guest,.secondary{background:#e9f1eb!important;color:#17653a!important;margin-top:10px}.login-card small{display:block;margin-top:16px;color:#7b857d}.app{display:flex;min-height:100vh}.sidebar{width:260px;background:#075b35;color:#fff;padding:20px 14px;position:fixed;height:100vh;display:flex;flex-direction:column}.brand{display:flex;gap:10px;align-items:center;padding:8px 10px 24px}.brand span{font-size:30px}.brand small{display:block;font-size:10px;opacity:.75;margin-top:4px}nav{display:grid;gap:5px}.nav{border:0;background:transparent;color:#e7f4eb;text-align:left;padding:13px;border-radius:8px;cursor:pointer}.nav:hover,.nav.active{background:#fff;color:#075b35}.user-box{margin-top:auto;border:1px solid #ffffff33;padding:12px;border-radius:10px;font-size:12px}.user-box span{display:block;opacity:.75;margin:4px 0 8px}.user-box button{width:100%;background:#ffffff18;border:1px solid #ffffff33;color:white;padding:8px;border-radius:6px;cursor:pointer}main{margin-left:260px;width:calc(100% - 260px);padding:0 28px 35px}header{height:76px;display:flex;align-items:center;justify-content:space-between;background:#fff;margin:0 -28px 24px;padding:0 28px;box-shadow:0 1px 8px #0000000b}#pageTitle{font-size:24px;font-weight:bold}.header-right{display:flex;align-items:center;gap:15px;font-size:13px}.badge{padding:7px 10px;border-radius:20px;font-size:10px;font-weight:bold}.badge.view{background:#fff0cf;color:#8a6200}.badge.edit{background:#dff3e5;color:#0a6b39}.page{display:none}.page.active{display:block}.intro h2,.section-head h2,.page>h2{margin:0 0 7px}.intro p,.muted,.section-head p{color:#718077;margin-top:0}.stats{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin:20px 0}.stat,.panel,.form-card{background:#fff;border:1px solid #e1e9e2;border-radius:14px;box-shadow:0 3px 12px #00000008}.stat{padding:17px;display:flex;gap:12px;align-items:flex-start}.stat>span{font-size:24px;background:#e8f5ec;padding:8px;border-radius:9px}.stat small,.stat em{display:block;color:#78857c;font-size:11px}.stat strong{font-size:26px;margin:6px 0;display:block}.cards-grid{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:15px}.panel{padding:18px}.panel h3{margin-top:0;font-size:15px}.bar-chart{height:230px;display:flex;align-items:end;gap:12px;padding-top:25px;border-bottom:1px solid #dce5de}.bar{flex:1;text-align:center;font-size:10px;display:flex;flex-direction:column;justify-content:end;height:100%}.bar i{display:block;background:linear-gradient(#2d9661,#0c6037);border-radius:5px 5px 0 0;margin:5px 0 0}.commodity-row{display:flex;justify-content:space-between;padding:11px 0;border-bottom:1px solid #edf1ee}.donut-wrap{display:flex;align-items:center;gap:18px}.donut{width:145px;height:145px;border-radius:50%;display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;background:conic-gradient(#168147 var(--percent),#f0b323 0 calc(var(--percent) + 12%),#e85b4f 0)}.donut:before{content:"";position:absolute;width:98px;height:98px;background:#fff;border-radius:50%}.donut b,.donut span{position:relative}.donut b{font-size:24px}.donut span{font-size:10px;color:#687}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.primary,.secondary{border:0;border-radius:7px;padding:11px 16px;cursor:pointer;font-weight:bold}.toolbar{display:flex;gap:10px;margin-bottom:15px}.toolbar input,.toolbar select{padding:11px;border:1px solid #d9e2db;border-radius:7px;background:#fff}.toolbar input{flex:1}.table-wrap{background:#fff;border:1px solid #e0e8e1;border-radius:12px;overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th{background:#edf6ef;color:#40604b;text-align:left}th,td{padding:12px;border-bottom:1px solid #edf1ee;white-space:nowrap}.status{padding:4px 8px;border-radius:15px;font-size:11px;font-weight:bold}.aktif{background:#e2f4e8;color:#137340}.nonaktif{background:#f9e4e2;color:#a23c34}.verified{background:#e1f3e8;color:#12723e}.process{background:#fff0cf;color:#946300}.unverified{background:#fbe2e0;color:#ad443c}.icon-btn{border:0;background:#eef5ef;padding:6px 8px;border-radius:5px;cursor:pointer;margin-right:4px}.icon-btn.delete{background:#fde9e8}.form-card{padding:24px;max-width:950px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-grid label{font-size:12px;font-weight:bold;color:#425348}.form-grid input,.form-grid select,.form-grid textarea{display:block;width:100%;margin-top:6px;padding:11px;border:1px solid #d8e1d9;border-radius:7px;font:inherit}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.commodity-cards,.report-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.commodity-card,.report-btn{background:#fff;border:1px solid #e0e8e1;border-radius:13px;padding:22px;text-align:left}.commodity-card strong{font-size:32px;color:#12693a;display:block;margin:8px 0}.map-grid{background:linear-gradient(135deg,#e7f4e8,#d2ead6);border-radius:18px;padding:30px;display:grid;grid-template-columns:repeat(3,1fr);gap:20px;min-height:430px}.map-pin{background:#fff;border-radius:50%;width:125px;height:125px;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 6px 15px #0001}.map-pin b{font-size:26px;color:#08723e}.report-btn{cursor:pointer;display:flex;flex-direction:column;gap:10px;font-size:15px}.report-btn:hover{transform:translateY(-2px);box-shadow:0 6px 20px #00000010}.modal{display:none;position:fixed;inset:0;background:#0007;z-index:20;align-items:center;justify-content:center;padding:20px}.modal.show{display:flex}.modal-content{background:white;border-radius:15px;max-width:650px;width:100%;max-height:80vh;overflow:auto;padding:28px;position:relative}.modal-content>button{position:absolute;right:12px;top:8px;border:0;background:none;font-size:28px;cursor:pointer}#toast{position:fixed;right:22px;bottom:22px;background:#126b3c;color:#fff;padding:14px 18px;border-radius:8px;transform:translateY(100px);transition:.3s;z-index:30}#toast.show{transform:translateY(0)}.mobile-menu{display:none;border:0;background:none;font-size:22px}@media(max-width:1100px){.stats{grid-template-columns:repeat(3,1fr)}.cards-grid{grid-template-columns:1fr}.commodity-cards,.report-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:750px){.sidebar{transform:translateX(-100%);transition:.3s;z-index:15}.sidebar.show{transform:translateX(0)}main{margin-left:0;width:100%;padding:0 14px 25px}header{margin:0 -14px 20px;padding:0 14px}.mobile-menu{display:inline;margin-right:10px}.stats{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:1fr}.commodity-cards,.report-grid{grid-template-columns:1fr}.header-right #today{display:none}}
/* Dashboard layout refinements */
main{min-width:0}
.sidebar{width:272px;padding:22px 16px}
main{margin-left:272px;width:calc(100% - 272px);padding:0 32px 40px}
header{margin:0 -32px 28px;padding:0 32px;min-height:78px;height:auto;gap:18px}
#pageTitle{line-height:1.25}
.intro h2{font-size:clamp(23px,2vw,30px);line-height:1.25}
.intro p{line-height:1.5;margin-bottom:0}
.stats{grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:16px;margin:24px 0}
.stat{min-width:0;min-height:112px;padding:18px;align-items:center}
.stat>span{flex:0 0 52px;width:52px;height:52px;display:grid;place-items:center;font-size:23px}
.stat>div{min-width:0}
.stat small{font-size:13px;line-height:1.35}
.stat strong{font-size:28px;line-height:1.1;margin:7px 0}
.stat em{font-size:12px}
.cards-grid{grid-template-columns:minmax(0,1.25fr) minmax(220px,.9fr) minmax(280px,1.1fr);gap:18px;align-items:stretch}
.panel{min-width:0;padding:22px}
.panel h3{font-size:17px;line-height:1.35;margin-bottom:16px}
.bar-chart{min-height:230px;gap:clamp(8px,1.5vw,18px)}
.donut-wrap{gap:16px;flex-wrap:wrap;justify-content:center}
#verifySummary{min-width:140px;flex:1}
#verifySummary p{line-height:1.4;margin:9px 0;color:#526257}
.header-right{flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:1200px){
  main{padding-left:24px;padding-right:24px}
  header{margin-left:-24px;margin-right:-24px;padding-left:24px;padding-right:24px}
  .cards-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cards-grid>.panel:first-child{grid-column:1/-1}
}
@media(max-width:750px){
  .sidebar{width:min(300px,86vw);padding:20px 14px}
  main{margin-left:0;width:100%;padding:0 16px 28px}
  header{margin:0 -16px 22px;padding:12px 16px;min-height:68px;gap:8px}
  header>div:first-child{display:flex;align-items:center;min-width:0}
  #pageTitle{font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-menu{flex:0 0 auto;margin-right:8px}
  .header-right{gap:7px}
  .badge{font-size:9px;padding:6px 8px;white-space:nowrap}
  .intro h2{font-size:23px}
  .intro p{font-size:14px}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}
  .stat{min-height:100px;padding:13px;gap:10px}
  .stat>span{flex-basis:42px;width:42px;height:42px;font-size:20px}
  .stat small{font-size:11px}
  .stat strong{font-size:23px}
  .cards-grid{grid-template-columns:minmax(0,1fr);gap:12px}
  .cards-grid>.panel:first-child{grid-column:auto}
  .panel{padding:18px}
  .panel h3{font-size:16px}
  .bar-chart{height:200px;min-height:200px;gap:8px;padding-top:15px}
  .donut-wrap{justify-content:flex-start}
}
@media(max-width:390px){
  .stats{grid-template-columns:minmax(0,1fr)}
  .stat{min-height:86px}
  .header-right .badge{max-width:112px;overflow:hidden;text-overflow:ellipsis}
  #pageTitle{font-size:16px}
}

/* Keep sidebar actions reachable on short screens */
.sidebar{height:100vh;height:100dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ffffff55 transparent}
.sidebar::-webkit-scrollbar{width:6px}
.sidebar::-webkit-scrollbar-thumb{background:#ffffff55;border-radius:8px}
.user-box{flex-shrink:0}
.donut.is-empty{background:#e3e8e4}

/* Spreadsheet import controls */
.data-actions,.import-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.data-actions .secondary{margin-top:0}
.import-panel{margin:0 0 16px;padding:16px;background:#fff;border:1px solid #dfe8e1;border-radius:12px}
.import-panel[hidden]{display:none}
.import-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.import-summary p{margin:5px 0 0}
.import-issues{padding:10px 12px;background:#fff5df;border-radius:8px;color:#76520a;font-size:13px;line-height:1.5}
.import-issues[hidden]{display:none}
.import-panel .table-wrap{max-height:260px}
#importPreviewBody td{white-space:normal}
@media(max-width:750px){
  .section-head{align-items:flex-start;flex-direction:column;gap:12px}
  .data-actions{justify-content:flex-start;width:100%}
  .import-summary{align-items:flex-start;flex-direction:column}
  .import-actions{justify-content:flex-start}
}

/* Administrative district maps */
.district-map{min-width:0}
.district-map-frame{position:relative;width:100%;overflow:hidden;border-radius:12px;background:#f6f9f6}
.district-map-svg{display:block;width:100%;height:auto;max-height:72vh}
.district-feature{cursor:pointer;outline:none}
.district-feature path{fill:#dfe4e1;stroke:#fff;stroke-width:1.8;vector-effect:non-scaling-stroke;transition:fill .15s ease,filter .15s ease}
.district-feature.has-data path{fill:#2d9661}
.district-feature:hover path,.district-feature:focus path{fill:#0c6037;filter:drop-shadow(0 1px 2px #203a2880)}
.district-feature.empty:hover path,.district-feature.empty:focus path{fill:#aab5ad}
.district-label{fill:#173e2a;font-size:13px;font-weight:700;text-anchor:middle;dominant-baseline:middle;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round;pointer-events:none}
.district-map-tooltip{position:absolute;z-index:2;max-width:210px;padding:9px 12px;border-radius:8px;background:#173e2a;color:#fff;font-size:12px;font-weight:700;line-height:1.4;box-shadow:0 4px 14px #0003;pointer-events:none;white-space:nowrap}
.district-map-tooltip[hidden]{display:none}
.district-map-legend{display:flex;justify-content:center;gap:20px;flex-wrap:wrap;margin-top:14px;color:#58665c;font-size:13px}
.district-map-legend span{display:flex;align-items:center;gap:7px}
.legend-swatch{display:inline-block;width:13px;height:13px;border-radius:3px;background:#dfe4e1;border:1px solid #cbd4cd}
.legend-swatch.has-data{background:#2d9661;border-color:#2d9661}
.dashboard-map-panel{display:flex;flex-direction:column}
.dashboard-map-panel .district-map-frame{flex:1;display:flex;align-items:center}
.district-map-compact .district-map-frame{min-height:205px}
.district-map-compact .district-map-svg{max-height:250px}
.district-map-full .district-map-frame{max-width:900px;margin:20px auto 0;border:1px solid #e1e9e2}
.district-map-full .district-map-svg{max-height:72vh}
/* Page headings are already shown in each page's content. */
header>div:first-child{display:none}
header #pageTitle{display:none}
@media(max-width:750px){
  .district-map-full{overflow-x:auto;padding-bottom:4px}
  .district-map-full .district-map-frame{width:560px;max-width:none;margin:14px 0 0}
  .district-map-full .district-map-svg{max-height:none}
  .district-map-legend{justify-content:flex-start;font-size:12px;gap:14px}
  .district-map-compact .district-map-frame{min-height:180px}
}
.spreadsheet-link{display:inline-flex;align-items:center;text-decoration:none}
.import-help{margin:-5px 0 14px;color:#718077;font-size:13px;line-height:1.5}
@media(max-width:750px){.input-data-actions{width:100%}}

/* Branding and consistent line icons */
.login-logo{display:block;width:112px;height:112px;object-fit:contain;margin:0 auto 8px}
.brand img{display:block;flex:0 0 48px;width:48px;height:50px;object-fit:contain}
.nav{display:flex;align-items:center;gap:11px;min-height:46px;font-weight:600}
.icon{display:inline-block;width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav .icon{width:19px;height:19px;flex-basis:19px}
.stat>span.stat-icon{display:grid;place-items:center;flex:0 0 50px;width:50px;height:50px;padding:0;color:#147443}
.stat-icon .icon{width:25px;height:25px;stroke-width:1.9}
.report-btn>.icon{width:27px;height:27px;color:#147443}
.commodity-card>.icon{width:25px;height:25px;color:#147443}
.icon-btn .icon{width:17px;height:17px;vertical-align:middle}
.verify-dot{display:inline-block;width:9px;height:9px;margin-right:5px;border-radius:50%;vertical-align:1px}
.verify-dot.green{background:#23a36a}.verify-dot.amber{background:#e6a923}.verify-dot.red{background:#d9544d}

/* Government identity marks and public activity gallery */
.agency-brand{display:flex;align-items:center;gap:10px;min-width:0;color:#18452e;text-align:left}
.agency-brand>img{display:block;flex:0 0 auto;width:42px;height:42px;object-fit:contain}
.agency-copy{display:flex;flex-direction:column;gap:2px;min-width:0;line-height:1.2}
.agency-copy strong{font-size:13px;font-weight:800;white-space:nowrap}
.agency-copy span{font-size:10px;color:#607066;white-space:nowrap}
.agency-brand-login{justify-content:center;max-width:100%;margin:0 auto 20px;padding:10px 12px;border-radius:14px;background:#f2f7f3}
.login-card{max-height:calc(100dvh - 32px);overflow-y:auto}
.agency-brand-login>img{width:48px;height:48px}
.agency-brand-login .agency-copy strong{font-size:14px}
.agency-brand-login .agency-copy span{font-size:11px}
.header-right .agency-brand-header{padding-left:14px;border-left:1px solid #e4ebe5}
.header-right .agency-brand-header>img{width:38px;height:38px}
.gallery-panel{margin-top:22px;padding:22px;overflow:hidden}
.gallery-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}
.gallery-heading h3{margin:0;color:#173e2a}
.gallery-heading p{margin:6px 0 0;color:#758279;font-size:13px}
.gallery-upload{display:flex;flex-direction:column;align-items:flex-end;gap:5px;flex:0 0 auto}
.gallery-upload button{padding:10px 16px;border:0;border-radius:10px;font-weight:700;cursor:pointer}
.gallery-upload button:disabled{opacity:.65;cursor:wait}
.gallery-upload small{color:#7b857d;font-size:11px}
.gallery-viewer{position:relative;min-height:320px;overflow:hidden;border-radius:16px;background:linear-gradient(135deg,#e9f1eb,#dce9df)}
.gallery-track{display:flex;width:100%;height:clamp(280px,42vw,480px);transition:transform .7s cubic-bezier(.22,.68,0,1)}
.gallery-slide{position:relative;flex:0 0 100%;min-width:0;height:100%;background:#e4ece6}
.gallery-slide img{display:block;width:100%;height:100%;object-fit:cover}
.gallery-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:24px;color:#68776c;text-align:center}
.gallery-empty[hidden],.gallery-controls[hidden],.gallery-caption[hidden]{display:none}
.gallery-empty strong{color:#294a36;font-size:16px}
.gallery-empty-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:#fff;color:#18804a;font-size:28px}
.gallery-caption{position:absolute;right:0;bottom:0;left:0;padding:48px 20px 17px;background:linear-gradient(transparent,#071a10bd);color:#fff;font-size:13px;font-weight:650}
.gallery-controls{position:absolute;right:14px;bottom:12px;z-index:1;display:flex;align-items:center;gap:8px;color:#fff}
.gallery-controls button{display:grid;place-items:center;width:36px;height:36px;border:1px solid #ffffff70;border-radius:50%;background:#102b1ca8;color:#fff;font-size:23px;line-height:1;cursor:pointer;backdrop-filter:blur(6px)}
.gallery-controls button:hover,.gallery-controls button:focus-visible{background:#0b6539;outline:2px solid #fff;outline-offset:2px}
.gallery-controls #galleryPause{font-size:15px}
.gallery-controls span{min-width:45px;text-align:center;font-size:12px;text-shadow:0 1px 4px #000}
@media(max-width:1050px){.header-right .agency-brand-header .agency-copy span{display:none}.header-right .agency-brand-header>img{width:34px;height:34px}}
@media(max-width:750px){
  header{flex-wrap:wrap}
  .header-right{flex:1 0 100%;justify-content:space-between}
  .agency-brand-login{justify-content:flex-start;padding:9px 10px}
  .agency-brand-login>img{width:42px;height:42px}
  .agency-brand-login .agency-copy span{white-space:normal}
  .header-right .agency-brand-header{padding-left:8px;gap:5px}
  .header-right .agency-brand-header>img{width:30px;height:30px}
  .header-right .agency-brand-header .agency-copy{display:flex;max-width:min(150px,calc(100vw - 230px))}
  .header-right .agency-brand-header .agency-copy strong{font-size:10px}
  .header-right .agency-brand-header .agency-copy span{display:block;font-size:8px;white-space:normal}
  .gallery-panel{margin-top:16px;padding:16px}
  .gallery-heading{align-items:flex-start;flex-direction:column;gap:12px}
  .gallery-upload{align-items:flex-start}
  .gallery-viewer{min-height:230px;border-radius:12px}
  .gallery-track{height:clamp(210px,62vw,340px)}
  .gallery-caption{padding:38px 14px 13px;font-size:12px}
  .gallery-controls{right:9px;bottom:8px;gap:5px}
  .gallery-controls button{width:32px;height:32px}
}
@media(prefers-reduced-motion:reduce){.gallery-track{transition:none}}

/* Square photo cards move in a compact horizontal row. */
.donut{background:conic-gradient(#168147 0 var(--verified-percent,0%),#f0b323 0 var(--process-end,0%),#e85b4f 0 100%)}
.donut.is-empty{background:#e3e8e4}
.gallery-panel{padding:18px}
.gallery-toolbar{display:flex;justify-content:flex-end;align-items:flex-end;gap:12px;margin-bottom:14px}
.gallery-toolbar>label{display:flex;flex-direction:column;gap:5px;width:min(320px,100%);color:#42564a;font-size:12px;font-weight:700}
.gallery-toolbar input[type=text]{width:100%;padding:10px 12px;border:1px solid #d5e1d7;border-radius:9px;font:inherit;font-weight:400}
.gallery-toolbar>div{display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.gallery-toolbar button{white-space:nowrap}
.gallery-toolbar small{color:#7b857d;font-size:11px}
.gallery-viewer{width:100%;max-width:1080px;min-height:220px;height:auto;margin:0 auto;padding:3px 0 0;background:transparent;overflow:hidden}
.gallery-track{--gallery-visible:3;display:flex;gap:16px;width:100%;height:auto;transition:transform .65s cubic-bezier(.22,.68,0,1)}
.gallery-slide{flex:0 0 calc((100% - 32px)/3);min-width:0;height:auto;background:transparent}
.gallery-slide img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:12px;background:#e4ece6}
.gallery-photo-title{margin:9px 2px 3px;color:#294a36;font-size:14px;font-weight:700;line-height:1.35;text-align:center;overflow-wrap:anywhere}
.gallery-empty{min-height:214px}
.gallery-controls{top:8px;right:8px;bottom:auto;left:auto;justify-content:flex-end;padding:4px 6px;border-radius:24px;background:#102b1ca8;backdrop-filter:blur(6px);pointer-events:none}
.gallery-controls button,.gallery-controls span{pointer-events:auto}
.gallery-controls span{min-width:40px}
.gallery-controls button{box-shadow:0 2px 8px #0003}
#laporan .report-grid{grid-template-columns:minmax(260px,360px)}
@media(max-width:950px){
  .gallery-track{--gallery-visible:2}
  .gallery-slide{flex-basis:calc((100% - 16px)/2)}
}
@media(max-width:560px){
  .gallery-toolbar{align-items:stretch;flex-direction:column}
  .gallery-toolbar>label{width:100%}
  .gallery-toolbar>div{align-items:flex-start}
  .gallery-track{--gallery-visible:1}
  .gallery-slide{flex-basis:100%}
  #laporan .report-grid{grid-template-columns:1fr}
}

/* Certificate status chart and editor photo controls */
.verification-panel{display:flex;flex-direction:column;gap:2px}
.verification-panel .chart-divider{height:1px;width:100%;margin:8px 0 12px;background:#e8eee9}
.verification-panel .donut-wrap{justify-content:flex-start;flex-wrap:nowrap;gap:15px}
.verification-panel .donut{flex:0 0 112px;width:112px;height:112px}
.verification-panel .donut:before{width:76px;height:76px}
.verification-panel .donut b{font-size:21px}
.verification-panel .donut span{font-size:9px;text-align:center}
.donut-certification{background:conic-gradient(#168147 0 var(--certified-percent,0%),#e85b4f 0 100%)}
.donut-certification.is-empty{background:#e3e8e4}
#verifySummary,#certificateSummary{min-width:0;font-size:12px;color:#52665a}
#verifySummary p,#certificateSummary p{margin:6px 0;line-height:1.35}
.certificate-details-field[hidden]{display:none!important}
.gallery-slide{position:relative}
.gallery-delete{position:absolute;top:8px;right:8px;z-index:2;display:grid;place-items:center;width:34px;height:34px;border:1px solid #ffffffb3;border-radius:50%;background:#8f2825e8;color:#fff;font-size:24px;line-height:1;box-shadow:0 2px 8px #0004;cursor:pointer}
.gallery-delete:hover,.gallery-delete:focus-visible{background:#bd302b;outline:2px solid #fff;outline-offset:2px}
.report-btn{min-height:125px}
.stat-action{display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;width:100%;border:1px solid #e1e9e2;color:inherit;text-align:left;font:inherit;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.stat-action:hover,.stat-action:focus-visible{transform:translateY(-2px);border-color:#8ac5a0;box-shadow:0 7px 18px #00000012;outline:none}
.stat-action>span:last-child{display:block;min-width:0;width:auto;height:auto;padding:0;border-radius:0;background:transparent;font-size:inherit;line-height:1.35}
.stat-action small,.stat-action strong,.stat-action em{max-width:100%;overflow-wrap:normal;white-space:normal}
.stat-action em{margin-top:3px}
.update-queue-panel{margin-top:16px}
.update-queue-panel[hidden]{display:none!important}
.update-queue-panel .section-head{margin-bottom:4px}
.update-queue-panel .section-head h3{margin-bottom:5px}
.update-queue-panel .section-head p{margin-bottom:0}
.update-instructions{margin:12px 0 16px;padding:12px 14px;border-left:3px solid #27965e;border-radius:5px;background:#f0f7f1;color:#51665a;font-size:13px;line-height:1.5}
.update-record-button{padding:8px 12px;font-size:12px;white-space:nowrap}
@media(max-width:750px){
  .verification-panel .donut-wrap{justify-content:center}
  .verification-panel .donut{flex-basis:104px;width:104px;height:104px}
  .verification-panel .donut:before{width:70px;height:70px}
}

/* Consistent layouts for every page on phones and narrow tablets. */
@media(max-width:750px){
  html,body{max-width:100%;overflow-x:hidden}
  .app{width:100%;min-width:0}
  main{width:100%;min-width:0;margin:0;padding:0 14px calc(28px + env(safe-area-inset-bottom))}
  header{display:flex;flex-direction:column;align-items:stretch;gap:9px;margin:0 -14px 20px;padding:10px 14px 12px;min-height:0}
  header>div:first-child{width:100%;min-width:0;align-items:flex-start}
  #pageTitle{min-width:0;flex:1;font-size:16px;line-height:1.3;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}
  .mobile-menu{margin:0 7px 0 0;padding:2px;line-height:1}
  .header-right{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;justify-content:initial;gap:7px 9px;width:100%;flex:0 0 auto;min-width:0}
  .header-right #accessBadge{grid-column:1;grid-row:1;justify-self:start;max-width:none}
  .header-right #today{display:block;grid-column:2;grid-row:1;justify-self:end;text-align:right;font-size:10px;white-space:nowrap}
  .header-right .agency-brand-header{grid-column:1/-1;grid-row:2;justify-self:center;width:max-content;max-width:100%;padding:6px 0 0;border-left:0;border-top:1px solid #e4ebe5}
  .header-right .agency-brand-header>img{width:32px;height:32px}
  .header-right .agency-brand-header .agency-copy{max-width:220px}
  .header-right .agency-brand-header .agency-copy strong{font-size:10px}
  .header-right .agency-brand-header .agency-copy span{display:block;font-size:8px;white-space:normal}
  .intro{margin-bottom:2px}
  .intro h2{font-size:22px;line-height:1.25;overflow-wrap:anywhere}
  .intro p{font-size:13px;line-height:1.5}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:16px 0}
  .stat{min-width:0;min-height:94px;padding:11px;gap:8px;align-items:center}
  .stat>span.stat-icon{flex-basis:38px;width:38px;height:38px}
  .stat-icon .icon{width:21px;height:21px}
  .stat small{font-size:10px;line-height:1.3}
  .stat strong{font-size:22px;margin:5px 0}
  .stat em{font-size:10px;line-height:1.25}
  .stat-action{grid-template-columns:38px minmax(0,1fr);padding:11px}
  .stat-action>span:last-child{width:auto;height:auto;min-width:0}
  .stat-action em{overflow-wrap:anywhere}
  .cards-grid{grid-template-columns:minmax(0,1fr);gap:11px}
  .cards-grid>.panel:first-child{grid-column:auto}
  .panel{min-width:0;padding:15px;border-radius:13px}
  .panel h3{font-size:15px;line-height:1.35;margin-bottom:12px}
  .dashboard-map-panel .district-map-frame{min-height:160px}
  .district-map-compact .district-map-svg{max-height:220px}
  .commodity-row{gap:10px;padding:10px 0;font-size:13px}
  .commodity-row span{min-width:0;overflow-wrap:anywhere}
  .verification-panel .donut-wrap{justify-content:flex-start;gap:12px}
  .verification-panel .donut{flex-basis:96px;width:96px;height:96px}
  .verification-panel .donut:before{width:65px;height:65px}
  .verification-panel .donut b{font-size:19px}
  #verifySummary,#certificateSummary{flex:1;font-size:11px}
  #verifySummary p,#certificateSummary p{margin:5px 0;line-height:1.35}
  .update-queue-panel{margin-top:12px}
  .update-instructions{font-size:12px;padding:10px 11px}
  .gallery-panel{margin-top:12px;padding:14px}
  .gallery-toolbar{align-items:stretch;flex-direction:column;gap:10px}
  .gallery-toolbar>label{width:100%;font-size:12px}
  .gallery-toolbar>div{align-items:flex-start}
  .gallery-toolbar button{width:100%}
  .gallery-toolbar small{line-height:1.4}
  .gallery-viewer{min-height:0;padding-top:0}
  .gallery-track{--gallery-visible:1;gap:0}
  .gallery-slide{flex-basis:100%}
  .gallery-slide img{border-radius:10px}
  .gallery-photo-title{font-size:13px}
  .gallery-empty{position:relative;min-height:190px;padding:20px}
  .gallery-controls{top:7px;right:7px;bottom:auto}
  .section-head{align-items:stretch;flex-direction:column;gap:10px;margin-bottom:13px}
  .section-head>div{min-width:0}
  .section-head h2,.page>h2{font-size:21px;line-height:1.3;overflow-wrap:anywhere}
  .section-head p,.page>.muted{font-size:13px;line-height:1.45;margin-bottom:0}
  #addFromData{width:100%}
  .toolbar{flex-direction:column;gap:8px;width:100%}
  .toolbar input,.toolbar select{width:100%;min-width:0;min-height:42px;font-size:16px}
  .table-wrap{max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;border-radius:10px}
  .table-wrap table{min-width:680px;font-size:12px}
  .table-wrap th,.table-wrap td{padding:9px 10px}
  #importPreviewBody td{white-space:normal;min-width:95px}
  .editor-page .section-head .data-actions{display:grid;grid-template-columns:minmax(0,1fr);width:100%;gap:8px}
  .editor-page .data-actions>*{width:100%;justify-content:center;min-height:42px;margin:0}
  .import-help{font-size:12px;line-height:1.45;margin:0 0 12px}
  .import-panel{padding:12px}
  .import-summary{gap:10px}
  .import-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .import-actions button{width:100%;padding:10px 8px}
  .form-card{width:100%;max-width:none;padding:15px}
  .form-grid{grid-template-columns:minmax(0,1fr);gap:12px}
  .form-grid label{min-width:0;font-size:12px;line-height:1.35}
  .form-grid input,.form-grid select,.form-grid textarea{min-width:0;min-height:42px;padding:10px 11px;font-size:16px}
  .form-grid textarea{min-height:76px}
  .form-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}
  .form-actions button{width:100%;min-height:42px;padding:10px}
  .commodity-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .commodity-card{min-width:0;padding:14px}
  .commodity-card strong{font-size:26px}
  .commodity-card b{overflow-wrap:anywhere}
  .district-map-full{width:100%;max-width:100%;min-width:0;overflow:visible;padding-bottom:0}
  .district-map-full .district-map-frame{width:100%;max-width:100%;margin:12px 0 0}
  .district-map-full .district-map-svg{width:100%;height:auto;max-height:none}
  .district-map-legend{justify-content:flex-start;font-size:11px;gap:10px}
  #laporan .report-grid{grid-template-columns:minmax(0,1fr);width:100%}
  #laporan .report-btn{width:100%;min-width:0;padding:17px;font-size:14px;overflow-wrap:anywhere}
  .modal{padding:12px}
  .modal-content{max-height:calc(100dvh - 24px);padding:20px 16px;border-radius:13px}
  #toast{right:12px;bottom:calc(12px + env(safe-area-inset-bottom));left:12px;max-width:none;padding:12px 14px;text-align:center;font-size:13px;line-height:1.4}
}
@media(max-width:360px){
  .stats{grid-template-columns:minmax(0,1fr)}
  .stat{min-height:82px}
  .verification-panel .donut-wrap{gap:10px}
  .verification-panel .donut{flex-basis:88px;width:88px;height:88px}
  .verification-panel .donut:before{width:60px;height:60px}
  .header-right #today{font-size:9px}
  .header-right .agency-brand-header .agency-copy{max-width:190px}
  .commodity-cards{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:750px){
  header{position:relative}
  header>div:first-child{padding-right:38px}
  .header-right .agency-brand-header{position:absolute;top:9px;right:12px;display:block;width:30px;height:30px;max-width:30px;padding:0;border:0}
  .header-right .agency-brand-header>img{width:30px;height:30px}
  .header-right .agency-brand-header .agency-copy{display:none}
}

/* Header alignment requested for desktop and mobile. */
@media(min-width:751px){
  header{justify-content:flex-end}
  .header-right{margin-left:auto;flex:0 0 auto;flex-wrap:nowrap;justify-content:flex-end}
}
@media(max-width:750px){
  header{flex-direction:row;align-items:center;justify-content:space-between;gap:8px;padding:9px 14px}
  header>div:first-child{display:flex;flex:0 0 auto;width:auto;align-items:flex-start;padding-right:0}
  .mobile-menu{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;margin:0 8px 0 0;padding:5px}
  .header-right{position:relative;display:flex;align-items:flex-start;justify-content:flex-start;gap:0;width:auto;min-width:0;flex:1 1 auto;padding-right:42px}
  .header-right #accessBadge{display:inline-flex;align-items:center;grid-column:auto;grid-row:auto;align-self:flex-start;max-width:none;font-size:9px;line-height:1.2;padding:5px 8px}
  .header-right .agency-brand-header{position:absolute;top:0;right:0;display:flex;width:34px;height:34px;max-width:34px;padding:0;border:0}
  .header-right .agency-brand-header>img{width:34px;height:34px}
  .header-right .agency-brand-header .agency-copy{display:none}
  .header-right #today{display:block;position:absolute;top:20px;left:8px;grid-column:auto;grid-row:auto;justify-self:auto;text-align:left;font-size:9px;line-height:1.2;white-space:nowrap}
}
