body {
  background: #f4f6f1;
  color: #1f2d20;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.agv3-auth-shell {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(100, 153, 89, 0.2), transparent 28%),
    linear-gradient(160deg, rgba(18, 39, 23, 0.96), rgba(34, 72, 42, 0.94));
}

.agv3-auth-card {
  width: min(100%, 420px);
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(250, 252, 248, 0.97);
  border: 1px solid rgba(41, 74, 43, 0.14);
  box-shadow: 0 24px 60px rgba(6, 18, 10, 0.28);
}

.agv3-auth-branding {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.agv3-auth-logo {
  font-size: 22px;
  font-weight: 800;
  color: #294a2b;
  letter-spacing: -0.04em;
}

.agv3-auth-kicker {
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf4ed;
  color: #35563d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agv3-auth-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.agv3-auth-copy {
  margin: 0;
  color: #5f6f61;
  font-size: 14px;
  line-height: 1.55;
}

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

.agv3-auth-field {
  display: grid;
  gap: 6px;
}

.agv3-auth-field span {
  font-size: 12px;
  font-weight: 700;
  color: #35563d;
}

.agv3-auth-field input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(41, 74, 43, 0.16);
  background: #fff;
  color: #1f2d20;
  font: inherit;
}

.agv3-auth-field input:focus {
  outline: 2px solid rgba(45, 90, 45, 0.16);
  border-color: #2d5a2d;
}

.agv3-auth-submit {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: #2d5a2d;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.agv3-auth-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.agv3-auth-error {
  min-height: 18px;
  color: #9c2d2d;
  font-size: 13px;
}

.agv3-auth-beta-link {
  color: #2d5a2d;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

#agv3App.agv3-auth-locked {
  display: none;
}

#agv3App {
  --agv3-sidebar-size: 440px;
  --agv3-sheet-size: 360px;
  --agv3-splitter-size: 12px;
  --agv3-bottom-nav-h: 60px;
  --agv3-z-map: 100;
  --agv3-z-map-overlay: 700;
  --agv3-z-toolbar: 900;
  --agv3-z-sheet: 5200;
  --agv3-z-onboarding: 5900;
  --agv3-z-guidance: 6000;
  --agv3-z-modal: 9999;
  --agv3-z-toast: 20000;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--agv3-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.agv3-topbar,
.agv3-toolbar {
  padding: 8px 12px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(41, 74, 43, 0.08);
  z-index: 20;
}

.agv3-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  max-height: 88px;
  transition: max-height 180ms ease, padding 180ms ease, opacity 180ms ease, border-color 180ms ease;
}

.agv3-header-collapsed .agv3-topbar {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  border-bottom-color: transparent;
}

.agv3-brand {
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.agv3-brand-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agv3-sub,
.agv3-inline-help,
.agv3-window-label,
.agv3-selected-day,
.agv3-filter-meta,
.agv3-empty,
.agv3-photo-caption,
.agv3-photo-meta,
.agv3-stat-label,
.agv3-row-meta,
.agv3-row-caption,
.agv3-selection-empty {
  color: #5f6f61;
}

.agv3-top-actions,
.agv3-toolbar-meta,
.agv3-filter-row,
.agv3-btn-row,
.agv3-card-head,
.agv3-stat,
.agv3-paddock-metrics,
.agv3-photo-card,
.agv3-lightbox-slider-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.agv3-top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agv3-top-actions > * {
  flex: 0 0 auto;
}

.agv3-farm-select {
  min-width: 180px;
}

.agv3-header-toggle {
  white-space: nowrap;
}

.agv3-tab-btn.is-active {
  background: #2d5a2d;
  color: #fff;
  border-color: #2d5a2d;
}

.agv3-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.agv3-selected-day {
  font-size: 18px;
  font-weight: 700;
  color: #294a2b;
}

.agv3-selected-day-btn {
  justify-self: end;
}

.agv3-range-window {
  position: relative;
  padding: 8px 0;
}

.agv3-range-window input[type='range'] {
  width: 100%;
  background: transparent;
  position: relative;
  z-index: 2;
}

.range-window {
  position: relative;
  height: 34px;
}

.range-window__track,
.range-window__band {
  position: absolute;
  top: 14px;
  height: 6px;
  border-radius: 999px;
}

.range-window__track {
  left: 0;
  right: 0;
  background: rgba(45, 90, 45, 0.12);
}

.range-window__band {
  left: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(93, 148, 83, 0.38), rgba(45, 90, 45, 0.7));
}

.range-window__start-dot {
  position: absolute;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #2d5a2d;
  box-shadow: 0 4px 14px rgba(45, 90, 45, 0.26);
  transform: translateX(-9px);
}

.agv3-main {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: var(--agv3-sidebar-size) var(--agv3-splitter-size) minmax(0, 1fr);
}

#agv3App.is-map-hidden .agv3-main {
  grid-template-columns: minmax(0, 1fr);
}

#agv3App.is-map-hidden .agv3-splitter,
#agv3App.is-map-hidden .agv3-map-pane {
  display: none;
}

.agv3-sidebar {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 14px;
  padding-bottom: calc(18px + var(--agv3-bottom-nav-h));
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid rgba(41, 74, 43, 0.08);
  background: rgba(250, 252, 248, 0.96);
}

.agv3-splitter {
  position: relative;
  background: linear-gradient(180deg, rgba(41, 74, 43, 0.05), rgba(41, 74, 43, 0.14), rgba(41, 74, 43, 0.05));
  cursor: col-resize;
  touch-action: none;
}

.agv3-splitter::before {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 4px;
  height: 56px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(41, 74, 43, 0.22);
}

.agv3-splitter:hover::before,
#agv3App.is-dragging-splitter .agv3-splitter::before {
  background: rgba(232, 137, 43, 0.55);
}

.agv3App.is-dragging-splitter,
#agv3App.is-dragging-splitter {
  user-select: none;
}

.agv3-section {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.agv3-section.is-active {
  display: flex;
  align-items: stretch;
}

.agv3-card,
.agv3-map-summary {
  display: block;
  height: auto;
  overflow: visible;
  background: #fff;
  border: 1px solid rgba(41, 74, 43, 0.08);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 6px 20px rgba(31, 45, 32, 0.06);
}

.agv3-webix-card {
  padding-bottom: 10px;
}

.agv3-webix-host {
  min-height: 240px;
  width: 100%;
  margin-top: 10px;
}

.agv3-webix-host--journal {
  min-height: min(62vh, 720px);
}

.agv3-webix-host--edit {
  min-height: 320px;
}

[data-edit-surface] {
  display: none;
}

[data-edit-surface].is-active {
  display: block;
}

.agv3-edit-form,
.agv3-edit-empty {
  padding: 2px 0 6px;
}

.agv3-edit-empty {
  color: #5f6f61;
  font-size: 14px;
}

.agv3-edit-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.agv3-edit-summary .agv3-chip {
  background: rgba(45, 90, 45, 0.08);
}

.agv3-edit-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.agv3-edit-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 0 0 10px;
}

.agv3-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 10px;
  align-items: start;
}

.agv3-edit-schema-fields {
  display: grid;
}

.agv3-edit-note {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(36, 74, 43, 0.1);
  background: rgba(227, 236, 221, 0.54);
  color: #274831;
  font-size: 12px;
  line-height: 1.35;
}

#agv3App .webix_view {
  border: 0 !important;
  background: transparent !important;
  color: #1f2d20;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#agv3App .webix_layout_toolbar,
#agv3App .webix_toolbar {
  background: transparent !important;
}

#agv3App .webix_datatable,
#agv3App .webix_form,
#agv3App .webix_list {
  background: #f9fbf8 !important;
  border: 1px solid rgba(41, 74, 43, 0.08) !important;
  border-radius: 14px;
  overflow: hidden;
}

#agv3App .webix_header_border,
#agv3App .webix_ss_header td,
#agv3App .webix_hcolumn,
#agv3App .webix_column > div,
#agv3App .webix_cell {
  border-color: rgba(41, 74, 43, 0.07) !important;
}

#agv3App .webix_ss_header td,
#agv3App .webix_hcolumn {
  background: rgba(45, 90, 45, 0.08) !important;
  color: #294a2b !important;
  font-weight: 700;
}

#agv3App .webix_column > div.webix_row_select,
#agv3App .webix_cell.webix_row_select {
  background: rgba(232, 137, 43, 0.14) !important;
}

#agv3App .webix_primary .webix_button,
#agv3App button.webix_primary,
#agv3App .webix_el_button.webix_primary .webix_button {
  background: #2d5a2d !important;
  border-color: #2d5a2d !important;
  color: #fff !important;
}

#agv3App .webix_el_button .webix_button,
#agv3App .webix_el_button button {
  border-radius: 999px !important;
}

#agv3App .webix_accordionitem_header {
  background: rgba(45, 90, 45, 0.06) !important;
  color: #294a2b !important;
  border-color: rgba(41, 74, 43, 0.08) !important;
  font-weight: 700;
}


#agv3App.is-map-hidden .agv3-sidebar {
  border-right: 0;
}

#agv3App.is-map-hidden .agv3-section {
  max-width: 1280px;
}

#agv3App.is-map-hidden .agv3-sidebar {
  padding-right: 18px;
}

#agv3App.is-map-hidden .agv3-section {
  overflow: visible;
}
.agv3-card-head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.agv3-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.agv3-create-launcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agv3-create-launcher-btn {
  min-width: 96px;
  border-radius: 999px;
  font-weight: 700;
}

.agv3-create-launcher-btn.is-active {
  background: #2d5a2d;
  color: #fff;
  border-color: #2d5a2d;
}

