.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(36, 107, 69, 0.13), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.08), transparent 24%),
    linear-gradient(180deg, #f5f8f5 0%, #edf3ee 100%);
}

.auth-card,
.auth-card-copy,
.workspace-toolbar-actions {
  display: grid;
}

.auth-card {
  width: min(100%, 560px);
  gap: 20px;
  padding: 28px;
  border-radius: 32px;
  background: var(--glass-panel);
  border: 1px solid rgba(211, 226, 214, 0.9);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(24px);
}

.auth-card-copy {
  gap: 8px;
}

.auth-card-copy h1 {
  margin: 0;
}

.auth-card-copy p {
  margin: 0;
  color: var(--muted);
}

.auth-form-grid {
  gap: 12px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  position: relative;
  background:
    linear-gradient(90deg, #184b31 0 252px, #ffffff 252px 100%);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
}

.sidebar {
  padding: 20px 14px;
  background: #184b31;
  color: #f6fbf7;
  display: grid;
  gap: 16px;
  align-content: start;
  border-right: 1px solid rgba(10, 31, 20, 0.98);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  backdrop-filter: none;
  box-shadow: 18px 0 42px rgba(10, 31, 20, 0.22);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 140px;
  background: none;
  pointer-events: none;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.sidebar-brand-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 18px rgba(10, 31, 20, 0.16);
}

.sidebar-brand-icon {
  width: 26px;
  height: 26px;
  display: block;
}

.sidebar-eyebrow {
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(226, 245, 233, 0.88);
}

.sidebar h1 {
  margin: 0 0 6px;
  font-size: 1.14rem;
  color: #ffffff;
}

.sidebar p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(231, 244, 235, 0.86);
}

.sidebar-nav,
.nav-group,
.nav-subnav,
.page,
.page-surface,
.section,
.crop-results,
.compare-columns,
.page-stack,
.scenario-layout {
  display: grid;
}

.sidebar-nav,
.nav-group {
  gap: 10px;
}

.nav-subnav {
  gap: 4px;
  padding-left: 0;
}

.nav-group {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.nav-group-primary {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.nav-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(228, 243, 233, 0.72);
  padding: 2px 0 0;
}

.nav-subnav-primary {
  gap: 6px;
}

.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 44px;
  text-align: left;
  border-radius: 16px;
  padding: 11px 13px;
  background: transparent;
  color: rgba(241, 249, 244, 0.96);
  border: 1px solid transparent;
  font-size: 0.91rem;
  font-weight: 650;
  box-shadow: none;
}

.ui-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ui-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.section-title-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-title-icon {
  width: 17px;
  height: 17px;
  color: rgba(24, 75, 49, 0.82);
}

.nav-button-icon {
  opacity: 0.88;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: none;
}

.nav-button.active {
  background: #ffffff;
  color: var(--accent-dark);
  border-color: rgba(229, 239, 232, 0.94);
  box-shadow: 0 10px 20px rgba(10, 31, 20, 0.22);
}

.sidebar-note {
  padding: 12px 0 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(232, 244, 236, 0.82);
  font-size: 0.82rem;
  line-height: 1.55;
}

.content-area {
  padding: 22px 22px 34px;
  display: grid;
  gap: 22px;
  align-content: start;
  min-width: 0;
  background: #ffffff;
  box-shadow:
    inset 1px 0 0 rgba(218, 225, 219, 0.98);
}

.scenario-results-shell,
.scenario-results,
.results-hero,
.results-hero-copy,
.results-section-heading,
.results-section-heading-copy,
.results-data-stack,
.calculation-overview-stack {
  display: grid;
}

.scenario-results-shell,
.scenario-results,
.results-data-stack,
.calculation-overview-stack {
  gap: 16px;
}

.results-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.results-hero-copy,
.results-section-heading-copy {
  gap: 8px;
}

