:root {
  --bg-0: #f5f1e8;
  --bg-1: #f8f6ef;
  --ink: #101418;
  --ink-soft: #45505d;
  --accent: #f25c2c;
  --accent-dark: #b03f1e;
  --mint: #0f766e;
  --panel: #fffdf8;
  --line: #d8d0c2;
  --critical: #b91c1c;
  --normal: #0f766e;
  --shadow: 0 12px 30px rgba(20, 20, 16, 0.12);
}

/* Landing page overrides */
body:not(.citizen-ui):not(.dashboard-ui) {
  --bg-0: #ffffff;
  --bg-1: #f8f8f8;
  --ink: #1f1f1f;
  --ink-soft: #555555;
  --accent: #1f1f1f;
  --accent-dark: #111111;
  --panel: #ffffff;
  --line: #e0e0e0;
  --critical: #333333;
  --normal: #333333;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body:not(.citizen-ui):not(.dashboard-ui) .noise {
  display: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--ink);
  background: var(--bg-0);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #1f1f1f;
}

.topbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-dialog {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0;
  width: min(460px, calc(100vw - 20px));
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.auth-dialog::backdrop {
  background: rgba(18, 16, 12, 0.45);
}

.auth-form {
  padding: 24px;
}

.auth-form h3 {
  margin: 0 0 16px;
  font-family: 'Space Grotesk', sans-serif;
  color: #1f1f1f;
  font-size: 1.3rem;
}

.auth-page .noise {
  display: none;
}

.auth-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 20px 56px;
}

.auth-panel {
  max-width: 560px;
  margin: 0 auto;
}

.auth-panel--wide {
  max-width: 720px;
}

.auth-panel h1 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.auth-form-page {
  margin-top: 14px;
}

.auth-switch-note {
  margin-top: 14px;
  color: #5b5b5b;
  font-size: 0.92rem;
}

.auth-switch-note a {
  color: #1f1f1f;
  font-weight: 600;
  text-decoration: none;
}

.auth-switch-note a:hover {
  text-decoration: underline;
}

.admin-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: grid;
  gap: 14px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-head h1 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

.admin-head-actions {
  display: flex;
  gap: 8px;
}

.admin-stats {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-filter {
  display: grid;
  grid-template-columns: 1fr 220px 120px 120px;
  gap: 10px;
  align-items: center;
}

.admin-table-wrap {
  overflow: auto;
  margin-top: 12px;
}

/* Pagination */
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.page-info {
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: auto;
}

.page-buttons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

th.sortable:hover {
  background: #ede8d8;
  cursor: pointer;
}


.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table th,
.admin-table td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #f6f1e4;
}

.admin-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  font-size: 0.76rem;
  padding: 3px 8px;
  font-weight: 700;
}

.status-open {
  background: #ffedd5;
  color: #c2410c;
}

.status-in_progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-resolved {
  background: #dcfce7;
  color: #15803d;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: repeating-radial-gradient(circle at 0 0, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03) 1px, transparent 1px, transparent 6px);
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

.hero {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 60px 20px 40px;
  display: grid;
  gap: 40px;
  grid-template-columns: 1.4fr 1fr;
}

.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: #333333;
  margin-bottom: 12px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.1;
  color: #1f1f1f;
  font-weight: 700;
}

.hero__desc {
  margin-top: 16px;
  line-height: 1.7;
  color: #555555;
  max-width: 65ch;
  font-size: 1.05rem;
}

.landing-hero {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 10px;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid #ececec;
  background: #ffffff;
}

.landing-hero .hero__left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 74px 40px 64px clamp(22px, 11vw, 210px);
  background: #ffffff;
}

.landing-hero .hero__desc {
  max-width: 620px;
}

.landing-hero__map {
  position: relative;
  min-height: 450px;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-hero__map::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
}

.landing-hero__map-image {
  position: absolute;
  inset: -1.5% -2.5%;
  z-index: 2;
  width: 105%;
  height: 103%;
  object-fit: contain;
  object-position: center center;
  background: #ffffff;
  filter: grayscale(100%) contrast(1.05);
  transform: scaleY(1.07);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: end;
}

.stat-card {
  border: 1px solid #e0e0e0;
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  animation: rise-in 0.7s ease both;
}

