/* PDF export capture — dedicated #pdf-export-root clone (Safari-safe for html2canvas) */
body.pdf-capturing {
  overflow: hidden !important;
}

#pdf-export-root {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483646;
  width: 277mm;
  max-width: 277mm;
  margin: 0;
  padding: 0;
  background: #fff;
  pointer-events: none;
}

body:not(.pdf-capturing) #pdf-export-root {
  display: none;
}

.print-area.pdf-capture-active,
#pdf-export-root .pdf-capture-active {
  position: static !important;
  width: 277mm !important;
  max-width: 277mm !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  color: #000 !important;
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
  pointer-events: none;
  box-shadow: none !important;
}

.print-area.pdf-capture-active .print-only {
  display: block !important;
  font-size: 7pt;
  font-weight: 700;
  margin: 0 0 1mm 0;
  padding: 0;
  height: 4mm;
  line-height: 4mm;
  white-space: nowrap;
  overflow: hidden;
  color: #000 !important;
}

.print-area.pdf-capture-active .gantt-panel,
.print-area.pdf-capture-active #gantt-container {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  width: 277mm !important;
  max-width: 277mm !important;
  min-height: 0 !important;
  height: auto !important;
  flex: none !important;
  background: #fff !important;
  display: block !important;
}

.print-area.pdf-capture-active .gantt-table {
  width: 277mm !important;
  max-width: 277mm !important;
  table-layout: fixed !important;
  font-size: 6.8pt;
  border-collapse: collapse !important;
}

.print-area.pdf-capture-active .gantt-table thead {
  display: table-row-group !important;
}

.print-area.pdf-capture-active .gantt-table tbody {
  display: table-row-group !important;
}

.print-area.pdf-capture-active .gantt-table thead tr {
  height: 5mm !important;
}

.print-area.pdf-capture-active .gantt-table tbody tr {
  height: 13.4mm !important;
}

.print-area.pdf-capture-active .gantt-table th,
.print-area.pdf-capture-active .gantt-table td {
  padding: 0 !important;
  border: 0.35pt solid #ccc !important;
  line-height: 1;
  overflow: hidden;
  vertical-align: middle !important;
}

.print-area.pdf-capture-active .gantt-month-label {
  width: 11mm !important;
  font-size: 6.5pt !important;
  font-weight: 700;
  background: #f2f2f2 !important;
  color: #000 !important;
}

.print-area.pdf-capture-active .gantt-dow-head {
  font-size: 6.6pt !important;
  font-weight: 800 !important;
  background: #f5f5f5 !important;
  color: #000 !important;
}

.print-area.pdf-capture-active .gantt-dow-head.gantt-sat-col,
.print-area.pdf-capture-active .gantt-dow-head.gantt-sun-col {
  background: #f5f5f5 !important;
  color: #000 !important;
}

.print-area.pdf-capture-active .gantt-weekend-gap {
  width: 1.4mm !important;
  min-width: 1.4mm !important;
  max-width: 1.4mm !important;
  padding: 0 !important;
  border-top: 0.35pt solid #ccc !important;
  border-bottom: 0.35pt solid #ccc !important;
  border-left: 0 !important;
  border-right: 0 !important;
  background: #fff !important;
  position: relative !important;
}

.print-area.pdf-capture-active thead .gantt-weekend-gap {
  background: #f5f5f5 !important;
}

.print-area.pdf-capture-active .gantt-weekend-gap::before {
  content: '' !important;
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 0.75pt !important;
  margin-left: -0.375pt !important;
  background: #0078a8 !important;
}

.print-area.pdf-capture-active .gantt-cell.gantt-sat-col.gantt-empty,
.print-area.pdf-capture-active .gantt-cell.gantt-sun-col.gantt-empty {
  background: #fff !important;
}

.print-area.pdf-capture-active .gantt-empty {
  background: #fff !important;
}

.print-area.pdf-capture-active .gantt-work {
  background: #e3eef6 !important;
  box-shadow: inset 0 0 0 0.35pt #666 !important;
}

.print-area.pdf-capture-active .gantt-off {
  background: #fafafa !important;
}

.print-area.pdf-capture-active .gantt-pt80 {
  background: #e8f4ea !important;
  box-shadow: inset 0 0 0 0.35pt #666 !important;
}

.print-area.pdf-capture-active .gantt-unsupported {
  background: #f5f5f5 !important;
}

.print-area.pdf-capture-active .day-num {
  font-size: 7.2pt !important;
  font-weight: 700 !important;
  color: #000 !important;
}

.print-area.pdf-capture-active .gantt-cell.gantt-today::after {
  display: none !important;
  content: none !important;
}

.print-area.pdf-capture-active .cycle-mark {
  font-size: 8.5pt !important;
  color: #000 !important;
  opacity: 1 !important;
  font-weight: 800;
}

.print-area.pdf-capture-active .pt-mark {
  top: 1pt !important;
  left: 1pt !important;
  font-size: 5pt !important;
  color: #000 !important;
  font-weight: 800;
}

.print-area.pdf-capture-active .holiday-mark {
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, calc(-50% - 6pt)) !important;
  font-size: 7.2pt !important;
  font-weight: 700 !important;
  color: #000 !important;
}

.print-area.pdf-capture-active .gantt-vacation,
.print-area.pdf-capture-active .gantt-vacation.gantt-work,
.print-area.pdf-capture-active .gantt-vacation.gantt-off,
.print-area.pdf-capture-active .gantt-vacation.gantt-pt80,
.print-area.pdf-capture-active .gantt-vacation.gantt-work.gantt-sat-col,
.print-area.pdf-capture-active .gantt-vacation.gantt-work.gantt-sun-col,
.print-area.pdf-capture-active .gantt-vacation.gantt-off.gantt-sat-col,
.print-area.pdf-capture-active .gantt-vacation.gantt-off.gantt-sun-col,
.print-area.pdf-capture-active .gantt-vacation.gantt-pt80.gantt-sat-col,
.print-area.pdf-capture-active .gantt-vacation.gantt-pt80.gantt-sun-col {
  background: #d8d8d8 !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 0.35pt #666 !important;
}

.print-area.pdf-capture-active .vac-mark {
  display: block !important;
  position: absolute !important;
  top: 1pt !important;
  left: 0 !important;
  right: 0 !important;
  font-size: 5.5pt !important;
  color: #000 !important;
  font-weight: 800 !important;
  text-align: center !important;
  line-height: 1 !important;
}

.print-area.pdf-capture-active .gantt-vacation-pending {
  outline: none !important;
}
