/* ===== 1. print.css ===== */
/* Screen support for the print-oriented header structure. */
.work-order-title {
  display: grid;
  width: min(420px, 48%);
  gap: .7rem;
  justify-items: end;
}

.worknumber-field {
  display: grid;
  width: 100%;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: .5rem;
  padding: .7rem;
  border: 1px solid #555;
}

.field-caption {
  display: block;
}

@media (max-width: 760px) {
  .work-order-title {
    width: 100%;
    justify-items: stretch;
  }

  .work-order-title h2 {
    text-align: left;
  }

  .worknumber-field {
    grid-template-columns: 1fr;
  }
}

@page {
  size: A4 portrait;
  margin: 8mm 13mm;
}

@media print {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 8.5pt !important;
    line-height: 1 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #workOrderForm,
  #workOrderForm * {
    box-sizing: border-box !important;
  }

  .no-print,
  [hidden] {
    display: none !important;
  }

  .sheet,
  #workOrderForm {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  #workOrderForm input,
  #workOrderForm textarea,
  #workOrderForm select {
    min-width: 0 !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    color: #111 !important;
    font: inherit !important;
  }

  /* Header: company at left, title and work number at right. */
  .masthead {
    display: flex !important;
    height: 22mm !important;
    margin: 0 !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
  }

  .brand h1 {
    margin: 0 !important;
    font-size: 22pt !important;
    line-height: .92 !important;
  }

  .brand p {
    margin: 1mm 0 0 !important;
    font-size: 9pt !important;
    line-height: 1.2 !important;
  }

  .work-order-title {
    display: grid !important;
    width: calc(50% - 1.5mm) !important;
    height: 20mm !important;
    grid-template-rows: 8mm 10mm !important;
    gap: 2mm !important;
    align-content: start !important;
    justify-items: stretch !important;
  }

  .work-order-title h2 {
    margin: 0 !important;
    align-self: start !important;
    text-align: right !important;
    font-size: 17pt !important;
    line-height: 1 !important;
  }

  .worknumber-field,
  .top-grid > .top-field,
  .stacked-fields {
    border: .25mm solid #555 !important;
    background: #fff !important;
  }

  .worknumber-field,
  .top-field,
  .stacked-fields label {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 1mm !important;
    min-width: 0 !important;
    font-size: 7.4pt !important;
  }

  .worknumber-field {
    width: 100% !important;
    height: 10mm !important;
    padding: 1mm 1.5mm !important;
  }

  .field-caption {
    align-self: center !important;
    line-height: 2.7mm !important;
    white-space: nowrap !important;
  }

  .worknumber-field input,
  .top-field input,
  .stacked-fields input {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: .2mm dotted #555 !important;
    background: transparent !important;
    padding: 0 .3mm .12mm !important;
  }

  .worknumber-field input,
  .top-field input {
    height: 3.2mm !important;
    line-height: 2.9mm !important;
  }

  /* Date/completed-by at left and client/address/city at right. */
  .top-grid {
    display: grid !important;
    position: static !important;
    height: 22mm !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 10mm 10mm !important;
    gap: 2mm 3mm !important;
    margin: 0 0 2mm !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .top-grid > .top-field {
    width: auto !important;
    height: auto !important;
    position: static !important;
    padding: 1mm 1.5mm !important;
    overflow: hidden !important;
    transform: none !important;
  }

  .top-grid > .top-field:nth-child(1) {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .top-grid > .top-field:nth-child(2) {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .stacked-fields {
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .stacked-fields label {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: .45mm 1.5mm !important;
    overflow: hidden !important;
  }

  .stacked-fields input {
    height: 2.8mm !important;
    line-height: 2.55mm !important;
  }

  /* Shared section/table geometry. */
  .section-box {
    margin: 0 0 2mm !important;
    padding: 1.2mm 1.6mm !important;
    border: .25mm solid #555 !important;
    background: #fff !important;
    break-inside: avoid;
  }

  .top-grid.section-box {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .section-heading {
    display: flex !important;
    height: 2.8mm !important;
    margin: 0 !important;
    align-items: flex-start !important;
    overflow: hidden !important;
  }

  .section-heading h3,
  .notes-section h3 {
    margin: 0 !important;
    font-size: 7.2pt !important;
    font-weight: 400 !important;
    line-height: 2.4mm !important;
    white-space: nowrap !important;
  }

  .table-wrap {
    overflow: visible !important;
  }

  table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
  }

  thead tr {
    height: 4.2mm !important;
  }

  th,
  td {
    position: relative !important;
    padding: .15mm .65mm !important;
    border-right: .2mm solid #777 !important;
    border-bottom: 0 !important;
    overflow: hidden !important;
    text-align: left !important;
    font-size: 7.1pt !important;
    font-weight: 400 !important;
    line-height: 1.05 !important;
  }

  th {
    vertical-align: top !important;
    white-space: normal !important;
  }

  td {
    vertical-align: middle !important;
  }

  th:last-child,
  td:last-child {
    border-right: 0 !important;
  }

  th small {
    display: block !important;
    font-size: 5.8pt !important;
    line-height: 1 !important;
  }

  tbody tr {
    break-inside: avoid;
  }

  tbody input,
  tbody textarea,
  tbody select,
  .line-row input {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 .3mm !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 7.1pt !important;
  }

  textarea {
    resize: none !important;
    overflow: hidden !important;
  }

  /* One and only one inset dotted rule per printable row. */
  #employeesBody td:not(:first-child)::after,
  #activitiesBody td:not(:nth-child(4))::after,
  #machinesBody td::after,
  #wasteBody td::after,
  #suppliersBody td::after,
  #materialsBody .line-row::after {
    content: "" !important;
    position: absolute !important;
    left: .8mm !important;
    right: .8mm !important;
    bottom: .65mm !important;
    border-bottom: .2mm dotted #555 !important;
    pointer-events: none !important;
  }

  /* Employees. */
  #workOrderForm > .section-box:nth-of-type(3) {
    height: 29mm !important;
  }

  #workOrderForm > .section-box:nth-of-type(3) thead tr {
    height: 4mm !important;
  }

  #employeesBody tr {
    height: 3.7mm !important;
  }

  #workOrderForm > .section-box:nth-of-type(3) tr > :nth-child(1) { width: 12% !important; }
  #workOrderForm > .section-box:nth-of-type(3) tr > :nth-child(2) { width: 19% !important; }
  #workOrderForm > .section-box:nth-of-type(3) tr > :nth-child(3) { width: 19% !important; }
  #workOrderForm > .section-box:nth-of-type(3) tr > :nth-child(4) { width: 35% !important; }
  #workOrderForm > .section-box:nth-of-type(3) tr > :nth-child(5) { width: 15% !important; }

  #employeesBody td:not(:first-child) {
    padding: 0 .65mm .65mm !important;
    vertical-align: bottom !important;
  }

  #employeesBody input:not([type="checkbox"]) {
    height: 3mm !important;
    line-height: 2.7mm !important;
  }

  #employeesBody td:first-child {
    padding: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
  }

  input[type="checkbox"],
  input[type="radio"] {
    appearance: none !important;
    width: 3.3mm !important;
    height: 3.3mm !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: .25mm solid #777 !important;
    background: #fff !important;
  }

  #employeesBody input[type="checkbox"] {
    margin: 0 auto !important;
  }

  input[type="checkbox"]:checked::after,
  input[type="radio"]:checked::after {
    content: "\2713";
    display: block;
    text-align: center;
    font-size: 8pt;
    line-height: 2.8mm;
  }

  #employeesBody td:nth-child(5) {
    white-space: nowrap !important;
  }

  #employeesBody td:nth-child(5) input {
    display: inline-block !important;
    width: calc(100% - 7mm) !important;
  }

  #employeesBody td:nth-child(5)::before {
    content: none !important;
  }

  #employeesBody td:nth-child(5)::after {
    left: .8mm !important;
    right: .8mm !important;
  }

  #employeesBody td:nth-child(5) {
    font-size: 6.8pt !important;
  }

  #employeesBody td:nth-child(5) input + * {
    display: none !important;
  }

  /* Add the unit without creating a second line. */
  #employeesBody td:nth-child(5) {
    color: transparent !important;
  }

  #employeesBody td:nth-child(5) input {
    color: #111 !important;
  }

  #employeesBody td:nth-child(5)::before {
    content: "uur" !important;
    position: absolute !important;
    right: .8mm !important;
    bottom: .9mm !important;
    color: #111 !important;
    font-size: 6.8pt !important;
  }

  /* Activities. */
  #workOrderForm > .section-box:nth-of-type(4) {
    height: 53mm !important;
  }

  #workOrderForm > .section-box:nth-of-type(4) thead tr {
    height: 6mm !important;
  }

  #activitiesBody tr {
    height: 5.05mm !important;
  }

  #workOrderForm > .section-box:nth-of-type(4) tr > :nth-child(1) { width: 13% !important; }
  #workOrderForm > .section-box:nth-of-type(4) tr > :nth-child(2) { width: 14% !important; }
  #workOrderForm > .section-box:nth-of-type(4) tr > :nth-child(3) { width: 60% !important; }
  #workOrderForm > .section-box:nth-of-type(4) tr > :nth-child(4) { width: 13% !important; }

  #activitiesBody td:not(:nth-child(4)) {
    padding: 0 .65mm .65mm !important;
    vertical-align: bottom !important;
  }

  #activitiesBody input,
  #activitiesBody textarea {
    height: 4.35mm !important;
    line-height: 4mm !important;
  }

  #workOrderForm > .section-box:nth-of-type(4) th:nth-child(4) {
    text-align: center !important;
  }

  #workOrderForm > .section-box:nth-of-type(4) th:nth-child(4)::after {
    content: "ja     nee";
    display: block;
    margin-top: .35mm;
    font-size: 6.4pt;
    line-height: 1 !important;
  }

  #activitiesBody td:nth-child(4) {
    padding: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
  }

  #activitiesBody td:nth-child(4) select {
    display: none !important;
  }

  #activitiesBody td:nth-child(4)::before {
    content: "\2610   \2610";
    display: block !important;
    font-size: 8.5pt;
    line-height: 3.6mm !important;
    white-space: nowrap !important;
  }

  #activitiesBody td:nth-child(4):has(option[value="yes"]:checked)::before {
    content: "\2611   \2610";
  }

  #activitiesBody td:nth-child(4):has(option[value="no"]:checked)::before {
    content: "\2610   \2611";
  }

  /* Machine, material and waste cluster. */
  .machine-waste-grid {
    display: grid !important;
    height: 90mm !important;
    grid-template-columns: minmax(0, 4.6fr) minmax(31mm, 1fr) !important;
    gap: 2mm !important;
    margin: 0 0 2.4mm !important;
    align-items: stretch !important;
    break-inside: avoid;
  }

  .machine-waste-grid > div {
    display: grid !important;
    grid-template-rows: 54mm 34mm !important;
    gap: 2mm !important;
  }

  .machine-panel,
  .material-panel,
  .waste-panel {
    height: 100% !important;
    margin: 0 !important;
  }

  .waste-panel {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
  }

  #machinesBody tr {
    height: 5.9mm !important;
  }

  .machine-panel tr > :nth-child(1) { width: 15% !important; }
  .machine-panel tr > :nth-child(2) { width: 53% !important; }
  .machine-panel tr > :nth-child(3),
  .machine-panel tr > :nth-child(4),
  .machine-panel tr > :nth-child(5) { width: 10.66% !important; }

  #machinesBody td,
  #wasteBody td {
    padding: 0 .65mm .65mm !important;
    vertical-align: bottom !important;
  }

  #machinesBody input,
  #wasteBody input {
    height: 3mm !important;
    line-height: 2.7mm !important;
  }

  #wasteBody tr {
    height: 7mm !important;
  }

  .waste-panel tr > :nth-child(1) { width: 66% !important; }
  .waste-panel tr > :nth-child(2) { width: 34% !important; }

  .material-panel {
    display: grid !important;
    grid-template-rows: 2.8mm minmax(0, 1fr) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #materialsBody {
    display: grid !important;
    height: 100% !important;
    min-height: 0 !important;
    grid-template-rows: repeat(6, minmax(0, 1fr)) !important;
    overflow: hidden !important;
  }

  #materialsBody .line-row {
    position: relative !important;
    display: flex !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 .65mm .65mm !important;
    align-items: flex-end !important;
    overflow: hidden !important;
  }

  #materialsBody .line-row input {
    height: 3mm !important;
    line-height: 2.7mm !important;
  }

  /* Third-party suppliers and receipt check. */
  #workOrderForm > .section-box:nth-of-type(6) {
    height: 42mm !important;
    margin-bottom: 0 !important;
  }

  #workOrderForm > .section-box:nth-of-type(6) thead tr {
    height: 4.8mm !important;
  }

  #workOrderForm > .section-box:nth-of-type(6) tr > :nth-child(1) { width: 23% !important; }
  #workOrderForm > .section-box:nth-of-type(6) tr > :nth-child(2) { width: 49% !important; }
  #workOrderForm > .section-box:nth-of-type(6) tr > :nth-child(3) { width: 28% !important; }

  #suppliersBody tr {
    height: 4.7mm !important;
  }

  #suppliersBody td {
    padding: 0 .65mm .65mm !important;
    vertical-align: bottom !important;
  }

  #suppliersBody input,
  #suppliersBody textarea {
    height: 4.05mm !important;
    line-height: 3.72mm !important;
  }

  .received-check {
    display: flex !important;
    width: 100% !important;
    height: 4.3mm !important;
    min-width: 0 !important;
    margin: .35mm 0 .15mm !important;
    padding: 0 !important;
    gap: 1.2mm !important;
    border: 0 !important;
    align-items: center !important;
    overflow: hidden !important;
    font-size: 6.6pt !important;
    line-height: 1 !important;
  }

  .received-check legend {
    float: left !important;
    width: auto !important;
    max-width: 72% !important;
    margin: 0 .8mm 0 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
  }

  .received-check label {
    display: flex !important;
    margin: 0 !important;
    gap: .5mm !important;
    align-items: center !important;
    white-space: nowrap !important;
  }

  .received-check input[type="radio"] {
    width: 3mm !important;
    height: 3mm !important;
  }

  .notice {
    margin: 0 !important;
    font-size: 6.2pt !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  /* Page 2: remarks only. */
  .notes-section {
    height: 278mm !important;
    margin: 0 !important;
    padding: 2mm 0 0 !important;
    border: 0 !important;
    break-before: page !important;
  }

  .notes-section textarea {
    display: block !important;
    width: 100% !important;
    height: 268mm !important;
    min-height: 0 !important;
    margin-top: 0 !important;
    border: 0 !important;
    line-height: 6.2mm !important;
    background-image: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 6mm,
      #777 6mm,
      #777 6.2mm
    ) !important;
    background-size: 100% 6.2mm !important;
  }
}

