/* WeEarthSA Farmer Dashboard — enterprise (Stripe / Azure Portal) */

.fv-shell {
  /* Brand */
  --fv-primary: #0F6B3C;
  --fv-primary-hover: #0B5530;
  --fv-primary-soft: #E8F5EC;
  --fv-primary-mid: #B7E0C4;
  --fv-primary-950: #0D2A21;
  --fv-primary-900: #0F3D2E;
  --fv-primary-800: #1A5C42;
  --fv-primary-700: #0F6B3C;

  /* Status */
  --fv-success: #0F7B3A;
  --fv-success-soft: #E8F5EC;
  --fv-warning: #B45309;
  --fv-warning-soft: #FFF7ED;
  --fv-danger: #C62828;
  --fv-danger-soft: #FDECEC;
  --fv-info: #1D4ED8;

  /* Surfaces */
  --fv-bg: #F6F8FB;
  --fv-card: #FFFFFF;
  --fv-surface: #FFFFFF;
  --fv-border: #E2E8E4;
  --fv-border-strong: #C8D5CC;

  /* Text */
  --fv-text: #0F172A;
  --fv-text-primary: #0F172A;
  --fv-text-secondary: #64748B;
  --fv-muted: #64748B;
  --fv-subtle: #94A3B8;

  /* Shell chrome */
  --fv-sidebar-bg: #0D2A21;
  --fv-banner: #0F3D2E;
  --fv-banner-accent: #1A5C42;
  --fv-sidebar-w: 248px;
  --fv-sidebar-collapsed: 72px;
  --fv-topbar-h: 64px;

  /* Spacing scale */
  --fv-space-1: 4px;
  --fv-space-2: 8px;
  --fv-space-3: 12px;
  --fv-space-4: 16px;
  --fv-space-5: 20px;
  --fv-space-6: 24px;
  --fv-space-8: 32px;
  --fv-space-10: 40px;

  /* Shape */
  --fv-radius: 12px;
  --fv-radius-sm: 8px;
  --fv-radius-lg: 16px;
  --fv-shadow: 0 1px 2px rgba(15, 61, 46, 0.04);
  --fv-shadow-md: 0 1px 2px rgba(15, 61, 46, 0.04), 0 4px 14px rgba(15, 61, 46, 0.06);
  --fv-font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fv-bg);
  font-family: var(--fv-font);
  color: var(--fv-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow: hidden;
}

/* ── Top bar ── */
.fv-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--fv-topbar-h);
  padding: 0 20px;
  background: var(--fv-card);
  border-bottom: 1px solid var(--fv-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.fv-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.fv-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.04em;
  color: var(--fv-sidebar-bg);
  text-decoration: none;
}

.fv-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.fv-logo-text {
  color: inherit;
}

.fv-collapse-btn,
.fv-mobile-nav-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius-sm);
  background: #fff;
  color: var(--fv-muted);
  cursor: pointer;
}

.fv-collapse-btn:hover,
.fv-mobile-nav-btn:hover {
  background: var(--fv-primary-soft);
  color: var(--fv-primary);
  border-color: var(--fv-primary-mid);
}

.fv-mobile-nav-btn { display: none; }

.fv-search {
  flex: 1;
  max-width: 480px;
  position: relative;
  margin: 0 auto;
}

.fv-search .lucide-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fv-subtle);
  pointer-events: none;
}

.fv-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius-sm);
  background: var(--fv-bg);
  font: inherit;
  font-size: 13px;
  color: var(--fv-text);
  outline: none;
}

.fv-search-input::placeholder { color: var(--fv-subtle); }

.fv-search-input:focus {
  background: #fff;
  border-color: var(--fv-primary);
  box-shadow: 0 0 0 3px rgba(23, 71, 158, 0.12);
}

.fv-top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* Multi-category dashboard switcher */
.fv-cat-switch {
  position: relative;
  margin-right: 6px;
  z-index: 45;
}

.fv-cat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  border: 0;
  background: transparent;
  cursor: default;
  padding: 0;
}

.fv-cat-switch-btn {
  position: relative;
  z-index: 46;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px 0 6px;
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius-sm);
  background: #fff;
  color: var(--fv-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.fv-cat-switch-btn:hover {
  border-color: var(--fv-primary);
  background: var(--fv-primary-soft);
}

.fv-cat-thumb {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--fv-border);
}

.fv-cat-item-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.25;
}

.fv-cat-item-text strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fv-cat-type {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.fv-cat-role {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: #94a3b8;
}

.fv-cat-menu-item.active .fv-cat-type,
.fv-cat-menu-item.active .fv-cat-role {
  color: inherit;
  opacity: 0.85;
}

.fv-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 80;
  padding: 1rem;
  overflow: auto;
}

.fv-cat-switch-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fv-cat-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius);
  box-shadow: var(--fv-shadow-md);
  padding: 6px;
  z-index: 80;
}

.fv-cat-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: var(--fv-radius-sm);
  background: transparent;
  color: var(--fv-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.fv-cat-menu-item:hover,
.fv-cat-menu-item.active {
  background: var(--fv-primary-soft);
  color: var(--fv-primary);
}

.fv-cat-add {
  margin-top: 4px;
  border-top: 1px solid var(--fv-border);
  border-radius: 0 0 var(--fv-radius-sm) var(--fv-radius-sm);
  color: var(--fv-muted);
  font-size: 12px;
}

.fv-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius-sm);
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: var(--fv-muted);
  margin-right: 4px;
}

.fv-flag { font-size: 13px; line-height: 1; }

.fv-icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--fv-radius-sm);
  color: var(--fv-muted);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
}

.fv-icon-btn:hover {
  background: var(--fv-primary-soft);
  color: var(--fv-primary);
}

.fv-icon-btn .fv-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fv-danger);
  border: 1.5px solid #fff;
}

