/* =========================
   GLOBAL STYLES
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #14325c;
  --green: #08c464;
  --light-green: #7ed957;
  --bg: #f5f7f2;
  --card: rgba(255, 255, 255, 0.72);
  --text: #17324f;
  --muted: #6d7c8f;
  --border: rgba(20, 50, 92, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}
/* =========================
   SUBTLE TOPOGRAPHIC BACKGROUND
========================= */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background-image: url("data:image/svg+xml,%3Csvg width='1400' height='1400' viewBox='0 0 1400 1400' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%237b8f62' stroke-width='1.6' stroke-opacity='0.22'%3E%3Cpath d='M-120 260 C120 90 310 120 480 230 C650 340 790 330 980 210 C1140 110 1320 130 1530 270'/%3E%3Cpath d='M-90 330 C150 160 320 190 500 300 C690 415 830 405 1010 285 C1185 170 1340 205 1510 355'/%3E%3Cpath d='M-70 410 C170 230 350 255 540 370 C720 480 890 470 1060 360 C1230 250 1370 280 1510 430'/%3E%3Cpath d='M-130 880 C110 720 310 735 510 860 C720 990 880 980 1070 850 C1230 740 1370 760 1530 900'/%3E%3Cpath d='M-90 960 C130 810 340 820 540 945 C740 1070 900 1060 1085 935 C1260 820 1385 850 1510 985'/%3E%3Cpath d='M-60 1040 C150 890 365 905 560 1025 C760 1150 925 1140 1110 1020 C1265 920 1380 940 1515 1060'/%3E%3C/g%3E%3C/svg%3E");

  background-size: 1150px 1150px;
  background-position: center top;
  opacity: 0.55;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;

  background:
    radial-gradient(circle at 12% 18%, rgba(126, 217, 87, 0.08), transparent 28%),
    radial-gradient(circle at 88% 35%, rgba(154, 118, 72, 0.045), transparent 30%),
    radial-gradient(circle at 40% 78%, rgba(8, 196, 100, 0.045), transparent 32%);

  opacity: 0.9;
}

/* =========================
   HEADER
========================= */

.site-header {
  width: 100%;
  height: 92px;
  padding: 0 60px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  position: fixed;
  top: 0;
  z-index: 1000;

  backdrop-filter: blur(18px);
  background: rgba(245, 247, 242, 0.82);
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  width: 210px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 0.65;
}

.nav-cta {
  background: var(--green);
  color: white !important;
  padding: 12px 18px;
  border-radius: 999px;
}

/* ---> DemoSession Navigation Tools <--- */

.demo-session-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 999px;
  background: rgba(8, 196, 100, 0.09);
  border: 1px solid rgba(8, 196, 100, 0.16);
  color: var(--navy);
  white-space: nowrap;
}

.demo-session-pill span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.demo-session-pill strong {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 900;
}

.demo-session-pill button {
  border: none;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(20, 50, 92, 0.08);
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.demo-session-pill button:hover {
  background: rgba(20, 50, 92, 0.14);
}

/* =========================
   HERO
========================= */

.hero-section {
  min-height: 100vh;
  padding: 160px 80px 100px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;

  position: relative;
}

.eyebrow {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero-copy h1 {
  font-size: 5.4rem;
  line-height: 0.95;
  font-weight: 800;
  color: var(--navy);

  max-width: 700px;
  margin-bottom: 32px;
}

.hero-subtitle {
  max-width: 640px;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 42px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* =========================
   BUTTONS
========================= */

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 16px 24px;
  border-radius: 999px;

  text-decoration: none;
  font-weight: 700;
  transition: all 0.25s ease;
}

.primary-btn {
  background: var(--green);
  color: white;
  box-shadow: 0 12px 30px rgba(8, 196, 100, 0.22);
}

.primary-btn:hover {
  transform: translateY(-2px);
}

.secondary-btn {
  border: 1px solid rgba(20, 50, 92, 0.15);
  color: var(--navy);
  background: rgba(255,255,255,0.7);
}

.secondary-btn:hover {
  background: white;
}

.secondary-btn.dark {
  background: var(--navy);
  color: white;
  border: none;
}

/* =========================
   MAP CARD
========================= */

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.map-card {
  width: 100%;
  max-width: 620px;
  height: 620px;

  position: relative;

  border-radius: 42px;

  background:
    radial-gradient(circle at top left, rgba(8,196,100,0.08), transparent 30%),
    rgba(255,255,255,0.78);

  backdrop-filter: blur(20px);

  border: 1px solid rgba(20,50,92,0.06);

  overflow: hidden;

  box-shadow:
    0 30px 80px rgba(15, 40, 80, 0.08);
}

.map-grid {
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(rgba(20,50,92,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,50,92,0.04) 1px, transparent 1px);

  background-size: 60px 60px;
}

/* =========================
   FLOW LINES
========================= */

.flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.flow-lines path {
  fill: none;
  stroke: rgba(8,196,100,0.28);
  stroke-width: 3;
  stroke-linecap: round;

  stroke-dasharray: 14;
  animation: flowAnimation 18s linear infinite;
}

@keyframes flowAnimation {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: 300;
  }
}

/* =========================
   MAP NODES
========================= */

.map-node {
  position: absolute;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.88rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(20,50,92,0.08);
  animation: floatNode 5s ease-in-out infinite;
  z-index: 3;
}

.map-node small,
.demand-region small,
.mini-node span {
  display: block;
  margin-top: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.58;
}

.farm-node {
  background: rgba(8,196,100,0.14);
  color: var(--green);
}

.buyer-node {
  background: rgba(20,50,92,0.08);
  color: var(--navy);
}

.mini-node {
  position: absolute;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  color: rgba(20,50,92,0.72);
  border: 1px solid rgba(20,50,92,0.06);
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(20,50,92,0.05);
  z-index: 3;
}

.demand-region {
  position: absolute;
  width: 150px;
  height: 108px;
  border-radius: 44% 56% 48% 52% / 48% 42% 58% 52%;
  background:
    radial-gradient(circle at 45% 45%, rgba(126,217,87,0.34), rgba(126,217,87,0.16) 58%, rgba(126,217,87,0.06));
  color: #3d6f24;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: demandPulse 5.8s ease-in-out infinite;
  box-shadow: 0 22px 55px rgba(126,217,87,0.18);
  z-index: 2;
}

.demand-region span {
  font-weight: 900;
  font-size: 0.9rem;
}

@keyframes demandPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.045);
    opacity: 1;
  }
}

