/* ============================================================
   VINES DESIGN SYSTEM
   Based on VINES Branding Guidelines 2026
   Brand: Fresh Produce, Adventure Ready, Joyful Community, Rich Soil
   Typography: Brother 1816 Printed Medium (display) + Gotham Medium (body)
   ============================================================ */

/* ----- Fonts ----- */
@font-face {
  font-family: 'Brother 1816 Printed';
  src: url('/fonts/Brother1816Printed-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gotham';
  src: url('/fonts/GothamMedium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ----- Tokens ----- */
:root {
  /* Brand colors (exact hex from guidelines) */
  --fresh-produce: #789A3D;
  --fresh-produce-dark: #607C30;
  --fresh-produce-light: #9BB85F;
  --adventure-ready: #5D6339;
  --adventure-ready-dark: #434830;
  --joyful-community: #C24729;
  --joyful-community-dark: #9E3921;
  --rich-soil: #7F3A2D;

  /* Neutrals (warm paper system) */
  --paper: #FAF6EE;
  --paper-deep: #F2ECDD;
  --cream: #FFFBF2;
  --ink: #1C1C1A;
  --ink-soft: #3A3A33;
  --ink-muted: #6F6E63;
  --ink-faint: #9A9888;
  --line: #E3DDC9;
  --line-strong: #CFC7AE;
  --white: #FFFFFF;

  /* Semantic */
  --bg: var(--paper);
  --surface: var(--white);
  --surface-sunken: var(--paper-deep);
  --text: var(--ink);
  --text-muted: var(--ink-muted);
  --border: var(--line);
  --border-strong: var(--line-strong);
  --primary: var(--fresh-produce);
  --primary-dark: var(--fresh-produce-dark);
  --dark: var(--adventure-ready);
  --accent: var(--joyful-community);
  --earth: var(--rich-soil);

  /* Typography */
  --font-display: 'Brother 1816 Printed', 'Archivo Black', 'Arial Black', sans-serif;
  --font-body: 'Gotham', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-5xl: 4rem;

  /* Spacing (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Layout */
  --page-max: 1100px;
  --page-gutter: 32px;         /* ≈ ¼" minimum enforced */
  --page-gutter-sm: 20px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 24px;

  /* Shadows (soft, paper-like) */
  --shadow-sm: 0 1px 2px rgba(28, 28, 26, 0.04);
  --shadow-md: 0 2px 6px rgba(28, 28, 26, 0.06), 0 1px 2px rgba(28, 28, 26, 0.04);
  --shadow-lg: 0 10px 30px rgba(28, 28, 26, 0.08), 0 4px 10px rgba(28, 28, 26, 0.05);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 140ms;
  --dur: 220ms;
  --dur-slow: 420ms;
}

/* ----- Reset ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg, video { max-width: 100%; display: block; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
a {
  color: var(--dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--primary); }
hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: var(--space-5) 0;
}
table { border-collapse: collapse; width: 100%; }

/* ----- Typography ----- */
.display,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--text);
}
h1, .h1 { font-size: var(--text-4xl); letter-spacing: 0.04em; text-transform: uppercase; }
h2, .h2 { font-size: var(--text-3xl); letter-spacing: 0.04em; text-transform: uppercase; }
h3, .h3 { font-size: var(--text-2xl); letter-spacing: 0.03em; }
h4, .h4 { font-size: var(--text-xl); letter-spacing: 0.02em; }
h5, .h5 { font-size: var(--text-lg); letter-spacing: 0.02em; }
h6, .h6 { font-size: var(--text-base); letter-spacing: 0.06em; text-transform: uppercase; }

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-block;
}
.lede { font-size: var(--text-lg); color: var(--ink-soft); max-width: 60ch; }
.muted { color: var(--text-muted); }
.small { font-size: var(--text-sm); }
.xsmall { font-size: var(--text-xs); }
.strong { font-weight: 500; color: var(--ink); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ----- Layout primitives ----- */
.v-page {
  flex: 1;
  width: 100%;
}
.v-container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}
.v-container-narrow {
  max-width: 640px;
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}
.v-stack > * + * { margin-top: var(--space-5); }
.v-stack-sm > * + * { margin-top: var(--space-3); }
.v-stack-lg > * + * { margin-top: var(--space-7); }
.v-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-5);
}
.v-col-12 { grid-column: span 12; }
.v-col-8 { grid-column: span 8; }
.v-col-6 { grid-column: span 6; }
.v-col-4 { grid-column: span 4; }
.v-col-3 { grid-column: span 3; }
@media (max-width: 768px) {
  .v-col-8, .v-col-6, .v-col-4, .v-col-3 { grid-column: span 12; }
  :root { --page-gutter: var(--page-gutter-sm); }
}

