/* Prototipe Garut Desa Cerdas Terpadu - gaya bersama (tanpa CDN agar bisa dibuka tanpa internet) */
:root {
  --ink: #001b3b;
  --ink-2: #0b2a52;
  --biru: #0b63ce;
  --cyan: #0891b2;
  --hijau: #16a34a;
  --hijau-tua: #0f6b3a;
  --kuning: #d97706;
  --merah: #dc2626;
  --teks: #334155;
  --redup: #64748b;
  --garis: #e2e8f0;
  --latar: #f6f8fb;
  --putih: #fff;
  --radius: 14px;
  --bayang: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .18);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--teks); background: var(--latar); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
.ikon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -.2em; }
.wadah { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Pita data contoh */
.pita-contoh { background: #fff7e6; color: #8a5300; border-bottom: 1px solid #fde3b0; font-size: 12.5px; text-align: center; padding: 6px 12px; position: relative; z-index: 60; }
.pita-contoh b { font-weight: 600; }
.pita-contoh a { text-decoration: underline; text-underline-offset: 2px; }
.lencana-contoh { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8a5300; background: #fff4dc; border: 1px solid #f8d99a; padding: 3px 9px; border-radius: 999px; }

/* Tombol */
.tombol { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 500; line-height: 1.2; transition: background .15s, border-color .15s, color .15s, transform .1s; white-space: nowrap; }
.tombol:active { transform: translateY(1px); }
.tombol-utama { background: var(--ink); color: #fff; }
.tombol-utama:hover { background: var(--ink-2); }
.tombol-hijau { background: var(--hijau-tua); color: #fff; }
.tombol-hijau:hover { background: #0c5a31; }
.tombol-garis { background: #fff; border-color: var(--garis); color: var(--ink); }
.tombol-garis:hover { border-color: #cbd5e1; background: #f8fafc; }
.tombol-hantu { background: transparent; color: var(--ink); }
.tombol-hantu:hover { background: #eef2f7; }
.tombol-bahaya { background: #fff; border-color: #fecaca; color: var(--merah); }
.tombol-bahaya:hover { background: #fef2f2; }
.tombol-kecil { padding: 7px 11px; font-size: 13px; border-radius: 8px; }
.tombol-ikon { width: 36px; height: 36px; padding: 0; border-radius: 9px; }
.tombol[disabled] { opacity: .5; pointer-events: none; }

/* Kartu dan label */
.kartu { background: #fff; border: 1px solid var(--garis); border-radius: var(--radius); box-shadow: var(--bayang); }
.label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: #eef2f7; color: #475569; white-space: nowrap; }
.label-hijau { background: #e7f6ec; color: #11713c; }
.label-biru { background: #e6f0fd; color: #0a52ab; }
.label-kuning { background: #fff4dc; color: #92580a; }
.label-merah { background: #fdecec; color: #b42323; }
.label-ungu { background: #f1ecfd; color: #5b3cc4; }
.titik { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* Formulir */
.isian { display: block; margin-bottom: 14px; }
.isian > span { display: block; font-size: 13px; color: var(--redup); margin-bottom: 6px; }
.masukan { width: 100%; border: 1px solid #d5dde8; background: #fff; border-radius: 10px; padding: 10px 12px; font-size: 14.5px; outline: none; transition: border-color .15s, box-shadow .15s; }
.masukan:focus { border-color: var(--biru); box-shadow: 0 0 0 3px rgba(11, 99, 206, .14); }
textarea.masukan { resize: vertical; min-height: 84px; }
select.masukan { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

/* Tabel */
.tabel-wadah { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabel { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabel th { text-align: left; font-weight: 500; font-size: 12px; color: var(--redup); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid var(--garis); background: #fafbfd; white-space: nowrap; }
.tabel td { padding: 12px 14px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.tabel tr:last-child td { border-bottom: 0; }
.tabel tbody tr.bisa-klik { cursor: pointer; }
.tabel tbody tr.bisa-klik:hover { background: #f7fafd; }
.angka { font-variant-numeric: tabular-nums; }

/* Bilah kemajuan */
.bilah { height: 8px; background: #eaf0f6; border-radius: 99px; overflow: hidden; }
.bilah > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0891b2, #0b63ce); }
.bilah.hijau > i { background: linear-gradient(90deg, #22c55e, #0f6b3a); }

/* Modal dan laci */
.tirai { position: fixed; inset: 0; background: rgba(2, 12, 27, .45); z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px); }
.tirai.buka { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); animation: naik .2s ease; }
.modal-kepala { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--garis); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-isi { padding: 20px; }
.laci { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: #fff; z-index: 90; box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .3); transform: translateX(105%); transition: transform .25s ease; display: flex; flex-direction: column; }
.laci.buka { transform: none; }
.laci-isi { flex: 1; overflow: auto; padding: 20px; }
@keyframes naik { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Notifikasi singkat */
.toast-wadah { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); animation: naik .2s ease; display: flex; align-items: center; gap: 10px; }

/* Kepala Xilma (halaman pembuka dan dasbor) */
.merek { display: flex; align-items: center; gap: 10px; }
.merek img { width: 34px; height: 34px; }
.merek b { display: block; color: var(--ink); font-weight: 700; letter-spacing: .18em; font-size: 14px; line-height: 1.1; }
.merek small { display: block; font-size: 11px; color: var(--redup); letter-spacing: .02em; }

.kisi-latar { background-image: linear-gradient(rgba(0, 27, 59, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 27, 59, .05) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent); }
.sembunyi { display: none !important; }
.redup { color: var(--redup); }
.kecil { font-size: 13px; }
.tebal { font-weight: 600; }
.baris { display: flex; align-items: center; gap: 10px; }
.antara { justify-content: space-between; }
.bungkus { flex-wrap: wrap; }

@media print {
  .pita-contoh, .jangan-cetak { display: none !important; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
