:root {
  --v2-primary: #466836;
  --v2-primary-dark: #2f4c25;
  --v2-primary-soft: #eef4ea;
  --v2-page: #f3f6f3;
  --v2-surface: #ffffff;
  --v2-border: #dfe5df;
  --v2-ink: #1f2b23;
  --v2-muted: #6d786f;
  --v2-sidebar-width: 252px;
  --v2-topbar-height: 72px;
  --tblr-primary: var(--v2-primary);
  --tblr-primary-rgb: 70, 104, 54;
}

body.v2-integrated {
  --v2-info-panel-width: min(
    470px,
    calc(100vw - var(--v2-sidebar-width) - 410px)
  );
  background: var(--v2-page);
  color: var(--v2-ink);
  font-family: "Segoe UI", "Noto Sans TC", system-ui, sans-serif;
  font-size: 16px;
}

body.v2-integrated button:focus-visible,
body.v2-integrated input:focus-visible,
body.v2-integrated select:focus-visible,
body.v2-integrated textarea:focus-visible {
  outline: 3px solid rgba(70, 104, 54, 0.24);
  outline-offset: 2px;
}

/* Authentication keeps the production IDs and behavior, with the V2 visual system. */
body.v2-integrated #login-page {
  padding: 24px;
  background:
    radial-gradient(circle at 12% 12%, rgba(99, 130, 70, 0.16), transparent 30%),
    radial-gradient(circle at 88% 86%, rgba(180, 139, 67, 0.11), transparent 28%),
    #eef2ed;
}

body.v2-integrated #login-page::before {
  opacity: 0.15;
}

body.v2-integrated .admin-login-card {
  width: min(480px, 100%);
  padding: 38px;
  border: 1px solid rgba(37, 61, 35, 0.12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(38, 56, 40, 0.15);
}

body.v2-integrated .admin-login-card::before {
  height: 4px;
  background: linear-gradient(90deg, var(--v2-primary), #91ab72, #b48b43);
}

body.v2-integrated .admin-login-logo-wrap {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border-radius: 15px;
  box-shadow: none;
}

body.v2-integrated .admin-login-brand span {
  color: var(--v2-primary);
  font-size: 11px;
}

body.v2-integrated .admin-login-brand h1 {
  color: var(--v2-ink);
  font-size: 27px;
}

body.v2-integrated .admin-login-brand p {
  color: var(--v2-muted);
  font-size: 14px;
}

body.v2-integrated .admin-login-form label > span,
body.v2-integrated .admin-login-field > label {
  color: #435047;
  font-size: 14px;
}

body.v2-integrated .admin-login-form input {
  min-height: 48px;
  border-color: var(--v2-border);
  background: #f8faf8;
  color: #27332b;
  font-size: 15px;
}

body.v2-integrated .admin-login-form input:focus {
  border-color: rgba(70, 104, 54, 0.5);
  box-shadow: 0 0 0 3px rgba(70, 104, 54, 0.1);
}

body.v2-integrated #admin-password-toggle {
  border-color: #dce3da;
  background: #eef3eb;
  color: var(--v2-primary-dark);
  font-size: 13px;
}

body.v2-integrated .admin-login-message {
  color: #758078;
  font-size: 13px;
}

body.v2-integrated #admin-login-submit {
  min-height: 48px;
  background: var(--v2-primary);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 11px 24px rgba(52, 83, 40, 0.2);
}

/* V2 application shell */
body.v2-integrated #canvas-container {
  background: var(--v2-page);
}

.v2-app-sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 70;
  width: var(--v2-sidebar-width);
  display: flex;
  flex-direction: column;
  border-right: 1px solid #d8dfd8;
  background: #fff;
  box-shadow: 8px 0 30px rgba(39, 58, 42, 0.04);
  transition: transform 0.22s ease;
}

.v2-sidebar-brand {
  min-height: var(--v2-topbar-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid #e4e8e4;
}

.v2-sidebar-brand img {
  width: 48px;
  height: 48px;
  display: block;
  border-radius: 13px;
  object-fit: cover;
}

.v2-sidebar-brand > div {
  display: grid;
}

.v2-sidebar-brand strong {
  color: #27332a;
  font-size: 20px;
}

.v2-sidebar-brand span {
  color: #8a958c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.v2-sidebar-nav {
  display: grid;
  gap: 5px;
  padding: 22px 14px;
}

.v2-sidebar-nav > p {
  margin: 0 10px 8px;
  color: #929c95;
  font-size: 12px;
  font-weight: 700;
}

.v2-sidebar-link {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #536057;
  font-size: 14px;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}

.v2-sidebar-link:hover {
  background: #f2f6f0;
  color: var(--v2-primary-dark);
}

.v2-sidebar-link.is-active {
  background: var(--v2-primary-soft);
  color: var(--v2-primary-dark);
  font-weight: 800;
}

.v2-sidebar-link img,
.v2-icon-button img {
  width: 20px;
  height: 20px;
  display: block;
  opacity: 0.72;
}

.v2-sidebar-link.is-active img {
  opacity: 1;
}

.v2-sidebar-overlay {
  display: none;
}

body.v2-integrated #top-bar {
  left: var(--v2-sidebar-width);
  width: auto;
  height: var(--v2-topbar-height);
  padding: 0 22px;
  border-bottom: 1px solid var(--v2-border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

body.v2-integrated #brand {
  display: none;
}

.v2-icon-button {
  width: 40px;
  height: 40px;
  display: none;
  place-items: center;
  padding: 0;
  border: 1px solid var(--v2-border);
  border-radius: 9px;
  background: #fff;
}

body.v2-integrated .top-view-control {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.v2-integrated .top-view-label {
  color: #707a72;
  font-size: 13px;
  font-weight: 700;
}

body.v2-integrated .top-view-control .view-select-wrap {
  width: 260px;
}

.v2-workspace-switch-status {
  position: fixed;
  top: calc(var(--v2-topbar-height) + 10px);
  left: calc(
    var(--v2-sidebar-width)
    + (100vw - var(--v2-sidebar-width)) / 2
  );
  z-index: 150;
  min-height: 38px;
  max-width: min(360px, calc(100vw - 32px));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid #cfddca;
  border-radius: 999px;
  background: rgba(250, 252, 249, 0.96);
  box-shadow: 0 10px 28px rgba(37, 54, 40, 0.14);
  color: #38522f;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  pointer-events: none;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.v2-workspace-switch-status[hidden] {
  display: none;
}

.v2-workspace-switch-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid #c7d9c0;
  border-top-color: var(--v2-primary);
  border-radius: 50%;
  animation: v2-workspace-switch-spin 0.75s linear infinite;
}

@keyframes v2-workspace-switch-spin {
  to {
    transform: rotate(360deg);
  }
}

body.v2-integrated.v2-workspace-switching
  :is(.v2-sidebar-link, #v2-sidebar-toggle, #zone-quick-trigger):disabled {
  cursor: wait;
  opacity: 0.62;
}

body.v2-integrated #view-selector.zone-quick-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

body.v2-integrated .zone-quick-selector {
  z-index: 4;
}

body.v2-integrated .zone-quick-trigger {
  width: 100%;
  min-height: 43px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 8px;
  padding: 6px 7px 6px 12px;
  border: 1px solid #d7ded7;
  border-radius: 10px;
  background: #fff;
  color: #354239;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

body.v2-integrated .zone-quick-trigger:hover,
body.v2-integrated .zone-quick-trigger[aria-expanded="true"] {
  border-color: #b9cbb3;
  background: #fbfcfb;
}

body.v2-integrated .zone-quick-trigger:focus-visible {
  outline: 0;
  border-color: var(--v2-primary);
  box-shadow: 0 0 0 3px rgba(70, 104, 54, 0.14);
}

body.v2-integrated .zone-quick-trigger-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
}

body.v2-integrated .zone-quick-trigger-copy small {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  color: #7b867d;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.v2-integrated .zone-quick-trigger-copy small::before {
  width: 1px;
  height: 18px;
  flex: 0 0 1px;
  background: #d8e0d7;
  content: "";
}

body.v2-integrated
  .zone-quick-trigger.is-overview
  .zone-quick-trigger-copy small {
  display: none;
}

body.v2-integrated .zone-quick-trigger-copy strong {
  flex: 0 1 auto;
  overflow: hidden;
  color: #2f3d33;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.v2-integrated .zone-quick-trigger-status {
  max-width: 76px;
  padding: 3px 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3ea;
  color: #4d7046;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.v2-integrated .zone-quick-trigger-status.is-empty {
  background: #f1f3f1;
  color: #758078;
}

body.v2-integrated .zone-quick-trigger-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #d4e1cf;
  border-radius: 8px;
  background: #edf4e9;
  color: var(--v2-primary);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

body.v2-integrated .zone-quick-trigger-arrow::before {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg) translate(-1px, -1px);
}

body.v2-integrated .zone-quick-trigger:hover .zone-quick-trigger-arrow,
body.v2-integrated
  .zone-quick-trigger[aria-expanded="true"]
  .zone-quick-trigger-arrow {
  border-color: #afc7a6;
  background: #e2eedc;
}

body.v2-integrated
  .zone-quick-trigger[aria-expanded="true"]
  .zone-quick-trigger-arrow {
  transform: rotate(180deg);
}

body.v2-integrated .zone-quick-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(360px, calc(100vw - 24px));
  max-height: min(440px, calc(100vh - 96px));
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid #dce4da;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(34, 49, 38, 0.18);
}

body.v2-integrated .zone-quick-menu[hidden] {
  display: none;
}

body.v2-integrated .zone-quick-menu-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 10px;
}

body.v2-integrated .zone-quick-menu-head strong {
  color: #2d3b31;
  font-size: 14px;
  font-weight: 850;
}

body.v2-integrated .zone-quick-menu-head span {
  color: #828d84;
  font-size: 11px;
}

body.v2-integrated .zone-quick-search {
  min-height: 40px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #dce3dc;
  border-radius: 9px;
  background: #f8faf7;
}

body.v2-integrated .zone-quick-search:focus-within {
  border-color: #abc3a2;
  box-shadow: 0 0 0 3px rgba(70, 104, 54, 0.1);
}

body.v2-integrated .zone-quick-search img {
  width: 17px;
  height: 17px;
  opacity: 0.58;
}

body.v2-integrated .zone-quick-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #354239;
  font: inherit;
  font-size: 13px;
}

body.v2-integrated .zone-quick-search input::placeholder {
  color: #929b94;
}

body.v2-integrated .zone-quick-list {
  min-height: 0;
  display: grid;
  gap: 4px;
  margin-top: 9px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.v2-integrated .zone-quick-option {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #3c4940;
  text-align: left;
  cursor: pointer;
}

body.v2-integrated .zone-quick-option:hover,
body.v2-integrated .zone-quick-option:focus-visible {
  outline: 0;
  border-color: #d9e4d5;
  background: #f4f8f2;
}

body.v2-integrated .zone-quick-option[aria-selected="true"] {
  border-color: #c9dbc3;
  background: #eaf2e6;
  color: #34542e;
}

body.v2-integrated .zone-quick-option-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef2ed;
  color: transparent;
  font-size: 12px;
  font-weight: 900;
}

body.v2-integrated
  .zone-quick-option[aria-selected="true"]
  .zone-quick-option-check {
  background: var(--v2-primary);
  color: #fff;
}

body.v2-integrated .zone-quick-option-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body.v2-integrated .zone-quick-option-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.v2-integrated .zone-quick-option-copy small {
  overflow: hidden;
  color: #7b867e;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.v2-integrated .zone-quick-option-status {
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf3ea;
  color: #52704b;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

body.v2-integrated .zone-quick-option-status.is-empty {
  background: #f0f2f0;
  color: #788179;
}

body.v2-integrated .zone-quick-empty {
  margin: 10px 0 0;
  padding: 20px 12px;
  border-radius: 9px;
  background: #f7f9f7;
  color: #768178;
  font-size: 12px;
  text-align: center;
}

body.v2-integrated .zone-quick-empty[hidden] {
  display: none;
}

@media (min-width: 901px) and (max-width: 1400px) {
  body.v2-integrated .top-view-control .view-select-wrap {
    width: 230px;
  }

  body.v2-integrated .zone-quick-trigger-status {
    display: none;
  }
}

@media (max-width: 600px) {
  body.v2-integrated .zone-quick-trigger {
    min-height: 40px;
    grid-template-columns: minmax(0, 1fr) 28px;
    padding: 5px 6px 5px 10px;
  }

  body.v2-integrated .zone-quick-trigger-status {
    display: none;
  }

  body.v2-integrated .zone-quick-trigger-copy {
    gap: 7px;
  }

  body.v2-integrated .zone-quick-trigger-copy strong {
    font-size: 14px;
  }

  body.v2-integrated .zone-quick-trigger-copy small {
    gap: 7px;
    font-size: 13px;
  }

  body.v2-integrated .zone-quick-trigger-copy small::before {
    height: 15px;
  }

  body.v2-integrated .zone-quick-trigger-arrow {
    width: 28px;
    height: 28px;
  }

  body.v2-integrated .zone-quick-menu {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: min(70vh, 520px);
    border-radius: 16px;
  }
}

body.v2-integrated #top-status {
  gap: 9px;
}

body.v2-integrated .nav-chip,
body.v2-integrated .admin-account-chip {
  height: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #dfe5df;
  border-radius: 999px;
  background: #f7f9f7;
  color: #727d74;
  font-size: 12px;
}

body.v2-integrated .nav-chip strong,
body.v2-integrated .admin-account-chip strong {
  color: #344139;
  font-size: 14px;
}

body.v2-integrated .v2-status-label {
  max-width: none;
}

body.v2-integrated #system-status-chip {
  border-color: #dbe6d8;
  background: #f4f8f2;
}

body.v2-integrated #admin-logout-button {
  min-height: 36px;
  border-color: #e3d8d2;
  border-radius: 9px;
  background: #fff;
  color: #9b5a45;
  font-size: 12px;
}

/* The original Three.js canvas remains untouched; only its containing layout changes. */
body.v2-integrated #c {
  position: absolute;
  top: var(--v2-topbar-height);
  left: var(--v2-sidebar-width);
  width: calc(100vw - var(--v2-sidebar-width)) !important;
  height: calc(100vh - var(--v2-topbar-height)) !important;
}

body.v2-integrated.farm-overview-mode #c {
  top: 88px;
  left: calc(var(--v2-sidebar-width) + 16px);
  width: calc(38vw - 24px) !important;
  height: calc(100vh - 104px) !important;
  border-color: #d7dfd5;
  border-radius: 12px;
  background: #111912;
  box-shadow: 0 10px 28px rgba(39, 57, 42, 0.08);
}

body.v2-integrated #left-sidebar {
  top: 88px;
  bottom: 16px;
  left: calc(var(--v2-sidebar-width) + 16px);
  width: 350px;
}