.agv3-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(45, 90, 45, 0.1);
  color: #294a2b;
  font-size: 12px;
  font-weight: 700;
}

.agv3-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.agv3-stat {
  flex-direction: column;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(237, 245, 234, 0.9), rgba(248, 251, 247, 1));
  border: 1px solid rgba(45, 90, 45, 0.08);
}

.agv3-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #294a2b;
}

.agv3-filter-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.agv3-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(41, 74, 43, 0.06);
  font-size: 12px;
}

.agv3-timeline-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 58vh;
  overflow: auto;
}

#agv3App.is-map-hidden .agv3-timeline-rows {
  max-height: none;
  overflow: visible;
}

.agv3-row {
  border: 1px solid rgba(41, 74, 43, 0.08);
  border-radius: 16px;
  padding: 10px;
  background: rgba(250, 252, 248, 0.9);
  cursor: pointer;
}

.agv3-row.is-selected {
  border-color: rgba(45, 90, 45, 0.4);
  box-shadow: 0 0 0 3px rgba(45, 90, 45, 0.08);
}

.agv3-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.agv3-row-title {
  font-weight: 800;
  color: #294a2b;
}

.agv3-row svg {
  width: 100%;
  height: 88px;
  display: block;
  overflow: visible;
}

.agv3-row-legend {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
}

.agv3-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  align-items: start;
}

.agv3-photo-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(41, 74, 43, 0.08);
  background: #fafcf8;
  cursor: pointer;
}

.agv3-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.agv3-photo-caption {
  margin-top: 2px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agv3-photo-meta {
  width: 100%;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agv3-photo-icon {
  flex: 0 0 auto;
}

.agv3-photo-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agv3-map-pane {
  position: relative;
  min-height: 0;
  z-index: var(--agv3-z-map);
  overflow: hidden;
}

.agv3-map-pane #drawBanner {
  max-width: min(440px, calc(100% - 24px));
}

.agv3-map-create-launcher {
  position: absolute;
  left: 50%;
  bottom: calc(var(--agv3-bottom-stack-h) + 16px);
  transform: translateX(-50%);
  z-index: calc(var(--agv3-z-toolbar) + 2);
  width: min(560px, calc(100% - 24px));
  pointer-events: auto;
}

.agv3-map-create-launcher__card {
  padding: 12px;
  border-radius: 20px;
  background: rgba(252, 253, 250, 0.96);
  border: 1px solid rgba(41, 74, 43, 0.12);
  box-shadow: 0 14px 34px rgba(18, 32, 22, 0.16);
  backdrop-filter: blur(14px);
}

.agv3-map-create-launcher__eyebrow {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f6f61;
}

.agv3-map-create-launcher__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#drawUndoBtn[disabled],
#drawDoneBtn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.agv3-draw-midpoint {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 3px solid #ff7f24;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.agv3-draw-vertex {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #ffffff;
  border: 4px solid #2d5a2d;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

.agv3-draw-vertex.is-latest {
  background: #e8f4e2;
  border-color: #e8892b;
}

#agMap {
  width: 100%;
  height: 100%;
}

.agv3-map-summary {
  position: absolute;
  left: 14px;
  top: 14px;
  right: auto;
  bottom: auto;
  z-index: var(--agv3-z-map-overlay);
  max-width: min(420px, calc(100% - 28px));
  max-height: min(48vh, calc(100% - 28px));
  overflow: auto;
  pointer-events: auto;
}

.agv3-map-summary h3,
.agv3-map-summary h4 {
  margin: 0 0 8px;
}

.agv3-paddock-metrics {
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 8px;
}

.agv3-metric-pill {
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(45, 90, 45, 0.08);
}

.agv3-mode-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.agv3-mode-pill {
  border: 1px solid rgba(41, 74, 43, 0.16);
  background: #fff;
  color: #294a2b;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
}

.agv3-mode-pill.is-active {
  background: #2d5a2d;
  color: #fff;
  border-color: #2d5a2d;
}

.agv3-mode-pill.is-disabled {
  opacity: 0.72;
}

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

.agv3-upload-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
  font-size: 13px;
  color: #294a2b;
}

.agv3-inline-config-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.agv3-inline-select {
  flex: 1 1 auto;
  min-width: 0;
}

.agv3-inline-config-btn {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 8px 10px;
  font-size: 16px;
  line-height: 1;
}

.agv3-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
  font-size: 13px;
  color: #294a2b;
}

.agv3-check-row input[type='checkbox'] {
  width: 16px;
  height: 16px;
}

.agv3-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--agv3-z-toolbar);
  display: flex;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(41, 74, 43, 0.10);
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.agv3-bottom-nav .agv3-tab-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: 88px;
  border-radius: 999px;
}

.agv3-bottom-nav .agv3-tab-btn[data-section='journal'],
.agv3-bottom-nav .agv3-tab-btn[data-section='edit'] {
  min-width: 96px;
}

.agv3-inline-config-btn.is-active {
  border-color: #2d5a2d;
  color: #2d5a2d;
  box-shadow: 0 0 0 2px rgba(45, 90, 45, 0.08);
}

.agv3-advanced-wrap {
  display: none;
}

.agv3-advanced-wrap.is-open {
  display: block;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
}

.photo-lightbox.is-open {
  display: block;
}

.photo-lightbox__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 12, 0.82);
}

.photo-lightbox__dialog {
  position: absolute;
  inset: 20px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(18, 24, 18, 0.96);
  color: #fff;
  border-radius: 18px;
  padding: 14px;
}

.photo-lightbox__toolbar,
.photo-lightbox__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.photo-lightbox__toolbar {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.photo-lightbox__meta {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.photo-lightbox__actions {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 4px;
  overflow: hidden;
}

.agv3-lightbox-icon-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
}

.photo-lightbox__stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  cursor: default;
}

.photo-lightbox__stage.is-zoomed {
  cursor: grab;
}

.photo-lightbox__stage.is-dragging {
  cursor: grabbing;
}

.photo-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 260ms ease, transform 260ms ease;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.agv3-lightbox-caption {
  min-height: 3.6em;
  max-height: 5.4em;
  overflow: auto;
  padding: 2px 2px 0;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
  line-height: 1.2;
  white-space: pre-wrap;
  word-break: break-word;
}

.agv3-lightbox-caption.is-empty {
  opacity: 0.55;
}

.agv3-lightbox-slider-row {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.agv3-lightbox-slider-row input[type='range'] {
  flex: 1 1 320px;
  width: auto;
  min-width: 180px;
}

@media (max-width: 1100px) {
  .agv3-main {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  .agv3-sidebar {
    order: 2;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    height: auto;
    max-height: none;
    z-index: auto;
    border-right: 0;
    border-top: 1px solid rgba(41, 74, 43, 0.08);
    border-radius: 0;
    background: rgba(250, 252, 248, 0.98);
    box-shadow: none;
    backdrop-filter: none;
    padding: 14px;
    overflow: auto;
  }

  .agv3-splitter {
    display: none;
  }

  .agv3-map-pane {
    order: 1;
    min-height: 0;
  }

  .agv3-toolbar {
    grid-template-columns: 1fr;
  }

  .agv3-webix-host--journal {
    min-height: min(56vh, 640px);
  }

  #agv3App.agv3-sheet-visible .agv3-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(var(--agv3-sheet-size), calc(100vh - 52px));
    height: min(var(--agv3-sheet-size), calc(100dvh - 52px));
    max-height: calc(100vh - 52px);
    max-height: calc(100dvh - 52px);
    z-index: var(--agv3-z-sheet);
    border-top: 1px solid rgba(41, 74, 43, 0.10);
    border-radius: 24px 24px 0 0;
    background: linear-gradient(180deg, rgba(252, 253, 250, 0.99), rgba(246, 249, 244, 0.99));
    box-shadow: 0 -18px 46px rgba(18, 32, 22, 0.18), 0 -1px 0 rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(18px);
    padding: 0 14px calc(14px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }

  #agv3App.agv3-create-launcher-mode .agv3-main {
    grid-template-rows: minmax(0, 1fr);
  }

  #agv3App.agv3-create-launcher-mode .agv3-sidebar,
  #agv3App.agv3-create-launcher-mode .agv3-splitter {
    display: none;
  }
}

.agv3-sheet-handle {
  display: none;
}

.agv3-sheet-header {
  display: none;
}

.agv3-sheet-title {
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  color: #1f2d20;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agv3-sheet-close {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.agv3-sheet-handle:focus-visible {
  outline: none;
}

.agv3-sheet-handle-bar {
  display: block;
  width: 56px;
  height: 6px;
  border-radius: 999px;
  background: rgba(41, 74, 43, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.agv3-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.agv3-mode-switcher {
  position: relative;
  flex: 0 0 auto;
  z-index: 1500;
}

.agv3-mob-mode-pills {
  margin: 0 0 10px;
}

.agv3-mob-panel {
  display: none;
}

.agv3-mob-panel.is-active {
  display: block;
}

.agv3-mode-btn,
.agv3-mode-option {
  border: 1px solid rgba(41, 74, 43, 0.12);
  background: rgba(41, 74, 43, 0.04);
  color: #294a2b;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.agv3-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  width: 164px;
  min-width: 164px;
  padding-inline: 12px;
  box-sizing: border-box;
}

.agv3-mode-btn-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  text-align: left;
}

.agv3-mode-btn-icon {
  flex: 0 0 16px;
  width: 16px;
}

.agv3-mode-btn-chevron {
  flex: 0 0 12px;
  opacity: 0.7;
  font-size: 11px;
  text-align: center;
}

.agv3-mode-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 250px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(41, 74, 43, 0.12);
  box-shadow: 0 14px 32px rgba(16, 24, 16, 0.18);
  z-index: 1600;
}

