/* 现场点检 · PDA / 窄屏优先（与统一移动端卡片风格一致） */
.inspection-field-page {
  --insp-brand: var(--brand, #6ac4a2);
  --insp-ok: #059669;
  --insp-bad: #dc2626;
  --insp-warn: #d97706;
  --insp-surface: var(--ds-bg-surface, #fff);
  --insp-muted: var(--ds-text-secondary, #64748b);
  --insp-border: var(--border-color, rgba(15, 23, 42, 0.1));
}

.inspection-field-shell {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 960px) {
  .inspection-field-shell {
    max-width: none;
  }
}

.inspection-field-hero {
  background: var(--insp-surface);
  border: 1px solid var(--insp-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.inspection-field-hero__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.inspection-field-hero__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ds-text-primary, #0f172a);
}

.inspection-field-badge {
  flex-shrink: 0;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(106, 196, 162, 0.12);
  color: #047857;
  border: 1px solid rgba(106, 196, 162, 0.25);
}

.inspection-field-badge--warn {
  background: rgba(245, 158, 11, 0.12);
  color: var(--insp-warn);
  border-color: rgba(245, 158, 11, 0.35);
}

.inspection-field-summary {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--insp-muted);
}

.inspection-field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ds-text-primary, #0f172a);
}

.inspection-field-scan-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 12px 14px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 2px solid var(--insp-border);
  border-radius: 12px;
  background: #f8fafc;
  margin-bottom: 10px;
}

.inspection-field-scan-input:focus {
  outline: none;
  border-color: var(--insp-brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(106, 196, 162, 0.2);
}

.inspection-field-scan-btn {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
}

.inspection-field-status {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  color: var(--insp-muted);
  min-height: 1.25em;
}

.inspection-field-tip {
  font-size: 0.78rem;
  color: var(--insp-muted);
  border: 1px dashed var(--insp-border);
  border-radius: 10px;
  padding: 0.35rem 0.75rem;
  background: rgba(248, 250, 252, 0.8);
}

.inspection-field-tip summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ds-text-primary, #334155);
  padding: 0.35rem 0;
}

.inspection-field-tip__body {
  margin: 0.35rem 0 0.5rem;
  line-height: 1.55;
}

.inspection-field-section-title {
  margin: 4px 0 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ds-text-primary, #0f172a);
}

.inspection-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspection-log-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--insp-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--insp-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.inspection-log-card:active {
  transform: scale(0.992);
}

.inspection-log-card__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.inspection-log-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ds-text-primary, #0f172a);
  line-height: 1.35;
}

.inspection-log-card__result {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.inspection-log-card__result--ok {
  background: rgba(5, 150, 105, 0.12);
  color: var(--insp-ok);
}

.inspection-log-card__result--bad {
  background: rgba(220, 38, 38, 0.1);
  color: var(--insp-bad);
}

.inspection-log-card__meta {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--insp-muted);
  line-height: 1.45;
}

.inspection-log-empty {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.875rem;
  color: var(--insp-muted);
}

.inspection-log-table-wrap {
  display: none;
}

@media (min-width: 960px) {
  .inspection-log-list {
    display: none;
  }
  .inspection-log-table-wrap {
    display: block;
  }
  .inspection-field-scan-btn {
    width: auto;
    min-width: 8rem;
  }
  .inspection-field-hero__actions {
    display: flex;
    gap: 10px;
    align-items: stretch;
  }
  .inspection-field-hero__actions .inspection-field-scan-input {
    flex: 1;
    margin-bottom: 0;
  }
}

/* 点检表单 · 全屏抽屉式（窄屏） */
.inspection-field-modal .inspection-field-modal__panel {
  max-width: 520px;
}

@media (max-width: 720px) {
  .inspection-field-modal.modal {
    padding: 0;
    align-items: stretch;
  }
  .inspection-field-modal .inspection-field-modal__panel {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }
  .inspection-field-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .inspection-field-modal .modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--insp-surface);
    border-top: 1px solid var(--insp-border);
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }
  .inspection-field-modal .modal-footer .btn {
    flex: 1;
    min-height: 48px;
    font-size: 1rem;
  }
}

.inspection-check-tile {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px;
  border: 2px solid var(--insp-border);
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.inspection-check-tile.is-checked {
  border-color: var(--insp-brand);
  background: rgba(106, 196, 162, 0.08);
}

.inspection-check-tile.is-checked .inspection-check-tile__box {
  border-color: var(--insp-brand);
  background: var(--insp-brand);
  color: #fff;
}

.inspection-check-tile:has(.inspection-check-ok:checked) {
  border-color: var(--insp-brand);
  background: rgba(106, 196, 162, 0.08);
}

.inspection-check-tile:has(.inspection-check-ok:checked) .inspection-check-tile__box {
  border-color: var(--insp-brand);
  background: var(--insp-brand);
  color: #fff;
}

.inspection-check-tile__box {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: transparent;
  margin-top: 2px;
}

.inspection-check-tile__body {
  flex: 1;
  min-width: 0;
}

.inspection-check-tile__title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ds-text-primary, #0f172a);
  margin-bottom: 4px;
}

.inspection-check-tile__hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--insp-muted);
}

.inspection-check-ok {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.inspection-field-modal .form-select,
.inspection-field-modal .form-input {
  min-height: 44px;
  font-size: 1rem;
}

.inspection-view-modal .inspection-field-modal__panel {
  max-width: 520px;
}

@media (max-width: 720px) {
  .inspection-view-modal.modal {
    padding: 0;
    align-items: stretch;
  }
  .inspection-view-modal .inspection-field-modal__panel {
    width: 100%;
    max-width: none;
    max-height: 100%;
    height: auto;
    min-height: 100%;
    border-radius: 0;
  }
}
