/* ─────────────────────────────────────────────
 * PDF 리포트 — A4 인쇄용 스타일 (off-screen 렌더)
 * 버튼: cov-db-panel 에 주입되는 [📄 PDF] 액션
 * ───────────────────────────────────────────── */

/* PDF 버튼 (cov-db-panel actions 영역) */
.cdp-btn.cdp-pdf {
  background: #fff;
  color: var(--gray-700);
  border-color: var(--border);
}
.cdp-btn.cdp-pdf:hover {
  background: var(--primary-50);
  color: var(--primary-dark);
  border-color: var(--primary-100);
}

/* ── PDF 리포트 본문 ─────────────────────────────── */
.pdf-report {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, system-ui, sans-serif;
  letter-spacing: -0.018em;
  font-feature-settings: 'tnum' on;
  font-size: 11px;
  color: #0F1818;
  background: #fff;
  width: 794px;            /* A4 폭 (96dpi 기준) */
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.pdf-report h1, .pdf-report h2, .pdf-report h3 {
  margin: 0;
  letter-spacing: -0.025em;
}

/* ── 표지 ─────────────────────────────────────── */
.pdf-cover {
  padding: 28px 32px 24px;
  border-bottom: 3px solid #008485;
}
.pdf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.pdf-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #008485 0%, #006F70 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdf-title {
  margin-bottom: 16px;
}
.pdf-title h1 {
  font-size: 26px;
  font-weight: 900;
  color: #0F1818;
  margin-bottom: 4px;
}
.pdf-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #5C6868;
}
.pdf-meta {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 14px;
  background: #F8FAFA;
  border: 1px solid #E3E8E8;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
  font-size: 10.5px;
}
.pdf-meta strong {
  color: #5C6868;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 2px;
}

/* ── 섹션 ─────────────────────────────────────── */
.pdf-section {
  padding: 20px 32px;
  border-bottom: 1px solid #F1F4F4;
  break-inside: avoid;
}
.pdf-section h2 {
  font-size: 16px;
  font-weight: 900;
  color: #008485;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid #008485;
}
.pdf-section h3 {
  font-size: 13px;
  font-weight: 800;
  color: #006F70;
  margin: 12px 0 6px;
}
.pdf-page-break {
  page-break-before: always;
  break-before: page;
}

/* ── KPI ──────────────────────────────────────── */
.pdf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.pdf-kpi {
  background: #F8FAFA;
  border: 2px solid #E3E8E8;
  border-radius: 10px;
  padding: 14px 16px;
}
.pdf-kpi.pdf-kpi-before { border-color: #FBCFD0; background: #FDF1F1; }
.pdf-kpi.pdf-kpi-after  { border-color: #B9E1D2; background: #F0F9F5; }
.pdf-kpi .lb {
  font-size: 10px;
  font-weight: 800;
  color: #5C6868;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.pdf-kpi .vl {
  font-size: 22px;
  font-weight: 900;
  color: #0F1818;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.pdf-kpi .sb {
  font-size: 10px;
  font-weight: 700;
  color: #8E9898;
}

.pdf-insights {
  display: flex;
  gap: 16px;
  font-size: 12px;
  font-weight: 700;
  color: #2D3838;
  background: #FFF8E5;
  border: 1px solid #FCE8B0;
  border-radius: 8px;
  padding: 10px 14px;
}
.pdf-insights > div { flex: 1; }

/* ── 두 열 레이아웃 ─────────────────────────────── */
.pdf-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── 보험사 비교 테이블 ─────────────────────────── */
.pdf-policy-table,
.pdf-cov-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.pdf-policy-table th,
.pdf-cov-table th {
  background: #F1F4F4;
  color: #2D3838;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 2px solid #C9D1D1;
}
.pdf-policy-table th.r,
.pdf-cov-table th.r { text-align: right; }
.pdf-policy-table td,
.pdf-cov-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #F1F4F4;
}
.pdf-policy-table td.r,
.pdf-cov-table td.r { text-align: right; }
.pdf-policy-table tr.tot td {
  background: #F8FAFA;
  font-weight: 900;
  border-top: 2px solid #C9D1D1;
  border-bottom: none;
}

.pdf-cov-table {
  margin-bottom: 10px;
}
.pdf-cov-table tbody tr:nth-child(even) td {
  background: #FAFBFC;
}
.pdf-cov-table tbody tr:hover td {
  background: transparent; /* PDF 출력에서 hover 효과 제거 */
}

/* ── 그룹 ─────────────────────────────────────── */
.pdf-group {
  margin-bottom: 14px;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* ── 푸터 ─────────────────────────────────────── */
.pdf-footer {
  padding: 16px 32px;
  font-size: 9.5px;
  color: #5C6868;
  font-weight: 600;
  line-height: 1.5;
  background: #F8FAFA;
  border-top: 2px solid #008485;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.pdf-footer-meta {
  text-align: right;
  flex-shrink: 0;
}
.pdf-footer-meta strong {
  color: #008485;
  font-weight: 800;
}
