/* ============================================================
   MkuuLima — app.css
   Mobile-first design system on top of w3.css.
   Warm agricultural palette. Refined typography, cards, forms,
   navigation, dashboards, tables, badges, timelines.
   ============================================================ */

/* ---------- Design tokens ---------------------------------- */
:root {
  /* Brand palette (from original style.css, deepened) */
  --green-900: #1e3d1f;
  --green-800: #244d27;
  --green-700: #2f6b34;
  --green-600: #3d8b43;
  --green-500: #4caf50;
  --green-400: #7dc281;
  --green-100: #e3f3e4;

  --earth-700: #6b4423;
  --earth-400: #a97c50;
  --earth-200: #f3e9dc;
  --earth-100: #faf3ea;

  --cream:    #fbf8f2;
  --paper:    #ffffff;
  --ink:      #23281f;
  --ink-soft: #454b3f;
  --muted:    #6b7160;
  --border:   #e4ddd0;
  --border-strong: #d4cbb8;

  --danger:   #b3423a;
  --danger-bg:#fdecea;
  --warn:     #8a6d1a;
  --warn-bg:  #fff3d6;
  --info-bg:  #e8f2fb;
  --info:     #2f5b7d;

  /* Radius, shadows, motion */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(30,61,31,.04);
  --shadow-sm: 0 2px 6px rgba(30,61,31,.06);
  --shadow:    0 4px 14px rgba(30,61,31,.08);
  --shadow-lg: 0 12px 32px rgba(30,61,31,.12);

  --transition: 160ms cubic-bezier(.4,0,.2,1);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: var(--font-sans);
}

/* ---------- Reset / base ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-600); text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

h1, h2, h3, h4, h5 {
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--green-900);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
p  { margin: 0 0 1em; }

/* Accessibility: focus ring */
:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green-900); color: #fff;
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
  z-index: 9999; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ----------------------------------------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
.section       { padding: 40px 0; }
.section-tight { padding: 24px 0; }
@media (min-width: 768px) {
  .section       { padding: 64px 0; }
  .section-tight { padding: 32px 0; }
  .container     { padding: 0 24px; }
}

/* ---------- Navbar ----------------------------------------- */
.navbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.2rem;
  letter-spacing: -0.02em; color: var(--green-900);
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--green-900); }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-text span { color: var(--green-600); }
.brand-footer { color: #fff; }
.brand-footer .brand-text { color: #fff; }
.brand-footer .brand-text span { color: var(--green-400); }

.nav-links { display: none; align-items: center; gap: 22px; }
.nav-links > a {
  color: var(--ink-soft); font-weight: 500; font-size: 0.94rem;
}
.nav-links > a:hover { color: var(--green-700); text-decoration: none; }
.nav-links > a.active { color: var(--green-700); font-weight: 700; }
.nav-links .nav-cta {
  background: var(--green-600); color: #fff;
  padding: 9px 18px; border-radius: var(--radius-pill);
  font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--green-700); color: #fff; text-decoration: none; }

.nav-user {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--green-100); color: var(--green-900);
  font-weight: 600; font-size: 0.9rem;
}
.nav-user:hover { background: var(--earth-200); text-decoration: none; color: var(--green-900); }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--danger); color: #fff;
  font-size: 0.7rem; font-weight: 700; border-radius: var(--radius-pill);
}

.mobile-menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 6px; cursor: pointer;
  color: var(--green-900); border-radius: var(--radius-sm);
}
.mobile-menu-btn:hover { background: var(--earth-100); }

.mobile-menu {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 16px 20px; border-top: 1px solid var(--border);
  background: #fff;
}
.mobile-menu a {
  padding: 12px 6px; font-weight: 600; color: var(--ink);
  border-radius: var(--radius-sm);
}
.mobile-menu a:hover { background: var(--earth-100); text-decoration: none; }
.mobile-menu .btn { margin-top: 8px; }

