/*
 * The payslip document — the one exception to Tailwind (see CLAUDE.md).
 * Rendered through headless Chrome at exact A4 millimetres, so geometry
 * is expressed in mm and this file is deliberately plain CSS, not
 * Tailwind utilities: a utility-class change elsewhere in the app must
 * never shift this layout.
 */

.payslip-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 12mm 14mm;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
  color: #1a1a1a;
  background: #fff;
}

@page {
  size: A4;
  margin: 0;
}

.payslip-letterhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2mm;
}

.payslip-mark {
  font-size: 18pt;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: #1f8b4c;
}

.payslip-generated-at {
  font-size: 8pt;
  color: #555;
  text-align: right;
}

.payslip-rule {
  height: 1.5mm;
  background: #1f8b4c;
  margin-bottom: 4mm;
}

.payslip-title {
  text-align: center;
  font-weight: bold;
  text-decoration: underline;
  font-size: 12pt;
  margin-bottom: 4mm;
  text-transform: uppercase;
}

.payslip-company-box {
  border: 0.4mm solid #1a1a1a;
  padding: 3mm;
  text-align: center;
  margin-bottom: 4mm;
}

.payslip-company-name {
  font-weight: bold;
  font-size: 11pt;
}

.payslip-company-address {
  font-size: 9pt;
  margin: 1mm 0;
}

.payslip-company-period {
  font-size: 9pt;
  font-style: italic;
}

.payslip-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border: 0.3mm solid #ccc;
  margin-bottom: 4mm;
  font-size: 9pt;
}

.payslip-detail-cell {
  display: flex;
  justify-content: space-between;
  padding: 1.5mm 3mm;
  border-bottom: 0.2mm solid #eee;
  border-right: 0.2mm solid #eee;
}

.payslip-detail-label {
  color: #555;
}

.payslip-detail-value {
  font-weight: bold;
  text-align: right;
}

.payslip-earnings-deductions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4mm;
  margin-bottom: 3mm;
}

.payslip-line-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
}

.payslip-line-table th {
  text-align: left;
  background: #eef7f1;
  padding: 1.5mm 2mm;
  border: 0.2mm solid #ccc;
}

.payslip-line-table td {
  padding: 1.5mm 2mm;
  border: 0.2mm solid #ccc;
}

.payslip-line-table td.payslip-amount {
  text-align: right;
}

.payslip-totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4mm;
  font-weight: bold;
  font-size: 9.5pt;
  margin-bottom: 3mm;
}

.payslip-totals div {
  display: flex;
  justify-content: space-between;
  border-top: 0.3mm solid #1a1a1a;
  padding-top: 1.5mm;
}

.payslip-net {
  text-align: center;
  font-size: 11pt;
  font-weight: bold;
  border: 0.4mm solid #1f8b4c;
  padding: 3mm;
  margin-bottom: 3mm;
}

.payslip-net-words {
  text-align: center;
  font-size: 9pt;
  font-style: italic;
  margin-bottom: 4mm;
}

.payslip-footer {
  background: #1f8b4c;
  color: #fff;
  text-align: center;
  font-size: 8pt;
  padding: 2.5mm;
  margin-top: auto;
}

.payslip-warnings {
  border: 0.3mm dashed #c0392b;
  color: #c0392b;
  font-size: 8pt;
  padding: 2mm 3mm;
  margin-bottom: 3mm;
}
