/* Fix Ward 120 — shared styles (mobile-first) */
:root {
  --green: #0B6E4F;
  --green-dark: #084C37;
  --amber: #F5A623;
  --red: #D64545;
  --bg: #F6F5F1;
  --card: #FFFFFF;
  --ink: #1E2A26;
  --muted: #66736E;
  --line: #E3E1DA;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 16px; line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; }
a { color: var(--green); }
.shell { max-width: 720px; margin: 0 auto; padding: 0 14px 92px; }

/* ---------- header ---------- */
.hdr {
  background: var(--green); color: #fff;
  padding: 14px 16px 12px; text-align: center;
}
.hdr .brand { font-size: 21px; font-weight: 800; letter-spacing: .2px; }
.hdr .brand .amber { color: var(--amber); }
.hdr .tag { font-size: 12.5px; opacity: .92; margin-top: 2px; }
.counters {
  display: flex; justify-content: center; gap: 8px;
  background: var(--green-dark); padding: 8px 10px;
}
.counter {
  flex: 1; max-width: 160px; text-align: center; color: #fff;
  background: rgba(255,255,255,.08); border-radius: 10px; padding: 6px 4px;
}
.counter b { display: block; font-size: 20px; line-height: 1.1; }
.counter span { font-size: 11px; opacity: .85; }
.counter.fixed b { color: #7FE0B5; }
.counter.busy b { color: var(--amber); }

/* ---------- bottom tabs ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  flex: 1; border: 0; background: none; padding: 8px 2px 9px;
  font-size: 11px; color: var(--muted); cursor: pointer; font-family: inherit;
}
.tabs button .ico { display: block; font-size: 20px; line-height: 1.25; }
.tabs button.on { color: var(--green); font-weight: 700; }

section.tabpage { display: none; padding-top: 14px; }
section.tabpage.on { display: block; }

/* ---------- cards & forms ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
h2 { font-size: 18px; margin: 4px 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 5px; }
label .opt { font-weight: 400; color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=tel], input[type=email], input[type=password],
select, textarea {
  width: 100%; padding: 11px 12px; font-size: 16px; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); border-color: var(--green); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: 12px 8px; font-size: 14px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-align: center; font-family: inherit;
}
.chip .ico { display: block; font-size: 24px; margin-bottom: 3px; }
.chip.on { border-color: var(--green); background: #E9F4EF; color: var(--green); }

.btn {
  display: inline-block; width: 100%; border: 0; border-radius: 12px;
  padding: 14px; font-size: 16.5px; font-weight: 700; font-family: inherit;
  background: var(--green); color: #fff; cursor: pointer; text-align: center;
  text-decoration: none;
}
.btn:active { background: var(--green-dark); }
.btn.second { background: #fff; color: var(--green); border: 1.5px solid var(--green); }
.btn.wa { background: #25D366; }
.btn.small { width: auto; padding: 8px 14px; font-size: 14px; border-radius: 9px; }
.btn[disabled] { opacity: .55; }

/* ---------- maps ---------- */
#pickMap { height: 240px; border-radius: 12px; border: 1.5px solid var(--line); }
#bigMap { height: calc(100vh - 275px); min-height: 320px; border-radius: 12px; border: 1px solid var(--line); }
.leaflet-container { font: inherit; }

/* ---------- report list ---------- */
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.filters button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 13px; font-size: 13.5px; white-space: nowrap; cursor: pointer;
  color: var(--ink); font-family: inherit;
}
.filters button.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }

.rcard { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.rcard .ico { font-size: 26px; line-height: 1.2; }
.rcard .body { flex: 1; min-width: 0; }
.rcard .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.rcard .ref { font-weight: 800; font-size: 13.5px; color: var(--green); }
.rcard .desc {
  margin: 3px 0; font-size: 14.5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rcard .meta { font-size: 12.5px; color: var(--muted); }
.badge {
  color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; white-space: nowrap;
}
.support {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 11px; font-size: 12.5px; cursor: pointer; margin-top: 6px; font-family: inherit;
}
.support.done { background: #E9F4EF; border-color: var(--green); color: var(--green); font-weight: 700; }

/* ---------- fixed wall ---------- */
.fixgrid img { border-radius: 10px; width: 100%; height: 140px; object-fit: cover; }
.beforeafter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.beforeafter .lbl { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 3px; }
.fixdays { color: var(--green); font-weight: 800; }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(20,30,26,.55); z-index: 2000;
  display: none; align-items: flex-end; justify-content: center;
}
.modal-back.on { display: flex; }
.modal {
  background: var(--bg); width: 100%; max-width: 720px; max-height: 88vh;
  overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px 16px 28px;
}
.modal .close {
  float: right; border: 0; background: var(--line); border-radius: 999px;
  width: 32px; height: 32px; font-size: 16px; cursor: pointer;
}
.timeline { margin: 8px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--line); margin-left: 7px; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--green); border: 2px solid #fff;
}
.timeline .when { font-size: 12px; color: var(--muted); }
.timeline .note { font-size: 13.5px; margin-top: 2px; }

/* ---------- success ---------- */
.success { text-align: center; padding: 26px 14px; }
.success .big { font-size: 52px; }
.success .refno {
  font-size: 30px; font-weight: 900; color: var(--green);
  background: #E9F4EF; border-radius: 12px; padding: 10px 18px;
  display: inline-block; margin: 10px 0; letter-spacing: 1px;
}

/* ---------- about ---------- */
.promise li { margin-bottom: 8px; }
.step { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.step .n {
  background: var(--green); color: #fff; font-weight: 800; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex: none;
}
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 0 6px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px);
  bottom: 84px; background: var(--ink); color: #fff; padding: 11px 18px;
  border-radius: 10px; font-size: 14.5px; opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 3000; max-width: 92vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }

/* ---------- offline banner ---------- */
.banner {
  background: #FCEBD9; border: 1px solid #EDC9A3; color: #7A4A12;
  border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px;
}

/* ---------- admin ---------- */
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.acard { border-left: 5px solid var(--line); }
.acard .private {
  background: #FFF8E8; border: 1px dashed #E7CE93; border-radius: 8px;
  padding: 8px 10px; font-size: 13.5px; margin: 8px 0;
}
.arow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.athumb { max-height: 160px; border-radius: 8px; }
.statgrid { display: flex; gap: 8px; flex-wrap: wrap; }
.statgrid .counter { color: var(--ink); background: #fff; border: 1px solid var(--line); min-width: 90px; }

@media (min-width: 640px) {
  .chips { grid-template-columns: repeat(4, 1fr); }
  .modal-back { align-items: center; }
  .modal { border-radius: 18px; }
}