.node-one {
  top: 120px;
  left: 90px;
}

.node-two {
  top: 180px;
  right: 80px;
}

.node-three {
  top: 292px;
  left: 245px;
}

.node-four {
  bottom: 110px;
  right: 95px;
}

.route-pulse {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(8,196,100,0.45);
  opacity: 0.72;
  z-index: 4;
}

.pulse-one {
  animation: pulseRouteOne 8s ease-in-out infinite;
}

.pulse-two {
  animation: pulseRouteTwo 10s ease-in-out infinite;
  opacity: 0.45;
}

@keyframes pulseRouteOne {
  0% { top: 150px; left: 140px; }
  35% { top: 210px; left: 310px; }
  70% { top: 178px; left: 470px; }
  100% { top: 150px; left: 140px; }
}

@keyframes pulseRouteTwo {
  0% { top: 330px; left: 185px; }
  45% { top: 425px; left: 360px; }
  80% { top: 360px; left: 500px; }
  100% { top: 330px; left: 185px; }
}

/* =========================
   MAP PANEL
========================= */

.map-panel {
  position: absolute;
  left: 40px;
  bottom: 40px;

  width: 280px;

  background: rgba(255,255,255,0.82);

  border-radius: 24px;
  padding: 24px;

  backdrop-filter: blur(18px);

  border: 1px solid rgba(20,50,92,0.06);
}

.panel-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.map-panel h3 {
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.panel-stat-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.panel-stat-row span {
  background: rgba(20,50,92,0.06);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* =========================
   CONTENT SECTIONS
========================= */

.explore-section,
.network-section,
.analytics-section,
.final-cta {
  padding: 140px 80px;
}

.section-label {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;

  margin-bottom: 80px;
}

.split-layout h2,
.network-copy h2,
.analytics-panel h2,
.final-cta h2 {
  font-size: 3.2rem;
  line-height: 1.05;
  color: var(--navy);
}

.split-layout p,
.network-copy p,
.analytics-panel p {
  font-size: 1.05rem;
  color: var(--muted);
}

/* =========================
   FEATURE CARDS
========================= */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.feature-card {
  padding: 36px;
  border-radius: 30px;

  background: rgba(255,255,255,0.75);

  border: 1px solid rgba(20,50,92,0.06);

  transition: transform 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
}

.feature-number {
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

.feature-card h3 {
  margin: 18px 0;
  font-size: 1.4rem;
  color: var(--navy);
}

.feature-card p {
  color: var(--muted);
}

/* =========================
   PATHWAY CARDS
========================= */

.pathway-grid {
  margin-top: 60px;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.pathway-card {
  min-height: 260px;

  padding: 36px;
  border-radius: 34px;

  text-decoration: none;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.82),
      rgba(240,255,244,0.88)
    );

  border: 1px solid rgba(20,50,92,0.06);

  transition: all 0.28s ease;
}

.pathway-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(20,50,92,0.08);
}

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

.pathway-card h3 {
  margin-top: 24px;
  color: var(--navy);
  font-size: 1.8rem;
  line-height: 1.2;
}

/* =========================
   ANALYTICS
========================= */

.analytics-panel {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;

  padding: 60px;
  border-radius: 40px;

  background:
    linear-gradient(
      135deg,
      rgba(20,50,92,0.96),
      rgba(10,30,58,0.98)
    );

  color: white;

  overflow: hidden;
}

.analytics-panel h2 {
  color: white;
  margin-bottom: 26px;
}

.analytics-panel p {
  color: rgba(255,255,255,0.72);
  margin-bottom: 40px;
}

.analytics-mockup {
  background: rgba(255,255,255,0.08);
  border-radius: 30px;
  padding: 30px;
}

.mockup-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
}

.mockup-header strong {
  color: var(--green);
}

.bar-row {
  height: 220px;

  display: flex;
  align-items: flex-end;
  gap: 14px;

  margin-bottom: 24px;
}

.bar-row span {
  flex: 1;
  border-radius: 18px 18px 0 0;

  background:
    linear-gradient(
      180deg,
      var(--light-green),
      var(--green)
    );
}

.mockup-footer {
  display: flex;
  justify-content: space-between;

  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* =========================
   FINAL CTA
========================= */

.final-cta {
  text-align: center;
}

.final-cta h2 {
  max-width: 840px;
  margin: 0 auto 42px;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  padding: 50px 80px;

  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;

  border-top: 1px solid rgba(20,50,92,0.08);

  color: var(--muted);
  font-size: 0.9rem;
}

/* =========================
   HERO MAP REFINEMENT FIX
========================= */

.map-card {
  position: relative;
}

.map-node span {
  display: block;
}

.map-node small {
  display: block;
  margin-top: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
}

.mini-node {
  position: absolute;
  top: 292px;
  left: 245px;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  color: rgba(20,50,92,0.7);
  border: 1px solid rgba(20,50,92,0.08);
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(20,50,92,0.06);
  z-index: 4;
}

.demand-region {
  position: absolute;
  bottom: 105px;
  right: 95px;

  width: 150px;
  height: 108px;

  border-radius: 44% 56% 48% 52% / 48% 42% 58% 52%;

  background:
    radial-gradient(
      circle at 45% 45%,
      rgba(126,217,87,0.34),
      rgba(126,217,87,0.16) 58%,
      rgba(126,217,87,0.06)
    );

  color: #3d6f24;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  box-shadow: 0 22px 55px rgba(126,217,87,0.18);
  z-index: 3;

  animation: demandPulse 5.8s ease-in-out infinite;
}

.demand-region span {
  display: block;
  font-weight: 900;
  font-size: 0.9rem;
}

.demand-region small {
  display: block;
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.58;
}

@keyframes demandPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.045);
    opacity: 1;
  }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {

  .hero-section,
  .split-layout,
  .analytics-panel {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .pathway-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 4rem;
  }

  .map-card {
    height: 520px;
  }
}