.results-hero-grid,
.results-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.results-kpi-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.results-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 2px 10px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(214, 224, 217, 0.98),
    0 14px 28px rgba(15, 23, 42, 0.04);
  backdrop-filter: none;
  position: sticky;
  top: 0;
  z-index: 20;
}

.workspace-toolbar > .nav-toggle {
  grid-column: 1 / -1;
}

.workspace-toolbar-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  max-width: min(80ch, 100%);
}

.workspace-toolbar-copy h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  line-height: 1;
}

.workspace-toolbar-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.24;
  max-width: 64ch;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.workspace-toolbar .workspace-eyebrow {
  margin-bottom: 0;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: rgba(24, 75, 49, 0.94);
}

.workspace-toolbar-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.workspace-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(205, 217, 207, 0.86);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.workspace-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #184b31;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}

.workspace-user-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.workspace-user-title,
.workspace-user-subtitle {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-user-title {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(24, 75, 49, 0.76);
}

.workspace-user-subtitle {
  font-size: 0.82rem;
  color: var(--text);
}

.workspace-toolbar-actions .secondary-button {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.nav-toggle {
  display: none;
  min-width: 118px;
  margin-top: 4px;
}

.page {
  display: none;
  gap: 14px;
  min-width: 0;
}

.page.active {
  display: grid;
}

.is-hidden {
  display: none !important;
}

.section,
.crop-results,
.compare-columns,
.dashboard-overview-stack,
.page-surface,
.scenario-layout {
  gap: 16px;
  min-width: 0;
}

.page-surface {
  width: min(100%, 1500px);
}

.dashboard-overview-stack {
  display: grid;
}

.grid,
.dashboard-grid,
.result-grid,
.summary-grid,
.form-section-grid,
.override-grid,
.scenario-summary-strip,
.sensitivity-grid {
  display: grid;
  gap: 12px;
}

.grid,
.dashboard-grid,
.result-grid,
.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.form-section-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.override-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.scenario-summary-strip,
.sensitivity-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.scenario-summary-strip > * {
  height: 100%;
}

.management-columns,
.dashboard-grid,
.summary-grid {
  margin-bottom: 12px;
}

.toolbar,
.button-row,
.saved-scenario-row,
.crop-card-header,
.crop-actions,
.import-controls,
.compare-controls,
.sensitivity-controls,
.saved-scenario-actions,
.table-toolbar,
.table-actions,
.contract-work-entry-head,
.contract-work-entry-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar,
.import-controls,
.compare-controls,
.sensitivity-controls {
  align-items: end;
}

.table-toolbar {
  justify-content: space-between;
  align-items: center;
}

.table-toolbar .helper-text {
  margin-left: auto;
}

.compact-action-row {
  justify-content: flex-end;
  margin-bottom: 2px;
}

.mobile-workflow-nav {
  display: none;
}

.workflow-stack,
.workflow-card,
.workflow-subsection,
.workflow-action-copy,
.workflow-list,
.workflow-list-card,
.workflow-detail-copy,
.workflow-detail-actions,
.workflow-kv-list,
.workflow-form-grid {
  display: grid;
}

.workflow-stack,
.workflow-card,
.workflow-subsection,
.workflow-form-grid {
  gap: 18px;
}

.workflow-grid,
.workflow-grid-actions,
.workflow-inline-grid,
.workflow-tile-grid,
.workflow-filter-row {
  display: grid;
  gap: 16px;
}

.workflow-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.workflow-grid-actions {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.template-studio-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
  gap: 18px;
}

.workflow-inline-grid {
  grid-template-columns: minmax(0, 1fr) 130px;
}

.workflow-tile-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.workflow-filter-row {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}

.workflow-summary-strip {
  margin-bottom: 2px;
}

.workflow-card,
.workflow-detail-hero,
.workflow-action-card,
.workflow-list-card,
.workflow-empty-card {
  padding: 18px;
  border: 1px solid rgba(215, 226, 217, 0.86);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(247, 250, 247, 0.72) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 22px rgba(15, 23, 42, 0.04);
  min-width: 0;
  backdrop-filter: blur(18px);
}

.workflow-card-head,
.workflow-list-card-head,
.workflow-list-card-meta,
.workflow-detail-hero {
  display: flex;
  gap: 14px;
}

.workflow-card-head,
.workflow-list-card-head,
.workflow-list-card-meta {
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.workflow-card-head h3,
.workflow-list-card-head strong {
  letter-spacing: -0.02em;
}

.workflow-card-head > div {
  display: grid;
  gap: 6px;
}

.workflow-action-card {
  display: grid;
  gap: 16px;
  align-content: space-between;
  padding: 20px;
  background:
    radial-gradient(circle at top right, rgba(36, 107, 69, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(244, 248, 244, 0.84) 100%);
}

.workflow-subsection {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(217, 229, 219, 0.92);
  background: rgba(251, 253, 251, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.workflow-action-copy {
  gap: 6px;
}

.workflow-action-copy strong,
.workflow-list-card strong,
.workflow-empty-card strong,
.workflow-kv-list strong {
  color: var(--text);
}

.workflow-action-copy span,
.workflow-empty-card span,
.workflow-list-card-meta,
.workflow-kv-list span {
  color: var(--muted);
}

.workflow-list {
  gap: 10px;
}

.field-page-stack {
  gap: 14px;
}

.field-summary-strip {
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.field-summary-pill {
  padding: 12px 14px;
  border-radius: 18px;
}

.field-summary-pill strong {
  font-size: 0.98rem;
}

.field-list {
  gap: 8px;
}

.template-sequence-list {
  gap: 12px;
}

.workflow-list-card {
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(220, 229, 221, 0.96);
  box-shadow: none;
  backdrop-filter: none;
}

.field-list-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
}

.field-list-section {
  gap: 12px;
  padding: 14px 16px;
}

.field-list-section .workflow-card-head {
  align-items: end;
  gap: 10px 14px;
}

.field-list-section .workflow-card-head > div {
  gap: 2px;
}

.field-list-section .workflow-card-head h3 {
  margin: 0;
}

.field-list-section .workflow-card-head p {
  font-size: 0.84rem;
}

.field-list-toolbar-actions {
  gap: 8px;
  margin-bottom: 0;
}

.field-list-search {
  width: min(100%, 490px);
}

.field-list-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.field-list-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.field-list-status-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.field-list-card .field-list-topline strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.field-list-meta {
  font-size: 0.8rem;
  gap: 8px 12px;
}

.field-list-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.28;
  max-width: 72ch;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.field-list-actions {
  margin-top: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.field-list-actions .compact-button {
  min-height: 38px;
  padding: 8px 12px;
}

.button-icon {
  width: 16px;
  height: 16px;
}

.field-status-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(205, 217, 207, 0.9);
  background: rgba(246, 249, 246, 0.92);
}

.field-status-icon .ui-icon {
  width: 15px;
  height: 15px;
}

.template-sequence-entry {
  gap: 12px;
  border-radius: 22px;
}

.template-sequence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-measure-actions {
  margin-top: 2px;
}

.workflow-filter-toolbar {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 12px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.workflow-filter-toolbar label,
.workflow-filter-row label {
  gap: 8px;
}

.workflow-sequence-list {
  display: grid;
  gap: 12px;
}

.workflow-sequence-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  border-radius: 20px;
  border: 1px solid rgba(205, 217, 207, 0.82);
  background: rgba(255, 255, 255, 0.88);
}

.workflow-sequence-item.is-next {
  border-color: rgba(36, 107, 69, 0.28);
  box-shadow: 0 0 0 3px rgba(145, 190, 155, 0.14);
}

.workflow-sequence-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(236, 245, 238, 0.96);
  color: var(--accent-dark);
  font-weight: 800;
  border: 1px solid rgba(179, 203, 184, 0.7);
}

.workflow-sequence-copy {
  display: grid;
  gap: 4px;
}

.workflow-sequence-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.workflow-list-card.is-selected {
  border-color: rgba(36, 107, 69, 0.28);
  box-shadow: 0 0 0 3px rgba(145, 190, 155, 0.16), 0 14px 28px rgba(15, 23, 42, 0.06);
}

.workflow-list-card-meta {
  font-size: 0.88rem;
}

.workflow-empty-card {
  display: grid;
  gap: 8px;
  align-content: start;
  background: rgba(252, 253, 252, 0.82);
  border-style: dashed;
}

.workflow-empty-inline {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 2px 0 0;
}

.workflow-empty-inline strong {
  color: var(--text);
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.workflow-empty-inline span {
  color: var(--muted);
  max-width: 68ch;
}

.workflow-card > .workflow-empty-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.workflow-card > .workflow-empty-card strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.workflow-card > .workflow-empty-card span {
  max-width: 68ch;
}

.workflow-detail-hero {
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
}

.workflow-detail-copy {
  gap: 8px;
  max-width: 70ch;
}

.workflow-detail-actions {
  gap: 10px;
  min-width: min(100%, 220px);
}

.workflow-detail-actions > * {
  width: 100%;
}

.workflow-kv-list {
  gap: 10px;
}

.workflow-kv-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(189, 208, 191, 0.92);
}

.workflow-kv-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.workflow-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-form-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(217, 229, 219, 0.92);
  background: rgba(251, 253, 251, 0.76);
}

.workflow-form-section-head {
  display: grid;
  gap: 4px;
}

.workflow-form-section-head strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.workflow-form-section-head span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.workflow-form-section-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.template-editor-card {
  align-content: start;
}

.template-form {
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  align-items: start;
}

.template-form-main,
.template-form-sidebar {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.template-form-sidebar {
  position: sticky;
  top: 72px;
}

.template-action-panel {
  gap: 16px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(245, 249, 245, 0.96) 0%, rgba(237, 244, 238, 0.92) 100%);
}

.template-form-actions {
  padding-top: 0;
}

.template-form-actions > * {
  flex: 1 1 auto;
}

.template-form-actions .primary-button,
.template-form-actions .secondary-button {
  width: 100%;
}

.template-form-tip-panel {
  border-radius: 22px;
  background: rgba(250, 252, 250, 0.94);
}

.workflow-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

.workflow-form-actions > * {
  flex: 1 1 220px;
}

.workflow-form-tip {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(237, 244, 239, 0.92);
  border: 1px solid rgba(205, 220, 208, 0.88);
}

.workflow-form-tip strong {
  color: var(--accent-dark);
}

.workflow-tile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(205, 217, 207, 0.88);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(10px);
}

.workflow-tile-button:hover {
  background: rgba(240, 253, 244, 0.96);
  border-color: rgba(22, 101, 52, 0.22);
  transform: translateY(-1px);
}

.workflow-search-field {
  width: 100%;
}

.workflow-search-field .table-search-input {
  width: 100%;
}

.workflow-form-grid label {
  display: grid;
  gap: 6px;
}

.workflow-form-grid textarea {
  resize: vertical;
}

.farm-defaults-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(205, 217, 207, 0.88);
  border-radius: 26px;
  background: var(--glass-panel);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
}

.scenario-library-section > .saved-scenarios,
.scenario-contract-work-section.saved-scenarios,
.scenario-override-section.saved-scenarios {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.scenario-library-section > .saved-scenarios > summary,
.scenario-contract-work-section.saved-scenarios > summary,
.scenario-override-section.saved-scenarios > summary {
  padding: 0;
  margin-bottom: 14px;
}

.scenario-library-section > .saved-scenarios[open] > summary,
.scenario-contract-work-section.saved-scenarios[open] > summary,
.scenario-override-section.saved-scenarios[open] > summary {
  margin-bottom: 14px;
}

.compact-section {
  gap: 10px;
}

.farm-defaults-section h3 {
  margin-bottom: 0;
}

.farm-defaults-section h4 {
  margin: 0;
}

.farm-fields-section {
  gap: 12px;
  padding: 14px;
}

.farm-fields-section .table-toolbar {
  gap: 10px;
  align-items: end;
}

.farm-fields-section .scenario-summary-strip {
  margin-bottom: 0;
}

.farm-fields-search-toolbar {
  justify-content: flex-start;
  margin-bottom: 6px;
}

.farm-fields-search-toolbar .table-search-field {
  width: min(100%, 300px);
}

.rotation-year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.field-map-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.45fr);
  align-items: start;
}

.rotation-planning-map-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.5fr);
  align-items: start;
}

