:root {
  --cyan: #00afd6;
  --gold: #c9a214;
  --gold-dark: #9d7b0e;
  --blue: #0274a1;
  --blue-dark: #004e68;
  --ink: #00171f;
  --green: #1b7a3d;
  --red: #b3261e;
  --amber: #d99600;
  --bg: #f5f8f9;
  --surface: #ffffff;
  --muted: #5f6f76;
  --line: #dce5e8;
  --shadow: 0 18px 45px rgba(0, 23, 31, 0.1);
  font-family: "Hind", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Hind", Arial, sans-serif;
}

.demo-notice {
  padding: 10px 0;
  background: #e7f3ec;
  color: #163e27;
  border-bottom: 1px solid #a7cbb4;
  font-size: 0.95rem;
  line-height: 1.5;
}

.demo-notice .container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  transform: translateY(-140%);
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0, 23, 31, 0.12);
}

.topbar {
  background: var(--cyan);
  color: #00171f;
  font-size: 0.88rem;
  font-weight: 600;
}

.topbar-inner {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 38px;
  flex-wrap: wrap;
}

.brand-row {
  background: var(--surface);
}

.brand-inner {
  display: grid;
  grid-template-columns: minmax(220px, 420px) 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 94px;
  padding: 14px 0;
}

.brand-lockup img,
.site-footer img {
  display: block;
  width: min(100%, 420px);
  height: auto;
}

.system-title {
  border-left: 4px solid var(--gold);
  padding-left: 18px;
}

.system-title span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.system-title strong {
  display: block;
  color: var(--blue-dark);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.1;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.main-nav {
  background: var(--gold);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 50px;
  overflow-x: auto;
}

.nav-inner a {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 16px;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 4px solid transparent;
}

.nav-inner a.active,
.nav-inner a:hover {
  color: #fff;
  background: rgba(0, 23, 31, 0.14);
  border-bottom-color: var(--blue);
}

.app-shell {
  min-height: 70vh;
}

.section {
  padding: 34px 0;
}

[id] {
  scroll-margin-top: 190px;
}

.hero-band {
  color: #fff;
  background:
    linear-gradient(110deg, rgba(0, 23, 31, 0.9), rgba(2, 116, 161, 0.75)),
    url("../assets/embu-road-project.jpg") center / cover;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: end;
  min-height: 310px;
  padding: 44px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-grid h1 {
  max-width: 760px;
  margin: 14px 0 12px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
}

.hero-grid p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.button.primary {
  color: #fff;
  background: var(--blue);
}

.button.secondary {
  color: var(--ink);
  background: var(--gold);
}

.button.ghost {
  color: var(--blue-dark);
  background: #eef8fb;
  border-color: #cde7ef;
}

.button.danger {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.transparency-panel {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.transparency-panel h2,
.panel h2,
.drawer-content h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--blue-dark);
}

.transparency-panel p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.transparency-panel p:last-child {
  border-bottom: 0;
}

.transparency-panel p strong {
  color: var(--blue-dark);
  font-size: 1.25rem;
}

.transparency-panel p span {
  color: var(--muted);
  text-align: right;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -34px;
  position: relative;
  z-index: 2;
}

.stat-card,
.panel,
.project-card,
.feedback-item,
.admin-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 23, 31, 0.06);
}

.stat-card {
  padding: 18px;
  min-height: 118px;
  min-width: 0;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.08;
  color: var(--blue-dark);
  overflow-wrap: anywhere;
}

.stat-card em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  align-items: start;
}

.analytics-shell {
  display: grid;
  gap: 18px;
}

.analytics-title-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.analytics-title-panel h2 {
  margin-top: 8px;
  font-size: 1.45rem;
}

.analytics-title-panel p {
  margin: 0;
  color: var(--muted);
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 18px;
  align-items: stretch;
}

