/* Manage PM — Service tab cards, checklist panel, and photo panes (scoped pm-* classes). */

.pm-service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid #dbe7f2;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f9fd 100%);
}
.pm-service-header__title {
  margin: 0;
}
.pm-service-header__date {
  min-width: 240px;
  max-width: 280px;
  flex: 0 0 auto;
}
.pm-service-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.45rem;
}
.pm-service-checklist-panel {
  border: 1px solid #dbe7f2;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}
.pm-service-checklist-panel--blocked {
  opacity: 0.72;
}
.pm-service-checklist-panel--blocked .pm-service-checklist-table-wrap,
.pm-service-checklist-panel--blocked .row {
  pointer-events: none;
}
.pm-service-checklist-summary {
  padding: 0.85rem 1.1rem 1rem;
}
.pm-service-checklist-summary--empty {
  color: #64748b;
  font-size: 0.9rem;
}
.pm-service-checklist-summary__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #e2e8f0;
}
.pm-service-checklist-summary__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.pm-service-checklist-summary__result {
  flex: 0 0 auto;
  min-width: 3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}
.pm-service-checklist-summary__result--pass {
  color: #166534;
  background: #dcfce7;
}
.pm-service-checklist-summary__result--fail {
  color: #991b1b;
  background: #fee2e2;
}
.pm-service-checklist-summary__content {
  min-width: 0;
}
.pm-service-checklist-summary__procedure {
  color: #16324a;
  font-size: 0.9rem;
  line-height: 1.45;
}
.pm-service-checklist-summary__notes {
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.84rem;
}
.pm-service-unsaved-banner {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.9rem;
}
.pm-service-notes-tabs {
  margin-top: 0.25rem;
}
.pm-service-accessory-list {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #dbe7f2;
  background: #f8fafc;
}
.pm-service-accessory-list__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.pm-service-accessory-list__items {
  padding-left: 1.1rem;
  color: #16324a;
  font-size: 0.92rem;
}
.pm-service-accessory-list__items li + li {
  margin-top: 0.25rem;
}
.pm-service-checklist-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f9fd 100%);
}
.pm-service-checklist-panel__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pm-service-checklist-table-wrap--embedded {
  max-height: 420px;
  overflow: auto;
}
.pm-service-checklist-table-wrap--dialog {
  max-height: none;
  overflow: visible;
}
.pm-service-checklist-dialog.e-dialog {
  max-height: calc(100vh - 2rem);
}
.pm-service-checklist-dialog .e-dlg-content {
  overflow: visible;
  max-height: none;
  height: auto;
  padding-bottom: 0.5rem;
}
.pm-service-checklist-dialog .e-dlg-header-content {
  flex: 0 0 auto;
}
.pm-service-checklist-dialog .e-footer-content {
  flex: 0 0 auto;
}
.pm-service-checklist-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  white-space: nowrap;
}
.pm-service-checklist-table__pass,
.pm-service-checklist-table__fail {
  width: 3.5rem;
  text-align: center;
}
.pm-service-checklist-table__notes {
  min-width: 180px;
}
.pm-service-checklist-table td {
  vertical-align: middle;
  font-size: 0.9rem;
}
.pm-service-reference-list {
  padding-left: 1.1rem;
  color: #475569;
  font-size: 0.9rem;
}
.pm-service-reference-list li + li {
  margin-top: 0.35rem;
}
.pm-photo-pane {
  padding-top: 0.25rem;
}
.pm-photo-pane__section {
  padding: 0.75rem 0 0.25rem;
}
.pm-photo-pane__section--post {
  border-top: 2px solid #e2e8f0;
  margin-top: 0.5rem;
  padding-top: 1rem;
}
.pm-photo-tabs .e-tab-header {
  border-bottom: 1px solid #dbe7f2;
}
.pm-photo-pane .photo-thumbnails--compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.5rem;
  justify-content: flex-start;
  margin-top: 0.75rem;
}
.pm-photo-pane .photo-thumbnails--compact:empty::after {
  content: none;
}
.pm-photo-pane .thumbnail--compact {
  width: 100%;
  margin: 0;
  padding: 0.35rem;
  padding-bottom: 2.25rem;
}
.pm-photo-pane .thumbnail--compact .img-container {
  max-height: 72px;
  margin-bottom: 0.35rem;
}
.pm-photo-pane .thumbnail--compact .img-container img {
  max-height: 72px;
  width: 100%;
  object-fit: cover;
}
.pm-photo-pane .thumbnail--compact .action-bar {
  bottom: 0.35rem;
}
.pm-photo-pane .thumbnail--compact.no-records {
  grid-column: 1 / -1;
  padding-bottom: 0.75rem;
}
.pm-photo-pane__filename {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 767.98px) {
  .pm-service-header {
    flex-direction: column;
    align-items: stretch;
  }
  .pm-service-header__date {
    max-width: none;
  }
  .pm-service-checklist-panel__header {
    flex-direction: column;
    align-items: stretch;
  }
  .pm-service-checklist-panel__actions {
    justify-content: flex-start;
  }
}

.pm-questionnaire-panel {
  border: 1px solid #d8dee9;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: #f8fafc;
}
.pm-questionnaire-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.pm-questionnaire-panel__title {
  font-weight: 600;
  font-size: 1.05rem;
}
.pm-questionnaire-panel__progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 72px;
}
.pm-questionnaire-panel__progress-count {
  font-weight: 700;
  color: #0d6efd;
  line-height: 1.1;
}
.pm-questionnaire-panel__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pm-questionnaire-accordion .e-acrdn-item .e-acrdn-header {
  background: #fff;
}
.pm-questionnaire-accordion__title {
  font-weight: 600;
}
.pm-questionnaire-yesno {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.pm-questionnaire-yesno__label {
  font-size: 0.92rem;
  color: #334155;
  flex: 1 1 220px;
}
.pm-questionnaire-yesno__options {
  display: inline-flex;
  gap: 0.5rem;
}
.pm-questionnaire-yesno__option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 0.875rem;
}
.pm-questionnaire-yesno__option:has(input:checked) {
  border-color: #0d6efd;
  background: #eff6ff;
  color: #0d6efd;
}
.pm-questionnaire-followup {
  padding-left: 0.75rem;
  border-left: 3px solid #0d6efd;
}
.pm-questionnaire-notice {
  padding: 0.85rem 1rem;
  border: 1px solid #f0c36d;
  border-radius: 10px;
  background: #fff8e6;
  color: #664d03;
  font-size: 0.92rem;
  line-height: 1.45;
}
.pm-questionnaire-notice--centered {
  margin-top: 1rem;
  text-align: center;
}
@media (max-width: 767.98px) {
  .pm-questionnaire-panel__header {
    flex-direction: column;
  }
  .pm-questionnaire-panel__progress {
    align-items: flex-start;
  }
  .pm-questionnaire-yesno {
    flex-direction: column;
    align-items: stretch;
  }
}