.stat-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.stat-card strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.55rem;
}

.layout {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 10px 20px 30px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(300px, 420px) 1fr;
  grid-template-areas:
    'form map'
    'list map';
}

.panel {
  border: 1px solid #e0e0e0;
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-panel {
  grid-area: form;
}

.map-panel {
  grid-area: map;
}

.list-panel {
  grid-area: list;
}

.panel h2 {
  margin: 0 0 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  color: #1f1f1f;
}

.panel-subtitle {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

label {
  display: block;
  margin-top: 12px;
  font-size: 0.92rem;
  color: #333333;
  font-weight: 500;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 11px 14px;
  background: #ffffff;
  color: #1f1f1f;
  font-size: 0.95rem;
}

textarea {
  resize: vertical;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
}

a.btn,
a.btn:visited,
a.btn:hover,
a.btn:active {
  color: inherit;
  text-decoration: none;
}

a.btn.btn-primary,
a.btn.btn-primary:visited,
a.btn.btn-primary:hover,
a.btn.btn-primary:active {
  color: #ffffff;
}

a.btn.btn-secondary,
a.btn.btn-secondary:visited,
a.btn.btn-secondary:hover,
a.btn.btn-secondary:active {
  color: #1f1f1f;
}

.btn-primary {
  background: #1f1f1f;
  color: #fff;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #333333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: #f0f0f0;
  color: #1f1f1f;
  border: 1px solid #d0d0d0;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #e0e0e0;
  border-color: #999999;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #d0d0d0;
  color: #1f1f1f;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: #f5f5f5;
  border-color: #666666;
}

.feedback {
  margin-top: 12px;
  font-size: 0.9rem;
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

#map {
  margin-top: 12px;
  width: 100%;
  height: 460px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.create-map-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  padding: 10px;
}

.create-map-box__head {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.create-map-box__head strong {
  font-family: 'Space Grotesk', sans-serif;
}

.create-map-box__head small {
  color: var(--ink-soft);
}

#createReportMap {
  width: 100%;
  height: 290px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.predictor {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.predictor h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

.predictor p {
  margin: 6px 0 10px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.prediction-result {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  background: #f7f4ec;
  border: 1px solid var(--line);
  min-height: 52px;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.report-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
  background: #fffefb;
}

.report-item h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 4px;
}

.badge-critical {
  background: #fee2e2;
  color: var(--critical);
}

.badge-normal {
  background: #d1fae5;
  color: var(--normal);
}

.report-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Comment Modal ── */
.comment-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.comment-modal.is-open {
  display: flex;
}

.comment-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.comment-modal__panel {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1px solid #dde3ec;
  border-radius: 16px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.18);
  width: min(580px, calc(100vw - 32px));
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}

.comment-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid #e3e8f2;
  flex-shrink: 0;
}

.comment-modal__header h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  color: #1f1f1f;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-modal__close {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: #64748b;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.15s;
}

.comment-modal__close:hover {
  background: #e2e8f0;
  color: #1f1f1f;
}

.comment-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  min-height: 120px;
}

.comment-modal__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  background: #f8fafc;
  border: 1px solid #e3e8f2;
  border-radius: 10px;
  padding: 12px 14px;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.comment-author {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  font-family: 'Space Grotesk', sans-serif;
}

.comment-date {
  font-size: 0.76rem;
  color: #94a3b8;
  white-space: nowrap;
}