.fv-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px 0 4px;
  margin-left: 4px;
  border: 1px solid var(--fv-border);
  border-radius: 999px;
  background: #fff;
  color: var(--fv-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.fv-profile-chip:hover { border-color: var(--fv-border-strong); }

.fv-profile-chip .fv-avatar {
  width: 26px;
  height: 26px;
  font-size: 11px;
  background: var(--fv-primary-soft);
  color: var(--fv-primary);
}

.fv-profile-chip .fv-chip-name {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fv-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ── Workspace + light sidebar ── */
.fv-workspace {
  display: grid;
  grid-template-columns: var(--fv-sidebar-w) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  height: 100%;
  transition: grid-template-columns 0.2s ease;
}

.fv-workspace.sidebar-collapsed {
  grid-template-columns: var(--fv-sidebar-collapsed) minmax(0, 1fr);
}

.fv-sidebar {
  background-color: var(--fv-sidebar-bg);
  background-image: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100vh - var(--fv-topbar-h));
  overflow-y: auto;
  overflow-x: hidden;
  gap: 4px;
  position: sticky;
  top: var(--fv-topbar-h);
}

.fv-sidebar.collapsed .fv-profile-text,
.fv-sidebar.collapsed .fv-nav-label,
.fv-sidebar.collapsed .fv-nav-group-title,
.fv-sidebar.collapsed .fv-nav-group-toggle,
.fv-sidebar.collapsed .fv-sidebar-contact,
.fv-sidebar.collapsed .fv-nav-arrow {
  display: none;
}

.fv-sidebar.collapsed .fv-profile {
  justify-content: center;
  padding: 8px 0 12px;
}

.fv-sidebar.collapsed .fv-nav-item {
  justify-content: center;
  padding: 10px;
}

.fv-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.fv-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  font-size: 12px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.fv-welcome {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fv-profile-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fv-page-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 1.25rem 0;
  padding: 1.15rem 1.35rem;
  min-height: 7.5rem;
  background:
    linear-gradient(115deg, #0F3D2E 0%, #1A5C42 58%, #0F3D2E 100%);
  color: #fff;
  border-radius: 14px;
  box-shadow: var(--fv-shadow-md);
  overflow: hidden;
  position: relative;
}

.fv-page-head-hero {
  min-height: 8.25rem;
  padding: 1.35rem 1.5rem;
}

.fv-page-head-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.fv-page-head-art {
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  width: min(48%, 420px);
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  overflow: hidden;
  border-radius: 0 14px 14px 0;
}

.fv-page-head-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0F3D2E 0%, rgba(15, 61, 46, 0.55) 28%, rgba(15, 61, 46, 0) 58%);
  z-index: 1;
  pointer-events: none;
}

.fv-page-head-art .fv-landscape-art {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.05);
  transform-origin: right bottom;
}

.fv-page-head-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.fv-page-head::after {
  content: none;
}

.fv-page-head-docked {
  position: sticky;
  top: calc(var(--fv-topbar-h) + 0.5rem);
  z-index: 25;
  margin: 1rem 1.25rem 0;
  border-radius: var(--fv-radius);
  box-shadow: 0 10px 24px rgba(15, 61, 46, 0.22);
  min-height: 4.75rem;
}

.fv-page-head h1 { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; position: relative; z-index: 1; }
.fv-page-head p { margin: 0.3rem 0 0; font-size: 0.88rem; color: rgba(255,255,255,0.78); max-width: 36rem; line-height: 1.4; position: relative; z-index: 1; }
.fv-profile-page .fv-profile-card { max-width: none; width: 100%; }

.fv-train-panel {
  background: #f5ebe0;
  border-radius: 1rem;
  padding: 1.1rem 1.15rem 1.35rem;
}