.analytics-grid-wide {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.panel-header p {
  margin: 3px 0 0;
  color: var(--muted);
}

.page-section {
  min-height: 62vh;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field span,
.field > label {
  color: var(--blue-dark);
  font-size: 0.8rem;
  font-weight: 800;
}

.project-search-field {
  grid-column: span 2;
  padding: 10px;
  border: 1px solid rgba(0, 78, 104, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f3fafb);
  box-shadow: 0 8px 20px rgba(0, 23, 31, 0.07);
}

.project-search-field span {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-search-field input {
  min-height: 52px;
  border: 2px solid rgba(0, 78, 104, 0.34);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.project-search-field input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(2, 116, 161, 0.16);
}

.filter-grid input,
.filter-grid select,
.feedback-form input,
.feedback-form select,
.feedback-form textarea,
.auth-form input,
.admin-project-form input,
.admin-project-form select,
.admin-project-form textarea,
.admin-record-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

.feedback-form textarea,
.admin-project-form textarea {
  min-height: 110px;
  resize: vertical;
}

.department-filter-control {
  display: grid;
  gap: 5px;
}

.department-filter-control small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.department-quick-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.department-chip {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
}

.department-chip strong {
  color: var(--blue-dark);
  font-size: 0.82rem;
  line-height: 1.25;
}

.department-chip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.department-chip.active,
.department-chip:hover {
  border-color: var(--green);
  background: #f4fbf6;
}

.auth-layout {
  display: grid;
  min-height: 56vh;
  align-items: center;
}

.auth-panel {
  width: min(480px, 100%);
  margin: 0 auto;
}

.auth-panel h1 {
  margin: 10px 0 18px;
  color: var(--blue-dark);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.file-drop {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 138px;
  border: 2px dashed #a9c5ce;
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  padding: 18px;
}

.file-drop.active,
.file-drop:focus-within {
  border-color: var(--blue);
  background: #eef8fb;
}

.file-drop input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.file-drop strong {
  color: var(--blue-dark);
  font-size: 1rem;
}

.file-drop span {
  font-size: 0.9rem;
}

.project-register-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.refresh-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(27, 122, 61, 0.24);
  border-radius: 999px;
  background: #edf9f1;
  color: #145d2e;
  font-size: 0.78rem;
  font-weight: 900;
  animation: refreshPulse 0.85s ease-out;
}

.refresh-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(27, 122, 61, 0.12);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.segmented button {
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 700;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: var(--blue);
  color: #fff;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  padding: 16px;
  min-height: 238px;
  display: grid;
  gap: 12px;
}

.project-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--blue-dark);
}

.meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.76rem;
  font-weight: 700;
  background: #edf3f5;
  color: var(--blue-dark);
}

.badge.completed {
  background: #e8f5ed;
  color: var(--green);
}

.badge.ongoing {
  background: #e9f5fb;
  color: var(--blue);
}

.badge.stalled {
  background: #fcebea;
  color: var(--red);
}

.badge.procurement,
.badge.not-started {
  background: #fff5db;
  color: var(--gold-dark);
}

.progress {
  height: 9px;
  border-radius: 999px;
  background: #e3ecef;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.finance-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.9rem;
}

.finance-row strong {
  display: block;
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eff6f8;
  color: var(--blue-dark);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.chart-bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 180px) 1fr 64px;
  align-items: center;
  gap: 10px;
}

.bar-track {
  height: 12px;
  background: #e4ecef;
  border-radius: 999px;
  overflow: hidden;
}

.bar-track span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.donut-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
}

.donut {
  width: 180px;
  height: 180px;
}

.status-analytics {
  display: grid;
  grid-template-columns: minmax(190px, 240px) 1fr;
  gap: 18px;
  align-items: center;
}

.status-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: min(220px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
}

.status-donut::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.status-donut span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.status-donut strong {
  color: var(--blue-dark);
  font-size: 1.7rem;
  line-height: 1;
}

.status-breakdown,
.status-legend,
.status-mix-list,
.analytics-bars {
  display: grid;
  gap: 12px;
}

.stacked-bar {
  display: flex;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ecef;
}

.stacked-bar span {
  min-width: 3px;
}

.status-legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto 48px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.status-legend-row i,
.status-dot,
.chart-key i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.status-legend-row span,
.status-legend-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.analytics-table-wrap {
  overflow-x: auto;
}

.analytics-table-wrap table {
  min-width: 680px;
}

.status-dot {
  margin-right: 8px;
}

