/* New WeFarmSA dashboard composition (dash-*) — built from scratch */

/* Vision + dash tokens for DashboardShellLayout.
   fv-* pages used to live under .fv-shell only; without these vars,
   fv-btn-primary keeps color:#fff but loses its green background. */
.fo-shell--dashboard {
  --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;
  --fv-success: #0F7B3A;
  --fv-success-soft: #E8F5EC;
  --fv-warning: #B45309;
  --fv-warning-soft: #FFF7ED;
  --fv-danger: #C62828;
  --fv-danger-soft: #FDECEC;
  --fv-info: #1D4ED8;
  --fv-bg: #F6F8FB;
  --fv-card: #FFFFFF;
  --fv-surface: #FFFFFF;
  --fv-border: #E2E8E4;
  --fv-border-strong: #C8D5CC;
  --fv-text: #0F172A;
  --fv-text-primary: #0F172A;
  --fv-text-secondary: #64748B;
  --fv-muted: #64748B;
  --fv-subtle: #94A3B8;
  --fv-radius: 12px;
  --fv-radius-sm: 8px;
  --fv-shadow: 0 1px 2px rgba(15, 61, 46, 0.04);
  --dash-bg: #F6F8FB;
  --dash-card: #FFFFFF;
  --dash-border: #E5EBE7;
  --dash-text: #0F172A;
  --dash-muted: #64748B;
  --dash-subtle: #94A3B8;
  --dash-primary: #0F6B3C;
  --dash-primary-dark: #0F3D2E;
  --dash-primary-soft: #E8F5EC;
  --dash-radius: 14px;
  --dash-shadow: 0 1px 2px rgba(15, 61, 46, 0.04), 0 4px 14px rgba(15, 61, 46, 0.05);
  color: var(--fv-text);
}

/* Ensure legacy fv buttons keep contrast inside the dashboard shell */
.fo-shell--dashboard .fv-btn-primary,
.fo-shell--dashboard a.fv-btn-primary,
.fo-shell--dashboard button.fv-btn-primary {
  background: #0F6B3C;
  border: 1px solid #0F6B3C;
  color: #fff;
}

.fo-shell--dashboard .fv-btn-primary:hover,
.fo-shell--dashboard a.fv-btn-primary:hover,
.fo-shell--dashboard button.fv-btn-primary:hover {
  background: #0B5530;
  border-color: #0B5530;
  color: #fff;
}

.fo-shell--dashboard .fv-btn-outline,
.fo-shell--dashboard a.fv-btn-outline,
.fo-shell--dashboard button.fv-btn-outline {
  background: #fff;
  border: 1px solid #C8D5CC;
  color: #0F172A;
}

.fo-shell--dashboard .fv-btn-outline:hover,
.fo-shell--dashboard a.fv-btn-outline:hover,
.fo-shell--dashboard button.fv-btn-outline:hover {
  border-color: #0F6B3C;
  color: #0F6B3C;
  background: #E8F5EC;
}

.fo-shell--dashboard .fv-btn-ghost,
.fo-shell--dashboard a.fv-btn-ghost,
.fo-shell--dashboard button.fv-btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: #0F6B3C;
}

.fo-shell--dashboard .fv-btn-ghost:hover,
.fo-shell--dashboard a.fv-btn-ghost:hover,
.fo-shell--dashboard button.fv-btn-ghost:hover {
  background: #E8F5EC;
  color: #0B5530;
}

.fo-shell--dashboard .fv-btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.fo-shell--dashboard .fv-btn-primary .lucide-icon,
.fo-shell--dashboard .fv-btn-outline .lucide-icon,
.fo-shell--dashboard .fv-btn-ghost .lucide-icon {
  color: inherit;
}