.v-section { padding-block: var(--space-7); }
.v-section-lg { padding-block: var(--space-9); }

/* ----- Navbar ----- */
.v-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--adventure-ready);
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.v-nav-inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--space-4) var(--page-gutter);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.v-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: var(--text-lg);
}
.v-nav-brand img {
  height: 40px;
  width: auto;
}
.v-nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
  margin-left: var(--space-5);
}
.v-nav-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.v-nav-links a:hover,
.v-nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--fresh-produce-light);
}
.v-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.v-nav-user {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-sm);
}
.v-nav-user strong { color: var(--white); font-weight: 500; }
.v-nav-signout {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-md);
  transition: all var(--dur) var(--ease);
}
.v-nav-signout:hover {
  background: var(--white);
  color: var(--adventure-ready);
  border-color: var(--white);
}
.v-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--white);
  cursor: pointer;
  margin-left: auto;
}
.v-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
}
.v-nav-toggle span + span { margin-top: 4px; }

@media (max-width: 900px) {
  .v-nav-toggle { display: block; }
  .v-nav-inner { flex-wrap: wrap; }
  .v-nav-links,
  .v-nav-right {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding-top: var(--space-4);
    gap: var(--space-3);
  }
  .v-nav.open .v-nav-links,
  .v-nav.open .v-nav-right {
    display: flex;
  }
  .v-nav-right { border-top: 1px solid rgba(255,255,255,0.1); margin-top: var(--space-3); padding-top: var(--space-3); }
}

/* ----- Footer ----- */
.v-footer {
  background: var(--adventure-ready-dark);
  color: rgba(255,255,255,0.75);
  padding: var(--space-6) var(--page-gutter);
  text-align: center;
  margin-top: auto;
}
.v-footer-inner {
  max-width: var(--page-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.v-footer-brand {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: var(--text-sm);
  color: var(--white);
}
.v-footer small { font-size: var(--text-xs); letter-spacing: 0.08em; }

/* ----- Cards ----- */
.v-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.v-card-sm { padding: var(--space-5); }
.v-card-lg { padding: var(--space-7); }
.v-card-head {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--text-sm);
  color: var(--dark);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}
.v-card-dark {
  background: var(--adventure-ready);
  color: var(--white);
  border-color: var(--adventure-ready-dark);
}
.v-card-dark .v-card-head { color: var(--white); border-bottom-color: rgba(255,255,255,0.18); }

/* ----- Buttons ----- */
.v-btn,
.action-button,
.action-button-previous {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
  user-select: none;
  white-space: nowrap;
}
.v-btn:focus-visible,
.action-button:focus-visible,
.action-button-previous:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.v-btn-primary,
.action-button {
  background: var(--adventure-ready);
  color: var(--white);
  border-color: var(--adventure-ready);
}
.v-btn-primary:hover,
.action-button:hover {
  background: var(--adventure-ready-dark);
  border-color: var(--adventure-ready-dark);
  transform: translateY(-1px);
}
.v-btn-ghost,
.action-button-previous {
  background: transparent;
  color: var(--dark);
  border-color: var(--border-strong);
}
.v-btn-ghost:hover,
.action-button-previous:hover {
  background: var(--surface-sunken);
  border-color: var(--dark);
  color: var(--dark);
}
.v-btn-dark {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}
.v-btn-dark:hover {
  background: var(--adventure-ready-dark);
  border-color: var(--adventure-ready-dark);
}
.v-btn-accent {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.v-btn-accent:hover {
  background: var(--joyful-community-dark);
  border-color: var(--joyful-community-dark);
}
.v-btn-block { width: 100%; }
.v-btn-sm { padding: 10px 18px; font-size: var(--text-xs); }
.v-btn-icon {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--border-strong);
}
.v-btn-icon:hover { background: var(--surface-sunken); }

/* ----- Form controls ----- */
.v-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.v-field-label,
label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-block;
}
.v-field-label .required,
label .required {
  color: var(--accent);
  margin-left: 3px;
  font-family: var(--font-body);
}
.form-control,
.v-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type="search"],
textarea,
select {
  width: 100%;
  background: var(--cream);
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.4;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.form-control::placeholder,
.v-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--ink-faint);
}
.form-control:hover,
.v-input:hover,
input:not([type="radio"]):not([type="checkbox"]):hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}
.form-control:focus,
.v-input:focus,
input:not([type="radio"]):not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(120, 154, 61, 0.16);
}
.form-control[readonly],
input[readonly],
select[disabled] {
  background: var(--surface-sunken);
  color: var(--text-muted);
  cursor: not-allowed;
}
.form-control.invalid,
.v-input.invalid,
input.invalid,
select.invalid,
textarea.invalid {
  border-color: var(--accent);
  background: #FDF4F1;
}
label.invalid,
span.invalid,
.invalid {
  color: var(--accent);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-transform: none;
  letter-spacing: normal;
  display: block;
  margin-top: var(--space-1);
}