/* Zone management keeps the Three.js workspace clear; farm metrics stay in overview. */
body.v2-integrated:not(.farm-overview-mode) #left-sidebar {
  transform: translateX(calc(-100% - 24px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.v2-integrated #deer-form-zone-preview {
  top: 88px;
  left: calc(var(--v2-sidebar-width) + 16px);
  min-width: 0;
  gap: 9px;
  padding: 9px 12px;
  border-color: rgba(194, 215, 184, 0.26);
  border-radius: 10px;
  background: rgba(24, 34, 26, 0.86);
  box-shadow: 0 8px 22px rgba(18, 28, 20, 0.2);
  backdrop-filter: blur(10px);
}

body.v2-integrated #deer-form-zone-preview span {
  color: rgba(228, 237, 224, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

body.v2-integrated #deer-form-zone-preview strong {
  color: #f3f7f1;
  font-size: 14px;
}

body.v2-integrated #sensor-dashboard {
  padding: 18px;
  border: 1px solid var(--v2-border);
  border-radius: 12px;
  background: #fff;
  color: var(--v2-ink);
  box-shadow: 0 9px 26px rgba(38, 55, 41, 0.06);
  backdrop-filter: none;
}

body.v2-integrated .sensor-board-head {
  border-bottom-color: #e7ebe7;
}

body.v2-integrated .sensor-board-title {
  color: #2b372e;
  font-size: 20px;
}

body.v2-integrated .sensor-reading-time { color: #68736a; }

body.v2-integrated .v2-overview-metric-card[data-status="unknown"] .v2-overview-status-pill {
  border-color: #d8ded8;
  background: #f4f6f4;
  color: #68736a;
}

body.v2-integrated .sensor-mini-card,
body.v2-integrated .sensor-trend-card {
  border-color: #e3e8e3;
  background: #f8faf8;
}

body.v2-integrated .sensor-mini-name,
body.v2-integrated .sensor-trend-title {
  color: #6f7971;
  font-size: 12px;
}

body.v2-integrated .sensor-mini-val,
body.v2-integrated .sensor-trend-title strong {
  color: #2f3b32;
}

body.v2-integrated .sensor-mini-unit {
  color: #778179;
}

body.v2-integrated #info-panel {
  top: 88px;
  right: 16px;
  bottom: 16px;
  width: var(--v2-info-panel-width);
  border: 1px solid var(--v2-border);
  border-radius: 12px;
  background: #fff;
  color: var(--v2-ink);
  box-shadow: 0 10px 28px rgba(39, 57, 42, 0.07);
  backdrop-filter: none;
  opacity: 1;
  visibility: visible;
  transition:
    transform 0.28s cubic-bezier(0.22, 0.72, 0.28, 1),
    opacity 0.12s ease,
  visibility 0s linear;
}

body.v2-integrated.zone-management-mode #info-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: none;
}

body.v2-integrated.deer-profile-workspace-mode {
  --v2-info-panel-width: clamp(560px, 48vw, 820px);
}

body.v2-integrated.deer-profile-workspace-mode #info-panel {
  top: 88px;
  right: 16px;
  bottom: 16px;
  left: auto;
  width: var(--v2-info-panel-width);
  height: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

body.v2-integrated.deer-measurement-workspace-mode {
  --v2-info-panel-width: clamp(560px, 48vw, 820px);
}

body.v2-integrated.deer-measurement-workspace-mode #info-panel {
  top: 88px;
  right: 16px;
  bottom: 16px;
  left: auto;
  width: var(--v2-info-panel-width);
  height: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

body.v2-integrated.deer-measurement-workspace-mode #panel-header {
  padding-left: 25px;
}

body.v2-integrated.deer-measurement-workspace-mode #panel-content {
  overflow-y: auto;
}

body.v2-integrated.deer-measurement-workspace-mode .panel-heading-tools {
  display: none;
}

body.v2-integrated.deer-measurement-workspace-mode #add-deer-measurement-button {
  border-color: #3f5e31;
  background: var(--v2-primary);
  color: #fff;
}

body.v2-integrated.deer-antler-workspace-mode {
  --v2-info-panel-width: clamp(620px, 52vw, 900px);
}

body.v2-integrated.deer-antler-workspace-mode #info-panel {
  top: 88px;
  right: 16px;
  bottom: 16px;
  left: auto;
  width: var(--v2-info-panel-width);
  height: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

body.v2-integrated.deer-antler-workspace-mode #panel-header {
  padding-left: 25px;
}

body.v2-integrated.deer-antler-workspace-mode #panel-content {
  overflow-y: auto;
}

body.v2-integrated.deer-antler-workspace-mode .panel-heading-tools {
  display: none;
}

body.v2-integrated #antler-workspace-tabs {
  display: none;
}

body.v2-integrated.deer-antler-workspace-mode .panel-header-actions {
  display: block;
}

body.v2-integrated.deer-antler-workspace-mode .panel-write-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.v2-integrated.deer-antler-workspace-mode #antler-workspace-tabs:not([hidden]) {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

body.v2-integrated.deer-antler-workspace-mode #add-deer-antler-record-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 120px;
  padding-inline: 16px;
  border-color: #3f5e31;
  background: var(--v2-primary);
  color: #fff;
}

body.v2-integrated.deer-profile-workspace-mode #panel-header {
  padding-left: 25px;
}

body.v2-integrated.deer-profile-workspace-mode #panel-content {
  overflow-y: auto;
}

body.v2-integrated.deer-profile-workspace-mode .panel-heading-tools,
body.v2-integrated.deer-profile-workspace-mode .panel-header-actions {
  display: none;
}

/* Disease management keeps the read-first workspace aligned with profile and measurement. */
body.v2-integrated.deer-disease-workspace-mode {
  --v2-info-panel-width: clamp(560px, 48vw, 820px);
}

body.v2-integrated.deer-disease-workspace-mode #info-panel {
  top: 88px;
  right: 16px;
  bottom: 16px;
  left: auto;
  width: var(--v2-info-panel-width);
  height: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

body.v2-integrated.deer-disease-workspace-mode #panel-header {
  padding-left: 25px;
}

body.v2-integrated.deer-disease-workspace-mode #panel-content {
  overflow-y: auto;
}

body.v2-integrated.deer-disease-workspace-mode .panel-heading-tools,
body.v2-integrated.deer-disease-workspace-mode .panel-header-actions {
  display: none;
}

body.v2-integrated .disease-management-view {
  display: grid;
  gap: 18px;
  color: var(--v2-ink);
}

body.v2-integrated .disease-management-view.is-refreshing {
  opacity: 0.72;
  pointer-events: none;
}

body.v2-integrated .disease-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.v2-integrated .disease-summary-card {
  min-width: 0;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dfe5df;
  border-radius: 12px;
  background: #f8faf8;
}

body.v2-integrated .disease-summary-card > span:first-child,
body.v2-integrated .disease-record-summary > span,
body.v2-integrated .disease-record-head > div > span {
  color: #748078;
  font-size: 13px;
  font-weight: 700;
}

body.v2-integrated .disease-summary-card strong {
  color: #253128;
  font-size: 24px;
  line-height: 1.2;
}

body.v2-integrated .disease-summary-card small {
  color: #78827b;
  font-size: 12px;
  line-height: 1.45;
}

body.v2-integrated .disease-summary-primary {
  border-color: #cbd9c6;
  background: #f2f7ef;
}

body.v2-integrated .disease-status-badge {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #d4ddd4;
  border-radius: 999px;
  background: #f0f3f0;
  color: #5f6c62;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

body.v2-integrated .disease-status-badge.is-treating {
  border-color: #e2c2bd;
  background: #f9efed;
  color: #963e36;
}

body.v2-integrated .disease-status-badge.is-follow-up {
  border-color: #e7d1ac;
  background: #fbf4e8;
  color: #805522;
}

body.v2-integrated .disease-status-badge.is-recovered,
body.v2-integrated .disease-status-badge.is-clear {
  border-color: #bfd2b8;
  background: #edf5e9;
  color: #3f6237;
}

body.v2-integrated .disease-status-badge.is-stopped,
body.v2-integrated .disease-status-badge.is-neutral {
  border-color: #d6ddd6;
  background: #f0f3f0;
  color: #5f6c62;
}

body.v2-integrated .disease-history-section {
  padding: 18px;
  border: 1px solid #dfe5df;
  border-radius: 12px;
  background: #fff;
}

body.v2-integrated .disease-history-head h3 {
  margin: 0;
  color: #2b372e;
  font-size: 19px;
}

body.v2-integrated .disease-history-head p {
  margin: 5px 0 0;
  color: #707b73;
  font-size: 13px;
  line-height: 1.55;
}

body.v2-integrated .disease-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

body.v2-integrated .disease-primary-button,
body.v2-integrated .disease-secondary-button,
body.v2-integrated .disease-danger-button {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

body.v2-integrated .disease-primary-button {
  border-color: #456b37;
  background: #456b37;
  color: #fff;
}

body.v2-integrated .disease-primary-button:hover:not(:disabled) {
  border-color: #36572b;
  background: #36572b;
}

body.v2-integrated .disease-secondary-button {
  border-color: #d2dad2;
  background: #f6f8f6;
  color: #536057;
}

body.v2-integrated .disease-secondary-button:hover:not(:disabled) {
  border-color: #b8c6b8;
  background: #edf2ed;
}

body.v2-integrated .disease-danger-button {
  border-color: #a8433b;
  background: #a8433b;
  color: #fff;
}

body.v2-integrated .disease-danger-button:hover:not(:disabled) {
  border-color: #8d342e;
  background: #923831;
}

body.v2-integrated :is(
  .disease-primary-button,
  .disease-secondary-button,
  .disease-danger-button
):disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

body.v2-integrated .disease-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.25fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 16px;
  padding: 13px;
  border-radius: 10px;
  background: #f5f8f4;
}

body.v2-integrated .disease-toolbar label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

body.v2-integrated .disease-toolbar label > span {
  color: #5e6a61;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .disease-toolbar select,
body.v2-integrated .disease-refresh-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d5ded4;
  border-radius: 8px;
  background: #fff;
  color: #354139;
  font-size: 13px;
}

body.v2-integrated .disease-toolbar select {
  padding: 7px 32px 7px 10px;
}

body.v2-integrated .disease-refresh-button {
  width: auto;
  padding: 8px 13px;
  color: #3f6237;
  font-weight: 800;
}

body.v2-integrated .disease-refresh-button:hover {
  border-color: #aec2a6;
  background: #edf4e9;
}

body.v2-integrated .disease-result-count {
  grid-column: 1 / -1;
  color: #768078;
  font-size: 12px;
}

body.v2-integrated .disease-record-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

body.v2-integrated .disease-record-card {
  padding: 16px;
  border: 1px solid #dfe5df;
  border-radius: 12px;
  background: #fbfcfb;
}

body.v2-integrated .disease-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.v2-integrated .disease-record-head h4 {
  margin: 4px 0 0;
  color: #253128;
  font-size: 18px;
  line-height: 1.35;
}

body.v2-integrated .disease-record-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

body.v2-integrated .disease-record-dates > div {
  padding: 10px 12px;
  border: 1px solid #e3e8e2;
  border-radius: 9px;
  background: #fff;
}

body.v2-integrated .disease-record-dates dt,
body.v2-integrated .disease-record-details dt {
  color: #7a857d;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .disease-record-dates dd {
  margin: 4px 0 0;
  color: #344038;
  font-size: 14px;
  font-weight: 750;
}

body.v2-integrated .disease-record-summary {
  margin-top: 12px;
}

body.v2-integrated .disease-record-summary p {
  margin: 4px 0 0;
  color: #4e5b52;
  font-size: 14px;
  line-height: 1.6;
}

body.v2-integrated .disease-record-summary p.is-empty {
  color: #89928b;
}

body.v2-integrated .disease-record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #e8ece8;
}

body.v2-integrated .disease-record-actions button,
body.v2-integrated .disease-error-state button,
body.v2-integrated .disease-pagination button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #b7c9b0;
  border-radius: 8px;
  background: #f1f6ee;
  color: #3f6237;
  font-size: 13px;
  font-weight: 800;
}

body.v2-integrated .disease-record-actions button:hover,
body.v2-integrated .disease-error-state button:hover,
body.v2-integrated .disease-pagination button:hover:not(:disabled) {
  border-color: #8da77f;
  background: #e7f0e3;
}

body.v2-integrated .disease-record-actions .disease-record-edit-button {
  border-color: #b9ccb2;
  background: #e7f0e3;
  color: #35552c;
}

body.v2-integrated .disease-record-details {
  margin-top: 12px;
  padding: 14px;
  border-radius: 10px;
  background: #f2f6f0;
}

body.v2-integrated .disease-record-details[hidden] {
  display: none;
}

body.v2-integrated .disease-record-details dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

body.v2-integrated .disease-record-details dd {
  margin: 4px 0 0;
  color: #425047;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body.v2-integrated .disease-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

body.v2-integrated .disease-pagination span {
  color: #68736b;
  font-size: 13px;
}

body.v2-integrated .disease-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.v2-integrated .disease-loading-state,
body.v2-integrated .disease-error-state,
body.v2-integrated .disease-empty-state {
  min-height: 220px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 9px;
  padding: 28px 20px;
  border: 1px solid #dfe5df;
  border-radius: 12px;
  background: #f8faf8;
  text-align: center;
}

body.v2-integrated .disease-loading-state strong,
body.v2-integrated .disease-error-state strong,
body.v2-integrated .disease-empty-state strong {
  color: #2d3930;
  font-size: 17px;
}

body.v2-integrated .disease-error-state p,
body.v2-integrated .disease-empty-state p {
  margin: 0;
  color: #6d786f;
  font-size: 14px;
  line-height: 1.6;
}

body.v2-integrated .disease-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #d7e2d3;
  border-top-color: var(--v2-primary);
  border-radius: 50%;
  animation: disease-loading-spin 0.75s linear infinite;
}

body.v2-integrated .disease-inline-error {
  padding: 10px 12px;
  border: 1px solid #e2c2bd;
  border-radius: 9px;
  background: #f9efed;
  color: #963e36;
  font-size: 13px;
}

body.v2-integrated :is(
  .disease-primary-button,
  .disease-secondary-button,
  .disease-danger-button,
  .disease-record-actions button
):focus-visible {
  outline: 3px solid rgba(71, 107, 56, 0.22);
  outline-offset: 2px;
}

@keyframes disease-loading-spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 901px) and (max-width: 1400px) {
  body.v2-integrated.deer-disease-workspace-mode {
    --v2-info-panel-width: clamp(520px, 52vw, 680px);
  }
}

@media (max-width: 900px) {
  body.v2-integrated.deer-disease-workspace-mode #info-panel {
    left: 10px;
    width: auto;
  }

  body.v2-integrated.deer-disease-workspace-mode #zone-context-labels {
    display: none;
  }
}

@media (max-width: 760px) {
  body.v2-integrated.deer-disease-workspace-mode #info-panel {
    top: 76px;
    right: 10px;
    bottom: 10px;
  }

  body.v2-integrated .disease-summary-grid,
  body.v2-integrated .disease-toolbar,
  body.v2-integrated .disease-record-dates {
    grid-template-columns: 1fr;
  }

  body.v2-integrated .disease-summary-card {
    min-height: 108px;
  }

  body.v2-integrated .disease-refresh-button {
    width: 100%;
  }

}

@media (max-width: 560px) {
  body.v2-integrated .disease-history-head {
    align-items: stretch;
    flex-direction: column;
  }

  body.v2-integrated .disease-history-head .disease-primary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.v2-integrated .disease-loading-spinner {
    animation: none;
  }
}

body.v2-integrated .deer-profile-view-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}

body.v2-integrated .deer-profile-view-actions[hidden] {
  display: none;
}