.dash {
  --dash-bg: #F6F8FB;
  --dash-card: #FFFFFF;
  --dash-border: #E5EBE7;
  --dash-text: #0F172A;
  --dash-muted: #64748B;
  --dash-subtle: #94A3B8;
  --dash-primary: #0F6B3C;
  --dash-primary-dark: #0F3D2E;
  --dash-primary-soft: #E8F5EC;
  --dash-radius: 14px;
  --dash-shadow: 0 1px 2px rgba(15, 61, 46, 0.04), 0 4px 14px rgba(15, 61, 46, 0.05);
  --dash-gap: 24px;
  padding: 24px 32px 48px;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Inside onboarding fo-shell workspace — drop outer chrome padding */
.fo-workspace--dashboard .dash {
  padding: 0 0 2rem;
  max-width: none;
  margin: 0;
  width: 100%;
}

.fo-shell--dashboard .fo-workspace--dashboard {
  padding-top: 1rem;
}

.fo-page-desc {
  margin: 0 0 1.15rem;
  max-width: 46rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #64748B;
  font-weight: 500;
}

.fo-top--dashboard .fo-top-text h1 {
  margin: 0;
}

.fo-top--dashboard .fo-top-text p {
  display: none;
}

.fo-dash-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.15rem 0.15rem 0.35rem;
}

.fo-dash-avatar {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

.fo-dash-profile-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.fo-dash-profile-text span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.fo-dash-profile-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fo-dash-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.fo-dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  color: var(--fo-aside-fg);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  opacity: 0.88;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.fo-dash-nav-item .lucide-icon {
  color: inherit;
  flex-shrink: 0;
}

.fo-dash-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.fo-dash-nav-item.active {
  background: rgba(255, 255, 255, 0.16);
  opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.fo-dash-nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fo-dash-nav-home {
  margin-bottom: 0.15rem;
}

.fo-dash-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.fo-dash-nav-group:first-of-type {
  margin-top: 0.45rem;
}

.fo-dash-nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.fo-dash-nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

.fo-dash-nav-group.has-active > .fo-dash-nav-group-toggle {
  opacity: 0.95;
}

.fo-dash-nav-group-toggle > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.fo-dash-nav-group-toggle .lucide-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.fo-dash-nav-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  padding: 0 0.7rem 0.25rem;
}

.fo-dash-nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fo-dash-help {
  margin-top: auto;
}

.fo-dash-chat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: inherit;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
}

.fo-dash-home {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
}

.fo-dash-chat:hover,
.fo-dash-home:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Dashboard top actions (notifications + profile) */
.fo-top--dashboard {
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.fo-top-lead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.fo-top--dashboard .fo-top-text {
  min-width: 0;
}

.fo-top--dashboard .fo-top-text h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fo-dash-menu-btn,
.fo-dash-aside-close,
.fo-dash-collapse-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  border: 1px solid var(--fo-border);
  background: #fff;
  color: var(--fo-text);
  cursor: pointer;
  flex-shrink: 0;
}

.fo-dash-collapse-btn {
  display: inline-flex;
}

.fo-dash-collapse-btn:hover {
  background: var(--fo-leaf-soft);
  border-color: var(--fo-leaf-mid);
}

/* Expanded dashboard shell — standard labeled sidebar */
.fo-shell.fo-shell--dashboard {
  --fo-aside-w: 260px;
  grid-template-columns: var(--fo-aside-w) minmax(0, 1fr);
  transition: grid-template-columns 0.2s ease;
}

.fo-shell--dashboard .fo-brand-mark {
  display: none;
}

/* Collapsed = icon rail */
.fo-shell.fo-shell--dashboard.fo-shell--aside-collapsed {
  --fo-aside-w: 4.75rem;
  grid-template-columns: var(--fo-aside-w) minmax(0, 1fr);
}

.fo-aside--collapsed {
  padding: 1rem 0.55rem 1rem;
  align-items: stretch;
  overflow-x: hidden;
}

.fo-aside--collapsed .fo-aside-brand {
  justify-content: center;
  margin-bottom: 0.35rem;
}

.fo-aside--collapsed .fo-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fo-aside--collapsed .fo-brand-logo {
  display: none;
}

.fo-aside--collapsed .fo-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fo-aside--collapsed .fo-dash-profile {
  justify-content: center;
  padding: 0.35rem 0 0.55rem;
}

