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

* {
  box-sizing: border-box;
}

body {
  background: #edf3f6;
  color: #1d2b36;
  font-family: "Yu Gothic", "Meiryo", sans-serif;
  margin: 0;
}

.print-toolbar {
  align-items: center;
  background: #233340;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  padding: 12px 24px;
}

.print-toolbar span {
  color: #c8d6df;
  margin-left: 12px;
}

.print-toolbar-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.print-toolbar button {
  background: #2d7f99;
  border: 1px solid #66a9ba;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 6px 14px;
}

.print-toolbar .secondary-print-button {
  background: #ffffff;
  border-color: #b9cbd4;
  color: #233340;
}

.print-toolbar button:disabled {
  background: #d8e2e8;
  border-color: #c4d0d8;
  color: #7a8b96;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .print-toolbar #printButton {
    display: none;
  }
}

.submission-status-badge {
  border: 1px solid #7896a3;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  margin-left: 0;
  padding: 6px 10px;
  white-space: nowrap;
}

.submission-status-badge[data-state="submitted"] {
  background: #1f6f63;
  border-color: #80c3b7;
}

.submission-status-badge[data-state="approved"],
.submission-status-badge[data-state="approved-partial"] {
  background: #245d8f;
  border-color: #8db9df;
}

.submission-status-badge[data-state="attention"] {
  background: #9a3027;
  border-color: #de8b80;
}

.print-page {
  background: #ffffff;
  margin: 16px auto;
  min-height: 210mm;
  padding: 8mm;
  width: 297mm;
}

.print-header {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4mm;
}

.print-header h1 {
  display: none;
  font-size: 18pt;
  margin: 0 0 2mm;
}

.print-header p {
  color: #1d2b36;
  display: block;
  font-size: 17pt;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.print-meta {
  display: grid;
  font-size: 8pt;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  min-width: 166mm;
}

.print-meta div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  margin-left: -0.6pt;
  min-width: 0;
}

.print-meta dt,
.print-meta dd {
  border: 0.6pt solid #111111;
  margin: 0;
  padding: 1mm 2mm;
}

.print-meta dt {
  background: #e8eff3;
  font-weight: 700;
  text-align: center;
}

.print-meta dd {
  font-weight: 700;
  white-space: nowrap;
}

.print-reconciliation-hash {
  align-items: baseline;
  color: #46545d;
  display: flex;
  font-size: 6.5pt;
  justify-content: flex-end;
  margin: 2mm 0 0;
  white-space: nowrap;
}

