@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,560;9..144,720&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --nv-forest: #07160f;
  --nv-deep: #123524;
  --nv-emerald: #1f7a48;
  --nv-lime: #d6f57a;
  --nv-lime-2: #b6e24a;
  --nv-gold: #e8c98a;
  --nv-cream: #f3f7ee;
  --nv-ink: #f7fff6;
  --nv-muted: rgba(247, 255, 246, 0.72);
  --nv-font: 'Outfit', system-ui, sans-serif;
  --nv-display: 'Fraunces', Georgia, serif;
  --nv-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nv-logo: url("../../NATUREVEST Earth Emblem.png");
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.nv-app {
  font-family: var(--nv-font);
  color: var(--nv-ink);
  background: var(--nv-forest);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
img[src*="NATUREVEST Earth Emblem"] {
  background: transparent;
}
button, input, select { font-family: inherit; }
a { color: var(--nv-lime); }

.ha-frame { min-height: 100dvh; }
.ha-shell { min-height: 100dvh; position: relative; z-index: 1; }
body.has-ic-bnav .ha-shell {
  padding-bottom: calc(108px + env(safe-area-inset-bottom));
}

.ic-bnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 0 14px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.ic-bnav__bar {
  pointer-events: auto;
  max-width: 440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 6px 10px;
  border-radius: 28px;
  background: rgba(7, 22, 15, 0.72);
  border: 1px solid rgba(214, 245, 122, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
}
.ic-bnav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: rgba(243, 247, 238, 0.62);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 52px;
  justify-content: center;
}
.ic-bnav__item svg { width: 20px; height: 20px; }
.ic-bnav__icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  opacity: 0.7;
  filter: brightness(0) invert(1);
}
.ic-bnav__item.is-active .ic-bnav__icon-img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(92%) sepia(35%) saturate(650%) hue-rotate(36deg) brightness(103%);
}
.ic-bnav__icon-img--hub {
  width: 24px;
  height: 24px;
  opacity: 1;
  filter: none;
}
.ic-bnav__item--hub.is-active .ic-bnav__icon-img--hub {
  filter: none;
  opacity: 1;
}
.ic-bnav__item.is-active { color: var(--nv-lime); }
.ic-bnav__item--hub {
  margin-top: -18px;
}
.ic-bnav__item--hub .ic-bnav__ico {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--nv-lime), #7fb327);
  color: #102416;
  box-shadow: 0 8px 16px rgba(182, 226, 74, 0.35);
}
.ic-bnav__item--hub.is-active .ic-bnav__ico {
  outline: 2px solid #fff;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Sub-pages (extend base.html) */
body.nv-subpage .ha-frame,
body.nv-subpage .ha-shell {
  background: transparent;
  min-height: 100dvh;
}
.nv-head {
  display: grid;
  grid-template-columns: 44px 1fr 40px;
  align-items: center;
  gap: 10px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 0 12px;
  max-width: 460px;
  margin: 0 auto;
}
.nv-head__back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  text-decoration: none;
  color: #102416;
  background: #d6f57a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  transition: transform 0.12s var(--nv-ease);
}
.nv-head__back:active { transform: scale(0.96); }
.nv-head__back svg { width: 20px; height: 20px; }
.nv-head__title {
  margin: 0;
  font-family: var(--nv-display);
  font-size: 1.05rem;
  font-weight: 560;
  text-align: center;
  line-height: 1.2;
  color: var(--nv-ink);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.nv-head__mark img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-left: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}
.nv-wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 0 16px calc(20px + env(safe-area-inset-bottom));
}

.hp-trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Horizontal filter chips — History / My income */
.nv-filter-lane {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
  padding: 4px 2px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.nv-filter-lane::-webkit-scrollbar { display: none; }
.nv-filter-lane button {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(7, 22, 15, 0.45);
  color: rgba(247, 255, 246, 0.92);
  white-space: nowrap;
  font-family: inherit;
}
.nv-filter-lane button.is-on {
  background: #d6f57a;
  border-color: #b6e24a;
  color: #102416;
}
.nv-rec-hide { display: none !important; }
.nv-records {
  margin: 0;
  padding: 0;
  list-style: none;
}
.nv-records .icp-entry {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.nv-records .icp-entry:last-child { border-bottom: 0; }
.nv-records__head {
  margin: 8px 0 4px;
  font-family: var(--nv-display);
  font-size: 26px;
  font-weight: 560;
}
.nv-records__sub {
  margin: 0 0 8px;
  font-size: 14px;
  color: #e8c98a;
  font-weight: 700;
}