body.v2-integrated .deer-profile-view-actions button {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

body.v2-integrated .deer-profile-view-edit {
  border: 1px solid #bfd0b8;
  background: var(--v2-primary);
  color: #fff;
}

body.v2-integrated .deer-profile-view-archive {
  border: 1px solid #dfc5bd;
  background: #fff5f2;
  color: #9a493e;
}

body.v2-integrated .deer-profile-view-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

body.v2-integrated .measurement-view {
  display: grid;
  gap: 20px;
}

body.v2-integrated .measurement-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.v2-integrated .measurement-summary-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #dfe5df;
  border-radius: 12px;
  background: #f8faf8;
}

body.v2-integrated .measurement-summary-card > span {
  display: block;
  color: #667269;
  font-size: 14px;
  font-weight: 700;
}

body.v2-integrated .measurement-summary-card > strong {
  display: block;
  margin-top: 8px;
  color: #263229;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.15;
}

body.v2-integrated .measurement-summary-card > small {
  display: block;
  min-height: 34px;
  margin-top: 8px;
  color: #737f76;
  font-size: 13px;
  line-height: 1.4;
}

body.v2-integrated .measurement-change,
body.v2-integrated .measurement-latest-time {
  margin-top: 10px;
  color: #526057;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

body.v2-integrated .measurement-change.is-increase {
  color: #3f6838;
}

body.v2-integrated .measurement-change.is-decrease {
  color: #805522;
}

body.v2-integrated .measurement-history-section {
  overflow: hidden;
  border: 1px solid #dfe5df;
  border-radius: 12px;
  background: #fff;
}

body.v2-integrated .measurement-history-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e6ebe6;
}

body.v2-integrated .measurement-history-section-head h3 {
  margin: 0;
  color: #2b372e;
  font-size: 18px;
}

body.v2-integrated .measurement-history-section-head p {
  margin: 5px 0 0;
  color: #6b776e;
  font-size: 14px;
  line-height: 1.5;
}

body.v2-integrated .measurement-history-section-head > span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf2ec;
  color: #58665b;
  font-size: 12px;
  font-weight: 800;
}

body.v2-integrated .measurement-view-history {
  display: grid;
  gap: 10px;
  padding: 14px;
}

body.v2-integrated .measurement-record-card {
  padding: 16px;
  border: 1px solid #e1e7e1;
  border-radius: 10px;
  background: #f8faf8;
}

body.v2-integrated .measurement-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.v2-integrated .measurement-record-head time {
  color: #344138;
  font-size: 15px;
  font-weight: 800;
}

body.v2-integrated .measurement-record-head > span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f1e4;
  color: #45643d;
  font-size: 12px;
  font-weight: 800;
}

body.v2-integrated .measurement-record-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}

body.v2-integrated .measurement-record-values > div {
  padding: 11px 12px;
  border-radius: 9px;
  background: #fff;
}

body.v2-integrated .measurement-record-values span,
body.v2-integrated .measurement-record-notes > span {
  display: block;
  color: #738077;
  font-size: 13px;
  font-weight: 700;
}

body.v2-integrated .measurement-record-values strong {
  display: block;
  margin-top: 4px;
  color: #263229;
  font-size: 18px;
}

body.v2-integrated .measurement-record-notes {
  margin-top: 12px;
  padding: 11px 12px;
  border-left: 3px solid #9bb190;
  border-radius: 0 8px 8px 0;
  background: #f1f6ee;
}

body.v2-integrated .measurement-record-notes p {
  margin: 5px 0 0;
  color: #4f5c53;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

body.v2-integrated .measurement-record-notes.is-empty {
  border-left-color: #d7ddd7;
  background: #f5f7f5;
}

body.v2-integrated .measurement-record-notes.is-empty p {
  color: #7a857d;
}

body.v2-integrated .measurement-view-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
}

body.v2-integrated .measurement-view-empty strong {
  color: #2d3930;
  font-size: 18px;
}

body.v2-integrated .measurement-view-empty p {
  max-width: 420px;
  margin: 0;
  color: #6d786f;
  font-size: 14px;
  line-height: 1.6;
}

body.v2-integrated .measurement-view-empty-zone {
  min-height: 220px;
  align-content: center;
  border: 1px dashed #cfd8cf;
  border-radius: 12px;
  background: #f8faf8;
}

body.v2-integrated .antler-workspace-view {
  display: grid;
  gap: 20px;
}

body.v2-integrated .antler-workspace-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dfe5df;
  border-radius: 11px;
  background: #f3f6f2;
}

body.v2-integrated .antler-workspace-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #667169;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

body.v2-integrated .antler-workspace-tabs button:hover {
  background: #e9efe6;
  color: #3f6237;
}

body.v2-integrated .antler-workspace-tabs button.is-active {
  border-color: #cad8c5;
  background: #fff;
  color: #3f6237;
  box-shadow: 0 1px 3px rgba(38, 50, 41, 0.08);
}

body.v2-integrated .antler-workspace-tabs button span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e7efe3;
  color: #4f7047;
  font-size: 12px;
}

body.v2-integrated .antler-workspace-header-tabs {
  padding: 3px;
  border-radius: 9px;
}

body.v2-integrated .antler-workspace-header-tabs button {
  flex: 1 1 0;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
  white-space: nowrap;
}

body.v2-integrated .antler-workspace-tab-content {
  display: grid;
  gap: 20px;
}

body.v2-integrated .antler-growth-core {
  margin: 0;
  padding: 20px;
  overflow: visible;
  border: 1px solid #dfe5df;
  border-radius: 12px;
  background: #fff;
  color: #263229;
  box-shadow: none;
}

body.v2-integrated .antler-growth-core::before {
  display: none;
}

body.v2-integrated .antler-core-head {
  align-items: center;
  margin-bottom: 16px;
}

body.v2-integrated .antler-core-head h3,
body.v2-integrated .antler-growth-core > h3 {
  color: #263229;
  font-size: 20px;
}

body.v2-integrated .antler-core-head p {
  margin: 5px 0 0;
  color: #6b776e;
  font-size: 14px;
  line-height: 1.5;
}

body.v2-integrated .antler-progress-status {
  min-height: 30px;
  padding: 5px 10px;
  border-color: #c7d8c1;
  background: #edf5ea;
  color: #3f6838;
  font-size: 12px;
}

body.v2-integrated .antler-growth-core[data-status="REVIEW_DUE"],
body.v2-integrated .antler-growth-core[data-status="OVERDUE"] {
  background: #fff;
}

body.v2-integrated .antler-growth-core[data-status="REVIEW_DUE"] {
  border-color: #e4d0ab;
}

body.v2-integrated .antler-growth-core[data-status="REVIEW_DUE"] .antler-progress-status {
  border-color: #e2cfad;
  background: #fbf4e8;
  color: #805522;
}

body.v2-integrated .antler-growth-core[data-status="OVERDUE"] {
  border-color: #e2c1bb;
}

body.v2-integrated .antler-growth-core[data-status="OVERDUE"] .antler-progress-status {
  border-color: #dfc1bc;
  background: #fbefed;
  color: #93463d;
}

body.v2-integrated .antler-growth-core[data-status="COMPLETED"] .antler-progress-status {
  border-color: #c7d8c1;
  background: #edf5ea;
  color: #3f6838;
}

body.v2-integrated .antler-stage-hero {
  grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e0e6e0;
  border-radius: 10px;
  background: #f8faf8;
}

body.v2-integrated .antler-stage-hero > div {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 94px;
  padding: 16px;
  border-left: 1px solid #e2e7e2;
}

body.v2-integrated .antler-stage-hero > div:first-child {
  border-left: 0;
}

body.v2-integrated .antler-stage-hero span {
  color: #6f7b72;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

body.v2-integrated .antler-stage-hero strong {
  color: #2d3930;
  font-size: 17px;
  line-height: 1.25;
}

body.v2-integrated .antler-stage-hero .antler-stage-current {
  background: #f0f6ed;
}

body.v2-integrated .antler-stage-hero .antler-stage-current strong {
  color: #3f6237;
  font-size: 28px;
}

body.v2-integrated .antler-stage-flow {
  gap: 10px;
  margin: 20px 0 16px;
}

body.v2-integrated .antler-stage-flow::before {
  top: 18px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: #dfe6dc;
}

body.v2-integrated .antler-stage-step {
  gap: 9px;
  color: #7b867e;
  font-size: 13px;
  text-align: center;
}

body.v2-integrated .antler-stage-step > div {
  display: grid;
  justify-items: center;
  gap: 3px;
}

body.v2-integrated .antler-stage-node {
  width: 36px;
  height: 36px;
  border-color: #d6ded6;
  background: #fff;
  color: #7b867e;
  font-size: 12px;
}

body.v2-integrated .antler-stage-step strong {
  color: #5b675e;
  font-size: 14px;
}

body.v2-integrated .antler-stage-state {
  color: #7b867e;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .antler-stage-date {
  min-height: 17px;
  color: #8a948d;
  font-size: 12px;
}

body.v2-integrated .antler-stage-step.is-complete {
  color: #4f7047;
}

body.v2-integrated .antler-stage-step.is-complete .antler-stage-node {
  border-color: #abc29f;
  background: #e8f1e4;
  color: #3f6838;
}

body.v2-integrated .antler-stage-step.is-complete :is(strong, .antler-stage-state, .antler-stage-date) {
  color: #4f7047;
}

body.v2-integrated .antler-stage-step.is-current {
  color: #805522;
}

body.v2-integrated .antler-stage-step.is-current .antler-stage-node {
  border-color: #d9b873;
  background: #fbf1de;
  color: #805522;
  box-shadow: 0 0 0 4px rgba(194, 143, 54, 0.1);
}

body.v2-integrated .antler-stage-step.is-current :is(strong, .antler-stage-state, .antler-stage-date) {
  color: #805522;
}

body.v2-integrated .antler-estimate-row {
  gap: 8px;
  margin-bottom: 14px;
  color: #4f5c53;
  font-size: 13px;
  text-align: left;
}

body.v2-integrated .antler-estimate-row span {
  padding: 11px 12px;
  border: 1px solid #e3e8e3;
  border-radius: 9px;
  background: #f8faf8;
}

body.v2-integrated .antler-estimate-row small {
  margin-bottom: 4px;
  color: #78837b;
  font-size: 12px;
  letter-spacing: 0;
}

body.v2-integrated .antler-progress-message {
  padding: 12px 14px;
  border-left-color: #8da77f;
  background: #f2f6f0;
  color: #536057;
  font-size: 14px;
  line-height: 1.6;
}

body.v2-integrated .antler-core-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 15px;
}

body.v2-integrated .antler-core-actions button {
  min-height: 40px;
  padding: 9px 14px;
  border-color: #cad6c5;
  background: #f1f6ee;
  color: #3f6237;
  font-size: 13px;
}

body.v2-integrated .antler-core-actions button:hover {
  border-color: #aabfa2;
  background: #e9f1e5;
}

body.v2-integrated .antler-core-actions .antler-action-primary {
  border-color: #3f5e31;
  background: var(--v2-primary);
  color: #fff;
}

body.v2-integrated .antler-core-actions .antler-action-harvest {
  border-color: #ddc28f;
  background: #fbf1de;
  color: #805522;
}

body.v2-integrated .antler-timeline-section,
body.v2-integrated .antler-round-history-section,
body.v2-integrated .antler-harvest-history-section {
  padding: 0;
  overflow: hidden;
  border-color: #dfe5df;
  border-style: solid;
  border-width: 1px;
  border-radius: 12px;
  background: #fff;
}

body.v2-integrated .antler-section-head {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #e6ebe6;
}

body.v2-integrated .antler-section-head h3 {
  font-size: 18px;
}

body.v2-integrated .antler-section-head p {
  margin: 5px 0 0;
  color: #6b776e;
  font-size: 14px;
  line-height: 1.5;
}

body.v2-integrated .antler-section-head > span {
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

body.v2-integrated .antler-history-list {
  gap: 10px;
}

body.v2-integrated .antler-growth-timeline {
  margin: 0;
  padding: 14px 14px 14px 34px;
}

body.v2-integrated .antler-growth-timeline::before {
  top: 25px;
  bottom: 25px;
  left: 20px;
  width: 2px;
  background: #dfe6dc;
}

body.v2-integrated .antler-history-item {
  padding: 15px 16px;
  border-color: #e1e7e1;
  border-radius: 10px;
  background: #f8faf8;
}

body.v2-integrated .antler-growth-timeline .antler-history-item::before {
  left: -20px;
  top: 22px;
  width: 8px;
  height: 8px;
  border-color: #8da77f;
  background: #fff;
}

body.v2-integrated .antler-history-head {
  align-items: flex-start;
  margin-bottom: 10px;
}

body.v2-integrated .antler-history-head > div {
  display: grid;
  gap: 3px;
}

body.v2-integrated .antler-history-head strong {
  color: #2b372e;
  font-size: 15px;
}

body.v2-integrated .antler-history-head time {
  color: #707c73;
  font-size: 13px;
  font-weight: 600;
}

body.v2-integrated .antler-history-cycle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #5f6c62;
  font-size: 13px;
}

body.v2-integrated .antler-history-source {
  margin-left: 0;
  color: #78837b;
  font-size: 12px;
}

body.v2-integrated .antler-history-harvest-time {
  margin-top: 9px;
  color: #805522;
  font-size: 13px;
  font-weight: 700;
}

body.v2-integrated .antler-history-notes {
  margin-top: 11px;
  padding: 10px 12px;
  border-left: 3px solid #9bb190;
  border-radius: 0 8px 8px 0;
  background: #f1f6ee;
}

body.v2-integrated .antler-history-notes > span {
  display: block;
  color: #738077;
  font-size: 13px;
  font-weight: 700;
}

body.v2-integrated .antler-history-notes p {
  margin: 5px 0 0;
  color: #4f5c53;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

body.v2-integrated .antler-history-notes.is-empty {
  border-left-color: #d7ddd7;
  background: #f5f7f5;
}

body.v2-integrated .antler-history-notes.is-empty p {
  color: #7a857d;
}

body.v2-integrated .antler-unassigned-records {
  border-top: 1px solid #e6ebe6;
}

body.v2-integrated .antler-unassigned-records summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  color: #4f5c53;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

body.v2-integrated .antler-unassigned-records summary::-webkit-details-marker {
  display: none;
}

body.v2-integrated .antler-unassigned-records summary::after {
  content: "展開";
  color: #6f7b72;
  font-size: 12px;
}

body.v2-integrated .antler-unassigned-records[open] summary::after {
  content: "收合";
}

body.v2-integrated .antler-unassigned-records summary span {
  margin-left: auto;
  color: #78837b;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .antler-unassigned-records .antler-growth-timeline {
  border-top: 1px solid #edf0ed;
}

body.v2-integrated .antler-round-history-list {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f7f9f7;
}

body.v2-integrated .antler-round-card {
  overflow: hidden;
  border: 1px solid #dde5dc;
  border-radius: 10px;
  background: #fff;
}

body.v2-integrated .antler-round-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px 12px;
}

body.v2-integrated .antler-round-card-head > div {
  display: grid;
  gap: 3px;
}

body.v2-integrated .antler-round-card-head span {
  color: #78837b;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .antler-round-card-head h4 {
  margin: 0;
  color: #2d3930;
  font-size: 17px;
}

body.v2-integrated .antler-round-card-head > strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf5ea;
  color: #3f6838;
  font-size: 12px;
}

body.v2-integrated .antler-round-period {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 0 16px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #f5f7f4;
  color: #4f5c53;
  font-size: 13px;
  font-weight: 700;
}

body.v2-integrated .antler-round-period span {
  display: grid;
  gap: 3px;
}