.field-map-side,
.field-map-panel,
.field-map-map-shell,
.field-map-details {
  display: grid;
  gap: 12px;
}

.rotation-planning-map-side,
.rotation-planning-map-panel {
  display: grid;
  gap: 12px;
}

.field-map-toolbar-select {
  min-width: 240px;
}

.field-map-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.field-map-map-shell {
  position: relative;
  min-height: 540px;
  border: 1px solid rgba(205, 217, 207, 0.86);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 249, 246, 0.9) 100%);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.field-map-canvas {
  width: 100%;
  min-height: 540px;
}

.field-map-empty-state {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: none;
  pointer-events: none;
}

.field-map-empty-state.is-visible {
  display: block;
}

.field-map-empty-card {
  display: grid;
  gap: 6px;
  width: min(420px, 100%);
  margin-left: auto;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(217, 231, 218, 0.96);
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.field-map-empty-card-inline {
  width: min(320px, 100%);
}

.rotation-planning-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.rotation-planning-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.rotation-planning-filter.is-disabled {
  opacity: 0.55;
}

.rotation-planning-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
}

.rotation-planning-layer-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.rotation-planning-legend-head {
  display: grid;
  gap: 4px;
}

.rotation-planning-select-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.rotation-planning-select-field select {
  min-height: 42px;
}

