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: flex-start;
  align-items: center;
  gap: 12px;
}

.agv3-brand--auth {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.agv3-brand--auth .brand-lockup__wordmark {
  font-size: clamp(24px, 5vw, 30px);
  text-shadow: none;
}

.agv3-brand--auth .brand-lockup {
  gap: 10px;
}

.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-map-dialog: 1500;
  --agv3-z-toolbar: 900;
  --agv3-z-topbar: 1300;
  --agv3-z-topmenu: 1400;
  --agv3-z-topmenu-popover: 1410;
  --agv3-z-sheet: 5200;
  --agv3-z-onboarding: 5900;
  --agv3-z-guidance: 6000;
  --agv3-z-modal: 9999;
  --agv3-selection-accent: #ff2db2;
  --agv3-selection-accent-dark: #a8006f;
  --agv3-selection-contrast: #ffffff;
  --agv3-selection-wash: rgba(255, 45, 178, 0.18);
  --agv3-selection-ring: rgba(255, 45, 178, 0.46);
  --agv3-font-scale: 1;
  --agv3-font-size-base: 14px;
  --agv3-icon-size: 40px;
  --agv3-marker-icon-size: 38px;
  --agv3-control-height: 40px;
  --agv3-control-padding-x: 12px;
  --agv3-density-space: 1;
  --agv3-z-toast: 20000;
  font-size: calc(var(--agv3-font-size-base) * var(--agv3-font-scale));
  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-journal-list {
  min-height: min(52vh, 680px);
}

.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: 8px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.agv3-edit-actions--webix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 6px;
}

.agv3-edit-actions--webix > .btn-primary {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
}

.agv3-edit-actions--webix > .btn-ghost {
  width: auto;
  min-width: 0;
  margin-top: 0;
  flex: 0 0 auto;
}

.agv3-edit-actions--webix > .btn-ghost:not(.agv3-edit-danger-btn) {
  width: 100%;
}

.agv3-edit-actions > .agv3-edit-danger-btn {
  min-height: 30px;
  padding: 4px 10px;
  margin-left: auto;
  border-width: 1px;
  font-size: 11px;
  line-height: 1.1;
  justify-self: end;
  white-space: nowrap;
}

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

.agv3-edit-inline-actions--bottom {
  margin-top: 14px;
  margin-bottom: 0;
}

.agv3-split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agv3-split-row--task-top {
  margin: 0 0 8px;
}

.agv3-split-row--task-top .agv3-check-row {
  margin: 0;
}

.agv3-edit-danger-btn {
  width: auto;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  border-color: rgba(121, 38, 38, 0.2);
  background: rgba(121, 38, 38, 0.08);
  color: #6d2525;
  font-size: 12px;
  font-weight: 700;
}

.agv3-edit-danger-btn:hover,
.agv3-edit-danger-btn:focus-visible {
  border-color: rgba(121, 38, 38, 0.28);
  background: rgba(121, 38, 38, 0.14);
  color: #5a1d1d;
}

#agv3App .btn-primary:disabled,
#agv3App .btn-ghost:disabled,
#agv3App button[data-busy='1'] {
  opacity: 0.52;
  filter: saturate(0.3);
  cursor: not-allowed;
}

#agv3App button.btn-primary,
#agv3App button.btn-secondary,
#agv3App button.btn-ghost:not(.agv3-row-title),
#agv3App a.btn-primary,
#agv3App a.btn-secondary,
#agv3App a.btn-ghost:not(.agv3-row-title) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  min-height: var(--agv3-control-height, 40px);
  padding-inline: var(--agv3-control-padding-x, 12px);
  font-size: calc(1em * var(--agv3-font-scale, 1));
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
}

#agv3App .slim-field,
#agv3App .slim-select {
  min-height: var(--agv3-control-height, 40px);
  padding-inline: var(--agv3-control-padding-x, 12px);
  font-size: calc(1em * var(--agv3-font-scale, 1));
}

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

.agv3-mob-shortcuts {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.agv3-mob-shortcuts__label {
  color: #556a57;
  font-size: 10px;
  font-weight: 700;
}

.agv3-mob-shortcuts__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.agv3-mob-shortcut {
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.1;
}

.agv3-mob-shortcut.is-active {
  border-color: rgba(45, 90, 45, 0.28);
  background: rgba(45, 90, 45, 0.12);
  color: #234528;
}

.agv3-mob-shortcuts__hint {
  color: #5f6f61;
  font-size: 10px;
  line-height: 1.2;
}

.agv3-observation-media {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid rgba(36, 74, 43, 0.10);
  border-radius: 16px;
  background: rgba(247, 250, 244, 0.9);
}

.agv3-card-head--compact {
  margin: 0;
}

.agv3-observation-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
}

.agv3-observation-media-thumb {
  padding: 0;
  border: 1px solid rgba(36, 74, 43, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 16px rgba(18, 32, 22, 0.08);
}

.agv3-observation-media-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
}

.agv3-upload-label--edit {
  margin-bottom: 0;
}

#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 .agv3-journal-entry-cell,
#agv3App .agv3-journal-linked-cell {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  line-height: 1.25;
}

#agv3App .agv3-journal-entry-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#agv3App .agv3-journal-entry-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#agv3App .agv3-journal-entry-icon {
  font-size: 16px;
  line-height: 1;
}

#agv3App .agv3-journal-entry-kind {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(45, 90, 45, 0.08);
  color: #335236;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

#agv3App .agv3-journal-entry-preview,
#agv3App .agv3-journal-linked-sub {
  color: #5f6f61;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#agv3App .agv3-journal-edit-btn,
#agv3App .agv3-journal-menu-btn {
  width: 100%;
  border: 1px solid rgba(45, 90, 45, 0.18);
  border-radius: 10px;
  background: #fff;
  color: #294a2b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 0;
  cursor: pointer;
}

#agv3App .agv3-journal-edit-btn:hover,
#agv3App .agv3-journal-menu-btn:hover {
  background: #f3f8f0;
}

#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: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 142px), 1fr));
  gap: 8px;
}

.agv3-create-launcher-btn {
  width: auto;
  min-width: 0;
  margin-top: 0;
  flex: initial;
  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;
  container-type: inline-size;
  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-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.agv3-filter-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agv3-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agv3-filter-row--timeline-main {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  margin-top: 2px;
  padding: 1px 0 2px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  position: relative;
  background-repeat: no-repeat;
}

.agv3-filter-row--timeline-main::-webkit-scrollbar {
  display: none;
}

.agv3-filter-row--timeline-main.is-scrollable:not(.is-at-end) {
  background-image:
    linear-gradient(to left, rgba(250, 252, 247, 0.98), rgba(250, 252, 247, 0)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f6f61' d='M4.1 1.75a.7.7 0 0 1 .99 0l3.75 3.75a.7.7 0 0 1 0 .99L5.09 10.24a.7.7 0 1 1-.99-.99l3.25-3.25-3.25-3.26a.7.7 0 0 1 0-.99Z'/%3E%3C/svg%3E");
  background-size: 38px 100%, 12px 12px;
  background-position: right top, right 8px center;
}

.agv3-filter-row--timeline-main.is-scrollable:not(.is-at-start) {
  box-shadow: inset 18px 0 16px -18px rgba(95, 111, 97, 0.38);
}

.agv3-filter-row--timeline-main > * {
  flex: 0 0 auto;
}

.agv3-filter-row--timeline-tools {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.agv3-filter-row--timeline-main .agv3-filter-row--timeline-tools {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-start;
  min-width: max-content;
  gap: 8px;
}

.agv3-filter-control {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  min-width: 0;
  padding: 5px 10px;
  border-radius: 12px;
  border: 1px solid rgba(41, 74, 43, 0.12);
  background: rgba(248, 251, 247, 0.98);
  color: #294a2b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.agv3-filter-control--select {
  display: block;
  width: auto;
  min-width: 118px;
  max-width: 100%;
  padding-right: 28px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f6f61' d='M2.1 4.35a.55.55 0 0 1 .78 0L6 7.47l3.12-3.12a.55.55 0 1 1 .78.78L6.39 8.64a.55.55 0 0 1-.78 0L2.1 5.13a.55.55 0 0 1 0-.78Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 11px 11px;
}

.agv3-filter-control--select:focus,
.agv3-filter-control--select:hover {
  border-color: rgba(45, 90, 45, 0.26);
  background-color: rgba(244, 249, 242, 0.98);
}

.agv3-filter-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 12px;
  border: 1px solid rgba(41, 74, 43, 0.12);
  background: rgba(248, 251, 247, 0.98);
  color: #294a2b;
}

.agv3-filter-row--timeline-main .agv3-filter-trigger {
  min-width: 118px;
}

.agv3-filter-trigger::after {
  content: '▾';
  flex: 0 0 auto;
  color: #5f6f61;
  font-size: 12px;
  line-height: 1;
}

.agv3-filter-row--timeline-tools .agv3-filter-trigger {
  flex: 0 0 auto;
}

.agv3-selection-scheme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.agv3-selection-scheme-choice {
  display: grid;
  grid-template-columns: auto 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 74px;
  padding: 9px;
  border: 1px solid rgba(41, 74, 43, 0.14);
  border-radius: 8px;
  background: rgba(250, 252, 248, 0.92);
  cursor: pointer;
}

.agv3-selection-scheme-choice:has(input:checked) {
  border-color: var(--scheme-accent);
  box-shadow: 0 0 0 3px var(--scheme-ring);
}

.agv3-selection-scheme-choice strong,
.agv3-selection-scheme-choice small {
  display: block;
}

.agv3-selection-scheme-choice small {
  margin-top: 2px;
  color: #526553;
  line-height: 1.2;
}

.agv3-selection-scheme-swatch {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 3px solid var(--scheme-contrast);
  outline: 5px solid var(--scheme-accent);
  background: var(--scheme-wash);
  display: grid;
  place-items: center;
}

.agv3-selection-scheme-swatch span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--scheme-accent);
}

.agv3-selection-scheme-choice--vivid {
  --scheme-accent: #00b7ff;
  --scheme-contrast: #ffffff;
  --scheme-wash: rgba(0, 183, 255, 0.18);
  --scheme-ring: rgba(0, 183, 255, 0.32);
}

.agv3-selection-scheme-choice--magenta {
  --scheme-accent: #ff2db2;
  --scheme-contrast: #ffffff;
  --scheme-wash: rgba(255, 45, 178, 0.18);
  --scheme-ring: rgba(255, 45, 178, 0.32);
}

.agv3-selection-scheme-choice--dark-magenta {
  --scheme-accent: #b0007a;
  --scheme-contrast: #ffffff;
  --scheme-wash: rgba(176, 0, 122, 0.18);
  --scheme-ring: rgba(176, 0, 122, 0.32);
}

.agv3-selection-scheme-choice--survey {
  --scheme-accent: #111111;
  --scheme-contrast: #ffffff;
  --scheme-wash: rgba(17, 17, 17, 0.12);
  --scheme-ring: rgba(17, 17, 17, 0.24);
}

.agv3-selection-scheme-choice--calm {
  --scheme-accent: #2f7d45;
  --scheme-contrast: #f8fff4;
  --scheme-wash: rgba(47, 125, 69, 0.14);
  --scheme-ring: rgba(47, 125, 69, 0.22);
}

.agv3-appearance-settings {
  gap: calc(8px * var(--agv3-density-space, 1));
}

.agv3-appearance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.agv3-appearance-control {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.agv3-appearance-control > span {
  color: #5f6f61;
  font-size: calc(11px * var(--agv3-font-scale, 1));
  font-weight: 800;
}

.agv3-appearance-preview {
  display: grid;
  grid-template-columns: var(--agv3-icon-size, 40px) minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(8px * var(--agv3-density-space, 1));
  min-height: calc(var(--agv3-control-height, 40px) + 18px);
  padding: calc(8px * var(--agv3-density-space, 1));
  border-radius: 14px;
  border: 1px solid rgba(41, 74, 43, 0.12);
  background: rgba(248, 251, 247, 0.94);
}

.agv3-appearance-preview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--agv3-icon-size, 40px);
  height: var(--agv3-icon-size, 40px);
  border-radius: 999px;
  background: var(--agv3-selection-wash, rgba(255, 45, 178, 0.18));
  border: 2px solid var(--agv3-selection-accent, #ff2db2);
  color: var(--agv3-selection-accent-dark, #a8006f);
  font-size: calc(15px * var(--agv3-font-scale, 1));
}

.agv3-appearance-preview-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.agv3-appearance-preview-copy strong,
.agv3-appearance-preview-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-appearance-preview-copy strong {
  font-size: calc(14px * var(--agv3-font-scale, 1));
  line-height: 1.15;
}

.agv3-appearance-preview-copy small {
  color: #5f6f61;
  font-size: calc(11px * var(--agv3-font-scale, 1));
  line-height: 1.2;
}

.agv3-appearance-preview-btn {
  width: var(--agv3-icon-size, 40px);
  min-width: var(--agv3-icon-size, 40px);
  height: var(--agv3-icon-size, 40px);
  min-height: var(--agv3-icon-size, 40px);
  padding: 0;
  border-radius: 999px;
  pointer-events: none;
}

@media (max-width: 760px) {
  .agv3-selection-scheme-grid,
  .agv3-appearance-grid {
    grid-template-columns: 1fr;
  }
}

.agv3-filter-trigger.is-active {
  border-color: rgba(45, 90, 45, 0.28);
  box-shadow: 0 0 0 3px rgba(45, 90, 45, 0.08);
  background: rgba(237, 245, 234, 0.94);
}

.agv3-filter-trigger-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}

.agv3-filter-trigger-label {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.agv3-filter-trigger-meta {
  font-size: 10px;
  font-weight: 700;
  color: #5f6f61;
  line-height: 1.1;
}

@media (max-width: 980px) {
  .agv3-filter-row--timeline-main {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .agv3-filter-row--timeline-main {
    justify-content: flex-start;
  }

  .agv3-filter-row--timeline-main .agv3-filter-control,
  .agv3-filter-row--timeline-main .agv3-filter-control--select,
  .agv3-filter-row--timeline-main .agv3-filter-trigger {
    width: auto;
  }
}

.agv3-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(41, 74, 43, 0.08);
  background: linear-gradient(180deg, rgba(249, 252, 247, 0.98), rgba(244, 248, 241, 0.96));
}

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

.agv3-filter-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.agv3-filter-block--wide {
  grid-column: 1 / -1;
}

.agv3-filter-block-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5f6f61;
}

.agv3-filter-pill-list,
.agv3-filter-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agv3-filter-pill-list--scroll {
  max-height: 120px;
  overflow: auto;
  padding-right: 4px;
}

.agv3-filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(41, 74, 43, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #294a2b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

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

.agv3-filter-actions {
  display: flex;
  justify-content: flex-end;
}

.agv3-filter-reset {
  min-height: 34px;
}

.agv3-filter-empty {
  color: #5f6f61;
  font-size: 12px;
}

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

.agv3-filter-check input {
  margin: 0;
}

.agv3-timeline-totals {
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 0;
  margin: -4px 0 6px;
}

.agv3-timeline-totals:empty {
  display: none;
}

.agv3-timeline-total-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid rgba(41, 74, 43, 0.1);
  border-radius: 999px;
  background: rgba(247, 250, 245, 0.96);
  color: #294a2b;
  font-size: 11px;
  line-height: 1.1;
}

.agv3-timeline-total-label {
  color: #5f6f61;
  font-weight: 700;
}

.agv3-timeline-total-pill strong {
  font-size: 11px;
  font-weight: 850;
}

.agv3-timeline-card {
  overflow: hidden;
}

.agv3-timeline-card > .agv3-card-head,
.agv3-timeline-card > .agv3-filter-row,
.agv3-timeline-card > .agv3-filter-checks,
.agv3-timeline-card > .agv3-timeline-totals {
  flex: 0 0 auto;
}

.agv3-timeline-card > .agv3-timeline-rows {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
}

