/* Lapor Banjir Singkawang — simple, familiar, mobile first */
:root {
  --ink: #1A1F2B; --sub: #5F6B7A; --line: #E3E7EC; --bg: #F5F7FA; --white: #fff;
  --red: #E53935; --blue: #1565C0; --ok: #1E8E4E;
  --d1: #F2B705; --d2: #F28C05; --d3: #E5531A; --d4: #C62828; --parit: #5B6B7F;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font: 16px/1.5 var(--font); color: var(--ink); background: var(--white); -webkit-text-size-adjust: 100%; }
a { color: var(--blue); }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.bar { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 1000; }
.bar h1 { flex: 1; font-size: 17px; font-weight: 800; }
.bar .icon { width: 40px; height: 40px; margin-left: -8px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink); text-decoration: none; }
.bar .link { font-weight: 700; font-size: 15px; text-decoration: none; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 12px 18px; border: 0; border-radius: 14px; font-weight: 800; font-size: 17px; cursor: pointer; text-decoration: none; }
.btn.red { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(229,57,53,.32); }
.btn.line { background: var(--white); color: var(--ink); border: 1.5px solid var(--line); }
.btn.blue { background: var(--blue); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { min-height: 42px; font-size: 15px; border-radius: 12px; padding: 8px 14px; width: auto; }

/* map page */
.mappage { position: relative; height: 100%; display: flex; flex-direction: column; }
#map { flex: 1; min-height: 0; background: #e8ecef; }
.chips { position: absolute; left: 0; right: 0; top: 64px; z-index: 900; display: flex; gap: 8px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.chips button { flex: none; border: 0; background: var(--white); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.15); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chips button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chips .dot { width: 10px; height: 10px; border-radius: 50%; }
.bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 900; padding: 28px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(255,255,255,0), #fff 34%); }
.bottom .count { font-size: 14px; color: var(--sub); text-align: center; margin-bottom: 8px; font-weight: 600; }
.bottom .count b { color: var(--ink); }
.bottom .fine { font-size: 12px; color: var(--sub); text-align: center; margin-top: 8px; }
.mappage .leaflet-bottom { bottom: 172px; }

/* markers: white badge, colour = water depth */
.mk { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 4px solid var(--c); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.mk svg { width: 16px; height: 16px; fill: var(--c); }

/* popup */
.leaflet-popup-content-wrapper { border-radius: 16px; }
.leaflet-popup-content { margin: 14px; font: 15px/1.45 var(--font); color: var(--ink); width: 250px !important; }
.pop .tag { display: inline-block; padding: 3px 10px; border-radius: 999px; color: #fff; font-weight: 800; font-size: 13px; background: var(--c); }
.pop h3 { font-size: 17px; font-weight: 800; margin: 6px 0 0; }
.pop .when { color: var(--sub); font-size: 13px; }
.pop img { width: 100%; height: 150px; object-fit: cover; border-radius: 12px; display: block; margin: 10px 0 6px; }
.pop q { display: block; margin: 6px 0; }
.pop .still { font-weight: 700; font-size: 14px; margin: 8px 0; }
.pop .acts { display: flex; gap: 8px; }
.pop .acts .btn { flex: 1; }

/* wizard */
.wiz { max-width: 520px; margin: 0 auto; min-height: calc(100% - 56px); display: flex; flex-direction: column; }
.progress { height: 4px; background: var(--line); }
.progress i { display: block; height: 100%; background: var(--red); transition: width .25s; }
.screen { flex: 1; display: flex; flex-direction: column; padding: 22px 16px calc(16px + env(safe-area-inset-bottom)); }
.screen[hidden] { display: none; }
.screen h2 { font-size: 24px; line-height: 1.2; font-weight: 800; }
.screen .lead { color: var(--sub); margin-top: 4px; }
.choices { display: grid; gap: 12px; margin-top: 20px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--white); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; min-height: 76px; }
.choice:active { background: var(--bg); }
.choice .ic { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--bg); }
.choice b { display: block; font-size: 17px; }
.choice small { display: block; color: var(--sub); font-size: 14px; line-height: 1.35; }
.spacer { flex: 1; }

.pick { position: relative; flex: 1; min-height: 320px; margin: 16px -16px 0; }
.pick #pickmap { position: absolute; inset: 0; }
.pin { position: absolute; left: 50%; top: 50%; z-index: 500; width: 36px; height: 46px; margin: -46px 0 0 -18px; pointer-events: none; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.gpsbtn { position: absolute; right: 12px; bottom: 12px; z-index: 600; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); display: grid; place-items: center; cursor: pointer; }
.where { font-size: 14px; color: var(--sub); margin: 12px 0; min-height: 21px; }
.where.bad { color: var(--red); font-weight: 700; }

.cam { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; min-height: 170px; border: 2px dashed #C9D1DA; border-radius: 18px; background: var(--bg); cursor: pointer; font-weight: 700; color: var(--sub); overflow: hidden; position: relative; }
.cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.cam input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cam.has img { display: block; }
.fld { display: block; margin-top: 16px; font-weight: 700; font-size: 15px; }
.fld textarea, .fld input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-weight: 400; font-size: 16px; }
.fld textarea { min-height: 84px; resize: vertical; }
.textbtn { background: none; border: 0; color: var(--blue); font-weight: 700; font-size: 15px; padding: 8px 0; cursor: pointer; text-align: left; }
.small { font-size: 13px; color: var(--sub); margin-top: 12px; }
.err { color: var(--red); font-weight: 700; margin: 10px 0; font-size: 15px; }
.err:empty { display: none; }
.done { align-items: center; justify-content: center; text-align: center; gap: 10px; }
.done .tick { width: 76px; height: 76px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; margin-bottom: 8px; }
.done .btn { margin-top: 6px; }

/* moderation */
.adm { max-width: 640px; margin: 0 auto; padding: 16px; }
.adm .tabs { display: flex; gap: 8px; margin: 4px 0 12px; flex-wrap: wrap; }
.adm .tabs button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; }
.adm .tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.adm .item { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.adm .item h3 { font-size: 17px; }
.adm .meta { color: var(--sub); font-size: 14px; }
.adm .item img { width: 100%; border-radius: 12px; margin: 10px 0; }
.adm .item textarea, .adm input[type=password] { width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; margin-top: 6px; }
.adm .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.adm .note { background: #FFF6E5; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }

@media (min-width: 760px) {
  .bottom { left: 50%; right: auto; width: 420px; transform: translateX(-50%); background: none; }
  .mappage .leaflet-bottom { bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { .progress i { transition: none; } }

.leaflet-tile-pane { filter: saturate(.7) brightness(1.03); }
.pop .acts .btn { font-size: 14px; white-space: nowrap; padding: 8px 10px; }
.adm .ai { display: inline-block; margin: 6px 0 2px; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; background: var(--bg); }
.adm .ai-green { background: #E6F4EC; color: #1E6B3E; } .adm .ai-photo_hidden { background: #E8F0FB; color: #134E95; }
.adm .ai-yellow { background: #FFF4D6; color: #7A5A00; } .adm .ai-red { background: #FDE7E7; color: #9B1C1C; } .adm .ai-error { background: #FDE7E7; color: #9B1C1C; }
.kondisi { position: absolute; left: 12px; right: 12px; top: 108px; z-index: 900; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.kondisi span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
