/* ═══════════════════════════════════════════════════
   AI MAKERS – 신청서 인쇄 전용 스타일
   A4 세로 기준 (210mm × 297mm)
═══════════════════════════════════════════════════ */

/* ── 화면에서는 인쇄시트 숨김 ── */
#print-sheet {
  display: none;
}

/* ════════════════════════════════
   @media print — 인쇄 시 적용
════════════════════════════════ */
@media print {

  @page {
    size: A4 portrait;
    margin: 18mm 20mm 18mm 20mm;
  }

  /* ① html / body 배경 완전 흰색, 여백 제거 */
  html, body {
    background: #fff !important;
    background-color: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* ② 모든 body 직계 자식 숨김 */
  body > * {
    display: none !important;
  }

  /* ③ 인쇄 시트만 표시 */
  #print-sheet {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    background-color: #fff !important;
    z-index: auto !important;
  }

  /* ④ 캔버스, 고정 요소, 대시보드 배경 강제 숨김 (안전망) */
  canvas,
  .dashboard,
  .dash-sidebar,
  .dash-main,
  .dash-header,
  .modal-overlay,
  .detail-modal,
  nav, header, footer,
  .particles-container {
    display: none !important;
  }

  /* ⑤ 인쇄 색상 보정 */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box;
  }
}

/* ════════════════════════════════
   인쇄 시트 내부 스타일
   (화면 미리보기 & print 공통 적용)
════════════════════════════════ */
.ps-inner {
  width: 170mm;
  margin: 0 auto;
  background: #fff;
  color: #111;
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', '맑은 고딕', sans-serif;
  font-size: 10pt;
  line-height: 1.65;
}

/* ── 헤더 ── */
.ps-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 2.5pt solid #0099cc;
  padding-bottom: 8pt;
  margin-bottom: 16pt;
}
.ps-school-name {
  font-size: 8pt;
  color: #555;
  letter-spacing: 0.5pt;
  margin-bottom: 3pt;
}
.ps-doc-title {
  font-size: 17pt;
  font-weight: 900;
  color: #003355;
  letter-spacing: -0.5pt;
  line-height: 1.1;
}
.ps-doc-sub {
  font-size: 8.5pt;
  color: #0099cc;
  font-weight: 600;
  margin-top: 3pt;
  letter-spacing: 0.5pt;
}
.ps-header-right { text-align: right; }
.ps-logo-box {
  width: 38pt; height: 38pt;
  background: #003355 !important;
  border-radius: 8pt;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto;
}
.ps-logo-box svg { width: 22pt; height: 22pt; fill: #00d4ff; }
.ps-date { font-size: 7.5pt; color: #888; margin-top: 4pt; }

/* ── 섹션 공통 ── */
.ps-section {
  margin-bottom: 13pt;
  page-break-inside: avoid;
}
.ps-section-title {
  display: flex;
  align-items: center;
  gap: 6pt;
  font-size: 9pt;
  font-weight: 800;
  color: #fff !important;
  background: #003355 !important;
  padding: 5pt 10pt;
  border-radius: 4pt;
  margin-bottom: 8pt;
  letter-spacing: 0.3pt;
}
.ps-sec-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 14pt; height: 14pt;
  background: #0099cc !important;
  border-radius: 3pt;
  font-size: 7.5pt; font-weight: 900;
  color: #fff !important;
  flex-shrink: 0;
}

/* ── 기본 정보 그리드 ── */
.ps-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6pt;
}
.ps-info-cell {
  border: 1pt solid #cce0f0;
  border-radius: 5pt;
  padding: 7pt 8pt;
  text-align: center;
  background: #f7fbff !important;
}
.ps-info-key {
  font-size: 7.5pt; color: #0099cc;
  font-weight: 700; margin-bottom: 4pt;
  display: block; letter-spacing: 0.3pt;
}
.ps-info-val {
  font-size: 14pt; font-weight: 900;
  color: #003355; line-height: 1; display: block;
}

/* ── 텍스트 필드 ── */
.ps-text-field {
  border: 1pt solid #cce0f0;
  border-radius: 5pt;
  padding: 9pt 11pt;
  background: #f7fbff !important;
  font-size: 9.5pt; color: #222;
  line-height: 1.7; min-height: 38pt;
  white-space: pre-wrap; word-break: break-all;
}
.ps-text-field.tall { min-height: 48pt; }

/* ── 경험 태그 ── */
.ps-exp-wrap {
  display: flex; flex-wrap: wrap; gap: 5pt;
  padding: 7pt 9pt;
  border: 1pt solid #cce0f0; border-radius: 5pt;
  background: #f7fbff !important;
  min-height: 26pt; align-items: center;
}
.ps-exp-tag {
  display: inline-flex; align-items: center; gap: 3pt;
  background: #e0f4ff !important;
  border: 0.8pt solid #99d0ee;
  border-radius: 999pt; padding: 2pt 8pt;
  font-size: 8pt; font-weight: 700; color: #005588;
}
.ps-exp-none { font-size: 8.5pt; color: #aaa; font-style: italic; }

/* ── 서약 ── */
.ps-pledge-list { display: flex; flex-direction: column; gap: 5pt; }
.ps-pledge-item {
  display: flex; align-items: center; gap: 7pt;
  border: 1pt solid #cce0f0; border-radius: 5pt;
  padding: 7pt 11pt;
  background: #f7fbff !important;
  font-size: 9pt; color: #222;
}
.ps-pledge-check {
  width: 14pt; height: 14pt; border-radius: 50%;
  background: #003355 !important;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ps-pledge-check svg { width: 9pt; height: 9pt; fill: #fff; }

/* ── 서명란 ── */
.ps-sign-row {
  display: flex; gap: 10pt;
  margin-top: 14pt; page-break-inside: avoid;
}
.ps-sign-box {
  flex: 1; border: 1pt solid #cce0f0; border-radius: 5pt;
  padding: 9pt 12pt 22pt;
  background: #f7fbff !important;
}
.ps-sign-label { font-size: 8pt; color: #0099cc; font-weight: 700; margin-bottom: 6pt; }
.ps-sign-line { border-top: 0.8pt dashed #bbb; margin-top: 16pt; }

/* ── 하단 안내 ── */
.ps-footer-note {
  margin-top: 12pt; padding-top: 8pt;
  border-top: 0.8pt solid #ddd;
  font-size: 7.5pt; color: #888;
  text-align: center; line-height: 1.7;
}
.ps-footer-note strong { color: #555; }