@media (max-width: 768px) {

  .site-header,
  .hero-section,
  .explore-section,
  .network-section,
  .analytics-section,
  .final-cta,
  .site-footer {
    padding-left: 28px;
    padding-right: 28px;
  }

  .nav-links {
    display: none;
  }

  .hero-copy h1,
  .split-layout h2,
  .network-copy h2,
  .analytics-panel h2,
  .final-cta h2 {
    font-size: 2.6rem;
  }

  .map-card {
    height: 420px;
  }

  .analytics-panel {
    padding: 36px;
  }
}

/* =========================
   LOCALITY MAP PAGE
========================= */

.map-page {
  background: #f5f7f2;
  overflow: hidden;
}

.map-topbar {
  height: 82px;
  padding: 0 34px;

  display: flex;
  align-items: center;
  gap: 28px;

  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(20, 50, 92, 0.08);

  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  z-index: 2000;
}

.map-brand img {
  width: 170px;
  height: auto;
  display: block;
}

.map-search {
  flex: 1;
  max-width: 520px;
}

.map-search input {
  width: 100%;
  padding: 13px 18px;

  border-radius: 999px;
  border: 1px solid rgba(20, 50, 92, 0.12);

  background: #f8faf6;
  color: var(--navy);

  font-size: 0.95rem;
  outline: none;
}

.map-search input:focus {
  border-color: rgba(8, 196, 100, 0.5);
  box-shadow: 0 0 0 4px rgba(8, 196, 100, 0.08);
}

.map-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.map-nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.map-layout {
  height: 100vh;
  padding-top: 82px;

  display: grid;
  grid-template-columns: 340px 1fr;
}

.map-sidebar {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(16px);

  border-right: 1px solid rgba(20, 50, 92, 0.08);

  padding: 28px;

  overflow-y: auto;
  z-index: 1000;
}

.sidebar-section {
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(20, 50, 92, 0.08);
}

.sidebar-section:last-child {
  border-bottom: none;
}

