:root {
  --ink: #06111f;
  --muted: #647083;
  --green: #078743;
  --green-dark: #006d34;
  --green-soft: #eaf7ef;
  --line: #dfe8e4;
  --panel: #ffffff;
  --page: #f7faf8;
  --red: #ef4c43;
  --blue: #1689f6;
  --shadow: 0 20px 50px rgba(18, 42, 34, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-shell {
  min-height: 100vh;
}

.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
}

.landing {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 32px clamp(24px, 5vw, 72px) 34px;
  overflow: hidden;
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.landing::after {
  display: none;
}

.landing-header,
.dashboard-header,
.dashboard-actions,
.brand,
.top-nav,
.profile-card,
.section-heading {
  display: flex;
  align-items: center;
}

.landing-header {
  justify-content: space-between;
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto;
}

.brand {
  gap: 11px;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: #6d7781;
  font-size: 13px;
  font-weight: 600;
}

.brand-pin,
.map-pin {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  background: var(--green);
  border-radius: 50% 50% 50% 6px;
  transform: rotate(-45deg);
  box-shadow: 0 8px 18px rgba(7, 135, 67, 0.22);
}

.local-map-card > .map-pin {
  transform: translate(-50%, -50%) rotate(-45deg);
  transform-origin: center;
}

.brand-pin::after,
.map-pin::after {
  content: "";
  position: absolute;
  inset: 9px;
  background: #ffffff;
  border-radius: 50%;
}

.top-nav {
  justify-content: center;
  gap: 52px;
  color: #101722;
  font-size: 14px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 42px;
  padding: 0;
  background: #ffffff;
  border: 1px solid #d9e6df;
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(19, 54, 34, 0.06);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--green-dark);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.primary,
.secondary {
  min-height: 54px;
  padding: 0 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 800;
}

.primary {
  color: #ffffff;
  background: linear-gradient(180deg, #0b9850 0%, #05773a 100%);
  box-shadow: 0 14px 26px rgba(7, 135, 67, 0.22);
}

.primary:hover {
  background: linear-gradient(180deg, #087d41 0%, #045c2e 100%);
}

.secondary {
  color: #1f2b36;
  background: #ffffff;
  border-color: #d6e0dd;
}

.hero-actions .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(515px, 0.86fr) minmax(710px, 1.14fr);
  grid-template-areas:
    "copy image"
    "lower image";
  align-items: center;
  gap: clamp(86px, 8.4vw, 136px);
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(34px, 6vh, 72px) 0 clamp(28px, 4vh, 46px);
}

.hero-copy {
  grid-area: copy;
  align-self: end;
}

.hero-lower {
  grid-area: lower;
  align-self: start;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(50px, 4.7vw, 76px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy h1 span {
  display: block;
  color: var(--green);
}

.hero-copy p {
  max-width: 520px;
  margin: 22px 0 0;
  color: #5e6a79;
  font-size: 19px;
  line-height: 1.68;
}

.benefit-list {
  display: grid;
  gap: 15px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: #111a24;
  font-size: 16px;
  font-weight: 700;
}

.benefit-list li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.benefit-list span,
.feature-band span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--green);
  background: #dff4e8;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 26px;
  margin-top: 30px;
}

.local-map-card {
  grid-area: image;
  position: relative;
  min-height: clamp(680px, 74vh, 880px);
  border-radius: 48% 40% 42% 36%;
  background:
    radial-gradient(circle at 70% 16%, rgba(230, 213, 186, 0.56), transparent 32%),
    linear-gradient(135deg, #f1eee5 0%, #f8f8f0 100%);
}

.local-map-card.image-card {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
  border-radius: 0;
}

.local-map-card.image-card::before {
  display: none;
}

.local-map-card.image-card img {
  width: min(120%, 1000px);
  max-height: clamp(680px, 74vh, 880px);
  object-fit: contain;
  display: block;
}

.local-map-card::before,
.dashboard-map::before,
.mini-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(28deg, transparent 0 33px, rgba(255, 255, 255, 0.95) 34px 46px, transparent 47px 92px),
    repeating-linear-gradient(116deg, transparent 0 46px, rgba(255, 255, 255, 0.82) 47px 58px, transparent 59px 112px);
  opacity: 0.86;
}

.map-texture {
  position: absolute;
  inset: 28px;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(circle at 26% 24%, rgba(96, 170, 96, 0.18) 0 4%, transparent 5%),
    radial-gradient(circle at 82% 64%, rgba(96, 170, 96, 0.22) 0 5%, transparent 6%);
}

.route-svg,
.dash-route {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.route-svg path,
.dash-route path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-shadow {
  stroke: rgba(4, 91, 46, 0.18);
  stroke-width: 17;
}

.route-main,
.dash-route path {
  stroke: var(--green);
  stroke-width: 8;
}

.route-main {
  stroke-dasharray: 1 20;
}

.water-tower,
.tree,
.house,
.route-dot,
.map-callout,
.map-label,
.current-location,
.map-controls,
.dash-pin {
  position: absolute;
  z-index: 4;
}

.water-tower {
  left: 16%;
  top: 30%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 64px;
  color: #ffffff;
  background: #5e9bc2;
  border: 4px solid #3f789c;
  border-radius: 50% 50% 8px 8px;
  font-weight: 900;
}

.tree {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #8fbd75;
  box-shadow: inset -8px -8px 0 rgba(61, 116, 58, 0.18);
}

.tree::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 26px;
  width: 6px;
  height: 20px;
  background: #8d6a42;
  border-radius: 999px;
}

.tree-a { left: 58%; top: 14%; }
.tree-b { left: 73%; top: 63%; }
.tree-c { left: 29%; top: 52%; }
.tree-d { right: 8%; top: 31%; }

.house {
  width: 44px;
  height: 33px;
  background: #d8b484;
  border: 4px solid #c29a69;
  border-radius: 5px;
}

.house::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -20px;
  border-left: 26px solid transparent;
  border-right: 26px solid transparent;
  border-bottom: 21px solid #78a874;
}

.house-a { right: 8%; bottom: 19%; }
.house-b { left: 40%; bottom: 11%; transform: scale(0.78); }

.route-dot {
  width: 15px;
  height: 15px;
  background: var(--green);
  border: 3px solid #ffffff;
  border-radius: 50%;
}

.dot-a { left: 42%; top: 52%; }
.dot-b { left: 59%; top: 68%; }
.dot-c { left: 77%; top: 72%; }

.tank-logo {
  left: 20%;
  top: 39%;
}

.house-logo {
  left: 87%;
  top: 70%;
}

.map-pin.red {
  background: var(--red);
  box-shadow: 0 8px 18px rgba(239, 76, 67, 0.25);
}

.map-callout {
  padding: 14px 18px;
  color: #24313a;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.callout-top { left: 13%; top: 0; }
.callout-right { right: 1%; top: 42%; }
.callout-bottom { right: 17%; bottom: 0; }

.feature-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 30px;
  background: #f0f8f4;
  border-radius: 12px;
}

.feature-band article {
  display: flex;
  align-items: center;
  gap: 20px;
}

.feature-band h2 {
  margin: 0;
  color: var(--green-dark);
  font-size: 19px;
}

.feature-band p {
  margin: 8px 0 0;
  color: #66746d;
  font-size: 15px;
}

.how-section {
  display: block;
  width: 100%;
  max-width: 1440px;
  margin: 96px auto 40px;
  padding: 56px 0 20px;
  border-top: 1px solid #e4eee8;
}

.how-heading {
  max-width: 920px;
  margin: 0 auto 36px;
  text-align: center;
}

.how-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 620px;
  overflow: hidden;
  background: #f4faf6;
  border: 1px solid #dfeae4;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(14, 54, 33, 0.08);
}

.how-media img {
  width: min(100%, 1180px);
  max-height: 760px;
  object-fit: contain;
  display: block;
}

.section-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.how-heading h2 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(42px, 4vw, 66px);
  line-height: 1.08;
  letter-spacing: 0;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.how-steps article {
  position: relative;
  display: block;
  padding: 24px 20px 22px;
  background: #ffffff;
  border: 1px solid #e1ebe5;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(20, 55, 38, 0.05);
}

.how-steps article::after {
  content: "";
  position: absolute;
  top: 44px;
  right: -17px;
  width: 17px;
  height: 3px;
  background: #b8dbc6;
}

.how-steps article:last-child::after {
  display: none;
}

.how-steps span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: var(--green);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 900;
}