@media (max-width: 720px) {
  .agv3-filter-panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.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;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.agv3-row.is-selected {
  border-color: var(--agv3-selection-accent, #00b7ff);
  background: linear-gradient(180deg, var(--agv3-selection-wash, rgba(0, 183, 255, 0.18)), rgba(246, 251, 243, 0.98));
  box-shadow: 0 0 0 3px var(--agv3-selection-ring, rgba(0, 183, 255, 0.44)), 0 12px 24px rgba(41, 74, 43, 0.12);
}

.agv3-row.is-selected::before {
  content: '';
  display: block;
  position: absolute;
}

.agv3-row {
  position: relative;
}

.agv3-row.is-selected::before {
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 5px;
  border-radius: 999px;
  background: var(--agv3-selection-accent, #00b7ff);
}

.agv3-row.is-selected .agv3-row-title,
.agv3-row.is-selected .agv3-row-caption,
.agv3-row.is-selected .agv3-row-legend,
.agv3-row.is-selected .agv3-chip {
  color: #183f20;
}

.agv3-row.is-selected .agv3-row-open-detail--title {
  border-color: var(--agv3-selection-accent, #00b7ff);
  background: var(--agv3-selection-wash, rgba(0, 183, 255, 0.18));
  box-shadow: 0 0 0 2px var(--agv3-selection-ring, rgba(0, 183, 255, 0.44));
}

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

.agv3-row[data-kind='paddock'] .agv3-row-head > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.agv3-row-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-weight: 800;
  color: #294a2b;
}

.agv3-row-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
}

.agv3-row-title-meta {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #5f6f61;
}

.agv3-row[data-kind='paddock'] .agv3-row-title,
.agv3-row[data-kind='paddock'] .agv3-row-caption {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.agv3-row[data-kind='paddock'] .agv3-chip {
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.agv3-row-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agv3-row-open-detail {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
}

.agv3-row-open-detail--title {
  flex: 0 0 auto;
  min-height: 30px;
  max-width: 100%;
  padding: 3px 10px;
  border: 1px solid #d3dac9;
  background: #f4f2e8;
  border-radius: 999px;
  justify-content: flex-start;
  text-align: left;
  color: inherit;
}

.agv3-row-open-detail--title:hover {
  background: #ece8d8;
  border-color: #bcc8ad;
}

.agv3-row[data-kind='paddock'] .agv3-dmha-chip {
  display: inline-grid;
  grid-template-columns: 8.5ch 11.25ch;
  align-items: center;
  column-gap: 6px;
  padding-left: 8px;
  padding-right: 8px;
  font-variant-numeric: tabular-nums lining-nums;
}

.agv3-dmha-chip-delta {
  display: grid;
  grid-template-columns: 1em minmax(0, 1fr);
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.agv3-dmha-chip-delta.is-up {
  color: #2e9e44;
}

.agv3-dmha-chip-delta.is-down {
  color: #c44f39;
}

.agv3-dmha-chip-delta.is-flat {
  color: #687567;
}

.agv3-dmha-chip-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  font-size: 13px;
  line-height: 1;
}

.agv3-dmha-chip-delta-value,
.agv3-dmha-chip-total {
  white-space: nowrap;
}

.agv3-dmha-chip-total {
  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-row[data-kind='paddock'] .agv3-row-legend {
  flex-wrap: nowrap;
  overflow: hidden;
}

.agv3-row[data-kind='paddock'] .agv3-row-legend > span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.agv3-paddock-detail {
  --agv3-detail-label-width: 164px;
  --agv3-detail-label-half: 82px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agv3-paddock-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 2px 0;
}

.agv3-paddock-detail-head.is-selected {
  padding: 8px 10px 2px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--agv3-selection-wash, rgba(0, 183, 255, 0.18)), rgba(246, 251, 243, 0.96));
  box-shadow: inset 0 0 0 2px var(--agv3-selection-ring, rgba(0, 183, 255, 0.44));
}

.agv3-paddock-detail-head.is-selection-change {
  animation: agv3-selection-wash 520ms ease-out 1;
}

@keyframes agv3-selection-wash {
  0% {
    background: var(--agv3-selection-accent, #00b7ff);
    box-shadow: inset 0 0 0 3px var(--agv3-selection-accent, #00b7ff), 0 0 0 5px var(--agv3-selection-ring, rgba(0, 183, 255, 0.44));
  }
  100% {
    background: linear-gradient(180deg, var(--agv3-selection-wash, rgba(0, 183, 255, 0.18)), rgba(246, 251, 243, 0.96));
    box-shadow: inset 0 0 0 2px var(--agv3-selection-ring, rgba(0, 183, 255, 0.44));
  }
}

.agv3-paddock-detail-head-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agv3-paddock-detail-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.agv3-paddock-detail-chip-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.agv3-paddock-detail-date-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf3e7;
  border: 1px solid #d3dac9;
  color: #294a2b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.agv3-paddock-detail-state-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(38, 64, 39, 0.08);
  border: 1px solid rgba(38, 64, 39, 0.14);
  color: #2e5130;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.agv3-paddock-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agv3-paddock-detail-actions > .btn-primary,
.agv3-paddock-detail-actions > .btn-secondary,
.agv3-paddock-detail-actions > .btn-ghost {
  width: auto;
  min-width: 0;
  margin-top: 0;
  flex: 0 0 auto;
}

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

.agv3-paddock-state-summary {
  margin: 0;
}

.agv3-paddock-state-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.agv3-paddock-state-preset {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(39, 69, 39, 0.18);
  background: linear-gradient(180deg, rgba(248, 251, 246, 0.96), rgba(237, 245, 234, 0.98));
  color: #1d341e;
  text-align: left;
  font: inherit;
}

.agv3-paddock-state-preset strong {
  font-size: 13px;
  line-height: 1.2;
}

.agv3-paddock-state-preset span {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(29, 52, 30, 0.82);
}

.agv3-paddock-state-preset:hover:not(:disabled),
.agv3-paddock-state-preset:focus-visible {
  border-color: rgba(42, 100, 48, 0.38);
  background: linear-gradient(180deg, rgba(244, 249, 241, 1), rgba(228, 240, 223, 1));
}

.agv3-paddock-state-preset:disabled {
  opacity: 0.6;
}

.agv3-paddock-state-modal {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(14, 24, 15, 0.46);
}

.agv3-paddock-state-modal[hidden] {
  display: none;
}

.agv3-paddock-state-modal__dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: min(88vh, calc(100dvh - 24px));
  overflow: auto;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(250, 252, 248, 0.98), rgba(241, 247, 238, 0.98));
  box-shadow: 0 24px 60px rgba(16, 30, 18, 0.28);
}

.agv3-paddock-state-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.agv3-paddock-state-modal__title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  color: #1c331d;
}

.agv3-paddock-state-modal__close {
  flex: 0 0 auto;
}

.agv3-paddock-state-modal__body {
  min-width: 0;
}

.agv3-growth-summary {
  padding: 10px 12px;
  border: 1px solid rgba(74, 110, 76, 0.22);
  border-radius: 8px;
  background: rgba(246, 250, 244, 0.9);
  color: #344636;
  font-size: 13px;
  line-height: 1.45;
}

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

.agv3-growth-mode-grid,
.agv3-growth-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.agv3-growth-choice {
  display: grid;
  gap: 3px;
  align-content: start;
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgba(70, 100, 72, 0.2);
  border-radius: 8px;
  background: #fff;
  color: #243426;
  text-align: left;
  cursor: pointer;
}

.agv3-growth-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.agv3-growth-choice:has(input:checked) {
  border-color: #317c45;
  box-shadow: 0 0 0 2px rgba(49, 124, 69, 0.16);
}

.agv3-growth-choice strong {
  font-size: 13px;
  line-height: 1.25;
}

.agv3-growth-choice span {
  font-size: 12px;
  color: #607062;
  line-height: 1.3;
}

.agv3-growth-rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.agv3-growth-rate-grid .fld {
  min-width: 0;
}

.agv3-growth-rate-grid .slim-field {
  width: 100%;
}

.agv3-growth-context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.agv3-growth-annual {
  font-size: 12px;
  color: #536456;
}

.agv3-paddock-detail-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 6px;
}

.agv3-asset-detail-scroll {
  cursor: grab;
  touch-action: pan-y;
}

.agv3-asset-detail-scroll.is-drag-panning {
  cursor: grabbing;
  user-select: none;
}

.agv3-paddock-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agv3-paddock-detail-ruler {
  display: grid;
  grid-template-columns: var(--agv3-detail-label-width) minmax(0, 1fr);
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 5;
}

.agv3-paddock-detail-ruler-label {
  position: sticky;
  left: 0;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  min-width: var(--agv3-detail-label-width);
  width: var(--agv3-detail-label-width);
  padding: 0 12px 6px;
  background: rgba(250, 252, 248, 0.98);
  color: #5f6f61;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 4px 0 10px rgba(41, 74, 43, 0.08);
}

.agv3-paddock-detail-ruler-band {
  min-height: 30px;
  background: rgba(250, 252, 248, 0.98);
  box-shadow: 0 6px 12px rgba(41, 74, 43, 0.06);
}

.agv3-paddock-detail-ruler-scale {
  height: 30px;
}

.agv3-paddock-detail-ruler-band svg {
  width: 100%;
  height: 30px;
  display: block;
  overflow: visible;
}

.agv3-paddock-detail-ruler-viewport {
  overflow: hidden;
  padding: 0 10px;
  background: rgba(250, 252, 248, 0.98);
}

.agv3-asset-detail .agv3-paddock-detail-ruler-viewport {
  padding-left: 0;
  padding-right: 0;
}

.agv3-asset-center-guide {
  position: absolute;
  left: calc(50% + var(--agv3-detail-label-half));
  top: 0;
  z-index: 4;
  width: 0;
  bottom: 6px;
  pointer-events: none;
}

.agv3-asset-center-guide::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  border-left: 1.5px dashed #294a2b;
  box-shadow: 0 0 0 1px rgba(250, 252, 248, 0.78);
}

.agv3-paddock-detail-row {
  display: grid;
  grid-template-columns: var(--agv3-detail-label-width) max-content;
  min-width: max-content;
  align-items: stretch;
}

.agv3-paddock-detail-label {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  min-width: var(--agv3-detail-label-width);
  width: var(--agv3-detail-label-width);
  padding: 10px 12px;
  border: 1px solid rgba(41, 74, 43, 0.08);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: rgba(250, 252, 248, 0.98);
  box-shadow: 4px 0 10px rgba(41, 74, 43, 0.08);
  color: #294a2b;
  text-align: left;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease, color 120ms ease;
}

.agv3-paddock-detail-label.is-selected {
  border-color: var(--agv3-selection-accent, #00b7ff);
  background: linear-gradient(180deg, var(--agv3-selection-wash, rgba(0, 183, 255, 0.18)), rgba(245, 250, 242, 0.99));
  box-shadow: 0 0 0 3px var(--agv3-selection-ring, rgba(0, 183, 255, 0.44)), 4px 0 10px rgba(41, 74, 43, 0.1);
  color: #183f20;
}

.agv3-paddock-detail-row.is-selected .agv3-paddock-detail-band,
.agv3-paddock-detail-band.is-selected {
  border-color: var(--agv3-selection-accent, #00b7ff);
  background: var(--agv3-selection-wash, rgba(0, 183, 255, 0.18));
  box-shadow: inset 0 0 0 2px var(--agv3-selection-ring, rgba(0, 183, 255, 0.44));
}

.agv3-paddock-detail-row.is-selected .agv3-paddock-detail-band svg {
  filter: saturate(1.05) contrast(1.02);
}

.agv3-paddock-detail-label-title {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  font-size: 13px;
  font-weight: 800;
  color: #294a2b;
}

.agv3-paddock-detail-label-icon {
  flex: 0 0 auto;
}

.agv3-paddock-detail-label-text,
.agv3-paddock-detail-label-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-paddock-detail-label-meta {
  font-size: 11px;
  color: #5f6f61;
}

.agv3-paddock-detail-band {
  min-height: 66px;
  padding: 0 10px;
  border: 1px solid rgba(41, 74, 43, 0.08);
  border-radius: 0 14px 14px 0;
  background: rgba(250, 252, 248, 0.92);
  display: flex;
  align-items: center;
}

.agv3-paddock-detail-row[data-row-kind='dmha_model'] .agv3-paddock-detail-band {
  min-height: 74px;
}

.agv3-paddock-detail-row[data-row-kind='asset_series'] .agv3-paddock-detail-band,
.agv3-asset-detail-band {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding-left: 0;
  padding-right: 0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.agv3-paddock-detail-row[data-row-kind='asset_series'] .agv3-paddock-detail-label {
  align-self: start;
  justify-content: flex-start;
  min-height: 168px;
  height: 168px;
  padding-bottom: 8px;
}

.agv3-paddock-detail-row[data-row-kind='asset_series'] .agv3-paddock-detail-label-title,
.agv3-paddock-detail-row[data-row-kind='asset_series'] .agv3-paddock-detail-label-meta {
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.agv3-asset-axis {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  bottom: 0;
  z-index: 1;
  color: #536456;
  pointer-events: none;
}

.agv3-asset-axis-tick {
  position: absolute;
  right: 7px;
  transform: translateY(-50%);
  padding-left: 4px;
  background: rgba(250, 252, 248, 0.94);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.agv3-asset-axis-unit {
  position: absolute;
  right: 7px;
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6d7c6f;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.agv3-asset-detail-band svg {
  height: 156px;
  min-height: 156px;
  flex: 0 0 156px;
}

.agv3-asset-reading-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
  gap: 6px;
  align-content: start;
  justify-content: start;
  padding: 0 8px 2px;
}

.agv3-asset-reading-disclosure {
  padding: 0 8px 2px;
}

.agv3-asset-reading-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 150px;
  padding: 7px 10px;
  border: 1px solid #d7e2d5;
  border-radius: 10px;
  background: #f8fbf7;
  color: #234125;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.agv3-asset-reading-disclosure .agv3-asset-reading-list {
  margin-top: 8px;
  padding-left: 0;
  padding-right: 0;
}

.agv3-asset-reading-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid #d7e2d5;
  border-radius: 10px;
  background: #f8fbf7;
  color: #294a2b;
  text-align: left;
  cursor: pointer;
}

.agv3-asset-reading-time {
  font-weight: 700;
  color: #234125;
}

.agv3-asset-reading-value {
  color: #49604b;
}

.agv3-asset-detail-empty {
  display: flex;
  align-items: center;
  min-height: 136px;
  color: #5f6f61;
  font-size: 12px;
  font-weight: 700;
}

.agv3-paddock-detail-band svg {
  width: 100%;
  min-width: 100%;
  display: block;
  overflow: visible;
}

.agv3-card.agv3-timeline-detail-mode > .agv3-card-head,
.agv3-card.agv3-timeline-detail-mode > .agv3-filter-row,
.agv3-card.agv3-timeline-detail-mode > .agv3-filter-checks {
  display: none;
}

@media (max-width: 720px) {
  .agv3-paddock-detail {
    --agv3-detail-label-width: 132px;
    --agv3-detail-label-half: 66px;
  }

  .agv3-paddock-detail-label {
    padding-left: 10px;
    padding-right: 10px;
  }
}

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

.agv3-photo-head {
  gap: 10px;
  align-items: stretch;
}

.agv3-photo-head-toggle {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(41, 74, 43, 0.12);
  border-radius: 10px;
  background: rgba(246, 250, 243, 0.86);
  color: #193124;
  text-align: left;
  cursor: pointer;
}

.agv3-photo-head-toggle:hover {
  border-color: rgba(45, 90, 45, 0.28);
  background: rgba(238, 247, 234, 0.96);
}

.agv3-photo-head-title {
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.agv3-photo-head-chevron {
  color: #294a2b;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.agv3-photo-head-toggle[aria-expanded='false'] .agv3-photo-head-chevron {
  transform: rotate(-90deg);
}

.agv3-photo-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.agv3-photo-head-actions .agv3-card-head-btn {
  min-height: 42px;
}

.agv3-photo-head h3 {
  min-width: 0;
}

.agv3-photo-analyzer-badge {
  display: block;
  min-width: 0;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(41, 74, 43, 0.12);
  background: rgba(224, 236, 220, 0.78);
  color: #294a2b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agv3-photo-analyzer-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(41, 74, 43, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 247, 239, 0.96)),
    radial-gradient(circle at top right, rgba(84, 138, 95, 0.1), transparent 40%);
  box-shadow: 0 14px 28px rgba(21, 42, 27, 0.06);
}

.agv3-photo-analyzer-panel[hidden] {
  display: none !important;
}

.agv3-photo-analyzer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.agv3-photo-set-summary {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  color: #193124;
}

.agv3-photo-summary-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.agv3-photo-set-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.agv3-photo-set-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(41, 74, 43, 0.14);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.agv3-photo-set-btn.is-active,
.agv3-photo-set-btn[aria-expanded='true'] {
  border-color: rgba(60, 108, 71, 0.38);
  background: rgba(224, 236, 220, 0.92);
  color: #173325;
}

#agPhotoRangeToggleBtn,
#agPhotoSearchToggleBtn {
  display: none;
}

.agv3-photo-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 1.4fr) auto;
  align-items: center;
  gap: 14px;
}

.agv3-photo-drawer {
  display: block;
}

.agv3-photo-range-copy {
  display: grid;
  gap: 4px;
}

.agv3-photo-range-copy strong {
  color: #193124;
  font-size: 13px;
  line-height: 1.1;
}

.agv3-filter-row--photo-search {
  align-items: center;
}

.agv3-filter-row--photo-search .slim-field {
  flex: 1 1 260px;
}

.agv3-photo-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(41, 74, 43, 0.09);
  background: linear-gradient(180deg, #fefefe, #f4f8f1);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(24, 43, 31, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.agv3-photo-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(24, 43, 31, 0.1);
}

.agv3-photo-card.is-anchor {
  border-color: rgba(41, 84, 54, 0.5);
  box-shadow: 0 0 0 2px rgba(41, 84, 54, 0.14), 0 14px 30px rgba(24, 43, 31, 0.12);
}

.agv3-photo-card.is-selected {
  border-color: var(--agv3-selection-accent, #ff2db2);
  background:
    linear-gradient(180deg, var(--agv3-selection-wash, rgba(255, 45, 178, 0.18)), rgba(255, 255, 255, 0.96)),
    linear-gradient(180deg, #fefefe, #f4f8f1);
  box-shadow: 0 0 0 3px var(--agv3-selection-ring, rgba(255, 45, 178, 0.46)), 0 14px 30px rgba(24, 43, 31, 0.12);
}

.agv3-photo-card.is-favorite {
  background: linear-gradient(180deg, #fffdf7, #f7f7ef);
}

.agv3-photo-thumb-btn,
.agv3-photo-info-btn {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: left;
}

.agv3-photo-thumb-btn {
  display: block;
  cursor: zoom-in;
}

.agv3-photo-thumb-btn img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: rgba(34, 55, 40, 0.08);
}

.agv3-photo-info-btn {
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.agv3-photo-caption {
  margin-top: 2px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  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-photo-favorite {
  margin-left: auto;
  color: #b68a12;
  font-size: 13px;
}

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

.agv3-map-tools {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.agv3-map-quick-actions {
  position: absolute;
  left: 8px;
  bottom: var(--agv3-map-control-bottom, 8px);
  z-index: 700;
  display: none;
  align-items: center;
  gap: 8px;
}

.agv3-map-control-btn {
  position: relative;
  min-width: 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.agv3-map-control-btn.agv3-ui-icon-btn--map-control {
  gap: 0;
}

.agv3-map-control-btn .agv3-ui-icon-label {
  display: none;
}

.agv3-map-control-btn .agv3-ui-icon svg {
  width: 20px;
  height: 20px;
}

.agv3-map-control-btn.is-filtered {
  border-color: rgba(35, 74, 45, 0.16);
  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-map-create-btn {
  border-color: rgba(122, 188, 95, 0.26);
  background: linear-gradient(180deg, rgba(229, 242, 220, 0.92), rgba(211, 232, 196, 0.90));
  color: #183d25;
}

.agv3-map-control-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2d5a2d;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(24, 43, 31, 0.18);
}

.agv3-map-pane #drawBanner {
  max-width: min(560px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(41, 74, 43, 0.16);
  border-radius: 18px;
  background: rgba(252, 253, 250, 0.96);
  color: #1f2d20;
  box-shadow: 0 14px 34px rgba(18, 32, 22, 0.16);
  backdrop-filter: blur(14px);
}

.agv3-map-pane #drawBanner #drawBannerText {
  display: -webkit-box;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-width: 0;
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
  line-height: 1.3;
  color: #35563d;
}

.agv3-map-pane #drawBanner button {
  border: 1px solid rgba(41, 74, 43, 0.14);
  background: rgba(45, 90, 45, 0.08);
  color: #234127;
  box-shadow: none;
}

.agv3-map-pane #drawBanner .draw-done-btn {
  border-color: #2d5a2d;
  background: #2d5a2d;
  color: #fff;
}

@media (max-width: 1100px) {
  #agv3App.agv3-paddock-drawing .agv3-map-pane #drawBanner {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
  }
}

@media (max-width: 640px) {
  .agv3-map-pane #drawBanner {
    max-width: calc(100% - 16px);
    gap: 6px;
    padding: 9px 10px;
  }

  .agv3-map-pane #drawBanner #drawBannerText {
    font-size: 11px;
  }

  .agv3-map-pane #drawBanner button {
    padding: 5px 8px;
  }
}