.sidebar-eyebrow {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.map-sidebar h2 {
  color: var(--navy);
  font-size: 1.7rem;
  line-height: 1.1;
  margin-bottom: 12px;
}

.map-sidebar h3 {
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.map-sidebar p {
  color: var(--muted);
  font-size: 0.94rem;
}

.filter-label {
  display: block;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
  margin: 18px 0 8px;
}

.map-sidebar select {
  width: 100%;
  padding: 12px 14px;

  border-radius: 14px;
  border: 1px solid rgba(20, 50, 92, 0.12);

  background: #f8faf6;
  color: var(--navy);

  font-weight: 600;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-top: 18px;

  color: var(--navy);
  font-weight: 700;
  font-size: 0.9rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-grid div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(20, 50, 92, 0.045);
}

.stat-grid strong {
  display: block;
  color: var(--navy);
  font-size: 1.35rem;
}

.stat-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;

  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;

  margin-bottom: 12px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.legend-dot.farm {
  background: var(--green);
}

.legend-dot.buyer {
  background: var(--navy);
}

.legend-region {
  width: 20px;
  height: 14px;
  border-radius: 6px;

  background: rgba(126, 217, 87, 0.25);
  border: 1px solid rgba(8, 196, 100, 0.25);
}

.map-main {
  position: relative;
  overflow: hidden;
}

#localityMap {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Leaflet visual polish */

.leaflet-container {
  font-family: Inter, Helvetica, Arial, sans-serif;
  background: #eef2eb;
}

.leaflet-control-attribution {
  font-size: 10px;
}

.leaflet-popup-content-wrapper {
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(20, 50, 92, 0.16);
}

.leaflet-popup-content {
  margin: 18px;
  color: var(--navy);
}

.profile-hover-card {
  background: rgba(255,255,255,0.94);
  border: none;
  border-radius: 22px;
  padding: 0;

  box-shadow:
    0 24px 55px rgba(20,50,92,0.18);

  backdrop-filter: blur(18px);
}

.profile-hover-card .leaflet-tooltip-content {
  margin: 0;
}

.profile-popup {
  min-width: 240px;
  padding: 18px;
}

.profile-popup h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.profile-popup .profile-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.profile-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;

  margin-top: 14px;
}

.profile-stat {
  padding: 6px 10px;
  border-radius: 999px;

  background: rgba(20,50,92,0.06);

  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
}

.profile-popup h3 {
  margin: 0 0 6px;
  color: var(--navy);
}

.profile-popup p {
  margin: 4px 0;
  color: var(--muted);
}

.popup-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 10px;

  border-radius: 999px;

  background: rgba(8, 196, 100, 0.12);
  color: var(--green);

  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Custom pin styles */

.pin-wrap {
  position: relative;
  width: 68px;
  height: 78px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.locality-pin {
  width: 48px;
  height: 58px;

  position: relative;

  border-radius: 24px 24px 24px 8px;
  transform: rotate(-45deg);

  display: flex;
  align-items: center;
  justify-content: center;

  border: 4px solid white;

  box-shadow:
    0 14px 28px rgba(20, 50, 92, 0.24),
    inset 0 0 0 1px rgba(255,255,255,0.24);

  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.pin-glyph {
  transform: rotate(45deg);

  color: white;

  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

.pin-wrap:hover .locality-pin {
  transform: rotate(-45deg) scale(1.08);
  box-shadow:
    0 20px 42px rgba(20, 50, 92, 0.28),
    inset 0 0 0 1px rgba(255,255,255,0.3);
}

.locality-pin.farm-pin {
  background: linear-gradient(135deg, #08c464, #7ed957);
}

.locality-pin.buyer-pin {
  background: linear-gradient(135deg, #1f6feb, #4f9cff);
}

.pin-svg {
  width: 24px;
  height: 24px;

  transform: rotate(45deg);

  fill: none;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;

  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.16));
}

/* Organic badge attached to pin */
.organic-badge {
  position: absolute;
  top: -12px;
  right: -12px;

  width: 25px;
  height: 25px;

  border-radius: 999px;
  background: white;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 8px 18px rgba(20,50,92,0.18);

  transform: rotate(45deg);
}

.organic-inner {
  width: 18px;
  height: 18px;

  border-radius: 999px;
  border: 1.7px solid var(--green);

  display: flex;
  align-items: center;
  justify-content: center;
}

.organic-inner svg {
  width: 12px;
  height: 12px;

  fill: none;
  stroke: var(--green);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.coalition-badge {
  position: absolute;
  bottom: -6px;
  left: -10px;

  width: 26px;
  height: 26px;

  border-radius: 999px;
  background: white;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 8px 18px rgba(20,50,92,0.16);

  transform: rotate(45deg);
}

.coalition-inner {
  width: 18px;
  height: 18px;

  border-radius: 999px;
  border: 1.7px solid #3b82f6;

  display: flex;
  align-items: center;
  justify-content: center;
}

.coalition-inner svg {
  width: 11px;
  height: 11px;

  fill: none;
  stroke: #3b82f6;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Demand region */

.demand-zone {
  background: rgba(126, 217, 87, 0.18);
  border: 2px solid rgba(8, 196, 100, 0.35);
  border-radius: 999px;
}

/* Floating insight cards */

.floating-insight {
  position: absolute;
  z-index: 700;

  padding: 16px 18px;
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);

  border: 1px solid rgba(20, 50, 92, 0.08);
  box-shadow: 0 18px 45px rgba(20, 50, 92, 0.12);

  max-width: 250px;
}

.floating-insight span {
  display: block;
  color: var(--green);

  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  margin-bottom: 5px;
}

.floating-insight strong {
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.25;
}

.insight-one {
  top: 96px;
  right: 34px;
}

.insight-two {
  top: 206px;
  right: 34px;
}

.floating-insight {
  animation: insightFloatIn 0.55s ease both;
}


@keyframes insightFloatIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive */

@media (max-width: 900px) {
  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-sidebar {
    display: none;
  }

  .map-nav {
    display: none;
  }

  .map-brand img {
    width: 145px;
  }

  .floating-insight {
    display: none;
  }
}

.map-main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 500;

  background:
    radial-gradient(circle at center,
      transparent 58%,
      rgba(8, 24, 18, 0.055) 100%);
}

.leaflet-tile {
  filter: saturate(1.2) contrast(1.01);
}


.profile-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 390px;
  height: 100%;
  z-index: 3000;

  padding: 28px;
  overflow-y: auto;

  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(20, 50, 92, 0.08);
  box-shadow: -24px 0 70px rgba(20, 50, 92, 0.18);

  transform: translateX(105%);
  opacity: 0;
  pointer-events: none;

  transition: transform 0.32s ease, opacity 0.24s ease;
}

.profile-panel.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.profile-panel.switching {
  opacity: 0;
  transform: translateX(24px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.profile-close {
  position: sticky;
  top: 22px;

  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  border: none;
  border-radius: 999px;

  background: rgba(20, 50, 92, 0.07);
  color: var(--navy);

  font-size: 1.25rem;
  cursor: pointer;

  z-index: 30;
}

.profile-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.profile-actions button {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 13px 16px;
  background: var(--green);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.profile-actions button.secondary {
  background: rgba(20, 50, 92, 0.07);
  color: var(--navy);
}

.popup-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.popup-logo {
  max-width: 150px;
  max-height: 80px;
  object-fit: contain;
}

.profile-logo {
  width: 110px;
  height: 110px;
  border-radius: 26px;
  margin-bottom: 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(20, 50, 92, 0.045);
  overflow: hidden;
}

.profile-logo img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

.profile-panel {
  padding: 0 !important;
}

.profile-cover {
  height: 132px;
  margin: 0;
  background: linear-gradient(135deg, #08c464, #7ed957);
}

.profile-cover.buyer {
  background: linear-gradient(135deg, #1f6feb, #4f9cff);
}

.profile-content {
  padding: 0 32px 34px;
  margin-top: -48px;
}

.profile-logo {
  width: 108px;
  height: 108px;
  border-radius: 28px;
  margin-bottom: 22px;

  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 50, 92, 0.08);
  box-shadow: 0 16px 36px rgba(20, 50, 92, 0.16);
}

.profile-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;

  margin-top: 22px;
  margin-bottom: 26px;
}

.overview-card {
  background: rgba(20, 50, 92, 0.045);

  border-radius: 18px;

  padding: 14px 16px;
}

.overview-card span {
  display: block;

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  color: var(--muted);

  margin-bottom: 6px;
}

.overview-card strong {
  color: var(--navy);

  font-size: 0.95rem;
  line-height: 1.35;
}

.profile-section-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: var(--green);

  margin-bottom: 14px;
}

.product-scroll {
  display: flex;
  gap: 14px;

  overflow-x: auto;

  padding-bottom: 10px;

  scrollbar-width: none;
}

.product-scroll::-webkit-scrollbar {
  display: none;
}

.product-card {
  min-width: 170px;

  background: white;

  border-radius: 22px;

  padding: 16px;

  box-shadow: 0 10px 30px rgba(20, 50, 92, 0.08);

  position: relative;

  flex-shrink: 0;
}

.product-card h4 {
  margin: 0 0 10px;

  color: var(--navy);

  font-size: 1rem;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 800;

  color: var(--green);

  margin-bottom: 10px;
}

.market-comparison {
  display: inline-block;

  background: rgba(31, 196, 108, 0.12);

  color: #159957;

  font-size: 0.72rem;
  font-weight: 700;

  padding: 6px 10px;

  border-radius: 999px;

  margin-bottom: 10px;
}

.product-note {
  color: var(--muted);

  font-size: 0.82rem;
  line-height: 1.4;
}

.product-card {
  position: relative;
}

.product-mini-organic {
  width: 34px;
  height: 34px;
  transform: scale(0.72);
  transform-origin: center;
  flex-shrink: 0;
}

.product-mini-organic .organic-badge {
  position: static;
  transform: none;
}

.product-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(105, 123, 66, 0.10);
  flex-shrink: 0;
}

.product-icon svg {
  width: 22px;
  height: 22px;

  fill: none !important;
  stroke: #667a3d;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 40px;
  margin-bottom: 18px;
}

/* Product slider polish */

.product-scroll {
  padding: 12px 0 18px;
  margin-top: 4px;
  position: relative;

  scroll-snap-type: x proximity;
}

.product-card {
  scroll-snap-align: start;
}


/* Product carousel final polish */

.product-scroll {
  display: flex;
  gap: 16px;

  overflow-x: auto;
  overflow-y: visible;

  padding: 18px 0 18px 18px;
  margin-top: 8px;
  margin-bottom: 24px;

  background: rgba(20, 50, 92, 0.035);
  border-radius: 24px;

  scroll-snap-type: x proximity;
}

/* remove previous "Scroll →" hint */
.product-scroll::after {
  content: none !important;
}

.product-card {
  min-width: 210px;
  scroll-snap-align: start;
}

/* visible horizontal scrollbar */
.product-scroll::-webkit-scrollbar {
  height: 8px;
}

.product-scroll::-webkit-scrollbar-track {
  background: rgba(20, 50, 92, 0.06);
  border-radius: 999px;
}

.product-scroll::-webkit-scrollbar-thumb {
  background: rgba(20, 50, 92, 0.22);
  border-radius: 999px;
}

.product-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 50, 92, 0.22) rgba(20, 50, 92, 0.06);
}

/* larger organic badge in product card corner */
.product-mini-organic {
  width: 42px;
  height: 42px;
  transform: scale(0.9);
  transform-origin: center;
  flex-shrink: 0;
}

.product-mini-organic .organic-badge {
  position: static;
  transform: none;
}

.product-mini-organic .organic-inner {
  width: 36px;
  height: 36px;
}

.product-mini-organic svg {
  width: 18px;
  height: 18px;
}

.profile-insight-card {
  margin-top: 22px;
  margin-bottom: 22px;

  padding: 18px 18px;

  border-radius: 22px;

  background:
    linear-gradient(
      135deg,
      rgba(28, 201, 92, 0.10),
      rgba(20, 50, 92, 0.04)
    );

  border: 1px solid rgba(28, 201, 92, 0.10);
}

.profile-insight-card span {
  display: block;

  margin-bottom: 8px;

  color: var(--green);

  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-insight-card p {
  margin: 0;

  color: var(--navy);

  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 700;
}

.profile-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin-top: 14px;
  margin-bottom: 8px;
}

.profile-trust-row span {
  padding: 6px 10px;
  border-radius: 999px;

  background: rgba(20, 50, 92, 0.05);

  color: var(--navy);

  font-size: 0.72rem;
  font-weight: 700;
}

.message-modal {
  position: absolute;
  inset: 0;
  z-index: 5000;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(20, 50, 92, 0.18);
  backdrop-filter: blur(6px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.message-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.message-card {
  position: relative;

  width: min(520px, calc(100% - 40px));
  max-height: 78vh;

  padding: 24px;
  border-radius: 30px;

  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(20, 50, 92, 0.28);

  display: flex;
  flex-direction: column;
  gap: 18px;

  transform: translateY(14px) scale(0.98);
  transition: transform 0.22s ease;
}

.message-modal.active .message-card {
  transform: translateY(0) scale(1);
}

.message-close {
  position: absolute;
  top: 18px;
  right: 18px;

  width: 34px;
  height: 34px;

  border: none;
  border-radius: 999px;
  background: rgba(20, 50, 92, 0.07);
  color: var(--navy);

  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 42px;
}

.message-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(20, 50, 92, 0.05);
  color: var(--navy);

  font-weight: 900;
  overflow: hidden;
  flex-shrink: 0;
}

.message-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.message-header p {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.25rem;
}

.message-header span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.message-thread {
  min-height: 220px;
  max-height: 300px;

  overflow-y: auto;

  padding: 16px;
  border-radius: 24px;
  background: rgba(20, 50, 92, 0.04);

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 18px;

  font-size: 0.92rem;
  line-height: 1.4;
  font-weight: 700;
}

.chat-bubble.system {
  align-self: center;
  max-width: 100%;
  background: transparent;
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--green);
  color: white;
  border-bottom-right-radius: 6px;
}

.chat-bubble.reply {
  align-self: flex-start;
  background: white;
  color: var(--navy);
  border-bottom-left-radius: 6px;
  box-shadow: 0 8px 22px rgba(20, 50, 92, 0.08);
}

.message-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.message-prompts button {
  flex-shrink: 0;

  border: none;
  border-radius: 999px;
  padding: 9px 12px;

  background: rgba(20, 50, 92, 0.06);
  color: var(--navy);

  font-weight: 800;
  cursor: pointer;
}

.message-input-row {
  display: flex;
  gap: 10px;
}

.message-input-row input {
  flex: 1;

  border: 1px solid rgba(20, 50, 92, 0.12);
  border-radius: 999px;
  padding: 13px 16px;

  color: var(--navy);
  font-weight: 700;
}

.message-input-row button {
  border: none;
  border-radius: 999px;
  padding: 13px 18px;

  background: var(--green);
  color: white;

  font-weight: 900;
  cursor: pointer;
}

.message-modal {
  right: 390px;
  z-index: 2500;
}

.profile-panel.active {
  z-index: 5200;
}

.message-card {
  z-index: 5300;
}

.draft-button {
  border: none;
  background: #eef1ed;

  color: var(--navy);
  font-weight: 700;

  padding: 0 18px;
  border-radius: 18px;

  cursor: pointer;

  transition: 0.2s ease;
}

.draft-button:hover {
  background: #e2e7e0;
}

.map-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(circle at center, rgba(126, 217, 87, 0.22), transparent 42%),
    linear-gradient(135deg, #f7faf4, #eef6ec);

  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.map-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-card img {
  width: 180px;
  height: auto;
  animation: loaderFloat 1.8s ease-in-out infinite;
}

.loader-card p {
  margin: 0;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.loader-pulse {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 3px solid rgba(8, 196, 100, 0.18);
  border-top-color: var(--green);
  animation: loaderSpin 0.9s linear infinite;
}

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

@keyframes loaderFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.activity-feed {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 900;

  width: 300px;
  max-height: 310px;

  padding: 16px;
  border-radius: 28px;

  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(12px);

  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 16px 40px rgba(20, 50, 92, 0.08);
}

.activity-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 12px;
}

.activity-feed-header span {
  display: block;

  color: var(--green);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.activity-feed-header strong {
  display: block;

  margin-top: 2px;

  color: var(--navy);
  font-size: 1rem;
  font-weight: 900;
}

.activity-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(8, 196, 100, 0.12);
}

.activity-list {
  max-height: 220px;
  overflow-y: auto;

  display: grid;
  gap: 10px;

  padding-right: 4px;

  mask-image: linear-gradient(
  to bottom,
  transparent 0%,
  black 7%,
  black 100%
);
}

.activity-list::-webkit-scrollbar {
  width: 5px;
}

.activity-list::-webkit-scrollbar-thumb {
  background: rgba(20, 50, 92, 0.18);
  border-radius: 999px;
}

.activity-item {
  padding: 11px 12px;
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.68);

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    opacity 0.18s ease;
}

.activity-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
}

.activity-item span {
  display: block;
  margin-bottom: 4px;

  color: var(--green);
  font-size: 0.68rem;
  font-weight: 900;
}

.activity-item p {
  margin: 0;

  color: var(--navy);
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 800;
}

.activity-item.faint {
  opacity: 0.42;
}

.activity-item.soft {
  opacity: 0.68;
}

.activity-item.newest {
  background: rgba(8, 196, 100, 0.10);
  border: 1px solid rgba(8, 196, 100, 0.12);
}

/* Quick polish animations */

.locality-pin,
.product-card,
.overview-card,
.profile-trust-row span,
.message-prompts button,
.activity-item,
.profile-actions button,
.message-input-row button {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.locality-pin:hover {
  transform: translateY(-4px) scale(1.04);
}

.product-card:hover,
.overview-card:hover,
.activity-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(20, 50, 92, 0.11);
}

.profile-actions button:hover,
.message-input-row button:hover,
.message-prompts button:hover {
  transform: translateY(-2px);
}

.profile-trust-row span:hover {
  transform: translateY(-1px);
  background: rgba(20, 50, 92, 0.08);
}

.activity-live-dot {
  animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    box-shadow: 0 0 0 6px rgba(8, 196, 100, 0.12);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(8, 196, 100, 0.04);
  }
}

