/* ============================================================
   FarmLink Intelligence — public.css
   Shared styles for all public-facing pages:
   Landing, About, How It Works, Register, Login, Reset Password
   
   STRUCTURE:
   1.  CSS Custom Properties (Design Tokens)
   2.  Reset & Base
   3.  Typography
   4.  Utility Classes
   5.  Navigation Bar
   6.  Buttons
   7.  Hero Section
   8.  Section Wrapper & Labels
   9.  Feature Cards (Three Problems)
   10. How It Works Steps
   11. Stats Bar
   12. Farmer / Buyer CTA Cards
   13. Testimonial Strip
   14. Footer
   15. Responsive Breakpoints
   ============================================================ */


/* ============================================================
   1. CSS CUSTOM PROPERTIES — Design Tokens
      All colours, spacing, typography sizes, and radii.
      Never use raw hex values outside this block.
   ============================================================ */
:root {
  /* — Colour: Green (Primary / Farmer) — */
  --green-dark:   #27500A;
  --green-mid:    #3B6D11;
  --green-light:  #C0DD97;
  --green-bg:     #EAF3DE;
  --green-xbg:    #F4F9ED;

  /* — Colour: Teal (IoT / Verified) — */
  --teal-dark:    #085041;
  --teal-mid:     #0F6E56;
  --teal-light:   #5DCAA5;
  --teal-bg:      #E1F5EE;

  /* — Colour: Amber (Warnings / Forecast) — */
  --amber-dark:   #633806;
  --amber-mid:    #854F0B;
  --amber-light:  #FAC775;
  --amber-bg:     #FAEEDA;

  /* — Colour: Blue (Buyer Portal) — */
  --blue-mid:     #185FA5;
  --blue-light:   #85B7EB;
  --blue-bg:      #E6F1FB;

  /* — Colour: Neutral Grays — */
  --gray-dark:    #444441;
  --gray-mid:     #5F5E5A;
  --gray-light:   #D3D1C7;
  --gray-bg:      #F1EFE8;
  --gray-xbg:     #E8E5DC;
  --white:        #FFFFFF;
  --black:        #1A1A18;

  /* — Typography — */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Helvetica, Arial, sans-serif;
  --fs-h1:    2.75rem;   /* 44px — hero headline */
  --fs-h2:    1.75rem;   /* 28px — section headings */
  --fs-h3:    1.125rem;  /* 18px — card titles */
  --fs-body:  0.9375rem; /* 15px — body text */
  --fs-sm:    0.8125rem; /* 13px — secondary text */
  --fs-xs:    0.75rem;   /* 12px — labels, captions */
  --fw-regular: 400;
  --fw-medium:  500;

  /* — Spacing — */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  12px;
  --space-lg:  16px;
  --space-xl:  24px;
  --space-2xl: 40px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* — Border Radii — */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;
  --radius-pill: 999px;

  /* — Borders — */
  --border:        0.5px solid var(--gray-light);
  --border-medium: 0.5px solid var(--gray-mid);
  --border-green:  0.5px solid var(--green-light);

  /* — Shadows — */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05);

  /* — Layout — */
  --nav-height:      64px;
  --max-width:      1100px;
  --content-width:   720px;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--black);
  background-color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1 { font-size: var(--fs-h1); font-weight: var(--fw-medium); line-height: 1.15; }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-medium); line-height: 1.25; }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-medium); line-height: 1.35; }

p {
  color: var(--gray-mid);
  line-height: 1.7;
}


/* ============================================================
   4. UTILITY CLASSES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-xl);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.badge-green {
  background: var(--green-bg);
  color: var(--green-dark);
  border: var(--border-green);
}

.badge-teal {
  background: var(--teal-bg);
  color: var(--teal-dark);
  border: 0.5px solid var(--teal-light);
}

.badge-amber {
  background: var(--amber-bg);
  color: var(--amber-dark);
  border: 0.5px solid var(--amber-light);
}

.badge-blue {
  background: var(--blue-bg);
  color: var(--blue-mid);
  border: 0.5px solid var(--blue-light);
}

/* Score pill used in hero demo card */
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}

.score-pill-quality { background: var(--green-bg); color: var(--green-dark); }
.score-pill-trust   { background: var(--blue-bg);  color: var(--blue-mid);   }
.score-pill-forecast{ background: var(--amber-bg); color: var(--amber-dark); }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-green  { background: var(--green-mid); }
.dot-blue   { background: var(--blue-mid); }
.dot-amber  { background: var(--amber-mid); }


/* ============================================================
   5. NAVIGATION BAR
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--green-mid);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-mark svg {
  width: 18px;
  height: 18px;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.nav-logo-name {
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--black);
  letter-spacing: -0.01em;
}

.nav-logo-sub {
  font-size: 10px;
  color: var(--gray-mid);
  margin-top: 2px;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  font-weight: var(--fw-regular);
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-link:hover { color: var(--green-mid); }

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}


/* ============================================================
   6. BUTTONS
   ============================================================ */

/* Primary — solid green fill */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 11px 24px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--white);
  background: var(--green-mid);
  border: 1px solid var(--green-mid);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-primary:active { transform: scale(0.98); }

/* Secondary — outlined */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--gray-dark);
  background: transparent;
  border: var(--border-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
  line-height: 1;
}