select.form-control,
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path fill='none' stroke='%235D6339' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 5.5l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* Input group for password field */
.v-input-group {
  display: flex;
  align-items: stretch;
}
.v-input-group > input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.v-input-group > button {
  border: 1.5px solid var(--border);
  border-left: 0;
  background: var(--surface-sunken);
  color: var(--dark);
  padding: 0 16px;
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.v-input-group > button:hover { background: var(--border); }

/* Radio + checkbox */
.v-check,
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 10px 12px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.v-check:hover,
.form-check:hover { background: var(--surface-sunken); }
.v-check input,
.form-check-input,
input[type="radio"],
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 1.5px solid var(--border-strong);
  background: var(--white);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"] { border-radius: 4px; }
input[type="radio"]:hover,
input[type="checkbox"]:hover { border-color: var(--primary); }
input[type="radio"]:checked {
  border-color: var(--primary);
  background: radial-gradient(circle, var(--primary) 45%, var(--white) 50%);
}
input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 7.5L6 11l5.5-7'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.form-check-label,
.v-check-label {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.5;
  cursor: pointer;
}

/* Form row (flex layout, replaces Bootstrap form-row) */
.form-row,
.v-form-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.form-row > .col-md-3 { grid-column: span 3; }
.form-row > .col-md-4 { grid-column: span 4; }
.form-row > .col-md-5 { grid-column: span 5; }
.form-row > .col-md-6 { grid-column: span 6; }
.form-row > .col-md-7 { grid-column: span 7; }
.form-row > .col-md-8 { grid-column: span 8; }
.form-row > .col-md-12 { grid-column: span 12; }
.form-row > .col-md { grid-column: auto / span 6; }
.form-row > .col-7 { grid-column: span 7; }
.form-row > .col-5 { grid-column: span 5; }
@media (max-width: 768px) {
  .form-row > [class*="col-"] { grid-column: span 12; }
}
.form-group { margin-bottom: var(--space-4); }
.form-group.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.form-group.row > [class*="col-md"] { grid-column: span 12; }
@media (min-width: 768px) {
  .form-group.row > .col-md-8 { grid-column: span 8; }
  .form-group.row > .col-md-6 { grid-column: span 6; }
  .form-group.row > .col-md-4 { grid-column: span 4; }
  .form-group.row > .col-md-2 { grid-column: span 2; }
}
.col-form-label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--ink-soft);
  padding-top: 10px;
}
.required { color: var(--accent); margin-left: 3px; font-family: var(--font-body); }

