body {
  min-height: 100vh;
}

.table td,
.table th {
  vertical-align: middle;
}

.job-sheet-page-v2 {
  background: #f2f2f2;
  color: #111;
  margin: 0;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.job-sheet-actions {
  display: flex;
  gap: 8px;
  margin: 0 auto 10px;
  max-width: 860px;
}

.job-btn {
  border: 1px solid #222;
  background: #fff;
  color: #111;
  padding: 6px 10px;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
}

.job-btn-primary {
  background: #1f2937;
  color: #fff;
}

.job-sheet-v2 {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #161616;
  box-sizing: border-box;
  padding: 12px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid #161616;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.sheet-brand {
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.sheet-header h1 {
  margin: 2px 0 0;
  font-size: 20px;
}

.sheet-meta {
  font-size: 12px;
  text-align: right;
  line-height: 1.35;
}

.sheet-section {
  border: 1px solid #161616;
  margin-bottom: 8px;
}

.sheet-section h2 {
  margin: 0;
  padding: 5px 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #e6e6e6;
  border-bottom: 1px solid #161616;
}

.sheet-grid {
  display: grid;
  gap: 0;
}

.sheet-grid.two-col {
  grid-template-columns: 1fr 1fr;
}

.sheet-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #d0d0d0;
  padding: 7px 8px;
  font-size: 12px;
}

.sheet-row span {
  font-weight: 700;
}

.sheet-row strong {
  font-weight: 500;
  text-align: right;
}

.sheet-row.full {
  border-top: 1px solid #d0d0d0;
}

.sheet-row.total {
  background: #efefef;
}

.notes-box {
  min-height: 140px;
  border-top: 0;
  padding: 8px;
  font-size: 12px;
  white-space: pre-wrap;
  line-height: 1.35;
}

.signature {
  display: flex;
  gap: 10px;
  padding: 8px;
}

.signature-line {
  flex: 1;
  font-size: 12px;
}

.signature-line span {
  font-weight: 700;
}

.sheet-disclaimer {
  border: 1px solid #161616;
  background: #f3f3f3;
  font-size: 11px;
  padding: 7px 8px;
  line-height: 1.35;
}

@media (max-width: 700px) {
  .job-sheet-page-v2 {
    padding: 8px;
  }

  .sheet-grid.two-col {
    grid-template-columns: 1fr;
  }

  .sheet-header {
    flex-direction: column;
  }

  .sheet-meta {
    text-align: left;
  }

  .signature {
    flex-direction: column;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 6mm;
  }

  html,
  body {
    width: 210mm;
    height: 297mm;
    margin: 0;
    padding: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print {
    display: none !important;
  }

  .job-sheet-page-v2 {
    background: #fff;
    padding: 0;
  }

  .job-sheet-v2 {
    border: 0;
    max-width: 198mm;
    padding: 0;
  }

  .sheet-header h1 {
    font-size: 17px;
  }

  .sheet-brand,
  .sheet-meta,
  .sheet-section h2,
  .sheet-row,
  .notes-box,
  .signature-line,
  .sheet-disclaimer {
    font-size: 10px;
  }

  .notes-box {
    min-height: 115px;
  }
}