.btn-secondary:hover {
  border-color: var(--green-mid);
  color: var(--green-mid);
}

.btn-secondary:active { transform: scale(0.98); }

/* Ghost — text only */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--gray-mid);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}

.btn-ghost:hover { color: var(--black); }

/* Large variants */
.btn-lg {
  padding: 14px 32px;
  font-size: var(--fs-body);
}

/* Buyer variant */
.btn-buyer {
  background: var(--blue-mid);
  border-color: var(--blue-mid);
}

.btn-buyer:hover {
  background: #0C447C;
  border-color: #0C447C;
}


/* ============================================================
   7. HERO SECTION
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-height) + var(--space-4xl));
  padding-bottom: var(--space-4xl);
  background: var(--white);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Left: text content */
.hero-content {}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.hero-eyebrow-line {
  width: 28px;
  height: 1.5px;
  background: var(--green-mid);
}

.hero-eyebrow-text {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--green-mid);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-headline {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: var(--fw-medium);
  color: var(--black);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.hero-headline em {
  font-style: normal;
  color: var(--green-mid);
}

.hero-sub {
  font-size: var(--fs-body);
  color: var(--gray-mid);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: var(--space-2xl);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.hero-trust-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding-top: var(--space-xl);
  border-top: var(--border);
}

.hero-trust-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-trust-num {
  font-size: 1.25rem;
  font-weight: var(--fw-medium);
  color: var(--black);
  letter-spacing: -0.02em;
}

.hero-trust-label {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
}

.hero-trust-divider {
  width: 1px;
  height: 32px;
  background: var(--gray-light);
}

/* Right: demo card */
.hero-visual {
  position: relative;
}

.hero-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.hero-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.hero-card-photo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: var(--green-bg);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-photo svg {
  width: 40px;
  height: 40px;
  opacity: 0.5;
}

.hero-card-meta {
  flex: 1;
  padding-left: var(--space-md);
}

.hero-card-crop {
  font-size: 1rem;
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: 2px;
}

.hero-card-farmer {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  margin-bottom: var(--space-sm);
}

.hero-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.hero-card-price {
  text-align: right;
}

.hero-card-price-num {
  font-size: 1.125rem;
  font-weight: var(--fw-medium);
  color: var(--black);
}

.hero-card-price-unit {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
}

/* Sensor readings inside card */
.hero-card-sensors {
  background: var(--gray-bg);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.hero-card-sensors-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.hero-sensor-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.hero-sensor-item {}

.hero-sensor-val {
  font-size: 1rem;
  font-weight: var(--fw-medium);
  color: var(--black);
}

.hero-sensor-lbl {
  font-size: 10px;
  color: var(--gray-mid);
  margin-top: 2px;
}

/* Progress bar inside card */
.hero-progress-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.hero-progress-label {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  width: 90px;
  flex-shrink: 0;
}

.hero-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--gray-xbg);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.hero-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--green-mid);
  transition: width 1s ease;
}

.hero-progress-fill.amber { background: var(--amber-mid); }
.hero-progress-fill.blue  { background: var(--blue-mid);  }

.hero-progress-val {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--black);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* Forecast strip inside card */
.hero-forecast-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--amber-bg);
  border: 0.5px solid var(--amber-light);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
}

.hero-forecast-label {
  font-size: var(--fs-xs);
  color: var(--amber-dark);
  font-weight: var(--fw-medium);
}

.hero-forecast-date {
  font-size: var(--fs-xs);
  color: var(--amber-mid);
}

/* Floating decorative elements */
.hero-float-1 {
  position: absolute;
  top: -20px;
  right: -24px;
  background: var(--green-bg);
  border: var(--border-green);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-sm);
  z-index: 3;
}

.hero-float-1-num {
  font-size: 1.5rem;
  font-weight: var(--fw-medium);
  color: var(--green-dark);
  letter-spacing: -0.02em;
}

.hero-float-1-lbl {
  font-size: 10px;
  color: var(--green-mid);
}

.hero-float-2 {
  position: absolute;
  bottom: -16px;
  left: -20px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-md);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hero-float-2-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-mid);
  flex-shrink: 0;
}

.hero-float-2-text {
  font-size: var(--fs-xs);
  color: var(--gray-dark);
  font-weight: var(--fw-medium);
}

/* Background decorations */
.hero-bg-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-bg-circle-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--green-xbg) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  z-index: 0;
}

.hero-bg-circle-2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--teal-bg) 0%, transparent 70%);
  bottom: 0;
  left: -80px;
  z-index: 0;
}


/* ============================================================
   8. SECTION WRAPPER & LABELS
   ============================================================ */
.section {
  padding-block: var(--space-4xl);
}

.section-alt {
  background: var(--gray-bg);
}

.section-dark {
  background: var(--green-dark);
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: var(--content-width);
  margin-inline: auto;
  margin-bottom: var(--space-3xl);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--green-mid);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  color: var(--black);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-md);
}

.section-sub {
  font-size: var(--fs-body);
  color: var(--gray-mid);
  line-height: 1.7;
  max-width: 560px;
  margin-inline: auto;
}

.section-dark .section-title { color: var(--white); }
.section-dark .section-sub   { color: rgba(255,255,255,0.65); }
.section-dark .section-eyebrow { color: var(--green-light); }