.rotation-planning-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 231, 218, 0.96);
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.rotation-planning-legend-item.is-active {
  border-color: rgba(52, 93, 69, 0.28);
  box-shadow: 0 0 0 3px rgba(145, 190, 155, 0.18);
  color: var(--text);
}

.rotation-planning-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.rotation-planning-legend-swatch.is-neutral {
  background: #9ca3af;
}

.rotation-planning-legend-swatch.is-all {
  background: linear-gradient(135deg, #d97706 0%, #2563eb 22%, #16a34a 48%, #7e22ce 74%, #9ca3af 100%);
}

.rotation-year-card {
  padding: 12px;
  border: 1px solid rgba(217, 231, 218, 0.96);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 248, 243, 0.96) 100%);
  display: grid;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.rotation-year-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.rotation-year-top strong {
  font-size: 0.9rem;
}

.rotation-year-card label {
  gap: 4px;
  font-size: 0.82rem;
}

.rotation-year-card select {
  min-height: 38px;
  padding: 8px 10px;
}

.contract-work-entry-list {
  display: grid;
  gap: 12px;
}

.contract-work-entry-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.contract-work-entry-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.contract-work-cost-row {
  padding-top: 10px;
  border-top: 1px dashed rgba(189, 208, 191, 0.92);
}