/* ===== 2. print-original.css ===== */
@media print {
  /* Reproductie van de originele papieren werkbon. */
  .employees-section > .section-heading,
  .activities-section > .section-heading {
    display: none !important;
  }

  .employees-section,
  .activities-section {
    padding-top: 1.1mm !important;
  }

  .employees-section thead tr {
    height: 5.2mm !important;
  }

  .employees-section th {
    vertical-align: top !important;
    font-size: 8pt !important;
  }

  .employees-section tr > :nth-child(1) { width: 12% !important; }
  .employees-section tr > :nth-child(2) { width: 19% !important; }
  .employees-section tr > :nth-child(3) { width: 19% !important; }
  .employees-section tr > :nth-child(4) { width: 36% !important; }
  .employees-section tr > :nth-child(5) { width: 14% !important; }

  .activities-section thead tr {
    height: 8mm !important;
  }

  .activities-section th {
    font-size: 8pt !important;
  }

  .activities-section th small {
    font-size: 5.5pt !important;
  }

  .activities-section tr > :nth-child(1) { width: 13% !important; }
  .activities-section tr > :nth-child(2) { width: 14% !important; }
  .activities-section tr > :nth-child(3) { width: 60% !important; }
  .activities-section tr > :nth-child(4) { width: 13% !important; }

  .machine-panel .section-heading h3,
  .material-panel .section-heading h3,
  .waste-panel .section-heading h3,
  .suppliers-section .section-heading h3 {
    font-size: 8pt !important;
  }

  .machine-panel thead tr {
    height: 8mm !important;
  }

  .machine-panel th {
    font-size: 7.5pt !important;
  }

  .machine-panel th small {
    display: inline !important;
    font-size: 4.8pt !important;
    white-space: nowrap !important;
  }

  .machine-panel tr > :nth-child(1) { width: 15% !important; }
  .machine-panel tr > :nth-child(2) { width: 56% !important; }
  .machine-panel tr > :nth-child(3) { width: 9.5% !important; }
  .machine-panel tr > :nth-child(4) { width: 9.5% !important; }
  .machine-panel tr > :nth-child(5) { width: 10% !important; }

  .waste-panel .section-heading {
    height: 5mm !important;
  }

  .waste-panel .section-heading h3 {
    line-height: 2.6mm !important;
  }

  .waste-panel thead tr {
    height: 5mm !important;
  }

  .waste-panel th {
    font-size: 7.5pt !important;
  }

  .waste-panel tr > :nth-child(1) { width: 68% !important; }
  .waste-panel tr > :nth-child(2) { width: 32% !important; }

  #wasteBody tr {
    height: 5.2mm !important;
  }

  #wasteBody input {
    font-size: 7pt !important;
  }

  .material-panel {
    grid-template-rows: 4mm minmax(0, 1fr) !important;
  }

  .suppliers-section {
    height: 38mm !important;
  }

  .suppliers-section thead tr {
    height: 5.3mm !important;
  }

  #suppliersBody tr {
    height: 4.5mm !important;
  }

  .received-check {
    margin-top: .7mm !important;
    height: 4mm !important;
  }

  .notice {
    font-size: 6pt !important;
  }

  /* Pagina 2 zoals de scan: titel op de eerste stippellijn. */
  .notes-section {
    position: relative !important;
    padding: 0 !important;
  }

  .notes-section label {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 2 !important;
    background: #fff !important;
    padding-right: 1mm !important;
  }

  .notes-section h3 {
    font-size: 8pt !important;
    line-height: 6.2mm !important;
  }

  .notes-section textarea {
    height: 274mm !important;
    padding: 0 0 0 45mm !important;
    line-height: 6.2mm !important;
    background-image: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 5.8mm,
      #555 5.8mm,
      #555 6mm,
      transparent 6mm,
      transparent 6.2mm
    ) !important;
    background-size: 100% 6.2mm !important;
  }
}