/* ============================================================
   9. FEATURE CARDS — Three Problems
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.feature-card-green::before  { background: var(--green-mid); }
.feature-card-teal::before   { background: var(--teal-mid); }
.feature-card-amber::before  { background: var(--amber-mid); }

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.feature-icon-green  { background: var(--green-bg); }
.feature-icon-teal   { background: var(--teal-bg); }
.feature-icon-amber  { background: var(--amber-bg); }

.feature-icon svg { width: 22px; height: 22px; }

.feature-problem {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.feature-problem-green  { color: var(--green-mid); }
.feature-problem-teal   { color: var(--teal-mid); }
.feature-problem-amber  { color: var(--amber-mid); }

.feature-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: var(--space-sm);
}

.feature-desc {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  line-height: 1.65;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.feature-tag-green { background: var(--green-bg); color: var(--green-dark); }
.feature-tag-teal  { background: var(--teal-bg);  color: var(--teal-dark); }
.feature-tag-amber { background: var(--amber-bg); color: var(--amber-dark); }


/* ============================================================
   10. HOW IT WORKS — Steps
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 22px;
  left: calc(12.5% + 22px);
  right: calc(12.5% + 22px);
  height: 1px;
  background: var(--gray-light);
  z-index: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: var(--space-lg);
  position: relative;
  z-index: 1;
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--green-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--green-mid);
  margin-bottom: var(--space-lg);
  flex-shrink: 0;
}

.step-item:first-child .step-num,
.step-item:last-child .step-num {
  background: var(--green-mid);
  color: var(--white);
}

.step-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--green-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.step-icon-wrap svg { width: 26px; height: 26px; }

.step-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: var(--space-sm);
}

.step-desc {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  line-height: 1.6;
}


/* ============================================================
   11. STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--green-dark);
  padding-block: var(--space-2xl);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: var(--fw-medium);
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
}

.stat-divider {
  width: 1px;
  background: rgba(255,255,255,0.1);
}


/* ============================================================
   12. FARMER / BUYER CTA CARDS
   ============================================================ */
.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.portal-card {
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.portal-card-farmer {
  background: var(--green-bg);
  border: var(--border-green);
}

.portal-card-buyer {
  background: var(--blue-bg);
  border: 0.5px solid var(--blue-light);
}

.portal-card-tag {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-card-farmer .portal-card-tag { color: var(--green-mid); }
.portal-card-buyer  .portal-card-tag { color: var(--blue-mid); }

.portal-card-title {
  font-size: 1.5rem;
  font-weight: var(--fw-medium);
  letter-spacing: -0.015em;
}

.portal-card-farmer .portal-card-title { color: var(--green-dark); }
.portal-card-buyer  .portal-card-title { color: #0C447C; }

.portal-card-desc {
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.portal-card-farmer .portal-card-desc { color: var(--green-mid); }
.portal-card-buyer  .portal-card-desc { color: var(--blue-mid); }

.portal-card-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.portal-feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
}

.portal-card-farmer .portal-feature-item { color: var(--green-dark); }
.portal-card-buyer  .portal-feature-item { color: #0C447C; }

.portal-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-card-farmer .portal-check { background: var(--green-mid); }
.portal-card-buyer  .portal-check { background: var(--blue-mid); }

.portal-check svg { width: 10px; height: 10px; }

.portal-card-deco {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  opacity: 0.12;
}

.portal-card-farmer .portal-card-deco { background: var(--green-mid); }
.portal-card-buyer  .portal-card-deco { background: var(--blue-mid); }


/* ============================================================
   13. TESTIMONIAL STRIP
   ============================================================ */
.testimonial-strip {
  background: var(--gray-bg);
  border-top: var(--border);
  border-bottom: var(--border);
  padding-block: var(--space-3xl);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.testimonial-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.testimonial-stars {
  display: flex;
  gap: 3px;
  margin-bottom: var(--space-md);
}

.testimonial-star {
  width: 14px;
  height: 14px;
  color: var(--amber-mid);
}

.testimonial-text {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--white);
  flex-shrink: 0;
}

.testimonial-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--black);
}

.testimonial-role {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
}


/* ============================================================
   14. FOOTER
   ============================================================ */
.footer {
  background: var(--black);
  padding-block: var(--space-3xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand {}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.footer-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--green-mid);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo-name {
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--white);
}

.footer-tagline {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.45);
  line-height: 1.65;
  max-width: 240px;
}

.footer-col {}

.footer-col-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-link {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.55);
  transition: color 0.15s;
}

.footer-link:hover { color: var(--white); }

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 0.5px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.35);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-bottom-link {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.35);
  transition: color 0.15s;
}

.footer-bottom-link:hover { color: rgba(255,255,255,0.65); }


/* ============================================================
   15. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet: 768px to 1024px */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .hero-visual {
    max-width: 520px;
    margin-inline: auto;
  }

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

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  .steps-grid::before { display: none; }

  .portal-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

/* Mobile: up to 768px */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
    --space-4xl: 56px;
    --space-3xl: 40px;
  }

  .nav-links { display: none; }

  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }

  .hero {
    padding-top: calc(var(--nav-height) + var(--space-2xl));
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-trust-row {
    flex-wrap: wrap;
    gap: var(--space-lg);
  }

  .hero-trust-divider { display: none; }

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

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

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

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .hero-float-1,
  .hero-float-2 {
    display: none;
  }
}