.contract-work-note-field {
  width: 100%;
}

.contract-work-active-toggle {
  white-space: nowrap;
}

.compact-derived-box {
  min-height: 60px;
}

.rotation-year-badge {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 700;
}

.saved-scenario-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.override-field {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(217, 231, 218, 0.96);
  background: rgba(255, 255, 255, 0.92);
}

.override-field.changed {
  border-color: rgba(22, 101, 52, 0.28);
  background: rgba(240, 253, 244, 0.9);
}

.compare-table-wrapper,
.results-table-wrapper {
  overflow-x: auto;
  margin-top: 8px;
}

.override-table .scenario-input-cell {
  min-width: 180px;
}

.override-row.changed td {
  background: rgba(240, 253, 244, 0.88);
}

.results-section {
  display: grid;
  gap: 10px;
}

.integration-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.integration-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.integration-panel-grid > * {
  min-width: 0;
}

.user-management-grid {
  grid-template-columns: 1fr;
  align-items: start;
}

.user-management-table-section,
.user-management-form-section {
  min-width: 0;
}

.user-management-form-section {
  width: 100%;
}

.user-management-grid .compare-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  isolation: isolate;
}

.user-create-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.user-create-form-grid .checkbox-label {
  margin-top: 2px;
}

.user-create-form-grid button[type="submit"] {
  align-self: end;
}