.agv3-map-create-launcher {
  position: absolute;
  left: 50%;
  bottom: calc(var(--agv3-map-control-bottom, var(--agv3-bottom-stack-h)) + 8px);
  transform: translateX(-50%);
  z-index: var(--agv3-z-map-dialog);
  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;
}

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

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

#agv3App:not(.is-map-hidden):not(.agv3-sheet-visible):not(.agv3-draw-chrome-hidden) .agv3-map-quick-actions {
  display: inline-flex;
}

#drawUndoBtn[disabled],
#drawDeleteBtn[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 #ff7f24;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

.agv3-draw-vertex.is-selected {
  background: #fff6ea;
  border-color: #d76a00;
  box-shadow: 0 0 0 4px rgba(45, 90, 45, 0.18), 0 3px 12px rgba(0, 0, 0, 0.28);
}

.agv3-draw-vertex.is-latest {
  background: #fff1e6;
  border-color: #ff6a13;
}

.agv3-journal-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agv3-journal-card.is-selected {
  border-color: var(--agv3-selection-accent, #ff2db2);
  background:
    linear-gradient(180deg, var(--agv3-selection-wash, rgba(255, 45, 178, 0.18)), rgba(255, 255, 255, 0.96)),
    linear-gradient(180deg, #fefefe, #f4f8f1);
  box-shadow: 0 0 0 3px var(--agv3-selection-ring, rgba(255, 45, 178, 0.46));
}

.agv3-journal-card__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.agv3-journal-card__preview {
  color: #5f6f61;
  font-size: 13px;
  line-height: 1.35;
}

.agv3-journal-card__actions {
  display: flex;
  justify-content: flex-end;
}

.agv3-journal-panel {
  overflow: hidden;
}

#agv3App .agv3-journal-panel > .agv3-card-head {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

#agv3App .agv3-journal-panel > .agv3-card-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 0;
  white-space: nowrap;
}

#agv3App .agv3-journal-add-btn {
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.agv3-journal-filter-summary-host {
  flex: 1 1 auto;
  min-width: 0;
}

.agv3-journal-filter-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.agv3-journal-filter-summary::-webkit-scrollbar {
  display: none;
}

.agv3-journal-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 24px;
  padding: 0 4px 0 9px;
  border: 1px solid rgba(45, 90, 45, 0.18);
  border-radius: 999px;
  background: #f4f9ef;
  color: #244525;
  font-size: 12px;
  white-space: nowrap;
}

.agv3-journal-filter-chip strong {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agv3-journal-filter-chip > button,
.agv3-journal-filter-chip--button {
  border: 0;
  background: transparent;
  color: #244525;
  cursor: pointer;
}

.agv3-journal-filter-chip > button {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.agv3-journal-filter-chip > button:hover,
.agv3-journal-filter-chip--button:hover {
  background: rgba(45, 90, 45, 0.08);
}

.agv3-journal-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-x: hidden;
}

.agv3-journal-day {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 5px 2px 2px;
  background: #fff;
  color: #5f6f61;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.agv3-journal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 55px;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(45, 90, 45, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f9fcf6);
}

.agv3-journal-row.is-selected {
  border-color: var(--agv3-selection-accent, #ff2db2);
  box-shadow: 0 0 0 2px var(--agv3-selection-ring, rgba(255, 45, 178, 0.34));
}

.agv3-journal-row-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.agv3-journal-type-icon,
.agv3-journal-thumb,
.agv3-journal-thumb-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.agv3-journal-thumb {
  display: block;
  border: 1px solid rgba(45, 90, 45, 0.14);
  background: #eef4eb;
  overflow: hidden;
}

.agv3-journal-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agv3-journal-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(45, 90, 45, 0.12);
  background: rgba(45, 90, 45, 0.06);
  font-size: 18px;
}

#agv3App .agv3-journal-thumb-btn {
  width: 42px;
  height: 42px;
}

.agv3-journal-row-copy,
.agv3-journal-row-top {
  min-width: 0;
}

.agv3-journal-row-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.agv3-journal-row-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.agv3-journal-row-top strong {
  min-width: 0;
  overflow: hidden;
  color: #102b16;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-journal-row-meta,
.agv3-journal-row-preview {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #5f6f61;
  font-size: 11.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-journal-row.is-expanded .agv3-journal-row-preview {
  display: -webkit-box;
  max-height: 46px;
  white-space: normal;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.agv3-journal-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  width: 55px;
  justify-content: end;
}

.agv3-journal-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(45, 90, 45, 0.16);
  border-radius: 7px;
  background: #fff;
  color: #244525;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.agv3-journal-icon-btn:hover {
  background: #edf6e8;
}

.agv3-journal-icon-btn:disabled {
  opacity: 0.36;
  cursor: default;
}

.agv3-journal-icon-btn .agv3-ui-icon {
  width: 14px;
  height: 14px;
}

.agv3-journal-detail {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 8px 2px 2px 50px;
}

.agv3-journal-detail-meta,
.agv3-journal-detail-note,
.agv3-journal-detail-samples {
  color: #5f6f61;
  font-size: 12px;
  line-height: 1.35;
}

.agv3-journal-detail-note.is-error {
  color: #a33a2d;
}

.agv3-journal-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.agv3-journal-detail-grid div {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(45, 90, 45, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.agv3-journal-detail-grid dt {
  color: #6b7a6c;
  font-size: 10.5px;
  font-weight: 800;
}

.agv3-journal-detail-grid dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: #1f321f;
  font-size: 12px;
  line-height: 1.3;
}

.agv3-journal-detail-samples {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.agv3-journal-detail-samples span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-journal-detail-media {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.agv3-journal-detail-media-btn {
  width: 58px;
  height: 46px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(45, 90, 45, 0.14);
  background: #fff;
  cursor: zoom-in;
}

.agv3-journal-detail-media-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agv3-journal-empty {
  margin-top: 8px;
}

@media (max-width: 620px) {
  #agv3App .agv3-journal-panel > .agv3-card-head {
    gap: 6px;
  }

  #agv3App .agv3-journal-panel > .agv3-card-head h3 {
    flex: 0 0 auto;
  }

  .agv3-journal-filter-summary-host {
    flex: 1 1 140px;
  }

  .agv3-journal-detail {
    padding-left: 0;
  }

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

#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-inline-config-btn--icon {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.agv3-inline-config-btn--gps {
  min-width: 42px;
  padding: 8px 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.agv3-inline-config-row--pick {
  gap: 6px;
}

.agv3-inline-config-row--pick .slim-select {
  flex: 1 1 auto;
  min-width: 0;
}

.agv3-inline-config-row--number .slim-field {
  flex: 1 1 auto;
  min-width: 0;
}

.agv3-inline-pick-btn {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

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

.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-paddock-bulk-row {
  align-items: flex-start;
  border: 1px solid rgba(45, 90, 45, 0.14);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(247, 250, 244, 0.82);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.agv3-paddock-bulk-row.is-highlighted {
  border-color: rgba(232, 137, 43, 0.9);
  background: rgba(255, 246, 230, 0.96);
  box-shadow: 0 0 0 4px rgba(232, 137, 43, 0.18);
}

.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);
}

#agv3App .agv3-observation-target-tools {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -2px;
}

#agv3App .agv3-observation-target-tools .btn-ghost {
  min-height: 34px;
  padding: 7px 10px;
}

#agv3App #agObsDiaryBtn.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.has-quick-asset-fields {
  display: block;
}

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

.agv3-advanced-wrap.has-quick-asset-fields:not(.is-open) > :not(.agv3-quick-visible) {
  display: none !important;
}

.agv3-advanced-wrap.has-quick-asset-fields:not(.is-open) #agAssetFields > :not(.agv3-quick-visible) {
  display: none !important;
}

.agv3-colour-field {
  display: grid;
  gap: 8px;
}

.agv3-colour-field-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agv3-colour-field-main input[type="color"] {
  width: 44px;
  min-width: 44px;
  height: 36px;
  padding: 2px;
}