body.v2-integrated .antler-round-period span:last-child {
  text-align: right;
}

body.v2-integrated .antler-round-period small,
body.v2-integrated .antler-round-metrics small {
  color: #7b867e;
  font-size: 11px;
  font-weight: 700;
}

body.v2-integrated .antler-round-period > i,
body.v2-integrated .antler-round-stage-flow > i {
  color: #9aa49c;
  font-style: normal;
}

body.v2-integrated .antler-round-stage-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 13px 16px 0;
}

body.v2-integrated .antler-round-stage-flow span {
  padding: 4px 8px;
  border: 1px solid #dce4d9;
  border-radius: 999px;
  background: #f8faf7;
  color: #536057;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .antler-round-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 13px 16px 15px;
}

body.v2-integrated .antler-round-metrics span {
  display: grid;
  gap: 4px;
  color: #3f4b42;
  font-size: 13px;
  font-weight: 800;
}

body.v2-integrated .antler-round-detail {
  border-top: 1px solid #e9ede8;
}

body.v2-integrated .antler-round-detail summary {
  padding: 12px 16px;
  color: #4f7047;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

body.v2-integrated .antler-round-detail .antler-growth-timeline {
  border-top: 1px solid #edf0ed;
}

body.v2-integrated .antler-round-empty,
body.v2-integrated .antler-harvest-empty {
  padding: 28px 20px;
  color: #6f7b72;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

body.v2-integrated .antler-harvest-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.4fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #dfe5df;
  border-radius: 12px;
  background: #fff;
}

body.v2-integrated .antler-harvest-summary > div {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 90px;
  padding: 16px 18px;
  border-left: 1px solid #e2e7e2;
}

body.v2-integrated .antler-harvest-summary > div:first-child {
  border-left: 0;
  background: #f0f6ed;
}

body.v2-integrated .antler-harvest-summary span {
  color: #6f7b72;
  font-size: 13px;
  font-weight: 700;
}

body.v2-integrated .antler-harvest-summary strong {
  color: #2d3930;
  font-size: 18px;
}

body.v2-integrated .antler-harvest-summary > div:first-child strong {
  color: #3f6237;
  font-size: 27px;
}

body.v2-integrated .antler-harvest-list {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f7f9f7;
}

body.v2-integrated .antler-harvest-card {
  padding: 16px;
  border: 1px solid #dde5dc;
  border-radius: 10px;
  background: #fff;
}

body.v2-integrated .antler-harvest-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

body.v2-integrated .antler-harvest-card-head > div {
  display: grid;
  gap: 3px;
}

body.v2-integrated .antler-harvest-card-head span,
body.v2-integrated .antler-harvest-card-head time {
  color: #707c73;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .antler-harvest-card-head h4 {
  margin: 0;
  color: #2d3930;
  font-size: 17px;
}

body.v2-integrated .antler-harvest-card-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

body.v2-integrated .antler-harvest-card-body > div {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 8px;
  background: #f5f7f4;
}

body.v2-integrated .antler-harvest-card-body span {
  color: #77827a;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .antler-harvest-card-body strong {
  color: #3f4b42;
  font-size: 14px;
}

body.v2-integrated .antler-harvest-card-body small {
  color: #7e8981;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

body.v2-integrated .antler-harvest-card-body strong.is-pending {
  color: #89928b;
  font-size: 12px;
}

body.v2-integrated .antler-harvest-quality {
  display: grid;
  gap: 7px;
  margin-top: 11px;
  padding: 11px 12px;
  border: 1px solid #e3e8e3;
  border-radius: 8px;
  background: #fbfcfb;
}

body.v2-integrated .antler-harvest-quality > span {
  color: #77827a;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .antler-harvest-quality > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.v2-integrated .antler-harvest-quality > div span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fbf1de;
  color: #805522;
  font-size: 12px;
  font-weight: 750;
}

body.v2-integrated .antler-harvest-quality > div span.is-clear {
  background: #edf5ea;
  color: #4d7045;
}

body.v2-integrated .antler-harvest-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #e8ece8;
}

body.v2-integrated .antler-harvest-edit-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #b7c9b0;
  border-radius: 8px;
  background: #f1f6ee;
  color: #3f6237;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

body.v2-integrated .antler-harvest-edit-button:hover {
  border-color: #8da77f;
  background: #e7f0e3;
}

body.v2-integrated .antler-harvest-count-notice {
  margin: -8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fbf4e8;
  color: #805522;
  font-size: 13px;
}

body.v2-integrated .antler-empty-zone {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 220px;
  padding: 32px 20px;
  border-color: #cfd8cf;
  background: #f8faf8;
  text-align: center;
}

body.v2-integrated .antler-empty-zone strong {
  color: #2d3930;
  font-size: 18px;
}

body.v2-integrated .antler-empty-zone p {
  max-width: 420px;
  margin: 0;
  color: #6d786f;
  font-size: 14px;
  line-height: 1.6;
}

body.v2-integrated.v2-workspace-switching #info-panel,
body.v2-integrated:is(
  .feeding-records-view-mode,
  .deer-antler-photo-manager-mode,
  .deer-antler-growth-view-mode,
  .deer-archive-history-mode
) #info-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.v2-integrated.farm-overview-mode #info-panel {
  top: 88px;
  right: 16px;
  bottom: 16px;
  left: calc(var(--v2-sidebar-width) + 38vw);
  width: auto;
  height: auto;
}

body.v2-integrated #panel-header {
  padding: 22px 25px 17px 56px;
  border-bottom-color: #e7ebe7;
}

body.v2-integrated.farm-overview-mode #panel-header {
  padding: 22px 25px 17px;
}

body.v2-integrated #panel-title {
  color: #263229;
  font-size: 24px;
}

body.v2-integrated.farm-overview-mode #panel-title {
  font-size: 27px;
}

body.v2-integrated #panel-subtitle {
  color: #717c73;
  font-size: 14px;
}

body.v2-integrated #panel-badge,
body.v2-integrated .profile-dialog-kicker,
body.v2-integrated .feeding-page-header .profile-dialog-kicker {
  display: none;
}

body.v2-integrated #panel-content {
  padding: 20px 24px 28px;
}

body.v2-integrated.farm-overview-mode #panel-content {
  padding: 20px 24px 28px;
}

body.v2-integrated #open-deer-archive-history-button,
body.v2-integrated #open-zone-movement-history-button,
body.v2-integrated #add-deer-profile-button,
body.v2-integrated #add-deer-measurement-button,
body.v2-integrated #add-deer-antler-record-button,
body.v2-integrated #open-feeding-records-button {
  min-height: 40px;
  border-color: #cbd8c5;
  background: #f1f6ee;
  color: var(--v2-primary-dark);
  font-size: 13px;
  box-shadow: none;
}

body.v2-integrated #open-zone-movement-history-button:disabled,
body.v2-integrated #open-deer-archive-history-button:disabled {
  border-color: #d8ded8;
  background: #f1f4f1;
  color: #667168;
  opacity: 1;
}

body.v2-integrated .panel-collapse-toggle {
  border-color: #c7d5c1;
  background: #eef4ea;
  color: var(--v2-primary-dark);
  box-shadow: 0 5px 14px rgba(45, 68, 39, 0.12);
}

/* Overview dashboard */
body.v2-integrated .overview-metric-card,
body.v2-integrated .overview-count-grid > div,
body.v2-integrated .overview-dashboard-section,
body.v2-integrated .overview-trend-card,
body.v2-integrated .overview-zone-card {
  border-color: #e0e6e0;
  background: #f8faf8;
  box-shadow: none;
}

body.v2-integrated .overview-metric-head span,
body.v2-integrated .overview-count-grid span,
body.v2-integrated .overview-section-head > span,
body.v2-integrated .overview-trend-card span {
  color: #5f6c62;
  font-size: 12px;
}

body.v2-integrated .overview-metric-card > strong,
body.v2-integrated .overview-count-grid strong,
body.v2-integrated .overview-section-head h3,
body.v2-integrated .overview-trend-card strong,
body.v2-integrated .overview-zone-head > strong {
  color: #2b372e;
}

body.v2-integrated .overview-metric-card > strong em {
  color: #647068;
  font-size: 13px;
}

body.v2-integrated .overview-section-head small {
  color: var(--v2-primary);
}

body.v2-integrated .overview-trend-card canvas {
  background: #f2f5f1;
}

body.v2-integrated .overview-zone-card:hover {
  border-color: #bfcfb9;
  background: #f1f6ee;
}

body.v2-integrated .overview-zone-presence {
  border-color: #e0e6e0;
  background: #fff;
}

body.v2-integrated .overview-occupancy-badge {
  border-color: #d7ddd7;
  background: #f1f4f1;
  color: #5f6c62;
  font-size: 12px;
}

body.v2-integrated .overview-occupancy-badge.is-occupied {
  border-color: #c8dac3;
  background: #edf5ea;
  color: #3f6838;
}

body.v2-integrated .overview-zone-presence strong {
  color: #5f6c62;
}

body.v2-integrated .overview-zone-presence.is-occupied {
  border-color: #d4e3cf;
  background: #f3f8f0;
}

body.v2-integrated .overview-zone-presence.is-occupied strong {
  color: #4d7145;
}

body.v2-integrated .overview-zone-open {
  color: var(--v2-primary);
}

body.v2-integrated .farm-alert {
  border-color: #dbe5d7;
  background: #f5f9f3;
}

body.v2-integrated .farm-alert-message {
  color: #5f6c62;
}

body.v2-integrated .farm-alert-state {
  color: #314037;
}

/* Zone detail and common information */
body.v2-integrated .section-label,
body.v2-integrated .profile-label,
body.v2-integrated .info-row-label {
  color: #788279;
}

body.v2-integrated .info-row {
  border-bottom-color: #e8ece8;
  color: #5d685f;
}

body.v2-integrated .info-row-value,
body.v2-integrated .profile-value,
body.v2-integrated .record-type {
  color: #2d3930;
}

body.v2-integrated .desc-box,
body.v2-integrated .profile-card,
body.v2-integrated .record-item {
  border-color: #e1e6e1;
  background: #f8faf8;
  color: #556159;
}

body.v2-integrated .profile-note,
body.v2-integrated .record-date,
body.v2-integrated .record-text {
  color: #6d786f;
}

body.v2-integrated .deer-profile-section,
body.v2-integrated .deer-profile-notes-section {
  border-color: #dfe6df;
  background: #fbfcfb;
}

body.v2-integrated .deer-profile-section-head {
  border-bottom-color: #e5eae5;
  background: #f6f9f5;
}

body.v2-integrated .deer-profile-section-head span {
  color: #66805a;
}

body.v2-integrated .deer-profile-section-head h3,
body.v2-integrated .deer-profile-info-item dd {
  color: #2d3930;
}

body.v2-integrated .deer-profile-section-edit,
body.v2-integrated .deer-profile-section-actions button {
  border-color: #c8d8c3;
  background: #eef4eb;
  color: #3f6535;
}

body.v2-integrated .deer-profile-section-edit:hover,
body.v2-integrated .deer-profile-section-actions button:hover {
  border-color: #adc4a5;
  background: #e5efe1;
}

body.v2-integrated .deer-profile-info-item,
body.v2-integrated .deer-profile-info-item:nth-child(even),
body.v2-integrated .deer-profile-summary-grid .deer-profile-info-item {
  border-color: #e7ece7;
}

body.v2-integrated .deer-profile-info-item dt,
body.v2-integrated .deer-profile-info-item small {
  color: #707c73;
}

body.v2-integrated .deer-profile-notes-content {
  color: #536057;
}

body.v2-integrated .deer-profile-notes-content.is-empty {
  color: #8b948d;
}

body.v2-integrated .deer-profile-empty-state {
  display: grid;
  gap: 7px;
  padding: 22px;
  border: 1px solid #dfe5df;
  border-radius: 12px;
  background: #f8faf8;
}

body.v2-integrated .deer-profile-empty-state strong {
  color: #2d3930;
  font-size: 18px;
}

body.v2-integrated .deer-profile-empty-state p {
  margin: 0;
  color: #6d786f;
  font-size: 14px;
  line-height: 1.6;
}

@media (min-width: 901px) and (max-width: 1400px) {
  body.v2-integrated.deer-profile-workspace-mode {
    --v2-info-panel-width: clamp(520px, 52vw, 680px);
  }

  body.v2-integrated.deer-measurement-workspace-mode {
    --v2-info-panel-width: clamp(520px, 52vw, 680px);
  }

  body.v2-integrated.deer-antler-workspace-mode {
    --v2-info-panel-width: clamp(580px, 56vw, 760px);
  }

  body.v2-integrated .measurement-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.v2-integrated .measurement-summary-card-meta {
    grid-column: 1 / -1;
  }

  body.v2-integrated .antler-stage-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.v2-integrated .antler-stage-hero > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #e2e7e2;
  }

  body.v2-integrated .antler-stage-hero > div:nth-child(4) {
    border-top: 1px solid #e2e7e2;
  }

  body.v2-integrated .antler-stage-hero > div:nth-child(5) {
    border-top: 1px solid #e2e7e2;
    border-left: 0;
  }
}

@media (max-width: 900px) {
  body.v2-integrated.deer-profile-workspace-mode #info-panel {
    left: 10px;
    width: auto;
  }

  body.v2-integrated.deer-measurement-workspace-mode #info-panel {
    left: 10px;
    width: auto;
  }

  body.v2-integrated.deer-antler-workspace-mode #info-panel {
    left: 10px;
    width: auto;
  }
}

@media (max-width: 760px) {
  body.v2-integrated.deer-profile-workspace-mode #info-panel {
    top: 76px;
    right: 10px;
    bottom: 10px;
  }

  body.v2-integrated.deer-measurement-workspace-mode #info-panel {
    top: 76px;
    right: 10px;
    bottom: 10px;
  }

  body.v2-integrated.deer-antler-workspace-mode #info-panel {
    top: 76px;
    right: 10px;
    bottom: 10px;
  }

  body.v2-integrated .measurement-summary-grid,
  body.v2-integrated .measurement-record-values {
    grid-template-columns: 1fr;
  }

  body.v2-integrated .measurement-summary-card-meta {
    grid-column: auto;
  }

  body.v2-integrated .antler-stage-hero,
  body.v2-integrated .antler-estimate-row {
    grid-template-columns: 1fr;
  }

  body.v2-integrated .antler-stage-hero > div {
    min-height: 78px;
    border-top: 1px solid #e2e7e2;
    border-left: 0;
  }

  body.v2-integrated .antler-stage-hero > div:first-child {
    border-top: 0;
  }

  body.v2-integrated .antler-stage-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.v2-integrated .antler-stage-flow::before {
    display: none;
  }

  body.v2-integrated .antler-workspace-tabs button {
    flex: 1;
    padding-inline: 10px;
  }

  body.v2-integrated .antler-round-period,
  body.v2-integrated .antler-round-metrics,
  body.v2-integrated .antler-harvest-summary,
  body.v2-integrated .antler-harvest-card-body {
    grid-template-columns: 1fr;
  }

  body.v2-integrated .antler-round-period > i {
    display: none;
  }

  body.v2-integrated .antler-round-period span:last-child {
    text-align: left;
  }

  body.v2-integrated .antler-harvest-summary > div {
    min-height: 74px;
    border-top: 1px solid #e2e7e2;
    border-left: 0;
  }

  body.v2-integrated .antler-harvest-summary > div:first-child {
    border-top: 0;
  }

  body.v2-integrated.deer-antler-workspace-mode .panel-write-actions {
    flex-wrap: wrap;
  }

  body.v2-integrated.deer-antler-workspace-mode #antler-workspace-tabs:not([hidden]) {
    flex-basis: 100%;
  }

  body.v2-integrated.deer-antler-workspace-mode #add-deer-antler-record-button {
    width: auto;
    min-width: 120px;
    margin-left: auto;
  }
}