.comment-content {
  font-size: 0.9rem;
  line-height: 1.62;
  color: #374151;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-empty,
.comment-loading {
  color: #94a3b8;
  font-size: 0.88rem;
  text-align: center;
  padding: 24px 0;
  margin: 0;
}

.comment-modal__footer {
  border-top: 1px solid #e3e8f2;
  padding: 14px 20px;
  flex-shrink: 0;
  background: #fafbfc;
  border-radius: 0 0 16px 16px;
}

.comment-modal__input {
  width: 100%;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #1f1f1f;
  background: #ffffff;
  resize: none;
  box-sizing: border-box;
  font-family: inherit;
  min-height: 80px;
  transition: border-color 0.15s;
}

.comment-modal__input:focus {
  outline: none;
  border-color: #0f172a;
  background: #ffffff;
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.comment-word-count {
  font-size: 0.78rem;
  color: #94a3b8;
}

.comment-wc-over {
  color: #dc2626;
  font-weight: 700;
}

.comment-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.comment-action-btn {
  background: none;
  border: 1px solid #d0d7e2;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.comment-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.comment-action-btn--danger {
  color: #dc2626;
  border-color: #fca5a5;
}

.comment-action-btn--danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.comment-edit-area {
  margin-top: 8px;
}

.comment-edit-input {
  margin-bottom: 6px;
}

.comment-edit-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-feedback {
  font-size: 0.82rem;
  color: #dc2626;
  margin: 6px 0 0;
  min-height: 1.2em;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.84rem;
}

.province-open-report {
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.78rem;
}

.report-item-focus {
  outline: 2px solid #5b8def;
  outline-offset: 2px;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: reveal 0.65s ease forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-grid {
  max-width: 1200px;
  margin: 42px auto 40px;
  padding: 10px 20px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flow-list {
  margin: 16px 0 0;
  padding-left: 22px;
  line-height: 1.72;
  color: #333333;
  font-size: 0.98rem;
}

.flow-list li+li {
  margin-top: 6px;
}

.landing-main {
  max-width: 1200px;
  margin: 28px auto 46px;
  padding: 0 20px;
  display: grid;
  gap: 28px;
}

.landing-section {
  display: grid;
  gap: 16px;
}

.section-head {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.section-head h2 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.2;
  color: #141414;
}

.landing-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  border: 1px solid #dedede;
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(160deg, #ffffff 0%, #f7f7f7 100%);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
}

.kpi-card span {
  display: inline-flex;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: #4b4b4b;
}

.kpi-card strong {
  margin-top: 8px;
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.22rem;
}

.kpi-card p {
  margin: 8px 0 0;
  color: #555;
  line-height: 1.62;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.feature-item {
  border: 1px solid #dddddd;
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

.feature-item h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.08rem;
}

.feature-item p {
  margin: 8px 0 0;
  color: #5c5c5c;
  line-height: 1.62;
}

.landing-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.split-panel {
  border-radius: 16px;
  padding: 22px;
  border: 1px solid #dddddd;
  background: #fcfcfc;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.045);
}

.split-panel h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.24rem;
}

.split-panel-dark {
  background: radial-gradient(circle at 20% 20%, #313131 0%, #161616 58%, #0f0f0f 100%);
  border-color: #242424;
}

.split-panel-dark h3,
.split-panel-dark li {
  color: #f2f2f2;
}

.split-panel-dark .flow-list {
  color: #dadada;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.timeline-item {
  border: 1px solid #dfdfdf;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
}

.timeline-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #1f1f1f;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.timeline-item p {
  margin: 10px 0 0;
  color: #575757;
  line-height: 1.62;
}

.cta-band {
  border: 1px solid #d9d9d9;
  border-radius: 18px;
  padding: clamp(18px, 2.3vw, 30px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f4f4 60%, #ececec 100%);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.05);
}

.cta-band h2 {
  margin: 0;
  max-width: 640px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.28rem, 2vw, 1.82rem);
  line-height: 1.24;
}

.site-footer {
  border-top: 1px solid #e2e2e2;
  background: #fafafa;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
}

.site-footer__brand strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.06rem;
}

.site-footer__brand p {
  margin: 8px 0 0;
  color: #5a5a5a;
  max-width: 520px;
  line-height: 1.6;
}

.site-footer__menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 20px;
}

.site-footer__menu h4 {
  margin: 0 0 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  color: #1f1f1f;
}

.site-footer__menu a {
  display: block;
  margin: 6px 0;
  color: #4a4a4a;
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer__menu a:hover {
  color: #111111;
}

.site-footer__bottom {
  border-top: 1px solid #e2e2e2;
  padding: 10px 20px 16px;
}

.site-footer__bottom p {
  margin: 0;
  max-width: 1200px;
  margin-inline: auto;
  color: #666666;
  font-size: 0.85rem;
}

.pwa-install-btn.is-hidden {
  display: none !important;
}

.pwa-install-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.pwa-install-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  z-index: 50;
  width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #2d2d2d;
  background: rgba(18, 18, 18, 0.96);
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.pwa-install-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.legal-page {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
}

.legal-shell {
  max-width: 1120px;
  margin: 24px auto 48px;
  padding: 0 20px;
  display: grid;
  gap: 18px;
}

.legal-hero {
  border: 1px solid #e1e1e1;
  border-radius: 16px;
  padding: clamp(18px, 2.3vw, 30px);
  background: #ffffff;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.04);
}

.legal-hero h1 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.legal-hero p {
  margin: 10px 0 0;
  color: #535353;
  line-height: 1.72;
  max-width: 70ch;
}

.legal-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.legal-meta span {
  font-size: 0.86rem;
  color: #5c5c5c;
}

.legal-meta a {
  font-size: 0.86rem;
  color: #181818;
  text-decoration: none;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  padding: 4px 10px;
}

.legal-grid {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 16px;
}

.legal-nav {
  border: 1px solid #e1e1e1;
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
  height: max-content;
  position: sticky;
  top: 76px;
}

.legal-nav h3 {
  margin: 0 0 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
}

.legal-nav a {
  display: block;
  margin: 5px 0;
  color: #4b4b4b;
  text-decoration: none;
  font-size: 0.9rem;
}

.legal-nav a:hover {
  color: #111111;
}

.legal-content {
  display: grid;
  gap: 12px;
}

.legal-card {
  border: 1px solid #e1e1e1;
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
}

.legal-card h2 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.12rem;
}

.legal-card p,
.legal-card li {
  margin-top: 8px;
  color: #535353;
  line-height: 1.7;
}

.legal-card ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.gov-fields {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  background: #f9f9f9;
}

.gov-fields h4 {
  margin: 8px 0 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: #1f1f1f;
  font-size: 0.95rem;
}

.gov-doc-hint {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: #f5f5f5;
  color: #555555;
  font-size: 0.85rem;
  line-height: 1.45;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  width: auto;
  margin-top: 0;
}

.dash-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 14px;
  grid-template-columns: 260px 1fr;
}

.dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
  position: sticky;
  top: 74px;
}