.how-steps h3 {
  margin: 16px 0 0;
  color: #101b27;
  font-size: 20px;
}

.how-steps p {
  margin: 8px 0 0;
  color: #637080;
  font-size: 15px;
  line-height: 1.65;
}

.quick-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.quick-flow article {
  padding: 20px;
  background: #eef8f2;
  border: 1px solid #d8eadf;
  border-radius: 14px;
}

.quick-flow strong {
  display: block;
  color: var(--green-dark);
  font-size: 18px;
}

.quick-flow p {
  margin: 9px 0 0;
  color: #5f6e66;
  font-size: 13px;
  line-height: 1.5;
}

.dashboard.active {
  display: grid;
}

.dashboard {
  grid-template-columns: 285px minmax(0, 1fr);
  background: #ffffff;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 56px 34px 32px;
  border-right: 1px solid #e7eee9;
}

.dashboard-brand {
  margin-bottom: 60px;
}

.dashboard-brand .brand-pin {
  width: 26px;
  height: 26px;
}

.dashboard-brand strong {
  font-size: 24px;
}

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

.side-nav a {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 50px;
  padding: 0 16px;
  color: #445063;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.side-nav a.active {
  color: var(--green-dark);
  background: #e9f5ee;
}

.side-nav span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 900;
}

.profile-card {
  gap: 12px;
  margin-top: auto;
}