.agv3-colour-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agv3-colour-swatch {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid rgba(24, 45, 31, 0.16);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.agv3-colour-swatch.is-selected {
  border-color: #17351f;
  box-shadow: 0 0 0 2px rgba(23, 53, 31, 0.16);
}

.agv3-native-type-select {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.agv3-type-picker {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.agv3-type-picker-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--agv3-border, #d8e0d5);
  border-radius: 8px;
  background: #fff;
  color: var(--agv3-ink, #1f2f24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.agv3-type-picker-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.agv3-type-picker-current {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.agv3-type-picker-icon,
.agv3-type-picker-row-icon {
  flex: 0 0 auto;
  width: 22px;
  text-align: center;
}

.agv3-type-picker-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-type-picker-caret {
  color: #667468;
  flex: 0 0 auto;
}

.agv3-type-picker-panel {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9990;
  width: min(420px, calc(100vw - 24px));
  min-width: min(320px, calc(100vw - 24px));
  max-height: min(460px, 68vh);
  border: 1px solid var(--agv3-border, #d8e0d5);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(20, 35, 24, 0.18);
  overflow: hidden;
}

.agv3-type-picker-search {
  box-sizing: border-box;
  width: calc(100% - 16px);
  margin: 8px;
  min-height: 38px;
  border: 1px solid var(--agv3-border, #d8e0d5);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.agv3-type-picker-list {
  max-height: calc(min(460px, 68vh) - 56px);
  overflow: auto;
  padding: 0 8px 8px;
}

.agv3-type-picker-group {
  padding-block: 4px;
}

.agv3-type-picker-group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: #657265;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  padding: 8px 4px 5px;
}

.agv3-type-picker-recent,
.agv3-type-picker-group-rows {
  display: grid;
  gap: 5px;
}

.agv3-type-picker-row {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--agv3-ink, #1f2f24);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 7px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.agv3-type-picker-row:hover,
.agv3-type-picker-row:focus-visible {
  background: #eef4ec;
  outline: none;
}

.agv3-type-picker-row.is-selected {
  background: #e0eddd;
}

.agv3-type-picker-row-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agv3-type-picker-row-meta {
  display: block;
  line-height: 1.2;
  color: #6f7d71;
  font-size: 11px;
}

.agv3-type-picker-row-label {
  display: block;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.agv3-type-picker-empty {
  color: #6f7d71;
  padding: 14px 8px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .agv3-type-picker-panel {
    position: fixed;
    inset-inline: 10px;
    top: auto;
    bottom: 10px;
    width: auto;
    min-width: 0;
    max-height: min(74vh, 560px);
  }

  .agv3-type-picker-list {
    max-height: calc(min(74vh, 560px) - 56px);
  }
}

.agv3-picker-only-field {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.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: 16px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(14, 22, 16, 0.96), rgba(11, 18, 13, 0.985)),
    radial-gradient(circle at top right, rgba(86, 154, 96, 0.18), transparent 28%);
  color: #fff;
  border-radius: 26px;
  padding: 18px;
  border: 1px solid rgba(204, 225, 209, 0.12);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.photo-lightbox__toolbar,
.photo-lightbox__actions,
.photo-lightbox__controlbar,
.agv3-lightbox-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.photo-lightbox__toolbar {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.photo-lightbox__toolbar-head,
.photo-lightbox__toolbar-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.photo-lightbox__toolbar-head {
  width: 100%;
  justify-content: space-between;
}

.photo-lightbox__head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.photo-lightbox__toolbar-body {
  width: 100%;
  flex-direction: column;
}

.photo-lightbox__toolbar-body[hidden] {
  display: none !important;
}

.photo-lightbox__title-block {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.agv3-lightbox-tools-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  padding-block: 0;
  padding-inline: 13px;
  border-radius: 999px;
  border: 1px solid rgba(222, 240, 225, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.photo-lightbox__close-btn {
  flex: 0 0 auto;
}

.photo-lightbox__set-summary {
  color: rgba(223, 236, 226, 0.88);
  font-size: 13px;
  line-height: 1.25;
}

.photo-lightbox__meta {
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}

.photo-lightbox__actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.agv3-lightbox-icon-btn {
  flex: 0 0 auto;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(222, 240, 225, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 17px;
  line-height: 1;
}

.agv3-lightbox-mode-btn,
.agv3-lightbox-set-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(222, 240, 225, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.agv3-lightbox-mode-btn.is-active,
.agv3-lightbox-set-btn[aria-expanded='true'] {
  background: rgba(108, 171, 118, 0.24);
  border-color: rgba(137, 201, 146, 0.55);
}

.photo-lightbox__controlbar {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.agv3-check-row--lightbox {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(242, 247, 243, 0.92);
}

.photo-lightbox__range-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 320px;
  min-width: min(100%, 320px);
}

.photo-lightbox__range-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(223, 236, 226, 0.78);
}

.photo-lightbox__range-wrap input[type='range'] {
  flex: 1 1 auto;
}

.photo-lightbox__stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(9, 14, 10, 0.88), rgba(12, 18, 13, 0.96)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0 18px, rgba(255, 255, 255, 0.025) 18px 36px);
  touch-action: pan-x pan-y;
  cursor: default;
}

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

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

.photo-lightbox__img {
  position: relative;
  z-index: 1;
  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;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border-radius: 10px;
}

.photo-lightbox__img--fade {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: auto;
  opacity: 0;
  pointer-events: none;
}

.photo-lightbox__img--fade.is-visible {
  opacity: 1;
}

.photo-lightbox__stage[data-fit-mode='width'] .photo-lightbox__img,
.photo-lightbox__stage[data-fit-mode='width'] .photo-lightbox__img--fade {
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
}

.photo-lightbox__stage[data-fit-mode='width'] {
  place-items: start center;
  overflow-x: hidden;
  overflow-y: auto;
}

.photo-lightbox__stage[data-fit-mode='actual'] {
  place-items: start center;
  overflow: auto;
}

.photo-lightbox__stage[data-fit-mode='actual'] .photo-lightbox__img,
.photo-lightbox__stage[data-fit-mode='actual'] .photo-lightbox__img--fade {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
}

.photo-lightbox__stage.is-transform-zoom {
  overflow: hidden;
  touch-action: none;
}

.agv3-lightbox-caption {
  flex: 0 0 auto;
  min-height: 3.8em;
  max-height: 3.8em;
  overflow: auto;
  scrollbar-gutter: stable;
  padding: 2px 0 0;
  color: rgba(255,255,255,0.92);
  font-size: 15px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

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

.agv3-lightbox-slider-row {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1.25rem;
  align-items: start;
  gap: 6px;
  width: 100%;
}

.agv3-lightbox-slider-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 8px 0 2px;
}

.agv3-lightbox-slider-row input[type='range'] {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.agv3-lightbox-slider-marks {
  position: absolute;
  inset: 50% 0 auto;
  height: 16px;
  transform: translateY(-50%);
  pointer-events: none;
}

.agv3-lightbox-slider-mark {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transform: translate(-50%, -50%);
}

.agv3-lightbox-slider-mark.is-preview {
  background: rgba(170, 223, 180, 0.62);
}

.agv3-lightbox-slider-mark.is-current {
  height: 14px;
  background: rgba(255, 255, 255, 0.96);
}

.agv3-lightbox-slider-row .agv3-inline-help {
  min-width: 0;
  min-height: 1.25rem;
  max-height: 1.25rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.25rem;
}

@media (max-width: 960px) {
  .agv3-photo-head {
    flex-direction: column;
    align-items: stretch;
  }

  .agv3-photo-head-actions {
    justify-content: flex-start;
  }

  .agv3-photo-analyzer-head,
  .photo-lightbox__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .photo-lightbox__toolbar-head {
    align-items: flex-start;
  }

  .agv3-photo-set-actions,
  .photo-lightbox__actions {
    justify-content: flex-start;
  }

  .agv3-photo-range-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #agSection-photos.is-active {
    overflow: auto;
    padding-bottom: calc(var(--agv3-bottom-stack-h) + 8px);
  }

  .photo-lightbox__toolbar-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
  }

  .photo-lightbox__title-block {
    min-width: 0;
    gap: 4px;
  }

  .photo-lightbox__meta {
    font-size: 15px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .photo-lightbox__set-summary {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #agSection-photos > .agv3-card {
    overflow: visible;
    height: auto;
    padding: 12px;
    gap: 12px;
  }

  #agSection-photos #agPhotoGrid {
    overflow: visible;
    flex: 0 0 auto;
    padding-bottom: calc(var(--agv3-bottom-stack-h) + 8px);
  }

  .agv3-photo-analyzer-panel {
    position: sticky;
    top: 0;
    z-index: 3;
    gap: 10px;
    margin: -2px -2px 6px;
    padding: 12px;
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(250, 252, 248, 0.985), rgba(244, 248, 241, 0.985)),
      radial-gradient(circle at top right, rgba(84, 138, 95, 0.08), transparent 42%);
    box-shadow: 0 10px 24px rgba(18, 32, 22, 0.08);
    backdrop-filter: blur(12px);
  }

  .agv3-photo-analyzer-head {
    gap: 10px;
  }

  .agv3-photo-set-summary {
    font-size: 14px;
    line-height: 1.15;
  }

  .agv3-photo-summary-meta {
    gap: 6px;
    margin-top: 3px;
  }

  #agPhotoSetMeta {
    display: none;
  }

  .agv3-photo-set-actions {
    justify-content: flex-start;
    gap: 6px;
  }

  .agv3-photo-set-btn {
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }

  #agPhotoRangeToggleBtn,
  #agPhotoSearchToggleBtn {
    display: inline-flex;
  }

  .agv3-photo-drawer {
    display: none;
  }

  .agv3-photo-drawer.is-open {
    display: block;
  }

  .agv3-photo-range-row {
    gap: 10px;
  }

  #agPhotoRangeMeta {
    display: none;
  }

  .agv3-filter-row--photo-search {
    gap: 8px;
  }

  .agv3-filter-row--photo-search .slim-field {
    min-width: 0;
  }

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

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

  .agv3-photo-info-btn {
    min-height: 46px;
  }

  .agv3-lightbox-tools-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .photo-lightbox__toolbar {
    gap: 10px;
  }

  .photo-lightbox__toolbar-body {
    display: none;
    gap: 10px;
  }

  .photo-lightbox.is-controls-open .photo-lightbox__toolbar-body {
    display: flex;
  }

  .photo-lightbox__controlbar {
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .photo-lightbox__meta {
    font-size: 14px;
    -webkit-line-clamp: 1;
  }

  .photo-lightbox__set-summary {
    display: none;
  }
}

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

  .photo-lightbox__dialog {
    inset: 8px;
    padding: 14px;
    border-radius: 22px;
  }

  .photo-lightbox__meta {
    font-size: 16px;
  }

  .photo-lightbox__actions {
    gap: 6px;
  }

  .photo-lightbox__toolbar-head,
  .photo-lightbox__toolbar-body {
    gap: 10px;
  }

  .agv3-lightbox-icon-btn,
  .agv3-lightbox-mode-btn,
  .agv3-lightbox-set-btn {
    min-height: 38px;
    min-width: 38px;
  }

  .photo-lightbox__stage {
    padding: 0;
    border-radius: 18px;
  }

  .agv3-lightbox-caption {
    font-size: 14px;
    min-height: 3.8em;
    max-height: 3.8em;
  }

  .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,
  .agv3-journal-list {
    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: var(--agv3-z-topmenu);
}

.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: var(--agv3-z-topmenu-popover);
}

.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-date-source-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  margin: 6px 0 8px;
  padding: 5px 10px;
  border: 1px solid rgba(45, 90, 45, 0.16);
  border-radius: 999px;
  background: rgba(45, 90, 45, 0.08);
  color: #1d4b27;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.agv3-date-source-chip.is-warn {
  border-color: rgba(165, 40, 40, 0.28);
  background: rgba(214, 69, 69, 0.10);
  color: #a52828;
}

.agv3-date-source-chip.is-soft {
  border-color: rgba(132, 104, 38, 0.24);
  background: rgba(231, 184, 72, 0.13);
  color: #6f561e;
}

.agv3-date-source-chip.is-photo {
  border-color: rgba(45, 90, 45, 0.22);
  background: rgba(45, 90, 45, 0.10);
}

.agv3-location-source-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  margin: 0 6px 6px 0;
  padding: 5px 10px;
  border: 1px solid rgba(33, 111, 126, 0.24);
  border-radius: 999px;
  background: rgba(33, 111, 126, 0.10);
  color: #155967;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.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: var(--agv3-selection-wash, rgba(255, 45, 178, 0.18));
  border-color: var(--agv3-selection-accent, #ff2db2);
  box-shadow: 0 0 0 3px var(--agv3-selection-ring, rgba(255, 45, 178, 0.46));
}

.agv3-grazing-cell-picks {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.agv3-grazing-cell-pick {
  align-items: flex-start;
  background: var(--agv3-panel, #fff);
  border: 1px solid rgba(41, 74, 43, 0.14);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 9px 10px;
  text-align: left;
}

.agv3-grazing-cell-pick.is-selected {
  border-color: var(--agv3-selection-accent, #ff2db2);
  box-shadow: inset 0 0 0 1px var(--agv3-selection-accent, #ff2db2);
}

.agv3-grazing-cell-pick span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.agv3-grazing-cell-pick small {
  color: var(--agv3-muted, #64748b);
  font-size: 11px;
  line-height: 1.25;
}

.agv3-grazing-cell-warnings {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.agv3-grazing-cell-warnings div {
  border-left: 3px solid #b45309;
  border-radius: 6px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  padding: 6px 8px;
}

.agv3-grazing-cell-active {
  display: grid;
  gap: 8px;
}

.agv3-grazing-cell-active-title {
  color: var(--agv3-muted, #64748b);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.agv3-grazing-cell-active-row {
  align-items: center;
  border: 1px solid rgba(41, 74, 43, 0.14);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 9px;
}

.agv3-grazing-cell-active-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.agv3-grazing-cell-active-row strong,
.agv3-grazing-cell-active-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-grazing-cell-active-row span {
  color: var(--agv3-muted, #64748b);
  font-size: 12px;
}

.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 {
  position: relative;
  display: grid;
  place-items: center;
  min-width: var(--agv3-marker-icon-size, 38px);
  min-height: var(--agv3-marker-icon-size, 38px);
  margin: -5px 0 0 -5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 4px solid var(--agv3-selection-accent, #ff2db2);
  outline: 3px solid var(--agv3-selection-contrast, #ffffff);
  box-shadow:
    inset 0 0 0 2px var(--agv3-selection-accent-dark, #a8006f),
    0 0 0 2px rgba(0, 0, 0, 0.72),
    0 4px 12px rgba(0, 0, 0, 0.32);
  filter: none;
  z-index: 2;
}

.agv3-map-pane .agv3-marker-glyph {
  width: var(--agv3-marker-icon-size, 38px);
  height: var(--agv3-marker-icon-size, 38px);
  display: grid;
  place-items: center;
  font-size: calc(var(--agv3-marker-icon-size, 38px) * 0.58);
  line-height: 1;
}

.agv3-map-pane .agv3-mob-marker {
  background: transparent;
  border: 0;
}

.agv3-map-pane .agv3-mob-marker > .agv3-mob-marker-shell,
.agv3-map-pane .agv3-mob-marker.is-selected > .agv3-mob-marker-shell,
.agv3-map-pane .agv3-mob-marker.is-focused > .agv3-mob-marker-shell {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(16px, auto);
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 46px;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 2px 6px 2px 4px;
  border: 2px solid #244a2b;
  border-radius: 999px;
  outline: 3px solid #ffffff;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 8px rgba(15, 28, 18, 0.26);
  filter: none;
}

.agv3-map-pane .agv3-mob-marker.is-selected > .agv3-mob-marker-shell,
.agv3-map-pane .agv3-mob-marker.is-focused > .agv3-mob-marker-shell {
  border-color: var(--agv3-selection-accent, #ff2db2);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.72),
    0 4px 12px rgba(0, 0, 0, 0.34);
}

.agv3-map-pane .agv3-mob-marker.is-withholding > .agv3-mob-marker-shell {
  box-shadow:
    0 0 0 2px #dc2626,
    0 2px 8px rgba(15, 28, 18, 0.26);
}

.agv3-map-pane .agv3-mob-marker.is-withholding.is-selected > .agv3-mob-marker-shell,
.agv3-map-pane .agv3-mob-marker.is-withholding.is-focused > .agv3-mob-marker-shell {
  box-shadow:
    0 0 0 2px #dc2626,
    0 0 0 4px rgba(0, 0, 0, 0.72),
    0 4px 12px rgba(0, 0, 0, 0.34);
}

.agv3-map-pane .agv3-mob-marker-withholding {
  position: absolute;
  top: -7px;
  right: -5px;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.28);
}

.agv3-map-pane .agv3-mob-marker-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 24px;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 18px;
  line-height: 1;
}

.agv3-map-pane .agv3-mob-marker-count {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  min-width: 16px;
  color: #18341e;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  transform: translateY(2px);
}

.agv3-map-pane .agv3-mob-marker-count small {
  margin-left: 0;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.agv3-map-pane .agv3-marker--photo .photo-marker {
  width: var(--agv3-marker-icon-size, 38px);
  height: var(--agv3-marker-icon-size, 38px);
}

.agv3-map-pane .agv3-marker--photo.is-selected .photo-marker,
.agv3-map-pane .agv3-marker--photo.is-focused .photo-marker {
  border-radius: 10px;
}

.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: var(--agv3-z-map-dialog);
  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-menu-trigger {
  width: var(--agv3-control-height, 40px);
  min-width: var(--agv3-control-height, 40px);
  height: var(--agv3-control-height, 40px);
  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);
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.05em;
}

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

.agv3-map-summary-icon {
  width: var(--agv3-control-height, 40px);
  min-width: var(--agv3-control-height, 40px);
  height: var(--agv3-control-height, 40px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  font-size: 20px;
  line-height: 1;
}

.agv3-map-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.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-compact-detail {
  display: none;
}

.agv3-map-summary.is-collapsed {
  box-sizing: border-box;
  width: 132px;
  max-width: 132px;
  max-height: none;
  overflow: hidden;
  padding: 9px 10px 8px;
}

.agv3-map-summary.is-collapsed .agv3-map-summary-head {
  align-items: center;
  gap: 6px;
}

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

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

.agv3-map-summary.is-collapsed .agv3-map-summary-compact-detail {
  display: block;
  width: 100%;
  margin-top: 5px;
  color: #263f29;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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-map-summary-note {
  margin-top: 8px;
  padding: 7px 8px;
  border-left: 3px solid rgba(45, 90, 45, 0.32);
  background: rgba(247, 250, 244, 0.82);
  color: #334833;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.agv3-map-summary-note--action {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  white-space: normal;
}

.agv3-map-summary-inline-btn {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 11px;
}

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

.agv3-context-menu-root {
  position: fixed;
  z-index: 1415;
}

.agv3-context-menu-stack {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.agv3-context-menu-panel {
  min-width: 250px;
  max-width: min(320px, calc(100vw - 24px));
  max-height: min(62vh, 420px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.985);
  border: 1px solid rgba(41, 74, 43, 0.12);
  box-shadow: 0 18px 34px rgba(16, 24, 16, 0.18);
  backdrop-filter: blur(16px);
}

.agv3-context-menu-item {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 12px;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #1f2d20;
  text-align: left;
}

.agv3-context-menu-item + .agv3-context-menu-item {
  margin-top: 2px;
}

.agv3-context-menu-item:hover,
.agv3-context-menu-item:focus-visible,
.agv3-context-menu-item.is-expanded {
  background: rgba(45, 90, 45, 0.08);
  outline: none;
}

.agv3-context-menu-item.is-disabled {
  opacity: 0.48;
}

.agv3-context-menu-item.is-danger {
  color: #8c2e2a;
}

.agv3-context-menu-item-icon,
.agv3-context-menu-item-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
}

.agv3-context-menu-item-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.agv3-context-menu-item-copy strong {
  font-size: 13px;
  line-height: 1.15;
}

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

.agv3-context-menu-item-chevron {
  opacity: 0.66;
  font-size: 11px;
}

@media (max-width: 700px) {
  .agv3-context-menu-stack {
    flex-direction: column;
  }

  .agv3-context-menu-panel {
    min-width: min(250px, calc(100vw - 24px));
    max-height: min(40vh, 320px);
  }
}

.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,
#agJournalList,
#agSection-create,
#agSection-import {
  min-height: 0;
}

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

.agv3-journal-list,
.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(214, 58, 58, 0.96);
  outline-offset: 4px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(214, 58, 58, 0.24);
  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(214, 58, 58, 0.28);
}

@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-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-draw-chrome-hidden .agv3-toolbar {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
}

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

#agv3App.agv3-draw-chrome-hidden .agv3-sidebar,
#agv3App.agv3-draw-chrome-hidden .agv3-splitter {
  display: none;
}

@media (max-width: 720px) {
}

#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(env(safe-area-inset-bottom, 0px) + 12px);
}

#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;
    cursor: ns-resize;
    touch-action: none;
    user-select: none;
  }

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

  #agv3App.agv3-sheet-visible .agv3-sheet-close {
    cursor: pointer;
    touch-action: manipulation;
    user-select: auto;
  }

  #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 .agv3-farm-btn-icon {
  color: currentColor;
}

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

.agv3-farm-btn .farm-btn-code {
  display: none;
  line-height: 1;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.agv3-shell-icon-btn {
  width: var(--agv3-icon-size, 40px);
  min-width: var(--agv3-icon-size, 40px);
  height: var(--agv3-icon-size, 40px);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.agv3-shell-icon-btn.is-syncing {
  position: relative;
}

.agv3-shell-icon-btn.is-syncing svg {
  animation: agv3-refresh-spin 1.1s linear infinite;
}

.agv3-shell-icon-btn.is-syncing::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: inherit;
  pointer-events: none;
  animation: agv3-refresh-ring 1.1s linear infinite;
}

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

@keyframes agv3-refresh-ring {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .agv3-shell-icon-btn.is-syncing svg,
  .agv3-shell-icon-btn.is-syncing::after {
    animation-duration: 2.4s;
  }
}

.agv3-top-panels {
  position: fixed;
  inset: var(--agv3-top-panels-top, 56px) 0 auto 0;
  height: 0;
  z-index: var(--agv3-z-topmenu);
  padding: 0;
  overflow: visible;
  pointer-events: none;
}

.agv3-top-panel {
  position: absolute;
  top: 0;
  right: 12px;
  z-index: 1;
  margin-top: 0;
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(41, 74, 43, 0.08);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 14px 32px rgba(16, 24, 16, 0.12);
  overflow: hidden;
  pointer-events: auto;
}

.agv3-top-panel--farm {
  width: min(360px, calc(100vw - 24px));
  right: var(--agv3-top-panels-farm-right, 12px);
  padding: 8px 10px 12px;
  max-height: calc(100vh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 16px);
  max-height: calc(100dvh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.agv3-top-panel--farm .agv3-webix-host--shell,
.agv3-top-panel--farm .agv3-shell-fallback {
  max-height: none;
}

.agv3-top-panel--farm .agv3-webix-host--shell.agv3-hidden {
  display: none;
}

.agv3-top-panel--farm .agv3-shell-fallback {
  display: block;
  overflow: visible;
}

.agv3-top-panel--settings {
  width: min(560px, calc(100vw - 24px));
  right: var(--agv3-top-panels-settings-right, 12px);
  max-height: calc(100vh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 16px);
  max-height: calc(100dvh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 16px);
  overflow: hidden;
}

.agv3-top-panel--settings .agv3-shell-settings-card {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border-radius: 0 0 22px 22px;
}

.agv3-settings-tree {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.agv3-settings-group {
  border: 1px solid rgba(45, 90, 45, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.agv3-settings-group[open] {
  border-color: rgba(45, 90, 45, 0.24);
  box-shadow: 0 6px 18px rgba(31, 58, 32, 0.08);
}

.agv3-settings-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  color: #243d28;
}

.agv3-settings-group summary::-webkit-details-marker {
  display: none;
}

.agv3-settings-group summary::after {
  content: "▾";
  font-size: 13px;
  color: rgba(36, 61, 40, 0.72);
  transition: transform 0.16s ease;
}

.agv3-settings-group:not([open]) summary::after {
  transform: rotate(-90deg);
}

.agv3-settings-group summary span {
  font-weight: 800;
  font-size: 14px;
}

.agv3-settings-group summary small {
  grid-column: 1 / 2;
  color: rgba(36, 61, 40, 0.68);
  font-size: 12px;
  line-height: 1.35;
}

.agv3-settings-group-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.agv3-settings-actions {
  margin: 12px -12px -12px;
  padding: 12px;
  border-top: 1px solid rgba(45, 90, 45, 0.14);
  background: rgba(248, 250, 244, 0.96);
}

.agv3-settings-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.agv3-settings-actions-row > .btn-primary {
  flex: 1 1 auto;
  min-width: 0;
}

.agv3-settings-logout-btn {
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
  padding-inline: 10px;
  border-color: rgba(121, 38, 38, 0.18);
  background: rgba(121, 38, 38, 0.08);
  color: #6d2525;
}

.agv3-top-panel--notifications {
  width: min(560px, calc(100vw - 24px));
  right: var(--agv3-top-panels-notifications-right, 12px);
  max-height: calc(100vh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 16px);
  max-height: calc(100dvh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 16px);
  overflow: hidden;
}

.agv3-top-panel--notifications.is-thread-open {
  height: calc(100vh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 16px);
  height: calc(100dvh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 16px);
}

.agv3-top-panel--notifications .agv3-notifications-card {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0 0 22px 22px;
  box-shadow: none;
}

.agv3-top-panel--notifications.is-thread-open .agv3-notifications-card {
  height: inherit;
}

.agv3-top-panel--notifications.is-thread-open .agv3-notifications-head {
  display: none;
}

.agv3-notifications-btn {
  position: relative;
}

.agv3-notifications-btn.is-pulsing {
  box-shadow: 0 0 0 2px rgba(45, 90, 45, 0.16), 0 0 0 6px rgba(232, 137, 43, 0.12);
}

.agv3-notifications-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.agv3-notifications-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  padding: 6px 8px 5px;
  border-bottom: 1px solid rgba(41, 74, 43, 0.1);
  background: rgba(255, 255, 255, 0.98);
}

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

.agv3-notifications-head h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.1;
}

.agv3-notifications-head .agv3-notifications-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  min-width: 0;
}

.agv3-notifications-head-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: 0 0 auto;
  min-height: 28px;
  height: 28px;
  margin: 0;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(41, 74, 43, 0.12);
  background: rgba(248, 249, 244, 0.96);
  color: #47604a;
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.agv3-notifications-head-action {
  vertical-align: middle;
}

.agv3-notifications-head-btn:hover,
.agv3-notifications-head-btn:focus-visible {
  border-color: rgba(41, 74, 43, 0.2);
  background: rgba(244, 247, 239, 0.98);
  color: #294a2b;
}

.agv3-notifications-head-btn--primary {
  border-color: rgba(35, 82, 44, 0.2);
  background: #2d6934;
  color: #fff;
}

.agv3-notifications-head-btn--primary:hover,
.agv3-notifications-head-btn--primary:focus-visible {
  border-color: rgba(24, 68, 33, 0.24);
  background: #25592c;
  color: #fff;
}

.agv3-notifications-head-btn:disabled,
.agv3-notifications-head-btn[data-busy='1'] {
  opacity: 0.54;
  cursor: not-allowed;
}

.agv3-notification-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.agv3-notifications-text-btn,
.agv3-notification-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.agv3-notifications-new-head-btn {
  min-width: 0;
  white-space: nowrap;
}

.agv3-notifications-close {
  width: auto;
  border-color: rgba(139, 59, 51, 0.14);
  background: rgba(250, 244, 242, 0.98);
  color: #8b3b33;
}

.agv3-notifications-close:hover,
.agv3-notifications-close:focus-visible {
  border-color: rgba(139, 59, 51, 0.22);
  background: rgba(248, 238, 235, 1);
  color: #7a271a;
}

.agv3-notifications-head .agv3-btn-label-short {
  display: none;
}

.agv3-notifications-head .agv3-btn-label-full,
.agv3-notifications-head .agv3-btn-label-short {
  line-height: 1;
}

.agv3-notifications-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 78px);
  max-height: calc(100dvh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 78px);
  padding: 5px 7px 7px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.agv3-top-panel--notifications.is-thread-open .agv3-notifications-list {
  padding: 8px;
  max-height: none;
  overflow: hidden;
}

.agv3-notifications-composer-slot[hidden] {
  display: none;
}

.agv3-notifications-composer-slot {
  flex: 0 0 auto;
  min-width: 0;
}

.agv3-notifications-items {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.agv3-notifications-empty {
  padding: 12px 10px;
  color: #64748b;
  font-size: 13px;
}

.agv3-notifications-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.agv3-notifications-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(45, 90, 45, 0.18);
  border-top-color: #2d5a2d;
  border-radius: 999px;
  animation: agv3-notification-spin 0.8s linear infinite;
}

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

.agv3-notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, auto);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(41, 74, 43, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31, 45, 32, 0.04);
}

.agv3-notification-item.is-clickable {
  cursor: pointer;
}

.agv3-notification-item.is-clickable:hover,
.agv3-notification-item.is-clickable:focus-visible {
  border-color: rgba(45, 90, 45, 0.28);
  background: #f8fbf5;
  outline: none;
}

.agv3-notification-item.is-unread {
  border-color: rgba(45, 90, 45, 0.22);
  background: #f8fbf5;
}

.agv3-notification-item.is-support {
  grid-template-columns: minmax(0, 1fr) minmax(42px, auto);
  border-left: 3px solid rgba(45, 90, 45, 0.42);
}

.agv3-notification-item.is-support .agv3-notification-actions {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 5px;
}

.agv3-notification-item.is-support .agv3-notification-action {
  justify-content: center;
  width: 100%;
  white-space: nowrap;
}

.agv3-notification-item.is-read {
  opacity: 0.76;
}

.agv3-notification-copy {
  min-width: 0;
}

.agv3-notification-kind-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 4px;
}

.agv3-notification-kind,
.agv3-notification-count {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 18px;
  margin: 0 0 4px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(45, 90, 45, 0.14);
  background: rgba(45, 90, 45, 0.07);
  color: #49614d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.agv3-notification-kind--warning {
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(245, 158, 11, 0.12);
  color: #9a5b00;
}

.agv3-notification-kind--urgent {
  border-color: rgba(180, 35, 24, 0.2);
  background: rgba(180, 35, 24, 0.12);
  color: #a61b16;
}

.agv3-notification-count {
  margin: 0 0 0 5px;
  background: #fff;
  text-transform: none;
}

.agv3-notification-copy strong,
.agv3-notification-copy p,
.agv3-notification-copy span {
  display: block;
  overflow-wrap: anywhere;
}

.agv3-notification-copy .agv3-notification-kind,
.agv3-notification-copy .agv3-notification-count {
  display: inline-flex;
}

.agv3-notification-copy strong {
  color: #203822;
  font-size: 13px;
  line-height: 1.25;
}

.agv3-notification-copy .agv3-notification-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 6px 1px 0;
  border-radius: 999px;
  background: #2d5a2d;
}

.agv3-notification-copy p {
  margin: 3px 0 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
}

.agv3-notification-copy span {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
}

.agv3-notification-item--warning,
.agv3-notification-item--urgent {
  border-left: 3px solid #d97706;
}

.agv3-notification-item--warning {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.98) 24%);
}

.agv3-notification-item--urgent {
  border-left-color: #b42318;
  border-color: rgba(180, 35, 24, 0.2);
  background: linear-gradient(90deg, rgba(180, 35, 24, 0.12), rgba(255, 255, 255, 0.98) 24%);
  box-shadow: 0 2px 10px rgba(180, 35, 24, 0.08);
}

.agv3-notification-item--urgent .agv3-notification-copy strong {
  color: #7a271a;
}

.agv3-notification-item--urgent .agv3-notification-copy .agv3-notification-dot {
  background: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.agv3-notification-item--urgent.is-unread {
  border-color: rgba(180, 35, 24, 0.32);
}

.agv3-notification-detail-card {
  padding: 8px;
  border-radius: 8px;
  min-width: 0;
}

.agv3-notification-thread-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.agv3-notification-thread-head .agv3-card-head-copy {
  min-width: 0;
}

.agv3-notification-thread-head h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agv3-notification-thread-head .agv3-notifications-actions {
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.agv3-notification-thread-head .agv3-notifications-text-btn {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
}

.agv3-support-thread-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid rgba(41, 74, 43, 0.1);
  box-shadow: 0 2px 8px rgba(31, 45, 32, 0.04);
  min-height: 0;
  height: min(420px, calc(100vh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 116px));
  height: min(420px, calc(100dvh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 116px));
  max-height: min(420px, calc(100vh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 116px));
  max-height: min(420px, calc(100dvh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 116px));
  overflow: hidden;
}

.agv3-top-panel--notifications.is-thread-open .agv3-notification-detail-card {
  flex: 1 1 auto;
  min-height: 0;
}

.agv3-top-panel--notifications.is-thread-open .agv3-support-thread-card,
.agv3-top-panel--notifications.is-thread-open .agv3-notification-detail-card:not(.agv3-support-new-card) {
  height: 100%;
  max-height: none;
}

.agv3-support-new-card {
  grid-template-rows: auto auto auto auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
}

.agv3-notification-explainer {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.agv3-notification-detail-body {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.agv3-notification-message {
  padding: 8px 9px;
  border: 1px solid rgba(41, 74, 43, 0.1);
  border-radius: 8px;
  background: #fff;
}

.agv3-notification-message.is-user {
  border-color: rgba(45, 90, 45, 0.16);
}

.agv3-notification-message.is-system {
  background: #f8fbf5;
}

.agv3-notification-message-meta {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.agv3-notification-message-body {
  color: #203822;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.agv3-support-reply-box {
  display: grid;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(41, 74, 43, 0.08);
}

.agv3-support-reply-input {
  min-height: 82px;
  resize: vertical;
}

.agv3-notification-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.agv3-notification-attachment {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(45, 90, 45, 0.18);
  border-radius: 8px;
  background: #fff;
  color: #294a2b;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.agv3-notification-attachment--image {
  width: 58px;
  height: 58px;
  padding: 0;
  overflow: hidden;
}

.agv3-notification-attachment--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agv3-recipient-chooser-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(41, 74, 43, 0.1);
}

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

.agv3-recipient-choice {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 82px;
  padding: 10px;
  border: 1px solid rgba(41, 74, 43, 0.14);
  border-radius: 8px;
  background: #fff;
  color: #203822;
  text-align: left;
  cursor: pointer;
}

.agv3-recipient-choice:hover:not(:disabled),
.agv3-recipient-choice:focus-visible {
  border-color: rgba(45, 90, 45, 0.32);
  background: #f8fbf5;
  outline: none;
}

.agv3-recipient-choice:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.agv3-recipient-choice-icon,
.agv3-barry-mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2d6934;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.agv3-recipient-choice-icon {
  width: 34px;
  height: 34px;
}

.agv3-recipient-choice-icon--barry,
.agv3-barry-mini-icon {
  background: #245f57;
}

.agv3-barry-mini-icon {
  width: 18px;
  height: 18px;
  margin: -2px 5px -2px -3px;
  font-size: 9px;
}

.agv3-recipient-choice-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.agv3-recipient-choice-copy strong {
  font-size: 13px;
  line-height: 1.2;
}

.agv3-recipient-choice-copy span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.3;
}

.agv3-notification-kind--barry {
  background: rgba(36, 95, 87, 0.09);
  border-color: rgba(36, 95, 87, 0.18);
  color: #245f57;
}

.agv3-notification-item--barry {
  border-left: 3px solid rgba(36, 95, 87, 0.44);
}

.agv3-barry-thread-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(41, 74, 43, 0.1);
}

.agv3-barry-thread-head .agv3-card-head-copy {
  display: grid;
  gap: 3px;
}

.agv3-barry-progress {
  padding: 7px 9px;
  border: 1px solid rgba(36, 95, 87, 0.12);
  border-radius: 8px;
  background: rgba(36, 95, 87, 0.07);
  color: #245f57;
  font-size: 12px;
  font-weight: 800;
}

.agv3-barry-progress[hidden] {
  display: none;
}

.agv3-barry-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agv3-barry-empty {
  align-self: center;
  margin: auto 0;
  padding: 10px 12px;
  border: 1px dashed #cfe0ca;
  border-radius: 8px;
  background: #f4faf2;
  color: #6b8068;
  font-size: 13px;
}

.agv3-barry-message {
  max-width: 92%;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.42;
  white-space: pre-wrap;
}

.agv3-barry-message.is-user {
  align-self: flex-end;
  background: #2d6934;
  color: #fff;
}

.agv3-barry-message.is-barry {
  align-self: flex-start;
  border: 1px solid #d8e5d4;
  background: #f8fbf6;
  color: #203822;
}

.agv3-barry-message-meta {
  margin-bottom: 3px;
  opacity: 0.78;
  font-size: 11px;
  font-weight: 800;
}

.agv3-barry-message-body {
  overflow-wrap: anywhere;
}

.agv3-barry-media-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.agv3-barry-media-thumbs img {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  object-fit: cover;
}

.agv3-barry-created-list {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}

.agv3-barry-created-proof {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid #b9d3b3;
  border-radius: 8px;
  background: #f3fbef;
  color: #1d4b23;
}

.agv3-barry-created-proof span {
  font-size: 12px;
  color: #355336;
}

.agv3-barry-compose {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 6px;
  border: 1px solid #dbe7d5;
  border-radius: 8px;
  background: #f8fbf6;
}

.agv3-barry-compose-head {
  display: flex;
  justify-content: flex-end;
}

.agv3-barry-tools-toggle,
.agv3-barry-media-btn {
  border: 1px solid #b7cab0;
  border-radius: 8px;
  background: #fff;
  color: #264828;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.agv3-barry-tools-toggle {
  padding: 4px 9px;
}

.agv3-barry-advanced-panel {
  display: grid;
  gap: 6px;
}

.agv3-barry-compose.advanced-collapsed .agv3-barry-advanced-panel {
  display: none;
}

.agv3-barry-mode-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.agv3-barry-chip-label {
  color: #5c7059;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.agv3-barry-response-slider-wrap {
  display: grid;
  gap: 3px;
}

.agv3-barry-response-slider-wrap input[type='range'] {
  width: 100%;
  accent-color: #2a6933;
}

.agv3-barry-response-slider-wrap[data-level='1'] input[type='range'] { accent-color: #2f7d32; }
.agv3-barry-response-slider-wrap[data-level='2'] input[type='range'] { accent-color: #558b2f; }
.agv3-barry-response-slider-wrap[data-level='3'] input[type='range'] { accent-color: #f9a825; }
.agv3-barry-response-slider-wrap[data-level='4'] input[type='range'] { accent-color: #ef6c00; }
.agv3-barry-response-slider-wrap[data-level='5'] input[type='range'] { accent-color: #c62828; }

.agv3-barry-response-slider-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  color: #678263;
  font-size: 10px;
}

.agv3-barry-response-slider-labels span {
  text-align: center;
}

.agv3-barry-response-slider-labels span:first-child {
  text-align: left;
}

.agv3-barry-response-slider-labels span:last-child {
  text-align: right;
}

.agv3-barry-response-mode-text {
  color: #2a4f2c;
  font-size: 12px;
  font-weight: 800;
}

.agv3-barry-media-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.agv3-barry-media-btn {
  padding: 6px 10px;
  font-size: 12px;
}

.agv3-barry-media-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.agv3-barry-media-hint {
  color: #5f755d;
  font-size: 12px;
}

.agv3-barry-media-preview-wrap {
  max-width: 240px;
  padding: 4px;
  border: 1px solid #d9e6d5;
  border-radius: 8px;
  background: #fff;
}

.agv3-barry-media-preview-wrap img {
  display: block;
  width: 100%;
  height: 118px;
  border-radius: 7px;
  object-fit: cover;
}

.agv3-barry-input-row textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  max-height: 140px;
  padding: 8px;
  border: 1px solid #b7cab0;
  border-radius: 8px;
  background: #fff;
  color: #203822;
  font-size: 14px;
  resize: vertical;
}

.agv3-barry-send-actions-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.agv3-barry-send-action {
  min-height: 36px;
  border: 1px solid #2a6933;
  border-radius: 8px;
  background: #2a6933;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.agv3-barry-send-action:nth-child(2) {
  background: #245f57;
  border-color: #245f57;
}

.agv3-barry-send-action:nth-child(3) {
  background: #4a6750;
  border-color: #4a6750;
}

.agv3-barry-send-action.is-locked-active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.agv3-barry-send-action.is-locked-inactive,
.agv3-barry-send-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .agv3-notifications-head {
    gap: 5px;
    padding: 5px 6px 4px;
  }

  .agv3-notifications-head h3 {
    font-size: 13px;
  }

  .agv3-notifications-head .agv3-notifications-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 3px;
  }

  .agv3-notifications-head .agv3-notifications-text-btn {
    min-height: 28px;
    padding: 0 8px;
    font-size: 10px;
  }

  .agv3-notifications-head .agv3-btn-label-full {
    display: none;
  }

  .agv3-notifications-head .agv3-btn-label-short {
    display: inline;
  }

  .agv3-notifications-list {
    padding: 4px 5px 6px;
  }

  .agv3-notification-thread-head {
    gap: 5px;
    margin-bottom: 5px;
  }

  .agv3-notification-thread-head h3 {
    font-size: 11px;
  }

  .agv3-notification-thread-head .agv3-notifications-text-btn {
    min-height: 22px;
    padding: 0 6px;
    font-size: 9px;
  }

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

  .agv3-barry-mode-row {
    grid-template-columns: 1fr;
  }

  .agv3-barry-send-actions-row {
    grid-template-columns: 1fr;
  }

  .agv3-barry-message {
    max-width: 96%;
  }

  .agv3-barry-media-preview-wrap {
    max-width: 100%;
  }
}

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

.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-shell-menu-stack {
  gap: 14px;
}

.agv3-shell-menu-block,
.agv3-shell-menu-entry-row {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 10px;
  border-top: 1px solid rgba(32, 54, 35, 0.08);
}

.agv3-shell-menu-stack > :first-child {
  padding-top: 0;
  border-top: 0;
}

.agv3-shell-menu-entry-row {
  min-width: 0;
}

.agv3-shell-menu-account-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.agv3-shell-menu-account-inline .agv3-shell-menu-user {
  flex: 1 1 auto;
  min-width: 0;
}

#agv3App .agv3-shell-menu-note-host,
.agv3-shell-menu-note {
  min-width: 0;
}

#agv3App .agv3-shell-menu-note-host .webix_template,
.agv3-shell-menu-note {
  display: inline-flex;
  align-items: center;
  color: #5f6f61;
  font-size: 11px;
  line-height: 1.35;
}

#agv3App .agv3-shell-menu-note-host .webix_template {
  padding: 0;
  background: transparent !important;
}

#agv3App .agv3-shell-menu-note-host .agv3-shell-menu-note,
.agv3-shell-menu-entry-row .agv3-shell-menu-note {
  overflow: visible;
  text-overflow: clip;
}

#agv3App .agv3-shell-menu-user-host,
.agv3-shell-menu-user {
  min-width: 0;
}

#agv3App .agv3-shell-menu-user-host .webix_template,
.agv3-shell-menu-user {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(36, 70, 43, 0.12);
  background: rgba(36, 70, 43, 0.06);
  color: #49614d;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#agv3App .agv3-shell-menu-user-host .webix_template {
  justify-content: flex-start;
  padding: 0;
  background: transparent !important;
}

#agv3App .agv3-shell-menu-user-host .agv3-shell-menu-user,
.agv3-shell-menu-entry-row .agv3-shell-menu-user {
  max-width: 100%;
}

#agv3App .webix_el_button.agv3-shell-menu-btn {
  width: 100% !important;
}

#agv3App .webix_el_button.agv3-shell-menu-btn .webix_el_box {
  width: 100% !important;
}

#agv3App .webix_el_button.agv3-shell-menu-btn.agv3-shell-menu-btn--compact {
  width: auto !important;
}