/* =========================
   LOCALITY SUPPLIER HUB
========================= */

.hub-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 8%, rgba(8,196,100,0.10), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(138,106,74,0.12), transparent 30%),
    linear-gradient(135deg, #f7f1e5 0%, #f6f3ea 48%, #eef7ec 100%);
  color: var(--navy);
}

.hub-topbar {
  height: 82px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  gap: 28px;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2000;
  background: rgba(255,252,245,0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(20,50,92,0.08);
}

.hub-brand img {
  width: 170px;
  display: block;
}

.hub-search {
  flex: 1;
  max-width: 520px;
}

.hub-search input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(20,50,92,0.12);
  background: rgba(255,255,255,0.72);
  color: var(--navy);
  font-size: 0.95rem;
  outline: none;
}

.hub-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.hub-nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
}

.hub-nav a.active {
  color: var(--green);
}

.hub-shell {
  min-height: 100vh;
  padding-top: 82px;
  display: grid;
  grid-template-columns: 290px 1fr;
}

.hub-sidebar {
  padding: 28px 22px;
  background: rgba(255,252,245,0.72);
  border-right: 1px solid rgba(20,50,92,0.08);
  backdrop-filter: blur(18px);
}

.hub-profile-card {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(20,50,92,0.07);
  box-shadow: 0 18px 45px rgba(20,50,92,0.06);
  margin-bottom: 22px;
}