.chart-key {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.key-count {
  background: var(--blue);
}

.key-budget {
  background: var(--gold-dark);
}

.year-trend {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(76px, 1fr);
  gap: 10px;
  min-height: 230px;
  overflow-x: auto;
  padding: 8px 0 4px;
}

.year-column {
  display: grid;
  grid-template-rows: 150px auto auto;
  gap: 7px;
  min-width: 76px;
  text-align: center;
}

.year-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  height: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.year-bars span {
  width: 18px;
  border-radius: 5px 5px 0 0;
}

.count-bar {
  background: var(--blue);
}

.budget-bar {
  background: var(--gold-dark);
}

.year-column strong {
  color: var(--blue-dark);
  font-size: 0.82rem;
}

.year-column em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.analytics-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr minmax(72px, auto);
  gap: 10px;
  align-items: center;
}

.analytics-bar-row strong {
  min-width: 0;
  color: var(--blue-dark);
}

.analytics-bar-row span {
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.status-mix-row {
  display: grid;
  gap: 8px;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 20px;
  align-items: start;
}

.map-panel-full {
  width: 100%;
}

.map-legend-panel {
  position: sticky;
  top: 118px;
  border: 2px solid rgba(0, 78, 104, 0.24);
  background: linear-gradient(180deg, #f4fbfc, #ffffff);
  box-shadow: 0 16px 32px rgba(0, 23, 31, 0.1);
}

.map-legend-panel h2 {
  margin-bottom: 6px;
  color: var(--blue-dark);
}

.map-legend-panel > p {
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
}

.gis-map {
  position: relative;
  height: clamp(700px, 68vw, 900px);
  min-height: 700px;
  scroll-margin-top: 196px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(2, 116, 161, 0.1), rgba(201, 162, 20, 0.12)),
    #f8fbfc;
}

.gis-base-map {
  position: absolute;
  inset: 78px 20px 104px;
  width: calc(100% - 40px);
  height: calc(100% - 182px);
  display: block;
}

.map-ward {
  fill: rgba(248, 251, 252, 0.94);
  stroke: rgba(0, 78, 104, 0.54);
  stroke-width: 0.36;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition:
    fill 0.16s ease,
    stroke 0.16s ease;
}

.map-ward.density-empty {
  fill: rgba(248, 251, 252, 0.96);
}

.map-ward.density-low {
  fill: rgba(2, 116, 161, 0.22);
}

.map-ward.density-medium {
  fill: rgba(201, 162, 20, 0.34);
}

.map-ward.density-high {
  fill: rgba(27, 122, 61, 0.42);
}

.map-ward.density-very-high {
  fill: rgba(0, 78, 104, 0.58);
}

.map-ward:hover,
.map-ward:focus {
  stroke: rgba(0, 78, 104, 0.95);
  stroke-width: 0.7;
  outline: none;
}

.map-pin {
  cursor: pointer;
}

.map-pin circle {
  fill: var(--blue);
  stroke: #fff;
  stroke-width: 0.78;
  filter: drop-shadow(0 1.4px 2px rgba(0, 23, 31, 0.28));
  transition:
    r 0.16s ease,
    stroke-width 0.16s ease;
}

.map-pin.completed circle {
  fill: var(--green);
}

.map-pin.procurement circle,
.map-pin.under-procurement circle {
  fill: var(--gold-dark);
}

.map-pin.stalled circle {
  fill: var(--red);
}

.map-pin text {
  fill: #fff;
  font-size: 2.1px;
  font-weight: 800;
  text-anchor: middle;
  pointer-events: none;
  letter-spacing: 0;
}

.map-pin:hover circle,
.map-pin:focus circle {
  stroke-width: 1.05;
  outline: none;
}

.map-labels {
  pointer-events: none;
}

.ward-map-label {
  pointer-events: auto;
  cursor: pointer;
}

.ward-map-label circle {
  fill: #ffffff;
  stroke: var(--blue-dark);
  stroke-width: 0.42;
  filter: drop-shadow(0 0.7px 1.2px rgba(0, 23, 31, 0.24));
}

.ward-map-number {
  fill: var(--blue-dark);
  font-size: 1.72px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
  letter-spacing: 0;
}


.ward-map-label:hover circle,
.ward-map-label:focus circle {
  stroke-width: 0.62;
  fill: #fff9df;
}

.map-layer-title {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 3;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 229, 232, 0.9);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(0, 23, 31, 0.08);
}

.map-layer-title strong {
  color: var(--blue-dark);
}

.map-layer-title span {
  color: var(--muted);
  font-size: 0.82rem;
}