.agv3-mode-option {
  width: 100%;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-radius: 14px;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
}

.agv3-mode-option + .agv3-mode-option {
  margin-top: 2px;
}

.agv3-mode-option-icon,
.agv3-mode-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.agv3-mode-option-copy {
  display: grid;
  gap: 2px;
}

.agv3-mode-option-copy strong {
  font-size: 13px;
  line-height: 1.15;
}

.agv3-mode-option-copy span {
  font-size: 11px;
  line-height: 1.35;
  color: #5f6f61;
}

.agv3-mode-option:hover,
.agv3-mode-option:focus-visible {
  background: rgba(41, 74, 43, 0.08);
}

.agv3-mode-option.is-active {
  background: #294a2b;
  color: #fff;
}

.agv3-mode-option.is-active .agv3-mode-option-copy span {
  color: rgba(255, 255, 255, 0.86);
}

.agv3-create-card {
  overflow: visible;
  flex: 0 0 auto;
  align-self: stretch;
}

.agv3-card-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

.agv3-card-toggle h3 {
  margin: 0;
}

.agv3-card-descriptor {
  margin-top: 4px;
  color: #5f6f61;
  font-size: 13px;
}

.agv3-card-toggle-icon {
  font-size: 16px;
  color: #5f6f61;
  transition: transform 0.18s ease;
}

.agv3-create-card.is-open .agv3-card-toggle-icon {
  transform: rotate(180deg);
}

.agv3-create-body {
  display: none;
  margin-top: 12px;
  height: auto;
  max-height: none;
  overflow: visible;
}

.agv3-create-card.is-open .agv3-create-body {
  display: block;
}

.agv3-create-card.is-open .agv3-card-descriptor {
  display: none;
}

.agv3-paddock-card-actions {
  flex-wrap: wrap;
}

#agv3App.agv3-paddock-has-draft #agPaddockStartBtn,
#agv3App.agv3-paddock-has-draft #agPaddockFinishBtn,
#agv3App.agv3-paddock-has-draft #agPaddockCancelBtn {
  display: inline-flex;
}

#agv3App:not(.agv3-paddock-has-draft) #agPaddockStartBtn,
#agv3App:not(.agv3-paddock-has-draft) #agPaddockCancelBtn {
  display: none;
}

#agv3App:not(.agv3-paddock-has-draft) #agPaddockFinishBtn {
  width: 100%;
}

#agSection-create,
#agSection-create .agv3-card,
#agSection-create .agv3-create-card,
#agSection-create .agv3-create-body {
  height: auto;
  max-height: none;
  overflow: visible;
}

#agSection-create .agv3-card + .agv3-card {
  margin-top: 2px;
}

.agv3-field-block {
  display: block;
  margin-bottom: 8px;
}

.agv3-field-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #294a2b;
}

.agv3-date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.agv3-date-row .slim-field.is-off-today,
.agv3-date-row .slim-field.is-off-slider {
  border-color: #d64545;
  box-shadow: 0 0 0 2px rgba(214, 69, 69, 0.1);
  color: #a52828;
}

.agv3-target-summary {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(45, 90, 45, 0.05);
  border: 1px solid rgba(45, 90, 45, 0.08);
  color: #294a2b;
  font-size: 13px;
}

.agv3-target-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.agv3-target-actions .btn-primary[disabled],
.agv3-target-actions .btn-ghost[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
}

.agv3-target-summary.is-active {
  background: rgba(232, 137, 43, 0.12);
  border-color: rgba(232, 137, 43, 0.45);
  box-shadow: 0 0 0 3px rgba(232, 137, 43, 0.12);
}

.agv3-rule {
  height: 1px;
  background: rgba(41, 74, 43, 0.08);
  margin: 14px 0;
}

.agv3-map-pane .agv3-marker.is-selected > div,
.agv3-map-pane .agv3-marker.is-focused > div {
  filter: drop-shadow(0 0 8px rgba(232, 137, 43, 0.8));
}

.agv3-row-title .agv3-inline-icon,
.agv3-selection-title .agv3-inline-icon,
.agv3-option-icon {
  margin-right: 6px;
}

@media (max-width: 980px) {
  .agv3-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  }

  #agSection-create .agv3-card {
    padding-bottom: 16px;
  }

  .agv3-topbar {
    padding: 4px 8px;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .agv3-brand-area,
  .agv3-top-actions {
    flex: 0 0 auto;
  }

  .agv3-brand-row,
  .agv3-top-actions,
  .agv3-mode-switcher {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .agv3-sub {
    display: none;
  }

  .agv3-brand {
    font-size: 17px;
  }

  .agv3-mode-btn,
  .agv3-mode-pill {
    padding: 6px 10px;
    font-size: 11px;
  }

  .agv3-top-actions {
    gap: 6px;
  }

  .agv3-farm-select {
    min-width: 150px;
  }

  .agv3-inline-config-row {
    align-items: stretch;
  }

  .agv3-inline-config-btn {
    min-width: 40px;
    padding: 8px 9px;
  }

  .agv3-target-actions {
    width: 100%;
  }

  .agv3-toolbar {
    padding: 8px;
    gap: 8px;
  }

  .agv3-toolbar-meta {
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  .agv3-selected-day {
    font-size: 16px;
  }

  .agv3-map-summary {
    left: 8px;
    top: 8px;
    max-width: calc(100% - 16px);
  }

  .agv3-bottom-nav {
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .agv3-bottom-nav .agv3-tab-btn {
    min-width: 82px;
    padding: 7px 10px;
    font-size: 12px;
  }
}


/* --- AgRv3 deeper farmer UX/layout patch --- */
#agv3App {
  --agv3-toolbar-h: 38px;
}

.agv3-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  min-height: var(--agv3-toolbar-h);
}

.agv3-toolbar-meta {
  flex: 0 0 auto;
  min-width: 0;
  gap: 6px;
  flex-wrap: nowrap;
}

.agv3-header-toggle,
.agv3-selected-day-btn {
  min-width: 0;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.1;
}

.agv3-header-toggle {
  width: 28px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.agv3-window-label {
  font-size: 12px;
  white-space: nowrap;
}

.agv3-selected-day {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.agv3-range-window {
  flex: 1 1 auto;
  min-width: 0;
  padding: 3px 0;
}

.range-window {
  height: 28px;
}

.range-window__track,
.range-window__band {
  top: 11px;
}

.range-window__start-dot {
  top: 5px;
  width: 16px;
  height: 16px;
  transform: translateX(-8px);
}

.agv3-map-summary-shell {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 700;
  max-width: calc(100% - 16px);
}

.agv3-map-summary-toggle {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.agv3-map-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.agv3-map-summary-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.agv3-map-summary {
  position: static;
  width: min(360px, calc(100vw - 64px));
  max-width: min(360px, calc(100vw - 64px));
  max-height: min(34vh, calc(100% - 24px));
  padding: 9px 10px;
  border-radius: 14px;
  overflow: auto;
}

.agv3-map-summary.is-collapsed .agv3-map-summary-body {
  display: none;
}

.agv3-map-summary h3,
.agv3-map-summary h4 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.15;
}

.agv3-map-summary .agv3-inline-help {
  font-size: 12px;
  line-height: 1.2;
}

.agv3-paddock-metrics {
  gap: 6px;
  margin-top: 6px;
}

.agv3-metric-pill {
  min-width: 90px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.2;
}

.agv3-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 10px;
  align-content: start;
}

.agv3-photo-card {
  width: 100%;
}

.agv3-sidebar {
  padding-bottom: calc(var(--agv3-bottom-nav-h) + 22px + env(safe-area-inset-bottom, 0px));
}

.agv3-section.is-active {
  min-height: 0;
  flex: 1 1 auto;
}

.agv3-fill-section {
  min-height: 0;
  flex: 1 1 auto;
}

.agv3-fill-section > .agv3-card {
  flex: 1 1 auto;
  min-height: 0;
}

.agv3-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#agTimelineRows,
#agPhotoGrid,
#agSection-create,
#agSection-import {
  min-height: 0;
}

#agPhotoGrid,
#agTimelineRows {
  flex: 1 1 auto;
  overflow: auto;
}

.agv3-webix-host--journal,
.agv3-webix-host--edit,
.agv3-create-body {
  flex: 1 1 auto;
  min-height: 0;
}

#agv3App.is-map-hidden .agv3-main {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.agv3-timeline-rows {
  max-height: none;
}

.agv3-map-pane .agv3-marker > div,
.agv3-row-title .agv3-inline-icon,
.agv3-selection-title .agv3-inline-icon,
.agv3-option-icon {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

.agv3-point-beacon-wrap {
  background: transparent;
  border: 0;
}

.agv3-point-beacon {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(248, 245, 232, 0.16);
  box-shadow: 0 0 0 1px rgba(248, 245, 232, 0.18), 0 4px 14px rgba(24, 36, 23, 0.12);
  backdrop-filter: blur(1px);
}

.agv3-point-beacon::before,
.agv3-point-beacon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 999px;
  background: rgba(244, 239, 220, 0.92);
  transform-origin: center;
  margin-left: -6px;
  margin-top: -0.75px;
}

.agv3-point-beacon::before {
  transform: rotate(45deg);
}

.agv3-point-beacon::after {
  transform: rotate(-45deg);
}

.agv3-onboarding-host {
  position: fixed;
  inset: 0;
  z-index: var(--agv3-z-onboarding);
  pointer-events: none;
}