.hub-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: white;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 35px rgba(20,50,92,0.08);
  margin-bottom: 16px;
  overflow: hidden;
}

.hub-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hub-eyebrow {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hub-profile-card h2 {
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--navy);
}

.hub-profile-card span {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.hub-side-nav {
  display: grid;
  gap: 10px;
}

.hub-side-nav a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 800;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.46);
  border: 1px solid rgba(20,50,92,0.05);
}

.hub-side-nav a.active,
.hub-side-nav a:hover {
  background: rgba(8,196,100,0.12);
  color: var(--green);
}

.hub-main {
  padding: 34px;
}

.hub-hero-card {
  min-height: 270px;
  padding: 36px;
  border-radius: 38px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 22px;
  color: white;
  background:
    radial-gradient(circle at 88% 22%, rgba(8,196,100,0.28), transparent 30%),
    linear-gradient(135deg, #17324f 0%, #234832 100%);
  box-shadow: 0 28px 70px rgba(20,50,92,0.16);
  overflow: hidden;
}

.hub-hero-card h1 {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 16px;
}

.hub-hero-card p {
  color: rgba(255,255,255,0.75);
  max-width: 680px;
}

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

.hub-primary-btn,
.hub-secondary-btn,
.card-heading button {
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 900;
  cursor: pointer;
}

.hub-primary-btn {
  background: var(--green);
  color: white;
}

.hub-secondary-btn {
  background: rgba(255,255,255,0.14);
  color: white;
  border: 1px solid rgba(255,255,255,0.18);
}

.hub-contract-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 13px 18px;
  border-radius: 999px;

  text-decoration: none;

  background: rgba(255,255,255,0.08);
  color: #d7fbe6;

  border: 1px solid rgba(255,255,255,0.16);

  font-weight: 900;
  letter-spacing: 0.01em;

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.hub-contract-btn:hover {
  transform: translateY(-2px);

  background: rgba(255,255,255,0.14);

  border-color: rgba(8,196,100,0.35);
}

.hub-pulse-card {
  position: relative;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(16px);
}

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(8,196,100,0.15);
  display: block;
  margin-bottom: 18px;
}