.print-reconciliation-hash code {
  color: #17222b;
  font-family: Consolas, "Courier New", monospace;
  font-size: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.print-summary,
.print-adjustment-summary,
.print-wage-summary {
  display: grid;
  gap: 1mm;
}

.print-summary {
  display: none;
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 3mm;
}

.print-adjustment-summary {
  display: none;
}

.print-wage-summary {
  display: flex;
  flex-wrap: nowrap;
  margin: 1.5mm 0 3mm;
}

.print-wage-summary [hidden] {
  display: none !important;
}

.print-summary div,
.print-adjustment-summary div,
.print-wage-summary div {
  align-items: baseline;
  border: 0.6pt solid #111111;
  display: flex;
  flex: 1 1 0;
  justify-content: space-between;
  min-width: 0;
  padding: 1mm 2mm;
}

.print-adjustment-summary div,
.print-wage-summary div {
  background: #f7f2e8;
}

.print-summary span,
.print-adjustment-summary span,
.print-wage-summary span {
  color: #526472;
  font-size: 7pt;
  font-weight: 700;
  white-space: nowrap;
}

.print-summary strong,
.print-adjustment-summary strong,
.print-wage-summary strong {
  font-size: 9pt;
  white-space: nowrap;
}

.print-daily-total-summary {
  align-items: center;
  border: 0.6pt solid #111111;
  display: none;
  gap: 3mm;
  justify-content: center;
  margin-bottom: 3mm;
  padding: 1mm 2mm;
}

.print-daily-total-summary > span {
  color: #526472;
  font-size: 7pt;
  font-weight: 800;
}

.print-daily-total-summary dl {
  align-items: center;
  display: flex;
  gap: 2mm;
  margin: 0;
}

.print-daily-total-summary div {
  display: flex;
  gap: 0.8mm;
}

.print-daily-total-summary dt,
.print-daily-total-summary dd {
  font-size: 7pt;
  margin: 0;
}

.print-daily-total-summary dt {
  color: #526472;
  font-weight: 700;
}

.print-daily-total-summary dd {
  font-weight: 800;
}

.submission-issue-panel {
  background: #fff7ed;
  border: 1px solid #f2b57f;
  margin: 0 0 3mm;
  padding: 2mm 3mm;
}

.submission-issue-header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.submission-issue-header strong {
  color: #8a3c00;
  font-size: 10pt;
}

.submission-issue-header span {
  color: #62422a;
  font-size: 8pt;
  font-weight: 700;
  margin-left: 0;
}

.submission-issue-header a {
  color: #245d8f;
  font-size: 8pt;
  font-weight: 800;
  text-decoration: none;
}

.submission-issue-list {
  display: grid;
  gap: 1mm;
  margin: 2mm 0 0;
  padding-left: 4mm;
}

.submission-issue-list li {
  align-items: center;
  color: #56351d;
  display: flex;
  font-size: 8pt;
  font-weight: 700;
  gap: 2mm;
  justify-content: space-between;
}

.submission-issue-action {
  background: #ffffff;
  border: 1px solid #d49861;
  border-radius: 4px;
  color: #7a3b00;
  flex: 0 0 auto;
  font-size: 8pt;
  font-weight: 800;
  padding: 0.8mm 2mm;
  text-decoration: none;
}

.print-table {
  border-collapse: collapse;
  font-size: 7pt;
  table-layout: fixed;
  width: 100%;
}

.print-table thead,
.print-table tfoot {
  display: table-row-group;
}

.print-table-block {
  margin-bottom: 4mm;
}

.print-table-block caption {
  color: #384a57;
  display: none;
  font-size: 7pt;
  font-weight: 800;
  padding: 0 0 1mm;
  text-align: left;
}

.print-table th,
.print-table td {
  border-bottom: 0.6pt solid #111111;
  border-left: 0.6pt solid #111111;
  border-right: 0;
  border-top: 0.6pt solid #111111;
  height: 4.7mm;
  line-height: 1;
  overflow: hidden;
  padding: 0 0.35mm;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.print-table th {
  background: #dfe9ee;
  font-weight: 800;
  height: 8mm;
  line-height: 1.05;
  text-align: center;
}

.print-table th:last-child,
.print-table td:last-child {
  border-right: 1.2pt solid #111111;
}

.print-table thead tr:first-child th {
  border-top: 1.2pt solid #111111;
}

.print-table tbody tr:first-child td {
  border-top: 1.2pt solid #111111;
}

.print-table tfoot tr:first-child th,
.print-table tfoot tr:first-child td {
  border-top: 1.8pt double #111111;
}

.print-table tfoot tr:last-child th,
.print-table tfoot tr:last-child td {
  border-bottom: 1.2pt solid #111111;
}

.print-table .date-column,
.print-table .type-column,
.print-table .start-time-column,
.print-table .actual-column,
.print-table .project-total-column,
.print-table .project-start-column,
.print-table .note-column {
  border-left-width: 1.2pt;
}

.print-table .late-night-column,
.print-table .time-leave-column,
.print-table .non-project-column,
.print-table .note-column {
  border-left: 1.8pt double #111111;
}

.print-table .project-start-column {
  border-left: 1.2pt solid #111111;
}

.print-table .week-start-row td {
  border-top: 1.2pt solid #111111;
}

.print-table .validation-invalid-row td {
  background: #ffe2de;
}

.print-table .validation-warning-row td {
  background: #fff2d2;
}

.print-table .date-column {
  text-align: center;
  width: 15mm;
}

.print-table .type-column {
  text-align: center;
  width: 8mm;
}

.print-table .time-column {
  text-align: center;
  width: 10mm;
}

.print-table .duration-column {
  width: 10mm;
}

.print-table .project-total-column {
  width: 10mm;
}

.print-table .project-column {
  width: 10mm;
}

.print-table td.note-column {
  overflow: hidden;
  text-overflow: clip;
  text-align: left;
  white-space: nowrap;
  width: auto;
}

.print-table th.note-column {
  text-align: center;
  width: auto;
}

.print-table-continuation .project-column {
  width: 10mm;
}

.print-table-continuation {
  width: 253mm;
}

.print-table-continuation .note-column {
  width: auto;
}

.print-continuation-page {
  break-before: page;
  margin-top: 0;
}

.print-continuation-title {
  color: #1d2b36;
  display: none;
  font-size: 17pt;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 4mm;
}

.print-title-text {
  display: none;
}

.screen-title-text {
  display: inline;
}

.print-table .project-code {
  display: block;
  font-size: 6.2pt;
  line-height: 1;
  text-align: center;
}

.print-table .project-name {
  color: #526472;
  display: block;
  font-size: 5pt;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  text-overflow: clip;
  transform: scaleX(0.86);
  transform-origin: center center;
  white-space: nowrap;
}

.print-table .project-column {
  vertical-align: middle;
}

.print-table .holiday-row td {
  background: transparent;
}

.print-table .summary-row th,
.print-table .summary-row td {
  background: transparent;
  font-weight: 800;
}

.print-status {
  color: #5a6c78;
  display: none;
  font-size: 8pt;
  margin: 3mm 0 0;
}

.error {
  color: #b42318;
}

@media print {
  body {
    background: #ffffff;
  }

  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .print-toolbar {
    display: none;
  }

  .print-page {
    margin: 0;
    min-height: auto;
    padding: 0;
    width: auto;
  }

  .print-header {
    margin-bottom: 2mm;
  }

  .print-header h1 {
    font-size: 15pt;
    margin-bottom: 1.5mm;
  }

  .print-header p {
    font-size: 15pt;
  }

  .print-continuation-title {
    display: block;
    font-size: 15pt;
    margin-bottom: 2mm;
  }

  .screen-title-text {
    display: none;
  }

  .print-title-text {
    display: inline;
  }

  .print-meta dt,
  .print-meta dd {
    padding: 0.7mm 1mm;
  }

  .print-summary,
  .print-wage-summary {
    margin-bottom: 1.5mm;
  }

  .print-summary div,
  .print-adjustment-summary div,
  .print-wage-summary div,
  .print-daily-total-summary {
    padding: 0.6mm 1mm;
  }

  .print-daily-total-summary {
    margin-bottom: 1.5mm;
  }

  .print-table {
    font-size: 7pt;
  }

  .print-table thead,
  .print-table tfoot {
    display: table-row-group !important;
  }

  .print-table-block {
    margin-bottom: 0;
  }

  .print-table-block caption {
    font-size: 6.3pt;
    padding-bottom: 0.5mm;
  }

  .print-table th,
  .print-table td {
    height: 4.7mm;
    padding: 0 0.35mm;
  }

  .print-table th {
    height: 8mm;
  }

  .print-table .project-code {
    font-size: 6.2pt;
  }

  .print-table .project-name {
    font-size: 5pt;
  }

  .print-status {
    display: none;
  }

  .submission-issue-panel {
    display: none;
  }

  .print-table-block + .print-table-block {
    break-before: page;
  }
}