body.v2-integrated .deer-tab {
  color: #6d786f;
}

body.v2-integrated .deer-tab.active {
  border-bottom-color: var(--v2-primary);
  color: var(--v2-primary-dark);
}

/* Full-page forms continue using the production DOM and event handlers. */
body.v2-integrated #deer-antler-photo-page,
body.v2-integrated #deer-antler-growth-page,
body.v2-integrated #deer-archive-history-page,
body.v2-integrated #feeding-records-page {
  top: 88px;
  right: 16px;
  bottom: 16px;
  border: 1px solid var(--v2-border);
  border-radius: 12px;
  background: #fff;
  color: var(--v2-ink);
  box-shadow: 0 12px 34px rgba(37, 54, 40, 0.1);
  backdrop-filter: none;
}

body.v2-integrated #feeding-records-page {
  left: calc(var(--v2-sidebar-width) + 16px);
}

body.v2-integrated .deer-profile-form {
  color: var(--v2-ink);
  color-scheme: light;
}

body.v2-integrated .profile-dialog-head {
  border-bottom-color: #e6eae6;
}

body.v2-integrated .profile-dialog-head h2,
body.v2-integrated .feeding-page-header h2,
body.v2-integrated .feeding-card-head h3,
body.v2-integrated .feeding-history-head h3 {
  color: #263229;
}

body.v2-integrated .profile-dialog-head p,
body.v2-integrated .feeding-page-header p,
body.v2-integrated .feeding-card-head p,
body.v2-integrated .feeding-history-head p {
  color: #5f6c62;
}

body.v2-integrated .profile-dialog-close {
  border-color: #dce2dc;
  background: #f6f8f6;
  color: #59655c;
}

body.v2-integrated .profile-form-field > span,
body.v2-integrated .feeding-form-field > span,
body.v2-integrated .feeding-filter-field > span {
  color: #4f5c53;
}

body.v2-integrated .profile-form-field input,
body.v2-integrated .profile-form-field select,
body.v2-integrated .profile-form-field textarea,
body.v2-integrated .feeding-form-field input,
body.v2-integrated .feeding-form-field select,
body.v2-integrated .feeding-form-field textarea,
body.v2-integrated .feeding-filter-field input,
body.v2-integrated .feeding-filter-field select {
  border-color: #d8dfd8;
  background: #fff;
  color: #29352d;
}

body.v2-integrated .profile-form-hint,
body.v2-integrated .feeding-form-hint,
body.v2-integrated .antler-form-context,
body.v2-integrated .feeding-context-summary {
  border-color: #dce6d8;
  background: #f5f9f3;
  color: #5e6c5e;
}

/* Antler forms use light-theme controls throughout. */
body.v2-integrated .management-antler-form .profile-form-field option {
  background: #fff;
  color: #29352d;
}

body.v2-integrated .management-antler-form .profile-form-field :is(input, textarea)::placeholder {
  color: #5f6c62;
  opacity: 1;
}

body.v2-integrated #deer-antler-photo-page .profile-form-secondary {
  border-color: #d4dcd4;
  background: #f6f8f6;
  color: #4f5c53;
}

body.v2-integrated #deer-antler-photo-page .profile-form-primary {
  border-color: #3f5e31;
  background: var(--v2-primary);
  color: #fff;
}

body.v2-integrated :is(
  .management-antler-form,
  #deer-antler-photo-page
) .profile-form-error {
  color: #a43a32;
}

body.v2-integrated .antler-record-photo-summary {
  border-top-color: #e4e9e3;
}

body.v2-integrated .antler-record-photo-thumb,
body.v2-integrated .antler-record-photo-more {
  border-color: #d9e2d7;
  background: #edf2eb;
  color: #566358;
}

body.v2-integrated .antler-record-photo-thumb:hover {
  border-color: #89a87d;
}

body.v2-integrated .antler-record-photo-empty,
body.v2-integrated .antler-record-photo-count {
  color: #6b776e;
}

body.v2-integrated .antler-record-photo-manage {
  border-color: #cad9c5;
  background: #f0f5ed;
  color: var(--v2-primary-dark);
}

body.v2-integrated .antler-record-photo-manage:hover {
  border-color: #afc6a6;
  background: #e7f0e3;
}

body.v2-integrated [data-protected-image-frame].is-image-loading::after {
  border-color: #dce7d8;
  border-top-color: var(--v2-primary);
}

body.v2-integrated [data-protected-image-frame].is-image-error::after {
  color: #a43a32;
}

body.v2-integrated .antler-photo-record-context {
  border-color: #d9e5d5;
  background: #f3f7f1;
}

body.v2-integrated .antler-photo-record-context > div {
  background: #f7faf6;
}

body.v2-integrated .antler-photo-record-context span,
body.v2-integrated .antler-photo-group-head p {
  color: #69766c;
}

body.v2-integrated .antler-photo-record-context strong,
body.v2-integrated .antler-photo-group-head h3,
body.v2-integrated .antler-photo-upload-details h3 {
  color: #29362d;
}

body.v2-integrated .antler-photo-manager-notice {
  border-color: #cfe0c9;
  background: #f1f7ee;
  color: #3d5f31;
}

body.v2-integrated .antler-photo-manager-error:not(:empty) {
  background: #fff2f0;
}

body.v2-integrated .antler-photo-group {
  border-color: #dfe6df;
  background: #fbfcfb;
}

body.v2-integrated .antler-photo-group-head > span {
  background: #eef3ec;
  color: #536158;
}

body.v2-integrated .antler-photo-slot-empty {
  border-color: #c7d8c1;
  background: #f5f8f3;
  color: #547047;
}

body.v2-integrated .antler-photo-slot-empty:hover {
  border-color: #9dbb91;
  background: #edf4e9;
}

body.v2-integrated .antler-photo-slot-filled {
  border-color: #d8dfd8;
  background: #eef1ee;
}

body.v2-integrated .antler-photo-upload-dialog {
  border-color: #cbdcc6;
  background: #fff;
  box-shadow: 0 24px 70px rgba(35, 49, 39, 0.22);
}

body.v2-integrated .antler-photo-upload-preview {
  background: #e8ede7;
}

body.v2-integrated .antler-photo-upload-dialog-head span,
body.v2-integrated .antler-photo-upload-details > span {
  color: var(--v2-primary);
}

body.v2-integrated .antler-photo-upload-dialog-head h3,
body.v2-integrated .antler-photo-upload-details strong {
  color: #29362d;
}

body.v2-integrated .antler-photo-upload-dialog-head p,
body.v2-integrated .antler-photo-upload-details p,
body.v2-integrated .antler-photo-upload-details small {
  color: #667269;
}

body.v2-integrated .antler-photo-upload-actions {
  border-top-color: #e2e8e2;
}

body.v2-integrated .antler-photo-overlay {
  background: rgba(34, 43, 36, 0.66);
}

body.v2-integrated .antler-photo-preview-dialog,
body.v2-integrated .antler-photo-delete-dialog {
  border-color: #dce3dc;
  background: #fff;
  box-shadow: 0 24px 70px rgba(35, 49, 39, 0.22);
}

body.v2-integrated .antler-photo-preview-head span,
body.v2-integrated .antler-photo-delete-dialog > span {
  color: var(--v2-primary);
}

body.v2-integrated .antler-photo-preview-head h3,
body.v2-integrated .antler-photo-delete-dialog h3 {
  color: #29362d;
}

body.v2-integrated .antler-photo-preview-canvas {
  background: #edf1ed;
}

body.v2-integrated .antler-photo-preview-dialog > p,
body.v2-integrated .antler-photo-delete-dialog p {
  color: #657168;
}

body.v2-integrated #cancel-antler-photo-delete,
body.v2-integrated #confirm-antler-photo-delete {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

body.v2-integrated #deer-antler-photo-page .profile-form-danger {
  border-color: #c9564d;
  background: #b7443c;
  color: #fff;
}

body.v2-integrated .antler-photo-viewer {
  background: rgba(25, 35, 28, 0.76);
}

body.v2-integrated .antler-photo-viewer-dialog {
  border-color: #d9e1d9;
  background: #fff;
  box-shadow: 0 30px 90px rgba(32, 45, 35, 0.3);
}

body.v2-integrated .antler-photo-viewer-header {
  border-bottom-color: #e2e7e2;
}

body.v2-integrated .antler-photo-viewer-header span {
  color: var(--v2-primary);
}

body.v2-integrated .antler-photo-viewer-header h2 {
  color: #26342b;
}

body.v2-integrated .antler-photo-viewer-header p {
  color: #68756b;
}

body.v2-integrated .antler-photo-viewer-close {
  border-color: #d8dfd8;
  background: #f5f7f5;
  color: #536057;
}

body.v2-integrated .antler-photo-viewer-close:hover {
  background: #edf2ed;
}

body.v2-integrated .antler-photo-viewer-stage {
  background: #e9eeea;
}

body.v2-integrated .antler-photo-viewer-image-frame {
  background: #dfe5e0;
}

body.v2-integrated .antler-photo-viewer-nav {
  border-color: #ccd6cc;
  background: #fff;
  color: #405449;
}

body.v2-integrated .antler-photo-viewer-nav:hover:not(:disabled) {
  border-color: #94ae8b;
  background: #f1f6ef;
}

body.v2-integrated .antler-photo-viewer-info {
  border-color: #dce3dc;
  background: #dce3dc;
}

body.v2-integrated .antler-photo-viewer-info > div {
  background: #f7f9f7;
}

body.v2-integrated .antler-photo-viewer-info span,
body.v2-integrated .antler-photo-viewer-footer > span {
  color: #6c786f;
}

body.v2-integrated .antler-photo-viewer-info strong {
  color: #344138;
}

body.v2-integrated .antler-photo-viewer-filmstrip-item {
  background: #e4e9e4;
}

body.v2-integrated .antler-photo-viewer-filmstrip-item.is-active {
  border-color: var(--v2-primary);
}

body.v2-integrated .antler-form-context span {
  color: #5f6c62;
}

body.v2-integrated .antler-form-context strong {
  color: #2b372e;
}

body.v2-integrated .antler-action-selector legend {
  color: #4f5c53;
}

body.v2-integrated .antler-action-option {
  border-color: #dce3dc;
  background: #f8faf8;
}

body.v2-integrated .antler-action-option:hover {
  border-color: #b9cbb2;
  background: #f1f6ee;
}

body.v2-integrated .antler-action-option.is-selected,
body.v2-integrated .antler-action-option-harvest.is-selected {
  border-color: #8da77f;
  background: #edf5ea;
}

body.v2-integrated .antler-action-option.is-disabled {
  border-color: #e1e6e1;
  background: #f1f4f1;
  opacity: 1;
}

body.v2-integrated .antler-action-option strong {
  color: #2b372e;
}

body.v2-integrated .antler-action-option small,
body.v2-integrated .antler-action-option.is-disabled :is(strong, small) {
  color: #5f6c62;
}

body.v2-integrated .antler-harvest-details-fields {
  border-color: #dce5d8;
  background: #f8faf7;
}

body.v2-integrated .antler-harvest-details-head h3 {
  color: #2b372e;
}

body.v2-integrated .antler-harvest-details-head p {
  color: #667269;
}

body.v2-integrated .antler-harvest-details-head > span {
  color: #72856b;
}

body.v2-integrated .antler-quality-issues legend {
  color: #4f5c53;
}

body.v2-integrated .antler-quality-issue-grid label {
  border-color: #dce3dc;
  background: #fff;
  color: #445148;
}

body.v2-integrated .antler-quality-issue-grid label:has(input:checked) {
  border-color: #91aa87;
  background: #edf5ea;
  color: #34542e;
}

body.v2-integrated .antler-harvest-photo-fields {
  border-top-color: #e0e6df;
}

body.v2-integrated .antler-harvest-photo-head h4,
body.v2-integrated .antler-harvest-photo-picker strong {
  color: #2b372e;
}

body.v2-integrated .antler-harvest-photo-head p,
body.v2-integrated .antler-harvest-photo-picker > p,
body.v2-integrated .antler-harvest-photo-picker > div:first-child span,
body.v2-integrated .antler-harvest-photo-preview span {
  color: #667269;
}

body.v2-integrated .antler-harvest-photo-head > span {
  color: #72856b;
}

body.v2-integrated .antler-harvest-photo-picker {
  border-color: #dce3dc;
  background: #fff;
}

body.v2-integrated .antler-harvest-photo-select {
  border-color: #bfd1b8;
  background: #f2f7ef;
  color: #44623b;
}

body.v2-integrated .antler-harvest-photo-select:hover {
  border-color: #98b48d;
  background: #eaf3e6;
}

body.v2-integrated .antler-harvest-photo-preview {
  border-color: #e0e6e0;
  background: #f7f9f7;
}

body.v2-integrated .antler-harvest-photo-preview button {
  border-color: #e4b7b2;
  background: #fff1ef;
  color: #a8443d;
}

/* Measurement history and antler timelines sit on white V2 surfaces. */
body.v2-integrated .measurement-history-item,
body.v2-integrated .antler-history-item,
body.v2-integrated .antler-timeline-section {
  border-color: #dfe5df;
  background: #f8faf8;
}

body.v2-integrated .measurement-history-head,
body.v2-integrated .antler-history-head,
body.v2-integrated .antler-section-head h3 {
  color: #2b372e;
}

body.v2-integrated .measurement-history-values,
body.v2-integrated .measurement-history-notes,
body.v2-integrated .antler-history-cycle,
body.v2-integrated .antler-history-notes,
body.v2-integrated .antler-history-source,
body.v2-integrated .antler-section-head > span,
body.v2-integrated .antler-empty-state {
  color: #5f6c62;
}

body.v2-integrated .antler-section-head > span {
  background: #edf2ec;
}

body.v2-integrated .antler-empty-state {
  border-color: #cfd8cf;
  background: #fff;
}

body.v2-integrated .antler-event-badge {
  border-color: #cbd5cb;
  background: #fff;
  color: #4f5c53;
}

body.v2-integrated .antler-event-phase_change {
  border-color: #c8dac3;
  background: #edf5ea;
  color: #3f6838;
}

body.v2-integrated .antler-event-observation {
  border-color: #c5d9dc;
  background: #edf5f6;
  color: #3f6670;
}

body.v2-integrated .antler-event-harvest,
body.v2-integrated .antler-harvest-badge {
  border-color: #e2cfad;
  background: #fbf4e8;
  color: #805522;
}