.profile-card img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-card strong,
.profile-card span {
  display: block;
}

.profile-card strong {
  font-size: 13px;
}

.profile-card span {
  margin-top: 4px;
  color: #6b7480;
  font-size: 11px;
}

.profile-card button {
  margin-left: auto;
  border: 0;
  color: #647083;
  background: transparent;
}

.dashboard-main {
  min-width: 0;
  padding: 58px 42px 40px;
  background: #ffffff;
}

.dashboard-header {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 35px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.dashboard-header h1::after {
  content: " *";
  color: #f6b900;
}

.dashboard-header p {
  margin: 11px 0 0;
  color: #596779;
  font-size: 14px;
}

.dashboard-actions {
  gap: 18px;
}

.dashboard-actions .primary {
  min-height: 56px;
  padding: 0 30px;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #121c2b;
  background: #ffffff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(17, 34, 28, 0.09);
  font-weight: 900;
}

.icon-button::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 9px;
  height: 9px;
  background: #1f2937;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.planner-grid {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.planner-card,
.recent-routes,
.route-cards article {
  background: #ffffff;
  border: 1px solid #e2e9e5;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 38, 31, 0.06);
}

.planner-card {
  padding: 36px;
}

.planner-card label {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.planner-card label > span {
  color: #40506a;
  font-size: 15px;
  font-weight: 700;
}

.planner-card input {
  width: 100%;
  min-height: 66px;
  padding: 0 20px;
  color: #18232e;
  background: #ffffff;
  border: 1px solid #dce5e1;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.planner-card .primary,
.planner-card .secondary {
  width: 100%;
}

.planner-card em {
  display: block;
  margin: 18px 0;
  color: #7b8794;
  text-align: center;
  font-size: 13px;
  font-style: normal;
}

.dashboard-map {
  position: relative;
  min-height: 448px;
  overflow: hidden;
  border: 1px solid #dfe8e4;
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 70%, rgba(53, 148, 220, 0.2) 0 8%, transparent 9%),
    radial-gradient(circle at 74% 20%, rgba(31, 155, 75, 0.16) 0 8%, transparent 9%),
    linear-gradient(135deg, #eef0e9, #f6f4ea);
}

.dash-route path {
  stroke-width: 9;
}

.current-location {
  left: 19%;
  top: 64%;
  width: 74px;
  height: 74px;
  margin: -37px 0 0 -37px;
  background: rgba(22, 137, 246, 0.19);
  border-radius: 50%;
}

.current-location::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  background: var(--blue);
  border: 4px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(22, 137, 246, 0.3);
}

.dash-pin {
  width: 28px;
  height: 28px;
}

.pin-one { left: 70%; top: 19%; }
.pin-two { left: 46%; top: 48%; }
.pin-three { left: 43%; top: 75%; }

.map-label {
  padding: 10px 16px;
  color: #132119;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(27, 45, 37, 0.12);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

.label-store { left: 57%; top: 13%; }
.label-tank { left: 51%; top: 45%; }
.label-gate { left: 47%; top: 70%; }

.map-controls {
  right: 20px;
  bottom: 22px;
  display: grid;
  gap: 12px;
}

.map-controls button {
  width: 46px;
  height: 46px;
  color: #26313f;
  background: #ffffff;
  border: 1px solid #dce5e1;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(20, 38, 31, 0.1);
  font-size: 24px;
}

.recent-routes {
  margin-top: 35px;
  padding: 28px;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
}

.section-heading a {
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 800;
}

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

.route-cards article {
  overflow: hidden;
}

.mini-map {
  position: relative;
  height: 118px;
  overflow: hidden;
  background: linear-gradient(135deg, #efefe8, #fbf7ec);
}

.mini-map::after {
  content: "";
  position: absolute;
  left: 18%;
  top: 50%;
  width: 68%;
  height: 4px;
  background: var(--green);
  border-radius: 999px;
  transform: rotate(-18deg);
}

.map-b::after { transform: rotate(12deg); background: #1e9fb2; }
.map-c::after { transform: rotate(38deg); background: #299dd1; }
.map-d::after { transform: rotate(-8deg); background: #e3a21a; }

.route-cards h3 {
  min-height: 48px;
  margin: 0;
  padding: 17px 17px 0;
  font-size: 14px;
  line-height: 1.3;
}

.route-cards p {
  margin: 10px 17px 18px;
  color: #6a7585;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .landing {
    border-radius: 0;
  }

  .landing-hero,
  .planner-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    gap: 24px;
  }

  .feature-band,
  .route-cards,
  .quick-flow {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-media {
    min-height: 420px;
  }

  .how-steps {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }

  .how-steps article:nth-child(3)::after {
    display: none;
  }
}

@media (max-width: 820px) {
  .landing {
    padding: 22px;
  }

  .landing-header {
    position: relative;
    align-items: center;
    flex-direction: row;
    width: 100%;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .top-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 14px);
    z-index: 20;
    display: grid;
    gap: 0;
    padding: 10px;
    color: #122019;
    background: #ffffff;
    border: 1px solid #dce9e2;
    border-radius: 12px;
    box-shadow: 0 18px 36px rgba(14, 44, 29, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .top-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .top-nav a {
    padding: 15px 14px;
    border-radius: 8px;
  }

  .top-nav a:hover {
    background: #eef8f2;
  }

  .landing-hero {
    grid-template-areas:
      "copy"
      "image"
      "lower";
    gap: 18px;
    padding: 28px 0 30px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .local-map-card {
    min-height: auto;
  }

  .local-map-card.image-card img {
    width: 100%;
    max-height: none;
  }

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

  .how-section {
    gap: 34px;
    margin-top: 56px;
    padding-top: 38px;
  }

  .how-heading h2 {
    font-size: 34px;
  }

  .how-steps article {
    padding: 18px;
  }

  .how-steps span {
    width: 38px;
    height: 38px;
  }

  .dashboard.active {
    display: block;
  }

  .dashboard-sidebar {
    min-height: auto;
    padding: 24px;
    border-right: 0;
    border-bottom: 1px solid #e7eee9;
  }

  .dashboard-brand {
    margin-bottom: 22px;
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
  }

  .side-nav a {
    white-space: nowrap;
  }

  .profile-card {
    display: none;
  }

  .dashboard-main {
    padding: 28px 18px;
  }
}

@media (max-width: 560px) {
  .hero-actions,
  .dashboard-actions {
    width: 100%;
  }

  .hero-actions,
  .dashboard-actions {
    flex-direction: column;
  }

  .primary,
  .secondary {
    width: 100%;
  }

  .route-cards {
    grid-template-columns: 1fr;
  }

  .quick-flow {
    grid-template-columns: 1fr;
  }

  .how-media {
    min-height: 300px;
  }

  .landing-hero {
    gap: 14px;
  }

  .how-steps {
    grid-template-columns: 1fr;
  }

  .how-steps article::after {
    display: none;
  }

  .planner-card {
    padding: 22px;
  }
}