.fv-cert-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.fv-cert-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.fv-cert-ic {
  width: 36px;
  height: 36px;
  border-radius: 0.55rem;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fv-cert-main { flex: 1; min-width: 0; }
.fv-cert-t { font-weight: 650; font-size: 0.92rem; color: #0f172a; }
.fv-cert-meta { font-size: 0.78rem; color: #64748b; margin-top: 0.15rem; }

.fv-cert-st {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.fv-cert-st.ok { background: #dcfce7; color: #166534; }
.fv-cert-st.prog { background: #ffedd5; color: #9a3412; }
.fv-cert-st.enr { background: #e0e7ff; color: #3730a3; }

.fv-cert-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.fv-cert-btn:hover { filter: brightness(1.06); }

.fv-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; padding-top: 4px; }
.fv-nav.collapsed-menu { display: none; }
.fv-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.fv-nav-home {
  margin-bottom: 2px;
}
.fv-nav-group:first-of-type {
  margin-top: 4px;
}
.fv-nav-more { margin-top: 8px; }

.fv-nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--fv-radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
}
.fv-nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}
.fv-nav-group.has-active > .fv-nav-group-toggle {
  color: rgba(255, 255, 255, 0.82);
}
.fv-nav-group-toggle > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.fv-nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fv-nav-group-title {
  display: block;
  padding: 8px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.fv-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: var(--fv-radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.fv-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.fv-nav-item.active {
  background: rgba(15, 107, 60, 0.55);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, 0.35);
}

.fv-nav-item .lucide-icon { color: inherit; opacity: 0.95; flex-shrink: 0; }
.fv-nav-label { flex: 1; }

.fv-sidebar-footer {
  position: relative;
  margin-top: auto;
  margin-left: -12px;
  margin-right: -12px;
  margin-bottom: -16px;
  padding: 0 12px 16px;
  overflow: hidden;
  border-radius: 0;
}

.fv-sidebar-landscape {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  pointer-events: none;
  z-index: 0;
}

.fv-sidebar-landscape .fv-landscape-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.fv-sidebar.collapsed .fv-sidebar-contact {
  display: none;
}

.fv-sidebar.collapsed .fv-sidebar-landscape {
  height: 96px;
  opacity: 0.7;
}

.fv-sidebar-contact {
  position: relative;
  z-index: 1;
  margin-top: 72px;
  padding: 14px 12px;
  border-radius: var(--fv-radius);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(13, 42, 33, 0.72);
  backdrop-filter: blur(2px);
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.fv-sidebar-contact-title {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
  color: #fff;
}

.fv-sidebar-contact p { margin: 0 0 10px; color: rgba(255, 255, 255, 0.78); }

.fv-sidebar-contact a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.fv-sidebar-contact a:hover { color: #fff; }

.fv-sidebar-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: #25D366;
  color: #053b1d !important;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none !important;
}

.fv-sidebar-chat:hover { filter: brightness(1.05); color: #053b1d !important; }

.fv-sidebar-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: #bbf7d0 !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
}

.fv-sidebar-home:hover { color: #fff !important; }

.fv-quick-icon.c-green { color: #2f7d3a; }
.fv-quick-icon.c-blue { color: #1f63b0; }
.fv-quick-icon.c-red { color: #c0392b; }
.fv-quick-icon.c-yellow { color: #caa018; }
.fv-quick-icon.c-purple { color: #7a3b8f; }
.fv-quick-icon.c-teal { color: #0f766e; }

.fv-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 35;
  border: none;
  cursor: pointer;
}

/* ── Main ── */
.fv-main {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--fv-bg);
  padding: var(--fv-space-6) var(--fv-space-8) var(--fv-space-10);
  max-width: none;
  width: 100%;
}

/* Layout-owned page chrome: banner is edge-to-edge under the topbar */
.fv-main-flush {
  padding: 0 !important;
}

/* Content region: padded for pages without FarmerPageFrame; flush when hero page owns chrome */
.fv-content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
}

.fv-main-flush > .fv-content {
  max-width: none;
}

.fv-main-flush:not(:has(.fv-page)) > .fv-content {
  padding: var(--fv-space-6) var(--fv-space-8) var(--fv-space-10);
  max-width: 1440px;
}

/* Opt-in PageHeader (non-hero) */
.page-header {
  margin-bottom: var(--fv-space-6);
}

.page-header-main {
  display: flex;
  align-items: flex-start;
  gap: var(--fv-space-4);
}

.page-header-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--fv-radius-sm);
  background: var(--fv-primary-soft);
  color: var(--fv-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-header-text {
  min-width: 0;
  flex: 1;
}

.page-header-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fv-text-primary);
  line-height: 1.25;
}

.page-header-subtitle {
  margin: var(--fv-space-2) 0 0;
  font-size: 0.9rem;
  color: var(--fv-text-secondary);
  line-height: 1.45;
  max-width: 42rem;
}

.page-header-breadcrumb {
  margin-bottom: var(--fv-space-2);
  font-size: 0.78rem;
  color: var(--fv-subtle);
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fv-space-2);
  align-items: center;
  margin-left: auto;
}

/* Optional content surfaces — use when wrapping existing content */
.page-card,
.section-card,
.content-panel {
  background: var(--fv-surface);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius);
  box-shadow: var(--fv-shadow);
  padding: var(--fv-space-5) var(--fv-space-6);
}

.section-card { margin-bottom: var(--fv-space-6); }

.fv-grid {
  display: grid;
  gap: var(--fv-space-4);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.fv-grid-full { grid-column: 1 / -1; }
.fv-grid-8 { grid-column: span 8; }
.fv-grid-6 { grid-column: span 6; }
.fv-grid-4 { grid-column: span 4; }
.fv-grid-3 { grid-column: span 3; }

@media (max-width: 900px) {
  .fv-grid-8,
  .fv-grid-6,
  .fv-grid-4,
  .fv-grid-3 { grid-column: 1 / -1; }

  .fv-main-flush:not(:has(.fv-page)) > .fv-content {
    padding: var(--fv-space-5) var(--fv-space-4) var(--fv-space-8);
  }
}

.fv-page {
  --fv-page-head-h: 8.25rem;
  min-height: calc(100vh - var(--fv-topbar-h));
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* Dashboard hero: inset rounded card under the topbar (matches reference layout) */
.fv-page > .fv-page-head,
.fv-page > .fv-page-head-hero {
  position: relative;
  top: auto;
  z-index: 1;
  margin: 1.15rem 32px 0;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 61, 46, 0.2);
}

.fv-page > .fv-page-head-docked {
  position: sticky;
  top: var(--fv-topbar-h);
  z-index: 25;
  margin: 0;
  border-radius: 0;
  min-height: 4.75rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.fv-page-head-text {
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.fv-page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
  margin-right: min(28%, 220px);
  align-items: center;
  position: relative;
  z-index: 1;
}

.fv-page-head-actions .fv-btn-primary,
.fv-page-head-actions .wf-btn-primary {
  background: #fff;
  border-color: #fff;
  color: #0F3D2E;
}

.fv-page-head-actions .fv-btn-outline,
.fv-page-head-actions .wf-btn-outline,
.fv-page-head-actions .wf-btn-ghost-white {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}

.fv-page-head-actions a,
.fv-page-head-actions button {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
}

.fv-page-body {
  padding: 1.35rem 32px 48px;
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.fv-page--chrome-only > .fv-page-body {
  padding-top: 0.35rem;
}

.fv-page-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0 0 0.85rem;
}

.fv-page-body.fv-page-body-flush {
  padding: 0;
}

/* Nested legacy wrappers should not add a second padding layer */
.fv-page-body > .fv-field-details-body,
.fv-page-body > .fo-dash-body {
  padding: 0;
}

/* Full-bleed content inside the farmer shell (no narrow centered column) */
.fv-main .page-container,
.fv-main .fi-hero-inner,
.fv-main .fi-container,
.fv-main .fm-hero-inner,
.fv-main .fm-stats,
.fv-main .fm-container,
.fv-main .fd-container,
.fv-main .ev-hero-inner,
.fv-main .ev-stats,
.fv-main .ev-container,
.fv-main .bf-hero-inner,
.fv-main .bf-stats-inner,
.fv-main .bf-container,
.fv-main .gc-shell,
.fv-main .fac-page,
.fv-main .fv-profile-card,
.fv-main .fi-hero,
.fv-main .fm-hero,
.fv-main .ev-hero {
  max-width: none !important;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.fv-main .page-container {
  padding-left: 0;
  padding-right: 0;
}

.fv-main .fi-hero,
.fv-main .fm-hero,
.fv-main .ev-hero {
  display: none; /* replaced by FarmerPageFrame banner */
}

.fv-main-wrap { padding: 28px 32px; }

.fv-loading {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--fv-muted);
  font-weight: 500;
}

.fv-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--fv-border);
  border-top-color: var(--fv-primary);
  border-radius: 50%;
  animation: fv-spin 0.65s linear infinite;
}

@keyframes fv-spin { to { transform: rotate(360deg); } }

@keyframes fv-fade-in {
  from { transform: translateY(4px); }
  to { transform: none; }
}

.fv-main > * { animation: fv-fade-in 0.28s ease; }

/* ── Buttons ── */
.fv-btn-primary,
.fv-btn-secondary,
.fv-btn-outline,
.fv-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--fv-radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.fv-btn-primary {
  background: var(--fv-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(23, 71, 158, 0.2);
}

.fv-btn-primary:hover { background: var(--fv-primary-hover); }

.fv-btn-secondary {
  background: var(--fv-primary-soft);
  color: var(--fv-primary);
}

.fv-btn-secondary:hover { background: var(--fv-primary-mid); }

.fv-btn-outline {
  background: #fff;
  color: var(--fv-text);
  border-color: var(--fv-border-strong);
}

.fv-btn-outline:hover {
  border-color: var(--fv-primary);
  color: var(--fv-primary);
  background: var(--fv-primary-soft);
}

.fv-btn-ghost {
  background: transparent;
  color: var(--fv-muted);
  height: 32px;
  padding: 0 10px;
}

.fv-btn-ghost:hover {
  background: var(--fv-bg);
  color: var(--fv-text);
}

.fv-btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

/* ── Alert ── */
.fv-banner {
  border-radius: var(--fv-radius);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
}

.fv-banner.warn {
  background: var(--fv-warning-soft);
  border-color: #FDE68A;
  color: #92400E;
}

.fv-banner.info {
  background: var(--fv-primary-soft);
  border-color: var(--fv-primary-mid);
  color: #1E3A8A;
}

.fv-banner p { margin: 4px 0 0; font-size: 13px; }

.fv-alert-card {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid #FDE68A;
  border-radius: var(--fv-radius);
  padding: 14px 16px;
  margin-bottom: 24px;
  box-shadow: var(--fv-shadow);
}

.fv-alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--fv-warning-soft);
  color: var(--fv-warning);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fv-alert-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.fv-alert-title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--fv-text);
}

.fv-alert-meta {
  margin: 0;
  font-size: 13px;
  color: var(--fv-muted);
}

.fv-alert-meta strong { color: var(--fv-text); font-weight: 600; }

.fv-alert-progress { margin-top: 10px; max-width: 360px; }

.fv-progress-track {
  height: 4px;
  background: #F1F5F9;
  border-radius: 999px;
  overflow: hidden;
}

.fv-progress-fill {
  height: 100%;
  background: #F59E0B;
  border-radius: 999px;
}

.fv-alert-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--fv-muted);
}

.fv-alert-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.fv-badge.warn { background: #FEF3C7; color: #B45309; }
.fv-badge.success { background: var(--fv-success-soft); color: var(--fv-success); }
.fv-badge.info { background: var(--fv-primary-soft); color: var(--fv-primary); }
.fv-badge.neutral { background: #F1F5F9; color: var(--fv-muted); }

/* ── Page header / hero ── */
.fv-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.fv-hero::before { display: none; }

.fv-hero-greeting {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.035em;
  color: var(--fv-text);
  line-height: 1.15;
}

.fv-hero-sub {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fv-primary);
}

.fv-hero-desc {
  margin: 0;
  font-size: 13px;
  color: var(--fv-muted);
  max-width: 560px;
}

.fv-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.fv-hero-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--fv-muted);
  white-space: nowrap;
}

.fv-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: none;
}