/* ===== 3. print-line-fixes.css ===== */
@media print {
  /* Tekst en stippellijnen gebruiken overal dezelfde inspringing. */
  #employeesBody td:not(:first-child),
  #activitiesBody td:not(:nth-child(4)),
  #machinesBody td,
  #wasteBody td,
  #suppliersBody td,
  #materialsBody .line-row {
    padding-left: 1.35mm !important;
    padding-right: 1.35mm !important;
  }

  #employeesBody input:not([type="checkbox"]),
  #activitiesBody input,
  #activitiesBody textarea,
  #machinesBody input,
  #wasteBody input,
  #suppliersBody input,
  #suppliersBody textarea,
  #materialsBody .line-row input {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #employeesBody td:not(:first-child)::after,
  #activitiesBody td:not(:nth-child(4))::after,
  #machinesBody td::after,
  #wasteBody td::after,
  #suppliersBody td::after,
  #materialsBody .line-row::after {
    left: 1.35mm !important;
    right: 1.35mm !important;
  }

  /* Opdrachtgever, werkadres en plaats beginnen op dezelfde verticale lijn. */
  .stacked-fields label {
    grid-template-columns: 35mm minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  .stacked-fields .field-caption {
    white-space: nowrap !important;
  }

  .stacked-fields input {
    padding-left: 0 !important;
  }

  /* Medewerkers: hoogte en kolomindeling zoals het papieren origineel. */
  #workOrderForm > .section-box.employees-section,
  #workOrderForm > .section-box:nth-of-type(3) {
    height: 30mm !important;
  }

  /* Werkuur: geen stippels onder de losse eenheid 'uur'. */
  #employeesBody td:nth-child(5)::after {
    left: 1.35mm !important;
    right: 7.2mm !important;
    z-index: 1 !important;
  }

  #employeesBody td:nth-child(5)::before {
    right: 1.35mm !important;
    z-index: 2 !important;
    padding-left: 0 !important;
    background: #fff !important;
  }

  .employees-section tr > :nth-child(5) {
    border-right: 0 !important;
  }

  /* Werkzaamheden: acht ruime regels binnen de hoogte van het origineel. */
  #workOrderForm > .section-box.activities-section,
  #workOrderForm > .section-box:nth-of-type(4) {
    height: 56mm !important;
  }

  #activitiesBody tr {
    height: 5.65mm !important;
  }

  #activitiesBody input,
  #activitiesBody textarea {
    box-sizing: border-box !important;
    height: 4.85mm !important;
    line-height: 4.35mm !important;
    overflow: hidden !important;
  }

  .activities-section {
    position: relative !important;
  }

  .activities-section tr > :nth-child(3),
  .activities-section tr > :nth-child(4) {
    border-right: 0 !important;
  }

  .activities-section::after {
    content: "" !important;
    position: absolute !important;
    top: 1.1mm !important;
    bottom: 1.2mm !important;
    left: calc(87% - 1.18mm) !important;
    border-right: .2mm solid #777 !important;
    pointer-events: none !important;
  }

  /* Extra werk: ja en nee op vaste, ruimere posities. */
  #workOrderForm > .section-box:nth-of-type(4) th:nth-child(4) {
    position: relative !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
  }

  #workOrderForm > .section-box:nth-of-type(4) th:nth-child(4)::before,
  #workOrderForm > .section-box:nth-of-type(4) th:nth-child(4)::after {
    position: absolute !important;
    top: 4.2mm !important;
    margin: 0 !important;
    font-size: 6.4pt !important;
    line-height: 1 !important;
    transform: translateX(-50%) !important;
  }

  #workOrderForm > .section-box:nth-of-type(4) th:nth-child(4)::before {
    content: "ja" !important;
    left: 38% !important;
  }

  #workOrderForm > .section-box:nth-of-type(4) th:nth-child(4)::after {
    content: "nee" !important;
    left: 69% !important;
  }

  #activitiesBody td:nth-child(4) {
    position: relative !important;
  }

  #activitiesBody td:nth-child(4)::before,
  #activitiesBody td:nth-child(4)::after {
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    margin: 0 !important;
    font-size: 8.5pt !important;
    line-height: 1 !important;
    transform: translate(-50%, -50%) !important;
    white-space: nowrap !important;
  }

  #activitiesBody td:nth-child(4)::before {
    content: "\2610" !important;
    left: 38% !important;
  }

  #activitiesBody td:nth-child(4)::after {
    content: "\2610" !important;
    left: 69% !important;
  }

  #activitiesBody td:nth-child(4):has(option[value="yes"]:checked)::before {
    content: "\2611" !important;
  }

  #activitiesBody td:nth-child(4):has(option[value="no"]:checked)::after {
    content: "\2611" !important;
  }

  /* Laatste zichtbare tabelkolommen krijgen geen extra korte rechterlijn. */
  .machine-panel tr > :nth-child(5),
  .suppliers-section tr > :nth-child(3) {
    border-right: 0 !important;
  }

  /* Machine, materiaal en afval krijgen dezelfde verhoudingen als het origineel. */
  .machine-waste-grid {
    height: 96mm !important;
  }

  .machine-waste-grid > div {
    grid-template-rows: 58mm 36mm !important;
    gap: 2mm !important;
  }

  .machine-waste-grid > .waste-panel {
    grid-column: 2 !important;
    grid-row: 1 / -1 !important;
    align-self: stretch !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
  }

  /* Afvalvak: koppen op één lijn, originele kolomverhouding en twaalf regels. */
  .waste-panel {
    position: relative !important;
  }

  .waste-panel .section-heading {
    position: absolute !important;
    top: 1.2mm !important;
    left: 1.6mm !important;
    width: calc(68% - 2.18mm) !important;
    height: 8mm !important;
    z-index: 2 !important;
    overflow: visible !important;
  }

  .waste-panel .section-heading h3 {
    width: 100% !important;
    font-size: 7.5pt !important;
    line-height: 2.7mm !important;
    white-space: normal !important;
  }

  .waste-panel thead tr {
    height: 8mm !important;
  }

  .waste-panel thead th:first-child {
    color: transparent !important;
  }

  .waste-panel thead th:nth-child(2) {
    padding-left: 1mm !important;
    padding-right: .4mm !important;
    white-space: nowrap !important;
  }

  .waste-panel tr > :nth-child(1) {
    width: 68% !important;
    border-right: 0 !important;
  }

  .waste-panel tr > :nth-child(2) {
    width: 32% !important;
    border-right: 0 !important;
  }

  #wasteBody tr {
    height: 6.9mm !important;
  }

  #wasteBody td {
    padding-left: 1mm !important;
    padding-right: 1mm !important;
  }

  #wasteBody td::after {
    left: 1mm !important;
    right: 1mm !important;
  }

  #wasteBody input {
    min-width: 0 !important;
    font-size: 6.8pt !important;
    white-space: nowrap !important;
  }

  /* De vaste laatste afvalstroom wordt op twee regels weergegeven zoals op papier. */
  #wasteBody tr:nth-child(10) td:first-child input {
    color: transparent !important;
  }

  #wasteBody tr:nth-child(10) td:first-child::before {
    content: "overig\A(te noemen)" !important;
    position: absolute !important;
    left: 1mm !important;
    bottom: .7mm !important;
    color: #111 !important;
    font-size: 6.2pt !important;
    line-height: 2.5mm !important;
    white-space: pre-line !important;
  }

  /* De kolomscheiding loopt exact van boven- tot onderrand. */
  .waste-panel::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: calc(68% - .58mm) !important;
    border-right: .2mm solid #777 !important;
    pointer-events: none !important;
  }

  /* Derden: hoogte en uitlijning overeenkomstig het papieren origineel. */
  #workOrderForm > .section-box.suppliers-section,
  #workOrderForm > .section-box:nth-of-type(6) {
    height: 44.5mm !important;
  }

  .suppliers-section th:nth-child(3),
  #suppliersBody td:nth-child(3) {
    padding-left: 1.35mm !important;
    padding-right: 1.35mm !important;
  }

  #suppliersBody td:nth-child(3)::after {
    left: 1.35mm !important;
    right: 1.35mm !important;
  }
}