.hub-pulse-card p {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light-green);
}

.hub-pulse-card strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
  margin: 10px 0;
}

.hub-pulse-card small {
  color: rgba(255,255,255,0.65);
  font-weight: 700;
}

.hub-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.hub-metric-card {
  padding: 22px;
  border-radius: 26px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(20,50,92,0.07);
  box-shadow: 0 16px 40px rgba(20,50,92,0.05);
}

.hub-metric-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hub-metric-card strong {
  display: block;
  font-size: 2rem;
  color: var(--navy);
  margin: 8px 0;
}

.hub-metric-card p {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.hub-metric-card.green { background: linear-gradient(180deg, rgba(8,196,100,0.12), rgba(255,255,255,0.72)); }
.hub-metric-card.beige { background: linear-gradient(180deg, rgba(232,223,207,0.55), rgba(255,255,255,0.72)); }
.hub-metric-card.brown { background: linear-gradient(180deg, rgba(138,106,74,0.14), rgba(255,255,255,0.72)); }
.hub-metric-card.navy { background: linear-gradient(180deg, rgba(20,50,92,0.12), rgba(255,255,255,0.72)); }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.hub-card {
  min-height: 230px;
  padding: 24px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,252,245,0.78));
  border: 1px solid rgba(20,50,92,0.07);
  box-shadow: 0 18px 45px rgba(20,50,92,0.06);
  overflow: hidden;
}

.hub-card.large {
  grid-column: span 7;
}

.hub-card:not(.large) {
  grid-column: span 5;
}

.card-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.card-heading h3,
.hub-card h3 {
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1.15;
}

.card-heading button {
  background: rgba(20,50,92,0.06);
  color: var(--navy);
}

.request-list,
.supply-stack,
.message-preview-list {
  display: grid;
  gap: 12px;
}

.request-row,
.supply-stack div,
.message-preview-list div {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(245,247,242,0.82);
}

.request-row div {
  flex: 1;
}

.request-row strong,
.supply-stack strong,
.message-preview-list strong {
  color: var(--navy);
}

.request-row p,
.hub-card p,
.message-preview-list p {
  color: var(--muted);
  font-size: 0.92rem;
}

.request-row em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
  font-size: 0.8rem;
}

.request-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(8,196,100,0.10);
}

.supply-stack div {
  justify-content: space-between;
}

.supply-stack span {
  color: var(--navy);
  font-weight: 800;
}

.warning {
  color: #8a6a4a !important;
}

.gradient-card {
  background:
    radial-gradient(circle at top right, rgba(8,196,100,0.16), transparent 36%),
    linear-gradient(135deg, #fffaf0, #eef8ed);
}

.map-preview-card {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
  align-items: center;
}

.mini-region-map {
  height: 180px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 55% 45%, rgba(8,196,100,0.22), transparent 12%),
    radial-gradient(circle at 35% 60%, rgba(20,50,92,0.16), transparent 10%),
    linear-gradient(135deg, #efe3d0, #f8f6ef);
  position: relative;
  overflow: hidden;
}

.mini-region-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20,50,92,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,50,92,0.05) 1px, transparent 1px);
  background-size: 34px 34px;
}

.farm-orbit,
.buyer-dot {
  position: absolute;
  border-radius: 999px;
}

.farm-orbit {
  width: 34px;
  height: 34px;
  background: var(--green);
  left: 48%;
  top: 42%;
  box-shadow: 0 0 0 14px rgba(8,196,100,0.14);
}

.buyer-dot {
  width: 16px;
  height: 16px;
  background: var(--navy);
}

.buyer-dot.one { left: 28%; top: 35%; }
.buyer-dot.two { left: 70%; top: 55%; }
.buyer-dot.three { left: 42%; top: 72%; }

.data-hub-card {
  color: white;
  background:
    radial-gradient(circle at top right, rgba(8,196,100,0.22), transparent 34%),
    linear-gradient(135deg, #17324f, #3f4f35);
}

.data-hub-card h3,
.data-hub-card p {
  color: white;
}

.data-hub-card p {
  opacity: 0.72;
  margin-bottom: 22px;
}

@media (max-width: 1100px) {
  .hub-shell {
    grid-template-columns: 1fr;
  }

  .hub-sidebar {
    display: none;
  }

  .hub-hero-card,
  .map-preview-card {
    grid-template-columns: 1fr;
  }

  .hub-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hub-card.large,
  .hub-card:not(.large) {
    grid-column: span 12;
  }
}

/* =========================
   LOCALITY LOGIN PAGE
========================= */

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 14%, rgba(8,196,100,0.10), transparent 28%),
    radial-gradient(circle at 88% 22%, rgba(138,106,74,0.10), transparent 30%),
    linear-gradient(135deg, #f7f1e5 0%, #f6f3ea 48%, #eef7ec 100%);
  color: var(--navy);
}