.agv3-onboarding-card,
.agv3-onboarding-dock {
  border: 1px solid rgba(64, 92, 52, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(157, 184, 117, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(252, 249, 241, 0.98), rgba(244, 239, 225, 0.96));
  box-shadow: 0 16px 32px rgba(28, 44, 24, 0.08);
}

.agv3-onboarding-card {
  padding: 14px 14px 12px;
}

.agv3-onboarding-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
}

.agv3-onboarding-card p {
  margin: 0 0 12px;
  color: #46513d;
}

.agv3-onboarding-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.agv3-onboarding-eyebrow,
.agv3-onboarding-dock__eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  color: #5f714f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agv3-onboarding-card .status {
  margin-top: 8px;
}

.agv3-onboarding-card--done {
  background:
    radial-gradient(circle at top right, rgba(126, 168, 94, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(248, 250, 240, 0.98), rgba(239, 246, 231, 0.96));
}

.agv3-onboarding-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  text-align: left;
  cursor: pointer;
}

.agv3-onboarding-dock strong {
  display: block;
  color: #24311f;
  font-size: 14px;
}

.agv3-onboarding-dialog {
  z-index: 5901;
}

.agv3-onboarding-host .agv3-guidance-dialog,
.agv3-onboarding-host .agv3-guidance-minimized {
  pointer-events: auto;
}

.agv3-onboarding-host .agv3-guidance-dialog--bottom-right {
  inset: auto 18px calc(var(--agv3-bottom-nav-h) + 14px + env(safe-area-inset-bottom, 0px)) auto;
}

.agv3-onboarding-host .agv3-guidance-minimized--bottom-right {
  bottom: calc(var(--agv3-bottom-nav-h) + 14px + env(safe-area-inset-bottom, 0px));
}

.agv3-onboarding-phone-note {
  display: none;
  margin-top: 8px;
}

.agv3-shell-help-btn {
  min-width: 92px;
}

.agv3-guidance-layer {
  position: fixed;
  inset: 0;
  z-index: var(--agv3-z-guidance);
  pointer-events: none;
}

.agv3-onboarding-host,
.agv3-guidance-layer {
  overflow: visible;
}

.agv3-guidance-backdrop {
  display: none;
}

.agv3-guidance-dialog {
  position: absolute;
  inset: auto 18px 18px auto;
  width: min(100%, 410px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  z-index: calc(var(--agv3-z-guidance) + 1);
  pointer-events: auto;
}

.agv3-guidance-dialog--top-right {
  inset: 18px 18px auto auto;
}

.agv3-guidance-dialog--bottom-right {
  inset: auto 18px 18px auto;
}

.agv3-guidance-card {
  padding: 12px 12px 10px;
  border-radius: 16px;
  box-shadow: 0 24px 56px rgba(18, 36, 20, 0.3);
}

.agv3-guidance-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.agv3-guidance-head-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.agv3-guidance-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.agv3-guidance-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.agv3-guidance-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.agv3-guidance-close {
  flex: 0 0 auto;
  min-width: 36px;
  padding-inline: 0;
}

.agv3-guidance-card p {
  margin: 10px 0 10px;
  color: #46513d;
  font-size: 14px;
  line-height: 1.45;
}

.agv3-guidance-bullets {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.agv3-guidance-bullet {
  color: #35543a;
  font-size: 13px;
  line-height: 1.45;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(66, 99, 60, 0.06);
}

.agv3-guidance-footer {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.agv3-guidance-footer--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agv3-guidance-footer--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agv3-guidance-footer > .btn-ghost,
.agv3-guidance-footer > .btn-primary {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agv3-guidance-minimized {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  right: 18px;
  bottom: 18px;
  width: min(100%, 250px);
  padding: 10px 12px;
  border: 1px solid rgba(64, 92, 52, 0.14);
  border-radius: 14px;
  background: rgba(250, 247, 239, 0.98);
  box-shadow: 0 18px 42px rgba(18, 36, 20, 0.22);
  color: #24311f;
  text-align: left;
  pointer-events: auto;
}

.agv3-guidance-minimized__body,
.agv3-onboarding-dock__body {
  min-width: 0;
  flex: 1 1 auto;
}

.agv3-guidance-minimized strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.agv3-guidance-minimized__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #5f714f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agv3-guidance-minimized__open,
.agv3-onboarding-dock__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid rgba(64, 92, 52, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: #365237;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.agv3-guidance-minimized--top-right {
  top: 18px;
  bottom: auto;
}

.agv3-guidance-minimized--bottom-right {
  bottom: 18px;
  top: auto;
}

.agv3-guidance-target {
  position: relative;
  z-index: 5500;
  outline: 3px solid rgba(77, 151, 84, 0.92);
  outline-offset: 4px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(35, 73, 39, 0.18);
  transition: outline-color 160ms ease, box-shadow 160ms ease;
}

.agv3-guidance-target--bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  outline-offset: 0;
  box-shadow: 0 0 0 2px rgba(77, 151, 84, 0.2);
}

@media (max-width: 720px) {
  .agv3-guidance-dialog {
    inset: auto 12px 12px 12px;
    width: auto;
    max-height: calc(100vh - 24px);
  }

  .agv3-guidance-dialog--top-right {
    inset: 12px 12px auto 12px;
  }

  .agv3-guidance-dialog--bottom-right {
    inset: auto 12px 12px 12px;
  }

  .agv3-onboarding-host .agv3-guidance-dialog--bottom-right {
    inset: auto 12px calc(var(--agv3-bottom-nav-h) + 12px + env(safe-area-inset-bottom, 0px)) 12px;
  }

  .agv3-onboarding-phone-note {
    display: block;
  }

  .agv3-guidance-footer {
    gap: 6px;
  }

  .agv3-guidance-footer > .btn-ghost,
  .agv3-guidance-footer > .btn-primary {
    padding: 8px 6px;
    font-size: 12px;
  }

  .agv3-guidance-minimized {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .agv3-guidance-minimized--top-right {
    top: 12px;
  }

  .agv3-guidance-minimized--bottom-right {
    bottom: 12px;
  }

  .agv3-onboarding-host .agv3-guidance-minimized--bottom-right {
    bottom: calc(var(--agv3-bottom-nav-h) + 12px + env(safe-area-inset-bottom, 0px));
  }

  .agv3-shell-help-btn {
    min-width: 0;
    padding-inline: 10px;
  }
}

#agv3App.agv3-sheet-visible .agv3-guidance-dialog--bottom-right,
#agv3App.agv3-create-focus .agv3-guidance-dialog--bottom-right,
#agv3App.agv3-edit-focus .agv3-guidance-dialog--bottom-right {
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  left: 18px;
  right: auto;
  bottom: auto;
  width: min(410px, calc(100% - 120px));
  max-height: calc(100vh - env(safe-area-inset-top, 0px) - 90px);
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 90px);
}

#agv3App.agv3-sheet-visible .agv3-guidance-minimized--bottom-right,
#agv3App.agv3-create-focus .agv3-guidance-minimized--bottom-right,
#agv3App.agv3-edit-focus .agv3-guidance-minimized--bottom-right {
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  bottom: auto;
  left: 18px;
  right: auto;
}

#agv3App.agv3-paddock-drawing .agv3-onboarding-host .agv3-guidance-dialog,
#agv3App.agv3-paddock-drawing .agv3-onboarding-host .agv3-guidance-minimized,
#agv3App.agv3-paddock-drawing .agv3-guidance-layer .agv3-guidance-dialog,
#agv3App.agv3-paddock-drawing .agv3-guidance-layer .agv3-guidance-minimized {
  display: none;
}

#agv3App.agv3-paddock-drawing .agv3-bottom-nav,
#agv3App.agv3-paddock-drawing .agv3-toolbar {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
}

@media (max-width: 720px) {
  #agv3App.agv3-sheet-visible .agv3-guidance-dialog--bottom-right,
  #agv3App.agv3-create-focus .agv3-guidance-dialog--bottom-right,
  #agv3App.agv3-edit-focus .agv3-guidance-dialog--bottom-right {
    top: calc(env(safe-area-inset-top, 0px) + 62px);
    left: 12px;
    right: auto;
    width: min(340px, calc(100% - 88px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - 78px);
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 78px);
  }

  #agv3App.agv3-sheet-visible .agv3-guidance-minimized--bottom-right,
  #agv3App.agv3-create-focus .agv3-guidance-minimized--bottom-right,
  #agv3App.agv3-edit-focus .agv3-guidance-minimized--bottom-right {
    top: calc(env(safe-area-inset-top, 0px) + 62px);
    left: 12px;
    right: auto;
    width: min(280px, calc(100% - 88px));
  }
}

#agv3App.agv3-sheet-create #agSection-create .agv3-card,
#agv3App.agv3-sheet-edit #agSection-edit .agv3-card,
#agv3App.agv3-sheet-edit .agv3-edit-panel-card {
  padding: 12px 12px 10px;
}

#agv3App.agv3-sheet-create #agSection-create .agv3-card-head,
#agv3App.agv3-sheet-create #agSection-create .agv3-create-card-head,
#agv3App.agv3-sheet-edit #agSection-edit .agv3-card-head,
#agv3App.agv3-sheet-edit .agv3-inline-edit-card .agv3-card-head {
  margin-bottom: 8px;
  gap: 8px;
}

#agv3App.agv3-sheet-create #agSection-create .agv3-create-body,
#agv3App.agv3-sheet-edit .agv3-webix-host--edit {
  padding-bottom: calc(var(--agv3-bottom-stack-h) + 8px);
}

#agv3App.agv3-sheet-create .agv3-field-block,
#agv3App.agv3-sheet-edit .agv3-field-block {
  margin-bottom: 6px;
}