/* ============================================================
   16. AUTH LAYOUT — Shared by Register, Login, Reset Password
       Split screen: left panel (brand) + right panel (form)
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gray-bg);
}

/* Top bar — minimal, only logo + helper link */
.auth-topbar {
  height: 56px;
  background: var(--white);
  border-bottom: var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--space-2xl);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.auth-topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-topbar-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--green-mid);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-topbar-logo-mark svg {
  width: 15px;
  height: 15px;
}

.auth-topbar-logo-name {
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--black);
}

.auth-topbar-helper {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
}

.auth-topbar-helper a {
  color: var(--green-mid);
  font-weight: var(--fw-medium);
  margin-left: 4px;
}

.auth-topbar-helper a:hover {
  text-decoration: underline;
}

/* Main split layout */
.auth-body {
  flex: 1;
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: calc(100vh - 56px);
}

/* Left panel — dark green brand panel */
.auth-panel {
  background: var(--green-dark);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow: hidden;
}

.auth-panel-top {}

.auth-panel-eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--green-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
}

.auth-panel-headline {
  font-size: 1.75rem;
  font-weight: var(--fw-medium);
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

.auth-panel-headline em {
  font-style: normal;
  color: var(--green-light);
}

.auth-panel-sub {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
}

/* Trust points list on panel */
.auth-panel-points {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth-panel-point {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.auth-panel-point-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-panel-point-icon svg {
  width: 15px;
  height: 15px;
}

.auth-panel-point-text {}

.auth-panel-point-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--white);
  margin-bottom: 2px;
}

.auth-panel-point-desc {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

/* Demo card inside panel */
.auth-panel-card {
  background: rgba(255,255,255,0.06);
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-2xl);
}

.auth-panel-card-label {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-md);
}

.auth-panel-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.auth-panel-card-key {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.5);
}

.auth-panel-card-val {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--white);
}

.auth-panel-card-val.green { color: var(--green-light); }
.auth-panel-card-val.amber { color: var(--amber-light); }

.auth-panel-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: var(--space-xs);
}

.auth-panel-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--green-light);
}

.auth-panel-bar-fill.amber { background: var(--amber-light); }

/* Panel bottom — quote / attribution */
.auth-panel-bottom {}

.auth-panel-quote {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.45);
  font-style: italic;
  line-height: 1.6;
  padding-top: var(--space-xl);
  border-top: 0.5px solid rgba(255,255,255,0.1);
}

.auth-panel-quote cite {
  display: block;
  margin-top: var(--space-sm);
  font-style: normal;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.3);
}

/* Background decoration circles */
.auth-panel-deco-1 {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192,221,151,0.08) 0%, transparent 70%);
  top: -80px;
  right: -80px;
  pointer-events: none;
}

.auth-panel-deco-2 {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93,202,165,0.06) 0%, transparent 70%);
  bottom: 60px;
  left: -60px;
  pointer-events: none;
}

/* Right panel — form */
.auth-form-panel {
  background: var(--white);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 48px;
  overflow-y: auto;
}

.auth-form-inner {
  width: 100%;
  max-width: 480px;
}

/* Page title block */
.auth-form-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--green-mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.auth-form-title {
  font-size: 1.625rem;
  font-weight: var(--fw-medium);
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.auth-form-sub {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  line-height: 1.65;
  margin-bottom: var(--space-2xl);
}


/* ============================================================
   17. STEP INDICATOR — Register multi-step progress
   ============================================================ */
.auth-steps {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-2xl);
}

.auth-step {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
}

.auth-step:last-child { flex: 0; }

.auth-step-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.auth-step-bubble.done {
  background: var(--green-mid);
  color: var(--white);
  border: none;
}

.auth-step-bubble.active {
  background: var(--white);
  color: var(--green-mid);
  border: 2px solid var(--green-mid);
}

.auth-step-bubble.pending {
  background: var(--white);
  color: var(--gray-mid);
  border: 1.5px solid var(--gray-light);
}

.auth-step-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}

.auth-step-label.active  { color: var(--green-mid); }
.auth-step-label.pending { color: var(--gray-mid); }
.auth-step-label.done    { color: var(--green-mid); }

.auth-step-line {
  flex: 1;
  height: 1px;
  background: var(--gray-light);
  margin-inline: var(--space-sm);
}

.auth-step-line.done { background: var(--green-light); }


/* ============================================================
   18. ROLE CARDS — Farmer / Buyer selector on Register
   ============================================================ */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.role-card {
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  position: relative;
  text-align: center;
  background: var(--white);
}

.role-card:hover {
  border-color: var(--gray-mid);
  transform: translateY(-1px);
}

.role-card.selected-farmer {
  border-color: var(--green-mid);
  background: var(--green-xbg);
}

.role-card.selected-buyer {
  border-color: var(--blue-mid);
  background: #F0F6FF;
}

.role-card-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.role-card.selected-farmer .role-card-check {
  display: flex;
  background: var(--green-mid);
}

.role-card.selected-buyer .role-card-check {
  display: flex;
  background: var(--blue-mid);
}

.role-card-check svg {
  width: 10px;
  height: 10px;
}