.fv-hero-ctas .fv-btn-primary,
.fv-hero-ctas .fv-btn-outline {
  flex: 0 0 auto;
  min-width: 0;
}

/* ── Sections ── */
.fv-section { margin-bottom: 28px; }

.fv-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.fv-section-title,
.fv-section-label {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--fv-text);
}

.fv-section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--fv-primary);
  text-decoration: none;
}

.fv-section-link:hover { text-decoration: underline; }

button.fv-section-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

/* Quick actions — reference command strip */
.fv-quick-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.fv-quick-grid-react {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.fv-quick-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--fv-card);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--fv-shadow);
  min-height: 72px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.fv-quick-card:hover {
  border-color: var(--fv-primary-mid);
  box-shadow: var(--fv-shadow-md);
  transform: translateY(-1px);
}

.fv-quick-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fv-primary-soft);
  color: var(--fv-primary);
  flex-shrink: 0;
}

.fv-quick-icon.c-green { background: #E8F5EC; color: #2f7d3a; }
.fv-quick-icon.c-blue { background: #E8F1FB; color: #1f63b0; }
.fv-quick-icon.c-red { background: #FDECEC; color: #c0392b; }
.fv-quick-icon.c-yellow { background: #FFF7E6; color: #caa018; }
.fv-quick-icon.c-purple { background: #F3E8F8; color: #7a3b8f; }
.fv-quick-icon.c-teal { background: #E6F7F4; color: #0F766E; }

.fv-quick-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fv-quick-card strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--fv-text);
  line-height: 1.3;
}

.fv-quick-card span {
  font-size: 11px;
  color: var(--fv-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fv-quick-chevron {
  color: var(--fv-subtle);
  flex-shrink: 0;
}

/* ── KPI metrics ── */
.fv-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.fv-metric-card {
  background: var(--fv-card);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius);
  padding: 16px;
  box-shadow: var(--fv-shadow);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.fv-metric-card:hover {
  border-color: var(--fv-border-strong);
  box-shadow: var(--fv-shadow-md);
}

.fv-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fv-metric-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fv-primary-soft);
  color: var(--fv-primary);
}

.fv-metric-icon.success { background: var(--fv-success-soft); color: var(--fv-success); }
.fv-metric-icon.warning { background: var(--fv-warning-soft); color: var(--fv-warning); }

.fv-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fv-muted);
}

.fv-trend.up { color: var(--fv-success); }
.fv-trend.flat { color: var(--fv-subtle); }

.fv-metric-value {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--fv-text);
  line-height: 1.1;
  margin-bottom: 2px;
}

.fv-metric-label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--fv-text);
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.fv-metric-sub {
  font-size: 11px;
  color: var(--fv-subtle);
  margin: 0;
}

.fv-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
  margin-top: 10px;
  opacity: 0.7;
}

.fv-sparkline span {
  flex: 1;
  border-radius: 1px;
  background: var(--fv-primary-mid);
  min-height: 3px;
}

.fv-stat-box {
  background: var(--fv-card);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius);
  padding: 16px;
  text-align: left;
}

.fv-stat-box strong {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--fv-text);
}

.fv-stat-box span {
  font-size: 12px;
  font-weight: 500;
  color: var(--fv-muted);
}

/* ── Farms ── */
.fv-farms-block { margin-bottom: 28px; }

.fv-farm-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fv-farm-card-h {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: var(--fv-card);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius);
  padding: 16px 18px;
  box-shadow: var(--fv-shadow-md);
}

.fv-farm-thumb {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: linear-gradient(145deg, #E8F5EC, #D9F0E3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fv-primary);
}

.fv-farm-body-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.fv-farm-body h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.fv-farm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fv-farm-meta-ref {
  gap: 20px;
}

.fv-farm-meta li {
  font-size: 11px;
  color: var(--fv-subtle);
}

.fv-farm-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fv-text);
  margin-top: 1px;
}

.fv-farm-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 110px;
}

.fv-farm-actions-row {
  flex-direction: row;
  align-items: center;
  min-width: 0;
}

.fv-crop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.fv-crop-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: var(--fv-card);
  border: 1px solid var(--fv-border);
  border-left: 3px solid var(--crop-accent, var(--fv-success));
  border-radius: var(--fv-radius);
  padding: 12px 14px;
}

.fv-crop-emoji {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--fv-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.fv-crop-row h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 650;
}

.fv-crop-row p {
  margin: 0;
  font-size: 12px;
  color: var(--fv-muted);
}

.fv-crop-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 650;
  color: var(--fv-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.fv-empty-card,
.fv-crop-card.empty {
  background: var(--fv-card);
  border: 1px dashed var(--fv-border-strong);
  border-radius: var(--fv-radius);
  padding: 28px 20px;
  text-align: center;
  color: var(--fv-muted);
}

.fv-farm-pills { display: none; }
.fv-farm-row { display: none; }

/* ── Weather ── */
.fv-activities {
  background: var(--fv-card);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius);
  padding: 18px 20px 20px;
  margin-bottom: 28px;
  box-shadow: var(--fv-shadow);
}

.fv-activities > .fv-section-head { margin-bottom: 4px; }

.fv-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--fv-border);
}

.fv-tabs button {
  border: none;
  background: transparent;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--fv-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.fv-tabs button.active {
  color: var(--fv-primary);
  border-bottom-color: var(--fv-primary);
  font-weight: 650;
}

.fv-range-toggle {
  display: inline-flex;
  gap: 2px;
  background: var(--fv-bg);
  padding: 3px;
  border-radius: var(--fv-radius-sm);
  margin-bottom: 16px;
  border: 1px solid var(--fv-border);
}

.fv-range-toggle button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  color: var(--fv-muted);
  cursor: pointer;
}

.fv-range-toggle button.active {
  background: #fff;
  color: var(--fv-text);
  box-shadow: var(--fv-shadow);
  font-weight: 650;
}

.fv-weather-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 16px;
}

.fv-weather-today {
  padding: 16px;
  border-radius: var(--fv-radius);
  background: var(--fv-bg);
  border: 1px solid var(--fv-border);
}

.fv-weather-hero {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.fv-weather-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--fv-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fv-primary);
}

.fv-temp {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--fv-text);
  line-height: 1;
}

.fv-temp span {
  font-size: 13px;
  font-weight: 500;
  color: var(--fv-muted);
}