.fo-aside--collapsed .fo-dash-profile-text,
.fo-aside--collapsed .fo-dash-nav-item > span:not(.lucide-icon),
.fo-aside--collapsed .fo-dash-help-copy,
.fo-aside--collapsed .fo-dash-chat > span:not(.lucide-icon),
.fo-aside--collapsed .fo-dash-home > span:not(.lucide-icon),
.fo-aside--collapsed .fo-aside-why-ico {
  display: none;
}

.fo-aside--collapsed .fo-dash-nav {
  align-items: stretch;
  width: 100%;
  gap: 0.25rem;
}

.fo-aside--collapsed .fo-dash-nav-group {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  gap: 0.2rem;
}

.fo-aside--collapsed .fo-dash-nav-group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.fo-aside--collapsed .fo-dash-nav-group-toggle {
  display: none;
}

.fo-aside--collapsed .fo-dash-nav-group-items {
  display: flex !important;
}

.fo-aside--collapsed .fo-dash-nav-item {
  justify-content: center;
  width: 100%;
  padding: 0.7rem 0.35rem;
  border-radius: 0.7rem;
  color: #E8F5EC;
}

.fo-aside--collapsed .fo-dash-nav-item .lucide-icon {
  display: inline-flex !important;
  width: 1.25rem;
  height: 1.25rem;
  color: inherit;
  opacity: 1;
}

.fo-aside--collapsed .fo-dash-nav-item .lucide-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
}

.fo-aside--collapsed .fo-dash-help {
  margin-top: auto;
  padding: 0.35rem 0 0;
  display: flex;
  justify-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.fo-aside--collapsed .fo-dash-chat,
.fo-aside--collapsed .fo-dash-home {
  margin-top: 0;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  justify-content: center;
  border-radius: 0.7rem;
}

.fo-dash-aside-close {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: var(--fo-aside-fg);
}

.fo-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.45rem;
  position: relative;
  z-index: 30;
  flex-shrink: 0;
}

.fo-top-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  border: 1px solid var(--fo-border);
  background: #fff;
  color: var(--fo-text);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.fo-top-icon:hover {
  background: var(--fo-leaf-soft);
  border-color: var(--fo-leaf-mid);
}

.fo-top-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 14rem;
  min-height: 2.35rem;
  padding: 0.25rem 0.55rem 0.25rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--fo-border);
  background: #fff;
  color: var(--fo-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.fo-top-chip:hover {
  border-color: var(--fo-border-strong);
  background: #f8faf9;
}

.fo-top-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fo-top-profile {
  position: relative;
}

.fo-top-profile-btn {
  font: inherit;
}

.fo-top-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  border: 0;
  background: transparent;
  cursor: default;
}

.fo-top-profile-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 50;
  min-width: 14rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--fo-border);
  background: #fff;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.35);
}

.fo-top-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem 0.55rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.2rem;
}

.fo-top-profile-meta strong {
  font-size: 0.9rem;
  color: var(--fo-text);
}

.fo-top-profile-meta span {
  font-size: 0.75rem;
  color: var(--fo-muted);
}

.fo-top-profile-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: var(--fo-text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
}

.fo-top-profile-item:hover {
  background: #f8fafc;
}

.fo-top-profile-item.danger {
  color: #b91c1c;
}

.fo-shell--dashboard .fo-aside-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fo-dash-overlay {
  display: none;
}

.dash-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 132px;
  padding: 24px 28px;
  margin-bottom: var(--dash-gap);
  border-radius: var(--dash-radius);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(115deg, #0F3D2E 0%, #1A5C42 58%, #0F3D2E 100%);
  box-shadow: 0 10px 28px rgba(15, 61, 46, 0.18);
}

.dash-hero-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;
}

.dash-hero-copy {
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.dash-hero-copy h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-hero-copy p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 34rem;
  line-height: 1.4;
}

.dash-hero-art {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(48%, 420px);
  pointer-events: none;
  z-index: 0;
}

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

.dash-hero-art .fv-landscape-art,
.dash-hero-art svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.05);
  transform-origin: right bottom;
}

.dash-page-heading {
  margin: 0 0 1rem;
}