/* ----- Alerts / flash messages ----- */
.v-alert {
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  border-left: 4px solid;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.v-alert-success {
  background: #F1F5E4;
  border-color: var(--primary);
  color: var(--adventure-ready-dark);
}
.v-alert-danger {
  background: #FDF1EC;
  border-color: var(--accent);
  color: var(--joyful-community-dark);
}
.v-alert-info {
  background: #F3EFE1;
  border-color: var(--earth);
  color: var(--earth);
}
.v-alert-warning {
  background: #FDF8E8;
  border-color: #D4A017;
  color: #7A5900;
}

/* Map legacy Bootstrap alert classes onto new design */
.alert {
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  border: 1px solid;
  border-left-width: 4px;
  margin-bottom: var(--space-5);
}
.alert-success { background: #F1F5E4; border-color: var(--primary); color: var(--adventure-ready-dark); }
.alert-danger  { background: #FDF1EC; border-color: var(--accent); color: var(--joyful-community-dark); }
.alert-info    { background: #F3EFE1; border-color: var(--earth); color: var(--earth); }
.alert-warning { background: #FDF8E8; border-color: #D4A017; color: #7A5900; }

/* ----- Tables ----- */
.v-table,
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.v-table thead,
.table thead {
  background: var(--adventure-ready);
}
.v-table thead th,
.table thead th {
  color: var(--white);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 16px;
  font-weight: 500;
}
.v-table tbody td,
.table tbody td,
.v-table tbody th,
.table tbody th {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-weight: 500;
  vertical-align: top;
}
.v-table tbody tr:first-child td,
.v-table tbody tr:first-child th,
.table tbody tr:first-child td,
.table tbody tr:first-child th {
  border-top: 0;
}
.table-striped tbody tr:nth-child(odd) {
  background: var(--surface-sunken);
}
.table-responsive { overflow-x: auto; }
.thead-success,
.thead-success th { background: var(--adventure-ready) !important; color: var(--white) !important; }

/* ----- Responsive "no-more-tables" pattern (kept from original) ----- */
#no-more-tables { overflow-x: auto; }
@media only screen and (max-width: 760px) {
  #no-more-tables table,
  #no-more-tables thead,
  #no-more-tables tbody,
  #no-more-tables th,
  #no-more-tables td,
  #no-more-tables tr { display: block; }
  #no-more-tables thead tr {
    position: absolute; top: -9999px; left: -9999px;
  }
  #no-more-tables tr {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    background: var(--surface);
  }
  #no-more-tables td {
    border: none;
    border-bottom: 1px solid var(--border);
    position: relative;
    padding-left: 40% !important;
    white-space: normal;
    text-align: left;
  }
  #no-more-tables td:last-child { border-bottom: 0; }
  #no-more-tables td:before {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 35%;
    padding-right: 10px;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dark);
    content: attr(data-title);
  }
}