#agv3App.agv3-sheet-create .agv3-target-summary {
  padding: 9px 10px;
  border-radius: 14px;
}

#agv3App.agv3-sheet-create .agv3-inline-help,
#agv3App.agv3-sheet-create .agv3-card-descriptor,
#agv3App.agv3-sheet-edit .agv3-inline-help,
#agv3App.agv3-sheet-edit .agv3-card-descriptor {
  font-size: 12px;
  line-height: 1.32;
}

#agv3App.agv3-sheet-create .agv3-btn-row,
#agv3App.agv3-sheet-edit .agv3-btn-row,
#agv3App.agv3-sheet-edit .agv3-edit-meta,
#agv3App.agv3-sheet-edit .agv3-edit-grid,
#agv3App.agv3-sheet-edit .agv3-edit-schema-fields {
  gap: 8px;
}

#agv3App.agv3-sheet-create textarea.slim-field,
#agv3App.agv3-sheet-edit textarea.slim-field {
  min-height: 72px;
}

@media (max-width: 1100px) {
  #agv3App.agv3-sheet-visible .agv3-sheet-handle {
    margin: 0 auto 4px;
    padding: 3px 0 5px;
  }

  #agv3App.agv3-sheet-visible .agv3-sheet-header {
    min-height: 32px;
    padding: 0 0 4px;
    margin-bottom: 0;
  }

  #agv3App.agv3-sheet-visible .agv3-sheet-title {
    font-size: 15px;
    line-height: 1.1;
  }

  #agv3App.agv3-sheet-create #agSection-create .agv3-card,
  #agv3App.agv3-sheet-edit #agSection-edit .agv3-card,
  #agv3App.agv3-sheet-edit .agv3-edit-panel-card {
    padding-top: 4px;
  }

  #agv3App.agv3-sheet-create #agSection-create .agv3-create-card .agv3-create-body {
    margin-top: 4px;
    padding-top: 6px;
  }

  #agv3App.agv3-sheet-edit .agv3-edit-panel-card {
    padding-top: 4px;
  }
}

.agv3-target-summary {
  padding: 8px 10px;
  font-size: 12px;
}

.agv3-target-actions {
  margin-top: 8px;
}

.agv3-date-indicator {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(45,90,45,0.08);
  color: #294a2b;
  font-size: 11px;
  font-weight: 700;
}

.agv3-date-indicator.is-off-today {
  background: rgba(214, 69, 69, 0.12);
  color: #a52828;
}

.agv3-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--agv3-bottom-nav-h) + 14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  z-index: var(--agv3-z-toast);
  background: rgba(40, 46, 41, 0.78);
  color: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  max-width: min(90vw, 420px);
  text-align: center;
  backdrop-filter: blur(8px);
}

.agv3-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.agv3-create-body {
  overflow: visible;
}

@media (max-width: 980px) {
  .agv3-topbar {
    max-height: 44px;
    min-height: 44px;
    padding: 3px 6px;
    gap: 4px;
  }

  .agv3-brand-row {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .agv3-brand {
    font-size: 15px;
  }

  .agv3-farm-select {
    min-width: 120px;
    max-width: 150px;
  }

  .agv3-capture-btn,
  .agv3-mode-pill,
  .agv3-bottom-nav .agv3-tab-btn {
    font-size: 11px;
    padding: 6px 9px;
  }

  .agv3-toolbar {
    padding: 4px 6px;
    gap: 6px;
    overflow: hidden;
  }

  .agv3-toolbar-meta {
    flex: 0 0 auto;
    min-width: 104px;
    gap: 4px;
  }

  .agv3-window-label,
  .agv3-selected-day {
    font-size: 11px;
  }

  .agv3-selected-day-btn {
    padding: 4px 6px;
  }

  .agv3-map-summary {
    width: min(280px, calc(100vw - 54px));
    max-width: min(280px, calc(100vw - 54px));
    max-height: min(28vh, calc(100% - 18px));
    padding: 8px 9px;
  }

  .agv3-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- AgRv3 shell overhaul: minislic-style header, top panels, quick edit card --- */
#agv3App {
  --agv3-shell-gap: 10px;
}

.agv3-topbar.slim-header {
  position: relative;
  min-height: 54px;
  padding: 8px 10px;
  gap: 8px;
  align-items: center;
}

.agv3-brand-area {
  flex: 1 1 auto;
  min-width: 0;
}

.agv3-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
}

.agv3-brand {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.agv3-sub {
  font-size: 11px;
  line-height: 1.1;
}

.agv3-top-actions {
  gap: 6px;
  flex-wrap: nowrap;
}

.agv3-farm-btn {
  max-width: min(44vw, 320px);
}

.agv3-farm-btn .farm-btn-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-shell-icon-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.agv3-top-panels {
  position: relative;
  z-index: 30;
  padding: 0 12px 0;
  overflow: visible;
}

.agv3-top-panel {
  margin-top: 6px;
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(41, 74, 43, 0.08);
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(16, 24, 16, 0.12);
  overflow: hidden;
}

.agv3-top-panel--settings {
  max-height: calc(100vh - env(safe-area-inset-top, 0px) - 88px);
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 88px);
  overflow: visible;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.agv3-top-panel--settings .agv3-shell-settings-card {
  max-height: none;
  overflow: visible;
  border-radius: 22px;
}

.agv3-webix-host--shell {
  min-height: 180px;
}

.agv3-shell-fallback {
  padding: 12px;
}

.agv3-toolbar {
  grid-template-columns: minmax(210px, 360px) minmax(0, 1fr) auto;
  padding: 6px 10px;
  gap: 8px;
}

.agv3-toolbar-meta {
  min-width: 0;
  gap: 6px;
}

.agv3-window-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 700;
}

.agv3-selected-day-btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.agv3-card,
.agv3-map-summary {
  border-radius: 14px;
  padding: 12px;
}

.agv3-inline-edit-card {
  border-left: 4px solid rgba(45, 90, 45, 0.55);
}

.agv3-inline-edit-card .agv3-card-head {
  margin-bottom: 6px;
}

.agv3-inline-edit-close {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
}

.agv3-webix-host--inline-edit {
  min-height: 220px;
}

.agv3-shell-link-btn {
  text-decoration: none;
}

.agv3-grid {
  display: grid;
  gap: 10px;
}

.agv3-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agv3-btn-row-wrap {
  flex-wrap: wrap;
}

.agv3-bottom-nav.slim-nav {
  gap: 0;
  padding-inline: 4px;
}

.agv3-bottom-nav .agv3-tab-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.agv3-bottom-nav .agv3-tab-btn .ni {
  line-height: 1;
  font-size: 16px;
}

.agv3-bottom-nav .agv3-tab-btn span:last-child {
  font-size: 11px;
  line-height: 1;
}

.agv3-map-summary-shell {
  z-index: 410;
}

.agv3-map-summary {
  border-radius: 12px;
}

@media (max-width: 980px) {
  .agv3-topbar.slim-header {
    min-height: 40px;
    padding: 3px 6px;
    gap: 4px;
  }

  .agv3-brand {
    font-size: 14px;
  }

  .agv3-sub {
    display: none;
  }

  .agv3-farm-btn {
    max-width: 38vw;
  }

  .agv3-shell-icon-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .agv3-toolbar {
    grid-template-columns: minmax(118px, 150px) minmax(0, 1fr) auto;
    padding: 4px 6px;
    gap: 6px;
  }

  .agv3-window-label,
  .agv3-selected-day-btn {
    font-size: 11px;
  }

  .agv3-grid-3 {
    grid-template-columns: 1fr;
  }

  .agv3-webix-host--shell {
    min-height: 160px;
  }
}

/* --- AgRv3 shell fixes: bottom date bar, single slider, compact top actions --- */
#agv3App {
  --agv3-bottom-nav-h: 74px;
  --agv3-toolbar-h: 56px;
  --agv3-bottom-stack-h: calc(var(--agv3-bottom-nav-h) + var(--agv3-toolbar-h) + 18px + env(safe-area-inset-bottom, 0px));
  padding-bottom: var(--agv3-bottom-stack-h);
}

.agv3-topbar.slim-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #2d5a2d;
  color: #fff;
  border-bottom: 0;
  backdrop-filter: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  overflow: visible;
  max-height: none;
  z-index: 1300;
}

.agv3-topbar.slim-header .agv3-brand,
.agv3-topbar.slim-header .agv3-sub {
  color: #fff;
}

.agv3-topbar.slim-header .agv3-brand-area {
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-start;
}

.agv3-topbar.slim-header .agv3-top-actions {
  margin-left: auto;
}

.agv3-topbar.slim-header .agv3-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(17, 31, 18, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.agv3-wordmark {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  letter-spacing: -0.05em;
  text-shadow: 0 1px 0 rgba(7, 15, 8, 0.28);
}

.agv3-wordmark-ag {
  color: #6bf29b;
}

.agv3-wordmark-rhythm {
  color: #7fb4ff;
}

.agv3-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.94);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agv3-topbar.slim-header .agv3-mode-btn {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.agv3-topbar.slim-header .agv3-mode-btn:hover,
.agv3-topbar.slim-header .agv3-mode-btn:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.agv3-topbar.slim-header .agv3-mode-menu {
  background: rgba(27, 51, 29, 0.98);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 32px rgba(8, 16, 9, 0.35);
}

.agv3-topbar.slim-header .agv3-mode-option {
  color: rgba(255, 255, 255, 0.94);
}

.agv3-topbar.slim-header .agv3-mode-option-copy span {
  color: rgba(255, 255, 255, 0.68);
}

.agv3-topbar.slim-header .agv3-mode-option:hover,
.agv3-topbar.slim-header .agv3-mode-option:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.agv3-topbar.slim-header .agv3-mode-option.is-active {
  background: #ffffff;
  color: #234023;
}

.agv3-topbar.slim-header .agv3-mode-option.is-active .agv3-mode-option-copy span {
  color: #4d6150;
}

.agv3-topbar.slim-header .agv3-shell-icon-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}