#agv3App .webix_el_button.agv3-shell-menu-btn.agv3-shell-menu-btn--compact .webix_el_box {
  width: auto !important;
}

#agv3App .webix_el_button.agv3-shell-menu-btn .webix_button {
  min-width: 0;
  width: 100%;
  padding-inline: 12px;
  border: 1px solid rgba(45, 90, 45, 0.18) !important;
  background: rgba(45, 90, 45, 0.08) !important;
  color: #24462b !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: left;
}

#agv3App .webix_el_button.agv3-shell-menu-btn.agv3-shell-menu-btn--compact .webix_button {
  width: auto;
  min-width: 84px;
  padding-inline: 10px;
  text-align: center;
}

#agv3App .webix_el_button.agv3-shell-menu-btn.agv3-shell-menu-btn--thin .webix_el_box,
#agv3App .webix_el_button.agv3-shell-menu-btn.agv3-shell-menu-btn--thin .webix_button {
  min-height: 28px;
  height: 28px;
  line-height: 26px;
}

#agv3App .webix_el_button.agv3-shell-menu-btn.agv3-shell-menu-btn--thin .webix_button {
  min-width: 76px;
  padding-inline: 8px;
  font-size: 11px;
}

#agv3App .webix_el_button.agv3-shell-menu-btn .webix_button:hover,
#agv3App .webix_el_button.agv3-shell-menu-btn .webix_button:focus-visible {
  background: rgba(45, 90, 45, 0.14) !important;
  border-color: rgba(45, 90, 45, 0.28) !important;
}

#agv3App .webix_el_button.agv3-shell-menu-btn--danger .webix_button {
  border-color: rgba(121, 38, 38, 0.18) !important;
  background: rgba(121, 38, 38, 0.08) !important;
  color: #6d2525 !important;
}