.login-shell {
  min-height: 100vh;
  padding: 60px 28px;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(1120px, 100%);
  padding: 44px;
  border-radius: 42px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(20,50,92,0.08);
  box-shadow: 0 30px 90px rgba(20,50,92,0.10);
  backdrop-filter: blur(20px);
}

.login-logo img {
  width: 210px;
  display: block;
  margin-bottom: 34px;
}

.login-eyebrow {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.login-card h1 {
  max-width: 820px;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--navy);
  margin-bottom: 20px;
}

.login-subtitle {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 34px;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.access-card {
  min-height: 280px;
  padding: 26px;
  border-radius: 30px;
  background: rgba(255,252,245,0.78);
  border: 1px solid rgba(20,50,92,0.07);
  box-shadow: 0 18px 45px rgba(20,50,92,0.05);
  display: flex;
  flex-direction: column;
}

.access-card span {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.access-card h3 {
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 14px;
}

.access-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 26px;
}

.access-card a {
  margin-top: auto;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 900;
}

.access-card.guest a {
  background: rgba(20,50,92,0.08);
  color: var(--navy);
}

.access-card.supplier {
  background:
    radial-gradient(circle at top right, rgba(8,196,100,0.13), transparent 34%),
    rgba(255,255,255,0.8);
}

.access-card.supplier a,
.access-card.buyer a {
  background: var(--green);
  color: white;
}

.access-card.buyer {
  background:
    radial-gradient(circle at top right, rgba(138,106,74,0.13), transparent 34%),
    rgba(255,255,255,0.8);
}

.login-gate-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--green);
  color: white;
}

.login-footer-actions {
  margin-top: 28px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.login-footer-actions a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.login-footer-actions .plans-link {
  color: var(--green);
}

@media (max-width: 900px) {
  .access-grid {
    grid-template-columns: 1fr;
  }

  .login-card h1 {
    font-size: 2.5rem;
  }

  .login-card {
    padding: 30px;
  }
}

/* =========================
   SUPPLIER HUB FULFILLMENT PANEL
========================= */

.fulfillment-panel {
  margin-bottom: 22px;
  padding: 26px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(8,196,100,0.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,252,245,0.78));
  border: 1px solid rgba(20,50,92,0.07);
  box-shadow: 0 22px 58px rgba(20,50,92,0.07);
}

.fulfillment-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

.fulfillment-header h2 {
  color: var(--navy);
  font-size: 1.8rem;
  line-height: 1.05;
  margin-bottom: 8px;
}

.fulfillment-header p {
  color: var(--muted);
}

.fulfillment-view-all {
  white-space: nowrap;
  text-decoration: none;
  color: white;
  background: var(--green);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(8,196,100,0.18);
}

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

.fulfillment-row {
  display: grid;
  grid-template-columns: 130px 1.5fr 1fr 130px;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 22px;
  text-decoration: none;
  background: rgba(245,247,242,0.78);
  border: 1px solid rgba(20,50,92,0.05);
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.fulfillment-row:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 16px 38px rgba(20,50,92,0.08);
}

.fulfillment-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.fulfillment-status span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(8,196,100,0.10);
}

.fulfillment-main strong {
  display: block;
  color: var(--navy);
  font-size: 1rem;
  margin-bottom: 2px;
}

.fulfillment-main p {
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(20,50,92,0.08);
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}

.progress-track.empty span {
  background: rgba(20,50,92,0.18);
}

.fulfillment-progress small {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.76rem;
}

.fulfillment-deadline {
  justify-self: end;
  color: var(--navy);
  font-weight: 900;
  font-size: 0.9rem;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(20,50,92,0.06);
}

.fulfillment-deadline.urgent {
  color: #9f2f1f;
  background: rgba(159,47,31,0.10);
}

.fulfillment-deadline.warning {
  color: #8a6a4a;
  background: rgba(138,106,74,0.13);
}

.fulfillment-deadline.new {
  color: var(--green);
  background: rgba(8,196,100,0.12);
}

.fulfillment-row.delayed {
  background:
    linear-gradient(90deg, rgba(159,47,31,0.08), rgba(255,255,255,0.82));
}

.fulfillment-row.delayed .fulfillment-status span {
  background: #b6402d;
  box-shadow: 0 0 0 6px rgba(182,64,45,0.12);
  animation: urgentPulse 1.8s ease-in-out infinite;
}

.fulfillment-row.due-soon .fulfillment-status span {
  background: #b68942;
  box-shadow: 0 0 0 6px rgba(182,137,66,0.13);
}

.fulfillment-row.new-request {
  background:
    linear-gradient(90deg, rgba(8,196,100,0.10), rgba(255,255,255,0.82));
}

.fulfillment-row.new-request::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(8,196,100,0.10) 45%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: newRequestSweep 3.2s ease-in-out infinite;
  pointer-events: none;
}

.fulfillment-row.on-track .fulfillment-status span {
  background: var(--green);
}

@keyframes urgentPulse {
  0%, 100% {
    box-shadow: 0 0 0 6px rgba(182,64,45,0.12);
  }

  50% {
    box-shadow: 0 0 0 11px rgba(182,64,45,0.04);
  }
}

@keyframes newRequestSweep {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  65% {
    transform: translateX(100%);
    opacity: 0;
  }

  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

@media (max-width: 1100px) {
  .fulfillment-header {
    flex-direction: column;
  }

  .fulfillment-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .fulfillment-deadline {
    justify-self: start;
  }
}