.role-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  margin-inline: auto;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.role-card-icon-farmer { background: var(--green-bg); }
.role-card-icon-buyer  { background: var(--blue-bg); }

.role-card-icon svg { width: 24px; height: 24px; }

.role-card-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: 4px;
}

.role-card-desc {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  line-height: 1.5;
}

/* Selected role badge */
.role-selected-badge {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  background: var(--green-bg);
  border: var(--border-green);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--green-dark);
  margin-bottom: var(--space-xl);
}

.role-selected-badge.visible { display: flex; }
.role-selected-badge.buyer   {
  background: var(--blue-bg);
  border-color: var(--blue-light);
  color: var(--blue-mid);
}

/* Section divider */
.form-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-block: var(--space-xl);
}

.form-divider-line {
  flex: 1;
  height: 1px;
  background: var(--gray-light);
}

.form-divider-text {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  white-space: nowrap;
  font-weight: var(--fw-medium);
}

/* Section label inside form */
.form-section-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--gray-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-lg);
  margin-top: var(--space-xl);
}

/* Two-column form row */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Farmer-only extra fields */
.farmer-extra {
  display: none;
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  background: var(--green-xbg);
  margin-top: var(--space-md);
}

.farmer-extra.visible { display: block; }

.farmer-extra-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}


/* ============================================================
   19. FORM FIELDS — Inputs, labels, hints, errors
       Used across all auth pages.
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.field-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--gray-dark);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.field-label-required {
  color: #A32D2D;
  font-size: 10px;
}

.field-input {
  width: 100%;
  padding: 11px 14px;
  font-size: var(--fs-sm);
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.field-input::placeholder { color: var(--gray-mid); }

.field-input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(59,109,17,0.08);
}

.field-input.error {
  border-color: #A32D2D;
  box-shadow: 0 0 0 3px rgba(163,45,45,0.08);
}

.field-input.success {
  border-color: var(--green-mid);
}

/* Password input wrapper — for show/hide toggle */
.field-input-wrap {
  position: relative;
}

.field-input-wrap .field-input {
  padding-right: 44px;
}

.field-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-mid);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.field-toggle-btn:hover { color: var(--gray-dark); }

.field-toggle-btn svg { width: 16px; height: 16px; }

/* Select dropdown */
.field-select {
  width: 100%;
  padding: 11px 36px 11px 14px;
  font-size: var(--fs-sm);
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F5E5A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-select:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(59,109,17,0.08);
}

/* Hint text below field */
.field-hint {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  line-height: 1.5;
}

.field-hint.error  { color: #A32D2D; }
.field-hint.success { color: var(--green-mid); }

/* Password strength bar */
.field-strength {
  height: 4px;
  background: var(--gray-xbg);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 2px;
}

.field-strength-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.3s ease, background 0.3s ease;
}

.field-strength-fill.weak   { width: 25%; background: #A32D2D; }
.field-strength-fill.fair   { width: 50%; background: var(--amber-mid); }
.field-strength-fill.good   { width: 75%; background: var(--teal-mid); }
.field-strength-fill.strong { width: 100%; background: var(--green-mid); }

.field-strength-label {
  font-size: 10px;
  margin-top: 4px;
}

.field-strength-label.weak   { color: #A32D2D; }
.field-strength-label.fair   { color: var(--amber-mid); }
.field-strength-label.good   { color: var(--teal-mid); }
.field-strength-label.strong { color: var(--green-mid); }


/* ============================================================
   20. FEEDBACK BOXES — Error, Success, Warning alerts
   ============================================================ */
.feedback-box {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.feedback-box-error {
  background: #FCEBEB;
  border: 0.5px solid #F09595;
  color: #A32D2D;
}

.feedback-box-success {
  background: var(--green-bg);
  border: var(--border-green);
  color: var(--green-dark);
}

.feedback-box-info {
  background: var(--blue-bg);
  border: 0.5px solid var(--blue-light);
  color: var(--blue-mid);
}

.feedback-box-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Hidden by default — shown via Flask flash or JS */
.feedback-box.hidden { display: none; }


/* ============================================================
   21. TERMS CHECKBOX ROW
   ============================================================ */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.terms-checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--white);
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}

.terms-checkbox:checked {
  background: var(--green-mid);
  border-color: var(--green-mid);
}

.terms-checkbox:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='10 3 5 9 2 6'/%3E%3C/svg%3E") no-repeat center/contain;
}

.terms-text {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  line-height: 1.55;
}

.terms-text a {
  color: var(--green-mid);
  font-weight: var(--fw-medium);
}

.terms-text a:hover { text-decoration: underline; }


/* ============================================================
   22. LOGIN — Role notice pills + forgot password slide-in
   ============================================================ */
.role-notice {
  background: var(--gray-bg);
  border: var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
}

.role-notice-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--gray-dark);
  margin-bottom: var(--space-sm);
}

.role-pills {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.role-pill-farmer {
  background: var(--green-bg);
  color: var(--green-dark);
  border: var(--border-green);
}

.role-pill-buyer {
  background: var(--blue-bg);
  color: var(--blue-mid);
  border: 0.5px solid var(--blue-light);
}

.role-pill-admin {
  background: #FAECE7;
  color: #993C1D;
  border: 0.5px solid #F0997B;
}

/* Forgot password label-link */
.forgot-link {
  font-size: var(--fs-xs);
  color: var(--green-mid);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: color 0.15s;
}

.forgot-link:hover { color: var(--green-dark); text-decoration: underline; }

/* Forgot panel — slides in below login form */
.forgot-panel {
  display: none;
  background: var(--gray-bg);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-top: var(--space-xl);
}

.forgot-panel.visible { display: block; }

.forgot-panel-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: var(--space-sm);
}

