body.maintenance-open {
  overflow: hidden;
}
.maintenance-overlay[hidden] {
  display: none;
}
.maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  overflow: auto;
  background: #e6e9e6;
}
.maintenance-shell {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 18px 48px;
  background: var(--paper, #f4f4ef);
  box-shadow: 0 0 45px #192e2417;
}
.maintenance-topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 19px 2px;
}
.maintenance-back {
  border: 0;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 13px;
  background: #e1e6e1;
  color: #17201c;
  font-size: 31px;
  line-height: 1;
}
.maintenance-topbar p {
  margin: 0;
  color: #164b37;
  letter-spacing: 0.17em;
  font-size: 9px;
  font-weight: 900;
}
.maintenance-topbar h1 {
  margin: 5px 0 0;
  font-size: 23px;
  letter-spacing: -0.04em;
}
.maintenance-topbar span {
  display: block;
  margin-top: 6px;
  color: #66716b;
  font-size: 11px;
}
.maintenance-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;
}
.maintenance-status.danger {
  background: linear-gradient(135deg, #8a2731, #56171e);
}
.maintenance-status div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.maintenance-status small {
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 900;
}
.maintenance-status strong {
  font-size: 20px;
}
.maintenance-status span {
  color: #dce7e0;
  font-size: 12px;
  line-height: 1.45;
}
.maintenance-status b {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ffffff14;
  border: 1px solid #ffffff26;
  font-size: 24px;
}
.maintenance-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;
}
.maintenance-form-title span {
  color: #8b5b08;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 900;
}
.maintenance-form-title h2 {
  margin: 5px 0 0;
  font-size: 20px;
}
.maintenance-form label {
  display: grid;
  gap: 6px;
  color: #455049;
  font-size: 13px;
  font-weight: 800;
}
.maintenance-form input,
.maintenance-form select,
.maintenance-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid #c8d0cb;
  border-radius: 13px;
  background: #fbfcfa;
  color: #17201c;
  font: inherit;
}
.maintenance-form textarea {
  min-height: 92px;
  resize: vertical;
}
.maintenance-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.maintenance-submit,
.maintenance-followup-button,
.maintenance-view-photo,
.maintenance-cancel {
  border: 0;
  border-radius: 13px;
  min-height: 46px;
  padding: 11px 14px;
  font-weight: 900;
  cursor: pointer;
}
.maintenance-submit,
.maintenance-followup-button {
  background: #174c38;
  color: #fff;
}
.maintenance-submit:disabled {
  opacity: 0.58;
}
.maintenance-cancel {
  background: #e8ece9;
  color: #24342c;
}
.maintenance-view-photo {
  min-height: 38px;
  padding: 8px 11px;
  background: #edf3ef;
  color: #164b37;
  border: 1px solid #cbd9d1;
}
.maintenance-photo-field {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed #b8c4bc;
  border-radius: 14px;
  background: #f7f9f7;
}
.maintenance-photo-field > span {
  font-size: 13px;
  font-weight: 900;
  color: #35433b;
}
.maintenance-photo-field em {
  font-style: normal;
  font-weight: 600;
  color: #778079;
}
.maintenance-photo-pick {
  position: relative;
  display: block !important;
  overflow: hidden;
  border-radius: 12px;
  touch-action: manipulation;
}
.maintenance-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;
}
.maintenance-photo-pick b {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 12px;
  background: #e7eee9;
  color: #164b37;
  border: 1px solid #c6d3cb;
}
.maintenance-photo-status,
.maintenance-photo-field small {
  font-size: 11px;
  color: #69736d;
  line-height: 1.45;
}
.maintenance-photo-preview,
.maintenance-resolution-preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d3d9d5;
}
.maintenance-photo-waive {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 700 !important;
}
.maintenance-photo-waive input {
  width: 18px !important;
  min-height: 18px !important;
  height: 18px !important;
  margin: 0;
}
.maintenance-photo-reason[hidden],
.maintenance-photo-preview[hidden],
.maintenance-resolution-preview[hidden] {
  display: none;
}
.maintenance-form-error,
.maintenance-error {
  margin: 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fbeaec;
  color: #8a2731;
  font-size: 12px;
  font-weight: 800;
}
.maintenance-form-error[hidden] {
  display: none;
}
.maintenance-note,
.maintenance-empty,
.maintenance-loading {
  padding: 15px;
  border-radius: 14px;
  background: #eef2ee;
  color: #5f6963;
  font-size: 12px;
  line-height: 1.55;
}
.maintenance-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 2px 10px;
}
.maintenance-section-heading h2 {
  margin: 0;
  font-size: 17px;
}
.maintenance-section-heading span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e3e9e5;
  color: #164b37;
  font-size: 12px;
  font-weight: 900;
}
.maintenance-records,
.maintenance-history {
  display: grid;
  gap: 10px;
}
.maintenance-record {
  display: grid;
  gap: 10px;
  padding: 15px;
  background: #fff;
  border: 1px solid #d8ded9;
  border-radius: 17px;
  box-shadow: 0 4px 13px #17201c08;
}
.maintenance-record.danger {
  border-color: #d8a2a7;
  background: #fffafb;
}
.maintenance-record.resolved {
  opacity: 0.88;
}
.maintenance-record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.maintenance-record-head span {
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 900;
  color: #8b5b08;
}
.maintenance-record-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}
.maintenance-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}
.maintenance-badges b {
  padding: 5px 7px;
  border-radius: 999px;
  background: #edf1ee;
  color: #4b5851;
  font-size: 9px;
  white-space: nowrap;
}
.maintenance-badges b.repeat {
  background: #fff0d6;
  color: #80540a;
}
.maintenance-record p {
  margin: 0;
  color: #39463f;
  font-size: 13px;
  line-height: 1.5;
}
.maintenance-record > small {
  color: #78817c;
  font-size: 10px;
}
.maintenance-record dl {
  display: grid;
  gap: 7px;
  margin: 0;
}
.maintenance-record dl div {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 8px;
}
.maintenance-record dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #7b857f;
  font-weight: 900;
}
.maintenance-record dd {
  margin: 0;
  font-size: 12px;
  color: #344139;
  white-space: pre-wrap;
}
.maintenance-record-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.maintenance-record-photos {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.maintenance-photo-missing {
  font-size: 10px;
  color: #8a918d;
}
.maintenance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.maintenance-photo-viewer[hidden] {
  display: none;
}
.maintenance-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #0a120fdb;
}
.maintenance-photo-card {
  position: relative;
  width: min(94vw, 720px);
  max-height: 92vh;
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
}
.maintenance-photo-card strong {
  display: block;
  padding: 3px 42px 10px 3px;
}
.maintenance-photo-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  background: #101410;
}
.maintenance-photo-close {
  position: absolute;
  right: 11px;
  top: 9px;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e9eeea;
  font-size: 23px;
}
.maintenance-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10100;
  padding: 12px 16px;
  border-radius: 999px;
  background: #143e2f;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 9px 24px #13251d42;
}
.maintenance-control-launch i {
  font-style: normal;
}
.maintenance-followup {
  scroll-margin-top: 16px;
}
@media (max-width: 540px) {
  .maintenance-pair {
    grid-template-columns: 1fr;
  }
  .maintenance-record dl div {
    grid-template-columns: 1fr;
  }
  .maintenance-record-head {
    display: grid;
  }
  .maintenance-badges {
    justify-content: flex-start;
  }
  .maintenance-record-actions {
    display: grid;
  }
  .maintenance-followup-button {
    width: 100%;
  }
}

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