/* 프린트 전용 스타일 */
@media print {
  /* 기본 설정 */
  @page {
    size: A4;
    margin: 15mm;
  }
  
  body {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    font-size: 11pt;
  }
  
  /* 프린트 시 숨김 */
  .no-print,
  header,
  button,
  input[type="date"]:not(.print-show),
  .print-hide {
    display: none !important;
  }
  
  /* 페이지 나누기 */
  .page-break {
    page-break-before: always;
    break-before: page;
  }
  
  .print-section {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  
  /* 컨테이너 조정 */
  .max-w-7xl,
  .max-w-4xl {
    max-width: 100% !important;
  }
  
  /* 여백 조정 */
  .p-8 {
    padding: 10mm !important;
  }
  
  .mb-8 {
    margin-bottom: 5mm !important;
  }
  
  /* 제목 스타일 */
  h1, h2, h3 {
    color: #000 !important;
    page-break-after: avoid;
    break-after: avoid;
  }
  
  h2 {
    font-size: 18pt;
    margin-bottom: 3mm;
  }
  
  h3 {
    font-size: 14pt;
    margin-bottom: 2mm;
  }
  
  /* 테이블 스타일 */
  table {
    width: 100%;
    border-collapse: collapse;
    page-break-inside: avoid;
  }
  
  table thead {
    display: table-header-group;
  }
  
  table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  
  table td,
  table th {
    border: 1px solid #000 !important;
    padding: 3mm !important;
    font-size: 10pt;
  }
  
  table th {
    background-color: #f3f4f6 !important;
    font-weight: bold;
  }
  
  table td.bg-green-50,
  table td.bg-blue-50 {
    background-color: #f0fdf4 !important;
  }
  
  /* 입력 필드 스타일 */
  input[type="text"],
  input[type="number"],
  input[type="time"],
  textarea {
    border: none !important;
    border-bottom: 1px solid #ccc !important;
    background: transparent !important;
    padding: 1mm !important;
    font-size: 10pt;
    width: 100%;
  }
  
  input[type="checkbox"],
  input[type="radio"] {
    width: 4mm;
    height: 4mm;
    border: 1px solid #000 !important;
    margin-right: 2mm;
  }
  
  /* 체크박스 라벨 */
  label {
    display: inline-flex;
    align-items: center;
    font-size: 10pt;
    margin-right: 5mm;
  }
  
  /* 날짜 표시 */
  .date-display {
    font-weight: bold;
    font-size: 11pt;
  }
  
  /* 배경색 보존 */
  .bg-green-50,
  .bg-blue-50,
  .bg-purple-50 {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* 그라데이션 제거 */
  .bg-gradient-to-r,
  .bg-gradient-to-br {
    background: #f3f4f6 !important;
    color: #000 !important;
  }
  
  /* 아이콘 크기 */
  i.fas,
  i.far {
    font-size: 12pt;
    margin-right: 2mm;
  }
  
  /* 그리드 조정 */
  .grid {
    display: block !important;
  }
  
  .grid > * {
    margin-bottom: 2mm;
  }
  
  /* 섹션 구분선 */
  .border-t-2,
  .border-b-4 {
    border-color: #000 !important;
    border-width: 1px !important;
  }
  
  /* 텍스트 색상 */
  .text-gray-600,
  .text-gray-700,
  .text-gray-800 {
    color: #000 !important;
  }
  
  /* 링크 */
  a {
    color: #000 !important;
    text-decoration: underline;
  }
  
  /* 여백 최적화 */
  .py-8 {
    padding-top: 5mm !important;
    padding-bottom: 5mm !important;
  }
  
  .px-4 {
    padding-left: 3mm !important;
    padding-right: 3mm !important;
  }
  
  /* 첫 페이지 제목 */
  .print-section:first-of-type h2 {
    margin-top: 0 !important;
  }
}

/* 화면 전용 스타일 */
@media screen {
  .print-only {
    display: none;
  }
}