.agv3-topbar.slim-header .agv3-shell-icon-btn:hover,
.agv3-topbar.slim-header .agv3-shell-icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.4);
}

.agv3-topbar.slim-header .agv3-shell-help-btn {
  min-width: 0;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-weight: 800;
}

.agv3-topbar.slim-header .agv3-shell-help-btn:hover,
.agv3-topbar.slim-header .agv3-shell-help-btn:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.4);
}

.agv3-topbar.slim-header .agv3-shell-icon-btn:active {
  background: rgba(255, 255, 255, 0.34);
}

.agv3-topbar.slim-header .agv3-farm-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}

.agv3-topbar.slim-header .agv3-farm-btn .farm-btn-chevron {
  opacity: 0.72;
}

.agv3-top-panels {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 180ms ease, transform 180ms ease, padding 180ms ease;
  pointer-events: none;
  padding-top: 0;
}

#agv3App.agv3-top-panels-open:not(.agv3-header-collapsed) .agv3-top-panels {
  max-height: none;
  overflow: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  padding-top: 8px;
}

.agv3-top-panel {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

#agv3App.agv3-top-panels-open:not(.agv3-header-collapsed) .agv3-top-panel:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
}

.agv3-header-collapsed .agv3-topbar {
  transform: translateY(-100%);
}

.agv3-header-collapsed .agv3-top-panels {
  max-height: 0;
  opacity: 0;
  transform: translateY(-16px);
}

.agv3-toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--agv3-bottom-nav-h) + 8px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--agv3-toolbar-h);
  padding: 8px 10px;
  border-top: 1px solid rgba(41, 74, 43, 0.08);
  border-bottom: none;
  box-shadow: 0 -8px 22px rgba(31, 45, 32, 0.08);
  box-sizing: border-box;
}

.agv3-toolbar-meta {
  flex-wrap: nowrap;
  min-width: 0;
}

.agv3-selected-day-btn {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  padding: 4px 0;
  overflow: hidden;
  text-align: center;
}

.agv3-selected-day-btn.is-current {
  color: #1d4b27;
  border-color: rgba(45, 90, 45, 0.22);
  background: rgba(45, 90, 45, 0.08);
}

.agv3-selected-day-btn.is-off-today {
  color: #a52828;
  border-color: rgba(165, 40, 40, 0.22);
  background: rgba(214, 69, 69, 0.10);
}

.agv3-range-window,
.range-window {
  min-width: 0;
}

.agv3-range-window input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  accent-color: transparent;
  width: 100%;
  height: 34px;
  margin: 0;
  border: none;
  background: transparent;
  position: relative;
  z-index: 3;
  cursor: pointer;
  touch-action: none;
}

.agv3-range-window input[type='range']:focus {
  outline: none;
}

.agv3-range-window input[type='range']::-webkit-slider-runnable-track {
  height: 34px;
  background: transparent;
}

.agv3-range-window input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #2d5a2d;
  box-shadow: 0 4px 14px rgba(45, 90, 45, 0.26);
}

.agv3-range-window input[type='range']::-moz-range-track {
  height: 6px;
  background: transparent;
  border: none;
}

.agv3-range-window input[type='range']::-moz-range-progress {
  height: 6px;
  background: transparent;
  border: none;
}

.agv3-range-window input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #2d5a2d;
  box-shadow: 0 4px 14px rgba(45, 90, 45, 0.26);
}

.agv3-range-window input[type='range']::-moz-focus-outer {
  border: 0;
}

.range-window__track,
.range-window__band,
.range-window__start-dot {
  pointer-events: none;
}

.range-window {
  height: 34px;
}

.range-window__track,
.range-window__band {
  top: 14px;
}

.agv3-range-window.is-off-today .range-window__track {
  background: rgba(165, 40, 40, 0.12);
}

.agv3-range-window.is-off-today .range-window__band {
  background: linear-gradient(90deg, rgba(214, 69, 69, 0.34), rgba(165, 40, 40, 0.78));
}

.agv3-range-window input[type='range'].is-off-today::-webkit-slider-thumb {
  background: #c23a3a;
  box-shadow: 0 4px 14px rgba(165, 40, 40, 0.28);
}

.agv3-range-window input[type='range'].is-off-today::-moz-range-thumb {
  background: #c23a3a;
  box-shadow: 0 4px 14px rgba(165, 40, 40, 0.28);
}

.range-window__start-dot {
  display: none;
}

.agv3-sidebar {
  overflow: hidden;
  padding-bottom: 14px;
  scroll-padding-bottom: calc(var(--agv3-bottom-stack-h) + 32px);
}

.agv3-section.is-active {
  overflow: auto;
  padding-bottom: 4px;
}

.agv3-fill-section {
  overflow: hidden;
}

.agv3-fill-section.is-active {
  overflow: hidden;
}

.agv3-fill-section > .agv3-card {
  overflow: auto;
  height: 100%;
}

#agSection-create {
  overflow: auto;
  padding-bottom: calc(var(--agv3-bottom-stack-h) + 12px);
  box-sizing: border-box;
}

#agSection-create .agv3-card,
#agSection-create .agv3-create-card,
#agSection-create .agv3-create-body {
  overflow: visible;
  height: auto;
  max-height: none;
  flex: 0 0 auto;
}

#agSection-import.is-active {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: calc(var(--agv3-bottom-stack-h) + 12px);
  box-sizing: border-box;
}

#agSection-import .mm-card {
  overflow: visible;
  height: auto;
  max-height: none;
  flex: 0 0 auto;
}

#agTimelineRows,
#agPhotoGrid,
.agv3-webix-host--journal,
.agv3-webix-host--edit,
.agv3-create-body,
.agv3-section.is-active {
  scroll-padding-bottom: calc(var(--agv3-bottom-stack-h) + 32px);
}

#agTimelineRows,
#agPhotoGrid,
.agv3-webix-host--journal,
.agv3-webix-host--edit,
.agv3-create-body {
  padding-bottom: calc(var(--agv3-bottom-stack-h) + 12px);
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  #agv3App.agv3-sheet-visible .agv3-sheet-handle {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -2px auto 10px;
    padding: 8px 0 12px;
    cursor: ns-resize;
    touch-action: none;
    user-select: none;
    background: linear-gradient(180deg, rgba(252, 253, 250, 0.98), rgba(252, 253, 250, 0.72) 66%, rgba(252, 253, 250, 0));
  }

  #agv3App.agv3-sheet-visible .agv3-sheet-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 0 0 10px;
    margin-bottom: 4px;
    background: linear-gradient(180deg, rgba(252, 253, 250, 0.98), rgba(252, 253, 250, 0.90));
  }

  #agv3App.agv3-sheet-visible .agv3-inline-edit-card {
    display: none !important;
  }

  #agv3App.agv3-sheet-create #agSection-create .agv3-create-card {
    display: none;
  }

  #agv3App.agv3-sheet-create #agSection-create .agv3-create-card.is-open {
    display: flex;
  }

  .agv3-sheet-handle:hover .agv3-sheet-handle-bar,
  .agv3-sheet-handle:focus-visible .agv3-sheet-handle-bar,
  #agv3App.is-dragging-splitter .agv3-sheet-handle-bar {
    background: rgba(232, 137, 43, 0.92);
    box-shadow: 0 0 0 4px rgba(232, 137, 43, 0.12);
    transform: scaleX(1.06);
  }

  #agv3App.agv3-compact-map-only .agv3-main {
    grid-template-rows: minmax(0, 1fr);
  }

  #agv3App.agv3-compact-map-only .agv3-sidebar,
  #agv3App.agv3-compact-map-only .agv3-splitter {
    display: none;
  }

  #agv3App.agv3-create-launcher-mode .agv3-bottom-nav,
  #agv3App.agv3-create-launcher-mode .agv3-toolbar {
    pointer-events: auto;
  }

  #agv3App.agv3-sheet-create .agv3-create-launcher-card {
    display: none;
  }

  #agv3App.agv3-sheet-visible .agv3-bottom-nav,
  #agv3App.agv3-sheet-visible .agv3-toolbar {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px);
  }

  #agv3App.agv3-paddock-drawing #agPaddockCreateCard {
    display: none;
  }
}

.agv3-toast {
  bottom: calc(var(--agv3-bottom-stack-h) + 8px);
}

.agv3-map-pane .leaflet-bottom {
  margin-bottom: calc(var(--agv3-bottom-stack-h) - 10px);
}

.agv3-bottom-nav {
  min-height: var(--agv3-bottom-nav-h);
  box-sizing: border-box;
  align-items: stretch;
}

.agv3-bottom-nav .agv3-tab-btn {
  min-height: 54px;
}