#agv3App .webix_el_button.agv3-shell-menu-btn--danger .webix_button:hover,
#agv3App .webix_el_button.agv3-shell-menu-btn--danger .webix_button:focus-visible {
  background: rgba(121, 38, 38, 0.14) !important;
  border-color: rgba(121, 38, 38, 0.26) !important;
}

.agv3-shell-menu-fallback-btn {
  min-width: 0;
  width: 100%;
  padding-inline: 12px;
  justify-content: flex-start;
}

.agv3-shell-menu-fallback-btn--compact {
  width: auto;
  min-width: 84px;
  padding-inline: 10px;
  justify-content: center;
  flex: 0 0 auto;
}

.agv3-shell-menu-fallback-btn--thin {
  min-width: 76px;
  min-height: 28px;
  padding-inline: 8px;
  font-size: 11px;
}

.agv3-shell-menu-fallback-btn--danger {
  border-color: rgba(121, 38, 38, 0.18);
  background: rgba(121, 38, 38, 0.08);
  color: #6d2525;
}

.agv3-shell-menu-fallback-btn--danger:hover,
.agv3-shell-menu-fallback-btn--danger:focus-visible {
  border-color: rgba(121, 38, 38, 0.26);
  background: rgba(121, 38, 38, 0.14);
}

.agv3-shell-settings-close {
  margin-left: auto;
}

.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: var(--agv3-z-map-dialog);
}

.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: 96px;
  }

  .agv3-top-panel--settings {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .agv3-top-panel--notifications {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .agv3-support-thread-card {
    height: min(400px, calc(100vh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 104px));
    height: min(400px, calc(100dvh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 104px));
    max-height: min(400px, calc(100vh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 104px));
    max-height: min(400px, calc(100dvh - var(--agv3-top-panels-top, 56px) - var(--agv3-bottom-stack-h) - 104px));
  }

  .agv3-support-reply-input {
    min-height: 58px;
  }
}

/* --- 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 {
  position: sticky;
  top: 0;
  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: var(--agv3-z-topbar);
}

.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-topbar.slim-header .agv3-brand .brand-lockup {
  gap: 8px;
}

.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 {
  opacity: 1;
  transform: none;
  transition: none;
}

#agv3App.agv3-top-panels-open:not(.agv3-header-collapsed) .agv3-top-panels {
  overflow: visible;
}

.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 {
  opacity: 1;
  transform: none;
}

.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: 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,
#agJournalList,
.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,
#agJournalList,
.agv3-webix-host--journal,
.agv3-webix-host--edit,
.agv3-create-body {
  padding-bottom: 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-sheet-create.agv3-paddock-has-draft:not(.agv3-paddock-drawing) .agv3-bottom-nav,
  #agv3App.agv3-sheet-create.agv3-paddock-has-draft:not(.agv3-paddock-drawing) .agv3-toolbar {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  #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-topbar.slim-header #agRefreshBtn {
    display: none;
  }

  .agv3-topbar.slim-header .agv3-farm-btn {
    width: auto;
    max-width: 76px;
    padding-inline: 7px;
    gap: 5px;
  }

  .agv3-topbar.slim-header .agv3-farm-btn .farm-btn-name {
    display: none;
  }

  .agv3-topbar.slim-header .agv3-farm-btn .farm-btn-code {
    display: inline-block;
    max-width: 30px;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
  }

  .agv3-topbar.slim-header .agv3-farm-btn .agv3-farm-btn-icon svg {
    width: 18px;
    height: 18px;
  }

  .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: var(--agv3-icon-size, 40px);
  min-height: var(--agv3-icon-size, 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-top: 0;
  border-radius: 0 0 22px 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-top-panel {
  border-top: 0;
  border-radius: 0 0 24px 24px;
}

.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-dashboard-day {
  margin-left: 8px;
  vertical-align: middle;
}

.agv3-dashboard-day.is-current {
  background: linear-gradient(180deg, rgba(223, 244, 229, 0.98), rgba(205, 235, 213, 0.94));
  border-color: rgba(49, 124, 69, 0.26);
  color: #1d6b36;
}

.agv3-dashboard-day.is-off-today {
  background: linear-gradient(180deg, rgba(255, 235, 232, 0.98), rgba(250, 216, 211, 0.94));
  border-color: rgba(176, 62, 48, 0.28);
  color: #9f2f24;
}

.agv3-card-head-copy {
  min-width: 0;
}

.agv3-card-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agv3-card-head-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 14px;
}

.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;
  container-type: inline-size;
  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--button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.agv3-stat--button:hover,
.agv3-stat--button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(41, 84, 54, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 16px 28px rgba(27, 50, 33, 0.10);
}

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

.agv3-stat-value {
  font-size: clamp(31px, 8vw, 42px);
  line-height: 0.96;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #214e31;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agv3-stat-meta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #68806d;
}

.agv3-stat--tasks {
  grid-column: 1 / -1;
  gap: 12px;
}

.agv3-stat-card-link {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.agv3-stat-card-link:hover .agv3-stat-label,
.agv3-stat-card-link:focus-visible .agv3-stat-label {
  color: #2c5335;
}

.agv3-stat-card-link:focus-visible {
  outline: 2px solid rgba(41, 84, 54, 0.18);
  outline-offset: 6px;
  border-radius: 14px;
}

.agv3-dashboard-task-heading {
  min-width: 0;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 800;
  color: #183326;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agv3-stat-card-link:hover .agv3-dashboard-task-heading,
.agv3-stat-card-link:focus-visible .agv3-dashboard-task-heading {
  color: #2c5335;
}

.agv3-dashboard-task-list {
  display: grid;
  gap: 8px;
}

.agv3-dashboard-task-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 16px;
  border: 1px solid rgba(49, 89, 58, 0.10);
  background: rgba(255, 255, 255, 0.74);
}

.agv3-dashboard-task-row.is-overdue {
  border-color: rgba(186, 104, 62, 0.18);
  background: linear-gradient(180deg, rgba(255, 249, 241, 0.92), rgba(255, 255, 255, 0.84));
}

.agv3-dashboard-task-check {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border-radius: 6px;
  border: 1px solid rgba(47, 89, 59, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 246, 237, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  cursor: pointer;
  position: relative;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.agv3-dashboard-task-check:hover,
.agv3-dashboard-task-check:focus-visible {
  border-color: rgba(41, 84, 54, 0.34);
  transform: translateY(-1px);
}

.agv3-dashboard-task-check:checked {
  background: linear-gradient(180deg, rgba(97, 164, 106, 0.98), rgba(63, 133, 74, 0.98));
  border-color: rgba(47, 115, 58, 0.62);
}

.agv3-dashboard-task-check:checked::after {
  content: '';
  position: absolute;
  inset: 3px 6px 4px 5px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.agv3-dashboard-task-check[data-busy='1'] {
  cursor: wait;
  opacity: 0.72;
}

.agv3-dashboard-task-main {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 6px;
  min-width: 0;
  cursor: pointer;
}

.agv3-dashboard-task-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.agv3-dashboard-task-title {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  color: #183326;
}

.agv3-dashboard-task-main:hover .agv3-dashboard-task-title,
.agv3-dashboard-task-main:focus-visible .agv3-dashboard-task-title {
  color: #28523a;
}

.agv3-dashboard-task-main:focus-visible {
  outline: 2px solid rgba(41, 84, 54, 0.16);
  outline-offset: 4px;
  border-radius: 10px;
}

.agv3-dashboard-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  font-size: 11px;
  color: #617767;
}

.agv3-dashboard-task-empty {
  font-size: 12px;
  color: #68806d;
}

.agv3-dashboard-task-empty {
  padding: 2px 0 0;
}

.agv3-dashboard-detail-modal__dialog {
  width: min(1040px, calc(100vw - 24px));
}

.agv3-dashboard-detail {
  display: grid;
  gap: 12px;
}

.agv3-dashboard-detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.agv3-dashboard-detail-stat {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid rgba(49, 89, 58, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

.agv3-dashboard-detail-stat span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #617767;
}

.agv3-dashboard-detail-stat strong {
  min-width: 0;
  font-size: 20px;
  line-height: 1.1;
  color: #214e31;
  overflow-wrap: anywhere;
}

.agv3-dashboard-detail-note,
.agv3-dashboard-detail-empty {
  font-size: 13px;
  line-height: 1.45;
  color: #536456;
}

.agv3-dashboard-detail-table {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.agv3-dashboard-detail-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(86px, 0.75fr)) minmax(82px, 0.55fr);
  gap: 8px;
  min-width: 620px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(49, 89, 58, 0.10);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  color: #314333;
}

.agv3-dashboard-detail-table--mobs .agv3-dashboard-detail-row {
  grid-template-columns: minmax(150px, 1.3fr) minmax(70px, 0.55fr) minmax(90px, 0.7fr) minmax(94px, 0.75fr) minmax(120px, 1fr);
}

.agv3-dashboard-detail-table--average .agv3-dashboard-detail-row {
  grid-template-columns: minmax(150px, 1.3fr) minmax(78px, 0.65fr) minmax(88px, 0.75fr) minmax(82px, 0.65fr) minmax(118px, 0.9fr) minmax(82px, 0.55fr);
}

.agv3-dashboard-detail-table--feed-days .agv3-dashboard-detail-row {
  grid-template-columns: minmax(150px, 1.25fr) minmax(78px, 0.6fr) minmax(96px, 0.75fr) minmax(104px, 0.85fr) minmax(82px, 0.65fr) minmax(112px, 0.9fr) minmax(82px, 0.55fr);
  min-width: 760px;
}

.agv3-dashboard-detail-table--grazeable-feed .agv3-dashboard-detail-row {
  grid-template-columns: minmax(150px, 1.1fr) minmax(78px, 0.55fr) minmax(108px, 0.75fr) minmax(116px, 0.8fr) minmax(96px, 0.7fr) minmax(150px, 1.1fr) minmax(82px, 0.55fr);
  min-width: 840px;
}

.agv3-dashboard-detail-table--feed-wedge .agv3-dashboard-detail-row {
  grid-template-columns: minmax(150px, 1.25fr) minmax(116px, 0.82fr) minmax(84px, 0.62fr) minmax(112px, 0.78fr) minmax(76px, 0.56fr) minmax(76px, 0.54fr);
  min-width: 740px;
}

.agv3-dashboard-detail-table--at-risk .agv3-dashboard-detail-row {
  grid-template-columns: minmax(150px, 1.05fr) minmax(72px, 0.46fr) minmax(86px, 0.58fr) minmax(86px, 0.58fr) minmax(94px, 0.66fr) minmax(96px, 0.66fr) minmax(190px, 1.35fr);
  min-width: 880px;
}

.agv3-dashboard-detail-row--action {
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.agv3-dashboard-detail-row--action:hover,
.agv3-dashboard-detail-row--action:focus-visible {
  border-color: rgba(41, 84, 54, 0.24);
  background: rgba(248, 252, 246, 0.96);
  outline: none;
  transform: translateY(-1px);
}

.agv3-dashboard-detail-state-btn {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
}

.agv3-dashboard-detail-action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.agv3-dashboard-detail-row--head {
  background: rgba(236, 244, 232, 0.92);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #607062;
}

.agv3-dashboard-detail-row strong {
  display: block;
  min-width: 0;
  color: #19351f;
  overflow-wrap: anywhere;
}

.agv3-dashboard-detail-row small {
  display: block;
  margin-top: 2px;
  color: #6c7d6f;
}

.agv3-dashboard-dmha-delta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.agv3-dashboard-dmha-delta.is-up {
  color: #176334;
  background: rgba(50, 151, 82, 0.13);
}

.agv3-dashboard-dmha-delta.is-down {
  color: #9f2d24;
  background: rgba(197, 66, 55, 0.12);
}

.agv3-dashboard-dmha-delta.is-flat {
  color: #5f6f64;
  background: rgba(81, 99, 86, 0.10);
}

.agv3-dashboard-detail-stat--configurable {
  position: relative;
  padding-right: 42px;
}

.agv3-at-risk-threshold-change {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-grid;
  place-items: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 7px;
}

.agv3-at-risk-threshold-change svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.agv3-at-risk-threshold-form {
  display: none;
  align-items: end;
  grid-template-columns: minmax(160px, 1fr) auto auto auto;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid rgba(49, 89, 58, 0.14);
  background: rgba(255, 255, 255, 0.82);
}

.agv3-at-risk-threshold-form.is-open {
  display: grid;
}

.agv3-at-risk-threshold-range {
  width: 100%;
  accent-color: #28613a;
}

.agv3-at-risk-threshold-value {
  min-width: 58px;
  padding-bottom: 7px;
  font-size: 13px;
  font-weight: 900;
  color: #214e31;
  white-space: nowrap;
}

.agv3-at-risk-threshold-note {
  padding-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #6b786c;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .agv3-at-risk-threshold-form {
    grid-template-columns: 1fr auto;
  }

  .agv3-at-risk-threshold-form .btn-primary,
  .agv3-at-risk-threshold-note {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.agv3-dashboard-feed-wedge-report {
  gap: 14px;
}

.agv3-feed-wedge-controls {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}

.agv3-feed-wedge-mode {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.agv3-feed-wedge-mode.is-active {
  border-color: rgba(35, 84, 48, 0.42);
  background: rgba(222, 239, 219, 0.96);
  color: #193d21;
  box-shadow: inset 0 0 0 1px rgba(35, 84, 48, 0.12);
}

.agv3-feed-wedge-chart-scroll {
  overflow-x: auto;
  padding: 4px 0 8px;
}

.agv3-feed-wedge-chart {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  min-height: 360px;
}

.agv3-feed-wedge-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 24px 4px 58px 0;
  font-size: 11px;
  font-weight: 800;
  color: #718073;
}

.agv3-feed-wedge-plot {
  position: relative;
  min-height: 348px;
  padding: 24px 12px 58px;
  border: 1px solid rgba(49, 89, 58, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(to top, rgba(50, 76, 54, 0.10) 1px, transparent 1px) 0 24px / 100% 25%,
    rgba(250, 252, 248, 0.84);
}

.agv3-feed-wedge-bars {
  position: absolute;
  inset: 24px 12px 58px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(24px, 1fr);
  gap: 8px;
  align-items: end;
}

.agv3-feed-wedge-bar {
  position: relative;
  display: grid;
  grid-template-rows: 24px 1fr 46px;
  align-items: end;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #243b28;
  cursor: pointer;
}

.agv3-feed-wedge-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bar-pct, 20%) + 50px);
  z-index: 4;
  width: max-content;
  max-width: 190px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(24, 46, 29, 0.94);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: 0 8px 22px rgba(17, 36, 22, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 70ms ease, transform 70ms ease;
}

.agv3-feed-wedge-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(24, 46, 29, 0.94);
}

.agv3-feed-wedge-bar:hover .agv3-feed-wedge-tooltip,
.agv3-feed-wedge-bar:focus-visible .agv3-feed-wedge-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.agv3-feed-wedge-bar:focus-visible {
  outline: 2px solid rgba(32, 92, 49, 0.48);
  outline-offset: 3px;
  border-radius: 8px;
}

.agv3-feed-wedge-bar-value {
  align-self: start;
  min-width: 0;
  font-size: 10px;
  font-weight: 800;
  color: #405044;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: rotate(-14deg);
  transform-origin: left center;
}

.agv3-feed-wedge-bar-fill {
  display: block;
  width: 100%;
  height: var(--bar-pct, 20%);
  min-height: 5px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #3b6681, #27435a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
  transition: filter 120ms ease, transform 120ms ease;
}

.agv3-feed-wedge-bar.is-high .agv3-feed-wedge-bar-fill {
  background: linear-gradient(180deg, #2f4766, #212d45);
}

.agv3-feed-wedge-bar.is-ok .agv3-feed-wedge-bar-fill {
  background: linear-gradient(180deg, #4b9272, #2f674f);
}

.agv3-feed-wedge-bar.is-low .agv3-feed-wedge-bar-fill {
  background: linear-gradient(180deg, #d3c84f, #a99e32);
}

.agv3-feed-wedge-bar:hover .agv3-feed-wedge-bar-fill {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.agv3-feed-wedge-bar-label {
  align-self: start;
  justify-self: center;
  width: max-content;
  max-width: 58px;
  padding-top: 7px;
  font-size: 10px;
  font-weight: 800;
  color: #5c695e;
  transform: rotate(52deg);
  transform-origin: top left;
  white-space: nowrap;
}

.agv3-feed-wedge-ref {
  position: absolute;
  left: 10px;
  right: 10px;
  z-index: 1;
  border-top: 2px solid rgba(32, 39, 31, 0.62);
  pointer-events: none;
}

.agv3-feed-wedge-ref--residual {
  border-top-style: dashed;
  border-top-color: rgba(86, 99, 86, 0.48);
}

.agv3-feed-wedge-ref span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(250, 252, 248, 0.88);
  font-size: 10px;
  font-weight: 900;
  color: #344239;
}

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

.agv3-feed-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(46, 85, 52, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.agv3-feed-tab {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #274a2c;
  font-weight: 800;
  cursor: pointer;
}

.agv3-feed-tab.is-active {
  background: #2f6a36;
  color: #fff;
}

.agv3-feed-panel {
  display: grid;
  gap: 12px;
}

.agv3-feed-panel[hidden] {
  display: none;
}

.agv3-feed-calculator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

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

.agv3-feed-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.36fr);
  gap: 8px;
}

.agv3-feed-unit-select {
  min-width: 92px;
}

.agv3-feed-run-preview {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(46, 85, 52, 0.18);
  background: rgba(255, 255, 255, 0.76);
  color: #31533a;
  font-weight: 700;
}

.agv3-feed-total {
  color: #173f21;
  font-size: 18px;
  font-weight: 900;
}

.agv3-feed-run-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(46, 85, 52, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.agv3-feed-run-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agv3-feed-type-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .agv3-feed-calculator,
  .agv3-feed-grid,
  .agv3-feed-run-row {
    grid-template-columns: 1fr;
  }

  .agv3-feed-run-actions {
    justify-content: stretch;
  }

  .agv3-feed-run-actions > button {
    flex: 1 1 140px;
  }
}

.agv3-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.agv3-dashboard-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.agv3-dashboard-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(61, 112, 73, 0.12);
  background: linear-gradient(180deg, rgba(247, 250, 244, 0.95), rgba(238, 245, 233, 0.92));
}

.agv3-dashboard-choice input {
  margin-top: 2px;
  accent-color: #2e7d32;
}

.agv3-dashboard-choice-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.agv3-dashboard-choice-label {
  font-weight: 700;
  color: #21392a;
}

.agv3-dashboard-choice-meta {
  font-size: 12px;
  color: #617565;
}

.agv3-dashboard-choice.is-selected {
  border-color: var(--agv3-selection-accent, #ff2db2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 0 0 3px var(--agv3-selection-ring, rgba(255, 45, 178, 0.46));
}

@container (max-width: 220px) {
  .agv3-stat {
    gap: 6px;
    padding: 14px 13px;
  }

  .agv3-stat-label {
    font-size: 10px;
    letter-spacing: 0.06em;
  }

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

@container (max-width: 180px) {
  .agv3-stat {
    gap: 5px;
    padding: 13px 12px;
  }

  .agv3-stat-label {
    font-size: 9px;
    letter-spacing: 0.05em;
  }

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

@container (max-width: 150px) {
  .agv3-stat-value {
    font-size: 19px;
  }
}

.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-ui-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.agv3-ui-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.agv3-ui-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.agv3-ui-icon-label {
  display: inline-block;
  line-height: 1.1;
}

.agv3-topbar.slim-header .agv3-ui-icon-btn--shell {
  gap: 0;
}

.agv3-topbar.slim-header .agv3-ui-icon-btn--shell .agv3-ui-icon svg {
  width: 20px;
  height: 20px;
}

.agv3-topbar.slim-header .agv3-ui-icon-btn--shell .agv3-ui-icon-label {
  display: none;
}

.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-tab-btn.is-pending {
  border-color: rgba(203, 136, 48, 0.30);
  background: linear-gradient(180deg, rgba(250, 244, 231, 0.98), rgba(245, 232, 201, 0.95));
  color: #6a4314;
  box-shadow: 0 0 0 4px rgba(203, 136, 48, 0.10), 0 14px 22px rgba(96, 65, 22, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.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.agv3-ui-icon-btn--nav {
  flex-direction: column;
  gap: 9px;
}

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

.agv3-bottom-nav .agv3-tab-btn.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);
  color: #183d25;
}

.agv3-bottom-nav .agv3-tab-btn .agv3-ui-icon svg {
  width: 28px;
  height: 28px;
}

.agv3-bottom-nav .agv3-tab-btn .agv3-ui-icon-label {
  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-toast.is-visible {
  pointer-events: auto;
}

.agv3-toast.is-sticky {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  max-width: min(92vw, 520px);
  padding: 10px 12px;
}

.agv3-toast.is-error {
  background: rgba(101, 36, 31, 0.94);
}

.agv3-toast__message {
  min-width: 0;
}

.agv3-toast__close {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
}

.agv3-toast__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.agv3-notification-banner {
  position: fixed;
  left: 50%;
  bottom: calc(var(--agv3-bottom-stack-h) + 62px);
  transform: translateX(-50%);
  z-index: var(--agv3-z-toast);
  width: min(92vw, 680px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(37, 58, 42, 0.96);
  color: #fff;
  box-shadow: 0 18px 36px rgba(8, 16, 11, 0.24);
}

.agv3-notification-banner--warning {
  background: rgba(122, 83, 19, 0.96);
}

.agv3-notification-banner--urgent {
  background: rgba(101, 36, 31, 0.97);
}

.agv3-notification-banner__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  font-size: 13px;
  line-height: 1.35;
}

.agv3-notification-banner__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.agv3-notification-banner__action,
.agv3-notification-banner__close,
.agv3-notification-modal__primary,
.agv3-notification-modal__secondary {
  border-color: rgba(255, 255, 255, 0.52);
  color: #fff;
}

.agv3-notification-modal {
  position: fixed;
  inset: 0;
  z-index: var(--agv3-z-modal);
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 14, 9, 0.34);
}

.agv3-notification-modal__dialog {
  width: min(92vw, 460px);
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  color: #1f321f;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.26);
}

.agv3-notification-modal__head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.agv3-notification-modal__body {
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.agv3-notification-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.agv3-notification-modal__primary,
.agv3-notification-modal__secondary {
  color: #234123;
  border-color: rgba(45, 90, 45, 0.28);
}

.agv3-notification-modal__primary {
  background: #2d5a2d;
  border-color: #2d5a2d;
  color: #fff;
}

.agv3-session-expired-modal {
  pointer-events: none;
  place-items: start center;
  padding-top: max(72px, env(safe-area-inset-top, 0px));
  background: rgba(7, 14, 9, 0.12);
}

.agv3-session-expired-modal__dialog {
  pointer-events: auto;
  width: min(92vw, 500px);
}

.agv3-session-expired-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.agv3-session-expired-modal__dismiss {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 3px 7px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
  color: #5f6f61;
}

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

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

  #agv3App .agv3-toolbar .agv3-selected-day-btn {
    inline-size: 64px;
    min-inline-size: 64px;
    max-inline-size: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .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-dashboard-choice-grid {
    grid-template-columns: 1fr;
  }

  .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 .agv3-ui-icon-label {
    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 {
  height: var(--agv3-draw-viewport-h, 100vh);
  min-height: var(--agv3-draw-viewport-h, 100dvh);
  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);
}

.agv3-task-list {
  display: grid;
  gap: 12px;
}

.agv3-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid rgba(40, 76, 52, 0.12);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
}

.agv3-task-card.is-selected {
  border-color: rgba(54, 112, 68, 0.34);
  box-shadow: 0 16px 30px rgba(30, 71, 41, 0.08);
}

.agv3-task-card__main {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 8px;
}

.agv3-task-card__main h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  color: #173225;
}

.agv3-task-card__top,
.agv3-task-card__actions,
.agv3-task-comment__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agv3-task-card__top,
.agv3-task-comment__head {
  justify-content: space-between;
}

.agv3-task-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: #536859;
}

.agv3-task-status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  background: #e6efe2;
  color: #23402c;
}

.agv3-task-status-chip--open,
.agv3-task-status-chip--in_progress {
  background: #e7f1e2;
  color: #23492e;
}

.agv3-task-status-chip--blocked {
  background: #fff2db;
  color: #87540f;
}

.agv3-task-status-chip--done,
.agv3-task-status-chip--cancelled {
  background: #edf0ec;
  color: #5f6f63;
}

.agv3-task-comments {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.agv3-task-comments__list {
  display: grid;
  gap: 8px;
}

.agv3-task-comment {
  border: 1px solid rgba(40, 76, 52, 0.10);
  border-radius: 14px;
  background: #f9fbf7;
  padding: 10px 12px;
  font-size: 13px;
  color: #253b2c;
}

.agv3-task-comment__head {
  margin-bottom: 6px;
  font-size: 11px;
  color: #617565;
}

.agv3-task-marker div {
  width: var(--agv3-marker-icon-size, 38px);
  height: var(--agv3-marker-icon-size, 38px);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f7ec;
  border: 2px solid #2f5d32;
  box-shadow: 0 8px 18px rgba(33, 61, 41, 0.18);
  font-size: calc(var(--agv3-marker-icon-size, 38px) * 0.5);
}

.agv3-task-marker.is-selected div {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--agv3-selection-accent, #ff2db2);
}

@media (max-width: 760px) {
  .agv3-topbar.slim-header .agv3-brand {
    flex: 0 0 auto;
    min-width: 0;
    padding: 6px 9px;
  }

  .agv3-topbar.slim-header .agv3-brand .brand-lockup {
    gap: 0;
  }

  .agv3-topbar.slim-header .agv3-brand .brand-lockup__badge {
    display: none;
  }

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

  .agv3-topbar.slim-header .agv3-brand .brand-lockup__rhythm {
    font-size: 0;
  }

  .agv3-topbar.slim-header .agv3-brand .brand-lockup__rhythm::before {
    content: 'R';
    font-size: 18px;
  }

  .agv3-sidebar {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  #agSection-photos.is-active {
    overflow: visible !important;
    flex: 0 0 auto;
    min-height: auto;
  }

  #agSection-photos > .agv3-card {
    display: block;
    flex: 0 0 auto;
    min-height: auto;
    height: auto;
    overflow: visible !important;
  }

  #agSection-photos #agPhotoGrid {
    overflow: visible !important;
    flex: 0 0 auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #agSection-photos .agv3-photo-analyzer-panel {
    position: sticky;
    top: 0;
    z-index: 3;
  }

  #agSection-photos .agv3-photo-analyzer-panel[hidden] {
    display: none !important;
  }

  #agSection-photos .agv3-photo-drawer {
    display: none;
  }

  #agSection-photos .agv3-photo-drawer.is-open {
    display: block;
  }
}

#agv3App .agv3-inline-title-btn {
  width: 28px;
  height: 28px;
  min-height: 28px;
  margin-left: 8px;
  padding: 0;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
}

#agv3App .agv3-journal-fulltext-toggle {
  margin-left: auto;
  white-space: nowrap;
}

#agv3App .agv3-journal-entry-cell.is-expanded {
  align-items: stretch;
}

#agv3App .agv3-journal-entry-cell {
  flex-direction: row;
  align-items: center;
}

#agv3App .agv3-journal-entry-body {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

#agv3App .agv3-journal-thumb-btn {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(45, 90, 45, 0.16);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
}

#agv3App .agv3-journal-thumb-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#agv3App .agv3-journal-row .agv3-journal-thumb {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  align-self: center;
}

#agv3App .agv3-journal-row .agv3-journal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#agv3App .agv3-journal-entry-cell.is-expanded .agv3-journal-entry-preview {
  display: -webkit-box;
  max-height: 58px;
  overflow: hidden;
  white-space: normal;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

#agv3App .agv3-journal-entry-detail {
  color: #7a8a7c;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Messages full-screen overlay: keep the whole thread in one scroll surface. */
#agv3App.agv3-notifications-open .agv3-top-panels {
  inset: 0 0 0 0;
  height: auto;
  z-index: calc(var(--agv3-z-modal) - 1);
  overflow: visible;
}