.map-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  z-index: 2;
  width: var(--size, 32px);
  height: var(--size, 32px);
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 10px 25px rgba(0, 23, 31, 0.22);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  padding: 0;
  line-height: 1;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.map-marker.completed {
  background: var(--green);
}

.map-marker.ongoing {
  background: var(--blue);
}

.map-marker.procurement,
.map-marker.under-procurement,
.map-marker.not-started {
  background: var(--gold-dark);
}

.map-marker.stalled {
  background: var(--red);
}

.map-marker:hover,
.map-marker:focus {
  z-index: 6;
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 14px 30px rgba(0, 23, 31, 0.3);
}

.map-marker b {
  color: #fff;
  font-size: clamp(0.58rem, 1.1vw, 0.78rem);
  font-weight: 800;
}

.map-marker span {
  position: absolute;
  left: 50%;
  bottom: calc(var(--size, 32px) + 8px);
  transform: translateX(-50%);
  min-width: 160px;
  padding: 7px 9px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.map-marker:hover span,
.map-marker:focus span {
  opacity: 1;
}

.ward-spotlight {
  position: absolute;
  top: 74px;
  right: 18px;
  z-index: 5;
  display: grid;
  gap: 3px;
  width: min(320px, calc(100% - 36px));
  padding: 11px 12px;
  border: 1px solid rgba(0, 78, 104, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(0, 23, 31, 0.12);
}

.ward-spotlight strong {
  color: var(--blue-dark);
  font-size: 1rem;
}

.ward-spotlight span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.map-legend {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid rgba(220, 229, 232, 0.9);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-legend .legend-title {
  color: var(--blue-dark);
  font-weight: 900;
  margin-right: 4px;
}

.map-legend i {
  width: 18px;
  height: 12px;
  border: 1px solid rgba(0, 78, 104, 0.34);
  border-radius: 3px;
  background: rgba(2, 116, 161, 0.22);
}

.map-legend i.density-medium {
  background: rgba(201, 162, 20, 0.34);
}

.map-legend i.density-high {
  background: rgba(27, 122, 61, 0.42);
}

.map-legend i.density-very-high {
  background: rgba(0, 78, 104, 0.58);
}

.ward-key-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.ward-key-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.ward-key-item:hover,
.ward-key-item:focus {
  border-color: rgba(0, 78, 104, 0.72);
  background: #f3fafb;
  box-shadow: 0 8px 18px rgba(0, 23, 31, 0.08);
  outline: none;
}

.ward-key-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-dark);
  color: #fff;
  font-weight: 900;
}

.ward-key-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ward-key-copy strong {
  color: var(--blue-dark);
  font-size: 0.96rem;
  line-height: 1.18;
}

.ward-key-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.feedback-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.feedback-form {
  display: grid;
  gap: 10px;
}

.admin-project-form {
  display: grid;
  gap: 12px;
}

.admin-import-priority {
  border-color: rgba(201, 162, 20, 0.45);
  background: linear-gradient(180deg, #fffdf4, #ffffff);
}

.admin-import-priority .file-drop {
  min-height: 168px;
  border-color: var(--gold-dark);
  background: #fffaf0;
}

.admin-record-disclosure {
  overflow: hidden;
  border: 2px solid rgba(0, 78, 104, 0.22);
  background: linear-gradient(180deg, #f4fbfc, #ffffff);
  box-shadow: 0 12px 26px rgba(0, 23, 31, 0.08);
}

.admin-record-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
  padding: 4px;
}

.admin-record-disclosure summary::-webkit-details-marker {
  display: none;
}

.admin-record-disclosure summary span {
  display: grid;
  gap: 3px;
}

.admin-record-disclosure summary strong {
  color: var(--blue-dark);
  font-size: 1.28rem;
}

.admin-record-disclosure summary small {
  color: var(--muted);
  font-weight: 700;
}

.admin-record-disclosure summary b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 6px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(0, 78, 104, 0.22);
}

.admin-record-disclosure[open] summary b::before {
  content: "Show Less";
  font-size: 0.95rem;
}

.admin-record-disclosure[open] summary b {
  font-size: 0;
}

.admin-record-disclosure summary:hover b,
.admin-record-disclosure summary:focus b {
  background: var(--blue);
}

.admin-record-disclosure-body {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-record-manager {
  display: grid;
  gap: 12px;
}

.admin-record-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-record-list {
  display: grid;
  gap: 10px;
}

.admin-record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.admin-record-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-record-main h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1rem;
  line-height: 1.25;
}

.admin-record-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-record-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-record-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.feedback-list {
  display: grid;
  gap: 12px;
}

.feedback-item {
  padding: 14px;
}

.official-response {
  margin-top: 10px;
  padding: 10px;
  border-left: 4px solid var(--gold);
  background: #fff8df;
  color: #493d16;
}


.feedback-meta {
  margin: -4px 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.contact-note,
.privacy-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(0, 78, 104, 0.16);
  border-radius: 6px;
  background: #f6fbfc;
}

.contact-note strong,
.privacy-note strong {
  color: var(--blue-dark);
}

.contact-note span,
.privacy-note span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.feedback-contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.consent-row input {
  margin-top: 3px;
}

.admin-feedback-list {
  display: grid;
  gap: 12px;
}

.admin-feedback-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.admin-feedback-main {
  display: grid;
  gap: 8px;
}

.admin-feedback-main h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1rem;
  line-height: 1.25;
}