.dash-page-heading h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--dash-text);
  line-height: 1.25;
}

.dash-page-heading p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--dash-muted);
}

.dash-welcome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.dash-welcome-greeting {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dash-text);
}

.dash-welcome-desc {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: var(--dash-muted);
  max-width: 40rem;
  line-height: 1.45;
}

.dash-welcome-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--dash-subtle);
  font-size: 0.85rem;
}

.dash-welcome-meta--solo {
  justify-content: flex-end;
  margin-bottom: 16px;
}

.dash-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: var(--dash-gap);
}

.dash-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 10px;
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--dash-shadow);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.dash-action:hover {
  border-color: #C8D5CC;
  box-shadow: 0 4px 16px rgba(15, 61, 46, 0.08);
}

.dash-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.dash-action-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dash-action-copy strong {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--dash-text);
}

.dash-action-copy span {
  font-size: 0.72rem;
  color: var(--dash-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-action-chevron { color: var(--dash-subtle); flex-shrink: 0; }

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: var(--dash-gap);
}

.dash-metric {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--dash-shadow);
}

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

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

.dash-metric-icon.success { background: #E8F5EC; color: #0F7B3A; }
.dash-metric-icon.warning { background: #FFF7ED; color: #B45309; }

.dash-metric-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--dash-subtle);
}

.dash-metric-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--dash-text);
  line-height: 1.1;
}

.dash-metric-label {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--dash-text);
}

.dash-metric-sub {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: var(--dash-subtle);
}

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

.dash-spark span {
  flex: 1;
  border-radius: 1px;
  background: #B7E0C4;
  min-height: 3px;
}

.dash-list { margin-bottom: var(--dash-gap); }

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

.dash-list-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dash-text);
}

.dash-list-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--dash-primary);
  text-decoration: none;
}

.dash-list-link:hover { text-decoration: underline; }

.dash-list-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

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

.dash-entity-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.dash-entity-title-row h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dash-text);
}

.dash-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
}