@media (max-width: 980px) {
  #agv3App {
    --agv3-bottom-nav-h: 72px;
    --agv3-toolbar-h: 54px;
  }

  .agv3-topbar.slim-header {
    gap: 6px;
    padding: 4px 6px;
  }

  .agv3-map-create-launcher {
    width: calc(100% - 16px);
    bottom: calc(var(--agv3-bottom-stack-h) + 10px);
  }

  .agv3-map-create-launcher__card {
    padding: 10px;
    border-radius: 18px;
  }

  .agv3-map-create-launcher__buttons {
    gap: 6px;
  }

  .agv3-brand-area {
    min-width: 0;
  }

  .agv3-brand-row {
    gap: 4px;
    min-width: 0;
  }

  .agv3-mode-switcher {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .agv3-topbar.slim-header .agv3-mode-switcher {
    display: none;
  }

  .agv3-mode-switcher::-webkit-scrollbar {
    display: none;
  }

  .agv3-top-actions {
    gap: 4px;
    flex: 0 0 auto;
  }

  .agv3-farm-btn {
    max-width: min(28vw, 132px);
    min-width: 0;
  }

  .agv3-shell-icon-btn {
    width: 28px;
    min-width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .agv3-toolbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    padding: 8px 6px 10px;
  }

  .agv3-window-label {
    max-width: 74px;
  }

  .agv3-selected-day-btn {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    font-size: 11px;
  }

  .agv3-range-window input[type='range'] {
    height: 36px;
  }

  .agv3-bottom-nav .agv3-tab-btn {
    min-height: 52px;
  }
}

/* --- AgRv3 shell polish 2026 --- */
body {
  background:
    radial-gradient(circle at top left, rgba(199, 227, 186, 0.55), transparent 30%),
    radial-gradient(circle at top right, rgba(244, 217, 172, 0.26), transparent 28%),
    linear-gradient(180deg, #eef3ea 0%, #f6f3ea 52%, #eef1e6 100%);
  color: #193124;
  font-family: 'Manrope', 'Segoe UI Variable', 'Avenir Next', sans-serif;
}

#agv3App {
  --agv3-bottom-nav-h: 86px;
  --agv3-toolbar-h: 66px;
  --agv3-bottom-stack-h: calc(var(--agv3-bottom-nav-h) + var(--agv3-toolbar-h) + 22px + env(safe-area-inset-bottom, 0px));
  --agv3-shell-green: #295436;
  --agv3-shell-green-deep: #183a23;
  --agv3-shell-sage: #dce7d7;
  --agv3-shell-cream: #faf8f1;
  --agv3-shell-ink: #193124;
  --agv3-shell-muted: #617565;
  --agv3-shell-border: rgba(40, 76, 52, 0.12);
  --agv3-shell-shadow: 0 22px 48px rgba(24, 43, 31, 0.12);
  position: relative;
  isolation: isolate;
  padding-bottom: var(--agv3-bottom-stack-h);
}

#agv3App::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 10%, rgba(135, 177, 112, 0.20), transparent 20%),
    radial-gradient(circle at 82% 18%, rgba(239, 194, 118, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
}

#agv3App .webix_view,
#agv3App .webix_view div,
#agv3App .webix_el_box,
#agv3App .webix_el_box input,
#agv3App .webix_el_box textarea,
#agv3App .webix_el_box select {
  font-family: 'Manrope', 'Segoe UI Variable', 'Avenir Next', sans-serif !important;
}

