/* Google Fonts 연동: 전문적이고 현대적인 Outfit & Inter 폰트 적용 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0b0f19;
  color: #f1f5f9;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

/* Glassmorphism 효과 */
.glass-panel {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 커스텀 스크롤바 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0b0f19;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* 물류 서류 (A4 용지 규격화) 화면 프리뷰용 */
.document-preview-container {
  overflow-x: auto;
  padding: 2rem 0;
}

.a4-document {
  width: 210mm;
  min-height: 297mm;
  padding: 15mm 20mm;
  margin: 0 auto;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  font-family: 'Courier New', Courier, monospace; /* 클래식 물류서류 느낌 또는 깔끔한 모노스페이스 */
  font-size: 11px;
  line-height: 1.4;
  position: relative;
}

/* 서류 테두리 및 격자 */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 5px;
  margin-bottom: 5px;
}

.doc-table th, .doc-table td {
  border: 1px solid #000000;
  padding: 5px;
  text-align: left;
  vertical-align: top;
}

.doc-table th {
  background-color: #f2f2f2 !important;
  font-weight: bold;
  text-align: center;
}

/* 인쇄 스타일링: 브라우저 인쇄 대화상자 호출 시 대시보드와 패널을 완벽하게 가리고 A4 서류만 출력 */
@page {
  size: A4 portrait;
  margin: 0 !important; /* 브라우저 자체의 억지 여백을 강제 무력화하여 빈공간 제거 */
}

@media print {
  html, body {
    width: 210mm !important;
    height: auto !important; /* 다중 페이지 출력을 지원하도록 자동 높이 조절 */
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important; /* overflow를 visible로 설정하여 다중 페이지 잘림 방지 */
    box-sizing: border-box !important;
  }
  
  /* 화면의 모든 대시보드, 탭 버튼, 헤더, 사이드바, 푸터 숨김 */
  .no-print {
    display: none !important;
  }
  
  /* 프리뷰 컨테이너 패딩 및 배경 제거 */
  .document-preview-container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
  }
  
  .a4-document {
    width: 210mm !important;
    height: 297mm !important;
    padding: 15mm 20mm !important; /* 실물 A4 표준 마진 적용 */
    margin: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-after: always;
    page-break-inside: avoid;
    box-sizing: border-box !important;
    border: none !important;
  }
  
  /* flex 컨테이너에서 page-break가 작동하지 않는 브라우저 버그 해결 */
  #tabContent-pl {
    display: block !important;
  }
  
  /* 강제 배경색 및 괘선 인쇄 허용 */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* 서류 스타일링을 돕는 유틸리티 클래스 */
.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.font-bold {
  font-weight: bold;
}

.border-b-double {
  border-bottom: 3px double #000000;
}
