/* ===== Inspection Document Styles ===== */
.inspection-page {
  width: 297mm;
  min-height: 210mm;
  margin: 0 auto;
  padding: 5mm;
  background: #fff;
  font-family: 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', sans-serif;
  font-size: 10px;
  color: #000;
  box-sizing: border-box;
}

.print-btn-wrap {
  text-align: right;
  margin-bottom: 8px;
}
.print-btn {
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #333;
  background: #f5f5f5;
  border-radius: 4px;
}
.print-btn:hover {
  background: #e0e0e0;
}

/* ===== Main Document Table ===== */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #000;
  table-layout: fixed;
}

.doc-table td,
.doc-table th {
  border: 1px solid #000;
  padding: 2px 4px;
  vertical-align: middle;
}

/* ===== Header ===== */
.logo-cell {
  width: 120px;
  text-align: center;
  padding: 4px 8px;
  background: linear-gradient(135deg, #1a5276, #2980b9);
}

/* 테넌트 이미지 로고용 — 그라데이션 대신 흰 배경 */
.logo-cell-with-image {
  background: #fff !important;
}

.logo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72px;
}

.doc-logo-img {
  max-width: 100%;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.logo-text-top {
  color: #fff;
  font-size: 8px;
  letter-spacing: 1px;
}

.logo-year {
  font-weight: bold;
  font-size: 10px;
  color: #f1c40f;
}

.logo-brand {
  font-size: 28px;
  font-weight: bold;
  color: #e74c3c;
  font-style: italic;
  font-family: 'Georgia', serif;
  line-height: 1;
}

.logo-sub {
  font-size: 10px;
  color: #fff;
  letter-spacing: 3px;
  font-weight: bold;
}

.title-cell {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 8px;
}

.doc-title {
  font-size: 28px;
  font-weight: bold;
}

.approval-label {
  width: 25px;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  background: #fff;
}

/* 결·재 한 칸에 세로 배치 (행 구분선 없음) */
.approval-label-kyuljae {
  vertical-align: middle;
  padding: 6px 4px;
}

.approval-kyuljae-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 70px;
}

.approval-header {
  width: 70px;
  text-align: center;
  font-weight: bold;
  font-size: 11px;
  padding: 4px;
  background: #fff;
}

.approval-sign {
  height: 35px;
  text-align: center;
  vertical-align: middle;
}

/* ===== Section Headers ===== */
.section-header {
  background: #d9d9d9;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  padding: 6px 4px;
  letter-spacing: 4px;
}

/* ===== Content Areas ===== */
.left-content-cell {
  vertical-align: top;
  padding: 0;
  width: 50%;
}

.right-content-cell {
  vertical-align: top;
  padding: 0;
  width: 50%;
}

/* ===== Inner Tables ===== */
.inner-table {
  width: 100%;
  border-collapse: collapse;
}

.inner-table td,
.inner-table th {
  border: 1px solid #000;
  padding: 2px 4px;
  vertical-align: middle;
  font-size: 10px;
}

/* ===== Sketch / Photo Areas ===== */
.sketch-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-align: center;
  font-weight: bold;
  font-size: 11px;
  width: 18px;
  min-width: 18px;
  background: #f9f9f9;
  letter-spacing: 2px;
  border-right: 1px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-cell {
  text-align: center;
  padding: 2px;
  vertical-align: middle;
}

.photo-placeholder {
  background: #e8e8e8;
  border: 1px dashed #999;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 9px;
  position: relative;
}

.sketch-photo {
  min-height: 100px;
}

.sketch-dimension {
  text-align: center;
  font-size: 9px;
  line-height: 1.4;
  color: #333;
}

.photo-label-top {
  font-weight: bold;
  font-size: 10px;
  color: #333;
}

.photo-large {
  min-height: 130px;
}

.defect-photo {
  min-height: 110px;
}

.defect-photo-large {
  min-height: 140px;
}

/* 12) burr 제거 헤더 — 2~13 결함 라벨과 동일 색·테두리 */
.burr-label-header {
  min-height: 22px;
  background: #fffacd;
  border: 1px solid #000;
  font-weight: bold;
  color: #000;
}

/* ===== Defect Labels ===== */
.defect-label {
  text-align: center;
  font-weight: bold;
  font-size: 10px;
  padding: 2px 4px;
  height: 22px;
  line-height: 1;
  background: #fffacd;
  border: 1px solid #000;
  overflow: hidden;
  white-space: nowrap;
}

/* ===== Info Labels (Product Info) ===== */
.info-label {
  text-align: center;
  font-weight: bold;
  font-size: 11px;
  padding: 4px 6px;
  background: #f5f5f5;
  width: 60px;
  border: 1px solid #000;
}

.info-value {
  font-size: 11px;
  padding: 4px 8px;
  text-align: center;
  font-weight: bold;
  border: 1px solid #000;
}

/* ===== Checklist Table ===== */
.checklist-table th {
  background: #f0f0f0;
  font-weight: bold;
  text-align: center;
  padding: 4px 2px;
  font-size: 10px;
}

.checklist-table td {
  padding: 3px 4px;
  font-size: 10px;
  line-height: 1.3;
}

.col-no { width: 28px; }
.col-item { width: 55px; }
.col-criteria { width: auto; }
.col-method { width: 50px; }
.col-qty { width: 90px; }

.center {
  text-align: center;
}

.weight-row {
  background: #ffd700;
}

/* ===== Notes Section ===== */
.notes-section {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.8;
}

.notes-section p {
  margin: 0;
}

/* ===== Revision Table ===== */
.revision-table {
  margin-top: 0;
}

.revision-table th {
  background: #f0f0f0;
  font-weight: bold;
  text-align: center;
  padding: 4px 2px;
  font-size: 10px;
}

.revision-table td {
  padding: 3px 4px;
  font-size: 10px;
}

.col-rev-no { width: 30px; }
.col-rev-date { width: 70px; }
.col-rev-reason { width: auto; }
.col-rev-note { width: 100px; }

.rev-no {
  background: #fff;
}

/* ===== PRINT STYLES ===== */
@media print {
  .no-print {
    display: none !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  @page {
    size: A4 landscape;
    margin: 5mm;
  }

  html, body {
    width: 297mm;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  .inspection-page {
    width: 100%;
    min-height: auto;
    padding: 0;
    margin: 0;
    page-break-after: avoid;
    page-break-inside: avoid;
    overflow: hidden;
  }

  .doc-table {
    width: 100%;
    page-break-inside: avoid;
  }

  .section-header {
    background: #d9d9d9 !important;
  }

  .logo-cell {
    background: linear-gradient(135deg, #1a5276, #2980b9) !important;
  }

  .logo-cell-with-image {
    background: #fff !important;
  }

  .weight-row {
    background: #ffd700 !important;
  }

  .rev-no {
    background: #fff !important;
  }
}

