body.pest-open {
  overflow: hidden;
}
.pest-overlay[hidden] {
  display: none;
}
.pest-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: auto;
  background: #e6eae5;
}
.pest-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 18px 44px;
  background: var(--paper, #f4f4ef);
  box-shadow: 0 0 45px #192e2417;
}
.pest-topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 19px 2px;
}
.pest-topbar .pest-back {
  border: 0;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 13px;
  background: #e1e6e1;
  color: #17201c;
  font-size: 31px;
  line-height: 1;
}
.pest-topbar p {
  margin: 0;
  color: #164b37;
  letter-spacing: 0.17em;
  font-size: 9px;
  font-weight: 900;
}
.pest-topbar h1 {
  margin: 5px 0 0;
  font-size: 23px;
  letter-spacing: -0.04em;
}
.pest-topbar span {
  display: block;
  margin-top: 6px;
  color: #66716b;
  font-size: 11px;
}
.pest-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, #184734, #0d2c21);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 12px 26px #164b372b;
}
.pest-status.danger {
  background: linear-gradient(135deg, #8a2731, #56171e);
}
.pest-status div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pest-status small {
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 900;
}
.pest-status strong {
  font-size: 20px;
}
.pest-status span {
  color: #dce7e0;
  font-size: 12px;
  line-height: 1.45;
}
.pest-status b {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ffffff14;
  border: 1px solid #ffffff26;
  font-size: 24px;
}
.pest-form {
  display: grid;
  gap: 11px;
  margin: 12px 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #d8ded9;
  border-radius: 18px;
  box-shadow: 0 5px 16px #17201c09;
}
.pest-form-title span {
  color: #8b5b08;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 900;
}
.pest-form-title h2 {
  margin: 5px 0 0;
  font-size: 20px;
}
.pest-form label {
  display: grid;
  gap: 6px;
  color: #455049;
  font-size: 13px;
  font-weight: 800;
}
.pest-form input,
.pest-form select,
.pest-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid #c8d0cb;
  border-radius: 13px;
  background: #fbfcfa;
  color: #17201c;
  font: inherit;
  font-size: 16px;
}
.pest-form textarea {
  min-height: 92px;
  resize: vertical;
}
.pest-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pest-submit {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  background: #8b5b08;
  color: #fff;
  font-weight: 900;
}
.pest-form-error,
.pest-error {
  margin: 0;
  padding: 10px;
  border-radius: 10px;
  background: #fff0f1;
  color: #a91f2a;
  font-size: 12px;
  line-height: 1.45;
}
.pest-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 2px 9px;
}
.pest-section-heading h2 {
  margin: 0;
  font-size: 16px;
}
.pest-section-heading span {
  color: #66716b;
  font-size: 12px;
  font-weight: 800;
}
.pest-records {
  display: grid;
  gap: 9px;
}
.pest-record {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e1c27e;
  border-radius: 15px;
  background: #fff9ec;
}
.pest-record.high,
.pest-record.critical {
  border-color: #df9ca3;
  background: #fff3f4;
}
.pest-record > div {
  min-width: 0;
}
.pest-record span {
  color: #8b5b08;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 900;
}
.pest-record.high span,
.pest-record.critical span {
  color: #a91f2a;
}
.pest-record strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
}
.pest-record p {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.pest-record small {
  display: block;
  margin-top: 4px;
  color: #66716b;
  font-size: 11px;
  line-height: 1.4;
}
.pest-record button {
  align-self: center;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #17201c;
  color: #fff;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 900;
}
.pest-followup {
  border-color: #b9c9bf;
}
.pest-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.pest-cancel {
  min-height: 48px;
  border: 1px solid #c8d0cb;
  border-radius: 13px;
  background: #f2f4f1;
  color: #17201c;
  font-weight: 900;
}
.pest-history {
  display: grid;
  gap: 8px;
}
.pest-resolved {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #d8ded9;
  border-radius: 13px;
  background: #fff;
}
.pest-resolved i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #e3eee7;
  color: #164b37;
  font-style: normal;
  font-weight: 900;
}
.pest-resolved strong {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}
.pest-resolved small {
  display: block;
  margin-top: 4px;
  color: #66716b;
  font-size: 11px;
  line-height: 1.4;
}
.pest-empty,
.pest-note,
.pest-loading {
  margin: 10px 0;
  padding: 12px;
  border-radius: 11px;
  background: #edf3ef;
  color: #455049;
  font-size: 12px;
  line-height: 1.45;
}
.pest-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10000;
  padding: 11px 14px;
  border-radius: 12px;
  background: #17201c;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 12px 30px #0003;
}
@media (max-width: 370px) {
  .pest-pair {
    grid-template-columns: 1fr;
  }
  .pest-record {
    grid-template-columns: 1fr;
  }
  .pest-record button {
    width: 100%;
  }
}
@media (min-width: 700px) {
  .pest-overlay {
    padding: 24px 0;
  }
  .pest-shell {
    min-height: calc(100vh - 48px);
    border-radius: 28px;
    overflow: hidden;
  }
}
.pest-photo-field {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d9c99e;
  border-radius: 14px;
  background: #fffaf0;
}
.pest-photo-field > span {
  color: #455049;
  font-size: 13px;
  font-weight: 900;
}
.pest-photo-pick {
  position: relative;
  display: block !important;
  overflow: hidden;
  border-radius: 12px;
  touch-action: manipulation;
}
.pest-photo-pick input {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: auto !important;
  cursor: pointer;
}
.pest-photo-pick b {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 10px 13px;
  border: 1px dashed #a77418;
  border-radius: 12px;
  background: #fff;
  color: #7d5208;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}
.pest-photo-status {
  color: #66716b;
  font-size: 11px !important;
  line-height: 1.4;
}
.pest-photo-preview {
  display: block;
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d8ded9;
  background: #eef1ee;
}
.pest-photo-waive {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 700 !important;
}
.pest-photo-waive input {
  width: 18px !important;
  height: 18px !important;
  min-height: 0 !important;
  padding: 0 !important;
}
.pest-photo-reason {
  min-height: 74px !important;
}
.pest-record-photo {
  margin-top: 9px;
}
.pest-view-photo {
  min-height: 36px !important;
  padding: 7px 10px !important;
  border: 1px solid #b7c8bd !important;
  border-radius: 9px !important;
  background: #edf4ef !important;
  color: #164b37 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}
.pest-photo-missing {
  display: inline-block !important;
  color: #8b5b08 !important;
  background: #fff1cc;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.pest-photo-viewer[hidden] {
  display: none;
}
.pest-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #07110dcf;
  backdrop-filter: blur(4px);
}
.pest-photo-card {
  position: relative;
  width: min(92vw, 760px);
  max-height: 90vh;
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px #0008;
}
.pest-photo-card > strong {
  display: block;
  padding: 2px 46px 10px 2px;
  font-size: 14px;
}
.pest-photo-card > p {
  margin: 10px 0;
  color: #66716b;
  font-size: 12px;
}
.pest-photo-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
  background: #eef1ee;
}
.pest-photo-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  background: #17201c;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

/* BUILD-20260826-015 — Pest Control keeps the desktop Beyond the Line shell. */
@media(min-width:900px){
  body.desktop-ready .pest-overlay{left:244px;right:0;top:0;bottom:0}
  body.desktop-ready .pest-shell{width:calc(100% - 40px);max-width:1200px;min-height:calc(100vh - 40px);margin:20px auto;padding:0 24px 44px;border-radius:24px;overflow:hidden;box-shadow:0 18px 50px rgba(38,55,47,.10)}
}
