.employee-name {
  position: relative;
}

.employee-print-button {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin-inline-start: auto;
  padding: 0.52rem 0.82rem;
  border: 1px solid color-mix(in srgb, var(--employee, #334155) 55%, white);
  border-radius: 0.65rem;
  background: var(--employee, #334155);
  color: #111827;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(15 23 42 / 14%);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.employee-print-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(15 23 42 / 20%);
}

.employee-print-button:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

@page {
  size: A4 landscape;
  margin: 8mm;
}

@media print {
  html,
  body {
    width: 100%;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #111827 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.employee-printing > * {
    display: none !important;
  }

  body.employee-printing > #root,
  body.employee-printing main,
  body.employee-printing main .workspace,
  body.employee-printing main .sheet-wrap,
  body.employee-printing main .employee-grid,
  body.employee-printing main .employee-card.print-target {
    display: block !important;
  }

  body.employee-printing #root > *:not(main),
  body.employee-printing main > *:not(.workspace),
  body.employee-printing main .workspace > *:not(.sheet-wrap),
  body.employee-printing main .sheet-wrap > *:not(.employee-grid),
  body.employee-printing main .employee-grid > *:not(.print-target),
  body.employee-printing .employee-print-button,
  body.employee-printing button,
  body.employee-printing select,
  body.employee-printing [role="button"] {
    display: none !important;
  }

  body.employee-printing main,
  body.employee-printing .employee-grid {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.employee-printing .employee-card.print-target {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    break-inside: auto;
  }

  body.employee-printing .employee-card.print-target .employee-name {
    display: flex !important;
    align-items: center;
    gap: 3mm;
    margin: 0 0 4mm !important;
    padding: 3mm 4mm !important;
    border: 1px solid #94a3b8;
    border-inline-start: 6px solid var(--employee, #334155);
    border-radius: 2mm;
    background: color-mix(in srgb, var(--employee, #e2e8f0) 20%, white) !important;
  }

  body.employee-printing .employee-card.print-target .employee-name strong {
    font-size: 16pt !important;
    color: #0f172a !important;
  }

  body.employee-printing .employee-card.print-target .table-wrap,
  body.employee-printing .employee-card.print-target [class*="table"] {
    overflow: visible !important;
    max-height: none !important;
  }

  body.employee-printing .employee-card.print-target table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 7pt !important;
  }

  body.employee-printing .employee-card.print-target thead {
    display: table-header-group;
  }

  body.employee-printing .employee-card.print-target tr {
    break-inside: avoid;
  }

  body.employee-printing .employee-card.print-target th,
  body.employee-printing .employee-card.print-target td {
    height: auto !important;
    padding: 1.05mm 1.2mm !important;
    border: 0.25mm solid #94a3b8 !important;
    overflow-wrap: anywhere;
  }

  body.employee-printing .employee-card.print-target th {
    background: var(--employee, #334155) !important;
    color: #111827 !important;
    font-weight: 800 !important;
  }

  body.employee-printing .employee-card.print-target input,
  body.employee-printing .employee-card.print-target textarea {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #111827 !important;
    font: inherit !important;
    box-shadow: none !important;
  }
}