body.v2-integrated .antler-growth-timeline::before {
  background: linear-gradient(#9cad80, #dfe7dc);
}

body.v2-integrated .antler-growth-timeline .antler-history-item::before {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(90, 117, 69, 0.12);
}

body.v2-integrated .feeding-workspace-card,
body.v2-integrated .feeding-record-card,
body.v2-integrated .feeding-filter-panel,
body.v2-integrated .feeding-history-panel {
  border-color: #e0e6e0;
  background: #f8faf8;
}

body.v2-integrated .feeding-page-tabs {
  border-color: #dfe5df;
  background: #f3f6f3;
}

body.v2-integrated .feeding-page-tabs button {
  color: #5f6c62;
}

body.v2-integrated .feeding-page-tabs button.is-active {
  background: #fff;
  color: var(--v2-primary-dark);
}

body.v2-integrated .feeding-today-workspace-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.v2-integrated .feeding-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

body.v2-integrated #add-feeding-record-button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #456b37;
  border-radius: 10px;
  background: #456b37;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

body.v2-integrated #add-feeding-record-button:hover {
  border-color: #36572b;
  background: #36572b;
}

body.v2-integrated #add-feeding-record-button:focus-visible {
  outline: 3px solid rgba(71, 107, 56, 0.22);
  outline-offset: 2px;
}

@media (max-width: 700px) {
  body.v2-integrated .feeding-record-panel > .feeding-card-head {
    flex-direction: column;
  }

  body.v2-integrated .feeding-card-actions {
    width: 100%;
    justify-content: space-between;
  }

  body.v2-integrated #add-feeding-record-button {
    flex: 1 1 auto;
  }
}

body.v2-integrated .feeding-history-table th {
  background: #f1f5f0;
  color: #5f6c62;
}

body.v2-integrated .feeding-history-table td {
  border-bottom-color: #e4e9e4;
  color: #536057;
}

/* Feeding records use one complete light palette in V2. */
body.v2-integrated .feeding-card-head > div > span {
  display: none;
}

body.v2-integrated .feeding-context-summary span {
  color: #5f6c62;
}

body.v2-integrated .feeding-context-summary strong {
  border-left-color: #dce3dc;
  color: #2b372e;
}

body.v2-integrated .feeding-form-field input[readonly] {
  background: #f1f4f1;
  color: #5f6c62;
}

body.v2-integrated .feeding-form-field option {
  background: #fff;
  color: #29352d;
}

body.v2-integrated .feeding-form-field :is(input, textarea)::placeholder {
  color: #5f6c62;
  opacity: 1;
}

body.v2-integrated .feeding-deleted-toggle {
  color: #4f5c53;
}

body.v2-integrated .feeding-form-message.is-error {
  color: #a43a32;
}

body.v2-integrated .feeding-form-message.is-success {
  color: #32663d;
}

body.v2-integrated #feeding-records-page .profile-form-secondary {
  border-color: #d4dcd4;
  background: #f6f8f6;
  color: #4f5c53;
}

body.v2-integrated #feeding-records-page .profile-form-primary {
  border-color: #3f5e31;
  background: var(--v2-primary);
  color: #fff;
}

body.v2-integrated .feeding-history-status {
  border: 1px solid #cbd8c7;
  background: #edf4ea;
  color: #3f6237;
}

body.v2-integrated .feeding-history-status.is-error {
  border-color: #dfc1bc;
  background: #fbefed;
  color: #a43a32;
}

body.v2-integrated .feeding-record-card.is-deleted {
  border-color: #e2c8c4;
  background: #fbf3f1;
  opacity: 1;
}

body.v2-integrated .feeding-record-card-head .feeding-record-time,
body.v2-integrated .feeding-record-identity b {
  color: #2b372e;
}

body.v2-integrated .feeding-record-identity > span,
body.v2-integrated .feeding-record-amounts > div {
  border-color: #dfe5df;
  background: #fff;
}

body.v2-integrated .feeding-record-identity small,
body.v2-integrated .feeding-record-amounts span,
body.v2-integrated .feeding-record-meta {
  color: #5f6c62;
}

body.v2-integrated .feeding-slot-badge {
  border-color: #c8dac3;
  background: #edf5ea;
  color: #3f6838;
}

body.v2-integrated .feeding-record-amounts strong,
body.v2-integrated .feeding-amount {
  color: #3f6237;
}

body.v2-integrated .feeding-record-note {
  border-top-color: #dfe5df;
  color: #4f5c53;
}

body.v2-integrated .feeding-record-actions {
  border-top-color: #dfe5df;
}

body.v2-integrated .feeding-record-actions button {
  border-color: #c8d7c3;
  background: #eef4eb;
  color: #3f6237;
}

body.v2-integrated .feeding-record-actions button:hover {
  border-color: #aebfa8;
  background: #e5efe1;
}

body.v2-integrated .feeding-record-actions button.is-danger {
  border-color: #dfc1bc;
  background: #fbefed;
  color: #8b3e36;
}

body.v2-integrated .feeding-record-actions button.is-danger:hover {
  border-color: #cda49e;
  background: #f6e1de;
}

body.v2-integrated .feeding-record-deleted-note {
  border-color: #dfc1bc;
  background: #fbefed;
  color: #7b443d;
}

body.v2-integrated .feeding-record-primary,
body.v2-integrated .feeding-empty-state strong {
  color: #2b372e;
}

body.v2-integrated .feeding-record-secondary,
body.v2-integrated .feeding-empty-state p,
body.v2-integrated .feeding-pagination span {
  color: #5f6c62;
}

body.v2-integrated .feeding-record-state {
  border: 1px solid #c8dac3;
  background: #edf5ea;
  color: #3f6838;
}

body.v2-integrated .feeding-record-state.is-deleted {
  border-color: #dfc1bc;
  background: #fbefed;
  color: #8b3e36;
}

body.v2-integrated .feeding-history-table tr.is-deleted {
  background: #fbf3f1;
  opacity: 1;
}

body.v2-integrated .feeding-empty-state button {
  border-color: #3f5e31;
  background: var(--v2-primary);
  color: #fff;
}

body.v2-integrated .feeding-pagination button {
  border-color: #d4dcd4;
  background: #fff;
  color: #4f5c53;
}

body.v2-integrated .feeding-pagination button:hover:not(:disabled) {
  border-color: #b8c8b3;
  background: #f1f6ee;
}

body.v2-integrated .feeding-pagination button:disabled {
  border-color: #e1e6e1;
  background: #f1f4f1;
  color: #5f6c62;
  opacity: 1;
}

body.v2-integrated .feeding-history-content {
  border-color: #dfe5df;
  background: #fff;
}

/* Archived deer history uses a complete light palette in V2. */
body.v2-integrated .deer-archive-history-shell {
  color: var(--v2-ink);
  color-scheme: light;
}

body.v2-integrated .deer-archive-list-pane,
body.v2-integrated .deer-archive-detail {
  border-color: #dfe5df;
  background: #f8faf8;
}

body.v2-integrated .deer-archive-pane-title {
  border-bottom-color: #dfe5df;
}

body.v2-integrated .deer-archive-pane-title strong,
body.v2-integrated .deer-archive-list-main strong,
body.v2-integrated .deer-archive-detail-head h3,
body.v2-integrated .deer-archive-summary-card strong,
body.v2-integrated .deer-archive-facts strong,
body.v2-integrated .deer-archive-event-list strong {
  color: #2b372e;
}

body.v2-integrated .deer-archive-pane-title span,
body.v2-integrated .deer-archive-detail-label,
body.v2-integrated .deer-archive-summary-card span,
body.v2-integrated .deer-archive-facts span,
body.v2-integrated .deer-archive-count-grid span,
body.v2-integrated .deer-archive-preserved-note,
body.v2-integrated .deer-archive-event-list time,
body.v2-integrated .deer-archive-event-list p,
body.v2-integrated .deer-archive-empty {
  color: #5f6c62;
  font-size: 12px;
}

body.v2-integrated .deer-archive-list-item {
  border-color: transparent;
  background: transparent;
  color: #5f6c62;
}

body.v2-integrated .deer-archive-list-item:hover {
  border-color: #dce4da;
  background: #f0f5ee;
  color: #354239;
}

body.v2-integrated .deer-archive-list-item.is-selected {
  border-color: #bfd0b8;
  background: #eaf2e7;
  color: #31502a;
}

body.v2-integrated .deer-archive-status {
  border-color: #d6ddd6;
  background: #eef2ee;
  color: #4f5d53;
  font-size: 12px;
}

body.v2-integrated .deer-archive-status-transferred {
  border-color: #bcd6e2;
  background: #edf6fa;
  color: #315f73;
}

body.v2-integrated .deer-archive-status-deceased {
  border-color: #dcc9c4;
  background: #f8f1ef;
  color: #76534b;
}

body.v2-integrated .deer-archive-status-archived {
  border-color: #d8cfaa;
  background: #f8f5e8;
  color: #6c5c25;
}

body.v2-integrated .deer-zone-direction-in {
  border-color: #b9d7c0;
  background: #edf7ef;
  color: #32663d;
}

body.v2-integrated .deer-zone-direction-out {
  border-color: #e0c6a8;
  background: #fbf3e9;
  color: #80511e;
}

body.v2-integrated .deer-archive-summary-card {
  border-color: #e1d5bc;
  background: #fbf7ef;
}

body.v2-integrated .deer-archive-facts > div,
body.v2-integrated .deer-archive-count-grid > div,
body.v2-integrated .deer-archive-event-list article {
  border-color: #e0e6e0;
  background: #fff;
}

body.v2-integrated .deer-archive-count-grid strong {
  color: #3f6237;
}

body.v2-integrated .deer-archive-error {
  color: #a33f37;
}

body.v2-integrated:not(.farm-overview-mode) #controls-hint {
  right: calc(16px + var(--v2-info-panel-width));
  left: var(--v2-sidebar-width);
  box-sizing: border-box;
  min-height: 38px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  justify-content: center;
  transform: none;
  opacity: 1;
  backdrop-filter: none;
}

body.v2-integrated .hint-pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(191, 207, 184, 0.72);
  border-radius: 7px;
  background: rgba(244, 248, 242, 0.92);
  color: #40503f;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}

body.v2-integrated #zone-context-labels {
  position: absolute;
  top: 92px;
  right: calc(16px + var(--v2-info-panel-width));
  left: var(--v2-sidebar-width);
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}

body.v2-integrated #zone-context-labels[hidden] {
  display: none;
}

body.v2-integrated .zone-context-label {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(35, 42, 36, 0.86);
  color: #f2f5f0;
  box-shadow: 0 7px 18px rgba(28, 38, 30, 0.2);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

body.v2-integrated .zone-context-label small {
  color: rgba(242, 245, 240, 0.62);
  font-size: 11px;
  font-weight: 700;
}

body.v2-integrated .zone-context-label strong {
  color: inherit;
  font-size: 14px;
  line-height: 1;
}

body.v2-integrated .zone-context-deer {
  border-color: rgba(139, 170, 92, 0.38);
  background: rgba(65, 89, 48, 0.9);
}

body.v2-integrated #zone-context-labels.is-empty .zone-context-deer {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(74, 80, 75, 0.86);
}

body.v2-integrated.farm-overview-mode #controls-hint {
  left: calc(var(--v2-sidebar-width) + 19vw + 4px);
}

body.v2-integrated.zone-management-mode #controls-hint,
body.v2-integrated.zone-management-mode #zone-context-labels {
  right: 0;
}

@media (max-width: 1100px) {
  body.v2-integrated.zone-management-mode #controls-hint,
  body.v2-integrated.zone-management-mode #zone-context-labels {
    left: 0;
  }
}

body.v2-integrated.v2-workspace-switching #controls-hint,
body.v2-integrated.v2-workspace-switching #zone-context-labels,
body.v2-integrated:is(
  .feeding-records-view-mode,
  .deer-antler-photo-manager-mode,
  .deer-antler-growth-view-mode,
  .deer-archive-history-mode
) :is(#controls-hint, #zone-context-labels) {
  visibility: hidden;
}

body.v2-integrated #load-bar {
  left: calc(var(--v2-sidebar-width) + 50%);
  min-width: 150px;
  padding: 16px 18px;
  border: 1px solid #dce4da;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 36px rgba(31, 48, 34, 0.16);
}

body.v2-integrated #load-bar .spin {
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border: 3px solid #dfe8db;
  border-top-color: var(--v2-primary);
}

body.v2-integrated #load-text {
  color: #4f5c53;
  font-size: 14px;
  font-weight: 700;
}

.v2-integration-toast {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 15px;
  border: 1px solid #cbd8c6;
  border-radius: 10px;
  background: #fff;
  color: #475549;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 16px 42px rgba(37, 54, 40, 0.17);
}

.v2-navigation-guard {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(25, 34, 27, 0.52);
  backdrop-filter: blur(2px);
}

.v2-navigation-guard[hidden] {
  display: none;
}

.v2-navigation-guard-dialog {
  width: min(430px, 100%);
  padding: 26px;
  border: 1px solid #dac77f;
  border-radius: 16px;
  background: #fffdf6;
  color: var(--v2-ink);
  box-shadow: 0 28px 70px rgba(24, 35, 27, 0.28);
}

.v2-navigation-guard-heading {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
}

.v2-navigation-guard-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 14px;
  background: #f7e9b7;
}

.v2-navigation-guard-icon img {
  width: 30px;
  height: 30px;
  filter:
    brightness(0)
    saturate(100%)
    invert(48%)
    sepia(62%)
    saturate(594%)
    hue-rotate(4deg)
    brightness(91%)
    contrast(88%);
}

.v2-navigation-guard-heading span {
  display: block;
  margin-bottom: 4px;
  color: #88702c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.v2-navigation-guard-heading h2 {
  margin: 0;
  color: #2b372e;
  font-size: 21px;
  line-height: 1.35;
}

.v2-navigation-guard-dialog > p {
  margin: 18px 0 22px;
  color: #59655c;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
}

.v2-navigation-guard.is-zone-picker .v2-navigation-guard-dialog {
  width: min(560px, 100%);
  border-color: #c9dac4;
  background: #fff;
}

.v2-navigation-guard.is-zone-picker .v2-navigation-guard-icon {
  background: #e7f0e3;
}

.v2-navigation-guard.is-zone-picker .v2-navigation-guard-icon img {
  filter: none;
  opacity: 0.72;
}

.v2-navigation-guard.is-zone-picker .v2-navigation-guard-heading span {
  color: var(--v2-primary);
}

.v2-navigation-guard.is-zone-picker .v2-navigation-guard-dialog > p {
  margin-bottom: 15px;
}

.v2-navigation-zone-picker {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.v2-navigation-zone-picker[hidden] {
  display: none;
}

.v2-navigation-zone-search {
  flex: 0 0 auto;
}

body.v2-integrated .v2-navigation-zone-list {
  max-height: min(310px, 42vh);
  padding-right: 3px;
}

body.v2-integrated .v2-navigation-zone-empty {
  margin-top: 9px;
}

.v2-navigation-guard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

#v2-navigation-guard-cancel {
  min-width: 104px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #cfd8ce;
  border-radius: 10px;
  background: #f6f8f5;
  color: #536057;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

#v2-navigation-guard-cancel:hover {
  border-color: #b8c7b4;
  background: #eef3eb;
}

#v2-navigation-guard-cancel:focus-visible {
  outline: 3px solid rgba(110, 143, 83, 0.22);
  outline-offset: 3px;
}

#v2-navigation-guard-confirm {
  width: 100%;
  min-height: 46px;
  border: 1px solid #476d37;
  border-radius: 10px;
  background: var(--v2-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 9px 20px rgba(54, 87, 42, 0.19);
}

#v2-navigation-guard-confirm:hover {
  background: var(--v2-primary-dark);
}