.fv-weather-hero p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--fv-muted);
}

.fv-hi-lo { font-weight: 600 !important; color: var(--fv-text) !important; }

.fv-weather-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fv-weather-metric {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid var(--fv-border);
}

.fv-weather-metric dt {
  margin: 0;
  font-size: 11px;
  color: var(--fv-subtle);
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.fv-weather-metric dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--fv-text);
}

.fv-weather-extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.fv-weather-extra {
  font-size: 12px;
  color: var(--fv-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.fv-weather-extra strong { color: var(--fv-text); font-weight: 600; }

.fv-field-condition {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--fv-border);
  font-size: 12px;
  color: var(--fv-muted);
}

.fv-field-condition strong { color: var(--fv-success); font-weight: 650; }

.fv-forecast-panel h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 650;
  color: var(--fv-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fv-day-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  margin-bottom: 14px;
  padding: 8px;
  background: var(--fv-bg);
  border-radius: 8px;
  border: 1px solid var(--fv-border);
}

.fv-day-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}

.fv-bar {
  width: 55%;
  max-width: 20px;
  background: var(--fv-primary);
  border-radius: 3px 3px 1px 1px;
  min-height: 4px;
  opacity: 0.85;
}

.fv-day-bar span {
  font-size: 10px;
  font-weight: 600;
  color: var(--fv-subtle);
}

.fv-hourly {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.fv-hourly-item {
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  background: var(--fv-bg);
  border: 1px solid var(--fv-border);
  font-size: 10px;
  color: var(--fv-muted);
}

.fv-hourly-item strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--fv-text);
  margin: 2px 0;
}

.fv-timeline { display: flex; flex-direction: column; }

.fv-timeline-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  padding-bottom: 12px;
  position: relative;
}

.fv-timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: 0;
  width: 1.5px;
  background: var(--fv-border);
}

.fv-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 3px;
  background: var(--fv-primary);
}

.fv-timeline-dot.tomorrow { background: #F59E0B; }
.fv-timeline-dot.upcoming { background: var(--fv-subtle); }

.fv-timeline-item strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
}

.fv-timeline-item p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--fv-muted);
}

.fv-climate-alert {
  background: var(--fv-warning-soft);
  border: 1px solid #FDE68A;
  color: #92400E;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin: 14px 0 8px;
}

.fv-water-demand {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: var(--fv-primary-soft);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 8px;
}

.fv-water-demand span { color: var(--fv-muted); }
.fv-water-demand strong { color: var(--fv-primary); }

.fv-advice-toggle {
  border: none;
  background: transparent;
  color: var(--fv-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 4px;
}

.fv-advice p {
  margin: 0;
  font-size: 13px;
  color: var(--fv-muted);
  line-height: 1.5;
  background: var(--fv-bg);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--fv-border);
}

.fv-carbon-panel { padding: 4px 0; }

.fv-carbon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.fv-carbon-stat {
  background: var(--fv-bg);
  border: 1px solid var(--fv-border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.fv-carbon-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--fv-text);
}

.fv-carbon-stat span {
  font-size: 11px;
  color: var(--fv-muted);
}

.fv-muted {
  font-size: 13px;
  color: var(--fv-muted);
  line-height: 1.5;
  margin: 0 0 12px;
}

/* ── Farm info ── */
.fv-info-panel {
  background: var(--fv-card);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius);
  padding: 20px;
  box-shadow: var(--fv-shadow);
}

.fv-info-panel h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
}

.fv-info-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.fv-info-dl dt {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--fv-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fv-info-dl dd {
  margin: 3px 0 0;
  font-weight: 600;
  font-size: 13px;
}

/* ── Bankability ── */
.fv-bankability { margin-top: 4px; }

.fv-bank-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 1100px) {
  .fv-bank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.fv-bank-grid .fd-card {
  height: 100%;
  background: var(--fv-card);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius);
  padding: 16px;
  box-shadow: var(--fv-shadow);
}

.fv-bank-grid .fd-card:hover {
  border-color: var(--fv-border-strong);
  box-shadow: var(--fv-shadow-md);
}

.fv-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.fv-quick-links a {
  font-size: 12px;
  font-weight: 600;
  color: var(--fv-text);
  text-decoration: none;
  background: var(--fv-card);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius-sm);
  padding: 8px 12px;
}

.fv-quick-links a:hover {
  border-color: var(--fv-primary);
  color: var(--fv-primary);
  background: var(--fv-primary-soft);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .fv-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .fv-stats-strip { grid-template-columns: repeat(2, 1fr); }
  .fv-weather-layout { grid-template-columns: 1fr; }
  .fv-hero { flex-direction: column; }
  .fv-hero-ctas { justify-content: flex-start; }
  .fv-page-head-actions { margin-right: 0; }
  .fv-page > .fv-page-head,
  .fv-page > .fv-page-head-hero { margin-left: 1rem; margin-right: 1rem; }
}

@media (max-width: 720px) {
  .fv-page-head-art { display: none; }
  .fv-page-head,
  .fv-page-head-hero { min-height: 0; }
}

@media (max-width: 900px) {
  .fv-collapse-btn { display: none; }
  .fv-mobile-nav-btn { display: inline-flex; }

  .fv-workspace,
  .fv-workspace.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .fv-sidebar {
    position: fixed;
    left: 0;
    top: var(--fv-topbar-h);
    width: min(280px, 88vw);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.12);
  }

  .fv-sidebar.mobile-open { transform: translateX(0); }

  .fv-sidebar.collapsed .fv-profile-text,
  .fv-sidebar.collapsed .fv-nav-label,
  .fv-sidebar.collapsed .fv-nav-group-title,
  .fv-sidebar.collapsed .fv-sidebar-contact {
    display: block;
  }

  .fv-sidebar.collapsed .fv-nav-item {
    justify-content: flex-start;
    padding: 8px 10px;
  }

  .fv-sidebar-overlay.open { display: block; }

  .fv-location .fv-loc-text { display: none; }
  .fv-profile-chip .fv-chip-name { display: none; }
  .fv-main { padding: 20px 16px 40px; }
  .fv-main-flush { padding: 0 !important; }
  .fv-page-body { padding: 1rem 16px 40px; }

  .fv-alert-card { grid-template-columns: 40px 1fr; }
  .fv-alert-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .fv-farm-card-h { grid-template-columns: 64px 1fr; }
  .fv-farm-thumb { width: 56px; height: 56px; border-radius: 999px; }
  .fv-farm-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .fv-hourly { grid-template-columns: repeat(3, 1fr); }
  .fv-quick-grid,
  .fv-quick-grid-react { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .fv-stats-strip { grid-template-columns: 1fr; }
  .fv-hero-greeting { font-size: 22px; }
  .fv-weather-metrics { grid-template-columns: 1fr; }
  .fv-carbon-grid { grid-template-columns: 1fr; }
  .fv-crop-row { grid-template-columns: 44px 1fr; }
  .fv-crop-row .fv-btn-primary { grid-column: 1 / -1; }
}