.forgot-panel-sub {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  margin-bottom: var(--space-lg);
  line-height: 1.55;
}

/* Auth prompt links */
.auth-prompt {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  margin-top: var(--space-xl);
}

.auth-prompt a {
  color: var(--green-mid);
  font-weight: var(--fw-medium);
  margin-left: 4px;
}

.auth-prompt a:hover { text-decoration: underline; }


/* ============================================================
   23. RESET PASSWORD — Steps indicator + password rules
   ============================================================ */
.reset-steps {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-2xl);
}

.reset-step {
  display: flex;
  align-items: center;
}

.reset-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-light);
  flex-shrink: 0;
  transition: background 0.2s;
}

.reset-step-dot.active { background: var(--green-mid); }
.reset-step-dot.done   { background: var(--green-light); }

.reset-step-label {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  margin-left: var(--space-sm);
  white-space: nowrap;
}

.reset-step-label.active { color: var(--green-mid); font-weight: var(--fw-medium); }
.reset-step-label.done   { color: var(--green-mid); }

.reset-step-connector {
  flex: 1;
  height: 1px;
  background: var(--gray-light);
  margin-inline: var(--space-md);
  min-width: 20px;
}

.reset-step-connector.done { background: var(--green-light); }

/* Password rules list */
.password-rules {
  background: var(--gray-bg);
  border: var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.password-rule {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  transition: color 0.2s;
}

.password-rule.met { color: var(--green-mid); }

.password-rule-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-light);
  flex-shrink: 0;
  transition: background 0.2s;
}

.password-rule.met .password-rule-dot { background: var(--green-mid); }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  margin-top: var(--space-xl);
  transition: color 0.15s;
}

.back-link:hover { color: var(--black); }

.back-link svg { width: 14px; height: 14px; }


/* ============================================================
   24. AUTH SUBMIT BUTTON — Full-width variant
   ============================================================ */
.btn-auth {
  width: 100%;
  padding: 13px 24px;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--white);
  background: var(--green-mid);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.btn-auth:hover    { background: var(--green-dark); }
.btn-auth:active   { transform: scale(0.99); }
.btn-auth:disabled {
  background: var(--gray-light);
  cursor: not-allowed;
  transform: none;
}

.btn-auth-secondary {
  width: 100%;
  padding: 12px 24px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--gray-dark);
  background: transparent;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.btn-auth-secondary:hover {
  border-color: var(--gray-mid);
  color: var(--black);
}


/* ============================================================
   25. AUTH RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .auth-body {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    display: none;
  }

  .auth-form-panel {
    padding: var(--space-2xl) var(--space-xl);
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .auth-topbar {
    padding-inline: var(--space-lg);
  }

  .auth-form-panel {
    padding: var(--space-xl) var(--space-lg);
  }

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

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

  .auth-steps { flex-wrap: wrap; gap: var(--space-sm); }
}

/* ============================================================
   26. ERROR PAGES — 404 Not Found & 403 Access Denied
       Shared layout: full-page centred, with nav and footer.
   ============================================================ */
.error-page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gray-bg);
}

.error-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl) var(--space-xl);
}

.error-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-xl);
  padding: 64px 56px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.error-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.error-card-404::before { background: var(--gray-light); }
.error-card-403::before { background: #A32D2D; }

.error-icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-xl);
}

.error-icon-box-neutral { background: var(--gray-bg); border: var(--border); }
.error-icon-box-danger  { background: #FCEBEB;        border: 0.5px solid #F09595; }

.error-icon-box svg { width: 28px; height: 28px; }

.error-code {
  font-size: 80px;
  font-weight: var(--fw-medium);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-lg);
}

.error-code-404 { color: var(--gray-xbg); }
.error-code-403 { color: #FCEBEB; }

.error-title {
  font-size: 1.5rem;
  font-weight: var(--fw-medium);
  color: var(--black);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-md);
}

.error-desc {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  line-height: 1.7;
  max-width: 380px;
  margin: 0 auto var(--space-2xl);
}

/* Suggestions list — 404 only */
.error-suggestions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  text-align: left;
}

.error-suggestion {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, background 0.15s;
  color: var(--black);
  text-decoration: none;
}

.error-suggestion:hover {
  border-color: var(--green-mid);
  background: var(--green-xbg);
}

.error-suggestion-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--gray-bg);
  border: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.error-suggestion-icon svg { width: 15px; height: 15px; }

.error-suggestion-text {
  flex: 1;
}

.error-suggestion-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: 2px;
}

.error-suggestion-sub {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
}

.error-suggestion-arrow {
  color: var(--gray-mid);
  flex-shrink: 0;
}

.error-suggestion-arrow svg { width: 14px; height: 14px; }

/* Role box — 403 only */
.error-role-box {
  background: var(--gray-bg);
  border: var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-2xl);
  text-align: left;
}

.error-role-box-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--gray-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-md);
}