@media (min-width: 860px) {
  .nav-links       { display: flex; }
  .mobile-menu-btn { display: none; }
  .mobile-menu     { display: none !important; }
}

/* ---------- Buttons ---------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700; font-size: 0.94rem; line-height: 1;
  border: 2px solid transparent; cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  text-align: center;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--green-600); color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--green-700); color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.btn-outline {
  background: transparent; border-color: var(--green-600); color: var(--green-700);
}
.btn-outline:hover { background: var(--green-100); color: var(--green-900); text-decoration: none; }
.btn-dark { background: var(--green-900); color: #fff; }
.btn-dark:hover { background: var(--green-800); color: #fff; text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #973831; color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--green-700); }
.btn-ghost:hover { background: var(--earth-100); text-decoration: none; }

.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
/* ---------- Inputs with Feather icons ---------------------- */
.input-icon {
  position: relative;
  display: block;
  width: 100%;
}
.input-icon > svg,
.input-icon > i[data-feather] {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: inline-block;   /* feathers default to block — force inline */
  color: var(--muted);
  pointer-events: none;
  transition: color 160ms ease;
}
.input-icon:focus-within > svg,
.input-icon:focus-within > i[data-feather] {
  color: var(--green-600);
}
.input-icon > input,
.input-icon > select {
  padding-left: 42px;
  width: 100%;
}
.input-icon > textarea {
  padding-left: 42px;
  padding-top: 12px;
  width: 100%;
}
.input-icon.textarea > svg,
.input-icon.textarea > i[data-feather] {
  top: 22px;
  transform: none;
}
/*------- Kesh Addition to put icons on the same line as link text --------- */
/* ---------- Inline icons in links, nav, footer, lists ----- */
.nav-links > a,
.mobile-menu > a,
.footer-col a,
.breadcrumb a,
.pagination a,
.dash-nav a,
.crop-list li,
.farm-list li,
.link-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

/* Feather icons: keep inline so they never break a line */
svg[data-feather],
i[data-feather],
a > svg,
a > i[data-feather],
li > svg,
button > svg,
.btn > svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Icons inside .btn already had gap from .btn's own styles;
   this reinforces it and stops text from wrapping. */
.btn {
  white-space: nowrap;
}

/* ---------- Forms ------------------------------------------ */
label {
  display: block; font-weight: 600; font-size: 0.85rem;
  margin: 16px 0 6px; color: var(--ink);
}
label:first-child { margin-top: 0; }

input, select, textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem; font-family: inherit;
  background: #fff; color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(76,175,80,.15);
}
input::placeholder, textarea::placeholder { color: #b0b5a5; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='%236b7160'%3E%3Cpath d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px;
  padding-right: 36px;
}
textarea { min-height: 90px; resize: vertical; }

.checkbox-row {
  display: flex; align-items: center; gap: 10px; margin: 12px 0;
}
.checkbox-row input[type="checkbox"],
.checkbox-row input[type="radio"] {
  width: auto; margin: 0;
  accent-color: var(--green-600);
  transform: scale(1.15);
}
.checkbox-row label { margin: 0; font-weight: 500; font-size: 0.94rem; }

.form-card {
  background: #fff; border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 560px; margin: 0 auto;
}
.form-card h2 { margin-top: 0; }

.field-hint { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.errors {
  background: var(--danger-bg); border: 1px solid var(--danger);
  color: var(--danger); padding: 12px 16px;
  border-radius: var(--radius-sm); margin-bottom: 16px;
  font-weight: 500;
}

/* ---------- Flash messages --------------------------------- */
.flash {
  background: var(--green-100); color: var(--green-900);
  border-left: 4px solid var(--green-500);
  border-radius: var(--radius-sm);
  padding: 12px 16px; margin: 16px 0;
  font-weight: 600;
}
.flash-error {
  background: var(--danger-bg); color: var(--danger);
  border-left-color: var(--danger);
}

/* ---------- Cards & grids ---------------------------------- */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3,1fr); }
  .grid-4 { grid-template-columns: repeat(4,1fr); }
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.card-img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  background: var(--earth-200);
}
.card-img-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--earth-200), #dce8d4);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; color: var(--green-600);
}