/* Crop selection */
.fv-crop-row { cursor: pointer; }
.fv-crop-row.selected {
  outline: 2px solid var(--fv-accent, #2d6a4f);
  outline-offset: 2px;
}

/* Upcoming tasks */
.fv-tasks { margin: 1.25rem 0; }
.fv-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.fv-task-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.fv-task-list strong { display: block; font-size: 0.9rem; }
.fv-task-list span { font-size: 0.75rem; color: #64748b; }
.fv-task-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.35rem;
  flex-shrink: 0;
}
.fv-task-dot.this-week { background: #ea580c; }
.fv-task-dot.next-week { background: #16a34a; }
.fv-task-dot.later { background: #64748b; }

/* Fields — NDVI greenness */
.fv-fields { margin: 1.5rem 0; }
.fv-fields-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.fv-icon-round {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.fv-icon-round:disabled { opacity: 0.4; cursor: default; }
.fv-pill-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}
.fv-pill-btn-primary {
  background: #17479e;
  border-color: #17479e;
  color: #fff;
}
.fv-ndvi-panel {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  padding: 1rem 1.15rem 1.15rem;
}
.fv-ndvi-legend {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #475569;
  margin-bottom: 0.85rem;
}
.fv-ndvi-chart {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.fv-ndvi-row {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fv-ndvi-row:hover,
.fv-ndvi-row.active {
  border-color: #2d6a4f;
  box-shadow: 0 6px 18px rgba(45, 106, 79, 0.1);
  background: #fff;
}
.fv-ndvi-row-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}
.fv-ndvi-row-head span { color: #64748b; }
.fv-ndvi-row-head em {
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fv-ndvi-track {
  height: 0.55rem;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.fv-ndvi-fill {
  height: 100%;
  border-radius: 999px;
  background: #94a3b8;
  transition: width 0.35s ease;
}
.fv-ndvi-fill.good { background: linear-gradient(90deg, #16a34a, #22c55e); }
.fv-ndvi-fill.fair { background: linear-gradient(90deg, #ca8a04, #eab308); }
.fv-ndvi-fill.poor { background: linear-gradient(90deg, #c2410c, #f97316); }
.fv-ndvi-fill.muted { background: #cbd5e1; width: 8% !important; }
.fv-ndvi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.fv-ndvi-chip {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}
.fv-ndvi-chip.ok { background: #dcfce7; color: #166534; }
.fv-ndvi-chip.warn { background: #fef3c7; color: #92400e; }
.fv-ndvi-chip.link {
  background: #dbeafe;
  color: #1d4ed8;
  margin-left: auto;
}
.fv-ndvi-footnote {
  margin: 0.9rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.45;
}
.fv-ndvi-footnote code {
  font-size: 0.7rem;
  background: #f1f5f9;
  padding: 0.05rem 0.3rem;
  border-radius: 0.25rem;
}

/* Field details */
.fv-field-details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
}
.fv-field-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.fv-field-summary > div {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
}
.fv-field-summary span {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 0.2rem;
}
.fv-field-summary strong {
  font-size: 0.95rem;
  color: #0f172a;
}
.fv-pais-history { margin-bottom: 2rem; }
.fv-pais-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.fv-pais-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.85rem;
  overflow: hidden;
}
.fv-pais-card.open {
  border-color: #17479e;
  box-shadow: 0 8px 20px rgba(23, 71, 158, 0.08);
}
.fv-pais-card-head {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
  background: #f8fafc;
}
.fv-pais-card-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.85rem 0.65rem 0.85rem 1rem;
  cursor: pointer;
  color: inherit;
}
.fv-pais-card-toggle strong {
  display: block;
  font-size: 0.92rem;
}
.fv-pais-card-toggle span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #64748b;
}
.fv-pais-card-toggle em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  color: #17479e;
  flex-shrink: 0;
}
.fv-pais-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 0;
  flex-shrink: 0;
}
.fv-pais-delete svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}
.fv-pais-delete:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.14);
  color: #dc2626;
}
.fv-pais-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.fv-pais-delete-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(248, 113, 113, 0.25);
  background: #fef2f2;
}
.fv-pais-delete-confirm p {
  margin: 0;
  font-size: 0.8rem;
  color: #991b1b;
  font-weight: 600;
}
.fv-pais-delete-confirm > div {
  display: flex;
  gap: 0.4rem;
}
.fv-pais-delete-confirm button {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
  border-radius: 0.45rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.fv-pais-delete-confirm button.danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}
.fv-pais-card-body {
  margin: 0;
  padding: 0.9rem 1rem 1.05rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  color: #0f172a;
}
@media (max-width: 720px) {
  .fv-field-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Inventory (legacy unused) */
.fv-inventory { margin: 1.5rem 0 2rem; }
.fv-inventory-banner {
  background: #fff;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  text-align: center;
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 1rem;
}
.fv-inventory-banner h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.fv-inventory-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 1rem;
}
.fv-inventory-records {
  background: #fff;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.fv-inventory-records h3 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.fv-inventory-records p { font-size: 0.8rem; color: #64748b; margin: 0 0 0.75rem; }
.fv-inventory-main {
  background: #fff;
  border-radius: 1rem;
  padding: 1rem 1.15rem 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.fv-inventory-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.fv-inventory-metrics span {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
}
.fv-inventory-metrics strong { font-size: 0.9rem; }
.fv-mini-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  margin-top: 0.35rem;
  overflow: hidden;
}
.fv-mini-bar span {
  display: block;
  height: 100%;
  background: #22c55e;
}
.fv-inventory-visual { margin: 0.75rem 0; }
.fv-inventory-map {
  height: 140px;
  border-radius: 0.75rem;
  background:
    linear-gradient(160deg, rgba(37, 99, 235, 0.35), rgba(15, 23, 42, 0.2)),
    #1e3a5f;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
}
.fv-inventory-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  background: #1e3a5f;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 0.5rem;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  margin-bottom: 0.65rem;
}
.fv-inventory-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1rem;
}
.fv-inventory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.fv-act-pais,
.fv-act-sell,
.fv-act-aid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  color: #fff;
}
.fv-act-pais { background: #2563eb; }
.fv-act-sell { background: #0d9488; }
.fv-act-aid { background: #1d4ed8; }

/* PAIS modal */
.fv-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 80;
}
.fv-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 92vw);
  max-height: min(80vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 1rem;
  z-index: 90;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}
.fv-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.fv-modal-head-accent {
  background: #0d2235;
  color: #fff;
  border-bottom: none;
  border-radius: 1rem 1rem 0 0;
  align-items: center;
}
.fv-modal-head-accent .fv-modal-kicker { color: rgba(255, 255, 255, 0.75); margin: 0; }
.fv-modal-head-accent h2 { color: #fff; }
.fv-modal-head-accent .fv-icon-round {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.fv-modal-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.fv-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #7a3b8f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.fv-modal-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  color: #64748b;
}
.fv-modal-head h2 { margin: 0; font-size: 1.15rem; }
.fv-modal-body { padding: 1rem 1.25rem 1.35rem; }
.fv-profile-modal .fv-modal-body {
  background: #f5ebe0;
  border-radius: 0 0 1rem 1rem;
}
.fv-profile-card {
  background: #fff;
  border-radius: 0.85rem;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.fv-profile-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  color: #0d2235;
}
.fv-profile-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #334155;
}
.fv-carbon-val { color: #0f8d5e; }
.fv-profile-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.fv-plan-month {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}
.fv-plan-month h3 { margin: 0 0 0.4rem; font-size: 0.9rem; }
.fv-plan-month ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: #334155;
}

/* ── Full farm profile (registration read-out) ── */
.fv-farm-profile {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.fv-farm-profile-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.fv-farm-profile-doc {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fv-farm-profile-empty {
  background: #fff;
  border-radius: 0.85rem;
  padding: 1.5rem 1.35rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.fv-farm-profile-empty h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: #0d2235;
}

.fv-farm-profile-empty p {
  margin: 0 0 1rem;
  color: #64748b;
  font-size: 0.9rem;
}

.fv-farm-profile-header {
  background:
    linear-gradient(135deg, rgba(15, 61, 46, 0.06), rgba(15, 141, 94, 0.04)),
    #fff;
  border-radius: 0.85rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 1.15rem;
  border: 1px solid rgba(15, 61, 46, 0.08);
}

.fv-farm-profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.fv-farm-profile-avatar {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0F3D2E, #1B7A4E);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(15, 61, 46, 0.22);
}

.fv-farm-profile-label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.fv-farm-profile-header h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #0d2235;
}

.fv-farm-profile-meta {
  margin: 0.45rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fv-farm-profile-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eef6f1;
  color: #0F3D2E;
  font-size: 0.75rem;
  font-weight: 600;
}

.fv-farm-profile-pill--status {
  background: #fff7ed;
  color: #9a3412;
}

.fv-farm-profile-metrics {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.75rem;
}

.fv-farm-profile-metric {
  display: flex !important;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.8rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid #e8eef0;
}

.fv-farm-profile-metric-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  display: grid;
  place-items: center;
  background: #e8f5ec;
  color: #0F6B3C;
  flex-shrink: 0;
}

.fv-farm-profile-metric dt {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
  margin: 0 0 0.15rem;
}

.fv-farm-profile-metric dd {
  margin: 0;
  font-size: 0.9rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.fv-farm-profile-meter {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 4.5rem;
  height: 1.35rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.fv-farm-profile-meter::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pct, 0%);
  background: linear-gradient(90deg, #0F6B3C, #22c55e);
}

.fv-farm-profile-meter span {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  color: #0f172a;
}

.fv-farm-profile-section {
  background: #fff;
  border-radius: 0.85rem;
  padding: 1.15rem 1.35rem 1.25rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.fv-farm-profile-section h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  color: #0d2235;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fv-farm-profile-sec-ico {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  display: inline-grid;
  place-items: center;
  background: #e8f5ec;
  color: #0F6B3C;
  flex-shrink: 0;
}

.fv-farm-profile-section h4 {
  margin: 1rem 0 0.45rem;
  font-size: 0.85rem;
  color: #334155;
}

.fv-farm-profile-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0;
}

.fv-farm-profile-dl dt {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
}

.fv-farm-profile-dl dd {
  margin: 0;
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.45;
  word-break: break-word;
}

.fv-farm-profile-list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.55;
}

.fv-farm-profile-list a {
  margin-left: 0.4rem;
  color: #0f8d5e;
  font-weight: 500;
  text-decoration: none;
}

.fv-farm-profile-list a:hover {
  text-decoration: underline;
}

.fv-farm-profile-verified {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #0f8d5e;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fv-farm-profile-signature {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #e2e8f0;
}

.fv-farm-profile-signature h4 {
  margin-top: 0;
}

.fv-farm-profile-signature-img {
  display: block;
  max-width: min(28rem, 100%);
  max-height: 8rem;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.fv-farm-profile-signature-typed {
  margin: 0;
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 1.5rem;
  color: #0f172a;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  display: inline-block;
  min-width: 12rem;
}

.fv-farm-profile-muted {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .fv-inventory-grid { grid-template-columns: 1fr; }
}

@media print {
  @page {
    margin: 12mm;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .no-print,
  .fo-aside,
  .fo-dash-overlay,
  .fo-header-fixed,
  .fo-top,
  .fo-page-desc,
  .fv-sidebar,
  .fv-sidebar-overlay,
  .fv-topbar,
  .fv-header,
  .fv-page-head,
  .fv-page-toolbar,
  .fv-page-chrome,
  .dashboard-page-chrome,
  .fv-sidebar-contact,
  .mud-snackbar-provider {
    display: none !important;
  }

  .fo-shell,
  .fo-main,
  .fo-workspace,
  .fo-workspace-main,
  .fo-layout-root,
  .fv-workspace,
  .fv-main,
  .fv-main-wrap,
  .fv-page,
  .fv-page-body,
  .page-container,
  .fv-shell {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    grid-template-columns: 1fr !important;
  }

  .fv-farm-profile {
    gap: 0.75rem;
  }

  .fv-farm-profile-header,
  .fv-farm-profile-section,
  .fv-farm-profile-empty {
    box-shadow: none !important;
    border: 1px solid #d1d5db;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .fv-farm-profile-signature-img {
    max-height: 6rem;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  a[href]::after {
    content: none !important;
  }
}

/* ── Sell produce page ── */
.sp-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.sp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.sp-facility-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #a7f3d0;
}

.sp-facility-banner-ico {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  background: #d1fae5;
  color: #047857;
  flex-shrink: 0;
}

.sp-facility-banner-copy {
  flex: 1;
  min-width: 0;
}

.sp-facility-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #047857;
}

.sp-facility-banner-copy strong {
  display: block;
  margin-top: 0.15rem;
  color: #064e3b;
  font-size: 1rem;
}

.sp-facility-banner-copy p {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #065f46;
  line-height: 1.45;
}

.sp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 1rem;
  align-items: start;
  width: 100%;
}

.sp-layout > .sp-card {
  min-width: 0;
}

.sp-form-card,
.sp-list-card {
  display: flex;
  flex-direction: column;
}

.sp-card {
  background: #fff;
  border-radius: 0.85rem;
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.sp-card-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #eef2f5;
}

.sp-card-ico {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  display: grid;
  place-items: center;
  background: #e8f5ec;
  color: #0F6B3C;
  flex-shrink: 0;
}

.sp-card-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #0d2235;
}

.sp-card-head p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
}

.sp-photo-field {
  margin: 0 0 1rem;
}

.sp-photo-field > label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sp-photo-row {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.sp-photo-preview {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid #d7e0e6;
  background: #f8fafc;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.sp-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-photo-preview.is-empty {
  color: #94a3b8;
}

.sp-photo-actions {
  flex: 1;
  min-width: 0;
}

.sp-photo-actions p {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
}

.sp-photo-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sp-upload-btn {
  position: relative;
  cursor: pointer;
}

.sp-upload-btn.is-disabled {
  opacity: 0.65;
  pointer-events: none;
}

.sp-listing-thumb {
  width: 3rem;
  height: 3rem;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #e8f5ec;
  color: #0F6B3C;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid #dcefe3;
}

.sp-listing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-listing-thumb.is-empty {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}

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

.sp-field-full {
  grid-column: 1 / -1;
}

.sp-demand-panel {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #a7f3d0;
}

.sp-intake-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.sp-intake-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.sp-intake-tag:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

textarea.sp-input {
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.45;
}

.sp-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sp-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.45rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d7e0e6;
  border-radius: 0.65rem;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.9rem;
}

.sp-input:focus {
  outline: none;
  border-color: #0F6B3C;
  box-shadow: 0 0 0 3px rgba(15, 107, 60, 0.12);
}

.sp-field.is-invalid .sp-input {
  border-color: #f59e0b;
}

.sp-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0.85rem;
  font-size: 0.9rem;
  color: #0f172a;
  font-weight: 500;
}

.sp-carbon-note {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.85rem;
  border-radius: 0.7rem;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
}

.sp-carbon-ico {
  color: #15803d;
  margin-top: 0.1rem;
}

.sp-carbon-note p {
  margin: 0;
  font-size: 0.82rem;
  color: #166534;
  line-height: 1.45;
}

.sp-error {
  margin: 0.5rem 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0.55rem;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.85rem;
}

.sp-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.sp-muted {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.sp-empty {
  text-align: center;
  padding: 1.75rem 1rem;
}

.sp-empty-ico {
  display: inline-grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  background: #e8f5ec;
  color: #0F6B3C;
}

.sp-empty strong {
  display: block;
  color: #0d2235;
  font-size: 1rem;
}

.sp-empty p {
  margin: 0.4rem auto 0;
  max-width: 18rem;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.45;
}

.sp-listing-list {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sp-listing-list > li {
  list-style: none !important;
}

.sp-listing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #eef2f5;
}

.sp-listing-row.is-unavailable {
  opacity: 0.72;
}

.sp-listing-row.is-focus {
  border-color: #86efac;
  background: #f0fdf4;
  box-shadow: 0 0 0 1px rgba(22, 101, 52, 0.12);
}

.sp-listing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.sp-report-item {
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  border: 1px solid #eef2f5;
  background: #f8fafc;
  overflow: hidden;
}

.sp-report-item > .sp-listing-row {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sp-report-item.is-open {
  border-color: #86efac;
  background: #f0fdf4;
}

.sp-report-detail {
  margin: 0;
  padding: 0.9rem 1rem 1.05rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #334155;
}

.sp-confirm-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-top: 1px solid #fecaca;
  background: #fef2f2;
}

.sp-confirm-bar p {
  margin: 0;
  font-size: 0.85rem;
  color: #7f1d1d;
  font-weight: 600;
}

.sp-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

@media (max-width: 640px) {
  .sp-listing-actions {
    justify-content: stretch;
  }

  .sp-listing-actions .dash-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.sp-listing-main {
  flex: 1;
  min-width: 0;
}

.sp-listing-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.25rem;
}

.sp-listing-title strong {
  color: #0d2235;
  font-size: 0.95rem;
}

.sp-listing-pill {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sp-listing-pill.ok {
  background: #dcfce7;
  color: #166534;
}

.sp-listing-pill.off {
  background: #fee2e2;
  color: #991b1b;
}

.sp-listing-meta {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.sp-list-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  margin-bottom: 0.95rem;
}

.sp-list-search .sp-field {
  margin: 0;
}

.sp-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eef2f7;
}

.sp-pager-meta {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
}

.sp-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(10rem, 0.8fr) minmax(10rem, 0.8fr);
  gap: 0.85rem 1rem;
  margin-bottom: 1.1rem;
}

.sp-filters-wrap {
  grid-template-columns: auto minmax(0, 1.2fr) minmax(8rem, 0.6fr) auto;
  align-items: end;
}

.sp-filter-grow {
  min-width: 0;
}

.sp-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding-bottom: 0.1rem;
}

.sp-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.85rem;
}