@media (max-width: 1380px) {
  .workspace-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
  }

  .workspace-toolbar-actions {
    width: 100%;
    justify-items: end;
  }
}

.results-section-collapsible {
  margin-top: 18px;
  padding: 16px;
}

.results-section-collapsible summary {
  margin-bottom: 0;
}

.results-section-collapsible[open] summary {
  margin-bottom: 14px;
}

.scenario-override-group {
  margin-top: 0;
  padding: 14px 16px;
}

.scenario-override-group summary {
  margin-bottom: 0;
}

.scenario-override-group[open] summary {
  margin-bottom: 10px;
}

.scenario-library-section .saved-scenarios,
.results-panel.saved-scenarios {
  margin-top: 0;
}

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(92vw, 360px);
    max-width: 360px;
    height: 100vh;
    padding: 20px 16px 28px;
    gap: 20px;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  }

  .sidebar-brand {
    gap: 16px;
  }

  .sidebar-brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .sidebar-brand-icon {
    width: 30px;
    height: 30px;
  }

  .sidebar-eyebrow,
  .nav-group-label {
    font-size: 0.78rem;
  }

  .sidebar h1 {
    font-size: 1.35rem;
  }

  .sidebar p,
  .sidebar-note {
    font-size: 0.94rem;
  }

  .nav-group {
    padding: 0;
    border-radius: 0;
  }

  .nav-group-primary {
    border-radius: 0;
  }

  .nav-subnav {
    gap: 6px;
    padding-left: 0;
  }

  .nav-button {
    min-height: 50px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 1rem;
  }

  .app-shell.nav-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .content-area {
    padding: 16px 14px 102px;
    gap: 18px;
  }

  .mobile-workflow-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 30px;
    border: 1px solid rgba(164, 188, 170, 0.96);
    background: linear-gradient(180deg, rgba(231, 240, 233, 0.98) 0%, rgba(221, 233, 224, 0.96) 100%);
    box-shadow:
      0 22px 42px rgba(15, 23, 42, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(28px);
    z-index: 35;
  }

  .mobile-workflow-button {
    min-height: 60px;
    padding: 10px 8px;
    border-radius: 20px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.15;
  }

  .mobile-workflow-button.active {
    background: rgba(247, 250, 247, 0.96);
    color: var(--accent-dark);
    border-color: rgba(36, 107, 69, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }

  .workspace-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
    top: 0;
    padding: 10px 0 8px;
    border-radius: 0;
    box-shadow: 0 1px 0 rgba(214, 224, 217, 0.98);
  }

  .workspace-toolbar-actions {
    justify-content: flex-start;
  }

  .workspace-toolbar-copy h1 {
    font-size: 1.9rem;
  }

  .workspace-toolbar-copy p {
    font-size: 0.86rem;
    max-width: 100%;
    -webkit-line-clamp: 2;
  }

  .workspace-user-chip {
    min-height: 46px;
    padding: 8px 10px;
    font-size: 0.88rem;
  }

  .field-map-layout {
    grid-template-columns: 1fr;
  }

  .integration-panel-grid {
    grid-template-columns: 1fr;
  }

  .user-management-grid {
    grid-template-columns: 1fr;
  }

  .rotation-planning-map-layout {
    grid-template-columns: 1fr;
  }

  .scenario-config-section .grid,
  .scenario-summary-strip,
  .field-allocation-toolbar .scenario-summary-strip {
    grid-template-columns: 1fr;
  }

  .scenario-library-section .table-toolbar,
  .scenario-config-section .compact-action-row,
  .field-allocation-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .scenario-library-section .table-toolbar > *,
  .scenario-config-section .compact-action-row > *,
  .field-allocation-toolbar > * {
    width: 100%;
  }

  .workflow-grid,
  .workflow-grid-actions,
  .workflow-inline-grid,
  .workflow-tile-grid,
  .template-studio-grid,
  .template-form {
    grid-template-columns: 1fr;
  }

  .workflow-form-section-grid {
    grid-template-columns: 1fr;
  }

  .field-list-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .field-list-topline {
    align-items: flex-start;
  }

  .field-list-note {
    -webkit-line-clamp: 2;
  }

  .field-list-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .field-list-actions .compact-button {
    flex: 1 1 160px;
  }

  .template-form-sidebar {
    position: static;
  }

  .workflow-card,
  .workflow-detail-hero,
  .workflow-action-card,
  .workflow-list-card,
  .workflow-empty-card {
    padding: 16px;
    border-radius: 22px;
  }

  .workflow-card-head,
  .workflow-list-card-head,
  .workflow-list-card-meta,
  .workflow-detail-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .workflow-detail-actions,
  .workflow-detail-actions > * {
    width: 100%;
  }

  .workflow-kv-list > div {
    flex-direction: column;
    gap: 4px;
  }

  .workflow-filter-toolbar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .scenario-library-section .button-row button,
  .scenario-config-section .button-row button,
  .field-allocation-toolbar .table-action-group button {
    width: 100%;
    justify-content: center;
  }

  .scenario-contract-work-table,
  .field-allocation-table {
    min-width: 0;
  }

  .scenario-contract-work-table thead,
  .field-allocation-table thead {
    display: none;
  }

  .scenario-contract-work-table tbody,
  .field-allocation-table tbody {
    display: grid;
    gap: 12px;
  }

  .scenario-contract-work-table tbody tr,
  .field-allocation-table tbody tr {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(205, 217, 207, 0.88);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  }

  .scenario-contract-work-table td,
  .field-allocation-table td {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    align-items: center;
    padding: 0;
    border: 0;
  }

  .scenario-contract-work-table td::before,
  .field-allocation-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-soft);
  }

  .scenario-contract-work-table td input,
  .field-allocation-table td input,
  .field-allocation-table td select {
    width: min(220px, 100%);
    justify-self: end;
  }

  .scenario-contract-work-table td.selection-cell input {
    width: auto;
  }

  .field-allocation-table td[data-label="Feldname"],
  .scenario-contract-work-table td[data-label="Bezeichnung"],
  .field-allocation-table td[data-label="Aktion"] {
    grid-template-columns: 1fr;
  }

  .field-allocation-table td[data-label="Aktion"] .table-action-group {
    display: grid;
    gap: 8px;
  }

  .field-map-map-shell,
  .field-map-canvas {
    min-height: 360px;
  }

  .results-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-scenario-item {
    align-items: stretch;
  }

  .nav-toggle {
    display: inline-flex;
    justify-content: center;
    width: fit-content;
    min-height: 46px;
  }

  .crop-card-header,
  .rotation-step-row,
  .import-controls,
  .compare-controls,
  .sensitivity-controls,
  .table-toolbar,
  .contract-work-entry-head,
  .contract-work-entry-foot {
    align-items: stretch;
    flex-direction: column;
  }
}