.dash-badge-info { background: #E8F1FB; color: #1D4ED8; }
.dash-badge-success { background: #E8F5EC; color: #0F7B3A; }
.dash-badge-warn { background: #FEF3C7; color: #B45309; }
.dash-badge-neutral { background: #F1F5F9; color: #64748B; }

.dash-entity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dash-entity-meta li {
  font-size: 0.72rem;
  color: var(--dash-subtle);
}

.dash-entity-meta strong {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--dash-text);
}

.dash-entity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
}

.dash-btn-primary {
  background: #0F3D2E;
  border-color: #0F3D2E;
  color: #fff;
}

.dash-btn-primary:hover { filter: brightness(1.06); color: #fff; }

.dash-btn-outline {
  background: #fff;
  border-color: #C8D5CC;
  color: #0F172A;
}

.dash-btn-outline:hover {
  border-color: #0F6B3C;
  color: #0F6B3C;
  background: #E8F5EC;
}

.dash-btn .lucide-icon {
  color: inherit;
}

.dash-empty {
  margin: 0;
  padding: 20px;
  background: var(--dash-card);
  border: 1px dashed var(--dash-border);
  border-radius: 12px;
  color: var(--dash-muted);
  font-size: 0.9rem;
}

.dash-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  text-align: center;
  color: var(--dash-muted);
}

.dash-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  margin-bottom: var(--dash-gap);
  background: #fff;
  border: 1px solid var(--dash-border);
}

.dash-banner.info { border-color: #B7E0C4; background: #F3FAF5; }
.dash-banner.warn { border-color: #FCD34D; background: #FFFBEB; }

.dash-banner strong { display: block; color: var(--dash-text); }
.dash-banner p { margin: 4px 0 0; font-size: 0.88rem; color: var(--dash-muted); }

.dash-insights {
  margin-top: 8px;
  padding-top: 8px;
}

.dash-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dash-insight-card {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--dash-shadow);
}

.dash-insight-card strong {
  display: block;
  font-size: 0.95rem;
  color: var(--dash-text);
}

.dash-insight-card span {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--dash-muted);
}

@media (max-width: 1100px) {
  .dash-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-insights-grid { grid-template-columns: 1fr; }
  .fo-top-chip-label { max-width: 7rem; }
}

@media (max-width: 900px) {
  /* Dashboard shell: drawer nav instead of stacking aside above content */
  .fo-shell--dashboard {
    grid-template-columns: 1fr !important;
    height: 100vh;
    overflow: hidden;
  }

  .fo-shell--dashboard .fo-layout-root,
  .fo-layout-root:has(.fo-shell--dashboard) {
    height: 100vh;
    overflow: hidden;
  }

  .fo-dash-menu-btn,
  .fo-dash-aside-close {
    display: inline-flex;
  }

  .fo-dash-collapse-btn {
    display: none;
  }

  .fo-shell.fo-shell--dashboard.fo-shell--aside-collapsed {
    --fo-aside-w: min(20rem, 86vw);
    grid-template-columns: 1fr !important;
  }

  .fo-aside--collapsed {
    padding: 1.35rem 1.15rem 1.25rem;
    align-items: stretch;
  }

  .fo-aside--collapsed .fo-brand-logo {
    display: block;
  }

  .fo-aside--collapsed .fo-brand-mark {
    display: none;
  }

  .fo-aside--collapsed .fo-dash-profile-text,
  .fo-aside--collapsed .fo-dash-nav-item > span:not(.lucide-icon),
  .fo-aside--collapsed .fo-dash-help-copy,
  .fo-aside--collapsed .fo-dash-chat > span:not(.lucide-icon),
  .fo-aside--collapsed .fo-aside-why-ico {
    display: revert;
  }

  .fo-aside--collapsed .fo-dash-nav-item {
    justify-content: flex-start;
    padding: 0.55rem 0.7rem;
  }

  .fo-aside--collapsed .fo-dash-profile {
    justify-content: flex-start;
  }

  .fo-aside--collapsed .fo-aside-brand {
    justify-content: space-between;
  }

  .fo-aside--collapsed .fo-dash-help {
    display: block;
    margin-top: auto;
  }

  .fo-aside--collapsed .fo-dash-chat {
    width: auto;
    height: auto;
    margin-top: 0.55rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
  }

  .fo-shell--dashboard .fo-aside {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(20rem, 86vw);
    height: 100vh;
    z-index: 60;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  }

  .fo-shell--dashboard .fo-aside.fo-aside--open {
    transform: translateX(0);
  }

  .fo-dash-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    border: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .fo-dash-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .fo-shell--dashboard .fo-main {
    height: 100vh;
    overflow: hidden;
  }

  .fo-shell--dashboard .fo-workspace--dashboard {
    padding: 0.85rem 0.85rem 1.25rem;
  }

  /* Override onboarding .fo-top { flex-direction: column } for dashboards */
  .fo-top.fo-top--dashboard {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
  }

  .fo-top--dashboard .fo-top-lead {
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 0.5rem;
  }

  .fo-top--dashboard .fo-top-text {
    min-width: 0;
    flex: 1 1 auto;
  }

  .fo-top--dashboard .fo-top-text h1 {
    font-size: 0.98rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fo-top--dashboard .fo-top-text p {
    display: none;
  }

  .fo-top--dashboard .fo-top-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 0.3rem;
    margin-left: auto;
  }

  .fo-top--dashboard .fo-top-icon,
  .fo-top--dashboard .fo-dash-menu-btn {
    width: 2.1rem;
    height: 2.1rem;
  }

  .fo-top--dashboard .fo-user-avatar {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 720px) {
  .dash { padding: 16px; }
  .fo-workspace--dashboard .dash { padding: 0 0 1.25rem; }
  .dash-hero { min-height: 0; }
  .dash-hero-art { display: none; }
  .dash-welcome { flex-direction: column; }
  .dash-welcome-meta { width: 100%; justify-content: space-between; }
  .dash-actions { grid-template-columns: 1fr 1fr; }
  .dash-metrics { grid-template-columns: 1fr; }
  .dash-entity {
    grid-template-columns: 56px 1fr;
  }
  .dash-entity-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .dash-entity-actions .dash-btn { flex: 1; justify-content: center; }

  .fo-top-actions .fv-cat-switch-label,
  .fo-top-chip-label {
    display: none;
  }

  .fo-top-chip {
    padding: 0.2rem;
    max-width: none;
    min-height: 2.1rem;
  }

  .fo-top-profile-btn {
    padding-right: 0.25rem;
  }

  .fo-top-actions .fv-cat-switch-btn {
    padding-inline: 0.3rem;
    min-height: 2.1rem;
  }

  /* Keep header to essentials on narrow phones */
  .fo-top--dashboard .fo-top-chip[title="Switch farm"],
  .fo-top--dashboard .fo-top-icon[title="Messages"],
  .fo-top--dashboard .fo-top-icon[title="Help"] {
    display: none;
  }

  .dash-welcome h2 {
    font-size: 1.2rem;
  }

  .dash-welcome > p {
    font-size: 0.88rem;
  }
}

/* My farms cards (DashboardShellLayout) */
.farms-profile-panel .fv-profile-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.farms-profile-panel .fv-profile-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #334155;
}

.farms-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.farms-list-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dash-text, #0f172a);
}