#agv3App.agv3-notifications-open .agv3-top-panel--notifications {
  --agv3-messages-overlay-top-gap: max(8px, env(safe-area-inset-top, 0px));
  --agv3-messages-overlay-bottom-gap: max(8px, env(safe-area-inset-bottom, 0px));
  top: var(--agv3-messages-overlay-top-gap);
  right: 8px;
  bottom: auto;
  left: 8px;
  width: auto;
  max-height: none;
  height: calc(100vh - var(--agv3-messages-overlay-top-gap) - var(--agv3-messages-overlay-bottom-gap));
  height: calc(100dvh - var(--agv3-messages-overlay-top-gap) - var(--agv3-messages-overlay-bottom-gap));
  height: calc(var(--agv3-visual-viewport-height, 100vh) - var(--agv3-messages-overlay-top-gap) - var(--agv3-messages-overlay-bottom-gap));
  border: 1px solid rgba(41, 74, 43, 0.12);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(14, 24, 16, 0.24);
  overflow: hidden;
}

#agv3App.agv3-notifications-open .agv3-top-panel--notifications .agv3-notifications-card {
  height: 100%;
  max-height: none;
  border-radius: inherit;
  overflow: hidden;
}

#agv3App.agv3-notifications-open .agv3-notifications-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 10px;
  padding-bottom: max(14px, calc(10px + env(safe-area-inset-bottom, 0px)));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

#agv3App.agv3-notifications-open .agv3-top-panel--notifications.is-thread-open .agv3-notifications-list {
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

#agv3App.agv3-notifications-open .agv3-support-thread-card,
#agv3App.agv3-notifications-open .agv3-barry-thread-card,
#agv3App.agv3-notifications-open .agv3-notification-detail-card {
  height: auto !important;
  max-height: none !important;
  min-height: 0;
  overflow: visible;
}

#agv3App.agv3-notifications-open .agv3-support-thread-card,
#agv3App.agv3-notifications-open .agv3-barry-thread-card {
  display: flex;
  flex-direction: column;
}

#agv3App.agv3-notifications-open .agv3-notification-detail-body {
  max-height: none;
  min-height: 0;
  overflow: visible;
}

#agv3App.agv3-notifications-open .agv3-support-reply-box,
#agv3App.agv3-notifications-open .agv3-barry-compose {
  flex: 0 0 auto;
  scroll-margin-bottom: max(20px, calc(12px + env(safe-area-inset-bottom, 0px)));
}

#agv3App.agv3-notifications-open .agv3-support-reply-input,
#agv3App.agv3-notifications-open .agv3-barry-input-row textarea {
  max-height: 34vh;
}

@media (max-width: 760px) {
  #agv3App.agv3-notifications-open .agv3-top-panel--notifications {
    --agv3-messages-overlay-top-gap: max(4px, env(safe-area-inset-top, 0px));
    --agv3-messages-overlay-bottom-gap: max(4px, env(safe-area-inset-bottom, 0px));
    top: var(--agv3-messages-overlay-top-gap);
    right: 4px;
    bottom: auto;
    left: 4px;
    border-radius: 14px;
  }

  #agv3App.agv3-notifications-open .agv3-notifications-list {
    padding: 8px;
    padding-bottom: max(12px, calc(8px + env(safe-area-inset-bottom, 0px)));
  }

  #agv3App.agv3-notifications-open .agv3-notification-detail-card {
    padding: 10px;
  }

  #agv3App.agv3-notifications-open .agv3-support-reply-input,
  #agv3App.agv3-notifications-open .agv3-barry-input-row textarea {
    min-height: 72px;
    max-height: 30vh;
  }
}

/* Thread layout v2: header/progress/messages scroll together; composer owns the bottom row. */
#agv3App.agv3-notifications-open .agv3-top-panel--notifications.is-thread-open .agv3-notifications-list {
  overflow: hidden;
}

#agv3App.agv3-notifications-open .agv3-top-panel--notifications.is-thread-open .agv3-notification-detail-card:not(.agv3-support-new-card) {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  height: 100% !important;
  max-height: none !important;
  min-height: 0;
  overflow: hidden;
}

#agv3App.agv3-notifications-open .agv3-top-panel--notifications.is-thread-open .agv3-thread-card--readonly {
  grid-template-rows: auto minmax(0, 1fr) !important;
}

#agv3App.agv3-notifications-open .agv3-thread-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 4px 6px 7px;
  border-bottom: 1px solid rgba(41, 74, 43, 0.1);
}

#agv3App.agv3-notifications-open .agv3-thread-bar strong {
  min-width: 0;
  color: #203822;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#agv3App.agv3-notifications-open .agv3-thread-bar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

#agv3App.agv3-notifications-open .agv3-thread-bar .agv3-notifications-text-btn {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.2;
}

#agv3App.agv3-notifications-open .agv3-thread-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

#agv3App.agv3-notifications-open .agv3-thread-scroll .agv3-notification-thread-head {
  flex: 0 0 auto;
}

#agv3App.agv3-notifications-open .agv3-thread-scroll .agv3-notification-detail-body {
  flex: 0 0 auto;
  overflow: visible;
}

#agv3App.agv3-notifications-open .agv3-support-reply-box,
#agv3App.agv3-notifications-open .agv3-barry-compose {
  min-height: 0;
  max-height: min(44vh, 360px);
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid rgba(41, 74, 43, 0.12);
  background: #f8fbf6;
}

#agv3App.agv3-notifications-open .agv3-thread-card.is-compose-collapsed {
  grid-template-rows: auto minmax(0, 1fr) !important;
}

#agv3App.agv3-notifications-open .agv3-thread-card.is-compose-collapsed .agv3-support-reply-box,
#agv3App.agv3-notifications-open .agv3-thread-card.is-compose-collapsed .agv3-barry-compose {
  display: none;
}

#agv3App.agv3-notifications-open .agv3-barry-message {
  align-self: stretch;
  max-width: none;
  padding: 8px 9px;
  border: 1px solid rgba(41, 74, 43, 0.1);
  border-radius: 8px;
  background: #fff;
  color: #203822;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
}

#agv3App.agv3-notifications-open .agv3-barry-message.is-user {
  border-color: rgba(45, 90, 45, 0.16);
  background: #fff;
  color: #203822;
}

#agv3App.agv3-notifications-open .agv3-barry-message.is-barry {
  border-color: rgba(41, 74, 43, 0.1);
  background: #f8fbf5;
}

#agv3App.agv3-notifications-open .agv3-barry-send-actions-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#agv3App.agv3-notifications-open .agv3-barry-send-action {
  min-width: 0;
  padding-inline: 6px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#agv3App .agv3-messages-resize-grip {
  display: none;
}

@media (min-width: 900px) and (pointer: fine) {
  #agv3App.agv3-notifications-open .agv3-top-panel--notifications {
    top: var(--agv3-messages-desktop-y, max(64px, calc(env(safe-area-inset-top, 0px) + 64px)));
    left: var(--agv3-messages-desktop-x, 12px);
    right: auto;
    width: var(--agv3-messages-desktop-w, min(620px, calc(100vw - 24px)));
    height: var(--agv3-messages-desktop-h, min(760px, calc(var(--agv3-visual-viewport-height, 100vh) - var(--agv3-messages-desktop-y, 64px) - 10px)));
    min-width: min(420px, calc(100vw - 16px));
    min-height: min(420px, calc(var(--agv3-visual-viewport-height, 100vh) - 16px));
    max-width: calc(100vw - 24px);
    max-height: calc(var(--agv3-visual-viewport-height, 100vh) - 16px);
    border-radius: 18px;
  }

  #agv3App.agv3-notifications-open .agv3-top-panel--notifications .agv3-notifications-head,
  #agv3App.agv3-notifications-open .agv3-top-panel--notifications .agv3-thread-bar {
    cursor: grab;
    user-select: none;
  }

  #agv3App.agv3-notifications-open .agv3-top-panel--notifications .agv3-notifications-head button,
  #agv3App.agv3-notifications-open .agv3-top-panel--notifications .agv3-thread-bar button,
  #agv3App.agv3-notifications-open .agv3-top-panel--notifications .agv3-thread-bar a {
    cursor: pointer;
  }

  #agv3App.agv3-notifications-open .agv3-top-panel--notifications.is-dragging,
  #agv3App.agv3-notifications-open .agv3-top-panel--notifications.is-dragging .agv3-notifications-head,
  #agv3App.agv3-notifications-open .agv3-top-panel--notifications.is-dragging .agv3-thread-bar {
    cursor: grabbing;
  }

  #agv3App.agv3-notifications-open .agv3-messages-resize-grip {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 5;
    width: 24px;
    height: 24px;
    display: block;
    cursor: nwse-resize;
    touch-action: none;
    user-select: none;
  }

  #agv3App.agv3-notifications-open .agv3-messages-resize-grip::before {
    content: "";
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(41, 74, 43, 0.52);
    border-bottom: 2px solid rgba(41, 74, 43, 0.52);
    box-shadow: 4px 4px 0 -2px rgba(41, 74, 43, 0.34);
  }

  #agv3App.agv3-notifications-open .agv3-top-panel--notifications.is-resizing,
  #agv3App.agv3-notifications-open .agv3-top-panel--notifications.is-resizing * {
    cursor: nwse-resize !important;
  }
}

