.dispatch-workspace { background: #f7f8ec; padding: 12px; border-radius: 12px; }
.dispatch-heading { background: #2e713c; color: white; padding: 18px; border-radius: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.dispatch-heading h2, .dispatch-heading p { color: inherit; }
.dispatch-filters { padding: 16px 2px; }
.dispatch-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.dispatch-filter-grid .form-select, .dispatch-filter-grid .form-control { min-width: 0; width: 100%; font-size: .85rem; }
.dispatch-summary-card { background: #e0ebcb; border: 2px solid #387345; border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.dispatch-summary-card > summary { list-style: none; cursor: pointer; padding: 12px 14px 16px; }
.dispatch-summary-card > summary::-webkit-details-marker { display: none; }
.dispatch-card-top { display: flex; justify-content: space-between; color: #3f603a; font-size: .85rem; margin-bottom: 12px; }
.dispatch-card-main { display: grid; grid-template-columns: minmax(60px,1fr) minmax(0,3fr) auto 20px; gap: 10px; align-items: center; }
.dispatch-card-main small { display: block; margin-top: 3px; font-size: .8rem; }
.dispatch-grass { overflow-wrap: anywhere; }
.dispatch-status { background: #f7faef; border: 1px solid #8ba873; border-radius: 20px; padding: 4px 8px; font-size: .75rem; align-self: center; white-space: nowrap; color: #2c5931; }
.dispatch-summary-card[open] .dispatch-expand { transform: rotate(180deg); }
.dispatch-card-details { border-top: 1px solid #b4c89f; padding: 16px; }
.dispatch-quantity-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; text-align: center; }
.dispatch-quantity-grid strong { display: block; font-size: 1.25rem; }
.dispatch-load-card { background: white; padding: 18px; border-radius: 12px; border: 2px solid #387345; overflow-wrap: anywhere; }
.dispatch-load-card h3, .dispatch-inline-edit .form-control { min-width: 0; }
.dispatch-inline-edit { background: #f3f7ec; padding: 10px; border-radius: 8px; }
.dispatch-load-quantity { display: grid; grid-template-columns: minmax(0,1fr) 100px; gap: 12px; align-items: center; }
.dispatch-summary-card summary:focus-visible { outline: 3px solid #244a2a; outline-offset: -4px; }
@media(max-width:575px) {
  .dispatch-card-main { grid-template-columns: minmax(55px,1fr) minmax(0,3fr) 20px; }
  .dispatch-card-main .dispatch-status { grid-column: 2; grid-row: 2; justify-self: start; }
  .dispatch-card-main .dispatch-expand { grid-column: 3; grid-row: 1; }
  .dispatch-quantity-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dispatch-filter-grid { gap: 8px; }
}

/* Compact dispatch list and single-screen creation. */
.dispatch-heading { background: #195b3b; }
.dispatch-status-tabs { display: flex; background: #e9ece7; border-radius: 16px; padding: 4px; gap: 4px; }
.dispatch-status-tabs a { flex: 1; padding: 13px 8px; text-align: center; color: #314238; text-decoration: none; border-radius: 12px; font-weight: 600; }
.dispatch-status-tabs a.active { color: #fff; background: #24723c; }
.dispatch-simple-load { background: #e9f1df; border: 1px solid #8cab7c; padding: 16px; }
.dispatch-load-top { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.dispatch-load-top h3 a { color: #174e32; text-decoration: none; }
.dispatch-truck-icon { color: #246c3e; font-size: 28px; }
.dispatch-simple-load .dispatch-inline-edit { background: transparent; padding: 0; }
.dispatch-create-workspace { max-width: 660px; margin: 0 auto; padding: 12px; border-radius: 12px; background: #f7f8ec; }
.dispatch-create-workspace .dispatch-heading { justify-content: start; }
.dispatch-back { color: white; display: inline-flex; align-items: center; padding: 8px; border-radius: 8px; }
.dispatch-back:hover { color: white; background: #ffffff20; }
.dispatch-form-section, .dispatch-form-row { padding: 16px; background: #fff; border: 1px solid #d6dfd2; border-radius: 12px; }
.dispatch-form-section h3 { display: flex; align-items: center; gap: 8px; color: #195b3b; margin-bottom: 16px; }
.dispatch-date-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dispatch-date-row input { width: auto; min-width: 0; max-width: 65%; }
.dispatch-grass-entry + .dispatch-grass-entry { border-top: 1px solid #d6dfd2; padding-top: 16px; }
.dispatch-package-quantity { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.dispatch-quantity-stepper { display: flex; border: 1px solid #c7d2c2; border-radius: 8px; overflow: hidden; }
.dispatch-quantity-stepper .form-control { border: 0; border-radius: 0; min-width: 0; padding-left: 2px; padding-right: 2px; appearance: textfield; -moz-appearance: textfield; }
.dispatch-quantity-stepper input::-webkit-inner-spin-button, .dispatch-quantity-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dispatch-quantity-stepper button { border: 0; background: #edf2e7; color: #195b3b; font-size: 1.3rem; flex: 0 0 36px; min-height: 44px; }
.dispatch-workspace .btn-success, .dispatch-create-form .btn-success { background: #246c3e; border-color: #246c3e; }
.dispatch-workspace .btn-success:hover, .dispatch-create-form .btn-success:hover { background: #195b3b; border-color: #195b3b; }
.harvest-periods { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.harvest-pallets { --harvest-color: var(--sodtek-primary); }
.harvest-big_rolls { --harvest-color: #623c00; }
.harvest-metric { border-top: 4px solid var(--harvest-color); }
.harvest-comparison-row { display: grid; grid-template-columns: minmax(100px, 1fr) repeat(2, minmax(0, 2fr)); gap: 1.5rem; align-items: center; padding: 1rem 0; }
.harvest-comparison-row + .harvest-comparison-row { border-top: 1px solid var(--industrial-border); }
.harvest-grass-name { overflow-wrap: anywhere; }
.harvest-bar-track { height: 14px; background: var(--industrial-surface-mid); border-radius: 3px; overflow: hidden; }
.harvest-bar-total { height: 100%; background: var(--harvest-color); display: flex; justify-content: flex-end; }
.harvest-bar-unknown { display: block; background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255,255,255,.75) 4px 7px); }
.harvest-unknown-key { display: inline-block; width: 18px; height: 12px; vertical-align: middle; background: repeating-linear-gradient(135deg, #637a77 0 4px, #e9eeee 4px 7px); }
.harvest-trend-scroll { overflow-x: auto; }
.harvest-trend-plot { display: flex; gap: 5px; height: 210px; border-bottom: 1px solid var(--industrial-border); }
.harvest-trend-many { min-width: 620px; }
.harvest-trend-point { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; text-align: center; color: var(--industrial-muted); text-decoration: none; }
.harvest-trend-column { height: 178px; display: flex; align-items: flex-end; background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--industrial-border) calc(25% - 1px) 25%); }
.harvest-trend-bar { display: flex; flex-direction: column; justify-content: flex-start; width: 100%; background: var(--harvest-color); border-radius: 3px 3px 0 0; }
.harvest-trend-label { font-size: .7rem; padding-top: .5rem; }
.harvest-trend-point:hover .harvest-trend-bar { opacity: .8; }
.harvest-trend-point:focus-visible, .harvest-trend-scroll:focus-visible { outline: 2px solid var(--industrial-primary); outline-offset: -2px; }
.harvest-trend-compact .harvest-trend-plot { height: 138px; }
.harvest-trend-compact .harvest-trend-column { height: 106px; }
.dashboard-harvest-locations th, .dashboard-harvest-locations td { padding-top: .75rem; padding-bottom: .75rem; }
.dashboard-harvest-locations tbody th { max-width: 150px; overflow-wrap: anywhere; }
.dashboard-harvest-locations .harvest-bar-track { height: 7px; min-width: 50px; }
@media (max-width: 575px) {
  .harvest-comparison-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; }
  .harvest-grass-name { grid-column: 1 / -1; }
  .harvest-metric .h2 { font-size: 1.65rem; overflow-wrap: anywhere; }
}
/*




 */

:root {
  /* Shared Prairie Direct tokens; legacy names keep existing pages consistent. */
  --sodtek-canvas: #faf8ff;
  --sodtek-surface: #ffffff;
  --sodtek-surface-low: #f2f3ff;
  --sodtek-surface-mid: #eaedff;
  --sodtek-surface-high: #e2e7ff;
  --sodtek-border: #e2e8f0;
  --sodtek-outline: #c0c9c3;
  --sodtek-text: #131b2e;
  --sodtek-muted: #64748b;
  --sodtek-primary: #1b4d3e;
  --sodtek-primary-dark: #003629;
  --sodtek-primary-hover: #14532d;
  --sodtek-primary-soft: #e2efe8;
  --sodtek-primary-tint: #baeed9;
  --sodtek-success: #065f46;
  --sodtek-success-soft: #ecfdf5;
  --sodtek-success-border: #a7f3d0;
  --sodtek-warning: #92400e;
  --sodtek-warning-soft: #fef3c7;
  --sodtek-warning-border: #fcd34d;
  --sodtek-accent: #f59e0b;
  --sodtek-danger: #ba1a1a;
  --sodtek-danger-soft: #ffdad6;
  --sodtek-font: "Inter", "Segoe UI", sans-serif;
  --industrial-bg: var(--sodtek-canvas);
  --industrial-surface: var(--sodtek-surface);
  --industrial-surface-low: var(--sodtek-surface-low);
  --industrial-surface-mid: var(--sodtek-surface-mid);
  --industrial-surface-high: var(--sodtek-surface-high);
  --industrial-border: var(--sodtek-border);
  --industrial-border-strong: var(--sodtek-outline);
  --industrial-text: var(--sodtek-text);
  --industrial-muted: var(--sodtek-muted);
  --industrial-muted-soft: var(--sodtek-muted);
  --industrial-primary: var(--sodtek-primary);
  --industrial-primary-strong: var(--sodtek-primary-hover);
  --industrial-primary-soft: var(--sodtek-primary-soft);
  --industrial-primary-soft-2: var(--sodtek-primary-tint);
  --industrial-secondary: #404945;
  --industrial-danger: var(--sodtek-danger);
  --industrial-danger-soft: var(--sodtek-danger-soft);
  --industrial-warning: var(--sodtek-warning);
  --industrial-warning-soft: var(--sodtek-warning-soft);
  --industrial-success: var(--sodtek-success);
  --industrial-success-soft: var(--sodtek-success-soft);
  --industrial-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  --industrial-shadow-lg: 0 4px 12px rgba(15, 23, 42, 0.06);
  --industrial-radius-sm: 0.25rem;
  --industrial-radius: 0.5rem;
  --industrial-radius-lg: 0.75rem;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--industrial-bg);
  color: var(--industrial-text);
  font-family: "Inter", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  font-size: 1.1rem;
  line-height: 1;
}

.min-w-0 {
  min-width: 0 !important;
}

.min-w-220 {
  min-width: 13.75rem;
}

.app-shell {
  background: var(--industrial-bg);
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 18rem;
  min-height: 100vh;
  padding: 1.5rem 1rem 1rem;
  background: var(--industrial-surface-low);
  border-right: 1px solid var(--industrial-border);
}

.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.4rem 0.5rem 1.4rem;
}

.app-sidebar-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--industrial-radius);
  background: linear-gradient(135deg, var(--industrial-primary) 0%, var(--sodtek-primary-hover) 100%);
  box-shadow: var(--industrial-shadow);
}

.app-sidebar-logo {
  width: 2.15rem;
  height: 2.15rem;
  object-fit: cover;
  border-radius: 0.35rem;
}

.app-sidebar-kicker,
.app-sidebar-group-label,
.app-topbar-kicker,
.metric-label,
.dashboard-section-kicker,
.table thead th,
.app-user-role {
  font-family: var(--sodtek-font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-sidebar-kicker {
  margin: 0;
  color: var(--industrial-muted-soft);
  font-size: 0.69rem;
  font-weight: 700;
}

.app-sidebar-title {
  color: var(--industrial-primary);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
}

.app-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.app-sidebar-group {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.35rem;
}

.app-sidebar-group-label {
  padding: 0 0.7rem 0.35rem;
  color: var(--industrial-muted-soft);
  font-size: 0.7rem;
  font-weight: 700;
}

.app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.45rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid transparent;
  border-radius: var(--industrial-radius-lg);
  background: transparent;
  color: var(--industrial-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.app-sidebar-link:hover {
  background: var(--industrial-surface-high);
  border-color: var(--industrial-border);
  color: var(--industrial-primary);
  transform: translateX(1px);
}

.app-sidebar-link.active {
  background: var(--industrial-primary-soft);
  border-color: rgba(27, 77, 62, 0.18);
  color: var(--industrial-primary);
}

.app-sidebar-link .material-symbols-outlined {
  color: currentColor;
  font-size: 1.2rem;
}

.app-sidebar-section-toggle {
  cursor: pointer;
}

.app-sidebar-chevron {
  margin-left: auto;
  transition: transform 140ms ease;
}

.app-sidebar-section-toggle[aria-expanded="true"] .app-sidebar-chevron {
  transform: rotate(180deg);
}

.app-sidebar-subnav {
  margin: 0.2rem 0 0.35rem 2.1rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--industrial-border);
}

.app-sidebar-sublink {
  display: block;
  padding: 0.42rem 0.65rem;
  border-radius: 0.65rem;
  color: var(--industrial-muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.15;
  text-decoration: none;
}

.app-sidebar-sublink:hover {
  background: var(--industrial-surface-high);
  color: var(--industrial-primary);
}

.app-sidebar-sublink.active {
  background: rgba(27, 77, 62, 0.1);
  color: var(--industrial-primary);
}

.app-sidebar-footer {
  margin-top: 1rem;
  padding: 1rem 0.5rem 0;
  border-top: 1px solid var(--industrial-border);
}

.app-user-panel {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.app-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--industrial-primary);
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.app-user-name {
  color: var(--industrial-text);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-user-role {
  color: var(--industrial-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.app-workspace {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 0.9rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--industrial-border);
}

.app-topbar-kicker {
  color: var(--industrial-muted-soft);
  font-size: 0.69rem;
  font-weight: 700;
}

.app-topbar-title {
  color: var(--industrial-text);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.app-topbar-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 20rem;
}

.app-topbar-search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--industrial-muted-soft);
}

.app-topbar-search-input {
  width: 100%;
  height: 2.75rem;
  padding: 0.65rem 0.95rem 0.65rem 2.6rem;
  border: 1px solid var(--industrial-border);
  border-radius: 999px;
  background: var(--industrial-surface-low);
  color: var(--industrial-text);
  font-size: 0.94rem;
}

.app-topbar-search-input:focus {
  outline: none;
  border-color: rgba(27, 77, 62, 0.4);
  box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.08);
}

.app-topbar-icon-button,
.app-mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--industrial-border);
  border-radius: 999px;
  background: var(--industrial-surface);
  color: var(--industrial-secondary);
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.app-topbar-icon-button:hover,
.app-mobile-menu-button:hover {
  background: var(--industrial-surface-low);
  color: var(--industrial-primary);
  border-color: var(--industrial-border-strong);
}

.app-mobile-nav-shell {
  padding: 0 1rem 1rem;
  background: transparent;
}

.app-mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 1rem;
  border: 1px solid var(--industrial-border);
  border-top: 0;
  border-radius: 0 0 var(--industrial-radius-lg) var(--industrial-radius-lg);
  background: var(--industrial-surface);
}

.app-mobile-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0.7rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  background: var(--industrial-surface-low);
  color: var(--industrial-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.app-mobile-nav-link.active {
  background: var(--industrial-primary-soft);
  border-color: rgba(27, 77, 62, 0.18);
  color: var(--industrial-primary);
}

.card.section-card.farm-management-nav,
.farm-management-nav,
.farm-management-nav .card-body {
  overflow: visible;
}

.card.section-card.farm-management-nav {
  position: relative;
  z-index: 5;
}

.farm-more-menu {
  position: relative;
}

.farm-more-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.farm-more-menu summary::-webkit-details-marker {
  display: none;
}

.farm-more-menu summary .material-symbols-outlined {
  font-size: 1rem;
  transition: transform 120ms ease;
}

.farm-more-menu[open] summary .material-symbols-outlined {
  transform: rotate(180deg);
}

.farm-more-menu-list {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 50;
  display: grid;
  min-width: 13rem;
  margin: 0;
  padding: 0.35rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  background: var(--industrial-surface);
  list-style: none;
}

.farm-root-menu .farm-more-menu-list {
  right: auto;
  left: 0;
}

.farm-more-menu-link {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  color: var(--industrial-secondary);
  font-weight: 650;
  text-decoration: none;
}

.farm-more-menu-link:hover {
  background: var(--industrial-surface-high);
  color: var(--industrial-primary);
}

.farm-more-menu-link.active,
.farm-more-menu-link:active {
  background: var(--industrial-primary);
  color: #fff;
}

.shift-scroll-map-frame iframe {
  pointer-events: none;
}

body.shift-scroll-map-active .shift-scroll-map-frame:hover iframe {
  pointer-events: auto;
}

.app-main,
.app-auth-shell {
  padding: 1.5rem;
}

.app-main {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.app-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(186, 238, 217, 0.24), transparent 28%),
    linear-gradient(180deg, #f9fbfc 0%, var(--industrial-bg) 100%);
}

.app-flash-stack {
  position: sticky;
  top: 0.75rem;
  z-index: 1025;
}

.page-header {
  margin-bottom: 1.5rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.page-header h2,
.page-header .h2,
.page-header .h3 {
  color: var(--industrial-text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-hero {
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background:
    linear-gradient(135deg, rgba(186, 238, 217, 0.16), transparent 36%),
    linear-gradient(180deg, var(--industrial-surface) 0%, #fbfcfd 100%);
  box-shadow: var(--industrial-shadow-lg);
}

.hero-eyebrow,
.dashboard-section-kicker {
  color: var(--industrial-muted-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.section-card,
.card.section-card {
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  overflow: hidden;
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.section-card .card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--industrial-border);
  background: var(--industrial-surface-low);
}

.section-card .card-body {
  padding: 1.25rem;
}

.metric-card {
  position: relative;
  height: 100%;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.metric-card::before {
  content: none;
}

.metric-value {
  color: var(--industrial-text);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.dashboard-command-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  padding: 2rem;
  border-radius: var(--industrial-radius-lg);
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 18%, rgba(186, 238, 217, 0.25), transparent 25%),
    linear-gradient(135deg, #004a44 0%, var(--industrial-primary) 58%, #0b7665 100%);
  box-shadow: var(--industrial-shadow-lg);
}

.dashboard-command-hero::after {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  pointer-events: none;
}

.dashboard-command-copy,
.dashboard-date-block {
  position: relative;
  z-index: 1;
}

.dashboard-command-copy h2 {
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  font-weight: 750;
  letter-spacing: -0.04em;
}

.dashboard-command-copy p {
  max-width: 48rem;
  color: rgba(255, 255, 255, 0.8);
}

.dashboard-command-hero .hero-eyebrow {
  color: #aaf7eb;
}

.dashboard-date-block {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.75rem;
  min-width: 12rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--industrial-radius);
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}

.dashboard-date-block .material-symbols-outlined {
  font-size: 1.5rem;
}

.dashboard-date-block span:not(.material-symbols-outlined) {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
}

.dashboard-date-block .dashboard-date-day {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
}

.dashboard-search-card .card-body {
  padding: 1rem;
}

.dashboard-search-form {
  display: flex;
  gap: 0.65rem;
}

.dashboard-search-input-wrap {
  position: relative;
  flex: 1 1 auto;
}

.dashboard-search-input-wrap > .material-symbols-outlined {
  position: absolute;
  top: 50%;
  left: 1rem;
  z-index: 2;
  color: var(--industrial-muted);
  font-size: 1.3rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.dashboard-search-input-wrap .form-control {
  padding-left: 3rem;
  border-color: var(--industrial-border-strong);
}

.dashboard-search-button {
  min-width: 7rem;
}

.dashboard-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.dashboard-action-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 5.25rem;
  padding: 1rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  color: var(--industrial-text);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.dashboard-action-card:hover,
.dashboard-action-card:focus-visible {
  border-color: var(--industrial-primary);
  color: var(--industrial-primary-strong);
  box-shadow: var(--industrial-shadow-lg);
  transform: translateY(-2px);
}

.dashboard-action-icon,
.dashboard-work-icon,
.dashboard-recent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--industrial-radius);
  color: var(--industrial-primary);
  background: var(--industrial-primary-soft);
}

.dashboard-action-card--field .dashboard-action-icon {
  color: #17662e;
  background: #e4f5df;
}

.dashboard-action-card--service .dashboard-action-icon {
  color: #9a5100;
  background: var(--industrial-warning-soft);
}

.dashboard-action-card--office .dashboard-action-icon {
  color: var(--industrial-secondary);
  background: #e9edf4;
}

.dashboard-action-icon .material-symbols-outlined,
.dashboard-work-icon .material-symbols-outlined,
.dashboard-recent-icon .material-symbols-outlined {
  font-size: 1.35rem;
}

.dashboard-action-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.dashboard-action-text strong {
  line-height: 1.25;
}

.dashboard-action-text small {
  margin-top: 0.2rem;
  overflow: hidden;
  color: var(--industrial-muted);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-action-arrow {
  color: var(--industrial-muted-soft);
}

.dashboard-attention-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.dashboard-attention-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  color: var(--industrial-text);
  background: var(--industrial-surface);
  text-decoration: none;
}

.dashboard-attention-card:hover,
.dashboard-attention-card:focus-visible {
  border-color: var(--industrial-primary);
  color: var(--industrial-primary-strong);
}

.dashboard-attention-value {
  grid-row: 1 / span 2;
  min-width: 2.8rem;
  font-size: 2rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-attention-label {
  font-weight: 700;
  line-height: 1.25;
}

.dashboard-attention-detail {
  color: var(--industrial-muted);
  font-size: 0.78rem;
}

.dashboard-work-list {
  display: flex;
  flex-direction: column;
}

.dashboard-work-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--industrial-border);
  color: var(--industrial-text);
  text-decoration: none;
}

.dashboard-work-row:last-child {
  border-bottom: 0;
}

.dashboard-work-row:hover,
.dashboard-work-row:focus-visible {
  color: var(--industrial-primary-strong);
  background: var(--industrial-primary-soft);
}

.dashboard-work-copy,
.dashboard-work-side,
.dashboard-service-row > span,
.dashboard-stock-row > span,
.dashboard-recent-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-work-copy {
  flex: 1 1 auto;
}

.dashboard-work-copy small,
.dashboard-work-side small,
.dashboard-service-row small,
.dashboard-stock-row small,
.dashboard-recent-copy small {
  color: var(--industrial-muted);
}

.dashboard-work-side {
  align-items: flex-end;
  flex: 0 0 auto;
  gap: 0.35rem;
}

.dashboard-service-row,
.dashboard-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  color: var(--industrial-text);
  text-decoration: none;
}

.dashboard-service-row:hover,
.dashboard-stock-row:hover {
  border-color: var(--industrial-primary);
  color: var(--industrial-primary-strong);
  background: var(--industrial-primary-soft);
}

.dashboard-service-date {
  flex: 0 0 auto;
  color: var(--industrial-muted);
  font-size: 0.8rem;
}

.dashboard-recent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-recent-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  color: var(--industrial-text);
  text-decoration: none;
}

.dashboard-recent-card:hover,
.dashboard-recent-card:focus-visible {
  border-color: var(--industrial-primary);
  color: var(--industrial-primary-strong);
  background: var(--industrial-primary-soft);
}

.dashboard-recent-copy {
  flex: 1 1 auto;
}

.dashboard-recent-copy strong,
.dashboard-recent-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-recent-type {
  color: var(--industrial-primary) !important;
  font-family: var(--sodtek-font);
  font-size: 0.68rem !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-browse-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface-low);
}

.dashboard-browse-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dashboard-browse-links a {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--industrial-border-strong);
  border-radius: 999px;
  color: var(--industrial-secondary);
  background: var(--industrial-surface);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.dashboard-browse-links a:hover,
.dashboard-browse-links a:focus-visible {
  border-color: var(--industrial-primary);
  color: var(--industrial-primary-strong);
  background: var(--industrial-primary-soft);
}

@media (max-width: 1199.98px) {
  .dashboard-action-grid,
  .dashboard-attention-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .dashboard-command-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 1.35rem;
  }

  .dashboard-date-block {
    min-width: 0;
  }

  .dashboard-search-form,
  .dashboard-browse-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-search-button {
    min-width: 0;
  }

  .dashboard-work-row {
    align-items: flex-start;
    padding: 0.9rem 1rem;
  }

  .dashboard-work-side {
    align-items: flex-end;
  }

  .dashboard-recent-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-browse-links {
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .dashboard-action-grid,
  .dashboard-attention-grid {
    gap: 0.65rem;
  }

  .dashboard-action-card {
    align-items: flex-start;
    flex-direction: column;
    min-height: 8.2rem;
  }

  .dashboard-action-text small {
    white-space: normal;
  }

  .dashboard-action-arrow {
    display: none;
  }

  .dashboard-attention-card {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 7.4rem;
  }

  .dashboard-attention-value {
    min-width: 0;
    font-size: 1.75rem;
  }

  .dashboard-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-work-icon {
    display: none;
  }

  .dashboard-work-side {
    max-width: 7rem;
  }
}

.empty-state {
  border: 1px dashed var(--industrial-border-strong);
  border-radius: var(--industrial-radius);
  background: var(--industrial-surface-low);
}

.detail-label {
  color: var(--industrial-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.well-visual-card {
  max-width: 430px;
  margin: 0 auto;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background:
    radial-gradient(circle at 18% 12%, rgba(186, 238, 217, 0.16), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: var(--industrial-shadow);
  overflow: hidden;
}

.well-visual-shell {
  display: flex;
  justify-content: center;
}

.well-visual {
  width: 100%;
  height: auto;
}

.well-visual-title,
.well-visual-gpm,
.well-visual-label,
.well-visual-label-small {
  fill: #06285f;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-weight: 800;
}

.well-visual-title {
  font-size: 64px;
  letter-spacing: 0.04em;
}

.well-visual-gpm-box {
  fill: #ffffff;
  stroke: #06285f;
  stroke-width: 4;
}

.well-visual-gpm {
  font-size: 52px;
}

.well-visual-label {
  font-size: 24px;
}

.well-visual-label-small {
  font-size: 21px;
}

.well-visual-measure-line,
.well-visual-reference-line {
  stroke: #06285f;
  stroke-width: 4;
}

.well-visual-reference-line {
  stroke: #172033;
  stroke-width: 3;
}

.well-visual-arrow {
  stroke: #06285f;
  stroke-width: 5;
}

.well-visual-arrow-head {
  fill: #06285f;
}

.map-marker {
  align-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 72, 75, 0.35);
  color: #ffffff;
  display: flex;
  font-size: 0.75rem;
  font-weight: 800;
  justify-content: center;
}

.map-marker span {
  line-height: 1;
}

.map-marker-pin {
  background: var(--sodtek-primary-dark);
}

.map-marker-irrigation {
  background: var(--sodtek-primary);
}

.map-marker-issue {
  background: #ca630b;
}

.map-marker-scout {
  background: #0d7a42;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(15, 23, 42, 0.018);
  --bs-table-hover-bg: rgba(27, 77, 62, 0.05);
  margin-bottom: 0;
}

.table thead th {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  background: var(--industrial-surface-low);
  color: var(--industrial-muted-soft);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  border-bottom-width: 1px;
}

.table > :not(caption) > * > * {
  border-color: var(--industrial-border);
  padding: 0.95rem 1rem;
}

.table-hover tbody tr:hover {
  background-color: rgba(27, 77, 62, 0.045);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:focus-visible,
.clickable-card:focus-visible {
  outline: 2px solid rgba(27, 77, 62, 0.4);
  outline-offset: -2px;
}

a {
  color: var(--industrial-primary);
}

a:hover {
  color: var(--industrial-primary-strong);
}

.btn {
  border-radius: var(--industrial-radius);
  font-weight: 600;
}

.btn-success {
  --bs-btn-bg: var(--industrial-primary);
  --bs-btn-border-color: var(--industrial-primary);
  --bs-btn-hover-bg: var(--industrial-primary-strong);
  --bs-btn-hover-border-color: var(--industrial-primary-strong);
  --bs-btn-active-bg: var(--industrial-primary-strong);
  --bs-btn-active-border-color: var(--industrial-primary-strong);
  --bs-btn-disabled-bg: #67b7ae;
  --bs-btn-disabled-border-color: #67b7ae;
}

.btn-outline-secondary {
  --bs-btn-color: var(--industrial-secondary);
  --bs-btn-border-color: var(--industrial-border-strong);
  --bs-btn-hover-color: var(--industrial-primary);
  --bs-btn-hover-bg: var(--industrial-surface-low);
  --bs-btn-hover-border-color: var(--industrial-primary-soft-2);
  --bs-btn-active-color: var(--industrial-primary);
  --bs-btn-active-bg: var(--industrial-primary-soft);
  --bs-btn-active-border-color: rgba(27, 77, 62, 0.2);
}

.form-control,
.form-select,
.form-check-input {
  border-color: var(--industrial-border-strong);
  border-radius: var(--industrial-radius);
  background-color: var(--industrial-surface);
  color: var(--industrial-text);
}

.form-control::placeholder {
  color: #8a9499;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(27, 77, 62, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(27, 77, 62, 0.12);
}

.form-check-input:checked {
  background-color: var(--industrial-primary);
  border-color: var(--industrial-primary);
}

.alert-success {
  --bs-alert-bg: var(--industrial-success-soft);
  --bs-alert-border-color: #b9eacb;
  --bs-alert-color: #0b5931;
}

.alert-danger {
  --bs-alert-bg: var(--industrial-danger-soft);
  --bs-alert-border-color: #f0b7b0;
  --bs-alert-color: #8c1717;
}

.text-bg-success {
  background-color: var(--industrial-success) !important;
}

.text-bg-secondary {
  background-color: var(--industrial-secondary) !important;
}

.bg-warning-subtle {
  background-color: var(--industrial-warning-soft) !important;
}

.table-warning {
  --bs-table-bg: var(--industrial-warning-soft);
  --bs-table-hover-bg: #ffe6c4;
}

.badge-soft-success {
  background: var(--industrial-success-soft);
  color: var(--industrial-success);
}

.badge-soft-secondary {
  background: var(--industrial-surface-mid);
  color: var(--industrial-secondary);
}

.asset-command-card {
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow-lg);
}

.asset-command-card .card-header {
  background: var(--industrial-surface-low);
}

.asset-category-panel {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
}

.asset-category-panel-header {
  border-bottom: 1px solid var(--industrial-border);
  background: var(--industrial-surface-low);
}

.asset-panel-kicker {
  color: var(--industrial-muted-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.asset-row-card {
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  background: var(--industrial-surface);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.asset-row-card:hover {
  border-color: rgba(27, 77, 62, 0.25);
  box-shadow: var(--industrial-shadow);
  transform: translateY(-1px);
}

.clickable-card {
  cursor: pointer;
}

.asset-unit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: var(--industrial-primary-soft);
  color: var(--industrial-primary);
  font-family: var(--sodtek-font);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.asset-unit-pill:hover {
  background: var(--industrial-primary-soft-2);
  color: var(--industrial-primary-strong);
}

.asset-title-link {
  color: var(--industrial-text);
  font-weight: 700;
  text-decoration: none;
}

.asset-title-link:hover {
  color: var(--industrial-primary);
}

.asset-status-pill {
  border: 1px solid var(--industrial-border);
  background: var(--industrial-surface-low);
  color: var(--industrial-secondary);
}

.asset-meta-line,
.mobile-card-meta {
  color: var(--industrial-muted);
}

.mobile-record-list {
  display: grid;
  gap: 1rem;
}

.mobile-record-card {
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.mobile-record-card .card-body {
  padding: 1rem;
}

.spray-workflow {
  padding: 0.85rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.spray-workflow-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0.35rem 0.65rem;
}

.spray-workflow-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.spray-workflow-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  color: var(--industrial-secondary);
  text-decoration: none;
}

.spray-workflow-step:hover,
.spray-workflow-step.complete {
  border-color: rgba(27, 77, 62, 0.3);
  background: var(--industrial-primary-soft);
  color: var(--industrial-primary);
}

.spray-workflow-step.active {
  border-color: var(--industrial-primary);
  background: var(--industrial-primary);
  color: #fff;
}

.spray-workflow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.8rem;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 700;
}

.spray-workflow-label,
.spray-workflow-detail {
  display: block;
}

.spray-workflow-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.spray-workflow-detail {
  margin-top: 0.1rem;
  color: var(--industrial-muted);
  font-size: 0.75rem;
}

.spray-workflow-step.active .spray-workflow-detail {
  color: rgba(255, 255, 255, 0.78);
}

.treatment-scout-photo {
  width: 120px;
  height: 100px;
  flex: 0 0 auto;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  object-fit: cover;
}

.treatment-selected-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(27, 77, 62, 0.3);
  border-radius: var(--industrial-radius);
  background: var(--industrial-primary-soft);
}

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

.treatment-option-card {
  padding: 1rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  background: var(--industrial-surface);
}

.treatment-option-card.selected {
  border-color: var(--industrial-primary);
  box-shadow: inset 0 0 0 1px var(--industrial-primary);
}

.mobile-card-photo,
.mobile-card-photo-placeholder {
  width: 78px;
  height: 78px;
  border-radius: var(--industrial-radius);
  border: 1px solid var(--industrial-border);
  background: var(--industrial-surface-low);
}

.mobile-card-photo {
  object-fit: cover;
}

.mobile-card-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--industrial-muted);
  font-size: 0.75rem;
}

.equipment-list-table {
  table-layout: fixed;
}

.equipment-list-table .equipment-unit-col {
  width: 6rem;
}

.equipment-list-table .equipment-image-col {
  width: 5.5rem;
}

.equipment-unit-column {
  width: 6rem;
  white-space: nowrap;
}

.equipment-image-column {
  width: 5.5rem;
  text-align: center;
}

.equipment-list-thumb {
  width: 4.5rem;
  height: 3.25rem;
  border-radius: var(--industrial-radius);
  object-fit: cover;
  border: 1px solid var(--industrial-border);
  background: var(--industrial-surface-low);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--industrial-muted);
  font-size: 0.72rem;
  text-align: center;
}

.equipment-list-thumb-placeholder {
  background: var(--industrial-surface-low);
}

.detail-photo {
  width: 180px;
  height: 140px;
  object-fit: cover;
}

.collapse-desktop-show {
  display: none;
}

@media (min-width: 992px) {
  .collapse.collapse-desktop-show {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
  }
}

@media (max-width: 1199.98px) {
  .app-topbar-search {
    min-width: 15rem;
  }
}

@media (max-width: 991.98px) {
  .app-main,
  .app-auth-shell {
    padding: 1rem;
  }

  .app-topbar {
    padding: 0.85rem 1rem;
  }

  .page-header {
    padding: 1.1rem;
    margin-bottom: 1rem;
  }

  .page-header h2,
  .page-header .h2 {
    font-size: 1.5rem;
  }

  .section-card .card-header,
  .section-card .card-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .form-control,
  .form-select,
  .btn {
    min-height: 48px;
    font-size: 1rem;
  }

  .btn-sm {
    min-height: 40px;
  }

  .mobile-card-actions .btn,
  .page-header .btn,
  .card-header .btn {
    flex: 1 1 auto;
  }

  .detail-photo {
    width: 100%;
    max-width: 100%;
    height: 190px;
  }

  .spray-workflow-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spray-workflow-detail {
    display: none;
  }

  .treatment-option-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .spray-workflow-heading {
    display: block;
  }

  .spray-workflow-heading .small {
    display: block;
    margin-top: 0.2rem;
  }

  .spray-workflow-step {
    padding: 0.6rem;
  }

  .spray-workflow-label {
    font-size: 0.8rem;
  }

  .treatment-scout-photo {
    width: 88px;
    height: 88px;
  }
}

.farm-booklet {
  color: #16202a;
}

.booklet-page {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: #fff;
  box-shadow: var(--industrial-shadow);
}

.booklet-cover {
  min-height: 70vh;
}

.booklet-cover-heading {
  margin-bottom: 1.25rem;
  text-align: center;
}

.booklet-cover-heading h1 {
  margin: 0;
  color: var(--sodtek-primary-dark);
  font-size: clamp(2.25rem, 7vw, 5.25rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.booklet-cover-heading h2,
.booklet-page-header h2 {
  margin: 0;
  color: var(--sodtek-primary);
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  font-weight: 850;
}

.booklet-kicker,
.booklet-label,
.booklet-section-title {
  font-family: var(--sodtek-font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.booklet-kicker {
  margin-bottom: 0.35rem;
  color: var(--sodtek-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.booklet-muted {
  color: var(--sodtek-muted);
  font-size: 0.9rem;
}

.booklet-map-card {
  overflow: hidden;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--sodtek-canvas);
}

.booklet-section-title {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--industrial-border);
  color: var(--sodtek-primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.booklet-map {
  height: 540px;
  background: #dbe4e8;
}

.booklet-map-short {
  height: 360px;
}

.booklet-field-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.booklet-field-map-card {
  overflow: hidden;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: #fff;
}

.booklet-field-map-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--industrial-border);
  background: var(--sodtek-surface-low);
}

.booklet-field-map-heading h3 {
  margin: 0;
  color: var(--sodtek-primary-dark);
  font-size: 1.25rem;
  font-weight: 850;
}

.booklet-field-map {
  height: 320px;
}

.booklet-field-map-meta {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem 1rem;
  color: #33414b;
  font-size: 0.88rem;
}

.booklet-summary-grid,
.booklet-notes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.booklet-summary-grid > div,
.booklet-note-box {
  padding: 1rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  background: var(--sodtek-surface-low);
}

.booklet-label {
  color: var(--sodtek-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.booklet-value {
  margin-top: 0.25rem;
  color: #172026;
  font-size: 1.05rem;
  font-weight: 800;
}

.booklet-page-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--sodtek-primary-soft);
}

.booklet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.booklet-table th,
.booklet-table td {
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--sodtek-border);
  vertical-align: top;
}

.booklet-table th {
  background: var(--sodtek-primary-soft);
  color: var(--sodtek-primary-dark);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.booklet-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--industrial-border);
  border-radius: var(--industrial-radius);
  color: var(--industrial-muted);
}

.booklet-note-box {
  min-height: 12rem;
}

.booklet-note-box h3 {
  color: var(--sodtek-primary);
  font-size: 1.1rem;
  font-weight: 850;
}

@media print {
  @page {
    size: letter landscape;
    margin: 0.45in;
  }

  html,
  body {
    background: #fff !important;
  }

  .app-sidebar,
  .app-topbar,
  .farm-booklet-controls,
  .no-print {
    display: none !important;
  }

  .app-layout,
  .app-workspace,
  .app-main {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }

  .farm-booklet {
    width: 100%;
  }

  .booklet-page {
    break-after: page;
    page-break-after: always;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .booklet-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .booklet-cover {
    min-height: 0;
  }

  .booklet-cover-heading h1 {
    font-size: 3.8rem;
  }

  .booklet-cover-heading h2,
  .booklet-page-header h2 {
    font-size: 2rem;
  }

  .booklet-map {
    height: 4.9in;
  }

  .booklet-map-short {
    height: 3.2in;
  }

  .booklet-field-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2in;
  }

  .booklet-field-map-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .booklet-field-map-heading {
    padding: 0.12in 0.15in;
  }

  .booklet-field-map-heading h3 {
    font-size: 0.98rem;
  }

  .booklet-field-map {
    height: 2.35in;
  }

  .booklet-field-map-meta {
    padding: 0.1in 0.15in;
    font-size: 0.68rem;
  }

  .booklet-summary-grid,
  .booklet-notes-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .booklet-table {
    font-size: 0.74rem;
  }

  .booklet-table th,
  .booklet-table td {
    padding: 0.33rem 0.38rem;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }
}
/* Prairie Direct: shared component layer, loaded after all page styles.
   Palette follows the supplied screen/token sheet; interactions use the
   design guide's forest green, amber and emerald semantic colors. */
:root {
  --bs-body-font-family: var(--sodtek-font);
  --bs-body-color: var(--sodtek-text);
  --bs-body-bg: var(--sodtek-canvas);
  --bs-border-color: var(--sodtek-border);
  --bs-primary-rgb: 27, 77, 62;
  --bs-success-rgb: 6, 95, 70;
  --bs-warning-rgb: 245, 158, 11;
  --bs-danger-rgb: 186, 26, 26;
  --bs-secondary-rgb: 100, 116, 139;
  --bs-link-color: var(--sodtek-primary);
  --bs-link-hover-color: var(--sodtek-primary-hover);
  --bs-border-radius: 8px;
  --bs-border-radius-lg: 12px;
}
body { font-family: var(--sodtek-font); font-size: 14px; line-height: 1.5; }
::selection { background: var(--sodtek-primary-tint); color: var(--sodtek-primary-dark); }
h1, .h1 { font-size: 36px; line-height: 1.22; font-weight: 700; letter-spacing: -.02em; }
h2, .h2 { font-size: 28px; line-height: 1.29; font-weight: 700; letter-spacing: -.015em; }
h3, .h3 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.metric-value, .dashboard-attention-value { font-size: 32px; line-height: 1.2; font-weight: 700; }
.metric-value, .dashboard-attention-value, .harvest-metric, .dispatch-quantity-grid,
.table .text-end, input[type=number], .asset-unit-pill { font-variant-numeric: tabular-nums; }
.text-muted, .form-text { color: var(--sodtek-muted) !important; }
.app-kicker, .hero-eyebrow, .metric-label, .detail-label, .dashboard-section-kicker,
.app-topbar-kicker, .app-user-role, .table thead th {
  font-family: var(--sodtek-font); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}

/* Navigation retains all existing permission-aware destinations. */
.app-sidebar { width: 260px; background: var(--sodtek-surface); padding: 24px 16px 16px; }
.app-sidebar-brand-mark { background: var(--sodtek-primary-dark); box-shadow: none; border-radius: 8px; }
.app-sidebar-title { font-size: 20px; font-weight: 700; color: var(--sodtek-primary-dark); }
.app-sidebar-link { min-height: 48px; border-radius: 8px; font-size: 14px; color: var(--sodtek-text); }
.app-sidebar-link:hover { transform: none; background: var(--sodtek-surface-low); }
.app-sidebar-link.active { background: var(--sodtek-primary); border-color: var(--sodtek-primary); color: white; }
.app-sidebar-sublink.active { color: var(--sodtek-primary-dark); background: var(--sodtek-primary-soft); }
.app-sidebar-sublink { padding: 12px; }
.app-topbar { background: var(--sodtek-canvas); backdrop-filter: none; box-shadow: none; }
.app-topbar-title { color: var(--sodtek-primary-dark); font-weight: 600; }
.app-topbar-icon-button, .app-mobile-menu-button { width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0; }
.app-topbar-search-input { height: 48px; border-radius: 8px; background: white; }
.app-mobile-nav-grid { background: white; gap: 8px; }
.app-mobile-nav-link { background: white; min-height: 48px; border-radius: 8px; }
.app-mobile-nav-link.active { background: var(--sodtek-primary); border-color: var(--sodtek-primary); color: white; }
.app-user-panel { box-shadow: none; background: var(--sodtek-surface-low); }
.app-main { padding: 32px; }

/* Surface hierarchy: white panels, pale inset areas, forest command headers. */
.card, .modal-content, .offcanvas, .dropdown-menu, .list-group-item {
  color: var(--sodtek-text); background-color: var(--sodtek-surface); border-color: var(--sodtek-border);
}
.card, .card.section-card, .section-card, .metric-card, .mobile-record-card,
.asset-command-card, .asset-row-card { border-radius: 8px; box-shadow: var(--industrial-shadow); }
.card-header, .section-card .card-header, .asset-command-card .card-header,
.asset-category-panel-header { background: var(--sodtek-surface); border-color: var(--sodtek-border); }
.page-header { padding: 24px; border-radius: 12px; }
.page-hero, .well-visual-card, .app-auth-shell { background: var(--sodtek-canvas); }
.dashboard-command-hero { background: var(--sodtek-primary); border-radius: 16px; }
.dashboard-command-hero .hero-eyebrow { color: var(--sodtek-primary-tint); }
.dashboard-command-copy h2 { font-size: 36px; letter-spacing: -.02em; }
.dashboard-action-card--field .dashboard-action-icon { background: var(--sodtek-success-soft); color: var(--sodtek-success); }
.dashboard-action-card--office .dashboard-action-icon { background: var(--sodtek-surface-mid); }
.dashboard-action-card--service .dashboard-action-icon { color: var(--sodtek-warning); }
.dashboard-action-card:hover { transform: none; }
.modal-content, .dropdown-menu { box-shadow: 0 12px 24px -4px rgba(15,23,42,.12); border-radius: 12px; }
.accordion { --bs-accordion-active-color: var(--sodtek-primary); --bs-accordion-active-bg: var(--sodtek-primary-soft); --bs-accordion-btn-focus-box-shadow: none; }
.list-group-item.active { background: var(--sodtek-primary); border-color: var(--sodtek-primary); color: white; }
.bg-light, .bg-body-tertiary { background-color: var(--sodtek-surface-low) !important; }

/* Buttons preserve destructive/warning semantics across every workspace. */
.btn { min-height: 48px; padding: 12px 16px; font-size: 15px; line-height: 22px; border-radius: 8px; font-weight: 600; }
.btn-primary, .btn-success, .dispatch-workspace .btn-success, .dispatch-create-form .btn-success {
  --bs-btn-bg: var(--sodtek-primary); --bs-btn-border-color: var(--sodtek-primary);
  --bs-btn-color: white; --bs-btn-hover-color: white; --bs-btn-active-color: white;
  --bs-btn-hover-bg: var(--sodtek-primary-hover); --bs-btn-hover-border-color: var(--sodtek-primary-hover);
  --bs-btn-active-bg: var(--sodtek-primary-dark); --bs-btn-active-border-color: var(--sodtek-primary-dark);
  --bs-btn-disabled-bg: var(--sodtek-primary); --bs-btn-disabled-border-color: var(--sodtek-primary);
  background: var(--sodtek-primary); color: white; border-color: var(--sodtek-primary);
}
.btn-primary:hover, .btn-success:hover, .dispatch-workspace .btn-success:hover, .dispatch-create-form .btn-success:hover {
  background: var(--sodtek-primary-hover); border-color: var(--sodtek-primary-hover); color: white;
}
.btn-outline-primary, .btn-outline-success, .btn-outline-secondary, .btn-secondary {
  --bs-btn-color: var(--sodtek-primary); --bs-btn-border-color: var(--sodtek-primary);
  --bs-btn-bg: white; --bs-btn-hover-color: var(--sodtek-primary-dark);
  --bs-btn-hover-bg: var(--sodtek-primary-soft); --bs-btn-hover-border-color: var(--sodtek-primary);
  --bs-btn-active-color: white; --bs-btn-active-bg: var(--sodtek-primary); --bs-btn-active-border-color: var(--sodtek-primary);
  --bs-btn-disabled-color: var(--sodtek-muted); --bs-btn-disabled-bg: var(--sodtek-surface-low);
  --bs-btn-disabled-border-color: var(--sodtek-outline);
}
.btn-warning { --bs-btn-bg: var(--sodtek-accent); --bs-btn-border-color: var(--sodtek-accent); --bs-btn-color: #131b2e; --bs-btn-hover-bg: #ffb95f; --bs-btn-hover-border-color: #ffb95f; font-weight: 700; }
.btn-danger { --bs-btn-bg: var(--sodtek-danger); --bs-btn-border-color: var(--sodtek-danger); }
.btn-link { --bs-btn-color: var(--sodtek-primary); --bs-btn-hover-color: var(--sodtek-primary-hover); }
.btn:disabled, .btn.disabled { opacity: .6; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--sodtek-primary); }
.nav-tabs { --bs-nav-tabs-link-active-color: var(--sodtek-primary); --bs-nav-tabs-link-active-border-color: var(--sodtek-border); }
.nav-link { color: var(--sodtek-primary); }
.pagination { --bs-pagination-color: var(--sodtek-primary); --bs-pagination-active-bg: var(--sodtek-primary); --bs-pagination-active-border-color: var(--sodtek-primary); --bs-pagination-focus-box-shadow: none; }
.page-link { min-height: 48px; padding: 12px 16px; }

/* Form controls and visible keyboard focus. */
.form-control, .form-select, .input { min-height: 48px; font-size: 16px; padding: 10px 16px; border-color: var(--sodtek-outline); border-radius: 8px; }
.form-select { padding-right: 36px; }
textarea.form-control { min-height: 104px; }
.form-control::placeholder { color: #64748b; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--sodtek-primary); box-shadow: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible, .form-check-input:focus-visible {
  outline: 2px solid var(--sodtek-primary); outline-offset: 2px; box-shadow: none;
}
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background: var(--sodtek-surface-low); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--sodtek-danger); }
.form-check { min-height: 32px; }
.form-check-input { width: 20px; height: 20px; border-radius: 4px; }
.form-check-label { padding: 3px 0 3px 4px; }
.form-switch .form-check-input { width: 40px; border-radius: 999px; }
.form-label { font-size: 13px; font-weight: 600; }

/* Tables, status chips and alerts. */
.table { --bs-table-color: var(--sodtek-text); --bs-table-hover-bg: var(--sodtek-surface-low); --bs-table-striped-bg: #f8f9fc; }
.table thead th { background: var(--sodtek-surface-low); color: var(--sodtek-muted); }
.table-hover tbody tr:hover { background: var(--sodtek-surface-low); }
.badge, .asset-status-pill, .dispatch-status { padding: 4px 12px; border-radius: 999px; line-height: 1.4; font-weight: 600; font-size: 12px; }
.badge.text-bg-success, .badge.bg-success, .badge-soft-success, .dispatch-status.dispatch-status--loaded, .dispatch-status.dispatch-status--departed {
  background: var(--sodtek-success-soft) !important; color: var(--sodtek-success) !important; border: 1px solid var(--sodtek-success-border);
}
.badge.text-bg-warning, .badge.bg-warning, .dispatch-status.dispatch-status--assigned, .dispatch-status.dispatch-status--acknowledged, .dispatch-status.dispatch-status--loading {
  background: var(--sodtek-warning-soft) !important; color: var(--sodtek-warning) !important; border: 1px solid var(--sodtek-warning-border);
}
.badge.text-bg-danger, .badge.bg-danger { background: var(--sodtek-danger-soft) !important; color: #93000a !important; border: 1px solid #f0b7b0; }
.badge.text-bg-primary, .badge.bg-primary { background: var(--sodtek-primary-soft) !important; color: var(--sodtek-primary-dark) !important; border: 1px solid var(--sodtek-outline); }
.badge.text-bg-secondary, .badge.bg-secondary, .badge-soft-secondary, .dispatch-status.dispatch-status--cancelled { background: var(--sodtek-surface-low) !important; color: #404945 !important; border: 1px solid var(--sodtek-outline); }
.alert { border-radius: 8px; box-shadow: none !important; }
.alert-success { --bs-alert-bg: var(--sodtek-success-soft); --bs-alert-border-color: var(--sodtek-success-border); --bs-alert-color: var(--sodtek-success); }
.alert-warning { --bs-alert-bg: var(--sodtek-warning-soft); --bs-alert-border-color: var(--sodtek-warning-border); --bs-alert-color: var(--sodtek-warning); }
.alert-info { --bs-alert-bg: var(--sodtek-surface-low); --bs-alert-border-color: var(--sodtek-border); --bs-alert-color: var(--sodtek-text); }

/* Harvest and dispatch use the same surfaces as the rest of the app. */
.dispatch-workspace, .dispatch-create-workspace { background: var(--sodtek-canvas); }
.dispatch-heading { background: var(--sodtek-primary); }
.dispatch-heading h2 { font-size: 28px; }
.dispatch-load-card, .dispatch-simple-load, .dispatch-summary-card, .dispatch-form-section, .dispatch-form-row {
  background: white; border: 1px solid var(--sodtek-border); border-radius: 8px; box-shadow: var(--industrial-shadow);
}
.dispatch-inline-edit, .dispatch-card-details { background: var(--sodtek-surface-low); border-color: var(--sodtek-border); }
.dispatch-card-top, .dispatch-truck-icon, .dispatch-form-section h3, .dispatch-load-top h3 a { color: var(--sodtek-primary); }
.dispatch-status { background: var(--sodtek-surface-low); color: var(--sodtek-primary-dark); border: 1px solid var(--sodtek-outline); }
.dispatch-status-tabs { background: var(--sodtek-surface-high); border-radius: 12px; }
.dispatch-status-tabs a { min-height: 48px; border-radius: 8px; color: var(--sodtek-text); }
.dispatch-status-tabs a.active { background: var(--sodtek-primary); color: white; }
.dispatch-quantity-stepper button { flex-basis: 48px; height: 48px; background: var(--sodtek-surface-low); color: var(--sodtek-primary-dark); }
.dispatch-quantity-stepper { border-color: var(--sodtek-outline); }
.dispatch-quantity-stepper .form-control { font-weight: 600; }
.dispatch-load-quantity { padding: 16px; background: var(--sodtek-canvas); border: 1px solid var(--sodtek-border); border-radius: 8px; }
.dispatch-filter-grid .form-select, .dispatch-filter-grid .form-control { font-size: 16px; }
.harvest-periods { background: var(--sodtek-surface-high); border-radius: 12px; padding: 4px; }
.harvest-periods .btn { border-color: transparent; }
.harvest-unknown-key { background: repeating-linear-gradient(135deg, var(--sodtek-muted) 0 4px, var(--sodtek-surface-low) 4px 7px); }

/* Sign-in/reset forms use the same card system, with a stable narrow width. */
.app-auth-shell { flex-direction: column; }
.app-auth-shell > .row { width: 100%; max-width: 480px; margin: 0; }
.app-auth-shell > .row > [class*=col-] { width: 100%; }
.app-auth-shell > .app-flash-stack { width: 100%; max-width: 480px; position: static; }

@media(max-width:991.98px) {
  .app-main { padding: 24px; }
  .btn-sm, .farm-more-menu-link, .app-sidebar-sublink, .dashboard-browse-links a { min-height: 48px; }
  .farm-more-menu-link { display: flex; align-items: center; }
  .form-check { min-height: 48px; padding-top: 8px; }
  .form-check-label { min-height: 40px; }
  .page-header h2, .page-header .h2, h2, .h2, .dispatch-heading h2 { font-size: 22px; line-height: 28px; }
  .dashboard-command-copy h2 { font-size: 28px; }
}
@media(max-width:575.98px) {
  .app-main { padding: 16px; }
  .app-topbar { padding: 12px 16px; gap: 8px; }
  .app-topbar-actions { gap: 8px; }
  .app-topbar-kicker { font-size: 10px; }
  .app-topbar-title { font-size: 14px; }
  .page-header { padding: 16px; }
  .dispatch-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dispatch-workspace, .dispatch-create-workspace { padding-left: 0; padding-right: 0; }
  .dispatch-package-quantity { grid-template-columns: 1fr; }
  .dispatch-load-quantity { padding: 12px; grid-template-columns: minmax(0,1fr) 88px; gap: 8px; }
  .dispatch-quantity-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dispatch-summary-card > summary { padding: 12px; }
  .dispatch-load-top { grid-template-columns: 24px minmax(0,1fr); }
  .dispatch-load-top .dispatch-status { grid-column: 2; justify-self: start; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .app-main { padding: 0; }
  .dispatch-status-tabs { display: none !important; }
  .btn { min-height: auto; }
}

.dispatch-preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.dispatch-quick-add > summary { min-height: 48px; padding: 12px 0; color: var(--sodtek-primary); cursor: pointer; }
@media(max-width:575.98px) { .dispatch-preset-grid { grid-template-columns: 1fr; } }

/* Dense load cards, with comfortable tap targets and no fixed footer. */
.dispatch-top-views { display: flex; gap: 8px; margin-top: 10px; }
.dispatch-load-list { display: grid; gap: 8px; }
.dispatch-load-card.dispatch-compact-load { padding: 10px 12px; }
.dispatch-compact-heading { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.dispatch-compact-heading h3 { min-width: 0; line-height: 1.35; }
.dispatch-compact-heading a { color: var(--sodtek-primary); text-decoration: none; }
.dispatch-compact-heading .dispatch-status { flex-shrink: 0; padding: 2px 8px; }
.dispatch-compact-meta { color: var(--sodtek-muted); font-size: 13px; line-height: 1.4; margin-top: 3px; }
.dispatch-compact-grass { margin: 6px 0 3px; font-size: 14px; line-height: 1.4; }
.dispatch-compact-grass > div + div { margin-top: 3px; }
.dispatch-compact-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 6px; margin-top: 4px; }
.dispatch-compact-actions > .dispatch-inline-edit { margin-top: 0 !important; }
.dispatch-compact-actions > .dispatch-inline-edit > summary { min-height: 44px; display: flex; align-items: center; font-size: 13px; padding: 6px 10px; }
.dispatch-compact-actions > .dispatch-inline-edit[open] { flex-basis: 100%; }
.dispatch-compact-actions .dispatch-load-action { margin-left: auto; }
.dispatch-compact-actions .dispatch-load-action[open] { margin-left: 0; }
.harvester-location-group h3 { margin: 14px 0 8px; color: var(--sodtek-primary); }

/* Equipment valuation worksheet. */
.valuation-table-wrap { background: white; border: 1px solid var(--sodtek-border); border-radius: 12px; }
.valuation-table { margin-bottom: 0; }
.valuation-history { padding-left: 1.2rem; }
.valuation-history li { margin: .75rem 0; }
.valuation-table tr[hidden] { display: none; }

.incoming-message-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Direct order entry and daily harvest requests: tablet columns, phone stacking. */
.dispatch-create-workspace { max-width: 960px; }
.dispatch-order-basics { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.dispatch-create-form .dispatch-grass-entry { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); column-gap: 16px; align-items: start; }
.dispatch-create-form .dispatch-grass-entry[hidden] { display: none; }
.dispatch-create-form .dispatch-grass-entry > button { justify-self: start; grid-column: 1 / -1; }
.dispatch-order-save { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dispatch-order-save .btn, .dispatch-order-presets .btn { min-height: 48px; white-space: normal; }
.dispatch-form-section > summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
.harvest-request-filters { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: end; gap: 12px; margin: 16px 0 8px; }
.dispatch-top-views a[aria-current=page] { background: var(--sodtek-primary); color: white; }
.harvest-day-links { display: flex; flex-wrap: wrap; gap: 8px; }
.harvest-request-totals, .harvest-request-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.harvest-request-total { border-radius: 12px; padding: 12px 16px; background: var(--sodtek-primary); color: white; }
.harvest-request-total strong { display: block; font-size: 2rem; line-height: 1.2; }
.harvest-request-location h3 { color: var(--sodtek-primary); margin: 20px 0 10px; }
.harvest-request-card { border: 1px solid var(--sodtek-border); border-radius: 12px; background: white; overflow: hidden; align-self: start; }
.harvest-request-card > summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 12px; padding: 14px; cursor: pointer; list-style: none; }
.harvest-request-card > summary::-webkit-details-marker { display: none; }
.harvest-request-card > summary:focus-visible { outline: 3px solid var(--sodtek-primary); outline-offset: -4px; }
.harvest-request-product { overflow-wrap: anywhere; }
.harvest-request-product small, .harvest-request-quantity span { display: block; color: var(--sodtek-muted); }
.harvest-request-quantity { text-align: right; }
.harvest-request-quantity strong { display: block; font-size: 1.8rem; color: var(--sodtek-primary); line-height: 1.2; }
.harvest-request-quantity span, .harvest-request-detail { font-size: .8rem; }
.harvest-request-detail { grid-column: 1 / -1; color: var(--sodtek-muted); }
.harvest-request-orders { list-style: none; padding: 0 14px; margin: 0; border-top: 1px solid var(--sodtek-border); }
.harvest-request-orders li { padding: 10px 0; overflow-wrap: anywhere; }
.harvest-request-orders li + li { border-top: 1px solid var(--sodtek-border); }
.harvest-request-orders a { display: block; min-height: 44px; padding: 10px 0; }
.harvest-request-orders small { display: block; color: var(--sodtek-muted); white-space: pre-wrap; }
@media (max-width: 767.98px) {
  .dispatch-create-form .dispatch-grass-entry, .harvest-request-grid { grid-template-columns: minmax(0,1fr); }
  .harvest-request-filters { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .harvest-request-filters > input[type=submit] { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
  .dispatch-order-basics { grid-template-columns: minmax(0,1fr); gap: 0; }
  .dispatch-order-save { grid-template-columns: minmax(0,1fr); }
  .dispatch-order-presets .dispatch-preset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Equipment audit stays on the worksheet, including unsaved value entries. */
.valuation-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
/* Fit the available workspace, including an iPad with the sidebar open. */
.valuation-table-wrap { container-type: inline-size; }
.valuation-workspace .valuation-table { width: 100%; min-width: 0; table-layout: fixed; }
.valuation-col-name { width: 24%; }
.valuation-col-year { width: 6%; }
.valuation-col-model { width: 10%; }
.valuation-col-serial { width: 12%; }
.valuation-col-money { width: 12%; }
.valuation-col-new { width: 16%; }
.valuation-col-history { width: 8%; }
.valuation-workspace .valuation-table th, .valuation-workspace .valuation-table td { min-width: 0; padding: 10px 8px; overflow-wrap: anywhere; }
.valuation-workspace .valuation-table thead th { font-size: 11px; letter-spacing: .02em; white-space: normal; }
.valuation-workspace .valuation-table td { font-size: 14px; }
.valuation-workspace .valuation-table input[type=number] { width: 100%; min-width: 0; padding: 8px 6px; font-size: 16px; min-height: 44px; }
.valuation-identity { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: start; gap: 8px; }
.valuation-name-actions { min-width: 0; }
.valuation-asset-name { display: block; overflow-wrap: anywhere; font-size: 14px; line-height: 1.3; }
.valuation-quick-edit { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 400; }
.valuation-photo-action { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px dashed var(--sodtek-primary); border-radius: 8px; color: var(--sodtek-primary); font-size: 12px; line-height: 1.2; text-align: center; text-decoration: none; }
.valuation-photo { width: 100%; height: 100%; object-fit: cover; }
.valuation-history-cell details { position: relative; }
.valuation-history-cell summary { min-height: 44px; padding-top: 10px; font-size: 12px; }
.valuation-history-cell .valuation-history { position: absolute; right: 0; top: 100%; width: min(320px, 75vw); max-height: 50vh; overflow: auto; z-index: 5; background: white; border: 1px solid var(--sodtek-border); border-radius: 8px; padding: 12px 12px 12px 30px; box-shadow: 0 8px 24px #0002; }
@container (max-width: 850px) {
  .valuation-workspace .valuation-table, .valuation-table tbody { display: block; }
  .valuation-table colgroup { display: none; }
  .valuation-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .valuation-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--sodtek-border); padding: 8px; }
  .valuation-table tbody th { grid-column: 1 / -1; }
  .valuation-table td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--sodtek-muted); margin-bottom: 4px; }
  .valuation-table .valuation-history-cell { grid-column: 1 / -1; }
  .valuation-history-cell .valuation-history { position: static; width: auto; max-height: none; box-shadow: none; }
}
@container (max-width: 420px) {
  .valuation-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.valuation-audit-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 20px; border: 1px solid var(--sodtek-border); border-radius: 16px; color: var(--sodtek-text); }
.valuation-audit-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.valuation-audit-dialog .form-control { min-height: 48px; font-size: 16px; }
.valuation-audit-dialog .btn { min-height: 48px; }
@media (max-width: 767.98px) {
  .valuation-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .valuation-filter-grid > div:first-child { grid-column: 1 / -1; }
}