.agv3-topbar.slim-header {
  padding: 10px 12px 8px;
  background:
    radial-gradient(circle at top left, rgba(112, 154, 93, 0.22), transparent 32%),
    linear-gradient(135deg, #1a4728 0%, #295436 58%, #2f613c 100%);
  box-shadow: 0 14px 34px rgba(17, 39, 25, 0.16);
}

.agv3-topbar.slim-header .agv3-brand-row {
  gap: 10px;
}

.agv3-topbar.slim-header .agv3-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.agv3-top-actions {
  gap: 8px;
}

.agv3-topbar.slim-header .agv3-farm-btn,
.agv3-topbar.slim-header .agv3-shell-help-btn,
.agv3-topbar.slim-header .agv3-shell-icon-btn {
  height: 40px;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 18px rgba(10, 24, 16, 0.10);
}

.agv3-topbar.slim-header .agv3-farm-btn {
  padding-inline: 14px;
  background: rgba(249, 244, 230, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
}

.agv3-topbar.slim-header .agv3-shell-help-btn,
.agv3-topbar.slim-header .agv3-shell-icon-btn {
  background: rgba(249, 244, 230, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
}

.agv3-topbar.slim-header .agv3-shell-help-btn {
  min-width: 0;
  font-weight: 800;
}

.agv3-top-panel {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 245, 0.96));
  border: 1px solid var(--agv3-shell-border);
  box-shadow: var(--agv3-shell-shadow);
}

.agv3-toolbar {
  left: 10px;
  right: 10px;
  bottom: calc(var(--agv3-bottom-nav-h) + 12px + env(safe-area-inset-bottom, 0px));
  min-height: var(--agv3-toolbar-h);
  padding: 8px;
  border: 1px solid rgba(34, 65, 46, 0.10);
  border-radius: 24px;
  background: rgba(251, 252, 248, 0.90);
  box-shadow: 0 18px 42px rgba(25, 48, 32, 0.14);
  backdrop-filter: blur(18px);
}

.agv3-toolbar-meta {
  gap: 8px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(43, 86, 54, 0.06);
}

.agv3-header-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(40, 76, 52, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.agv3-window-label {
  max-width: 132px;
  color: #516756;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.agv3-range-window {
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(244, 248, 242, 0.92), rgba(234, 240, 231, 0.96));
  border: 1px solid rgba(43, 86, 54, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.range-window__track {
  background: rgba(57, 106, 67, 0.12);
}

.range-window__band {
  background: linear-gradient(90deg, #c5dfb7 0%, #83af6c 40%, #2d5a2d 100%);
}

.agv3-selected-day-btn {
  width: auto;
  min-width: 70px;
  max-width: none;
  height: 42px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid rgba(40, 76, 52, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 238, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 8px 20px rgba(25, 48, 32, 0.08);
  color: var(--agv3-shell-green-deep);
  font-size: 11px;
  font-weight: 800;
}

.agv3-sidebar {
  padding: 18px;
  background: linear-gradient(180deg, rgba(251, 252, 248, 0.88), rgba(244, 247, 241, 0.92));
}

.agv3-card,
.agv3-map-summary,
.agv3-map-create-launcher__card,
.agv3-top-panel {
  border-radius: 24px;
  border: 1px solid rgba(42, 77, 53, 0.10);
  background:
    radial-gradient(circle at top right, rgba(207, 224, 195, 0.20), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 244, 0.96));
  box-shadow: 0 20px 40px rgba(25, 48, 32, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.agv3-card {
  padding: 16px;
}

.agv3-card-head {
  margin-bottom: 12px;
}

.agv3-card-head h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #193124;
}

.agv3-inline-help,
.agv3-card-descriptor,
.agv3-photo-meta,
.agv3-selection-empty,
.agv3-empty,
.agv3-sub {
  color: var(--agv3-shell-muted);
}

.agv3-chip {
  padding: 5px 10px;
  border: 1px solid rgba(51, 95, 63, 0.10);
  background: linear-gradient(180deg, rgba(234, 243, 229, 0.95), rgba(224, 236, 217, 0.92));
  color: #35563d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agv3-summary-grid {
  gap: 14px;
}

.agv3-stat {
  gap: 8px;
  padding: 16px 15px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(212, 229, 202, 0.42), transparent 34%),
    linear-gradient(180deg, rgba(244, 249, 241, 0.98), rgba(236, 244, 232, 0.94));
  border: 1px solid rgba(61, 112, 73, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.80), 0 12px 26px rgba(27, 50, 33, 0.06);
}

.agv3-stat-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #657967;
}

.agv3-stat-value {
  font-size: clamp(31px, 8vw, 42px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #214e31;
}

.agv3-create-launcher,
.agv3-map-create-launcher__buttons {
  gap: 10px;
}

.agv3-create-launcher-btn,
.agv3-mode-pill {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 16px;
  border: 1px solid rgba(42, 77, 53, 0.10);
  background: rgba(252, 253, 249, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  color: #244a31;
  font-weight: 800;
}

.agv3-create-launcher-btn.is-active,
.agv3-mode-pill.is-active,
.agv3-tab-btn.is-active {
  border-color: rgba(35, 74, 45, 0.14);
  background: linear-gradient(180deg, rgba(240, 247, 233, 0.98), rgba(215, 231, 206, 0.96));
  color: #183d25;
  box-shadow: 0 14px 22px rgba(35, 74, 45, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.agv3-target-summary {
  padding: 12px 13px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(242, 218, 170, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(247, 250, 243, 0.96), rgba(239, 245, 235, 0.94));
  border: 1px solid rgba(52, 95, 63, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.agv3-target-summary.is-active {
  background:
    radial-gradient(circle at top right, rgba(242, 202, 141, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(250, 244, 231, 0.98), rgba(246, 239, 222, 0.94));
  border-color: rgba(203, 136, 48, 0.30);
  box-shadow: 0 0 0 4px rgba(203, 136, 48, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

#agObsTargetSummary {
  margin-top: 10px;
}

.agv3-field-label {
  color: #35563d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agv3-map-summary-shell {
  top: 12px;
  left: 12px;
}

.agv3-map-summary {
  border-radius: 22px;
  box-shadow: 0 22px 34px rgba(21, 40, 28, 0.16);
}

.agv3-map-create-launcher {
  width: min(640px, calc(100% - 22px));
}

.agv3-map-create-launcher__eyebrow {
  color: #48604d;
}

.agv3-bottom-nav {
  left: 10px;
  right: 10px;
  bottom: 10px;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(39, 72, 49, 0.10);
  border-radius: 28px;
  background: rgba(251, 252, 248, 0.88);
  box-shadow: 0 22px 44px rgba(21, 40, 28, 0.14);
  backdrop-filter: blur(22px);
}

.agv3-bottom-nav .agv3-tab-btn {
  min-width: 72px;
  min-height: 66px;
  padding: 8px 10px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: transparent;
  color: #5e7062;
  transition: background 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.agv3-bottom-nav .agv3-tab-btn:hover {
  transform: translateY(-1px);
}

.agv3-bottom-nav .agv3-tab-btn .ni {
  font-size: 18px;
}

.agv3-bottom-nav .agv3-tab-btn span:last-child {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agv3-bottom-nav .agv3-tab-btn[data-section='create'] {
  color: #244a31;
}

.agv3-bottom-nav .agv3-tab-btn[data-section='create']:not(.is-active) {
  background: rgba(220, 231, 215, 0.54);
}

#agv3App.agv3-sheet-visible .agv3-sidebar {
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: min(var(--agv3-sheet-size), calc(100vh - 20px));
  height: min(var(--agv3-sheet-size), calc(100dvh - 20px));
  border-radius: 30px;
  border: 1px solid rgba(38, 73, 49, 0.10);
  background:
    radial-gradient(circle at top right, rgba(225, 236, 217, 0.30), transparent 32%),
    linear-gradient(180deg, rgba(252, 253, 249, 0.98), rgba(244, 248, 240, 0.96));
  box-shadow: 0 28px 46px rgba(15, 28, 20, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

#agv3App.agv3-sheet-visible .agv3-sheet-header {
  padding-top: 4px;
}

.agv3-sheet-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.agv3-sheet-header {
  align-items: center;
}

.agv3-sheet-close {
  flex: 0 0 36px;
  width: 36px !important;
  min-width: 36px;
  max-width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 0;
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(39, 72, 49, 0.10);
}

.agv3-sheet-handle-bar {
  width: 64px;
  background: rgba(53, 91, 62, 0.20);
}

@media (max-width: 1100px) {
  #agSection-create .agv3-create-body {
    padding: 12px 12px 10px;
  }

  #agSection-create .agv3-card-toggle {
    padding: 12px 14px;
  }

  .agv3-edit-grid,
  .agv3-edit-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  #agv3App.agv3-sheet-visible .agv3-sidebar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    height: min(var(--agv3-sheet-size), calc(100vh - 16px));
    height: min(var(--agv3-sheet-size), calc(100dvh - 16px));
  }
}

.agv3-toast {
  bottom: calc(var(--agv3-bottom-stack-h) + 10px);
  border-radius: 16px;
  background: rgba(25, 40, 30, 0.82);
  box-shadow: 0 16px 26px rgba(8, 16, 11, 0.18);
}

.agv3-map-pane .leaflet-control-zoom a {
  width: 40px;
  height: 40px;
  line-height: 38px;
  border: 1px solid rgba(39, 72, 49, 0.10);
  background: rgba(251, 252, 248, 0.94);
  box-shadow: 0 16px 30px rgba(19, 36, 24, 0.10);
}

@media (max-width: 980px) {
  #agv3App {
    --agv3-bottom-nav-h: 82px;
    --agv3-toolbar-h: 62px;
  }

  .agv3-topbar.slim-header {
    padding: 8px 8px 6px;
  }

  .agv3-brand {
    font-size: 17px;
  }

  .agv3-mode-btn {
    min-width: 132px;
    width: 132px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .agv3-mode-menu {
    min-width: 220px;
  }

  .agv3-top-actions {
    gap: 6px;
  }

  .agv3-topbar.slim-header .agv3-farm-btn,
  .agv3-topbar.slim-header .agv3-shell-help-btn,
  .agv3-topbar.slim-header .agv3-shell-icon-btn {
    height: 36px;
    border-radius: 16px;
  }

  .agv3-topbar.slim-header .agv3-shell-help-btn {
    min-width: 36px;
    width: 36px;
    padding: 0;
    font-size: 0;
  }

  .agv3-topbar.slim-header .agv3-shell-help-btn::before {
    content: '?';
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
  }

  .agv3-farm-btn {
    max-width: min(34vw, 142px);
  }

  .agv3-toolbar {
    left: 8px;
    right: 8px;
    bottom: calc(var(--agv3-bottom-nav-h) + 10px + env(safe-area-inset-bottom, 0px));
    padding: 7px;
    border-radius: 22px;
  }

  .agv3-window-label {
    max-width: 78px;
  }

  .agv3-range-window {
    padding-inline: 8px;
  }

  .agv3-selected-day-btn {
    min-width: 58px;
    height: 38px;
    padding-inline: 10px;
  }

  .agv3-sidebar {
    padding: 14px;
  }

  .agv3-card {
    padding: 14px;
    border-radius: 22px;
  }

  .agv3-card-head h3 {
    font-size: 17px;
  }

  .agv3-summary-grid {
    grid-template-columns: 1fr;
  }

  .agv3-stat {
    padding: 15px 14px;
  }

  .agv3-stat-value {
    font-size: 22px;
  }

  .agv3-bottom-nav {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 6px;
    border-radius: 24px;
  }

  .agv3-bottom-nav .agv3-tab-btn {
    min-width: 66px;
    min-height: 62px;
    padding: 8px 8px 6px;
    border-radius: 18px;
  }

  .agv3-bottom-nav .agv3-tab-btn span:last-child {
    font-size: 9px;
  }

  #agv3App.agv3-sheet-visible .agv3-sidebar {
    left: 8px;
    right: 8px;
    bottom: calc(var(--agv3-bottom-stack-h) + 6px);
  }
}

@media (max-width: 1100px) {
  #agv3App.agv3-sheet-visible .agv3-sidebar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    height: min(var(--agv3-sheet-size), calc(100vh - 16px));
    height: min(var(--agv3-sheet-size), calc(100dvh - 16px));
    min-height: min(340px, calc(100vh - 16px));
    min-height: min(340px, calc(100dvh - 16px));
  }
}

.agv3-create-card-head,
.agv3-card-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.agv3-create-card-head h3,
.agv3-card-toggle h3 {
  margin: 0;
}

#agSection-create .agv3-create-launcher-card {
  display: block;
}

#agSection-create .agv3-create-card {
  display: none;
}

#agv3App.agv3-create-card-active #agSection-create .agv3-create-launcher-card {
  display: none;
}

#agv3App.agv3-create-card-active #agSection-create .agv3-create-card.is-open {
  display: block;
}

#agSection-create .agv3-create-card .agv3-create-body {
  display: block;
  margin-top: 10px;
}

.agv3-edit-panel-card {
  padding-top: 14px;
}

#agv3App.agv3-edit-focus .agv3-map-summary-shell,
#agv3App.agv3-create-focus .agv3-map-summary-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
}

@media (max-width: 1100px) {
  #agv3App.agv3-sheet-visible .agv3-sidebar {
    left: 0;
    right: 0;
    bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    height: min(var(--agv3-sheet-size), 100vh);
    height: min(var(--agv3-sheet-size), 100dvh);
    min-height: 0;
  }

  #agSection-create .agv3-create-card,
  #agSection-edit .agv3-edit-panel-card {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  #agv3App.agv3-create-focus #agSection-create .agv3-create-card,
  #agv3App.agv3-edit-focus #agSection-edit .agv3-edit-panel-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding-top: 8px;
  }

  #agv3App.agv3-create-focus #agSection-create .agv3-create-card-head {
    display: none;
  }
}

@media (max-width: 1100px) {
  #agv3App.agv3-sheet-visible .agv3-sheet-handle {
    margin: 0 auto 2px;
    padding: 2px 0 3px;
  }

  #agv3App.agv3-sheet-visible .agv3-sheet-header {
    min-height: 28px;
    padding: 0 0 2px;
    margin-bottom: 0;
  }

  #agv3App.agv3-sheet-visible .agv3-sheet-title {
    font-size: 14px;
    line-height: 1.1;
  }

  #agv3App.agv3-sheet-visible .agv3-sheet-close {
    width: 32px !important;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
  }
}

#agv3App.agv3-paddock-drawing {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

#agv3App.agv3-paddock-drawing .agv3-map-pane .leaflet-bottom {
  margin-bottom: max(6px, env(safe-area-inset-bottom, 0px));
}

.agv3-bottom-nav .agv3-tab-btn[data-section='create'] {
  min-width: 78px;
  min-height: 58px;
  border-color: rgba(122, 188, 95, 0.26);
  background: linear-gradient(180deg, rgba(229, 242, 220, 0.92), rgba(211, 232, 196, 0.90));
  box-shadow: 0 10px 20px rgba(47, 93, 50, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.76);
  color: #183d25;
}

.agv3-bottom-nav .agv3-tab-btn[data-section='create'].is-active {
  border-color: rgba(104, 173, 77, 0.34);
  background: linear-gradient(180deg, rgba(235, 247, 227, 0.98), rgba(199, 226, 181, 0.96));
  box-shadow: 0 14px 26px rgba(44, 88, 46, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.agv3-toast {
  bottom: calc(var(--agv3-bottom-stack-h) + 8px);
  z-index: var(--agv3-z-toast);
  border-radius: 10px;
  background: rgba(10, 13, 12, 0.66);
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1.2;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
  max-width: min(72vw, 260px);
  backdrop-filter: blur(6px);
}

@media (max-width: 980px) {
  .agv3-bottom-nav .agv3-tab-btn[data-section='create'] {
    min-width: 70px;
    min-height: 56px;
  }

  .agv3-toast {
    max-width: min(78vw, 230px);
  }
}

#agToast {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px) + 16px) !important;
  bottom: auto !important;
  left: 50% !important;
  z-index: 2147483647 !important;
  transform: translateX(-50%) translateY(-8px);
}

#agToast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
