body.management-modal-open {
  overflow: hidden;
}

body.v2-integrated .management-modal-root[hidden],
body.v2-integrated .management-modal-discard-layer[hidden] {
  display: none !important;
}

body.v2-integrated .management-modal-root {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(30, 40, 33, 0.58);
  opacity: 0;
  transition: opacity 140ms ease;
}

body.v2-integrated .management-modal-root.is-open {
  opacity: 1;
}

body.v2-integrated .management-modal-root.is-closing {
  opacity: 0;
  pointer-events: none;
}

body.v2-integrated .management-modal-dialog {
  width: min(760px, calc(100vw - 40px));
  max-height: min(820px, calc(100dvh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #d7dfd7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(28, 40, 31, 0.3);
  color: #29362d;
  transform: translateY(8px) scale(0.99);
  transition: transform 140ms ease;
}

body.v2-integrated .management-modal-root.is-open .management-modal-dialog {
  transform: translateY(0) scale(1);
}

body.v2-integrated .management-modal-dialog[data-management-modal-size="small"] {
  width: min(480px, calc(100vw - 40px));
}

body.v2-integrated .management-modal-dialog[data-management-modal-size="large"] {
  width: min(920px, calc(100vw - 40px));
}

body.v2-integrated .management-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e3e8e3;
}

body.v2-integrated .management-modal-header > div > span,
body.v2-integrated .management-modal-confirm-dialog > span {
  color: #4a713c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

body.v2-integrated .management-modal-header h2 {
  margin: 5px 0 0;
  color: #26332a;
  font-size: 25px;
  line-height: 1.2;
}

body.v2-integrated .management-modal-header p {
  margin: 7px 0 0;
  color: #6b776e;
  font-size: 13px;
}

body.v2-integrated .management-modal-close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid #d7ded7;
  border-radius: 11px;
  background: #f5f7f5;
  color: #536057;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

body.v2-integrated .management-modal-close:hover:not(:disabled) {
  border-color: #bcc8bc;
  background: #edf2ed;
}

body.v2-integrated .management-modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 24px 26px;
}

body.v2-integrated .management-form-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

body.v2-integrated .management-form-section + .management-form-section {
  margin-top: 22px;
  padding-top: 21px;
  border-top: 1px solid #e5eae5;
}

body.v2-integrated .management-form-section legend {
  margin-bottom: 14px;
  color: #344139;
  font-size: 16px;
  font-weight: 850;
}

body.v2-integrated .management-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

body.v2-integrated .management-form-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  color: #4f5d53;
  font-size: 13px;
  font-weight: 750;
}

body.v2-integrated .management-form-field-wide {
  grid-column: 1 / -1;
}

body.v2-integrated .management-form-field b {
  color: #9b493f;
}

body.v2-integrated .management-form-field :is(input, select, textarea) {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #d5ddd5;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #29362d;
  font: inherit;
  font-size: 15px;
  font-weight: 550;
}

body.v2-integrated .management-form-field textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.55;
}

body.v2-integrated .management-form-field :is(input, select, textarea):focus {
  border-color: #739268;
  box-shadow: 0 0 0 3px rgba(83, 120, 67, 0.14);
}

body.v2-integrated .management-form-field :is(input, select, textarea)[aria-invalid="true"] {
  border-color: #b84b42;
  box-shadow: 0 0 0 3px rgba(184, 75, 66, 0.1);
}

body.v2-integrated .management-form-field [data-disease-field-error],
body.v2-integrated .management-form-field [data-management-field-error] {
  min-height: 17px;
  color: #a13f37;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .management-field-hint {
  color: #748078;
  font-size: 12px;
  font-weight: 500;
}

body.v2-integrated .management-form-hint {
  margin-top: 18px;
  padding: 11px 13px;
  border: 1px solid #dce6d8;
  border-radius: 9px;
  background: #f5f9f3;
  color: #5e6c5e;
  font-size: 13px;
  line-height: 1.55;
}

body.v2-integrated .management-form-error {
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid #e3bbb6;
  border-radius: 9px;
  background: #fff1ef;
  color: #953a32;
  font-size: 13px;
  font-weight: 700;
}

body.v2-integrated .management-feeding-delete-form {
  display: grid;
  gap: 16px;
}

body.v2-integrated .management-feeding-delete-summary {
  padding: 13px 14px;
  border: 1px solid #e1c5c1;
  border-radius: 10px;
  background: #fff5f3;
  color: #663b36;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.6;
}

body.v2-integrated .management-modal-footer {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 24px;
  border-top: 1px solid #e1e7e1;
  background: #fbfcfb;
}

body.v2-integrated .management-modal-footer > span {
  color: #667269;
  font-size: 12px;
}

body.v2-integrated .management-modal-footer > div,
body.v2-integrated .management-modal-confirm-dialog > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

body.v2-integrated .management-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 .management-button-primary {
  border-color: #456b37;
  background: #456b37;
  color: #fff;
}

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

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

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

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

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

body.v2-integrated .management-button:disabled,
body.v2-integrated .management-modal-close:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

body.v2-integrated .management-modal-discard-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(28, 37, 31, 0.66);
}

body.v2-integrated .management-modal-confirm-dialog {
  width: min(430px, calc(100vw - 40px));
  padding: 24px;
  border: 1px solid #dce3dc;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(29, 41, 32, 0.32);
}

body.v2-integrated .management-modal-confirm-dialog h3 {
  margin: 7px 0 0;
  color: #29362d;
  font-size: 21px;
}

body.v2-integrated .management-modal-confirm-dialog p {
  margin: 10px 0 20px;
  color: #657168;
  font-size: 14px;
  line-height: 1.6;
}