.error-role-pills {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Error action buttons row */
.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Error meta line */
.error-meta {
  margin-top: var(--space-2xl);
  font-size: var(--fs-xs);
  color: var(--gray-light);
}

/* Background decoration */
.error-card-deco {
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gray-bg) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.error-card-deco-danger {
  background: radial-gradient(circle, #FCEBEB 0%, transparent 70%);
}

.error-card > * { position: relative; z-index: 1; }

@media (max-width: 600px) {
  .error-card {
    padding: var(--space-2xl) var(--space-xl);
  }
  .error-code { font-size: 56px; }
}


/* ============================================================
   27. HOW IT WORKS — Dedicated page styles
       Extended pipeline steps, FAQ, tech detail rows.
   ============================================================ */

/* Vertical pipeline — the main 4-step flow */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 760px;
  margin-inline: auto;
}

.pipeline-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-xl);
  align-items: flex-start;
  padding-bottom: var(--space-2xl);
  position: relative;
}

/* Connector line between steps */
.pipeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: 0;
  width: 2px;
  background: var(--gray-light);
}

.pipeline-step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.pipeline-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.pipeline-num-green { background: var(--green-mid); color: var(--white); }
.pipeline-num-teal  { background: var(--teal-mid);  color: var(--white); }
.pipeline-num-amber { background: var(--amber-mid); color: var(--white); }
.pipeline-num-blue  { background: var(--blue-mid);  color: var(--white); }

.pipeline-step-right {}

.pipeline-eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-sm);
}

.pipeline-eyebrow-green { color: var(--green-mid); }
.pipeline-eyebrow-teal  { color: var(--teal-mid); }
.pipeline-eyebrow-amber { color: var(--amber-mid); }
.pipeline-eyebrow-blue  { color: var(--blue-mid); }

.pipeline-title {
  font-size: 1.25rem;
  font-weight: var(--fw-medium);
  color: var(--black);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-sm);
}

.pipeline-desc {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  max-width: 520px;
}

/* Detail grid inside each pipeline step */
.pipeline-detail {
  background: var(--gray-bg);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-md);
}

.pipeline-detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pipeline-detail-label {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pipeline-detail-value {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--black);
}

/* Pill chips inside step detail */
.pipeline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

/* FAQ section */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: 860px;
  margin-inline: auto;
}

.faq-item {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: box-shadow 0.2s;
}

.faq-item:hover { box-shadow: var(--shadow-sm); }

.faq-q {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.faq-q-mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: var(--fw-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.faq-a {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  line-height: 1.65;
  padding-left: 28px;
}

/* Actor cards — who can use the platform */
.actor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.actor-card {
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: var(--border);
}

.actor-card-farmer { background: var(--green-xbg);  border-color: var(--green-light); }
.actor-card-buyer  { background: var(--blue-bg);    border-color: var(--blue-light); }
.actor-card-admin  { background: var(--gray-bg);    border-color: var(--gray-light); }

.actor-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.actor-icon-farmer { background: var(--green-bg); }
.actor-icon-buyer  { background: var(--blue-bg); }
.actor-icon-admin  { background: var(--white); border: var(--border); }

.actor-icon svg { width: 20px; height: 20px; }

.actor-role {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-xs);
}

.actor-role-farmer { color: var(--green-mid); }
.actor-role-buyer  { color: var(--blue-mid); }
.actor-role-admin  { color: var(--gray-mid); }

.actor-title {
  font-size: 1rem;
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: var(--space-sm);
}

.actor-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.actor-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--gray-mid);
}

.actor-item-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.actor-item-dot-green { background: var(--green-mid); }
.actor-item-dot-blue  { background: var(--blue-mid); }
.actor-item-dot-gray  { background: var(--gray-mid); }

@media (max-width: 768px) {
  .pipeline-step {
    grid-template-columns: 44px 1fr;
    gap: var(--space-md);
  }

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

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

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


/* ============================================================
   28. ABOUT PAGE — Mission, values, problems, team sections
   ============================================================ */

/* Mission split layout */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: flex-start;
}

.mission-text {}

.mission-text p {
  font-size: var(--fs-body);
  color: var(--gray-mid);
  line-height: 1.75;
  margin-bottom: var(--space-lg);
}

.mission-quote-block {
  background: var(--green-xbg);
  border-left: 3px solid var(--green-mid);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--space-2xl);
  position: sticky;
  top: calc(var(--nav-height) + var(--space-xl));
}

.mission-quote-text {
  font-size: 1.05rem;
  font-weight: var(--fw-medium);
  color: var(--green-dark);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.mission-quote-attr {
  font-size: var(--fs-xs);
  color: var(--green-mid);
  font-style: normal;
}

/* Values grid (2x2) */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.value-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
}

.value-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.value-card:nth-child(1)::before { background: var(--green-mid); }
.value-card:nth-child(2)::before { background: var(--teal-mid); }
.value-card:nth-child(3)::before { background: var(--amber-mid); }
.value-card:nth-child(4)::before { background: var(--blue-mid); }

.value-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.value-icon svg { width: 18px; height: 18px; }

.value-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: var(--space-xs);
}

.value-desc {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  line-height: 1.65;
}

/* Problems section */
.problem-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 740px;
  margin-inline: auto;
}