#v2-navigation-guard-confirm:focus-visible {
  outline: 3px solid rgba(110, 143, 83, 0.32);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .v2-workspace-switch-status {
    left: 50%;
  }

  .v2-app-sidebar {
    position: fixed;
    width: min(292px, 84vw);
    transform: translateX(-100%);
  }

  body.v2-sidebar-open .v2-app-sidebar {
    transform: translateX(0);
  }

  .v2-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 65;
    display: block;
    pointer-events: none;
    background: rgba(22, 31, 24, 0.42);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  body.v2-sidebar-open .v2-sidebar-overlay {
    pointer-events: auto;
    opacity: 1;
  }

  body.v2-integrated #top-bar {
    left: 0;
    padding: 0 13px;
  }

  .v2-icon-button {
    display: grid;
  }

  body.v2-integrated #brand {
    display: flex;
  }

  body.v2-integrated #brand-logo-wrap {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 11px;
  }

  body.v2-integrated #farm-title {
    font-size: 18px;
  }

  body.v2-integrated #c {
    left: 0;
    width: 100vw !important;
  }

  body.v2-integrated.farm-overview-mode #c {
    top: 82px;
    left: 12px;
    width: calc(40vw - 18px) !important;
    height: calc(100vh - 96px) !important;
  }

  body.v2-integrated #left-sidebar {
    left: 12px;
  }

  body.v2-integrated #deer-form-zone-preview {
    top: 82px;
    left: 12px;
  }

  body.v2-integrated #info-panel {
    right: 12px;
    width: min(450px, calc(100vw - 390px));
  }

  body.v2-integrated.farm-overview-mode #info-panel {
    top: 82px;
    right: 12px;
    bottom: 14px;
    left: calc(40vw + 4px);
    width: auto;
  }

  body.v2-integrated #feeding-records-page {
    left: 12px;
  }

  body.v2-integrated:not(.farm-overview-mode) #controls-hint {
    right: calc(12px + var(--v2-info-panel-width));
    left: 0;
  }

  body.v2-integrated #zone-context-labels {
    top: 88px;
    right: calc(12px + var(--v2-info-panel-width));
    left: 0;
  }

  body.v2-integrated #load-bar {
    left: 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v2-workspace-switch-spinner {
    animation: none;
  }
}

@media (max-width: 900px) {
  body.v2-integrated #controls-hint {
    display: none;
  }

  body.v2-integrated:is(
    .deer-profile-workspace-mode,
    .deer-measurement-workspace-mode,
    .deer-antler-workspace-mode
  ) #zone-context-labels {
    display: none;
  }
}

@media (max-width: 760px) {
  .v2-navigation-guard {
    padding: 16px;
  }

  .v2-navigation-guard-dialog {
    padding: 22px 20px;
  }

  .v2-navigation-guard-heading {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
  }

  .v2-navigation-guard-icon {
    width: 48px;
    height: 48px;
  }

  .v2-navigation-guard-heading h2 {
    font-size: 19px;
  }

  .v2-navigation-guard.is-zone-picker .v2-navigation-guard-dialog {
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
  }

  .v2-navigation-guard.is-zone-picker .v2-navigation-zone-picker {
    flex: 1 1 auto;
    overflow: hidden;
  }

  body.v2-integrated .v2-navigation-zone-list {
    max-height: none;
    flex: 1 1 auto;
  }

  #v2-navigation-guard-cancel {
    width: 100%;
  }

  body.v2-integrated #login-page {
    padding: 14px;
  }

  body.v2-integrated .admin-login-card {
    padding: 28px 22px;
    border-radius: 17px;
  }

  body.v2-integrated #top-bar {
    height: 64px;
    gap: 8px;
  }

  body.v2-integrated #brand {
    min-width: 0;
  }

  body.v2-integrated #brand > div:last-child {
    min-width: 0;
  }

  body.v2-integrated #brand-logo-wrap {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  body.v2-integrated #farm-title {
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.v2-integrated .top-view-control {
    flex: 1;
    min-width: 0;
  }

  body.v2-integrated .top-view-control .view-select-wrap {
    width: 100%;
  }

  body.v2-integrated #top-status > .nav-chip,
  body.v2-integrated .admin-account-chip {
    display: none;
  }

  body.v2-integrated #c,
  body.v2-integrated.farm-overview-mode #c {
    top: 76px;
    left: 10px;
    width: calc(100vw - 20px) !important;
    height: 34vh !important;
  }

  body.v2-integrated.farm-overview-mode #info-panel {
    top: calc(34vh + 88px);
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
  }

  body.v2-integrated #left-sidebar {
    top: 76px;
    right: 10px;
    bottom: calc(52vh + 12px);
    left: 10px;
    width: auto;
  }

  body.v2-integrated #info-panel {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    height: 52vh;
  }

  body.v2-integrated #deer-antler-photo-page,
  body.v2-integrated #deer-antler-growth-page,
  body.v2-integrated #deer-archive-history-page,
  body.v2-integrated #feeding-records-page {
    top: 76px;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.v2-integrated *,
  body.v2-integrated *::before,
  body.v2-integrated *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Phase 1 V2 overview layout: one dashboard surface containing the real Three.js canvas. */
body.v2-integrated.farm-overview-mode #info-panel {
  top: 88px;
  right: 16px;
  bottom: 16px;
  left: calc(var(--v2-sidebar-width) + 16px);
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

/* Overview is a full workspace, so a persisted zone-panel collapse must not
   translate the dashboard off-screen. The saved collapse state still applies
   again after returning to zone mode. */
body.v2-integrated.farm-overview-mode #info-panel.is-collapsed {
  transform: none;
}

/* Both archive and zone movement history use the same full workspace bounds. */
body.v2-integrated.deer-archive-history-mode
  #deer-archive-history-page {
  top: 88px;
  right: 16px;
  bottom: 16px;
  left: calc(var(--v2-sidebar-width) + 16px);
  width: auto;
}

body.v2-integrated.farm-overview-mode #panel-header {
  padding: 0 2px 18px;
  border-bottom: 0;
}

body.v2-integrated.farm-overview-mode #panel-title {
  color: #1f2b23;
  font-size: 28px;
  letter-spacing: -0.025em;
}

body.v2-integrated.farm-overview-mode #panel-subtitle {
  display: none;
}

body.v2-integrated.farm-overview-mode #panel-content {
  padding: 0 4px 34px;
  scrollbar-gutter: stable;
}

body.v2-integrated.farm-overview-mode #controls-hint {
  display: none;
}

body.v2-integrated.farm-overview-mode #zone-labels {
  z-index: 30;
}

body.v2-integrated.farm-overview-mode .zone-label.v2-overview-combined-label {
  padding: 4px 9px;
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: rgba(35, 40, 36, 0.82);
  color: #f1f3ef;
  font-size: 11px;
  font-weight: 750;
  box-shadow: 0 5px 13px rgba(17, 24, 18, 0.28);
}

body.v2-integrated.farm-overview-mode .zone-label.v2-overview-combined-label.has-deer {
  border-color: rgba(176, 201, 120, 0.42);
  background: rgba(64, 80, 43, 0.9);
  color: #eef5d7;
}

body.v2-integrated .v2-farm-overview-dashboard {
  gap: 17px;
}

body.v2-integrated .v2-overview-metric-grid {
  gap: 15px;
}

body.v2-integrated .v2-overview-metric-card {
  position: relative;
  min-height: 124px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--v2-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(38, 55, 41, 0.035);
}

body.v2-integrated .v2-overview-metric-card::before {
  display: none;
}

body.v2-integrated .v2-overview-metric-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 11px;
}

body.v2-integrated .v2-overview-metric-icon img {
  width: 24px;
  height: 24px;
}

body.v2-integrated .v2-overview-metric-icon.is-temperature {
  background: #fff0e8;
}

body.v2-integrated .v2-overview-metric-icon.is-humidity {
  background: #e8f3fb;
}

body.v2-integrated .v2-overview-metric-icon.is-ammonia {
  background: #f1ecfb;
}

body.v2-integrated .v2-overview-metric-icon.is-thi {
  background: #ebf3e7;
}

body.v2-integrated .v2-overview-metric-copy {
  min-width: 0;
  display: grid;
}

body.v2-integrated .v2-overview-metric-copy > span {
  margin-bottom: 2px;
  color: #707a72;
  font-size: 15px;
  font-weight: 700;
}

body.v2-integrated .v2-overview-metric-copy > strong {
  color: #253128;
  font-size: 32px;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}

body.v2-integrated .v2-overview-metric-copy > strong em {
  margin-left: 4px;
  color: #7a847c;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

body.v2-integrated .v2-overview-metric-copy p {
  margin: 6px 0 0;
  color: #8a928c;
  font-size: 13px;
  line-height: 1.4;
}

body.v2-integrated .v2-overview-status-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid #cfe2ca;
  border-radius: 999px;
  background: #edf6ea;
  color: #3f7441;
  font-size: 12px;
  font-weight: 800;
}

body.v2-integrated .v2-overview-metric-card[data-status="warn"] .v2-overview-status-pill {
  border-color: #ebd2a7;
  background: #fff7e8;
  color: #946321;
}

body.v2-integrated .v2-overview-metric-card[data-status="bad"] .v2-overview-status-pill {
  border-color: #efc6c2;
  background: #fff0ee;
  color: #a33f37;
}

body.v2-integrated .v2-overview-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.08fr) minmax(300px, 0.92fr);
  gap: 17px;
}

body.v2-integrated .v2-overview-scene-card,
body.v2-integrated .v2-overview-alert-card,
body.v2-integrated .v2-overview-occupancy-card,
body.v2-integrated .v2-overview-activity-card,
body.v2-integrated .v2-overview-zone-table-card {
  border: 1px solid var(--v2-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(38, 55, 41, 0.035);
}

body.v2-integrated .v2-overview-scene-card {
  min-width: 0;
  overflow: hidden;
}

body.v2-integrated .v2-overview-card-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 19px;
  border-bottom: 1px solid #e7ebe7;
}

body.v2-integrated .v2-overview-card-header > div {
  min-width: 0;
}

body.v2-integrated .v2-overview-card-header h2 {
  margin: 0;
  color: #273229;
  font-size: 18px;
}

body.v2-integrated .v2-overview-card-header p {
  margin: 4px 0 0;
  color: #7c867e;
  font-size: 12px;
}

body.v2-integrated .v2-overview-card-header > span {
  flex: 0 0 auto;
  color: #778179;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .v2-overview-live-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid #cfe2ca;
  border-radius: 999px;
  background: #edf6ea;
  color: #3f7441 !important;
  font-size: 11px !important;
  font-weight: 800;
}

body.v2-integrated .v2-overview-live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ebd62;
  box-shadow: 0 0 0 4px rgba(126, 189, 98, 0.1);
}

body.v2-integrated .v2-overview-scene-viewport {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background:
    linear-gradient(rgba(143, 174, 127, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 174, 127, 0.04) 1px, transparent 1px),
    #111912;
  background-size: 32px 32px;
}

body.v2-integrated.farm-overview-mode .v2-overview-scene-viewport > #c {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  border-radius: 0;
  background: #111912;
  box-shadow: none;
  cursor: pointer;
}

body.v2-integrated.farm-overview-mode .v2-overview-scene-viewport > #zone-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.v2-integrated .v2-overview-scene-topline,
body.v2-integrated .v2-overview-scene-toolbar {
  position: absolute;
  z-index: 4;
  display: flex;
  pointer-events: none;
}

body.v2-integrated .v2-overview-scene-topline {
  top: 16px;
  right: 17px;
  left: 17px;
  align-items: center;
  justify-content: space-between;
  color: rgba(232, 239, 228, 0.58);
  font-size: 11px;
  font-weight: 700;
}

body.v2-integrated .v2-overview-scene-toolbar {
  bottom: 17px;
  left: 50%;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(189, 211, 178, 0.12);
  border-radius: 9px;
  background: rgba(12, 19, 14, 0.78);
  color: rgba(224, 234, 219, 0.72);
  font-size: 11px;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

body.v2-integrated .v2-overview-scene-toolbar span {
  padding: 4px 8px;
  white-space: nowrap;
}

body.v2-integrated .v2-overview-side {
  display: grid;
  grid-template-rows: 180px 104px minmax(0, 1fr);
  gap: 14px;
}

body.v2-integrated .v2-overview-alert-card {
  min-height: 180px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-content: center;
  gap: 17px;
  padding: 20px;
  border-color: #d6e3d1;
  background: #f7faf5;
}

body.v2-integrated .v2-overview-alert-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e6efe1;
}

body.v2-integrated .v2-overview-alert-icon img {
  width: 30px;
  height: 30px;
}

body.v2-integrated .v2-overview-alert-card > div:last-child {
  min-width: 0;
  display: grid;
}

body.v2-integrated .v2-overview-alert-card span {
  color: #66815d;
  font-size: 13px;
  font-weight: 800;
}

body.v2-integrated .v2-overview-alert-card strong {
  margin-top: 4px;
  color: #3d5837;
  font-size: 21px;
  line-height: 1.3;
}

body.v2-integrated .v2-overview-alert-card p {
  margin: 7px 0 0;
  color: #6f7c6c;
  font-size: 14px;
  line-height: 1.55;
}

body.v2-integrated .v2-overview-alert-card.is-warning {
  border-color: #ead7b4;
  background: #fffaf1;
}

body.v2-integrated .v2-overview-alert-card.is-warning .v2-overview-alert-icon {
  background: #f9e9c9;
}

body.v2-integrated .v2-overview-alert-card.is-warning :is(span, strong, p) {
  color: #805d2d;
}

body.v2-integrated .v2-overview-alert-card.is-dangerous {
  border-color: #edc8c3;
  background: #fff4f2;
}

body.v2-integrated .v2-overview-alert-card.is-dangerous .v2-overview-alert-icon {
  background: #f7dfdc;
}

body.v2-integrated .v2-overview-alert-card.is-dangerous :is(span, strong, p) {
  color: #8d4039;
}

body.v2-integrated .v2-overview-occupancy-card {
  min-height: 104px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 7px;
  padding: 11px 14px;
}

body.v2-integrated .v2-overview-occupancy-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.v2-integrated .v2-overview-occupancy-card > header > span {
  color: #425047;
  font-size: 13px;
  font-weight: 800;
}

body.v2-integrated .v2-overview-occupancy-card > header > small {
  color: #778179;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

body.v2-integrated .v2-overview-occupancy-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.v2-integrated .v2-overview-occupancy-stat {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid #dde4dc;
  border-radius: 9px;
  background: #f7f9f7;
}

body.v2-integrated .v2-overview-occupancy-stat.is-occupied {
  border-color: #cfe0c9;
  background: #f0f6ed;
}

body.v2-integrated .v2-overview-occupancy-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7ece7;
}

body.v2-integrated .v2-overview-occupancy-stat.is-occupied .v2-overview-occupancy-icon {
  background: #dcebd6;
}

body.v2-integrated .v2-overview-occupancy-icon img {
  width: 17px;
  height: 17px;
  opacity: 0.72;
}

