:root {
  --green: #198754;
  --green-dark: #146c43;
  --green-deep: #0b422b;
  --mint: #e8f5e9;
  --mint2: #f4fbf5;
  --white: #fff;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e4ebe5;
  --danger: #dc3545;
  --shadow: 0 12px 35px rgba(22, 70, 43, .08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fbfdfb;
  color: var(--ink);
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--green-dark);
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 70vh;
}

.topbar {
  height: auto;
  min-height: 76px;
  padding: 14px max(20px, calc((100vw - 1160px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.brand {
  font-weight: 850;
  font-size: 1.35rem;
  color: var(--green-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--green);
  color: white;
  font-size: 1.65rem;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.topbar nav > a:not(.button) {
  font-size: .94rem;
  color: #43534a;
}

.topbar nav > a:hover {
  color: var(--green);
}

.nav-profile {
  font-weight: 700;
}

.inline-form {
  display: inline;
  margin: 0;
}

.nav-logout {
  background: none;
  border: 0;
  color: #65736a;
  padding: 5px;
}

.button {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff !important;
  border-radius: 11px;
  padding: 12px 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  transition: transform .15s, background .15s;
  cursor: pointer;
}

.button:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-1px);
}

.button:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
}

.button-small {
  padding: 8px 12px;
  font-size: .87rem;
  border-radius: 9px;
}

.button-outline {
  background: #fff;
  color: var(--green-dark) !important;
  border-color: #b9d9c2;
}

.button-outline:hover {
  background: var(--mint);
}

.button-white {
  background: #fff;
  color: var(--green-dark) !important;
  border-color: #fff;
}

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

.button-danger-outline {
  background: #fff;
  color: var(--danger) !important;
  border-color: #f1b8be;
}

.button-full {
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 50px;
  align-items: center;
  padding: 76px 0 70px;
}

.hero h1 {
  font-size: clamp(2.8rem, 5.5vw, 4.8rem);
  letter-spacing: -.055em;
  line-height: 1.04;
  margin: 16px 0 22px;
}

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

.hero-copy > p {
  font-size: 1.12rem;
  color: #5f6d64;
  max-width: 600px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .76rem;
  color: var(--green);
  font-weight: 850;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.hero-note {
  font-size: .88rem;
  color: var(--muted);
}

.hero-art {
  min-height: 360px;
  border-radius: 36px;
  background: radial-gradient(circle at 70% 30%, #d7f1dc 0, transparent 30%), linear-gradient(145deg, #eff9f0, #d8efdc);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.leaf-circle {
  display: grid;
  place-items: center;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 8rem;
  box-shadow: 0 25px 60px #19875438;
  transform: rotate(-10deg);
}

.floating-card {
  position: absolute;
  right: 18px;
  bottom: 34px;
  background: #fff;
  padding: 17px 20px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.floating-card strong {
  font-size: 1.3rem;
  color: var(--green-dark);
}

.floating-card span {
  font-size: .78rem;
  color: var(--muted);
}

.section {
  padding: 34px 0 58px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.panel h2 {
  font-size: 1.65rem;
  letter-spacing: -.025em;
  margin: 5px 0 8px;
}

.section-heading p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 20px;
}

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

.feature-card,
.stat-card,
.panel,
.reward-card,
.gallery-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(20, 80, 45, .025);
}

.feature-card {
  padding: 25px;
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--mint);
  border-radius: 15px;
  font-size: 1.55rem;
}

.feature-card h3 {
  margin: 16px 0 7px;
}

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

.cta-strip {
  background: var(--green-dark);
  color: #fff;
  padding: 26px 30px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 15px 0 55px;
}

.cta-strip h2 {
  margin: 0 0 4px;
}

.cta-strip p {
  margin: 0;
  color: #d7eadc;
}

.footer {
  text-align: center;
  padding: 28px 15px 34px;
  color: #59675e;
  font-size: .9rem;
}

.footer p {
  margin: 4px;
}

.muted {
  color: var(--muted);
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 42px 0 25px;
}

.page-heading h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -.04em;
  margin: 5px 0;
}

.page-heading p {
  margin: 4px 0;
}

.stats-grid {
  margin-bottom: 35px;
}

.stat-card {
  padding: 23px;
  position: relative;
  overflow: hidden;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: var(--mint);
  font-size: 1.25rem;
}

.stat-card p {
  color: var(--muted);
  margin: 13px 0 0;
  font-size: .92rem;
}

.stat-card strong {
  font-size: 2.15rem;
  display: block;
  letter-spacing: -.04em;
  margin: 2px 0;
}

.stat-card small {
  color: var(--muted);
}

.row-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.text-link {
  font-weight: 750;
}

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

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

th,
td {
  text-align: left;
  padding: 15px 17px;
  border-bottom: 1px solid #edf1ed;
  vertical-align: middle;
}

th {
  background: #f6faf6;
  color: #68766c;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

tr:last-child td {
  border-bottom: 0;
}

td {
  font-size: .93rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 99px;
  font-size: .76rem;
  font-weight: 800;
  text-transform: capitalize;
}

.badge-approved,
.badge-collected {
  background: #e1f5e7;
  color: #167344;
}

.badge-pending,
.badge-ready {
  background: #fff4d7;
  color: #875d00;
}

.badge-rejected,
.badge-cancelled {
  background: #fde8ea;
  color: #ad2533;
}

.small-note {
  font-size: .78rem;
  color: var(--muted);
  margin-top: 4px;
  max-width: 260px;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: #fff;
  border: 1px dashed #cdded0;
  border-radius: 20px;
}

.empty-state > div {
  font-size: 2.4rem;
}

.empty-state h3 {
  margin: 8px 0;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 20px;
}

.auth-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.auth-card {
  width: min(490px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 2rem;
  letter-spacing: -.04em;
  margin: 8px 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 26px;
  font-size: .9rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.form-stack label,
.field-label {
  font-size: .9rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-stack input:not([type=checkbox]):not([type=file]),
.form-stack textarea,
.form-grid input:not([type=checkbox]):not([type=file]),
.form-grid textarea,
.search-bar input,
.field-label textarea {
  width: 100%;
  border: 1px solid #dce5dd;
  border-radius: 10px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.form-stack input:focus,
.form-stack textarea:focus,
.form-grid input:focus,
.form-grid textarea:focus,
.search-bar input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #19875418;
}

.form-stack small {
  font-weight: 400;
  color: var(--muted);
}

.password-wrap {
  display: flex;
  position: relative;
}

.password-wrap input {
  padding-right: 65px !important;
}

.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: var(--mint2);
  color: var(--green-dark);
  font-weight: 750;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: .8rem;
}

.auth-foot {
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
  margin: 22px 0 0;
}

.auth-foot a {
  font-weight: 750;
}

.alert {
  border-radius: 12px;
  padding: 13px 16px;
  margin: 18px 0;
}

.alert ul {
  margin: 0;
  padding-left: 20px;
}

.alert-success {
  background: #e6f6eb;
  color: #17643a;
}

.alert-error {
  background: #fff0f0;
  color: #a3222e;
}

.alert-info {
  background: #eaf4ff;
  color: #245c91;
}

.panel {
  padding: 25px;
  margin-bottom: 20px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.pill {
  background: var(--mint);
  color: var(--green-dark);
  padding: 7px 11px;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 800;
}

.quantity-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
}

.quantity-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.quantity-emoji {
  font-size: 2rem;
}

.quantity-name {
  font-weight: 800;
}

.points-label {
  font-size: .77rem;
  color: var(--green-dark);
}

.quantity-input {
  width: 100%;
  max-width: 95px;
  text-align: center;
  border: 1px solid #dce5dd;
  border-radius: 9px;
  padding: 9px;
  margin-top: 7px;
}

.estimate-bar {
  margin-top: 20px;
  padding: 15px 18px;
  border-radius: 13px;
  background: var(--mint2);
  border: 1px solid #dcefe0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}

.estimate-bar > div {
  display: flex;
  flex-direction: column;
}

.estimate-bar strong {
  font-size: 1.5rem;
  color: var(--green-dark);
}

.upload-box {
  border: 2px dashed #bdd9c4;
  border-radius: 16px;
  background: var(--mint2);
  padding: 28px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  margin: 18px 0;
}

.upload-box input {
  max-width: 100%;
  margin-top: 10px;
}

.upload-icon {
  font-size: 2rem;
}

.upload-box span:last-of-type {
  font-size: .82rem;
  color: var(--muted);
}

.image-preview {
  display: block;
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 12px;
  margin: 15px auto;
}

.hidden {
  display: none !important;
}

.field-label {
  margin: 15px 0;
}

.notice {
  background: #f3f8ff;
  border-left: 4px solid #6b9fd6;
  color: #3e5d7c;
  padding: 12px 15px;
  border-radius: 8px;
  margin: 18px 0;
  font-size: .88rem;
}

.balance-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--mint);
  color: var(--green-dark);
  padding: 12px 16px;
  border-radius: 13px;
  white-space: nowrap;
}

.rewards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 45px;
}

.reward-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.reward-image-wrap {
  height: 220px;
  background: linear-gradient(140deg, #f3faf4, #e4f3e6);
  display: grid;
  place-items: center;
  padding: 18px;
}

.reward-image {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

.reward-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.reward-cost {
  align-self: flex-start;
  background: var(--mint);
  color: var(--green-dark);
  border-radius: 8px;
  padding: 5px 9px;
  font-weight: 850;
  font-size: .85rem;
}

.reward-content h3 {
  margin: 12px 0 5px;
}

.reward-content p {
  color: var(--muted);
  font-size: .9rem;
  margin: 0 0 15px;
}

.reward-bottom {
  margin-top: auto;
}

.stock-label {
  display: block;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.reward-bottom form {
  margin: 0;
}

.table-thumb {
  width: 58px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--mint2);
}

.reward-table-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 50px;
}

.gallery-card {
  overflow: hidden;
}

.gallery-card > a {
  display: block;
  height: 220px;
  background: #eff8f0;
}

.gallery-card > a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-content {
  padding: 18px;
}

.gallery-content h3 {
  margin: 10px 0 5px;
}

.gallery-content p {
  font-size: .9rem;
}

.compact-form {
  gap: 12px;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.button-row form {
  margin: 0;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-tabs a {
  padding: 9px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: #5b695f;
}

.filter-tabs a.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  padding-bottom: 45px;
}

.profile-summary {
  text-align: center;
  align-self: start;
}

.avatar-large {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--mint);
  padding: 4px;
}

.profile-summary h2 {
  font-size: 1.25rem;
  margin: 10px 0 0;
}

.profile-summary p {
  font-size: .9rem;
}

.profile-forms .panel h2 {
  font-size: 1.25rem;
}

.profile-forms {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proof-large {
  width: 100%;
  max-height: 580px;
  object-fit: contain;
  border-radius: 12px;
  background: #f4f8f4;
}

.review-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 20px;
  padding-bottom: 45px;
}

.review-layout .panel {
  align-self: start;
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.item-list li:last-child {
  border-bottom: 0;
}

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

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: .9rem;
  font-weight: 700;
}

.span-2 {
  grid-column: span 2;
}

.checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
}

.admin-links {
  margin-bottom: 50px;
}

.search-bar {
  display: flex;
  gap: 10px;
  margin: 0 0 20px;
}

.search-bar input {
  max-width: 400px;
}

.announcement {
  margin-bottom: 15px;
}

.announcement h2,
.announcement h3 {
  margin-bottom: 6px;
}

.announcement p {
  white-space: normal;
}

/* Responsive styles */

@media (max-width: 900px) {
  .hero {
    gap: 25px;
  }

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

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

  .topbar nav {
    gap: 12px;
  }

  .profile-layout {
    grid-template-columns: 1fr 1.6fr;
  }
}

@media (max-width: 650px) {
  .container {
    width: min(100% - 28px, 1160px);
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 13px 16px;
  }

  .topbar nav {
    width: 100%;
    gap: 10px 14px;
  }

  .topbar nav > a:not(.button) {
    font-size: .85rem;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 44px 0;
  }

  .hero-art {
    min-height: 260px;
  }

  .leaf-circle {
    width: 160px;
    height: 160px;
    font-size: 5rem;
  }

  .floating-card {
    right: 10px;
    bottom: 15px;
    padding: 12px;
  }

  .three,
  .rewards-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 30px 0 20px;
  }

  .page-heading .button {
    align-self: stretch;
  }

  .cta-strip {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .panel {
    padding: 18px;
  }

  .auth-card {
    padding: 24px 19px;
  }

  .profile-layout,
  .review-layout {
    grid-template-columns: 1fr;
  }

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

  .span-2 {
    grid-column: span 1;
  }

  .row-heading {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-bar input {
    max-width: none;
  }

  .reward-image-wrap {
    height: 200px;
  }

  .estimate-bar {
    align-items: flex-start;
  }

  .balance-chip {
    white-space: normal;
  }
  
}