/* ---------- Badges ----------------------------------------- */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
.badge-verified   { background: var(--green-100); color: var(--green-700); }
.badge-pending    { background: var(--warn-bg); color: var(--warn); }
.badge-unverified { background: var(--border); color: var(--muted); }
.badge-status     { background: var(--earth-200); color: var(--earth-700); }

/* ---------- Progress bar ----------------------------------- */
.progress {
  background: var(--border); border-radius: var(--radius-pill);
  height: 8px; overflow: hidden; margin: 8px 0;
}
.progress-bar {
  background: linear-gradient(90deg, var(--green-500), var(--green-600));
  height: 100%; border-radius: var(--radius-pill);
  transition: width 400ms ease;
}

/* ---------- Meta & price ----------------------------------- */
.price { font-weight: 800; color: var(--green-800); font-size: 1.15rem; }
.meta-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--muted); margin: 2px 0;
}
.meta-row a { color: var(--green-700); font-weight: 500; }

/* ---------- Hero ------------------------------------------ */
.hero {
  background:
    radial-gradient(1200px 400px at 50% -50px, rgba(76,175,80,.12), transparent 70%),
    linear-gradient(180deg, var(--earth-200) 0%, var(--cream) 100%);
  padding: 56px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.9rem, 6vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.hero h1 .accent { color: var(--green-600); }
.hero p.lead {
  font-size: 1.05rem; color: var(--muted);
  max-width: 620px; margin: 0 auto 28px;
}
.hero-actions {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 320px; margin: 0 auto;
}
@media (min-width: 640px) {
  .hero-actions { flex-direction: row; max-width: none; justify-content: center; }
  .hero { padding: 80px 0 56px; }
}

/* ---------- Steps ----------------------------------------- */
.steps { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(4,1fr); } }
.steps > div {
  background: #fff; border-radius: var(--radius);
  padding: 24px 20px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.step-num {
  font-size: 1.6rem; font-weight: 800;
  color: var(--green-500); margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.steps h3 { font-size: 0.95rem; letter-spacing: .04em; }
.steps p  { font-size: 0.9rem; color: var(--muted); margin: 0; }

.section-title { text-align: center; margin-bottom: 8px; }
.section-sub   { text-align: center; color: var(--muted); margin: 0 auto 32px; max-width: 620px; }

/* ---------- Dashboard layout ------------------------------- */
.dash-layout { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) {
  .dash-layout { flex-direction: row; align-items: flex-start; gap: 28px; }
}
.dash-nav {
  display: flex; overflow-x: auto; gap: 4px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.dash-nav::-webkit-scrollbar { display: none; }
.dash-nav a {
  white-space: nowrap; padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft); font-weight: 600; font-size: 0.9rem;
}
.dash-nav a.active, .dash-nav a:hover {
  background: var(--earth-200); color: var(--green-900);
  text-decoration: none;
}
@media (min-width: 900px) {
  .dash-nav {
    flex-direction: column; width: 220px; flex-shrink: 0;
    border-bottom: none; border-right: 1px solid var(--border);
    padding: 0 16px 0 0; gap: 2px;
  }
}
.dash-main { flex: 1; min-width: 0; }
.dash-main > h1 { margin-top: 0; }

.stat-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stat-card .num {
  font-size: 1.7rem; font-weight: 800;
  color: var(--green-700); letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-card .label {
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  margin-top: 4px;
}

/* ---------- Tables ----------------------------------------- */
.table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
th {
  background: var(--earth-200); color: var(--green-900);
  font-size: 0.76rem; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 700;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--earth-100); }

/* ---------- Timeline --------------------------------------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  padding: 10px 0 10px 30px; position: relative;
  font-size: 0.92rem; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.timeline li:last-child { border-bottom: 0; }
.timeline li.done    { color: var(--green-700); font-weight: 600; }
.timeline li.current { color: var(--green-900); font-weight: 700; }
.timeline li::before {
  content: '○'; position: absolute; left: 4px; top: 8px;
  font-size: 1rem; color: var(--border-strong);
}
.timeline li.done::before    { content: '✓'; color: var(--green-600); }
.timeline li.current::before { content: '●'; color: var(--green-600); }

/* ---------- Empty states ----------------------------------- */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--muted);
  background: #fff; border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }
.empty-state .btn { margin-top: 16px; }

/* ---------- Filter bar ------------------------------------- */
.filter-bar {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-xs); margin-bottom: 24px;
}
.filter-bar .grid { gap: 12px; }
.filter-bar label { margin-top: 0; }
@media (min-width: 700px) {
  .filter-bar .grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

/* ---------- Price breakdown -------------------------------- */
.price-breakdown {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.price-breakdown h3 { margin-top: 0; }
.price-breakdown .row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; font-size: 0.94rem;
}
.price-breakdown .row.sub { color: var(--muted); font-size: 0.86rem; }
.price-breakdown .row.total {
  border-top: 2px solid var(--border);
  margin-top: 10px; padding-top: 14px;
  font-weight: 800; font-size: 1.1rem; color: var(--green-900);
}

/* ---------- Site footer ------------------------------------ */
.site-footer {
  background: var(--green-900); color: #cfe0cb;
  margin-top: 80px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
  padding: 48px 16px 32px;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 1000px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-brand { max-width: 340px; }
.footer-tag { color: #fff; font-weight: 600; margin: 12px 0 4px; }
.footer-blurb { color: #a9c2a4; margin: 0; }
.footer-col h4 {
  color: #fff; font-size: 0.78rem; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 12px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 6px 0; }
.footer-col a { color: #cfe0cb; font-weight: 500; }
.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-bar {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0;
}
.footer-bar-inner {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: #8fa88b;
}

/* ---------- Utilities -------------------------------------- */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.mt-0 { margin-top: 0; }  .mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; }  .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Responsive typographic scale ------------------- */
@media (min-width: 768px) {
  h1 { font-size: 2.15rem; }
  h2 { font-size: 1.55rem; }
  body { font-size: 16.5px; }
}

/* ---------- Print (receipts, orders) ----------------------- */
@media print {
  .navbar, .site-footer, .dash-nav, .btn, .flash { display: none !important; }
  body { background: #fff; }
  .container { padding: 0; max-width: none; }
  .card, .table-wrap, .price-breakdown { box-shadow: none; border: 1px solid #ccc; }
}
/* --------- Kesh icons on the same line --------------------- */
/* Any element with a direct svg/i-data-feather child becomes flex */
svg[data-feather] + span,
svg[data-feather] ~ span,
svg[data-feather] + a,
svg[data-feather] ~ a {
  margin-left: 0;
}
/* --------- admin-harvest.php scrolling issue ----- */
/* ---------- Admin filter grid (mobile-first, no scroll) ---- */
.filter-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .filter-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .filter-grid { grid-template-columns: 2fr 1fr auto auto; align-items: end; }
}

/* ---------- Status tabs: wrap instead of scroll ------------ */
.tabbar-wrap {
  flex-wrap: wrap;
  overflow-x: visible;
}
.tabbar-wrap .tab {
  margin-bottom: 4px;
}

/* ---------- Admin mobile cards for harvests ---------------- */
.admin-harvest-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 700px) {
  .admin-harvest-cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  /* On wide screens we switch to the table, so hide the cards. */
  .admin-harvest-cards { display: none; }
}

.admin-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 2px;
}
.admin-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-900);
  text-decoration: none;
}
.admin-card-title:hover { text-decoration: underline; }

.admin-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.admin-card-actions select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-size: .88rem;
  background: #fff;
}

/* ---------- Hide the desktop table on small screens -------- */
.admin-harvest-table { display: none; }
@media (min-width: 1100px) {
  .admin-harvest-table { display: block; }
}