.side-btn {
  text-align: left;
}

.side-btn.is-active {
  background: linear-gradient(120deg, var(--accent), #f58f6f);
  color: #fff;
}

.dash-content {
  display: grid;
  gap: 14px;
}

.dash-view.active {
  display: block;
}

.mini-stats {
  margin-top: 12px;
  margin-bottom: 10px;
}

body.citizen-ui .topbar__inner {
  max-width: none;
  margin: 0;
  min-height: 54px;
  padding: 10px 16px 10px 272px;
}

body.citizen-ui .dash-shell {
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
}

body.citizen-ui .dash-sidebar {
  width: 252px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  background: #ffffff;
  border: none;
  border-right: 1px solid #dde3ec;
  border-radius: 0;
  padding: 14px 12px;
  box-shadow: none;
  overflow-y: auto;
}

body.citizen-ui .dash-content {
  min-width: 0;
  gap: 16px;
  margin-left: 252px;
  width: auto;
  max-width: calc(100% - 252px);
  min-height: 100vh;
  padding: 16px;
}

body.citizen-ui .sidebar-session-row {
  margin: 2px 2px 10px;
  padding: 0;
}

body.citizen-ui #authState {
  display: block;
  color: #64748b;
  font-weight: 500;
  font-size: 0.88rem;
}

body.citizen-ui .panel {
  border-radius: 12px;
  border: 1px solid #dde3ec;
  box-shadow: 0 8px 20px rgba(15, 24, 38, 0.08);
  background: #ffffff;
  padding: 16px;
}

body.citizen-ui .eyebrow {
  color: #6b7280;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
}

body.citizen-ui .side-btn {
  background: #f8fafc;
  border: 1px solid #e3e8f2;
  border-radius: 10px;
  color: #1f2937;
  padding: 10px 12px;
  font-weight: 600;
}

body.citizen-ui .side-btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

body.citizen-ui .sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
}

body.citizen-ui .sidebar-footer .btn {
  width: 100%;
  border-radius: 10px;
}

body.citizen-ui .list-head {
  margin-bottom: 10px;
}

body.citizen-ui .list-head h2,
body.citizen-ui .panel h2 {
  font-size: 1.08rem;
}