/* ===== 4. print-extra-work.css ===== */
/* Extra werk-printgrid en aansluitende printcorrecties. */
.extra-work-print-grid {
  display: none;
}

@media print {
  .activities-section th:nth-child(4) {
    overflow: visible !important;
    padding-bottom: 1.2mm !important;
    text-align: center !important;
  }

  .activities-section .extra-work-heading-grid {
    display: grid !important;
    width: 11.4mm !important;
    margin: 0 auto !important;
    grid-template-columns: repeat(2, 2.7mm) !important;
    column-gap: 6mm !important;
    justify-content: center !important;
    align-items: center !important;
    transform: translateX(1.5mm) !important;
  }

  .activities-section .extra-work-heading-title {
    grid-column: 1 / -1 !important;
    margin-bottom: .45mm !important;
    font-size: inherit !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .activities-section .extra-work-heading-yes,
  .activities-section .extra-work-heading-no {
    display: block !important;
    width: 2.7mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: #111 !important;
    font-size: 6.4pt !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .activities-section th:nth-child(4)::before,
  .activities-section th:nth-child(4)::after {
    content: none !important;
    display: none !important;
  }

  #activitiesBody td:nth-child(4) .extra-work-options > label {
    display: none !important;
    visibility: hidden !important;
  }

  #activitiesBody td:nth-child(4)::before,
  #activitiesBody td:nth-child(4)::after {
    content: none !important;
    display: none !important;
  }

  #activitiesBody td:nth-child(4) .extra-work-options {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #activitiesBody td:nth-child(4) .extra-work-print-grid {
    display: grid !important;
    visibility: visible !important;
    width: 11.4mm !important;
    margin: 0 auto !important;
    grid-template-columns: repeat(2, 2.7mm) !important;
    column-gap: 6mm !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translateX(1.5mm) !important;
  }

  #activitiesBody td:nth-child(4) .extra-work-print-box {
    position: relative !important;
    display: block !important;
    width: 2.7mm !important;
    height: 2.7mm !important;
    min-width: 2.7mm !important;
    min-height: 2.7mm !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border: .22mm solid #555 !important;
    background: #fff !important;
  }

  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="yes"]:checked) .extra-work-print-yes::before,
  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="yes"]:checked) .extra-work-print-yes::after,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:first-child .print-choice:not(:empty)) .extra-work-print-yes::before,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:first-child .print-choice:not(:empty)) .extra-work-print-yes::after,
  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="no"]:checked) .extra-work-print-no::before,
  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="no"]:checked) .extra-work-print-no::after,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:nth-child(2) .print-choice:not(:empty)) .extra-work-print-no::before,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:nth-child(2) .print-choice:not(:empty)) .extra-work-print-no::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    display: block !important;
    width: 2.15mm !important;
    height: .24mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #111 !important;
    transform-origin: center !important;
  }

  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="yes"]:checked) .extra-work-print-yes::before,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:first-child .print-choice:not(:empty)) .extra-work-print-yes::before,
  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="no"]:checked) .extra-work-print-no::before,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:nth-child(2) .print-choice:not(:empty)) .extra-work-print-no::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
  }

  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="yes"]:checked) .extra-work-print-yes::after,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:first-child .print-choice:not(:empty)) .extra-work-print-yes::after,
  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="no"]:checked) .extra-work-print-no::after,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:nth-child(2) .print-choice:not(:empty)) .extra-work-print-no::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
  }

  .employees-section th,
  .activities-section th:not(:nth-child(4)),
  .machine-panel th,
  .suppliers-section th,
  .waste-panel th {
    padding-left: 1.35mm !important;
    padding-right: 1.35mm !important;
  }

  .machine-panel > .section-heading,
  .material-panel > .section-heading,
  .suppliers-section > .section-heading {
    padding-left: 1.35mm !important;
    padding-right: 1.35mm !important;
  }

  .activities-section th:nth-child(4) {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .machine-waste-grid {
    grid-template-columns: minmax(0, 1fr) 34mm !important;
  }

  .waste-panel .section-heading {
    left: 2.6mm !important;
    width: calc(72% - 3.18mm) !important;
  }

  .waste-panel tr > :nth-child(1) {
    width: 72% !important;
  }

  .waste-panel tr > :nth-child(2) {
    width: 28% !important;
  }

  .waste-panel::after {
    left: calc(72% - .58mm) !important;
  }

  #wasteBody input {
    width: 100% !important;
    font-size: 6.5pt !important;
    letter-spacing: -.02mm !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  #wasteBody tr:first-child td:first-child input {
    font-size: 6.2pt !important;
  }

  #wasteBody td:nth-child(2) {
    padding-left: .65mm !important;
    padding-right: .65mm !important;
  }

  #wasteBody td:nth-child(2)::after {
    left: .65mm !important;
    right: .65mm !important;
  }

  #wasteBody input[type="number"] {
    appearance: textfield !important;
    -moz-appearance: textfield !important;
    width: 100% !important;
    padding: 0 !important;
    font-size: 6.5pt !important;
    letter-spacing: 0 !important;
  }

  #wasteBody input[type="number"]::-webkit-inner-spin-button,
  #wasteBody input[type="number"]::-webkit-outer-spin-button {
    appearance: none !important;
    -webkit-appearance: none !important;
    margin: 0 !important;
  }

  .notes-section {
    position: relative !important;
    height: 278mm !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .notes-section label {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 3 !important;
    height: 6.2mm !important;
    padding: 0 1mm 0 0 !important;
    background: #fff !important;
  }

  .notes-section h3 {
    line-height: 6.2mm !important;
  }

  .notes-print-lines {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
  }

  .notes-print-line {
    display: block !important;
    width: 100% !important;
    height: 6.2mm !important;
    border-bottom: .2mm dotted #555 !important;
  }

  .notes-print-line:first-child {
    width: 100% !important;
    margin-left: 0 !important;
    border-bottom: 0 !important;
  }

  .notes-section textarea {
    display: block !important;
    position: absolute !important;
    top: 6.2mm !important;
    left: 0 !important;
    z-index: 2 !important;
    width: 100% !important;
    height: calc(100% - 6.2mm) !important;
    margin: 0 !important;
    padding: 3.1mm .5mm 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    line-height: 6.2mm !important;
    overflow: hidden !important;
  }

  .worknumber-field {
    grid-template-columns: 35mm minmax(0, 1fr) !important;
    column-gap: 0 !important;
  }

  .worknumber-field input {
    padding-left: 0 !important;
  }

  .machine-panel thead tr {
    height: 6.2mm !important;
  }

  #machinesBody tr {
    height: 5.35mm !important;
  }
}

