/**
 * LIMS 문서 출력 전용 (PDF · 이메일 · 아카이브 · 인쇄 본문)
 * — html[data-bs-theme="dark"] 화면과 무관하게 항상 라이트 팔레트
 * — 화면용 UI는 lims-theme.css, 본 파일은 .lims-document / .lims-document-body 만 사용
 */

.lims-document,
body.lims-document-body {
  color-scheme: light !important;
  background: #fff !important;
  color: #212529 !important;
}

html[data-bs-theme='dark'] .lims-document,
html[data-bs-theme='dark'] body.lims-document-body {
  background: #fff !important;
  color: #212529 !important;
}

.lims-document a {
  color: #0d6efd;
}

.lims-document .text-muted,
.lims-document .text-secondary,
body.lims-document-body .text-muted {
  color: #6c757d !important;
}

.lims-document h1,
.lims-document h2,
.lims-document h3,
.lims-document h4,
.lims-document h5,
.lims-document h6 {
  color: #212529 !important;
}

/* Bootstrap 5.3 dark — 표·카드 변수 초기화 */
html[data-bs-theme='dark'] .lims-document .table,
html[data-bs-theme='dark'] .lims-document .table-bordered,
html[data-bs-theme='dark'] .lims-document table.table {
  --bs-table-bg: #fff;
  --bs-table-color: #212529;
  --bs-table-border-color: #dee2e6;
  --bs-table-striped-bg: #f8f9fa;
  --bs-table-striped-color: #212529;
  --bs-table-active-bg: #e9ecef;
  --bs-table-active-color: #212529;
  --bs-table-hover-bg: #f1f3f5;
  --bs-table-hover-color: #212529;
  background-color: #fff !important;
  color: #212529 !important;
}

html[data-bs-theme='dark'] .lims-document .table th,
html[data-bs-theme='dark'] .lims-document .table td,
html[data-bs-theme='dark'] .lims-document table th,
html[data-bs-theme='dark'] .lims-document table td {
  color: #212529 !important;
  border-color: #dee2e6 !important;
}

html[data-bs-theme='dark'] .project-doc-page .lims-document.project-request-sheet-card,
html[data-bs-theme='dark'] .project-doc-page .lims-document .card-body {
  background: #fff !important;
  color: #212529 !important;
}

/* 분석의뢰서 본문 (project-request.css와 동일한 인쇄 색) */
.lims-document--request .analysys-sheet th,
.lims-document.lims-document--request .analysys-sheet th {
  color: #1a1a1a !important;
  background: #f8f9fa !important;
  border-color: #dbd7d7 !important;
}

.lims-document--request .analysys-sheet td,
.lims-document.lims-document--request .analysys-sheet td {
  color: #333 !important;
  background: #fff !important;
  border-color: #dbd7d7 !important;
}

.lims-document--request .request-sheet h1 {
  color: #212529 !important;
}

.lims-document--request .inquire-client-wrap span.client-name {
  border-bottom-color: #333 !important;
}

.lims-document--request .inquire-client-wrap .client-signature {
  color: #888 !important;
}

.lims-document--request .inquire-client-wrap .client-signature.has-signature {
  color: transparent !important;
}

/* 견적서·거래명세서 래퍼 */
.lims-document.invoice-table-wrap,
.lims-document .invoice-table-wrap {
  background: #fff !important;
}

html[data-bs-theme='dark'] .invoice-view-page .lims-document.invoice-table-wrap {
  background: #fff !important;
  box-shadow: none;
}

@media print {
  .lims-document,
  .lims-document * {
    color-scheme: light !important;
  }

  html[data-bs-theme='dark'] .lims-document,
  html[data-bs-theme='dark'] .lims-document * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