.sp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.sp-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sp-stat strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.sp-stat span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 550;
}

.sp-toggle {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 0.7rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  align-self: end;
  margin-bottom: 0.05rem;
}

.sp-toggle button {
  border: 0;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.45rem 0.8rem;
  border-radius: 0.55rem;
  cursor: pointer;
}

.sp-toggle button.is-active {
  background: #0F6B3C;
  color: #fff;
}

.sp-market-grid,
.sp-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr));
  gap: 0.9rem;
}

.sp-market-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.sp-market-card-media {
  height: 8.5rem;
  background: #f8fafc;
  color: #94a3b8;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #eef2f7;
}

.sp-market-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-market-card-media.is-empty {
  background: linear-gradient(160deg, #f0fdf4, #f8fafc);
  color: #0F6B3C;
}

.sp-market-card-body {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.sp-market-card-qty {
  font-size: 0.9rem;
  color: #334155;
}

.sp-market-card-qty strong {
  color: #0f172a;
}

.sp-market-card-cta {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

.sp-match-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sp-match-card-top {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1rem 0.75rem;
  align-items: flex-start;
}

.sp-match-card-copy {
  min-width: 0;
  flex: 1;
}

.sp-match-card-title {
  display: block;
  font-size: 1rem;
  color: #0f172a;
  line-height: 1.25;
}

.sp-match-card-sub {
  margin: 0.2rem 0 0.55rem;
  font-size: 0.82rem;
  color: #64748b;
}

.sp-match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.sp-match-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 600;
}

.sp-match-details {
  padding: 0 1rem 0.85rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sp-match-details p {
  margin: 0;
  font-size: 0.84rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sp-match-details a {
  color: #0F6B3C;
}

.sp-match-details-label {
  margin-top: 0.55rem !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
}

.sp-match-details .dash-btn {
  margin-top: 0.65rem;
  align-self: flex-start;
}

.sp-match-expand {
  margin-top: auto;
  border: 0;
  border-top: 1px solid #eef2f7;
  background: #f8fafc;
  color: #475569;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.7rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
}

.sp-match-expand:hover {
  background: #f1f5f9;
  color: #0F6B3C;
}

.sp-score {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 750;
  flex-shrink: 0;
}

.sp-score.is-high {
  background: #dcfce7;
  color: #166534;
}

.sp-score.is-mid {
  background: #fef3c7;
  color: #92400e;
}

.sp-score.is-low {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 980px) {
  .sp-layout {
    grid-template-columns: 1fr;
  }

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

  .sp-filters,
  .sp-filters-wrap {
    grid-template-columns: 1fr 1fr;
  }

  .sp-filters-wrap .sp-toggle,
  .sp-filters-wrap .sp-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .sp-form-grid {
    grid-template-columns: 1fr;
  }

  .sp-facility-banner {
    flex-direction: column;
  }

  .sp-listing-row {
    flex-direction: column;
    align-items: stretch;
  }

  .sp-stats {
    grid-template-columns: 1fr;
  }

  .sp-filters,
  .sp-filters-wrap {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fv-shell *,
  .fv-shell *::before,
  .fv-shell *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