/* ----- Pickup location card grid (step 2) ----- */
.pickup-card-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.pickup-day {
  margin: 0;
}
.pickup-day-heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--adventure-ready);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--border);
}
.pickup-day-group {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .pickup-day-group { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .pickup-day-group { grid-template-columns: repeat(3, 1fr); }
}

.pickup-card {
  display: block;
  position: relative;
  margin: 0;
  cursor: pointer;
}
.pickup-card-visual {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  min-height: 44px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.pickup-card:hover .pickup-card-visual {
  border-color: var(--adventure-ready);
}
.pickup-card-input:checked ~ .pickup-card-visual {
  border-color: var(--adventure-ready);
  background: #F5F2E7;
  box-shadow: 0 0 0 3px rgba(93, 99, 57, 0.16);
}
.pickup-card-input:focus ~ .pickup-card-visual {
  outline: 2px solid var(--adventure-ready);
  outline-offset: 3px;
}

.pickup-card-check {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--white);
  transition: border-color .15s, background .15s;
}
.pickup-card-input:checked ~ .pickup-card-visual .pickup-card-check {
  border-color: var(--adventure-ready);
  background: radial-gradient(circle, var(--adventure-ready) 45%, var(--white) 50%);
}

.pickup-card-body {
  flex: 1;
  min-width: 0;
}
.pickup-card-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin: 0 0 2px;
  color: var(--dark);
}
.pickup-card-address {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0 0 var(--space-2);
}
.pickup-card-time {
  font-size: var(--text-sm);
  margin: 0 0 var(--space-2);
  color: var(--dark);
}
.pickup-card-farms {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.pickup-card-farms li { display: inline; }
.pickup-card-farms li:not(:last-child)::after { content: " · "; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Utility classes ----- */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--accent); }
.text-success { color: var(--primary); }
.text-dark { color: var(--ink); }
.text-white { color: var(--white); }
.text-info { color: var(--earth); }
.bg-success { background-color: var(--primary); }
.bg-dark { background-color: var(--dark); }
.bg-light { background-color: var(--surface-sunken); }
.font-weight-bold,
.font-bold { font-weight: 500; color: var(--ink); }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-5 { margin-bottom: var(--space-6) !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-5 { margin-top: var(--space-6) !important; }
.ml-2 { margin-left: var(--space-2) !important; }
.ml-3 { margin-left: var(--space-3) !important; }
.pl-5 { padding-left: var(--space-5) !important; }
.pr-0 { padding-right: 0 !important; }
.pl-0 { padding-left: 0 !important; }
.p-3 { padding: var(--space-3) !important; }
.pb-5 { padding-bottom: var(--space-6) !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.w-100 { width: 100% !important; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }

/* ----- Hero section (for pages like signup with program photo) ----- */
.v-hero {
  position: relative;
  background: var(--adventure-ready);
  color: var(--white);
  padding: var(--space-9) var(--page-gutter) var(--space-8);
  overflow: hidden;
  isolation: isolate;
}
.v-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/images/farm-share.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: saturate(0.8) contrast(1.05);
  z-index: -2;
}
.v-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(93,99,57,0.82) 0%, rgba(67,72,48,0.92) 100%);
  z-index: -1;
}
.v-hero-inner {
  max-width: var(--page-max);
  margin-inline: auto;
  position: relative;
}
.v-hero-eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper);
  display: inline-block;
  margin-bottom: var(--space-4);
}
.v-hero h1,
.v-hero .v-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--white);
  max-width: 18ch;
  margin-bottom: var(--space-5);
}
.v-hero-sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.88);
  max-width: 60ch;
  line-height: 1.55;
}
.v-hero-sub a { color: var(--paper); text-decoration: underline; }
.v-hero-sub a:hover { color: var(--white); }

/* ----- Auth card wrapper (used by login, signIn, change, reset) ----- */
.v-auth {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--page-gutter);
}
.v-auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.v-auth-card h1 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}
.v-auth-card .lede { font-size: var(--text-base); margin-bottom: var(--space-6); }

/* ============================================================
   SIGNUP FORM — multi-step layout
   ============================================================ */

.signup-page {
  background: var(--bg);
}
.signup-layout {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--space-6) var(--page-gutter) var(--space-9);
}
.signup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-5), 4vw, var(--space-8));
  box-shadow: var(--shadow-md);
  margin-top: calc(-1 * var(--space-8));
  position: relative;
  z-index: 2;
}
.signup-title-row {
  text-align: center;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
}
.signup-title-row img {
  height: 56px;
  width: auto;
  margin: 0 auto var(--space-3);
}
.signup-title-row h2 {
  font-size: var(--text-2xl);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.signup-title-row p { color: var(--ink-soft); }

/* Progress bar */
#msform { width: 100%; }
#progressbar {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-7);
  counter-reset: step;
}
#progressbar li {
  position: relative;
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 42px;
}
#progressbar li strong { font-weight: 500; }
#progressbar li::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  width: 32px;
  height: 32px;
  line-height: 30px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-faint);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0;
  transition: all var(--dur) var(--ease);
}
#progressbar li::after {
  content: '';
  position: absolute;
  top: 15px;
  left: calc(-50% + 16px);
  width: calc(100% - 32px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}
#progressbar li:first-child::after { display: none; }
#progressbar li.active {
  color: var(--dark);
}
#progressbar li.active::before {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}
#progressbar li.active::after {
  background: var(--primary);
}
@media (max-width: 640px) {
  #progressbar li { font-size: 9px; letter-spacing: 0.1em; }
  #progressbar li::before { width: 26px; height: 26px; line-height: 24px; font-size: 12px; }
  #progressbar li::after { top: 12px; left: calc(-50% + 13px); width: calc(100% - 26px); }
  #progressbar li { padding-top: 34px; }
}

