/* ============================================================
   Data Program & Visualisasi — tema VibeCoder
   ============================================================ */
:root {
  --ink: #1F1B3A;
  --muted: #635F82;
  --indigo: #4F46E5;
  --violet: #8B5CF6;
  --pink: #EC4899;
  --sky: #06B6D4;
  --bg: #F3F0FF;
  --blob1: #C7BFFF;
  --blob2: #FBCFE8;
  --blob3: #A5F3FC;
  --card: rgba(255, 255, 255, 0.62);
  --card-border: rgba(255, 255, 255, 0.85);
  --shadow: 0 18px 45px -18px rgba(76, 55, 170, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- latar belakang dekoratif ---------- */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blobs span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.bg-blobs .b1 { width: 480px; height: 480px; background: var(--blob1); top: -140px; left: -120px; }
.bg-blobs .b2 { width: 420px; height: 420px; background: var(--blob2); top: 20%; right: -140px; }
.bg-blobs .b3 { width: 460px; height: 460px; background: var(--blob3); bottom: -180px; left: 30%; }

.container { width: min(1280px, 100% - 40px); margin-inline: auto; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 240, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  border-radius: 12px; box-shadow: 0 8px 18px -6px rgba(79, 70, 229, 0.55);
  flex-shrink: 0;
}
.brand-mark.big { width: 74px; height: 74px; font-size: 34px; border-radius: 18px; }
.brand-logo { height: 42px; width: auto; max-width: 220px; object-fit: contain; border-radius: 10px; }
.brand-text { font-weight: 800; font-size: 17px; line-height: 1.15; display: flex; flex-direction: column; }
.brand-text small { font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-link { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; transition: .18s; }
.nav-link:hover { background: rgba(255, 255, 255, 0.75); color: var(--indigo); }
.nav-link.on { color: var(--indigo); }

/* dropdown modul */
.nav-dd { position: relative; }
.nav-dd summary {
  list-style: none; cursor: pointer; user-select: none;
  color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; transition: .18s;
}
.nav-dd summary::-webkit-details-marker { display: none; }
.nav-dd summary:hover { background: rgba(255, 255, 255, 0.75); color: var(--indigo); }
.nav-dd[open] summary { color: var(--indigo); background: rgba(255, 255, 255, 0.85); }
.dd-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-height: 72vh; overflow-y: auto;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px;
}
.dd-group { padding-block: 4px; }
.dd-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9C97C4; padding: 6px 10px 4px; }
.dd-item { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 13.5px; font-weight: 500; padding: 8px 10px; border-radius: 10px; }
.dd-item:hover { background: rgba(79, 70, 229, 0.08); color: var(--indigo); }
.dd-item.on { background: rgba(79, 70, 229, 0.12); color: var(--indigo); font-weight: 600; }
.dd-ico { font-size: 15px; }

/* ---------- main / sections ---------- */
.main { padding-block: 28px 60px; display: flex; flex-direction: column; gap: 32px; }

.hero h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.grad-text { background: linear-gradient(100deg, var(--indigo), var(--violet) 55%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 760px; margin-top: 8px; }
.hero-note { font-size: 13.5px; }

.sec-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.sec-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.sec-head p { color: var(--muted); font-size: 14px; }

.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.crumbs a { color: var(--indigo); text-decoration: none; font-weight: 600; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-head-left { display: flex; gap: 16px; align-items: flex-start; }
.page-head h1 { font-size: clamp(20px, 2.6vw, 27px); font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); font-size: 14px; max-width: 640px; }
.mod-ico.big { font-size: 34px; width: 64px; height: 64px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); flex-shrink: 0; }

/* ---------- kartu ---------- */
.card {
  background: var(--card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.kpi-card { display: flex; gap: 14px; align-items: flex-start; }
.kpi-ico { font-size: 22px; width: 48px; height: 48px; display: grid; place-items: center; background: rgba(255,255,255,.7); border-radius: 12px; flex-shrink: 0; }
.kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi-value small { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-label { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.kpi-sub { font-size: 11.5px; color: var(--muted); }

/* grid modul (dashboard) */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.mod-card { display: flex; flex-direction: column; gap: 14px; }
.mod-head { display: flex; gap: 12px; align-items: center; }
.mod-ico { font-size: 24px; width: 46px; height: 46px; display: grid; place-items: center; background: rgba(255,255,255,.75); border-radius: 12px; flex-shrink: 0; }
.mod-titles h3 { font-size: 15px; font-weight: 700; line-height: 1.25; }
.mod-count { font-size: 12px; color: var(--muted); font-weight: 500; }

/* chart */
.chart-box { position: relative; height: 250px; }
.mod-card .chart-box { height: 230px; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.chart-card { padding: 16px; }

/* statistik modul */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-card { padding: 18px 22px; }
.stat-value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; text-decoration: none;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  padding: 10px 16px; border-radius: var(--radius-sm);
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff; box-shadow: 0 10px 22px -8px rgba(79, 70, 229, 0.6); }
.btn-primary:hover { box-shadow: 0 14px 26px -8px rgba(79, 70, 229, 0.75); }
.btn-ghost { background: rgba(255, 255, 255, 0.65); color: var(--indigo); border: 1px solid rgba(255,255,255,0.9); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.95); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid rgba(31, 27, 58, 0.2); }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-danger { background: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }
.btn-danger:hover { background: #FECACA; }
.btn-mini { padding: 5px 10px; font-size: 12px; border-radius: 8px; background: rgba(79,70,229,.1); color: var(--indigo); }
.btn-mini.btn-add { background: rgba(79, 70, 229, 0.16); color: var(--indigo); font-weight: 700; }
.btn-mini.btn-add:hover { background: rgba(79, 70, 229, 0.28); }
.btn-mini.btn-danger { background: #FEE2E2; color: #DC2626; border: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- panel & form ---------- */
.panel h2 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.panel { margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item-wide { grid-column: 1 / -1; }
.form-item label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.form-item .req { color: #DC2626; }
.form-item input[type="text"], .form-item input[type="password"], .form-item input[type="number"], .form-item input[type="search"], .form-item input[type="file"],
.form-item select, .form-item textarea {
  font-family: inherit; font-size: 14px; color: var(--ink);
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid rgba(31, 27, 58, 0.12); background: rgba(255, 255, 255, 0.8);
  outline: none; transition: border .15s, box-shadow .15s; width: 100%;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.field-err { font-size: 11.5px; color: #DC2626; font-weight: 500; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.form-actions .btn { min-width: 120px; }

/* ---------- flash ---------- */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; margin-bottom: 14px; }
.flash-ok { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }
.flash-err { background: #FEE2E2; color: #B91C1C; border: 1px solid #FECACA; }

/* ---------- peta wilayah kerja (Leaflet) ---------- */
.map-section {
  background: var(--card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.map-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.map-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.map-head p { font-size: 13px; margin-top: 2px; }
.map-body { display: grid; grid-template-columns: 1.75fr 1fr; gap: 24px; align-items: stretch; }
.leaflet-shell {
  position: relative; z-index: 0;
  height: 480px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 14px;
  overflow: hidden;
  background: #E7E5F4;
  box-shadow: inset 0 0 0 1px rgba(79,70,229,.06);
}
.leaflet-shell.tall { height: 560px; }
.map-stats { display: flex; flex-direction: column; gap: 12px; justify-content: flex-start; }
.map-stat {
  display: flex; align-items: center; gap: 13px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 13px;
  padding: 12px 15px;
  box-shadow: 0 8px 20px -14px rgba(76, 55, 170, 0.5);
}
.map-stat-ico {
  font-size: 20px; width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(139,92,246,.14));
  border-radius: 11px;
}
.map-stat-value { font-size: 19px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.map-stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
@media (max-width: 860px) {
  .map-body { grid-template-columns: 1fr; }
  .leaflet-shell { height: 420px; }
  .leaflet-shell.tall { height: 460px; }
  .map-stats { flex-direction: row; flex-wrap: wrap; }
  .map-stat { flex: 1 1 200px; }
}
/* pin desa dengan jumlah data */
.village-pin-wrap { background: transparent; border: none; }
.leaflet-div-icon.village-pin-wrap { background: transparent; border: none; }
.village-pin {
  position: relative;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  box-shadow: 0 6px 14px -4px rgba(31, 27, 58, 0.5);
  border: 2px solid #fff;
}
.village-pin:after {
  content: attr(data-count);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  transform: rotate(45deg);
  color: #fff; font-weight: 800; font-size: 12px;
}
.village-pin.zero { background: linear-gradient(135deg, #9CA3AF, #6B7280); }
.village-pin.zero:after { content: '•'; font-size: 18px; }
/* popup desa */
.vpop strong { font-size: 14px; color: var(--ink); }
.vpop-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.vpop-total { font-size: 12.5px; font-weight: 700; color: var(--indigo); margin: 6px 0 4px; }
.vpop-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.vpop-table td { padding: 2px 6px; border-bottom: 1px solid rgba(31,27,58,.06); }
.vpop-n { text-align: right; font-weight: 700; }
.vpop-prg { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(31,27,58,.15); }
.vpop-prg b { font-size: 11.5px; color: var(--indigo); }
.vpop-prg ul { margin: 4px 0 0 16px; font-size: 11.5px; color: var(--ink); }
.vpop-prg li { margin-bottom: 2px; }
/* alat admin peta */
.pick-status {
  margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(79, 70, 229, 0.1); border: 1px solid rgba(79,70,229,.25);
  color: var(--ink); font-size: 13px; font-weight: 600;
}
.coord-form { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.coord-in { width: 92px; padding: 5px 6px !important; font-size: 12px !important; border-radius: 8px !important; }
.row-armed { background: rgba(250, 204, 21, 0.16) !important; }
.badge { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.badge.warn { background: #FEF3C7; color: #B45309; }
/* halaman pengaturan */
.logo-setting { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.logo-preview {
  width: 150px; min-height: 110px; padding: 14px;
  display: grid; place-items: center; text-align: center; gap: 8px;
  background: rgba(255,255,255,.7); border: 1px dashed rgba(31,27,58,.2); border-radius: var(--radius-sm);
}
.logo-preview img { max-width: 130px; max-height: 70px; object-fit: contain; }
.logo-fields { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #B91C1C; cursor: pointer; }
.field-hint { font-size: 11.5px; color: var(--muted); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.theme-card {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.6); border: 2px solid transparent;
  transition: border .15s, background .15s;
}
.theme-card:hover { background: rgba(255,255,255,.9); }
.theme-card.on { border-color: var(--indigo); background: rgba(255,255,255,.95); box-shadow: 0 6px 16px -10px rgba(79,70,229,.6); }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-swatches { display: flex; gap: 6px; }
.theme-swatches i { width: 22px; height: 22px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(31,27,58,.2); }
.theme-name { font-size: 12.5px; font-weight: 700; }
.settings-form { display: flex; flex-direction: column; gap: 22px; }

/* ---------- tabel ---------- */
.table-panel { padding: 22px; }
.table-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.table-head h2 { font-size: 16.5px; font-weight: 700; margin: 0; }
.search-form { display: flex; gap: 8px; align-items: center; }
.search-form input[type="search"] {
  font-family: inherit; font-size: 13.5px; padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid rgba(31, 27, 58, 0.12); background: rgba(255,255,255,.85); outline: none; min-width: 220px;
}
.search-form input[type="search"]:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }

.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid rgba(31, 27, 58, 0.07); background: rgba(255,255,255,.55); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.data-table th {
  text-align: left; padding: 11px 14px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: #7A76A6;
  background: rgba(79, 70, 229, 0.05); border-bottom: 1px solid rgba(31, 27, 58, 0.08);
  white-space: nowrap;
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid rgba(31, 27, 58, 0.06); vertical-align: top; }
.data-table tbody tr:hover { background: rgba(79, 70, 229, 0.045); }
.data-table .num { text-align: right; width: 46px; color: var(--muted); }
.data-table .act { white-space: nowrap; width: 200px; }
.data-table .empty { text-align: center; color: var(--muted); padding: 30px 14px; }

.inline-form { display: inline; }

/* pagination */
.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.page {
  min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 8px; border-radius: 9px; font-size: 13px; font-weight: 600;
  text-decoration: none; color: var(--muted); background: rgba(255,255,255,.6); border: 1px solid rgba(31,27,58,.08);
}
.page:hover { color: var(--indigo); border-color: var(--indigo); }
.page.current { background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff; border-color: transparent; }

/* ---------- auth ---------- */
.auth-wrap { display: grid; place-items: center; padding-block: 30px; }
.auth-card { width: min(420px, 100%); text-align: center; }
.auth-card h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.auth-card .muted { margin-bottom: 18px; }
.auth-logo { font-size: 40px; margin-bottom: 10px; }
.auth-card form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.auth-card .form-actions { margin-top: 0; }
.auth-card .small { margin-top: 16px; }
.auth-card .small a { color: var(--indigo); text-decoration: none; font-weight: 600; }

/* ---------- pengguna & chip ---------- */
.user-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  background: rgba(255,255,255,.75); border: 1px solid rgba(31,27,58,.08);
  padding: 6px 12px; border-radius: 999px; max-width: 200px; overflow: hidden; white-space: nowrap;
}
.user-chip small { font-weight: 600; color: var(--muted); }
.badge { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; display: inline-block; margin: 1px 2px 1px 0; }
.badge.role-admin { background: linear-gradient(135deg, rgba(79,70,229,.18), rgba(139,92,246,.2)); color: var(--indigo); }
.badge.role-petugas { background: rgba(6,182,212,.14); color: #0E7490; }
.badge.bidang { background: rgba(255,255,255,.9); border: 1px solid rgba(31,27,58,.1); color: var(--ink); }
.badge.ok { background: #DCFCE7; color: #15803D; }
.badge.off { background: #FEE2E2; color: #B91C1C; }
.toolbar-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.toolbar-label { font-size: 12px; font-weight: 700; color: var(--muted); align-self: center; }
.hint { font-size: 12px; background: rgba(255,255,255,.7); padding: 6px 12px; border-radius: 10px; border: 1px solid rgba(31,27,58,.07); }
.hint a { color: var(--indigo); font-weight: 700; text-decoration: none; }
@media (max-width: 720px) { .toolbar-col { align-items: stretch; } .toolbar-label { display: none; } }
.modul-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 8px; }
.modul-check {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,.65); border: 1px solid rgba(31,27,58,.08);
  border-radius: 10px; padding: 8px 12px; cursor: pointer; transition: .15s;
}
.modul-check:hover { background: rgba(255,255,255,.95); border-color: var(--indigo); }
.modul-check:has(input:checked) { background: rgba(79,70,229,.1); border-color: var(--indigo); }
.modul-check input { accent-color: var(--indigo); }

/* grup field pada form */
.form-group-title {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed rgba(99, 102, 241, 0.35);
  font-size: 13px; font-weight: 800; color: var(--indigo);
}
.form-grid > .form-group-title:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.desa-pick { display: flex; gap: 8px; align-items: center; }
.desa-pick select { flex: 1 1 auto; }
.desa-pick .btn { white-space: nowrap; }
.desa-multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 240px; overflow-y: auto; padding: 4px; }
.desa-multi .modul-check { margin: 0; }
.warn-hint { color: #B45309; }
.warn-hint a { color: var(--indigo); font-weight: 700; }

/* filter per desa */
.filter-desa { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.filter-desa-head { display: flex; align-items: center; gap: 10px; }
.filter-desa-ico { font-size: 22px; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(79,70,229,.12); border-radius: 11px; }
.filter-desa-title b { font-size: 15px; display: block; }
.filter-desa-title span { font-size: 12px; }
.filter-desa-form { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; flex-wrap: wrap; }
.filter-desa-select { min-width: 240px; }
.filter-desa-active { background: rgba(79,70,229,.1); border: 1px solid rgba(79,70,229,.2); border-radius: 10px; padding: 6px 12px; font-size: 13px; }

/* ---------- halaman panduan ---------- */
.guide { display: flex; flex-direction: column; gap: 20px; }
.guide h2 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.guide h3 { font-size: 15px; font-weight: 700; margin: 14px 0 6px; }
.guide ol, .guide ul { margin: 6px 0 10px 22px; font-size: 14px; }
.guide li { margin-bottom: 5px; }
.guide p { font-size: 14px; margin-bottom: 8px; }
.guide code { background: rgba(79, 70, 229, 0.08); color: var(--indigo); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.guide-note {
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-left: 4px solid #F59E0B;
  color: var(--ink);
  padding: 10px 14px; border-radius: 10px;
  font-size: 13.5px; margin: 10px 0;
}
.guide-table { font-size: 12.5px; min-width: 0; margin: 8px 0 14px; }
.guide-toc { padding: 14px 18px; }
.guide-toc-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.guide-toc-links a {
  background: rgba(79, 70, 229, 0.08); color: var(--indigo);
  font-size: 12.5px; font-weight: 600; text-decoration: none;
  padding: 6px 12px; border-radius: 999px; transition: .15s;
}
.guide-toc-links a:hover { background: var(--indigo); color: #fff; }
.guide-section .req { color: #DC2626; }

/* cetak (termasuk panduan & halaman data) */
@media print {
  .topbar, .footer, .bg-blobs, .no-print, .crumbs, .nav, .dd-panel { display: none !important; }
  body { background: #fff !important; color: #000; }
  .card { background: #fff; border: 1px solid #ccc; box-shadow: none; backdrop-filter: none; }
  .container { width: 100%; }
  .main { padding-block: 8px; gap: 14px; }
  a { color: inherit; text-decoration: none; }
  .hero { page-break-before: always; }
}

/* ---------- footer ---------- */
.footer { padding-block: 22px; color: var(--muted); font-size: 12.5px; text-align: center; border-top: 1px solid rgba(255,255,255,.6); }

/* ---------- responsif ---------- */
@media (max-width: 720px) {
  .topbar-inner { flex-direction: column; align-items: stretch; }
  .nav { justify-content: center; }
  .dd-panel { position: fixed; right: 20px; left: 20px; width: auto; }
  .page-head { flex-direction: column; }
  .chart-grid { grid-template-columns: 1fr; }
  .mod-grid { grid-template-columns: 1fr; }
  .toolbar .btn { flex: 1 1 auto; }
  .container { width: min(1280px, 100% - 28px); }
}