.admin-feedback-main p,
.admin-feedback-main small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.admin-feedback-controls {
  display: grid;
  gap: 10px;
}

.admin-feedback-controls textarea {
  min-height: 94px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-tile {
  padding: 16px;
}

.admin-tile strong {
  display: block;
  font-size: 1.55rem;
  color: var(--blue-dark);
}

.schema-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-drawer {
  position: fixed;
  z-index: 60;
  inset: 0 0 0 auto;
  width: min(560px, 100%);
  background: #fff;
  box-shadow: -22px 0 45px rgba(0, 23, 31, 0.22);
  overflow-y: auto;
}

.drawer-close {
  position: sticky;
  top: 0;
  z-index: 2;
  float: right;
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.drawer-content {
  padding: 26px;
}

.admin-crud-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
}

.timeline-step i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--line);
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-step.done i {
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.loading-state {
  min-height: 60vh;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--blue-dark);
  font-weight: 700;
}

.loading-mark {
  width: 42px;
  height: 42px;
  border: 4px solid #d5e8ee;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.project-more-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--muted);
  flex-wrap: wrap;
}

.project-more-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.project-more-controls select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes refreshPulse {
  0% {
    background: #dff3e6;
    transform: translateY(-1px);
  }
  100% {
    background: #edf9f1;
    transform: translateY(0);
  }
}

@media (max-width: 1020px) {
  .stat-grid,
  .admin-grid,
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout-grid,
  .analytics-grid,
  .analytics-grid-wide,
  .map-layout,
  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .map-legend-panel {
    position: static;
  }

  .ward-key-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    max-height: none;
    overflow: visible;
  }

  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .brand-inner {
    grid-template-columns: 1fr auto;
  }

  .system-title {
    grid-column: 1 / -1;
  }

  .menu-button {
    display: inline-flex;
  }

  .main-nav {
    display: none;
  }

  .main-nav.open {
    display: block;
  }

  .nav-inner {
    display: grid;
    align-items: stretch;
  }

  .nav-inner a {
    width: 100%;
  }

  .hero-grid,
  .donut-grid,
  .status-analytics,
  .schema-grid {
    grid-template-columns: 1fr;
  }

  .analytics-title-panel {
    display: grid;
  }

  .stat-grid,
  .analytics-kpi-grid {
    grid-template-columns: 1fr;
    margin-top: 14px;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .project-search-field {
    grid-column: auto;
  }

  .finance-row {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }

  .analytics-bar-row,
  .status-legend-row {
    grid-template-columns: 1fr;
  }

  .analytics-bar-row span,
  .status-legend-row span,
  .status-legend-row em {
    text-align: left;
  }

  .admin-record-search,
  .admin-record-card,
  .admin-feedback-card,
  .feedback-contact-grid {
    grid-template-columns: 1fr;
  }

  .admin-record-actions {
    justify-content: stretch;
  }

  .admin-record-actions .button {
    flex: 1 1 130px;
  }

  .admin-record-disclosure summary {
    display: grid;
  }

  .admin-record-disclosure summary b {
    width: 100%;
  }

  .gis-map {
    height: 620px;
    min-height: 620px;
  }

  .gis-base-map {
    inset: 78px 8px 112px;
    width: calc(100% - 16px);
    height: calc(100% - 190px);
  }


  .detail-list div {
    grid-template-columns: 1fr;
  }
}