/* ===== 5. work-order-print.css ===== */
@page {
  size: A4 portrait;
  margin: 8mm 13mm;
}

@media print {
  .no-print { display: none !important; }
  thead { display: table-header-group !important; }
  tfoot { display: table-footer-group !important; }

  tbody tr,
  #materialsBody .line-row {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.print-has-overflow .notes-section:not(.notes-continuation-section) {
    break-before: page !important;
    page-break-before: always !important;
  }

  body.print-overflow-employees #workOrderForm > .section-box:nth-of-type(3) {
    height: auto !important;
    min-height: 29mm !important;
    max-height: none !important;
    overflow: visible !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }

  body.print-overflow-employees #employeesBody tr {
    height: 3.7mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.print-overflow-activities #workOrderForm > .section-box:nth-of-type(4),
  body.print-overflow-activities .activities-section {
    height: auto !important;
    min-height: 53mm !important;
    max-height: none !important;
    overflow: visible !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }

  body.print-overflow-activities .activities-section .table-wrap,
  body.print-overflow-activities .activities-section table,
  body.print-overflow-activities .activities-section tbody {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.print-overflow-activities #activitiesBody tr {
    height: 5.65mm !important;
    min-height: 5.65mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.print-overflow-activities #activitiesBody input,
  body.print-overflow-activities #activitiesBody textarea {
    height: 4.85mm !important;
    min-height: 4.85mm !important;
    overflow: hidden !important;
  }

  body.print-overflow-activities .machine-waste-grid {
    break-before: page !important;
    page-break-before: always !important;
  }

  body.print-overflow-suppliers #workOrderForm > .section-box:nth-of-type(6),
  body.print-overflow-suppliers .suppliers-section {
    height: auto !important;
    min-height: 44.5mm !important;
    max-height: none !important;
    overflow: visible !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }

  body.print-overflow-suppliers #suppliersBody tr {
    height: 4.5mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.print-overflow-machine-cluster .machine-waste-grid {
    height: auto !important;
    min-height: 96mm !important;
    grid-template-rows: auto !important;
    align-items: stretch !important;
    overflow: visible !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  body.print-overflow-machine-cluster .machine-waste-grid > div {
    height: auto !important;
    min-height: 96mm !important;
    grid-template-rows: minmax(58mm, auto) minmax(36mm, auto) !important;
    overflow: visible !important;
  }

  body.print-overflow-machine-cluster .machine-panel,
  body.print-overflow-machine-cluster .material-panel,
  body.print-overflow-machine-cluster .waste-panel {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.print-overflow-machines #machinesBody tr {
    height: 5.35mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.print-overflow-materials #materialsBody {
    display: grid !important;
    height: auto !important;
    grid-template-rows: none !important;
    grid-auto-rows: minmax(5.2mm, auto) !important;
    overflow: visible !important;
  }

  body.print-overflow-materials #materialsBody .line-row {
    height: auto !important;
    min-height: 5.2mm !important;
    overflow: visible !important;
  }

  body.print-overflow-waste #wasteBody tr {
    height: 6.9mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.print-fill-notes .notes-section:not(.notes-continuation-section) {
    height: var(--notes-fill-height) !important;
    min-height: var(--notes-fill-height) !important;
    overflow: hidden !important;
    break-before: auto !important;
    page-break-before: auto !important;
  }

  body.print-fill-notes .notes-section:not(.notes-continuation-section) .notes-print-lines {
    height: var(--notes-fill-height) !important;
    overflow: hidden !important;
  }

  .notes-continuation-section {
    position: relative !important;
    display: block !important;
    height: 278mm !important;
    min-height: 278mm !important;
    max-height: 278mm !important;
    margin: 0 !important;
    overflow: hidden !important;
    break-before: page !important;
    page-break-before: always !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .notes-continuation-section .notes-print-lines {
    height: 278mm !important;
    overflow: hidden !important;
  }

  .notes-section label,
  .notes-section h3 {
    height: 7.4mm !important;
    line-height: 7.4mm !important;
  }

  .notes-print-line {
    height: 7.4mm !important;
  }

  /* Een textarea wordt door browsers niet betrouwbaar met print-line-height gezet. */
  .notes-section .notes-print-source {
    display: none !important;
  }

  .notes-section .notes-print-value,
  .notes-section .print-value {
    display: block !important;
    position: absolute !important;
    top: 7.4mm !important;
    left: 0 !important;
    z-index: 2 !important;
    width: 100% !important;
    height: calc(100% - 7.4mm) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: .6mm .5mm 0 !important;
    box-sizing: border-box !important;
    border: 0 !important;
    background: transparent !important;
    color: #111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 8.5pt !important;
    font-weight: 400 !important;
    line-height: 7.4mm !important;
    white-space: pre-wrap !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  body.print-fill-notes .notes-section:not(.notes-continuation-section) .notes-print-value,
  body.print-fill-notes .notes-section:not(.notes-continuation-section) .print-value {
    height: calc(var(--notes-fill-height) - 7.4mm) !important;
  }
}

/* ===== 6. print-extra-work-final.css ===== */
/* Laat de definitieve Extra werk-grid als laatste in de printcascade gelden. */
.extra-work-print-grid {
  display: none;
}

@media print {
  .activities-section th:nth-child(4) {
    overflow: visible !important;
    padding-bottom: 1.2mm !important;
    text-align: center !important;
  }

  .activities-section .extra-work-heading-grid {
    display: grid !important;
    width: 11.4mm !important;
    margin: 0 auto !important;
    grid-template-columns: repeat(2, 2.7mm) !important;
    column-gap: 6mm !important;
    justify-content: center !important;
    align-items: center !important;
    transform: translateX(1.5mm) !important;
  }

  .activities-section .extra-work-heading-title {
    grid-column: 1 / -1 !important;
    margin-bottom: .45mm !important;
    font-size: inherit !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .activities-section .extra-work-heading-yes,
  .activities-section .extra-work-heading-no {
    display: block !important;
    width: 2.7mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: #111 !important;
    font-size: 6.4pt !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .activities-section th:nth-child(4)::before,
  .activities-section th:nth-child(4)::after {
    content: none !important;
    display: none !important;
  }

  #activitiesBody td:nth-child(4) .extra-work-options > label {
    display: none !important;
    visibility: hidden !important;
  }

  #activitiesBody td:nth-child(4)::before,
  #activitiesBody td:nth-child(4)::after {
    content: none !important;
    display: none !important;
  }

  #activitiesBody td:nth-child(4) .extra-work-options {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #activitiesBody td:nth-child(4) .extra-work-print-grid {
    display: grid !important;
    visibility: visible !important;
    width: 11.4mm !important;
    margin: 0 auto !important;
    grid-template-columns: repeat(2, 2.7mm) !important;
    column-gap: 6mm !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translateX(1.5mm) !important;
  }

  #activitiesBody td:nth-child(4) .extra-work-print-box {
    position: relative !important;
    display: block !important;
    width: 2.7mm !important;
    height: 2.7mm !important;
    min-width: 2.7mm !important;
    min-height: 2.7mm !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border: .22mm solid #555 !important;
    background: #fff !important;
  }

  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="yes"]:checked) .extra-work-print-yes::before,
  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="yes"]:checked) .extra-work-print-yes::after,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:first-child .print-choice:not(:empty)) .extra-work-print-yes::before,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:first-child .print-choice:not(:empty)) .extra-work-print-yes::after,
  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="no"]:checked) .extra-work-print-no::before,
  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="no"]:checked) .extra-work-print-no::after,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:nth-child(2) .print-choice:not(:empty)) .extra-work-print-no::before,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:nth-child(2) .print-choice:not(:empty)) .extra-work-print-no::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    display: block !important;
    width: 2.15mm !important;
    height: .24mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #111 !important;
    transform-origin: center !important;
  }

  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="yes"]:checked) .extra-work-print-yes::before,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:first-child .print-choice:not(:empty)) .extra-work-print-yes::before,
  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="no"]:checked) .extra-work-print-no::before,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:nth-child(2) .print-choice:not(:empty)) .extra-work-print-no::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
  }

  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="yes"]:checked) .extra-work-print-yes::after,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:first-child .print-choice:not(:empty)) .extra-work-print-yes::after,
  #activitiesBody td:nth-child(4):has(input[data-field="extraWork"][value="no"]:checked) .extra-work-print-no::after,
  #activitiesBody td:nth-child(4):has(.extra-work-options label:nth-child(2) .print-choice:not(:empty)) .extra-work-print-no::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
  }
}