.farms-card-grid {
  display: grid;
  gap: 0.85rem;
}

.farms-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  background: #fff;
  border: 1px solid var(--dash-border, #e2e8f0);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.farms-card-thumb {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(145deg, #E8F5EC, #D9F0E3);
  color: #0F7B3A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.farms-card-body h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.farms-card-body > p {
  margin: 0;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.55;
}

.farms-card-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.farms-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.35rem;
}

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

  .farms-card-thumb {
    width: 48px;
    height: 48px;
  }
}

/* Orders list toolbar + inline search (input + button on one row) */
.orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.orders-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}
.orders-search {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  margin-left: auto;
  flex: 1 1 16rem;
  max-width: 28rem;
  min-width: 0;
}
.orders-search--full {
  margin: 0 0 1rem;
  max-width: none;
  width: 100%;
}
.orders-search-input.sp-input,
.orders-search .sp-input {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}
.orders-search-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  align-self: stretch;
}

/* Buyer order tracking */
.track-order-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.track-order-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1.25rem 0 1.5rem;
}
.track-order-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  color: #94a3b8;
  position: relative;
}
.track-order-step-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: #e2e8f0;
  border: 2px solid #cbd5e1;
}
.track-order-step.active { color: #0f766e; font-weight: 700; }
.track-order-step.active .track-order-step-dot {
  background: #0f766e;
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}
.track-order-step.done { color: #334155; }
.track-order-step.done .track-order-step-dot {
  background: #10b981;
  border-color: #10b981;
}
.track-order-step.muted { opacity: 0.55; }
.track-order-step-label { font-size: 0.75rem; font-weight: 600; }
.track-order-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .track-order-grid { grid-template-columns: 1fr; }
  .track-order-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.track-order-invoice {
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.85rem;
  background: #fff;
}
.track-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.track-order-table th,
.track-order-table td {
  text-align: left;
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid #f1f5f9;
}
.track-order-table th {
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.track-order-totals {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
}
.track-order-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.track-order-discount { color: #047857; }
.track-order-total {
  padding-top: 0.45rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.95rem;
}
.track-order-meta {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.track-order-meta > div {
  display: grid;
  gap: 0.15rem;
}
.track-order-meta dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.track-order-meta dd {
  margin: 0;
  font-size: 0.9rem;
  color: #0f172a;
  word-break: break-word;
}
.track-order-timeline {
  margin: 0;
  padding-left: 1.1rem;
}
.track-order-timeline li {
  margin-bottom: 0.75rem;
}
.track-order-timeline span {
  display: block;
  color: #64748b;
  font-size: 0.85rem;
}
.track-order-timeline small {
  display: block;
  color: #94a3b8;
  font-size: 0.75rem;
  margin-top: 0.15rem;
}
.track-order-muted { color: #94a3b8; font-size: 0.85rem; }
