/* POSTE-PH — Pole Optimization, Standardization, and Tracking Ecosystem for Prevention of Hazards — friendly community styles */
:root {
  /* colour scheme follows the Provincial Government of Bataan website (navy, crimson, white) */
  --navy: #202b5d;
  --head: #202b5d;
  --navy-dark: #132244;
  --navy-deep: #06163a;
  --crimson: #df193a;
  --crimson-dark: #b5122e;
  --ink: #132244;
  --text: #4b5a78;
  --muted: #62718d;
  --line: #cfd6e4;
  --line-soft: #e6eaf2;
  --ground: #f3f5f9;
  --card: #ffffff;
  --tint: #e8ebf4;
  --gold: #f2c14e;
  --gold-dark: #8a5a00;
  --green: #1f8f5f;
  --green-dark: #145c3c;
  --green-bg: #e7f5ee;
  --red: #d63a3a;
  --red-dark: #a32424;
  --red-bg: #fdecec;
  --amber: #e59a0b;
  --ph0: #b3261e;
  --ph1: #d14d1a;
  --ph2: #8a5a00;
  --focus: #2563eb;
  --radius: 22px;
  --shadow: 0 2px 10px rgba(19, 34, 68, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Roboto', system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
  font-size: 15px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
h1 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
h2 { font-size: 17px; font-weight: 800; margin: 0 0 10px; }
p { margin: 0 0 10px; }
code { font-family: ui-monospace, monospace; background: var(--tint); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--text); font-weight: 500; }
.small { font-size: 13px; }
.center-text { text-align: center; }
.red { color: var(--red-dark); }
[hidden] { display: none !important; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line-soft);
}
.brand-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 44px; height: 44px; flex: 0 0 auto; }
.brand { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-title { font-size: 22px; font-weight: 800; letter-spacing: .08em; }
.brand-pilot { white-space: nowrap; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-dark); background: #fff4dc; border-radius: 999px; padding: 2px 8px; vertical-align: 4px; margin-left: 4px; }
.brand-full { font-size: 11px; font-weight: 600; color: var(--text); margin-top: 2px; }
.brand-by { font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.me { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.me-name { font-weight: 800; }
.role-chip { font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--head); }
.role-chip.engineer, .role-chip.admin { background: var(--navy); color: #fff; }
.link-btn { background: none; border: 0; color: var(--head); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 2px; min-height: 36px; }
.link-btn:hover { color: var(--head); }

.lang-toggle { display: inline-flex; background: var(--tint); border-radius: 999px; padding: 3px; flex: 0 0 auto; }
.lang-toggle button { border: 0; border-radius: 999px; min-width: 46px; height: 34px; font-size: 12px; font-weight: 800; background: transparent; color: var(--head); cursor: pointer; }
.lang-toggle button.on { background: var(--navy); color: #fff; }
.lang-toggle.dark { background: rgba(255, 255, 255, .14); }
.lang-toggle.dark button { color: #fff; }
.lang-toggle.dark button.on { background: #fff; color: var(--head); }

/* ---------------------------------------------------------------- generic */
.screen.center { min-height: calc(100vh - 70px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.narrow { width: 100%; max-width: 440px; }
.card.narrow-wide { max-width: 820px; margin: 0 auto; }
main { padding: 0 0 96px; }
.view { padding: 14px 16px 24px; max-width: 1440px; margin: 0 auto; }

/* ---------------------------------------------------------------- sign in */
.signin {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 16px;
  background: linear-gradient(180deg, var(--navy) 0, var(--navy) 330px, var(--ground) 330px);
}
.signin-top { width: 100%; max-width: 440px; display: flex; justify-content: flex-end; }
.signin-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 8px 26px; color: #fff; }
.signin-brand img { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.signin-name { font-size: 38px; font-weight: 800; letter-spacing: .1em; line-height: 1; margin-top: 8px; }
.signin-full { font-size: 13px; font-weight: 600; color: #cfe0ec; max-width: 300px; }
.signin-by { font-size: 11px; font-weight: 800; color: var(--gold); letter-spacing: .08em; }
.signin-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 4px; padding: 22px 18px; box-shadow: 0 6px 20px rgba(18, 58, 92, .12); }
.signin-privacy { max-width: 440px; margin: 18px 0 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---------------------------------------------------------------- tabs: top on desktop, bottom on phones */
.tabs { display: flex; gap: 6px; padding: 10px 16px 0; max-width: 1440px; margin: 0 auto; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--head); font-weight: 700; cursor: pointer;
}
.tab.on { background: var(--navy); border-color: var(--head); color: #fff; }
.tab .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--head); font-size: 12px; font-weight: 800; }
.tab .count:empty { display: none; }
@media (max-width: 720px) {
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; margin: 0; max-width: none; gap: 0;
    background: #fff; border-top: 1px solid var(--line-soft);
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .tab { position: relative; flex: 1 1 0; flex-direction: column; gap: 2px; padding: 4px 2px; min-height: 52px; border: 0; border-radius: 14px; font-size: 11px; color: var(--muted); background: transparent; }
  .tab.on { background: transparent; color: var(--head); font-weight: 800; }
  .tab.on svg { stroke-width: 2.4; }
  .tab .count { position: absolute; top: 2px; left: calc(50% + 6px); }
}

/* ---------------------------------------------------------------- forms & buttons */
.field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--head); }
.field.inline { margin: 0; min-width: 170px; flex: 1 1 170px; font-size: 12px; color: var(--text); }
input[type=email], input[type=text], select, textarea {
  font: inherit; font-size: 16px; font-weight: 600; color: var(--head); background: #fff;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px; min-height: 48px; width: 100%;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #8aa0b2; font-weight: 500; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--navy);
  background: #fff; color: var(--head); font-weight: 800; cursor: pointer; text-decoration: none; font-size: 14px;
}
.btn:hover { background: #f0f6fb; }
.btn.primary { background: var(--navy); border-color: var(--head); color: #fff; }
.btn.primary:hover { background: var(--navy-dark); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--head); box-shadow: 0 4px 12px rgba(242, 193, 78, .45); }
.btn.gold:hover { background: #e8b53d; }
.btn.outline { border-width: 2px; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.big { width: 100%; min-height: 56px; font-size: 16px; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.msg { font-size: 14px; font-weight: 600; margin: 10px 0 0; }
.msg:empty { display: none; }
.msg.err { color: var(--red-dark); }
.msg.ok { color: var(--green-dark); }

/* ---------------------------------------------------------------- dashboard */
.hello { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 12px; }
.hello-hi { font-size: 24px; font-weight: 800; }
.hello-sub { font-size: 14px; font-weight: 500; color: var(--text); }
.map-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.map-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.side { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--head); font-size: 13px; font-weight: 700; cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--head); }
.map-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map { height: 62vh; min-height: 420px; background: #d9eef8; }
.map.small { height: 260px; min-height: 260px; margin: 12px 0 0; border-radius: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; font-size: 12px; font-weight: 600; color: var(--text); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1.5px solid var(--navy); }
.dot.red { background: var(--red); border-color: #fff; box-shadow: 0 0 0 1px var(--red-dark); }
.dot.white { background: #fff; }
.dot.amber { background: #f5b335; }
.dot.ring { background: #fff; border: 3px solid var(--gold); }
.fab { align-self: stretch; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tile { display: flex; flex-direction: column; gap: 1px; background: var(--ground); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.tile.good { background: var(--green-bg); color: var(--green-dark); }
.tile.flag { background: var(--red-bg); color: var(--red-dark); }
.tile .kpi-label { color: inherit; }
.kpi-grid > div { display: flex; flex-direction: column; gap: 3px; }
.kpi-label { font-size: 12px; font-weight: 700; color: var(--text); }
.kpi { font-size: 26px; font-weight: 800; line-height: 1.1; }
.kpi-sub { font-size: 12px; font-weight: 700; }
.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line-soft); margin-bottom: 8px; }
.bar i { display: block; height: 100%; }
.bar-good { background: var(--green); }
.bar-flag { background: var(--red); }
.bar-pend { background: #f5b335; }
.ratios { font-size: 12px; font-weight: 600; color: var(--text); display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 4px; font-size: 14px; }
.kpi-grid + .kpi-grid { margin-top: 12px; }
.ph0 { color: var(--ph0); } .ph1 { color: var(--ph1); } .ph2 { color: var(--ph2); }
.note { font-size: 13px; font-weight: 500; color: var(--text); margin: 12px 0 0; border-top: 1px solid var(--line-soft); padding-top: 10px; }

.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px;
  padding: 8px 6px; border: 0; border-top: 1px solid var(--line-soft); background: transparent; text-align: left; cursor: pointer; color: var(--head); border-radius: 10px;
}
.row:first-child { border-top: 0; }
.row:hover { background: #f0f6fb; }
.row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 12px; font-weight: 600; color: var(--text); }
.row-meter { width: 70px; height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; flex: 0 0 auto; }
.row-meter i { display: block; height: 100%; background: var(--red); }
.empty { color: var(--text); font-size: 14px; padding: 10px 0; }

/* badges */
.badge { display: inline-block; font-size: 12px; font-weight: 800; color: #fff; border-radius: 8px; padding: 3px 9px; white-space: nowrap; }
.badge.ph0 { background: var(--ph0); }
.badge.ph1 { background: var(--ph1); }
.badge.ph2 { background: var(--ph2); }
.badge.ok { background: var(--green); }
.badge.pending { background: var(--amber); }
.badge.removed { background: #6b7280; }
.badge.cat { background: var(--tint); color: var(--head); }
.badge.cat.EC { background: #e8e3fb; color: #4b3a8f; }
.badge.cat.EL { background: #fff1d6; color: #7a4a00; }
.badge.cat.SC { background: #e6eef6; color: var(--head); }

/* ---------------------------------------------------------------- report */
.report { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.report-head h1 { margin: 0 0 2px; }
.report-head p { margin: 0; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; }
.stepper .dotn { width: 30px; height: 30px; border-radius: 50%; background: var(--line-soft); color: var(--text); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.stepper li.now { color: var(--head); font-weight: 800; }
.stepper li.now .dotn { background: var(--navy); color: #fff; }
.stepper li.done { color: var(--green-dark); }
.stepper li.done .dotn { background: var(--green); color: transparent; position: relative; }
.stepper li.done .dotn::after { content: ''; position: absolute; left: 10px; top: 7px; width: 7px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.safety { display: flex; gap: 12px; align-items: flex-start; background: #fff4dc; border: 1.5px solid var(--gold); border-radius: 18px; padding: 12px 14px; color: #5c3d00; font-size: 14px; font-weight: 600; }
.safety svg { flex: 0 0 auto; }
.safety b { display: block; font-size: 15px; font-weight: 800; }
.step h2 { margin-bottom: 6px; }
.photos { display: flex; flex-direction: column; gap: 10px; }
.photo-slot { display: flex; gap: 12px; align-items: center; padding: 10px; border: 2px dashed var(--line); border-radius: 18px; background: #fff; }
.photo-slot.done { border-style: solid; border-color: var(--green); background: #f3fbf6; }
.photo-preview {
  position: relative; width: 96px; height: 96px; flex: 0 0 auto; border-radius: 14px; overflow: hidden;
  background: var(--tint) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='36' height='36' fill='none' stroke='%235b7287' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 8h3l2-3h6l2 3h3v11H4z'/><circle cx='12' cy='13' r='3.5'/></svg>") center / 36px no-repeat;
}
.photo-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-num { position: absolute; left: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.photo-slot.done .photo-num { background: var(--green); }
.photo-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.photo-title { font-weight: 800; font-size: 15px; }
.photo-hint { font-size: 12px; font-weight: 600; color: var(--muted); }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.photo-actions .btn { position: relative; flex: 1 1 auto; min-height: 44px; }
.photo-actions input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-actions .btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.photo-slot.done .photo-actions .btn.primary { background: #fff; color: var(--head); }
.field.street { margin: 14px 0 0; }
.field .opt { font-weight: 600; color: var(--muted); }
.field .hint { font-weight: 600; font-size: 12px; color: var(--muted); }
.map-wrap { position: relative; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; margin-top: 8px; border: 1.5px solid var(--line); border-radius: 14px; font-size: 14px; cursor: pointer; }
.choice:has(input:checked) { border: 2px solid var(--navy); background: #f0f6fb; }
.choice input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--head); }
.who { border: 0; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.who legend { font-size: 14px; font-weight: 700; padding: 0; margin-bottom: 0; }
.who .hint { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.choice img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; background: var(--tint); flex: 0 0 auto; }

/* ---------------------------------------------------------------- pole record sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(11, 39, 64, .45); z-index: 1200; }
.sheet {
  position: fixed; z-index: 1300; top: 0; right: 0; bottom: 0; width: min(520px, 100vw);
  background: var(--ground); box-shadow: -8px 0 24px rgba(0, 0, 0, .18); display: flex; flex-direction: column;
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px 12px; background: #fff; border-bottom: 1px solid var(--line-soft); }
.sheet-kicker { font-size: 12px; font-weight: 700; color: var(--muted); }
.sheet-head h2 { margin: 0; font-size: 19px; letter-spacing: .02em; }
.sheet-head p { margin: 2px 0 0; font-size: 13px; }
.sheet-body { overflow-y: auto; padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; color: var(--head); flex: 0 0 auto; }
.icon-btn:hover { background: var(--tint); }
.status-card { border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; border: 2px solid; }
.status-card .st-top { display: flex; align-items: center; gap: 12px; }
.status-card .st-icon { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; }
.status-card .st-kicker { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.status-card .st-head { font-size: 20px; font-weight: 800; line-height: 1.2; }
.status-card p { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.45; }
.status-card .st-meta { font-size: 12px; font-weight: 700; }
.status-card.flag { background: var(--red-bg); border-color: var(--red); color: var(--red-dark); }
.status-card.flag .st-icon { background: var(--red); }
.status-card.flag p { color: #6b1d1d; }
.status-card.good { background: var(--green-bg); border-color: var(--green); color: var(--green-dark); }
.status-card.good .st-icon { background: var(--green); }
.status-card.pend { background: #fff4dc; border-color: var(--gold); color: #5c3d00; }
.status-card.pend .st-icon { background: var(--amber); }
.status-card.gone { background: #eef1f4; border-color: #9aa6b2; color: #3b4652; }
.status-card.gone .st-icon { background: #6b7280; }
.jur-pill { display: inline-block; background: var(--navy); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 800; margin-right: 6px; }
.jur-pill.lgu { background: var(--tint); color: var(--head); }
.box { background: #fff; border-radius: 18px; padding: 12px 14px; font-size: 14px; box-shadow: var(--shadow); }
.box.tint { display: flex; gap: 12px; align-items: center; }
.box.tint .shield { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: var(--green-bg); display: flex; align-items: center; justify-content: center; }
.sec { background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.shots figure { margin: 0; }
.shots a { display: block; }
.shots img, .shots .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--tint); display: block; }
.shots figcaption { font-size: 11px; font-weight: 700; color: var(--text); margin-top: 4px; text-align: center; }
.finding { border: 1.5px solid var(--line-soft); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.finding .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.finding .f-title { font-size: 15px; font-weight: 800; }
.finding .f-basis { font-size: 12px; font-weight: 600; color: var(--muted); }
.finding .f-consult { font-size: 12px; font-weight: 800; }
.report-item { border-top: 1px solid var(--line-soft); padding: 8px 0; font-size: 14px; }
.report-item:first-child { border-top: 0; padding-top: 0; }
.section-label { font-size: 15px; font-weight: 800; margin: 0; }
.actions { display: flex; flex-direction: column; gap: 10px; }

/* AI suggestion (engineers) */
.ai-box { background: #f3f0ff; border: 2px dashed #7a63d1; border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.ai-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-tag { background: #4b3a8f; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.ai-level { font-size: 16px; }
.ai-findings { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.ai-findings li { margin-bottom: 4px; }
.ai-box .btn { align-self: flex-start; margin-top: 8px; }

/* review form (engineers) */
.review { background: #fff; border: 2px solid var(--navy); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.review .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.review .field { margin: 0; font-size: 13px; }
.frow { border: 1.5px solid var(--line-soft); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.frow .grid3 { display: grid; grid-template-columns: 90px minmax(0, 1fr) 120px; gap: 8px; }
@media (max-width: 480px) { .frow .grid3 { grid-template-columns: 1fr 1fr; } .review .grid2 { grid-template-columns: 1fr; } }
.confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.confirm input { width: 22px; height: 22px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--head); }

/* guide */
.guide { max-width: 760px; margin: 0 auto; }
.guide h2 { margin-top: 20px; }
.codes { display: grid; grid-template-columns: auto 1fr; gap: 12px 12px; margin: 12px 0; }
.codes dt { padding-top: 2px; }
.codes dd { margin: 0; font-size: 14px; }
.guide li { margin-bottom: 6px; font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 1400;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 600; max-width: calc(100vw - 32px);
}

/* leaflet tweaks */
.leaflet-container { font-family: 'Roboto', system-ui, sans-serif; }
.area-label { background: transparent; border: 0; box-shadow: none; font-weight: 800; font-size: 12px; color: var(--head); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.area-label::before { display: none; }

/* big province name drawn in the sea beside the peninsula (shown when the whole province is in view) */
.prov-label { background: none; border: 0; }
.prov-label span {
  display: inline-block; transform: translate(-100%, -50%); white-space: nowrap;
  font-family: 'Roboto', system-ui, sans-serif; font-weight: 800; font-size: 44px; letter-spacing: .2em;
  color: var(--head); opacity: .9;
  text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px #fff;
}
/* big area name across the top of the map: the selected town or barangay, and BATAAN on phones */
.map-title {
  display: none; position: absolute; top: 10px; left: 56px; right: 56px; z-index: 450; pointer-events: none; text-align: center;
  font-weight: 800; font-size: 34px; line-height: 1.1; letter-spacing: .14em; color: var(--head); text-wrap: balance;
  text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px #fff;
}
.map-wrap.area .map-title { display: block; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 720px) {
  .topbar { padding: 10px 12px; }
  .brand-full { font-size: 9.5px; }
  .brand-title { font-size: 20px; }
  .brand-pilot { font-size: 9px; padding: 2px 6px; }
  .top-right { width: 100%; justify-content: space-between; }
  .topbar .lang-toggle { position: absolute; top: 14px; right: 12px; }
  .brand-row { padding-right: 104px; }
  .me { gap: 4px 12px; flex-wrap: nowrap; }
  .me-name { display: none; }
  .me .link-btn { min-height: 32px; font-size: 12.5px; }
  .hello { margin-top: 0; }
  .map { height: 52vh; min-height: 320px; }
  .prov-label { display: none; }
  .map-title { font-size: 26px; letter-spacing: .12em; }
  .map-wrap.prov:not(.zoomed) .map-title { display: block; }
  .filters .btn.ghost { display: none; }
}

/* engineers: fix a pole's position */
.move-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1000; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: #fff; border: 2px solid var(--navy); border-radius: 14px; padding: 10px 12px; box-shadow: 0 6px 18px rgba(18, 58, 92, .22); }
.move-text { flex: 1 1 220px; margin: 0; font-size: 13px; font-weight: 600; color: var(--head); }
.move-btns { display: flex; gap: 8px; }

#btnRefresh.busy { opacity: .7; cursor: progress; }


/* ================================================================ Bataan provincial look
   navy top band, crimson menu bar, white pages, Roboto / Roboto Slab (no provincial logos are used) */
h1, h2, .brand-title, .signin-name { font-family: 'Roboto Slab', 'Roboto', serif; }
h1, h2 { color: var(--head); font-weight: 700; }

.topbar { background: var(--navy); border-bottom: 4px solid var(--crimson); color: #fff; }
.topbar .brand-title { color: #fff; font-weight: 700; }
.topbar .brand-full { color: #c9d1e6; }
.topbar .brand-by { color: #aab4cf; }
.brand-pilot { color: #fff; background: var(--crimson); }
.topbar .link-btn { color: #fff; }
.topbar .link-btn:hover { color: #ffd1d8; }
.topbar .role-chip { background: rgba(255, 255, 255, .16); color: #fff; }
.topbar .role-chip.engineer, .topbar .role-chip.admin { background: var(--crimson); color: #fff; }
.topbar .lang-toggle { background: rgba(255, 255, 255, .14); }
.topbar .lang-toggle button { color: #fff; }
.topbar .lang-toggle button.on { background: #fff; color: var(--head); }

/* main call-to-action buttons: crimson, like the provincial site */
.btn.gold { background: var(--crimson); border-color: var(--crimson); color: #fff; box-shadow: 0 4px 12px rgba(223, 25, 58, .3); }
.btn.gold:hover { background: var(--crimson-dark); border-color: var(--crimson-dark); }
.btn.primary { background: var(--navy); border-color: var(--head); }
.btn.primary:hover { background: var(--navy-dark); }
.tab .count { background: var(--crimson); color: #fff; }

/* sign-in: deep navy band */
.signin { background: linear-gradient(180deg, var(--navy-dark) 0, var(--navy) 330px, var(--ground) 330px); }
.signin-full { color: #c9d1e6; }
.signin-by { color: #ff8a9c; }
.signin-card { border-top: 4px solid var(--crimson); }

/* desktop: crimson menu bar across the page */
@media (min-width: 721px) {
  .tabs { max-width: none; margin: 0; padding: 8px max(16px, calc((100% - 1440px) / 2 + 16px)); background: var(--crimson); gap: 4px; }
  .tab { background: transparent; border-color: transparent; color: #fff; }
  .tab:hover { background: rgba(255, 255, 255, .14); }
  .tab.on { background: #fff; border-color: #fff; color: var(--crimson); }
  .tab.on .count { background: var(--navy); }
}
/* phones: white bottom bar, crimson for the open section */
@media (max-width: 720px) {
  .tabs { border-top: 3px solid var(--crimson); }
  .tab.on { color: var(--crimson); }
}

/* Guide: "What happens to your report" steps */
.guide .flow-title { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 4px solid var(--line-soft); }
.flow { list-style: none; counter-reset: step; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 18px; }
.flow li { counter-increment: step; margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.flow li b { font-size: 15px; color: var(--head); }
.flow li b::before { content: counter(step) ". "; color: var(--crimson); }
.flow li span { color: var(--text); }
@media (min-width: 1000px) { .guide { max-width: 1040px; } .flow { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 520px) { .flow { grid-template-columns: repeat(2, 1fr); } }

/* People and exposure */
.people { border-top: 1px solid var(--line-soft); margin-top: 12px; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.people-title { font-size: 13px; color: var(--head); }
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.people-grid > div { display: flex; flex-direction: column; gap: 2px; background: var(--ground); border-radius: 12px; padding: 8px 10px; }
.people-grid b { font-size: 20px; color: var(--ink); line-height: 1.15; }
.people-grid .kpi-sub { color: var(--muted); font-weight: 600; }
.exposure { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--text); }
.exp-badge { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--head); }
.exposure.low .exp-badge { background: #fff4dc; color: #6b4a00; }
.exposure.medium .exp-badge { background: #ffe3cc; color: #8a3a00; }
.exposure.high .exp-badge { background: var(--crimson); color: #fff; }
@media (max-width: 420px) { .people-grid { grid-template-columns: 1fr 1fr; } .people-grid > div:last-child { grid-column: span 2; } }

/* districts list: district header with its towns indented */
.dist-group { display: flex; flex-direction: column; gap: 6px; }
.dist-group + .dist-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.row.dist-row { background: var(--navy); border-color: var(--head); color: #fff; }
.row.dist-row .row-sub { color: #c9d1e6; }
.row.dist-row .row-meter { background: rgba(255, 255, 255, .2); }
.dist-towns { display: flex; flex-direction: column; gap: 6px; padding-left: 14px; border-left: 3px solid var(--crimson); margin-left: 6px; }
.row.dist-row { padding: 10px 12px; }
.row.dist-row:hover { background: var(--navy-dark); }
.row.dist-row .row-title { white-space: normal; }

/* dashboard headline (the slogan, in place of the old greeting) */
.slogan { font-family: 'Roboto Slab', 'Roboto', serif; font-size: 26px; line-height: 1.2; font-weight: 700; color: var(--head); margin: 2px 0 0; text-wrap: balance; }
@media (max-width: 720px) { .slogan { font-size: 22px; } }

/* People and exposure: highlighted card at the top of the side panel */
.people-card { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; border-top: 5px solid var(--crimson); display: flex; flex-direction: column; gap: 12px; }
.pc-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ffd1d8; }
.pc-pop { display: flex; flex-direction: column; gap: 2px; }
.pc-pop b { font-family: 'Roboto Slab', 'Roboto', serif; font-size: 44px; line-height: 1; font-weight: 700; color: #fff; letter-spacing: .01em; }
.pc-pop > span { font-size: 13px; font-weight: 600; color: #c9d1e6; }
.pc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pc-grid > div { display: flex; flex-direction: column; gap: 2px; background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 10px 12px; }
.pc-label { font-size: 12px; font-weight: 700; color: #c9d1e6; }
.pc-grid b { font-size: 26px; line-height: 1.1; font-weight: 800; color: #fff; }
.pc-sub { font-size: 12px; font-weight: 600; color: #aab4cf; }
.people-card .exposure { color: #e6eaf4; font-size: 14px; }
.people-card .exp-badge { font-size: 14px; padding: 5px 14px; }
.people-card .exposure.none .exp-badge { background: rgba(255, 255, 255, .16); color: #fff; }
.pc-why summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pc-why p { margin: 8px 0 0; font-size: 13px; color: #d5dbeb; }

/* photo requirement tags and the gentle tip */
.photo-need { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.photo-need.required { background: var(--crimson); color: #fff; }
.photo-need.recommended { background: var(--tint); color: var(--head); }
.photo-tip { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff4dc; border: 1.5px solid var(--gold); color: #5c3d00; font-size: 14px; font-weight: 600; }

/* ================================================================ live feed below the map */
.feed { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feed-head h2 { margin: 0; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--crimson); background: #ffe6ea; padding: 3px 10px; border-radius: 999px; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); animation: livepulse 1.4s ease-in-out infinite; }
@keyframes livepulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .live-pill i { animation: none; } }
.feed-lead { margin: 0 0 4px; }
.feed-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feed-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; cursor: pointer; color: var(--ink); font: inherit; }
.feed-card:hover { border-color: var(--head); box-shadow: var(--shadow); }
.feed-photo { display: block; aspect-ratio: 4 / 3; background: var(--tint); }
.feed-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.feed-meta { font-size: 12px; color: var(--muted); }
.feed-meta b { color: var(--head); }
.feed-place { font-size: 13px; font-weight: 700; color: var(--head); }
.feed-confirmed { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; align-self: flex-start; }
.feed-confirmed.ok { background: var(--green-bg); color: var(--green-dark); }
.feed-confirmed.haz { background: var(--red-bg); color: var(--red-dark); }
@media (max-width: 900px) { .feed-list { grid-template-columns: 1fr; } .feed-card { flex-direction: row; } .feed-photo { flex: 0 0 34%; aspect-ratio: auto; min-height: 120px; } }

/* AI pre-assessment as the public sees it: dashed, labelled, never mistaken for a decision */
.ai-pub { background: #f3f0ff; border: 2px dashed #7a63d1; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.ai-pub .ai-level { font-size: 14px; color: #3b2d7a; }
.ai-pub.lv-ph-0 .ai-level, .ai-pub.lv-ph-1 .ai-level { color: var(--red-dark); }
.ai-sum { margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sheet .ai-sum { -webkit-line-clamp: unset; display: block; }
.ai-cats { display: flex; flex-wrap: wrap; gap: 4px; }
.ai-wait { margin: 4px 0 0; font-size: 12px; font-weight: 800; color: #4b3a8f; }
.ai-pub.none { background: var(--ground); border-color: var(--line); }

/* status by discipline */
.disc-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.disc-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 10px; }
.disc-row.wait { background: #f3f0ff; color: #4b3a8f; }
.disc-row.haz { background: var(--red-bg); color: var(--red-dark); }
.disc-row.ok { background: var(--green-bg); color: var(--green-dark); }
.feed-body .disc-list { margin: 0; }
.pub-top { width: 100%; max-height: 360px; object-fit: cover; border-radius: 14px; display: block; }

/* licensed engineers: apply, and the administrator's panel */
.eng-form .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eng-form .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .eng-form .grid3, .eng-form .grid2 { grid-template-columns: 1fr; } }
.eng-preview { max-width: 100%; max-height: 220px; border-radius: 12px; margin-top: 8px; display: block; }
.apps-card { margin-top: 16px; }
.app-item { display: flex; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.app-id { width: 220px; max-width: 100%; border-radius: 10px; display: block; }
.app-info { flex: 1 1 240px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.app-check { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 10px; background: var(--tint); }
.app-check.looks_valid { background: var(--green-bg); color: var(--green-dark); }
.app-check.check_carefully, .app-check.mismatch, .app-check.suspicious { background: var(--red-bg); color: var(--red-dark); }
.app-btns { display: flex; gap: 8px; margin-top: 4px; }

/* ================================================================ pole view in the Bataan provincial look */
.sheet-head { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; border-bottom: 4px solid var(--crimson); }
.sheet-kicker { color: #ffd1d8; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.sheet-head h2 { color: #fff; font-family: 'Roboto Slab', 'Roboto', serif; font-size: 22px; }
.sheet-head p, .sheet-head .muted { color: #c9d1e6; }
.sheet-head .icon-btn { color: #fff; }
.sheet-head .icon-btn:hover { background: rgba(255, 255, 255, .14); }
.sheet-body { background: var(--ground); }
.sheet .section-label, .sheet .sec > .section-label { color: var(--head); font-family: 'Roboto Slab', 'Roboto', serif; padding-left: 10px; border-left: 4px solid var(--crimson); margin-bottom: 8px; }
.sheet-head :focus-visible { outline-color: #fff; }
.sheet .jur-pill { background: var(--navy); }
.sheet .jur-pill.lgu { background: var(--tint); color: var(--head); }
.sheet .finding { background: #fff; border-color: var(--line); border-left: 4px solid var(--navy); }
.sheet .report-item { color: var(--ink); }

/* AI box and discipline rows in navy (dashed = AI, not a decision) */
.ai-pub, .ai-box { background: #eef1f8; border-color: var(--head); }
.ai-pub .ai-tag, .ai-box .ai-tag { background: var(--navy); }
.ai-pub .ai-level, .ai-box .ai-level { color: var(--head); }
.ai-pub.lv-ph-0 .ai-level, .ai-pub.lv-ph-1 .ai-level { color: var(--crimson-dark); }
.ai-wait { color: var(--head); }
.disc-row.wait { background: #eef1f8; color: var(--head); }
.badge.cat.EC { background: #e3e7f3; color: var(--head); }
.badge.cat.SC { background: #e9edf2; color: #3b4a5c; }

/* pole page: "Review — I am a licensed engineer" */
.eng-review { display: grid; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(32, 43, 93, .25); }
.btn.navy { background: var(--navy, #202b5d); border-color: var(--navy, #202b5d); color: #fff; }
.btn.navy:hover { background: var(--navy-dark, #132244); border-color: var(--navy-dark, #132244); }
/* sheet sections keep their full height (a long pole page scrolls instead of squashing the photo) */
.sheet-body > * { flex-shrink: 0; }
.sec > * { flex-shrink: 0; }

/* hanging cable reports */
.kind-pick { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kind-pick legend { font-weight: 700; color: var(--navy, #202b5d); margin-bottom: 8px; padding: 0; }
.kind-opt { position: relative; cursor: pointer; }
.kind-opt input { position: absolute; opacity: 0; }
.kind-opt > span { display: grid; gap: 4px; justify-items: start; height: 100%; padding: 12px; border: 2px solid rgba(32, 43, 93, .2); border-radius: 14px; background: #fff; color: var(--navy, #202b5d); }
.kind-opt small { color: #5b6378; font-size: 12.5px; line-height: 1.35; }
.kind-opt input:checked + span { border-color: var(--crimson, #df193a); box-shadow: 0 0 0 3px rgba(223, 25, 58, .15); }
.kind-opt input:focus-visible + span { outline: 2px solid var(--navy, #202b5d); outline-offset: 2px; }
.cable-mk span { display: block; width: 12px; height: 12px; margin: 2px; transform: rotate(45deg); border-style: solid; border-radius: 2px; box-sizing: border-box; }
.legend .dia { display: inline-block; width: 10px; height: 10px; transform: rotate(45deg); border: 1.5px solid #202b5d; background: #f5b335; margin-right: 6px; vertical-align: middle; }
.kind-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: #202b5d; color: #fff; vertical-align: 1px; }
@media (max-width: 420px) { .kind-pick { grid-template-columns: 1fr; } }

/* =====================================================================
   GLASS DASHBOARD THEME (Option C): dark navy, frosted glass panels, cool light behind them
   ===================================================================== */
:root {
  --head: #ffffff;
  --ink: #e6ecfb;
  --text: #c3cdea;
  --muted: #9aa8cc;
  --line: rgba(255, 255, 255, .18);
  --line-soft: rgba(255, 255, 255, .09);
  --ground: #0b1638;
  --card: rgba(255, 255, 255, .07);
  --tint: rgba(255, 255, 255, .06);
  --navy: #2e4fb3;
  --navy-dark: #0b1638;
  --green: #2fbf7a; --green-dark: #5ee0a0; --green-bg: rgba(47, 191, 122, .14);
  --red: #ff4d63; --red-dark: #ff8597; --red-bg: rgba(255, 77, 99, .13);
  --amber: #ffc24a; --gold-dark: #ffd27a;
  --ph0: #ff4d63; --ph1: #ff8a4a; --ph2: #ffc24a;
  --shadow: 0 10px 34px rgba(0, 0, 0, .32);
  --glass: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05) 60%, rgba(255, 255, 255, .08));
  --glass-edge: rgba(255, 255, 255, .2);
}
html { background: #081028; }
body {
  color: var(--ink);
  background:
    radial-gradient(1100px 650px at 8% -8%, #1b3577 0, transparent 60%),
    radial-gradient(900px 600px at 100% 28%, #16306e 0, transparent 55%),
    radial-gradient(700px 700px at -10% 55%, rgba(31, 181, 201, .16) 0, transparent 60%),
    radial-gradient(800px 800px at 105% 80%, rgba(61, 107, 255, .2) 0, transparent 60%),
    radial-gradient(700px 600px at 40% 105%, rgba(123, 92, 255, .16) 0, transparent 60%),
    linear-gradient(180deg, #081028 0, #0b1638 50%, #081028 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
h1, h2, h3 { color: var(--head); }
a { color: #9cc3ff; }
.muted, .small.muted { color: var(--muted); }

/* glass surfaces */
.card, .sec, .box, .review, .map-card, .feed-card, .photo-slot, .choice, .kind-opt > span, .sheet .finding, .ai-pub, .ai-box,
#view-map > .sec, .dist, .kpi, .pk {
  background: var(--glass); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .28);
  color: var(--ink);
}
.dist, .kpi, .pk { background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* header: slim bar, POSTE-PH between two poles on the left, menu on the right */
.topbar { background: rgba(8, 16, 40, .62); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(255, 255, 255, .12); color: #fff; padding: 0; position: sticky; top: 0; display: block; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--crimson) 25%, var(--crimson) 75%, transparent); }
.topbar-in { width: 100%; max-width: 1400px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 16px; }
.brandx { position: relative; display: inline-block; flex: none; padding: var(--wire-room, 34px) var(--pole-right, 46px) 0 var(--pole-left, 52px); }
.brandx > svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.bx-text { position: relative; padding-bottom: 4px; }
.bx-name b { font: 700 22px 'Roboto Slab', serif; color: #fff; letter-spacing: .5px; }
.bx-name .pill { display: inline-block; margin-left: 8px; vertical-align: 3px; background: var(--crimson); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; box-shadow: 0 0 14px rgba(223, 25, 58, .55); }
.bx-full { display: block; font-size: 11.5px; color: #aab6da; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .brandx .flow { display: none; } }
.topbar .top-right { display: flex; align-items: center; gap: 10px; flex: none; }
.topbar .link-btn { color: #dfe6f7; }
.topbar .lang-toggle { background: rgba(255, 255, 255, .1); }
.topbar .lang-toggle button { color: #c9d3ef; }
.topbar .lang-toggle button.on { background: rgba(255, 255, 255, .9); color: #0b1638; }
.topbar .role-chip { background: rgba(255, 255, 255, .14); color: #fff; }
@media (min-width: 721px) {
  .topbar .tabs { margin: 0 0 0 auto; padding: 0; background: transparent; max-width: none; gap: 4px; }
  .topbar .tab { background: transparent; border: 1px solid transparent; color: #c9d3ef; min-height: 40px; padding: 0 14px; border-radius: 12px; font-weight: 500; }
  .topbar .tab svg { display: none; }
  .topbar .tab:hover { background: rgba(255, 255, 255, .08); }
  .topbar .tab.on { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .2); color: #fff; font-weight: 700; }
}
@media (max-width: 720px) {
  .topbar-in { padding: 6px 10px; }
  .bx-name b { font-size: 19px; } .bx-name .pill { font-size: 9px; } .bx-full { display: none; }
  .topbar .top-right { margin-left: auto; flex-direction: column; align-items: flex-end; gap: 4px; }
  .topbar .tabs { background: rgba(8, 16, 40, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid rgba(255, 255, 255, .14); }
  .topbar .tab { color: #9aa8cc; }
  .topbar .tab.on { color: #fff; }
}
.tab .count { background: var(--crimson); color: #fff; }

/* dashboard */
#view-map { max-width: 1400px; margin: 0 auto; }
.headline { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 6px 0 16px; }
.headline .slogan { margin: 0; color: #fff; font-size: 26px; }
.headline .filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0; }
.headline .field.inline > span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
#view-map > .sec { border-radius: 20px; padding: 18px 20px; margin-bottom: 18px; display: block; }
.sh { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; }
.sh h2 { margin: 0; font-size: 17px; font-weight: 700; color: #fff; }
.sh h2::before { content: ""; display: inline-block; width: 4px; height: 16px; background: var(--crimson); border-radius: 2px; margin-right: 10px; vertical-align: -2px; box-shadow: 0 0 10px var(--crimson); }
.sh .muted { font-size: 12.5px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) repeat(2, minmax(0, 1.45fr)); gap: 12px; }
.kpi, .pk { border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; min-width: 0; }
.kl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.kv { font: 900 36px/1.05 'Roboto', sans-serif; color: #fff; }
.ks { font-size: 12px; color: var(--muted); }
.k-total .kv { color: #a9c4ff; text-shadow: 0 0 18px rgba(120, 160, 255, .55); }
.k-flag .kv { color: var(--red); text-shadow: 0 0 18px rgba(255, 77, 99, .55); }
.k-good .kv { color: #3fd68b; text-shadow: 0 0 18px rgba(63, 214, 139, .45); }
.k-pend .kv { color: var(--amber); text-shadow: 0 0 18px rgba(255, 194, 74, .45); }
.lvrow { display: flex; gap: 8px; margin-top: 4px; }
.lvrow > span { flex: 1; min-width: 0; border-radius: 10px; padding: 6px 8px; background: rgba(255, 255, 255, .07); font-size: 12px; line-height: 1.25; color: var(--ink); }
.lvrow b { display: block; font: 900 22px/1.1 'Roboto', sans-serif; color: #fff; }
.lvrow i { display: block; font-style: normal; color: var(--muted); font-size: 11px; }
.lv0 b { color: var(--red); } .lv1 b { color: #ff8a4a; } .lv2 b { color: var(--amber); }
.sbar { display: flex; height: 8px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .08); margin-top: 16px; }
.sbar i { display: block; }
.sbar .f { background: linear-gradient(90deg, #ff4d63, #ff7a8a); box-shadow: 0 0 12px #ff4d63; }
.sbar .g { background: #3fd68b; }
.sbar .p { background: linear-gradient(90deg, #ffb52e, #ffd27a); }
.sleg { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.sleg i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.sleg .f { background: var(--red); } .sleg .g { background: #3fd68b; } .sleg .p { background: var(--amber); }
.sleg .jur { margin-left: auto; }
#kPending { margin-top: 10px; }
.dists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dists.one { grid-template-columns: minmax(0, 1fr); }
.dist { border-radius: 16px; padding: 14px; min-width: 0; }
.dh { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 100%; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.dh b { font-size: 15px; color: #fff; } .dh span { color: var(--muted); font-size: 12px; }
.dh:hover b, .dh:focus-visible b { text-decoration: underline; }
.dstats { display: flex; gap: 14px; align-items: center; margin: 10px 0; font-size: 12px; color: var(--muted); }
.dstats b { font-size: 19px; color: #fff; margin-right: 4px; } .dstats .fl b { color: var(--red); } .dstats .exp { margin-left: auto; }
#view-map table { width: 100%; border-collapse: collapse; font-size: 13px; }
#view-map th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#view-map td { padding: 8px 6px; border-bottom: 1px solid rgba(255, 255, 255, .06); color: var(--ink); }
#view-map .num { text-align: right; } #view-map .r { text-align: right; }
#view-map td.fl { color: var(--red); font-weight: 700; }
#view-map tr.rowlink { cursor: pointer; }
#view-map tr.rowlink:hover, #view-map tr.rowlink:focus-visible { background: rgba(255, 255, 255, .06); outline: none; }
#view-map tr.rowlink.on { background: rgba(120, 160, 255, .14); }
.tablewrap { overflow-x: auto; }
.btab td b { color: #fff; }
.exp { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px; white-space: nowrap; }
.exp.high { background: rgba(255, 77, 99, .2); color: #ff8597; box-shadow: inset 0 0 0 1px rgba(255, 77, 99, .6), 0 0 12px rgba(255, 77, 99, .3); }
.exp.medium { background: rgba(255, 159, 58, .18); color: #ffb469; box-shadow: inset 0 0 0 1px rgba(255, 159, 58, .55); }
.exp.low { background: rgba(230, 210, 90, .15); color: #ecd96f; box-shadow: inset 0 0 0 1px rgba(230, 210, 90, .5); }
.exp.none { color: var(--muted); padding: 0; }
.pplrow { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.1fr 1.5fr; gap: 12px; }
.pk .kv .exp { font-size: 20px; padding: 6px 18px; border-radius: 16px; }
.mixbar { display: flex; height: 12px; border-radius: 7px; overflow: hidden; margin: 8px 0 4px; gap: 3px; }
.mixbar .high { background: #ff4d63; box-shadow: 0 0 10px #ff4d63; } .mixbar .medium { background: #ff9f3a; } .mixbar .low { background: #e6d25a; } .mixbar .none { background: rgba(255, 255, 255, .1); }
#kMixText b { color: #fff; }
.people-card { background: var(--glass); border-top: 1px solid var(--glass-edge); color: var(--ink); }
.people-card .note { margin: 14px 0 0; padding: 0 0 0 10px; border: 0; border-left: 3px solid var(--crimson); font-size: 12.5px; color: var(--muted); }
.people-card .note b { color: #fff; }
.pc-why summary { color: #9cc3ff; } .pc-why p { color: var(--text); }
.map-sec .sh { align-items: center; }
.map-sec .legend { padding: 0; font-size: 12px; color: var(--muted); }
.map-sec #btnRefresh { margin-left: auto; }
.map-sec .map-wrap { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.map { background: #0a1430; height: 64vh; min-height: 440px; }
/* dark OpenStreetMap tiles to match the glass look (markers keep their real colours) */
/* (dark tile filter removed: the dashboard map now has its own Day / Night looks) */
.leaflet-container { background: #0a1430; font-family: 'Roboto', sans-serif; }
.leaflet-control-zoom a, .leaflet-bar a { background: rgba(11, 22, 56, .85); color: #fff; border-color: rgba(255, 255, 255, .18); }
.leaflet-control-attribution { background: rgba(8, 16, 40, .7) !important; color: #9aa8cc; }
.leaflet-control-attribution a { color: #9cc3ff; }
.leaflet-tooltip { background: rgba(11, 22, 56, .92); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.dot.white { background: #fff; } .dot.ring { background: transparent; }
.legend .dia { border-color: #fff; }
/* live feed: three cards in a row */
.feed .feed-head { align-items: center; }
.feed .feed-lead { flex-basis: 100%; }
@media (min-width: 900px) { .feed .feed-lead { flex-basis: auto; } }
.feed-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feed-card { border-radius: 16px; overflow: hidden; color: var(--ink); }
.feed-card:hover { border-color: rgba(255, 255, 255, .35); }
.feed-meta b, .feed-place { color: #fff; }
.live-pill { color: var(--red); text-shadow: 0 0 8px rgba(255, 77, 99, .6); }

/* general controls */
input[type=email], input[type=text], input[type=password], input[type=date], input[type=search], select, textarea {
  background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .22); }
select option { background: #0b1638; color: #fff; }
input::placeholder, textarea::placeholder { color: #8d9bc0; }
.field > span, label > span { color: var(--text); }
.btn { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn:hover { background: rgba(255, 255, 255, .14); }
.btn.primary { background: linear-gradient(180deg, #3a5fd0, #2a46a6); border-color: #4a6be0; color: #fff; }
.btn.gold { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.btn.outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn.ghost { background: transparent; color: #c9d3ef; border-color: rgba(255, 255, 255, .2); }
.btn.navy { background: linear-gradient(180deg, #3a5fd0, #2a46a6); border-color: #4a6be0; }
.chip { background: rgba(255, 255, 255, .07); color: #dfe6f7; border-color: rgba(255, 255, 255, .2); }
.chip.on { background: rgba(255, 255, 255, .9); color: #0b1638; border-color: #fff; }
.link-btn { color: #9cc3ff; }
.row { color: var(--ink); } .row:hover { background: rgba(255, 255, 255, .06); }
.note { color: var(--text); border-color: var(--line-soft); }
.msg.err { color: #ff8597; } .msg.ok { color: #5ee0a0; }
.toast { background: rgba(11, 22, 56, .95); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.badge.cat.EC { background: rgba(160, 140, 255, .2); color: #cfc4ff; }
.badge.cat.EL { background: rgba(255, 194, 74, .18); color: #ffd27a; }
.badge.cat.SC { background: rgba(140, 180, 255, .18); color: #b9d0ff; }
.role-chip { background: rgba(255, 255, 255, .12); color: #fff; }
/* report form */
.safety, .photo-tip { background: rgba(255, 194, 74, .1); border-color: rgba(255, 194, 74, .55); color: #ffe2a6; }
.safety b { color: #ffd27a; }
.photo-slot { border-style: dashed; }
.photo-slot.done { background: rgba(47, 191, 122, .1); border-color: var(--green); }
.photo-slot.done .photo-actions .btn.primary { background: rgba(255, 255, 255, .9); color: #0b1638; }
.choice:has(input:checked) { background: rgba(120, 160, 255, .15); border-color: #7fa2ff; }
.kind-opt > span { color: #fff; border: 1px solid var(--glass-edge); }
.kind-opt small { color: var(--muted); }
.kind-opt input:checked + span { border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(223, 25, 58, .25), inset 0 1px 0 rgba(255, 255, 255, .28); }
.kind-pick legend { color: #fff; }
.stepper .dotn { background: rgba(255, 255, 255, .1); color: var(--text); }
.stepper li.now .dotn { background: #3a5fd0; color: #fff; }
.stepper li.done { color: #5ee0a0; }
/* pole page (sheet) */
.sheet { background: rgba(10, 18, 44, .9); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); color: var(--ink); border-left: 1px solid rgba(255, 255, 255, .14); }
.sheet-head { background: rgba(8, 16, 40, .8); border-bottom: 2px solid var(--crimson); }
.status-card.flag { background: rgba(255, 77, 99, .12); border-color: rgba(255, 77, 99, .7); color: #ff9aa8; }
.status-card.flag p { color: #ffd0d6; }
.status-card.good { background: rgba(47, 191, 122, .12); border-color: rgba(47, 191, 122, .7); color: #7deab4; }
.status-card.pend { background: rgba(255, 194, 74, .1); border-color: rgba(255, 194, 74, .65); color: #ffd27a; }
.status-card.pend p, .status-card.good p { color: #e6ecfb; }
.status-card.gone { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); color: #c3cdea; }
.disc-row.wait { background: rgba(255, 255, 255, .06); color: #c3cdea; }
.disc-row.haz { background: rgba(255, 77, 99, .12); color: #ff9aa8; }
.disc-row.ok { background: rgba(47, 191, 122, .12); color: #7deab4; }
.ai-pub, .ai-box { background: rgba(120, 140, 255, .08); border: 1px dashed rgba(160, 180, 255, .45); }
.ai-tag { background: var(--crimson); color: #fff; }
.ai-level, .ai-pub .ai-level, .ai-box .ai-level { color: #dfe6f7; }
.ai-pub.lv-ph-0 .ai-level, .ai-pub.lv-ph-1 .ai-level, .ai-pub.lv-ph-2 .ai-level { color: #ff8597; }
.ai-pub .ai-tag, .ai-box .ai-tag { background: var(--crimson); }
.sheet .finding { border-left: 4px solid #7fa2ff; }
.eng-review { border-top-color: rgba(255, 255, 255, .2); }
/* sign-in screen */
.signin { background: transparent; }
.signin-card { border-top: 2px solid var(--crimson); }
.signin-name { color: #fff; } .signin-full, .signin-privacy { color: var(--text); }
/* guide */
.guide .flow-title { border-bottom-color: var(--line); }
.flow li b { color: #fff; } .flow li span { color: var(--text); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kpis .wide { grid-column: span 2; } .pplrow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .dists, .feed-list { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: 1fr 1fr; } .kpis .wide { grid-column: span 2; }
  .pplrow { grid-template-columns: 1fr 1fr; } .pplrow .pk:last-child { grid-column: span 2; }
  .sleg .jur { margin-left: 0; width: 100%; }
  .headline { flex-direction: column; align-items: stretch; } .headline .slogan { font-size: 22px; text-align: center; }
  #view-map > .sec { padding: 16px 14px; }
  .kv { font-size: 30px; }
}
@media (max-width: 720px) { .topbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(8, 16, 40, .94); } }
@media (max-width: 720px) {
  .topbar-in { flex-wrap: nowrap; gap: 8px; }
  .topbar .top-right { width: auto; flex: 0 1 auto; min-width: 0; margin-left: auto; position: static; }
  .topbar .top-right .lang-toggle { position: static; }
  .topbar .top-right .me { flex-wrap: wrap; justify-content: flex-end; }
}
.lang-toggle button.on, .lang-toggle.dark button.on { background: rgba(255, 255, 255, .92); color: #0b1638; } .lang-toggle button { color: #c9d3ef; } .lang-toggle { background: rgba(255, 255, 255, .1); }

/* ---------- every window and pop-up in the same glass finish ---------- */
:root { --glass-pop: linear-gradient(145deg, rgba(60, 90, 180, .38), rgba(14, 26, 66, .55) 55%, rgba(40, 60, 140, .4)); }
.sheet-backdrop, .gdlg-wrap { background: rgba(4, 8, 24, .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet { background: var(--glass-pop); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  border-left: 1px solid rgba(255, 255, 255, .24); box-shadow: -18px 0 50px rgba(0, 0, 0, .45), inset 1px 0 0 rgba(255, 255, 255, .25); }
.sheet-head { background: rgba(255, 255, 255, .07); border-bottom: 2px solid var(--crimson); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.sheet-body { background: transparent; }
.sheet .jur-pill { background: rgba(120, 160, 255, .35); color: #fff; }
.sheet .jur-pill.lgu { background: rgba(255, 255, 255, .14); color: #fff; }
.status-card { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); }
.toast { background: var(--glass-pop); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .26); border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .3); color: #fff; }
.move-bar { background: var(--glass-pop); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .26); box-shadow: 0 10px 30px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .3); }
.move-text { color: #fff; }
.leaflet-tooltip, .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: rgba(30, 50, 110, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: #fff; border: 1px solid rgba(255, 255, 255, .25); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.leaflet-tooltip-top::before, .leaflet-tooltip-bottom::before, .leaflet-tooltip-left::before, .leaflet-tooltip-right::before { border-color: transparent; }
.leaflet-control-zoom a, .leaflet-bar a { background: rgba(30, 50, 110, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* in-app dialog (replaces the browser's own pop-up boxes) */
.gdlg-wrap { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gdlg { width: min(420px, 100%); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 12px; color: #fff;
  background: var(--glass-pop); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .26); box-shadow: 0 20px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .32); }
.gdlg h2 { margin: 0; font: 700 19px 'Roboto Slab', serif; } .gdlg h2::before { content: ""; display: inline-block; width: 4px; height: 16px; background: var(--crimson); border-radius: 2px; margin-right: 10px; vertical-align: -1px; }
.gdlg-text { margin: 0; color: var(--text); font-size: 14px; }
.gdlg-in { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-size: 16px; }
.gdlg-btns { display: flex; gap: 10px; justify-content: flex-end; }
/* select menus open as dark lists to match */
select { color-scheme: dark; }

/* soft coloured light behind the glass (cool tones only, fixed while scrolling) */
.bglights { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bglights i { position: absolute; border-radius: 50%; filter: blur(90px); }
.bglights .l1 { width: 46vw; height: 46vw; left: -14vw; top: 18vh; background: #1fb5c9; opacity: .26; }
.bglights .l2 { width: 50vw; height: 50vw; right: -14vw; top: 42vh; background: #3d6bff; opacity: .34; }
.bglights .l3 { width: 42vw; height: 42vw; left: 26vw; bottom: -22vw; background: #7b5cff; opacity: .28; }
.bglights .l4 { width: 36vw; height: 36vw; right: 14vw; top: -14vw; background: #2f8cff; opacity: .26; }
body { position: relative; z-index: 0; }
/* a little more see-through so the light shows through the frosted panels */
:root { --glass: linear-gradient(135deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .035) 60%, rgba(255, 255, 255, .07)); }
@media (prefers-reduced-transparency: reduce) { .bglights { display: none; } }

/* =====================================================================
   CRYSTAL GLASS: clearer panes, bright cut edges, a diagonal light sheen
   ===================================================================== */
:root {
  --crystal: linear-gradient(135deg, rgba(255, 255, 255, .20) 0%, rgba(255, 255, 255, .06) 38%, rgba(255, 255, 255, .02) 62%, rgba(255, 255, 255, .12) 100%);
  --crystal-in: linear-gradient(150deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .04) 45%, rgba(255, 255, 255, .09) 100%);
  --crystal-edge: rgba(255, 255, 255, .38);
  --crystal-shadow: 0 22px 55px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .65), inset 1px 0 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .10), inset -1px 0 0 rgba(255, 255, 255, .08);
}
.card, .sec, .box, .review, .map-card, .feed-card, .photo-slot, .choice, .kind-opt > span, .sheet .finding, .ai-pub, .ai-box, #view-map > .sec {
  background: var(--crystal); border: 1px solid var(--crystal-edge);
  -webkit-backdrop-filter: blur(12px) saturate(190%) brightness(1.08); backdrop-filter: blur(12px) saturate(190%) brightness(1.08);
  box-shadow: var(--crystal-shadow);
}
.dist, .kpi, .pk, .lvrow > span {
  background: var(--crystal-in); border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(255, 255, 255, .06), 0 8px 22px rgba(0, 0, 0, .18);
}
.lvrow > span { border-radius: 10px; }
/* diagonal light sheen across each pane, like light catching cut crystal */
#view-map > .sec, .card, .dist, .kpi, .pk, .feed-card, .review, .box, .sheet .sec, .gdlg, .status-card, .photo-slot, .kind-opt > span { position: relative; }
#view-map > .sec::before, .card::before, .dist::before, .kpi::before, .pk::before, .feed-card::before, .review::before, .box::before, .sheet .sec::before, .gdlg::before, .kind-opt > span::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background:
    linear-gradient(115deg, transparent 0%, transparent 28%, rgba(255, 255, 255, .10) 36%, rgba(255, 255, 255, .02) 44%, transparent 52%),
    radial-gradient(120% 60% at 0% 0%, rgba(255, 255, 255, .14), transparent 45%);
}
#view-map > .sec > *, .card > *, .dist > *, .kpi > *, .pk > *, .review > *, .box > *, .sheet .sec > *, .gdlg > * { position: relative; z-index: 1; }
.kpi::after { opacity: .04; }
/* clearer, brighter background light so the crystal has something to refract */
.bglights .l1 { opacity: .34; } .bglights .l2 { opacity: .42; } .bglights .l3 { opacity: .34; } .bglights .l4 { opacity: .32; }
/* header and tab bar: crystal strip */
.topbar { background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03)); -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, .28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 30px rgba(0, 0, 0, .3); }
.topbar .tab.on { background: linear-gradient(160deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .08)); border-color: rgba(255, 255, 255, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
/* windows and pop-ups: same crystal */
:root { --glass-pop: linear-gradient(140deg, rgba(255, 255, 255, .20) 0%, rgba(120, 150, 255, .12) 40%, rgba(20, 34, 80, .35) 75%, rgba(255, 255, 255, .10) 100%); }
.sheet { border-left: 1px solid rgba(255, 255, 255, .4); box-shadow: -20px 0 60px rgba(0, 0, 0, .45), inset 1px 0 0 rgba(255, 255, 255, .55); }
.sheet-head { background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.gdlg, .toast, .move-bar { border-color: rgba(255, 255, 255, .42); box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .7), inset 1px 0 0 rgba(255, 255, 255, .25); }
/* controls: crystal chips, fields and buttons */
input[type=email], input[type=text], input[type=password], input[type=date], input[type=search], select, textarea, .gdlg-in {
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05)); border-color: rgba(255, 255, 255, .32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn, .chip { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.primary, .btn.navy { background: linear-gradient(180deg, rgba(110, 145, 255, .85), rgba(46, 79, 179, .9)); border-color: rgba(170, 195, 255, .8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 20px rgba(46, 79, 179, .35); }
.btn.gold { background: linear-gradient(180deg, #f2405c, #c8102e); border-color: rgba(255, 160, 175, .8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 22px rgba(223, 25, 58, .35); }
.map-sec .map-wrap { border-color: rgba(255, 255, 255, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
@media (prefers-reduced-transparency: reduce) {
  .card, .sec, #view-map > .sec, .dist, .kpi, .pk, .sheet, .gdlg { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(20, 34, 80, .92); }
}

/* =====================================================================
   OPAQUE CRYSTAL for everything that holds data: solid polished panes
   (nothing shows through), with the crystal's bright cut edges and sheen
   ===================================================================== */
:root {
  --ocrystal: linear-gradient(160deg, #2a4596 0%, #1b2f6e 42%, #15265d 70%, #1d3374 100%);
  --ocrystal-in: linear-gradient(160deg, #36559f 0%, #233c80 50%, #1d3372 100%);
  --ocrystal-pop: linear-gradient(160deg, #2d4a9e 0%, #1c3070 45%, #142458 100%);
}
.card, .sec, .box, .review, .map-card, .feed-card, .choice, .kind-opt > span, .sheet .finding, .ai-pub, .ai-box, #view-map > .sec, .photo-slot {
  background: var(--ocrystal); -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 1px solid rgba(190, 210, 255, .45);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .55), inset 1px 0 0 rgba(255, 255, 255, .18), inset 0 -2px 0 rgba(0, 0, 0, .25);
}
.dist, .kpi, .pk, .lvrow > span {
  background: var(--ocrystal-in); border: 1px solid rgba(200, 220, 255, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 0 rgba(0, 0, 0, .22), 0 6px 16px rgba(0, 0, 0, .28);
}
.lvrow > span { background: linear-gradient(160deg, #4262b0, #2a4691); }
.ai-pub, .ai-box { border-style: dashed; }
.photo-slot.done { background: linear-gradient(160deg, #1f6b5a, #164c45); }
.status-card { -webkit-backdrop-filter: none; backdrop-filter: none; }
.status-card.flag { background: linear-gradient(160deg, #6b2140, #4a1832); }
.status-card.good { background: linear-gradient(160deg, #1f6b52, #154a3d); }
.status-card.pend { background: linear-gradient(160deg, #6b5320, #4a3a18); }
.status-card.gone { background: linear-gradient(160deg, #3b4766, #2a3350); }
.disc-row.wait { background: #22397a; } .disc-row.haz { background: #5a1f3c; } .disc-row.ok { background: #1c5a48; }
/* sheen stays (light across polished crystal) */
#view-map > .sec::before, .card::before, .dist::before, .kpi::before, .pk::before, .feed-card::before, .review::before, .box::before, .sheet .sec::before, .gdlg::before {
  background:
    linear-gradient(115deg, transparent 0%, transparent 30%, rgba(255, 255, 255, .09) 37%, rgba(255, 255, 255, .02) 45%, transparent 52%),
    radial-gradient(120% 55% at 0% 0%, rgba(255, 255, 255, .12), transparent 45%);
}
/* windows and pop-ups with data: opaque crystal too */
.sheet { background: var(--ocrystal-pop); -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet-head { background: linear-gradient(180deg, #2f4ca0, #1f357a); }
.gdlg, .toast, .move-bar { background: var(--ocrystal-pop); -webkit-backdrop-filter: none; backdrop-filter: none; }
.leaflet-tooltip { background: #1f357a; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* fields and controls on the opaque panes */
input[type=email], input[type=text], input[type=password], input[type=date], input[type=search], select, textarea, .gdlg-in {
  background: linear-gradient(160deg, #2c4795, #1e346f); border-color: rgba(200, 220, 255, .45); }
.chip { background: linear-gradient(160deg, #2c4795, #1e346f); }
.chip.on { background: linear-gradient(180deg, #ffffff, #dfe7ff); color: #0b1638; }
#view-map tr.rowlink:hover, #view-map tr.rowlink:focus-visible { background: rgba(255, 255, 255, .08); }

/* clean, readable panes: no light streaks across the data (edges stay crystal) */
#view-map > .sec::before, .card::before, .dist::before, .kpi::before, .pk::before, .feed-card::before, .review::before, .box::before, .sheet .sec::before, .gdlg::before, .kind-opt > span::before {
  background: none; display: none;
}
.kpi::after { display: none; }

/* =====================================================================
   EVEN, STREAK-FREE PANES everywhere (dashboards and every pop-up):
   one solid colour per pane, no diagonal shading; the bright crystal edges stay
   ===================================================================== */
:root { --pane: #1b2f6e; --pane-in: #24408a; --pane-pop: #1a2d68; --pane-head: #223a85; --field: #213a80; }
.card, .sec, .box, .review, .map-card, .feed-card, .choice, .kind-opt > span, .sheet .finding, .ai-pub, .ai-box, #view-map > .sec, .photo-slot, .people-card { background: var(--pane); }
.dist, .kpi, .pk { background: var(--pane-in); }
.lvrow > span { background: #2f4f9e; }
.photo-slot.done { background: #1a5c4f; }
.status-card.flag { background: #5a1c37; } .status-card.good { background: #1a5a47; } .status-card.pend { background: #5a4620; } .status-card.gone { background: #323d5c; }
.sheet, .gdlg, .toast, .move-bar { background: var(--pane-pop); }
.sheet-head { background: var(--pane-head); }
.sheet-body, .sheet .sec { background-image: none; }
.leaflet-tooltip, .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--pane-head); -webkit-backdrop-filter: none; backdrop-filter: none; }
.leaflet-control-zoom a, .leaflet-bar a { background: var(--pane-head); -webkit-backdrop-filter: none; backdrop-filter: none; }
input[type=email], input[type=text], input[type=password], input[type=date], input[type=search], select, textarea, .gdlg-in, .chip { background: var(--field); }
.chip.on { background: #ffffff; }
.topbar .tab.on { background: rgba(255, 255, 255, .16); }
.btn.primary, .btn.navy { background: #3a5fd0; } .btn.gold { background: #d81f3f; }
.topbar::after { background: var(--crimson); opacity: .7; }

/* =====================================================================
   OPAQUE (FROSTED) GLASS: thick milky panes, heavy blur, even tint,
   soft top gloss + bright rim; no diagonal streaks
   ===================================================================== */
:root {
  --fg-pane: linear-gradient(180deg, rgba(64, 92, 170, .80) 0%, rgba(30, 50, 115, .84) 26%, rgba(26, 44, 104, .86) 100%);
  --fg-in:   linear-gradient(180deg, rgba(86, 116, 196, .78) 0%, rgba(44, 70, 145, .82) 30%, rgba(38, 62, 134, .84) 100%);
  --fg-pop:  linear-gradient(180deg, rgba(60, 88, 166, .88) 0%, rgba(28, 47, 110, .92) 22%, rgba(24, 41, 98, .93) 100%);
  --fg-blur: blur(26px) saturate(160%);
  --fg-rim: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 -1px 0 rgba(255, 255, 255, .08);
}
.card, .sec, .box, .review, .map-card, .feed-card, .choice, .kind-opt > span, .sheet .finding, .ai-pub, .ai-box, #view-map > .sec, .photo-slot, .people-card {
  background: var(--fg-pane); -webkit-backdrop-filter: var(--fg-blur); backdrop-filter: var(--fg-blur);
  border: 1px solid rgba(200, 220, 255, .38); box-shadow: 0 18px 45px rgba(0, 0, 0, .40), var(--fg-rim);
}
.dist, .kpi, .pk {
  background: var(--fg-in); -webkit-backdrop-filter: var(--fg-blur); backdrop-filter: var(--fg-blur);
  border: 1px solid rgba(210, 225, 255, .36); box-shadow: 0 6px 16px rgba(0, 0, 0, .25), var(--fg-rim);
}
.lvrow > span { background: rgba(100, 130, 210, .45); border: 1px solid rgba(220, 230, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.sheet, .gdlg, .toast, .move-bar { background: var(--fg-pop); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%); }
.sheet-head { background: rgba(255, 255, 255, .08); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.leaflet-tooltip, .leaflet-popup-content-wrapper, .leaflet-popup-tip, .leaflet-control-zoom a, .leaflet-bar a {
  background: rgba(30, 50, 115, .86); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
input[type=email], input[type=text], input[type=password], input[type=date], input[type=search], select, textarea, .gdlg-in, .chip {
  background: rgba(255, 255, 255, .10); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); }
.chip.on { background: rgba(255, 255, 255, .94); }
select option { background: #1d3170; }
/* status cards: frosted tinted glass */
.status-card { -webkit-backdrop-filter: var(--fg-blur); backdrop-filter: var(--fg-blur); box-shadow: var(--fg-rim); }
.status-card.flag { background: linear-gradient(180deg, rgba(150, 50, 90, .80), rgba(90, 28, 55, .86) 30%); }
.status-card.good { background: linear-gradient(180deg, rgba(50, 140, 110, .80), rgba(26, 90, 71, .86) 30%); }
.status-card.pend { background: linear-gradient(180deg, rgba(150, 120, 50, .80), rgba(90, 70, 32, .86) 30%); }
.status-card.gone { background: linear-gradient(180deg, rgba(90, 105, 145, .80), rgba(50, 61, 92, .86) 30%); }
.photo-slot.done { background: linear-gradient(180deg, rgba(50, 140, 120, .78), rgba(26, 92, 79, .85) 30%); }
@media (max-width: 720px) {   /* phones: lighter blur keeps scrolling smooth */
  .card, .sec, .dist, .kpi, .pk, .feed-card, #view-map > .sec { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .sec, #view-map > .sec, .dist, .kpi, .pk, .sheet, .gdlg { -webkit-backdrop-filter: none; backdrop-filter: none; background: #1b2f6e; }
}

/* =====================================================================
   MAP: Day (normal street map) / Night (solid dark map, glowing outlines, ringed dots)
   ===================================================================== */
.map.day { background: #e8eef7; }
.map.day .day-tiles { filter: brightness(.96) saturate(.92); }
.map.night { background: radial-gradient(120% 90% at 50% 40%, #0f1d47 0%, #0a1434 55%, #070f28 100%); }
.map.night .leaflet-glow-pane { filter: drop-shadow(0 0 3px rgba(190, 215, 255, .75)) drop-shadow(0 0 9px rgba(120, 160, 255, .35)); }
.map.night .leaflet-land-pane { filter: drop-shadow(0 0 18px rgba(80, 130, 255, .35)); }
.town-lbl span { display: block; transform: translate(-50%, -50%); white-space: nowrap; font: 600 11px 'Roboto', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: rgba(225, 235, 255, .72); text-shadow: 0 1px 3px #050b22; pointer-events: none; }
.map.night .leaflet-control-attribution { display: none; }
.mode-sw { display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(20, 36, 88, .92); border: 1px solid rgba(220, 230, 255, .4); box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .4); }
.mode-sw button { border: 0; background: transparent; color: #d6e0fb; font: 700 12px 'Roboto', sans-serif; padding: 7px 12px; min-height: 32px; border-radius: 999px; cursor: pointer; }
.mode-sw button.on { background: #fff; color: #0b1638; }
.mode-sw button:focus-visible { outline: 2px solid #9cc3ff; outline-offset: 1px; }
.town-lbl.t-balanga-city span { transform: translate(-50%, -110%); } .town-lbl.t-pilar span { transform: translate(-30%, 15%); }
/* area filters sit just above the map */
.map-filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin: 4px 0 12px; }
.map-filters .field.inline { flex: 1 1 200px; min-width: 200px; max-width: 280px; }
.map-filters .field.inline > span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.map-filters .field.inline select { width: 100%; text-overflow: ellipsis; }
.map-filters .chips { margin-left: auto; }
@media (max-width: 720px) { .map-filters .field.inline { max-width: none; flex-basis: 100%; } .map-filters .chips { margin-left: 0; } }

/* Night streets: street map recoloured navy, faded in from town level */
.map.night .leaflet-nightTiles-pane { opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.map.night.streets .leaflet-nightTiles-pane { opacity: .68; }
.map.night .night-tiles { filter: invert(1) grayscale(1) sepia(.5) hue-rotate(180deg) contrast(1.5) brightness(1.05); }
.map.night.streets .leaflet-control-attribution { display: block; }
.map.night.close .town-lbl { display: none; }
/* slogan beside "Latest reports" */
.feed-head { flex-wrap: wrap; row-gap: 6px; }
.feed-slogan { font: 700 17px 'Roboto Slab', serif; color: #fff; padding-left: 14px; margin-left: 4px; border-left: 2px solid rgba(255, 255, 255, .28); }
.feed-head .feed-lead { flex-basis: 100%; }
@media (max-width: 720px) { .feed-slogan { flex-basis: 100%; border-left: 0; padding-left: 0; margin-left: 0; font-size: 16px; } }
.feed .feed-head { justify-content: flex-start; }

/* ===== COMPACT DASHBOARD: tighter spacing so more fits on the first screen ===== */
#view-map { padding-top: 10px; }
#view-map > .sec { padding: 12px 16px; margin-bottom: 10px; border-radius: 16px; }
.sh { margin-bottom: 8px; }
.sh h2 { font-size: 16px; }
.kpis { gap: 8px; }
.kpi, .pk { padding: 8px 12px; border-radius: 12px; gap: 2px; }
.kv { font-size: 28px; }
.ks { font-size: 11.5px; }
.lvrow { gap: 6px; margin-top: 2px; } .lvrow > span { padding: 4px 7px; } .lvrow b { font-size: 18px; }
.sbar { margin-top: 10px; height: 6px; } .sleg { margin-top: 5px; font-size: 12px; }
.dists { gap: 10px; }
.dist { padding: 10px 12px; border-radius: 12px; }
.dh { padding-bottom: 5px; } .dstats { margin: 5px 0; } .dstats b { font-size: 17px; }
#view-map th { padding: 4px 6px; } #view-map td { padding: 4px 6px; font-size: 12.5px; }
.pplrow { gap: 8px; }
.pk .kv .exp { font-size: 17px; padding: 3px 14px; }
.people-card .note { margin-top: 8px; font-size: 12px; }
.pc-why { margin-top: 4px; font-size: 12.5px; }
.map-filters { margin: 2px 0 8px; }
.map-filters .field.inline select { min-height: 40px; }

/* ===== SIDE-BY-SIDE (wide screens): the map sits on the right, beside the data, and stays in view ===== */
@media (min-width: 1200px) {
  #view-map { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 10px; align-items: start;
    grid-template-areas: "tot tot" "areas map" "brgy map" "ppl map" "feed feed"; grid-template-rows: auto auto auto 1fr auto; }
  #secTotals { grid-area: tot; } #secAreas { grid-area: areas; } #secBrgys { grid-area: brgy; }
  #view-map > .people-card { grid-area: ppl; } #view-map > .map-sec { grid-area: map; position: sticky; top: 116px; }
  #view-map > .feed { grid-area: feed; }
  #view-map > .map-sec .map { height: calc(100vh - 540px); min-height: 320px; }
  #view-map > .map-sec .map-filters .field.inline { min-width: 140px; flex-basis: 140px; }
  #view-map > .map-sec .map-filters .chips { margin-left: 0; }
  #view-map > .map-sec .map-filters .chip { padding: 6px 10px; font-size: 12px; }
  .dist table th:nth-child(4), .dist table td:nth-child(4) { display: table-cell; }
  #view-map > .people-card .pplrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #view-map > .people-card .pplrow .pk:nth-child(4), #view-map > .people-card .pplrow .pk:nth-child(5) { grid-column: span 1; }
  .map-sec .sh { flex-wrap: wrap; row-gap: 4px; }
  .map-sec .sh h2 { order: 1; } .map-sec #btnRefresh { order: 2; margin-left: auto; min-height: 32px; padding: 4px 14px; }
  .map-sec .legend { order: 3; flex-basis: 100%; font-size: 11px; gap: 2px 12px; }
  #view-map > .map-sec .map-filters { gap: 6px 8px; margin-bottom: 8px; }
  #view-map > .map-sec .map-filters .field.inline select { min-height: 36px; font-size: 14px; }
}
@media (min-width: 1600px) {
  #view-map .dist th { letter-spacing: 0; padding: 4px 3px; font-size: 9.5px; }
  #view-map .dist td { padding: 4px 3px; font-size: 12px; } #view-map .dist .exp { padding: 2px 7px; font-size: 10.5px; }
  .dist .dstats { gap: 8px; } .dist .dstats b { font-size: 15px; }
}
@media (min-width: 1200px) and (max-width: 1599px) { .dists { grid-template-columns: minmax(0, 1fr); } .dist table { font-size: 12px; } }

/* ===== B, refined: slim People and exposure strip; the barangay list takes the freed space ===== */
@media (min-width: 1200px) {
  #view-map { grid-template-rows: auto auto 1fr auto auto; }
  /* barangays: fills the space beside the map and scrolls inside */
  #secBrgys { display: flex; flex-direction: column; min-height: 272px; position: relative; align-self: stretch; }
  #secBrgys > #brgyList { position: absolute; left: 16px; right: 16px; top: 46px; bottom: 12px; overflow: auto; }
  #secBrgys #brgyList thead th { position: sticky; top: 0; background: #22397f; z-index: 1; }
  /* people and exposure: one slim row */
  #view-map > .people-card { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; column-gap: 12px; row-gap: 0; }
  #view-map > .people-card .sh { order: 1; margin: 0 0 6px; }
  #view-map > .people-card .pc-why { order: 2; margin: 0 0 6px auto !important; }
  #view-map > .people-card .pplrow { order: 3; flex-basis: 100%; }
  #view-map > .people-card .note { order: 4; flex-basis: 100%; }
  #view-map > .people-card .pc-why[open] { flex-basis: 100%; order: 5; margin-left: 0 !important; }
  #view-map > .people-card { padding: 10px 14px; }
  #view-map > .people-card .sh { margin-bottom: 6px; }
  #view-map > .people-card .pplrow { grid-template-columns: 1.05fr .85fr 1fr 1fr 1.25fr; gap: 6px; }
  #view-map > .people-card .pk { padding: 6px 9px; border-radius: 10px; gap: 1px; }
  #view-map > .people-card .kl { font-size: 9.5px; letter-spacing: .04em; line-height: 1.2; }
  #view-map > .people-card .kv { font-size: 19px; }
  #view-map > .people-card .ks { font-size: 10.5px; line-height: 1.25; }
  #view-map > .people-card .pk .kv .exp { font-size: 12px; padding: 2px 10px; }
  #view-map > .people-card .mixbar { height: 8px; margin: 5px 0 3px; }
  #view-map > .people-card .note { margin-top: 6px; font-size: 11px; line-height: 1.35; }
  #view-map > .people-card .pc-why { margin-top: 2px; font-size: 11.5px; }
}
@media (min-width: 1200px) {
  #view-map .dist .dstats { gap: 4px 8px; flex-wrap: wrap; } #view-map .dist .dstats b { font-size: 15px; } #view-map .dist .dstats .exp { padding: 2px 7px; font-size: 10.5px; }
}