body.citizen-ui .mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.citizen-ui .mini-stats .stat-card {
  border: 1px solid #e3e8f2;
  box-shadow: none;
  border-radius: 10px;
  background: #f8fafc;
}

body.citizen-ui .mini-stats .stat-card strong {
  font-size: 2rem;
}

body.citizen-ui .btn-primary {
  background: #0f172a;
  color: #ffffff;
}

body.citizen-ui .btn-secondary {
  background: #eef2f7;
  color: #1f2937;
}

body.citizen-ui .btn-ghost {
  border: 1px solid #d6deea;
}

body.citizen-ui #feedView .report-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

body.citizen-ui #myReportsView .report-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

body.citizen-ui #provinceView .report-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

body.citizen-ui .report-item {
  border: 1px solid #dfe6f1;
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 24, 38, 0.05);
}

body.citizen-ui .report-title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  line-height: 1.3;
}

body.citizen-ui .report-meta {
  margin: 4px 0;
  color: #667085;
}

body.citizen-ui .report-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.citizen-ui .report-status-row strong {
  color: #344054;
}

body.citizen-ui .report-description,
body.citizen-ui .report-ai {
  margin: 10px 0;
  line-height: 1.6;
}

body.citizen-ui .report-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

body.citizen-ui .report-media-grid a {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #dfe6f1;
  background: #f8fafc;
}

body.citizen-ui .report-media {
  display: block;
  width: 100%;
  height: clamp(140px, 20vw, 210px);
  max-height: none;
  object-fit: cover;
  border-radius: 0;
  border: 0;
  background: #f8fafc;
}

body.citizen-ui .report-media-grid video.report-media {
  border-radius: 10px;
  border: 1px solid #dfe6f1;
}

body.citizen-ui .report-actions {
  margin-top: 12px;
  justify-content: flex-end;
}

body.citizen-ui .report-actions .btn {
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 0.88rem;
}

body.dashboard-ui {
  background: #f4f6fb;
  color: #1f2a44;
}

body.dashboard-ui .noise {
  display: none;
}

body.dashboard-ui .dash-shell {
  gap: 16px;
  max-width: 1440px;
  padding: 16px;
}

body.dashboard-ui .panel {
  border: 1px solid #e3e8f2;
  box-shadow: 0 2px 8px rgba(20, 34, 66, 0.06);
  background: #ffffff;
  border-radius: 14px;
}

body.dashboard-ui .dash-sidebar {
  border-radius: 14px;
  background: #f7f9ff;
  border: 1px solid #dce3ef;
  box-shadow: none;
  min-height: calc(100vh - 36px);
  top: 18px;
}

body.dashboard-ui .dash-sidebar .eyebrow {
  color: #6f7c99;
  margin-bottom: 10px;
}

body.dashboard-ui .side-btn {
  border-radius: 10px;
  border: 1px solid #d6ddea;
  background: #ffffff;
  color: #435173;
}

body.dashboard-ui .side-btn::before {
  content: '•';
  margin-right: 8px;
  color: #8a97b8;
}

body.dashboard-ui .side-btn.is-active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

body.dashboard-ui .side-btn.is-active::before {
  color: #cfd6ff;
}

body.dashboard-ui .btn-primary {
  background: #4f46e5;
}

body.dashboard-ui .btn-secondary {
  background: #eef2fb;
  color: #38476b;
}

body.dashboard-ui .btn-ghost {
  border: 1px solid #d8deef;
}

body.dashboard-ui .stat-card {
  border: 1px solid #e2e7f2;
  box-shadow: none;
  border-radius: 12px;
}

