:root{
  --brand-red:#e6003d;
  --brand-orange:#ff7a2b;
  --brand-yellow:#ffc247;
  --dark:#171923;
  --muted:#64748b;
  --line:#e5e7eb;
  --bg:#f7f8fb;
  --sidebar: #141824;
}
*{box-sizing:border-box}
body{background:var(--bg);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1f2937}
a{text-decoration:none}
.app-shell{min-height:100vh;display:flex}.app-sidebar{width:286px;background:linear-gradient(180deg,#191d2b 0%,#111827 100%);color:#fff;position:fixed;top:0;left:0;bottom:0;z-index:1040;overflow:auto;transition:.25s ease}.sidebar-brand{display:flex;align-items:center;gap:12px;padding:20px 18px;border-bottom:1px solid rgba(255,255,255,.08)}.sidebar-brand img{width:54px;height:54px;object-fit:contain;border-radius:14px;background:rgba(255,255,255,.08);padding:3px}.sidebar-brand strong{display:block;font-size:18px}.sidebar-brand small{display:block;color:#cbd5e1;font-size:12px}.sidebar-nav{padding:12px}.sidebar-nav a{display:flex;align-items:center;gap:11px;color:#dbe4f0;padding:10px 12px;border-radius:13px;margin-bottom:3px;font-size:14px}.sidebar-nav a:hover,.sidebar-nav a.active{background:linear-gradient(90deg,rgba(230,0,61,.95),rgba(255,122,43,.9));color:#fff}.sidebar-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#94a3b8;padding:14px 12px 7px}.app-main{margin-left:286px;width:calc(100% - 286px);min-height:100vh}.app-topbar{height:78px;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:16px;padding:0 24px;position:sticky;top:0;z-index:1000}.app-topbar h1{font-size:22px;margin:0;font-weight:800}.app-topbar small{color:var(--muted)}.hamburger{width:44px;height:44px;border:0;border-radius:13px;background:#f1f5f9;font-size:24px;display:none}.topbar-user img{width:28px;height:28px;border-radius:9px}.app-content{padding:24px}.card-smart{background:#fff;border:1px solid rgba(15,23,42,.07);border-radius:22px;box-shadow:0 14px 34px rgba(15,23,42,.06);padding:20px}.kpi-card{position:relative;overflow:hidden;min-height:132px}.kpi-card::after{content:"";position:absolute;right:-24px;bottom:-24px;width:110px;height:110px;border-radius:50%;background:linear-gradient(135deg,rgba(255,122,43,.15),rgba(230,0,61,.12))}.kpi-label{font-size:13px;color:var(--muted);font-weight:700}.kpi-value{font-size:30px;font-weight:900;line-height:1.1}.kpi-unit{color:var(--muted);font-size:13px}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.section-title h2{font-size:18px;font-weight:800;margin:0}.btn-gradient{border:0;color:#fff;background:linear-gradient(90deg,var(--brand-red),var(--brand-orange));box-shadow:0 12px 24px rgba(230,0,61,.23)}.btn-gradient:hover{color:#fff;filter:brightness(.95)}.map-card{height:520px;border-radius:22px;overflow:hidden;border:1px solid var(--line)}#mainMap,#gisMap{height:100%;min-height:420px}.mini-map{height:320px;border-radius:18px;overflow:hidden}.alert-list{display:flex;flex-direction:column;gap:10px}.alert-item{padding:13px 14px;border:1px solid var(--line);border-radius:16px;background:#fff}.alert-item strong{display:block}.module-card{border:0;border-radius:22px;color:#fff;padding:22px;min-height:190px;position:relative;overflow:hidden}.module-card::after{content:"";position:absolute;right:-35px;bottom:-35px;width:150px;height:150px;border-radius:50%;background:rgba(255,255,255,.16)}.module-card i{font-size:36px}.data-table{background:#fff;border-radius:18px;overflow:hidden}.table thead th{background:#f8fafc;color:#475569;font-size:12px;text-transform:uppercase;letter-spacing:.04em}.form-control,.form-select{border-radius:12px;border-color:#dbe2ea}.modal-content{border:0;border-radius:24px}.login-body{min-height:100vh;background:radial-gradient(circle at top left,rgba(255,194,71,.35),transparent 30%),radial-gradient(circle at bottom right,rgba(230,0,61,.30),transparent 30%),linear-gradient(135deg,#fff7ed,#fff,#f8fafc);display:flex;align-items:center;justify-content:center;padding:24px}.login-wrapper{width:min(1100px,100%);display:grid;grid-template-columns:1.1fr .9fr;gap:26px;align-items:stretch}.login-hero,.login-card{border-radius:32px;background:rgba(255,255,255,.78);box-shadow:0 24px 70px rgba(15,23,42,.13);border:1px solid rgba(255,255,255,.8);backdrop-filter:blur(16px)}.login-hero{padding:46px;display:flex;flex-direction:column;justify-content:center}.login-hero img{width:145px;height:145px;object-fit:contain;margin-bottom:20px}.login-hero h1{font-size:42px;font-weight:900;line-height:1.05}.login-hero p{font-size:18px;color:#475569;max-width:590px}.hero-badges{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.hero-badges span{background:#111827;color:#fff;border-radius:999px;padding:8px 13px;font-size:13px}.login-card{padding:38px}.login-card h2{font-weight:900}.demo-box{background:#fff7ed;border:1px dashed #fdba74;padding:14px;border-radius:18px;font-size:13px}.sidebar-backdrop{display:none}.print-only{display:none}.recommendation-box{border-left:5px solid var(--brand-orange);background:#fff7ed;border-radius:16px;padding:14px}.risk-high{color:#dc2626}.risk-medium{color:#f59e0b}.risk-low{color:#16a34a}
@media(max-width:991px){.app-sidebar{transform:translateX(-105%);width:292px}.app-sidebar.show{transform:translateX(0)}.sidebar-backdrop.show{display:block;position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:1030}.app-main{margin-left:0;width:100%}.hamburger{display:inline-flex;align-items:center;justify-content:center}.app-topbar{height:auto;min-height:72px;padding:12px 16px}.app-topbar h1{font-size:17px}.app-topbar small{display:none}.app-content{padding:16px}.login-wrapper{grid-template-columns:1fr}.login-hero{padding:30px}.login-hero h1{font-size:30px}.map-card{height:430px}.card-smart{padding:16px}}
@media print{.app-sidebar,.app-topbar,.btn,.no-print{display:none!important}.app-main{margin:0;width:100%}.app-content{padding:0}.card-smart{box-shadow:none}.print-only{display:block}}
.leaflet-draw-toolbar a{box-sizing:content-box}.warga-hero{background:linear-gradient(135deg,var(--brand-red),var(--brand-orange));color:#fff;border-radius:24px;padding:24px}.role-note{background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:12px}.social-source-card{border:1px solid var(--line);border-radius:18px;padding:14px;background:#fff}


/* FIX v4: modal form dengan map harus bisa scroll penuh di desktop & mobile */
.data-modal-map .modal-dialog,
#complaintModal .modal-dialog{
  max-width:min(1320px, calc(100vw - 24px));
  margin:.75rem auto;
}
.data-modal-map .modal-content,
#complaintModal .modal-content{
  max-height:calc(100vh - 24px);
  display:flex;
  flex-direction:column;
}
.data-modal-map .modal-body,
#complaintModal .modal-body{
  overflow-y:auto!important;
  max-height:calc(100vh - 165px);
  -webkit-overflow-scrolling:touch;
  padding-bottom:24px;
}
.data-modal-map .modal-footer,
#complaintModal .modal-footer{
  position:sticky;
  bottom:0;
  z-index:5;
  background:#fff;
  border-top:1px solid var(--line);
  border-radius:0 0 24px 24px;
}
.form-map-picker{
  height:360px;
  min-height:320px;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background:#e2e8f0;
  position:relative;
  z-index:1;
}
.leaflet-container{z-index:1}.leaflet-control{z-index:2}.leaflet-pane{z-index:1}.leaflet-top,.leaflet-bottom{z-index:3}
@media(max-width:768px){
  .data-modal-map .modal-dialog,
  #complaintModal .modal-dialog{
    width:100vw;
    max-width:100vw;
    height:100vh;
    margin:0;
  }
  .data-modal-map .modal-content,
  #complaintModal .modal-content{
    height:100vh;
    max-height:100vh;
    border-radius:0;
  }
  .data-modal-map .modal-body,
  #complaintModal .modal-body{
    max-height:calc(100vh - 132px);
    padding:14px;
  }
  .data-modal-map .modal-footer,
  #complaintModal .modal-footer{
    border-radius:0;
  }
  .form-map-picker{
    height:320px;
    min-height:300px;
  }
}

/* FIX v7: input angka/nominal otomatis pecahan ribuan */
.js-thousand-input{
  text-align:right;
  font-weight:700;
  letter-spacing:.01em;
}
.js-thousand-input::placeholder{
  text-align:left;
  font-weight:400;
  color:#94a3b8;
}
.table td.text-end{
  white-space:nowrap;
}