body.v2-integrated .v2-overview-occupancy-stat > span:last-child {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

body.v2-integrated .v2-overview-occupancy-stat small {
  overflow: hidden;
  color: #68736a;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.v2-integrated .v2-overview-occupancy-stat strong {
  color: #344138;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

body.v2-integrated .v2-overview-occupancy-stat.is-occupied strong {
  color: var(--v2-primary-dark);
}

body.v2-integrated .v2-overview-activity-card {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

body.v2-integrated .v2-overview-activity-card > header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e7ebe7;
}

body.v2-integrated .v2-overview-activity-card > header > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.v2-integrated .v2-overview-activity-card > header img {
  width: 18px;
  height: 18px;
}

body.v2-integrated .v2-overview-activity-card h3 {
  margin: 0;
  color: #344138;
  font-size: 15px;
}

body.v2-integrated .v2-overview-activity-card > header > span {
  flex: 0 0 auto;
  color: #7d877f;
  font-size: 11px;
  font-weight: 700;
}

body.v2-integrated .v2-overview-activity-list {
  min-height: 0;
  display: grid;
  grid-auto-rows: minmax(42px, 1fr);
}

body.v2-integrated .v2-overview-activity-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 14px;
  border: 0;
  border-bottom: 1px solid #edf0ed;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

body.v2-integrated .v2-overview-activity-item:last-child {
  border-bottom: 0;
}

body.v2-integrated .v2-overview-activity-item:hover,
body.v2-integrated .v2-overview-activity-item:focus-visible {
  background: #f5f8f4;
}

body.v2-integrated .v2-overview-activity-item > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body.v2-integrated .v2-overview-activity-item strong,
body.v2-integrated .v2-overview-activity-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.v2-integrated .v2-overview-activity-item strong {
  color: #344138;
  font-size: 13px;
}

body.v2-integrated .v2-overview-activity-item small {
  color: #879088;
  font-size: 11px;
}

body.v2-integrated .v2-overview-activity-item time {
  color: #6f7a71;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.v2-integrated .v2-overview-activity-item > img {
  width: 15px;
  height: 15px;
  opacity: 0.55;
}

body.v2-integrated .v2-overview-activity-empty {
  align-self: center;
  margin: 0;
  padding: 18px;
  color: #7f8981;
  font-size: 12px;
  text-align: center;
}

body.v2-integrated .v2-overview-zone-table-card {
  overflow: hidden;
}

body.v2-integrated .v2-overview-table-scroll {
  overflow-x: auto;
}

body.v2-integrated .v2-overview-zone-table-card table {
  width: 100%;
  border-collapse: collapse;
  color: #58635b;
  font-size: 13px;
}

body.v2-integrated .v2-overview-zone-table-card th {
  padding: 11px 16px;
  border-bottom: 1px solid #e5e9e5;
  background: #f8faf8;
  color: #778179;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

body.v2-integrated .v2-overview-zone-table-card td {
  padding: 13px 16px;
  border-bottom: 1px solid #edf0ed;
  white-space: nowrap;
}

body.v2-integrated .v2-overview-zone-table-card tbody tr:last-child td {
  border-bottom: 0;
}

body.v2-integrated .v2-overview-zone-table-card td > strong,
body.v2-integrated .v2-overview-zone-table-card td > span:not(.overview-table-status) {
  display: block;
}

body.v2-integrated .v2-overview-zone-table-card td > strong {
  color: #344138;
  font-size: 13px;
}

body.v2-integrated .v2-overview-zone-table-card td > span:not(.overview-table-status) {
  margin-top: 3px;
  color: #8a948d;
  font-size: 11px;
}

body.v2-integrated .overview-table-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

body.v2-integrated .overview-table-status.is-occupied {
  border: 1px solid #cfe2ca;
  background: #edf6ea;
  color: #3f7441;
}

body.v2-integrated .overview-table-status.is-empty {
  border: 1px solid #dde2de;
  background: #f3f5f3;
  color: #768078;
}

body.v2-integrated .overview-table-action {
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--v2-primary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

body.v2-integrated .overview-table-action:hover {
  color: var(--v2-primary-dark);
  text-decoration: underline;
}

body.v2-integrated .v2-overview-trend-section {
  border: 1px solid var(--v2-border);
  background: #fff;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(38, 55, 41, 0.035);
}

body.v2-integrated .v2-overview-trend-section .overview-trend-grid {
  gap: 14px;
}

body.v2-integrated .v2-overview-trend-section .overview-trend-card {
  border-color: #e3e8e3;
  background: #f8faf8;
  min-height: 168px;
  padding: 14px 16px 16px;
}

body.v2-integrated .v2-overview-trend-section .overview-trend-card canvas {
  height: 116px !important;
}

@media (max-width: 1280px) {
  body.v2-integrated .v2-overview-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.v2-integrated .v2-overview-main-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  }
}

@media (max-width: 1100px) {
  body.v2-integrated.farm-overview-mode #info-panel {
    top: 82px;
    right: 12px;
    bottom: 14px;
    left: 12px;
    width: auto;
  }

  body.v2-integrated.deer-archive-history-mode
    #deer-archive-history-page {
    top: 82px;
    right: 12px;
    bottom: 14px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 900px) {
  body.v2-integrated .v2-overview-main-grid {
    grid-template-columns: 1fr;
  }

  body.v2-integrated .v2-overview-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
  }

  body.v2-integrated .v2-overview-activity-card {
    grid-column: 1 / -1;
    min-height: 180px;
  }
}

@media (max-width: 760px) {
  body.v2-integrated.farm-overview-mode #info-panel {
    top: 76px;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    height: auto;
  }

  body.v2-integrated.deer-archive-history-mode
    #deer-archive-history-page {
    top: 76px;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
  }

  body.v2-integrated.farm-overview-mode #panel-header {
    padding-bottom: 14px;
  }

  body.v2-integrated.farm-overview-mode #panel-title {
    font-size: 24px;
  }

  body.v2-integrated .v2-overview-metric-grid,
  body.v2-integrated .v2-overview-side,
  body.v2-integrated .overview-trend-grid {
    grid-template-columns: 1fr;
  }

  body.v2-integrated .v2-overview-activity-card {
    grid-column: auto;
  }

  body.v2-integrated .v2-overview-scene-viewport {
    min-height: 430px;
  }

  body.v2-integrated.farm-overview-mode .v2-overview-scene-viewport > #c {
    inset: 0;
    width: 100% !important;
    height: 100% !important;
  }

  body.v2-integrated .v2-overview-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  body.v2-integrated .v2-overview-scene-toolbar span:nth-child(3) {
    display: none;
  }
}

/*
 * Record workspace readability trial.
 * Keep the increment in one variable so the six related views can be
 * reviewed together and reduced without hunting through individual rules.
 */
body.v2-integrated {
  --v2-record-font-bump: 2px;
}

/* Deer profile: archive action stays in the title row, apart from editing. */
body.v2-integrated #open-deer-profile-archive-button {
  display: none;
}

body.v2-integrated.deer-profile-workspace-mode
  #open-deer-profile-archive-button:not([hidden]) {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid #dfc5bd;
  border-radius: 8px;
  background: #fff5f2;
  color: #9a493e;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

body.v2-integrated.deer-profile-workspace-mode
  #open-deer-profile-archive-button:not([hidden]):hover {
  border-color: #cfa99f;
  background: #fcece8;
}

body.v2-integrated.deer-profile-workspace-mode
  #open-deer-profile-archive-button:not([hidden]):disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

body.v2-integrated .deer-profile-section-head > div > span {
  font-size: calc(9px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-profile-section-head h3 {
  font-size: calc(16px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-profile-section-edit,
body.v2-integrated .deer-profile-section-actions button {
  font-size: calc(11px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-profile-info-item dt {
  font-size: calc(11px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-profile-info-item dd {
  font-size: calc(17px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-profile-info-item small {
  font-size: calc(10px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-profile-notes-content {
  font-size: calc(13px + var(--v2-record-font-bump));
}

/* Body measurement overview and history. */
body.v2-integrated .measurement-summary-card > span {
  font-size: calc(14px + var(--v2-record-font-bump));
}

body.v2-integrated .measurement-summary-card > strong {
  font-size: clamp(
    calc(24px + var(--v2-record-font-bump)),
    calc(2vw + var(--v2-record-font-bump)),
    calc(30px + var(--v2-record-font-bump))
  );
}

body.v2-integrated .measurement-summary-card > small,
body.v2-integrated .measurement-change,
body.v2-integrated .measurement-latest-time {
  font-size: calc(13px + var(--v2-record-font-bump));
}

body.v2-integrated .measurement-history-section-head h3 {
  font-size: calc(18px + var(--v2-record-font-bump));
}

body.v2-integrated .measurement-history-section-head p,
body.v2-integrated .measurement-record-notes p,
body.v2-integrated .measurement-view-empty p {
  font-size: calc(14px + var(--v2-record-font-bump));
}

body.v2-integrated .measurement-history-section-head > span,
body.v2-integrated .measurement-record-head > span {
  font-size: calc(12px + var(--v2-record-font-bump));
}

body.v2-integrated .measurement-record-head time {
  font-size: calc(15px + var(--v2-record-font-bump));
}

body.v2-integrated .measurement-record-values span,
body.v2-integrated .measurement-record-notes > span {
  font-size: calc(13px + var(--v2-record-font-bump));
}

body.v2-integrated .measurement-record-values strong,
body.v2-integrated .measurement-view-empty strong {
  font-size: calc(18px + var(--v2-record-font-bump));
}

/* Antler growth, round history and harvest records. */
body.v2-integrated .antler-workspace-tabs button {
  font-size: calc(13px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-workspace-tabs button span,
body.v2-integrated .antler-progress-status {
  font-size: calc(12px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-core-head h3,
body.v2-integrated .antler-growth-core > h3 {
  font-size: calc(20px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-core-head p,
body.v2-integrated .antler-section-head p,
body.v2-integrated .antler-history-notes p,
body.v2-integrated .antler-round-empty,
body.v2-integrated .antler-harvest-empty {
  font-size: calc(14px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-stage-hero span,
body.v2-integrated .antler-stage-step,
body.v2-integrated .antler-estimate-row,
body.v2-integrated .antler-history-cycle,
body.v2-integrated .antler-history-harvest-time,
body.v2-integrated .antler-round-period,
body.v2-integrated .antler-round-metrics span,
body.v2-integrated .antler-harvest-summary span,
body.v2-integrated .antler-harvest-count-notice {
  font-size: calc(13px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-stage-hero strong,
body.v2-integrated .antler-round-card-head h4,
body.v2-integrated .antler-harvest-card-head h4 {
  font-size: calc(17px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-stage-hero .antler-stage-current strong {
  font-size: calc(28px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-stage-node,
body.v2-integrated .antler-stage-state,
body.v2-integrated .antler-stage-date,
body.v2-integrated .antler-estimate-row small,
body.v2-integrated .antler-section-head > span,
body.v2-integrated .antler-history-source,
body.v2-integrated .antler-unassigned-records summary::after,
body.v2-integrated .antler-unassigned-records summary span,
body.v2-integrated .antler-round-card-head span,
body.v2-integrated .antler-round-card-head > strong,
body.v2-integrated .antler-round-stage-flow span,
body.v2-integrated .antler-harvest-card-head span,
body.v2-integrated .antler-harvest-card-head time,
body.v2-integrated .antler-harvest-card-body span,
body.v2-integrated .antler-harvest-card-body strong.is-pending,
body.v2-integrated .antler-harvest-quality > span,
body.v2-integrated .antler-harvest-quality > div span {
  font-size: calc(12px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-stage-step strong,
body.v2-integrated .antler-progress-message,
body.v2-integrated .antler-unassigned-records summary,
body.v2-integrated .antler-harvest-card-body strong {
  font-size: calc(14px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-core-actions button,
body.v2-integrated .antler-round-detail summary,
body.v2-integrated .antler-harvest-edit-button {
  font-size: calc(13px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-section-head h3 {
  font-size: calc(18px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-history-head strong {
  font-size: calc(15px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-history-head time,
body.v2-integrated .antler-history-notes > span {
  font-size: calc(13px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-round-period small,
body.v2-integrated .antler-round-metrics small {
  font-size: calc(11px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-harvest-summary strong {
  font-size: calc(18px + var(--v2-record-font-bump));
}

body.v2-integrated .antler-harvest-summary > div:first-child strong {
  font-size: calc(27px + var(--v2-record-font-bump));
}

/* Feeding form, today cards and history table. */
body.v2-integrated .feeding-page-header h2 {
  font-size: calc(25px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-page-header p,
body.v2-integrated .feeding-form-hint,
body.v2-integrated .feeding-form-message,
body.v2-integrated .feeding-record-secondary,
body.v2-integrated .feeding-history-table th {
  font-size: calc(12px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-context-summary span,
body.v2-integrated .feeding-page-tabs button,
body.v2-integrated .feeding-card-head p,
body.v2-integrated .feeding-form-field > span,
body.v2-integrated .feeding-form-actions button,
body.v2-integrated .feeding-record-amounts span,
body.v2-integrated .feeding-record-actions button,
body.v2-integrated .feeding-record-deleted-note,
body.v2-integrated .feeding-filter-field > span,
body.v2-integrated .feeding-deleted-toggle,
body.v2-integrated .feeding-history-head p,
body.v2-integrated .feeding-record-state,
body.v2-integrated .feeding-empty-state p,
body.v2-integrated .feeding-empty-state button {
  font-size: calc(13px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-context-summary strong,
body.v2-integrated .feeding-form-field input,
body.v2-integrated .feeding-form-field select,
body.v2-integrated .feeding-form-field textarea,
body.v2-integrated .feeding-record-panel > .feeding-card-head p,
body.v2-integrated .feeding-record-meta,
body.v2-integrated .feeding-record-note,
body.v2-integrated .feeding-filter-field input,
body.v2-integrated .feeding-filter-field select,
body.v2-integrated .feeding-filter-actions button,
body.v2-integrated .feeding-history-status,
body.v2-integrated .feeding-history-table,
body.v2-integrated .feeding-record-primary,
body.v2-integrated .feeding-pagination button,
body.v2-integrated .feeding-pagination span {
  font-size: calc(14px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-card-head h3,
body.v2-integrated .feeding-history-head h3 {
  font-size: calc(21px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-record-panel > .feeding-card-head h3 {
  font-size: calc(23px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-record-card-head .feeding-record-time {
  font-size: calc(19px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-record-identity small {
  font-size: calc(11px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-record-identity b {
  font-size: calc(16px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-slot-badge {
  font-size: calc(13px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-record-amounts strong {
  font-size: calc(24px + var(--v2-record-font-bump));
}

body.v2-integrated .feeding-empty-state strong {
  font-size: calc(17px + var(--v2-record-font-bump));
}

/* Zone movement and archived-profile history share this page. */
body.v2-integrated .deer-archive-pane-title strong {
  font-size: calc(15px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-archive-pane-title span,
body.v2-integrated .deer-archive-list-item > span:last-child,
body.v2-integrated .deer-archive-status,
body.v2-integrated .deer-archive-detail-label,
body.v2-integrated .deer-archive-summary-card span,
body.v2-integrated .deer-archive-facts span,
body.v2-integrated .deer-archive-count-grid span,
body.v2-integrated .deer-archive-preserved-note,
body.v2-integrated .deer-archive-event-list time,
body.v2-integrated .deer-archive-event-list p,
body.v2-integrated .deer-archive-empty {
  font-size: calc(12px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-archive-list-main strong {
  font-size: calc(16px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-archive-detail-head h3 {
  font-size: calc(26px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-archive-summary-card strong,
body.v2-integrated .deer-archive-facts strong {
  font-size: calc(13px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-archive-detail .section-label {
  font-size: calc(13px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-archive-count-grid strong {
  font-size: calc(19px + var(--v2-record-font-bump));
}

body.v2-integrated .deer-archive-event-list strong {
  font-size: calc(12px + var(--v2-record-font-bump));
}