.import-template-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(0, 72, 96, 0.14);
  background: #f5faf8;
}

.import-template-panel div {
  display: grid;
  gap: 4px;
}

.import-template-panel span {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .import-template-panel {
    align-items: stretch;
    flex-direction: column;
  }
}


.gis-reconciliation-note {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(0, 72, 96, 0.16);
  border-left: 4px solid var(--green);
  background: #f6fbf8;
  color: var(--ink);
}

.gis-reconciliation-note strong {
  color: var(--green);
}

.gis-reconciliation-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.feedback-project-picker {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(0, 72, 96, 0.16);
  border-radius: 8px;
  background: #f8fbfc;
}

.feedback-project-intro {
  display: grid;
  gap: 4px;
}

.feedback-project-intro strong {
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.feedback-project-intro span {
  color: var(--muted);
  line-height: 1.4;
}

.feedback-project-search-main input {
  min-height: 52px;
  border: 2px solid rgba(0, 78, 104, 0.34);
  font-size: 1rem;
  font-weight: 700;
}

.project-refine-panel {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.project-refine-panel summary {
  width: fit-content;
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 800;
}

.project-refine-panel .feedback-project-filters {
  margin-top: 12px;
}

.selected-project-summary {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 11px 12px;
  border-left: 4px solid var(--green);
  background: #edf9f1;
}

.selected-project-summary[hidden] {
  display: none;
}

.selected-project-summary strong {
  color: var(--green);
}

.selected-project-summary span,
.selected-project-summary small {
  color: var(--muted);
  line-height: 1.35;
}

.feedback-project-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}


.project-title-field {
  position: relative;
  z-index: 5;
}

.project-combobox {
  position: relative;
}

.project-combobox-control {
  position: relative;
  display: flex;
  align-items: stretch;
}

.project-combobox-control input {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-right: 50px;
}

.project-combobox-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  z-index: 3;
  width: 38px;
  height: calc(100% - 12px);
  border: 1px solid rgba(0, 78, 104, 0.2);
  border-radius: 6px;
  background: #eef9fb;
  cursor: pointer;
}

.project-combobox-toggle::before {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--blue-dark);
  border-bottom: 2px solid var(--blue-dark);
  transform: translateY(-2px) rotate(45deg);
}

.project-combobox-toggle[aria-expanded="true"]::before {
  transform: translateY(2px) rotate(225deg);
}

.project-combobox-toggle:focus {
  outline: 3px solid rgba(2, 116, 161, 0.18);
  outline-offset: 2px;
}

.project-picker-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid rgba(0, 72, 96, 0.2);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 23, 31, 0.18);
}

.project-picker-results[hidden] {
  display: none;
}

.project-picker-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.project-picker-option:hover,
.project-picker-option.active,
.project-picker-option:focus {
  background: #eef9fb;
  outline: none;
}

.project-picker-option strong {
  color: var(--blue-dark);
  font-size: 0.96rem;
  line-height: 1.25;
}

.project-picker-option span,
.project-picker-option small,
.project-picker-empty,
.project-picker-overflow {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.project-picker-empty,
.project-picker-overflow {
  padding: 12px;
  background: #f8fbfc;
}

.project-picker-overflow {
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.project-picker-help,
.privacy-note-inline {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.privacy-note-inline {
  padding: 10px 12px;
  border: 1px solid rgba(0, 72, 96, 0.12);
  background: #f8faf9;
}

.form-status-message {
  padding: 10px 12px;
  border: 1px solid rgba(0, 72, 96, 0.16);
  border-radius: 6px;
  background: #f6fbf8;
  color: var(--blue-dark);
  font-weight: 700;
}

.form-status-message.success {
  border-color: rgba(27, 122, 61, 0.28);
  background: #edf9f1;
  color: var(--green);
}

.form-status-message.error {
  border-color: rgba(179, 38, 30, 0.28);
  background: #fff4f2;
  color: var(--red);
}

@media (max-width: 760px) {
  .feedback-project-filters {
    grid-template-columns: 1fr;
  }
}


@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}


.site-footer a {
  display: block;
  width: fit-content;
  min-height: 32px;
  padding: 4px 0;
}

.site-footer a:focus {
  outline: 3px solid rgba(201, 162, 20, 0.45);
  outline-offset: 3px;
}