body.dashboard-ui .stat-card:first-child {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

body.dashboard-ui .stat-card:first-child span {
  color: #e8ebff;
}

body.dashboard-ui .admin-table th {
  background: #f5f7fc;
  color: #41506f;
}

body.dashboard-ui .status-pill {
  border: 1px solid transparent;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-verified {
  background: #dcfce7;
  color: #166534;
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4f46e5;
  background: #eef2ff;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    border-bottom: none;
    padding: 0;
  }

  .landing-hero .hero__left {
    padding: 28px 16px 18px;
    background: #ffffff;
  }

  .landing-hero__map {
    display: none;
  }

  .hero__stats {
    grid-template-columns: repeat(3, minmax(85px, 1fr));
  }

  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      'form'
      'map'
      'list';
  }

  #map {
    height: 380px;
  }

  #createReportMap {
    height: 250px;
  }

  .dash-shell {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    position: static;
    flex-direction: row;
    overflow: auto;
    min-height: auto;
  }

  body.citizen-ui .dash-shell {
    padding: 64px 12px 12px;
    display: grid;
    gap: 10px;
  }

  body.citizen-ui .dash-sidebar {
    width: 262px;
    height: calc(100vh - 52px);
    position: fixed;
    top: 52px;
    left: 0;
    z-index: 1205;
    border: 1px solid #dde3ec;
    border-right: 1px solid #dde3ec;
    padding: 10px;
    border-radius: 0;
    overflow-y: auto;
    overflow-x: hidden;
    flex-direction: column;
    transform: translateX(-104%);
    transition: transform 180ms ease;
  }

  body.citizen-ui .dash-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    padding: 0;
  }

  body.citizen-ui .panel {
    padding: 12px;
    border-radius: 12px;
  }

  body.citizen-ui .mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.citizen-ui #feedView .report-list {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  body.citizen-ui #myReportsView .report-list {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  body.citizen-ui .mobile-menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1210;
    height: 52px;
    background: #ffffff;
    border-bottom: 1px solid #dde3ec;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
  }

  body.citizen-ui .mobile-menu-bar strong {
    font-size: 0.92rem;
    color: #1f2937;
  }

  body.citizen-ui .mobile-menu-btn {
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 4px 2px;
    min-height: auto;
    color: #334155;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
  }

  body.citizen-ui .mobile-menu-btn:hover,
  body.citizen-ui .mobile-menu-btn:focus {
    background: transparent;
    color: #0f172a;
    outline: none;
  }

  body.citizen-ui .mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    z-index: 1200;
  }

  body.citizen-ui.mobile-menu-open .dash-sidebar {
    transform: translateX(0);
  }

  body.citizen-ui.mobile-menu-open .mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .landing-grid {
    grid-template-columns: 1fr;
  }

  .landing-kpis,
  .feature-grid,
  .timeline,
  .landing-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__menu {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-grid {
    grid-template-columns: 1fr;
  }

  .legal-nav {
    position: static;
  }
}

@media (max-width: 560px) {
  .grid-two {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    padding: 20px 14px 38px;
  }

  .auth-panel {
    max-width: none;
  }

  .pwa-install-btn {
    width: auto;
    max-width: 160px;
    white-space: nowrap;
    justify-content: center;
  }

  .topbar__actions .pwa-install-btn {
    min-width: 92px;
    max-width: 150px;
    padding: 7px 10px;
    font-size: 0.84rem;
  }

  .pwa-install-fab {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
  }

  .hero {
    padding-top: 24px;
  }

  .landing-hero .hero__left {
    padding: 20px 14px 12px;
  }

  .landing-hero__map {
    min-height: 220px;
  }

  .hero__stats {
    grid-template-columns: 1fr;
  }

  body.citizen-ui .mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .topbar__actions {
    width: auto;
    gap: 6px;
  }

  .landing-kpis,
  .feature-grid,
  .timeline,
  .landing-split {
    grid-template-columns: 1fr;
  }

  .admin-filter {
    grid-template-columns: 1fr;
  }

  .site-footer__menu {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .legal-shell {
    padding: 0 14px;
  }

  body.citizen-ui .report-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.citizen-ui .report-media {
    height: 128px;
  }

  body.citizen-ui .report-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
  }

  body.citizen-ui .report-actions .btn,
  body.citizen-ui .report-actions a.btn {
    width: 100%;
    min-width: 0;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

body.citizen-ui {
  background: #f3f6fb;
  color: #101828;
}

body.citizen-ui .noise {
  display: none;
}

@media (min-width: 981px) {

  body.citizen-ui .mobile-menu-bar,
  body.citizen-ui .mobile-menu-overlay {
    display: none;
  }
}

@media (max-width: 1280px) {
  body.citizen-ui #feedView .report-list {
    grid-template-columns: 1fr;
  }

  body.citizen-ui #myReportsView .report-list {
    grid-template-columns: 1fr;
  }
}