@media (max-width: 760px) {
  #agv3App.agv3-notifications-open .agv3-top-panel--notifications.is-thread-open .agv3-notification-detail-card:not(.agv3-support-new-card) {
    gap: 6px;
  }

  #agv3App.agv3-notifications-open .agv3-support-reply-box,
  #agv3App.agv3-notifications-open .agv3-barry-compose {
    max-height: min(48vh, 330px);
  }

  #agv3App.agv3-notifications-open .agv3-thread-bar {
    min-height: 30px;
    padding: 3px 4px 6px;
    gap: 5px;
  }

  #agv3App.agv3-notifications-open .agv3-thread-bar-actions {
    gap: 3px;
  }

  #agv3App.agv3-notifications-open .agv3-thread-bar .agv3-notifications-text-btn {
    min-height: 22px;
    padding: 0 6px;
    font-size: 9px;
    line-height: 1.2;
  }

  #agv3App.agv3-notifications-open .agv3-barry-send-actions-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  #agv3App.agv3-notifications-open .agv3-barry-send-action {
    min-height: 34px;
    padding-inline: 3px;
    font-size: 10px;
  }
}

/* Stable map shell: the Leaflet viewport stays fixed while AGV3 chrome overlays it. */
#agv3App {
  --agv3-top-chrome-h: 58px;
  --agv3-map-control-top: calc(var(--agv3-top-chrome-h) + 8px + env(safe-area-inset-top, 0px));
  --agv3-map-control-bottom: calc(var(--agv3-bottom-stack-h) + 10px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

#agv3App .agv3-main {
  position: relative;
  z-index: calc(var(--agv3-z-map) + 1);
}

#agv3App .agv3-map-pane {
  position: fixed;
  inset: 0;
  z-index: var(--agv3-z-map);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

#agv3App #agMap {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

#agv3App .agv3-sidebar,
#agv3App .agv3-splitter {
  position: relative;
  z-index: calc(var(--agv3-z-map-overlay) + 20);
}

#agv3App .agv3-splitter {
  background: rgba(250, 252, 248, 0.62);
  box-shadow: 1px 0 0 rgba(41, 74, 43, 0.12), -1px 0 0 rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(12px);
}

@media (min-width: 1101px) {
  #agv3App:not(.agv3-header-collapsed) {
    padding-bottom: calc(var(--agv3-bottom-stack-h) - 10px);
  }

  #agv3App:not(.agv3-panel-collapsed):not(.agv3-map-focus):not(.agv3-draw-chrome-hidden):not(.is-map-hidden) .agv3-main::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: calc(-1 * var(--agv3-bottom-stack-h));
    width: calc(var(--agv3-sidebar-size) + var(--agv3-splitter-size));
    z-index: calc(var(--agv3-z-map-overlay) + 10);
    pointer-events: none;
    background:
      linear-gradient(90deg, transparent calc(100% - var(--agv3-splitter-size)), rgba(250, 252, 248, 0.62) calc(100% - var(--agv3-splitter-size))),
      linear-gradient(180deg, rgba(251, 252, 248, 0.88), rgba(244, 247, 241, 0.92));
    border-right: 1px solid rgba(41, 74, 43, 0.08);
  }
}

#agv3App .agv3-splitter::before {
  width: 5px;
  height: 68px;
  background: rgba(35, 74, 45, 0.42);
  box-shadow: 0 0 0 3px rgba(252, 253, 250, 0.76);
}

#agv3App .agv3-map-tools {
  top: var(--agv3-map-control-top);
  right: calc(8px + env(safe-area-inset-right, 0px));
}

#agv3App .agv3-map-quick-actions {
  left: calc(var(--agv3-sidebar-size) + var(--agv3-splitter-size) + 8px);
}

#agv3App.agv3-panel-collapsed .agv3-map-quick-actions,
#agv3App.agv3-map-focus .agv3-map-quick-actions,
#agv3App.agv3-create-launcher-mode .agv3-map-quick-actions,
#agv3App.agv3-compact-map-only .agv3-map-quick-actions {
  left: 8px;
}

#agv3App .agv3-map-pane .leaflet-bottom {
  margin-bottom: var(--agv3-map-control-bottom);
}

#agv3App .agv3-map-summary-shell {
  left: calc(var(--agv3-sidebar-size) + var(--agv3-splitter-size) + 14px);
  top: calc(var(--agv3-top-chrome-h) + 12px);
  max-width: calc(100vw - var(--agv3-sidebar-size) - var(--agv3-splitter-size) - 28px);
}

#agv3App.agv3-header-collapsed {
  --agv3-map-control-top: calc(8px + env(safe-area-inset-top, 0px));
  --agv3-map-control-bottom: calc(var(--agv3-toolbar-h) + 18px + env(safe-area-inset-bottom, 0px));
  --agv3-collapsed-toolbar-bottom: 10px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

#agv3App.agv3-header-collapsed .agv3-main {
  height: 100vh;
  height: 100dvh;
}

#agv3App.agv3-header-collapsed .agv3-topbar.slim-header,
#agv3App.agv3-header-collapsed .agv3-top-panels,
#agv3App.agv3-header-collapsed .agv3-bottom-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#agv3App.agv3-panel-collapsed .agv3-sidebar,
#agv3App.agv3-panel-collapsed .agv3-splitter,
#agv3App.agv3-map-focus .agv3-sidebar,
#agv3App.agv3-map-focus .agv3-splitter {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#agv3App.agv3-header-collapsed .agv3-topbar.slim-header {
  position: fixed;
  inset: 0 0 auto;
  transform: translateY(-100%);
}

#agv3App.agv3-header-collapsed .agv3-main {
  z-index: var(--agv3-z-map);
}

#agv3App.agv3-header-collapsed .agv3-sidebar {
  border-radius: 0 0 18px 0;
  padding-bottom: calc(var(--agv3-toolbar-h) + 28px + env(safe-area-inset-bottom, 0px));
}

#agv3App.agv3-header-collapsed .agv3-splitter {
  border-radius: 0 0 10px 0;
}

#agv3App.agv3-header-collapsed .agv3-map-pane {
  display: block;
}

#agv3App.agv3-header-collapsed .agv3-toolbar {
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: var(--agv3-z-toolbar);
  transform: none;
}

#agv3App.agv3-header-collapsed .agv3-window-label {
  max-width: min(120px, 24vw);
}

#agv3App.agv3-map-only-summary .agv3-map-summary-shell,
#agv3App.agv3-header-collapsed.agv3-panel-collapsed .agv3-map-summary-shell,
#agv3App.agv3-map-focus .agv3-map-summary-shell {
  left: 14px;
  top: 14px;
  max-width: calc(100vw - 28px);
}

#agv3App.agv3-map-only-summary:not(.agv3-header-collapsed) .agv3-map-summary-shell {
  top: calc(var(--agv3-top-chrome-h) + 12px);
}

@media (max-width: 1100px) {
  #agv3App .agv3-map-quick-actions {
    left: 8px;
  }

  #agv3App .agv3-map-summary-shell {
    left: 8px;
    top: calc(var(--agv3-top-chrome-h) + 8px);
    max-width: calc(100vw - 16px);
  }

  #agv3App.agv3-header-collapsed .agv3-map-summary-shell {
    top: 8px;
  }

  #agv3App.agv3-panel-collapsed .agv3-sidebar,
  #agv3App.agv3-map-focus .agv3-sidebar {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@media (max-width: 980px) {
  #agv3App {
    --agv3-top-chrome-h: 54px;
  }

  #agv3App.agv3-header-collapsed {
    --agv3-collapsed-toolbar-bottom: 8px;
  }

  #agv3App.agv3-header-collapsed .agv3-toolbar {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 640px) {
  #agv3App.agv3-header-collapsed .agv3-toolbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  #agv3App.agv3-header-collapsed .agv3-window-label {
    display: none;
  }
}

/* Compact panels should dock cleanly to the date rail instead of floating like cards. */
@media (max-width: 1100px) {
  #agv3App:not(.agv3-compact-map-only):not(.agv3-sheet-visible) .agv3-sidebar {
    padding-bottom: 0;
  }

  #agv3App.agv3-header-collapsed:not(.agv3-sheet-visible) .agv3-sidebar {
    border-radius: 0;
  }

  #agv3App:not(.agv3-compact-map-only):not(.agv3-sheet-visible) .agv3-section.is-active > .agv3-card,
  #agv3App:not(.agv3-compact-map-only):not(.agv3-sheet-visible) .agv3-fill-section > .agv3-card {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  #agv3App.agv3-sheet-visible .agv3-sheet-handle {
    border-radius: 999px;
  }

  #agv3App.agv3-sheet-visible .agv3-sheet-handle-bar {
    height: 5px;
    border-radius: 999px !important;
    overflow: hidden;
  }

  #agv3App.agv3-header-collapsed.agv3-sheet-visible .agv3-sidebar {
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  #agv3App.agv3-sheet-visible {
    --agv3-sheet-bottom-gap: max(0px, env(safe-area-inset-bottom, 0px));
    --agv3-sheet-top-gap: 0px;
  }

  #agv3App.agv3-header-collapsed.agv3-sheet-visible {
    --agv3-sheet-bottom-gap: calc(var(--agv3-toolbar-h) + var(--agv3-collapsed-toolbar-bottom, 8px) + env(safe-area-inset-bottom, 0px));
  }

  #agv3App.agv3-header-collapsed.agv3-sheet-visible.agv3-sheet-create:not(.agv3-paddock-has-draft),
  #agv3App.agv3-header-collapsed.agv3-sheet-visible.agv3-sheet-edit {
    --agv3-sheet-bottom-gap: max(0px, env(safe-area-inset-bottom, 0px));
  }

  #agv3App.agv3-sheet-visible.agv3-sheet-create.agv3-paddock-has-draft:not(.agv3-paddock-drawing):not(.agv3-header-collapsed) {
    --agv3-sheet-bottom-gap: calc(var(--agv3-bottom-stack-h) - 10px);
  }

  #agv3App.agv3-sheet-visible.agv3-sheet-create.agv3-paddock-has-draft:not(.agv3-paddock-drawing).agv3-header-collapsed {
    --agv3-sheet-bottom-gap: calc(var(--agv3-toolbar-h) + var(--agv3-collapsed-toolbar-bottom, 8px) + env(safe-area-inset-bottom, 0px));
  }

  #agv3App.agv3-sheet-visible .agv3-sidebar {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    bottom: var(--agv3-sheet-bottom-gap);
    height: min(var(--agv3-sheet-size), calc(100vh - var(--agv3-sheet-bottom-gap) - var(--agv3-sheet-top-gap)));
    height: min(var(--agv3-sheet-size), calc(100dvh - var(--agv3-sheet-bottom-gap) - var(--agv3-sheet-top-gap)));
    max-height: calc(100vh - var(--agv3-sheet-bottom-gap) - var(--agv3-sheet-top-gap));
    max-height: calc(100dvh - var(--agv3-sheet-bottom-gap) - var(--agv3-sheet-top-gap));
    overflow: hidden;
    padding-bottom: 0;
  }

  #agv3App.agv3-sheet-visible .agv3-section.is-active {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 0;
    scroll-padding-bottom: 0;
    -webkit-overflow-scrolling: touch;
  }

  #agv3App.agv3-sheet-visible .agv3-section.is-active > .agv3-card {
    min-height: auto;
    overflow: visible;
  }
}

.agv3-reporting-card {
  gap: 12px;
  padding-bottom: calc(34px + var(--agv3-bottom-nav-h, 72px) + env(safe-area-inset-bottom, 0px));
}

#agSection-reporting {
  scroll-padding-bottom: calc(42px + var(--agv3-bottom-nav-h, 72px) + env(safe-area-inset-bottom, 0px));
}

.agv3-reporting-disclosure,
.agv3-reporting-family,
.agv3-reporting-filter-panel {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.82);
}

.agv3-reporting-disclosure > summary,
.agv3-reporting-family-head,
.agv3-reporting-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}

.agv3-reporting-disclosure > summary::-webkit-details-marker,
.agv3-reporting-family-head::-webkit-details-marker,
.agv3-reporting-filter-head::-webkit-details-marker {
  display: none;
}

.agv3-reporting-disclosure > summary::after,
.agv3-reporting-family-head::after,
.agv3-reporting-filter-head::after {
  content: "+";
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #344054;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.agv3-reporting-disclosure[open] > summary::after,
.agv3-reporting-family[open] > .agv3-reporting-family-head::after,
.agv3-reporting-filter-panel[open] > .agv3-reporting-filter-head::after {
  content: "-";
}

.agv3-reporting-disclosure > summary span,
.agv3-reporting-family-head span,
.agv3-reporting-filter-head span {
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
}

.agv3-reporting-disclosure > summary small,
.agv3-reporting-family-head small,
.agv3-reporting-filter-head small {
  min-width: 0;
  color: var(--muted, #667085);
  font-size: 11px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-reporting-controls,
.agv3-reporting-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 0 10px 10px;
}

.agv3-reporting-custom-dates {
  display: contents;
}

.agv3-reporting-grid {
  display: grid;
  gap: 8px;
}

.agv3-reporting-family {
  overflow: hidden;
}

.agv3-reporting-family-head {
  text-transform: uppercase;
}

.agv3-reporting-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  padding: 0 8px 8px;
}

.agv3-report-card {
  display: grid;
  gap: 3px;
  min-height: 78px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.agv3-report-card:hover:not(.is-disabled),
.agv3-report-card.is-selected {
  border-color: rgba(16, 121, 84, 0.55);
  box-shadow: 0 0 0 2px rgba(16, 121, 84, 0.1);
}

.agv3-report-card.is-disabled {
  opacity: 0.56;
}

.agv3-report-card-title {
  font-weight: 800;
  line-height: 1.2;
}

.agv3-report-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.agv3-report-card-title-row .agv3-report-card-title {
  min-width: 0;
}

.agv3-report-info-btn {
  appearance: none;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  background: #f8fafc;
  color: #344054;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 22px;
  text-align: center;
}

.agv3-report-info-btn:hover,
.agv3-report-info-btn[aria-expanded="true"] {
  border-color: rgba(16, 121, 84, 0.45);
  background: rgba(16, 121, 84, 0.08);
  color: #176a4a;
}

.agv3-report-info-panel {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 9px;
  border: 1px solid rgba(16, 121, 84, 0.16);
  border-radius: 8px;
  background: rgba(240, 253, 244, 0.75);
  color: #344054;
  font-size: 11px;
  line-height: 1.35;
}

.agv3-report-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agv3-report-info-panel p,
.agv3-report-info-panel ul {
  margin: 0;
}

.agv3-report-info-panel ul {
  padding-left: 16px;
}

.agv3-report-info-close {
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
}

.agv3-report-info-meta {
  display: grid;
  gap: 4px;
  color: var(--muted, #667085);
}

.agv3-report-card-copy,
.agv3-report-card-meta {
  color: var(--muted, #667085);
  font-size: 11px;
  line-height: 1.35;
}

.agv3-report-card-copy {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.agv3-report-card-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 3px;
}

.agv3-report-link {
  appearance: none;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #176a4a;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.agv3-report-link:hover {
  color: #0f5138;
}

.agv3-report-card-btn {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
}

.agv3-reporting-recent-list {
  display: grid;
  gap: 6px;
  padding: 0 8px 8px;
}

.agv3-report-recent-row {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.agv3-report-recent-row:hover {
  border-color: rgba(16, 121, 84, 0.42);
}

.agv3-report-recent-row span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-report-recent-row small {
  color: var(--muted, #667085);
  font-size: 11px;
}

.agv3-reporting-actions {
  margin-top: 2px;
}

.agv3-reporting-preview {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.agv3-reporting-filter-panel {
  overflow: hidden;
}

.agv3-report-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.agv3-report-result-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.agv3-report-result-head small {
  color: var(--muted, #667085);
  font-size: 12px;
}

.agv3-report-view-toggle {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.86);
  overflow-x: auto;
}

.agv3-report-view-toggle .btn-ghost {
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.agv3-report-view-toggle .btn-ghost.is-active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.agv3-reporting-filter-grid select[multiple] {
  min-height: 96px;
}

.agv3-report-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.agv3-report-warning {
  padding: 10px;
  border: 1px solid rgba(180, 83, 9, 0.22);
  border-radius: 8px;
  background: rgba(255, 251, 235, 0.92);
  color: #8a4b12;
  font-size: 13px;
}

.agv3-report-chart {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
}

.agv3-report-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.agv3-report-chart-head span {
  font-size: 13px;
  font-weight: 800;
  text-transform: capitalize;
}

.agv3-report-chart-head small {
  color: var(--muted, #667085);
  font-size: 11px;
  text-align: right;
}

.agv3-report-chart-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(80px, 2fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.agv3-report-chart-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agv3-report-chart-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.agv3-report-chart-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(16, 121, 84, 0.72);
}

.agv3-report-chart-row b {
  min-width: 24px;
  text-align: right;
}

.agv3-report-table-wrap {
  min-width: 0;
  max-height: 420px;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
}

.agv3-report-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 12px;
}

.agv3-report-table th,
.agv3-report-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  vertical-align: top;
}

.agv3-report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #344054;
  font-weight: 800;
}

@media (max-width: 880px) {
  .agv3-reporting-controls,
  .agv3-reporting-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .agv3-reporting-controls,
  .agv3-reporting-filter-grid {
    grid-template-columns: 1fr;
  }

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