/* Fieldset step layout */
#msform fieldset {
  background: transparent;
  border: 0;
  padding: 0;
  position: relative;
}
#msform fieldset:not(:first-of-type) {
  display: none;
}
.form-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--fresh-produce-light);
  margin-bottom: var(--space-6);
}
.form-card .fs-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--dark);
  margin: 0;
}
.form-card .steps {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0;
  white-space: nowrap;
}

/* Field group spacing within fieldsets */
#msform fieldset label { color: var(--ink-soft); }

/* Action buttons bottom of fieldset */
#msform fieldset > .action-button,
#msform fieldset > .action-button-previous,
#msform fieldset > input[type="submit"] {
  margin-top: var(--space-6);
}
#msform fieldset > .action-button + .action-button-previous,
#msform fieldset > .action-button-previous + .action-button {
  margin-left: var(--space-3);
}
#msform fieldset > .action-button-previous { order: -1; }

/* Farm section (hidden by default) */
.farm-section {
  margin-block: var(--space-6);
  padding: var(--space-5);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.farm-section h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dark);
  margin-bottom: var(--space-2);
}
.farm-section h3 u { text-decoration: none; border-bottom: 2px solid var(--primary); padding-bottom: 2px; }
.farm-section p i { color: var(--ink-muted); font-style: italic; }

/* Home Delivery card override for step 2 */
.card.border-success {
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: var(--space-5);
  overflow: hidden;
}
.card.border-success .card-header {
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-5);
}
.card.border-success .card-body { padding: var(--space-5); }

/* Generic card (used in Review step, discount card, program card, donation card) */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.card .card-header {
  background: var(--surface-sunken);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
}
.card .card-header.bg-success,
.card-header.bg-success {
  background: var(--dark) !important;
  color: var(--white) !important;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.card .card-body { padding: var(--space-5); }

/* Info button gray (from signup home delivery info icon) */
.btn-gray {
  background: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  color: var(--dark);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.btn-gray:hover { background: var(--border); }

/* Donation inline radio row */
#inputDonationAmount { margin-top: var(--space-3); }
.form-check-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-right: var(--space-4);
}
#showDonationAmountDiv { margin-top: var(--space-3); }
#showDonationAmountDiv input { max-width: 160px; }

/* Agreement card (bottom of review step) */
.card[style*="rgba(255,255,0"] {
  background: #FBF5D9 !important;
  border: 1.5px solid #E8D96A !important;
}

/* Select2 override to match the design system */
.select2-container--default .select2-selection--single {
  height: auto;
  padding: 10px 14px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.4;
  color: var(--ink);
  padding: 0;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 14px;
}
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(120, 154, 61, 0.16);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--primary);
}
.select2-dropdown {
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
}

/* jQuery Validate error styling */
label.error, span.error {
  color: var(--accent);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-transform: none;
  letter-spacing: normal;
  display: block;
  margin-top: var(--space-1);
}

/* Error placeholder spans (signup) */
#ethnicityErrorMsg,
#raceErrorMsg,
#pastParticipationErrorMsg,
#reachOutErrorMsg,
#passwordErrorMsg,
#pickupErrorMsg,
#farmShareErrorMsg,
#payTimeErrorMsg,
#payTimeBiweeklyErrorMsg,
#shareDiscountOptionErrorMsg,
#familySizeErrorMsg,
#incomeErrorMsg,
#solidarityShareErrorMsg,
#donationErrorMsg,
#inlineRadioOptionsErrorMsg,
#submitErrorMsg {
  display: block;
  min-height: 0;
}

/* Bootstrap 4 tab/pill compatibility shim.
   Phase 1 dropped bootstrap.min.css (VINES design system replaces its visual
   tokens), but paymentTab.ejs and otherPayment.ejs still use data-toggle="pill"
   for tab switching. Bootstrap's JS toggles .active / .show on .tab-pane
   elements but its CSS rules for hiding inactive panes are no longer loaded.
   These two rules restore the tab hide/show behavior without pulling in the
   full Bootstrap stylesheet. */
.tab-content > .tab-pane { display: none; }
.tab-content > .active { display: block; }