.problem-item {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: box-shadow 0.2s;
}

.problem-item:hover { box-shadow: var(--shadow-sm); }

.problem-num {
  font-size: 2rem;
  font-weight: var(--fw-medium);
  line-height: 1;
  flex-shrink: 0;
  min-width: 36px;
}

.problem-num-1 { color: var(--green-light); }
.problem-num-2 { color: var(--teal-light); }
.problem-num-3 { color: var(--amber-light); }

.problem-body {}

.problem-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: var(--space-sm);
}

.problem-desc {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  line-height: 1.65;
  margin-bottom: var(--space-md);
}

.problem-solution {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.problem-solution-green { background: var(--green-bg); color: var(--green-dark); }
.problem-solution-teal  { background: var(--teal-bg);  color: var(--teal-dark); }
.problem-solution-amber { background: var(--amber-bg); color: var(--amber-dark); }

/* Team section */
.team-group-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: var(--space-md);
  border-bottom: var(--border);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.team-group-label-green { color: var(--green-mid); }
.team-group-label-teal  { color: var(--teal-mid); }

.team-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.team-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.team-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  transition: box-shadow 0.2s, border-color 0.15s;
}

.team-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--gray-mid);
}

.team-card-center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--white);
  flex-shrink: 0;
}

.team-avatar-green  { background: var(--green-mid); }
.team-avatar-teal   { background: var(--teal-mid); }
.team-avatar-blue   { background: var(--blue-mid); }

.team-avatar-lg {
  width: 52px;
  height: 52px;
  font-size: var(--fs-sm);
  margin-bottom: var(--space-md);
}

.team-info {}

.team-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--black);
  margin-bottom: 3px;
}

.team-id {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  margin-bottom: var(--space-sm);
}

.team-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: var(--fw-medium);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.team-role-pill-green { background: var(--green-bg); color: var(--green-dark); }
.team-role-pill-teal  { background: var(--teal-bg);  color: var(--teal-dark); }
.team-role-pill-blue  { background: var(--blue-bg);  color: var(--blue-mid); }
.team-role-pill-amber { background: var(--amber-bg); color: var(--amber-dark); }
.team-role-pill-gray  { background: var(--gray-bg);  color: var(--gray-dark); }

/* Team photo placeholder */
.team-photo-placeholder {
  background: var(--gray-bg);
  border: 0.5px dashed var(--gray-light);
  border-radius: var(--radius-xl);
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-3xl);
}

.team-photo-placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--gray-xbg);
  border: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-photo-placeholder-icon svg { width: 22px; height: 22px; }

.team-photo-placeholder-label {
  font-size: var(--fs-sm);
  color: var(--gray-mid);
  font-weight: var(--fw-medium);
}

.team-photo-placeholder-sub {
  font-size: var(--fs-xs);
  color: var(--gray-light);
}

/* Stats strip (reused from landing) */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--gray-light);
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--space-3xl);
}

.about-stat {
  background: var(--white);
  padding: var(--space-xl);
  text-align: center;
}

.about-stat-num {
  font-size: 1.75rem;
  font-weight: var(--fw-medium);
  color: var(--black);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.about-stat-label {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
}

@media (max-width: 900px) {
  .mission-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .mission-quote-block { position: static; }
  .values-grid { grid-template-columns: 1fr; }
  .team-grid-2 { grid-template-columns: 1fr; }
  .team-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .team-grid-3 { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr; }
  .problem-item { flex-direction: column; gap: var(--space-md); }
}


/* ============================================================
   29. MEMBER CARDS — About page portrait team layout
       Each card: photo top, name + role + bio + skills below.
       Photo slot degrades gracefully to initials fallback
       when no image file is present.
   ============================================================ */

/* Grid — same breakpoints as before */
.member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* The card itself */
.member-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.15s;
}

.member-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.member-card-placeholder {
  border-style: dashed;
  opacity: 0.65;
}

/* ── Photo area ── */
.member-photo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.35s ease;
}

.member-card:hover .member-photo {
  transform: scale(1.04);
}

/* Colour tint on the photo background (shows as fallback bg) */
.member-photo-green { background: var(--green-bg); }
.member-photo-teal  { background: var(--teal-bg); }
.member-photo-gray  { background: var(--gray-bg); }

/* Initials fallback — shown via JS onerror when image missing */
.member-photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: var(--fw-medium);
  color: var(--white);
  letter-spacing: -0.02em;
}

.member-photo-green .member-photo-fallback { background: var(--green-mid); }
.member-photo-teal  .member-photo-fallback { background: var(--teal-mid); }
.member-photo-gray  .member-photo-fallback { background: var(--gray-mid); }

/* ── Text body ── */
.member-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}

/* Name + role row */
.member-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.member-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--black);
  line-height: 1.3;
  margin-bottom: 3px;
}

.member-id {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
}

/* Bio paragraph */
.member-bio {
  font-size: var(--fs-xs);
  color: var(--gray-mid);
  line-height: 1.7;
  flex: 1;
}

/* Skill chips */
.member-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: var(--border);
}

.member-skill {
  font-size: 11px;
  font-weight: var(--fw-medium);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--gray-bg);
  color: var(--gray-dark);
  border: var(--border);
  white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .member-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .member-photo-wrap {
    aspect-ratio: 4 / 3;
  }
}