body.v2-integrated :is(
  .management-modal-close,
  .management-button
):focus-visible {
  outline: 3px solid rgba(71, 107, 56, 0.22);
  outline-offset: 2px;
}

body.v2-integrated .management-toast-region {
  position: fixed;
  z-index: 6000;
  top: 88px;
  right: 20px;
  width: min(380px, calc(100vw - 40px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

body.v2-integrated .management-toast {
  padding: 12px 15px;
  border: 1px solid #c8d8c3;
  border-radius: 11px;
  background: #f1f7ee;
  box-shadow: 0 12px 32px rgba(34, 48, 37, 0.18);
  color: #3d6031;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

body.v2-integrated .management-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.v2-integrated .management-toast.is-error {
  border-color: #e1bdb8;
  background: #fff0ee;
  color: #963d35;
}

body.v2-integrated .management-toast.is-warning {
  border-color: #e2cfab;
  background: #fff7e8;
  color: #795a28;
}

body.v2-integrated .management-photo-confirm {
  display: grid;
  gap: 16px;
}

body.v2-integrated .management-photo-confirm-preview {
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dce4dc;
  border-radius: 12px;
  background: #eef2ee;
}

body.v2-integrated .management-photo-confirm-preview img {
  display: block;
  width: 100%;
  height: min(360px, 42vh);
  object-fit: contain;
}

body.v2-integrated .management-photo-confirm-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid #dfe5df;
  border-radius: 11px;
  background: #f8faf8;
}

body.v2-integrated .management-photo-confirm-details > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 13px 15px;
}

body.v2-integrated .management-photo-confirm-details > div + div {
  border-left: 1px solid #dfe5df;
}

body.v2-integrated .management-photo-confirm-details dt {
  color: #6c786f;
  font-size: 12px;
  font-weight: 700;
}

body.v2-integrated .management-photo-confirm-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #2e3b32;
  font-size: 14px;
  font-weight: 800;
}

body.v2-integrated .management-photo-confirm .management-form-hint {
  margin-top: 0;
}

body.v2-integrated .management-photo-confirm .management-form-error {
  margin: 0;
}

body.v2-integrated .management-delete-summary {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border: 1px solid #e3e8e3;
  border-radius: 11px;
  background: #f8faf8;
}

body.v2-integrated .management-delete-summary span,
body.v2-integrated .management-delete-summary p {
  margin: 0;
  color: #6d786f;
  font-size: 12px;
}

body.v2-integrated .management-delete-summary strong {
  color: #2c3930;
  font-size: 17px;
}

body.v2-integrated .management-delete-summary + .management-form-error {
  margin: 14px 0 0;
}

body.v2-integrated .management-profile-form,
body.v2-integrated .management-profile-archive-form {
  color-scheme: light;
}

body.v2-integrated .management-profile-form .profile-form-hint {
  margin-top: 18px;
}

body.v2-integrated .management-profile-form .management-form-error,
body.v2-integrated .management-profile-archive-form .management-form-error {
  margin: 18px 0 0;
}

body.v2-integrated .management-risk-confirm {
  margin-top: 16px;
  padding: 14px 15px;
  border: 1px solid #e2c99e;
  border-radius: 10px;
  background: #fff8eb;
  color: #684d24;
}

body.v2-integrated .management-risk-confirm strong {
  display: block;
  font-size: 15px;
}

body.v2-integrated .management-risk-confirm p {
  margin: 6px 0 12px;
  font-size: 13px;
  line-height: 1.55;
}

body.v2-integrated .management-risk-confirm label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

body.v2-integrated .management-risk-confirm input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: #4a713c;
}

body.v2-integrated .management-risk-confirm input[aria-invalid="true"] {
  outline: 3px solid rgba(184, 75, 66, 0.18);
  outline-offset: 2px;
}

body.v2-integrated .management-profile-archive-warning {
  margin: 0 0 18px;
  padding: 13px 15px;
  border: 1px solid #e4c9a6;
  border-radius: 10px;
  background: #fff8ed;
  color: #705638;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
}

@media (max-width: 760px) {
  body.v2-integrated .management-modal-root {
    padding: 0;
  }

  body.v2-integrated .management-modal-dialog,
  body.v2-integrated .management-modal-dialog[data-management-modal-size] {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  body.v2-integrated .management-modal-header {
    padding: 18px 18px 15px;
  }

  body.v2-integrated .management-modal-header h2 {
    font-size: 22px;
  }

  body.v2-integrated .management-modal-body {
    padding: 18px;
    scroll-padding-bottom: 96px;
  }

  body.v2-integrated .management-modal-footer {
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  }

  body.v2-integrated .management-toast-region {
    top: 72px;
    right: 12px;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 560px) {
  body.v2-integrated .management-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  body.v2-integrated .management-modal-footer > div,
  body.v2-integrated .management-modal-footer button {
    width: 100%;
  }

  body.v2-integrated .management-modal-confirm-dialog > div {
    flex-direction: column-reverse;
  }

  body.v2-integrated .management-modal-confirm-dialog button {
    width: 100%;
  }

  body.v2-integrated .management-form-grid {
    grid-template-columns: 1fr;
  }

  body.v2-integrated .management-form-field-wide {
    grid-column: auto;
  }

  body.v2-integrated .management-photo-confirm-details {
    grid-template-columns: 1fr;
  }

  body.v2-integrated .management-photo-confirm-details > div + div {
    border-top: 1px solid #dfe5df;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.v2-integrated .management-modal-root,
  body.v2-integrated .management-modal-dialog,
  body.v2-integrated .management-toast {
    transition: none;
  }
}
