/* ===== PDF出力用レイアウト ===== */

#pdf-output {
  width: 794px; /* A4 width at 96dpi */
  padding: 24px 32px;
  background: #fff;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  color: #000;
  line-height: 1.4;
  position: absolute;
  left: -9999px;
  top: 0;
}

#pdf-output.visible {
  position: static;
}

/* Header */
#pdf-output .pdf-header {
  text-align: center;
  margin-bottom: 12px;
  border-bottom: 2px solid #000;
  padding-bottom: 8px;
}

#pdf-output .pdf-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 4px;
}

#pdf-output .pdf-store {
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

#pdf-output .pdf-date {
  font-size: 12px;
  margin-top: 4px;
}

/* Tables */
#pdf-output table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

#pdf-output th,
#pdf-output td {
  border: 1px solid #333;
  padding: 3px 6px;
  font-size: 11px;
}

#pdf-output th {
  background: #e8e8e8;
  font-weight: 700;
  text-align: center;
}

#pdf-output td {
  text-align: right;
}

#pdf-output td.label-cell {
  text-align: left;
  font-weight: 500;
  background: #f8f8f8;
  width: 45%;
}

#pdf-output td.amount-cell {
  width: 25%;
  font-variant-numeric: tabular-nums;
}

/* Section titles in PDF */
#pdf-output .pdf-section-title {
  font-size: 12px;
  font-weight: 700;
  background: #333;
  color: #fff;
  padding: 3px 8px;
  margin-bottom: 0;
}

/* Total row */
#pdf-output .pdf-total-row td {
  font-weight: 700;
  background: #f0f0f0;
  border-top: 2px solid #333;
}

/* Balance highlight */
#pdf-output .pdf-balance td {
  font-weight: 700;
  font-size: 12px;
  background: #e8f0fe;
}

/* Denomination grid */
#pdf-output .denom-table {
  width: 100%;
}

#pdf-output .denom-table td {
  padding: 2px 6px;
  font-size: 10px;
}

#pdf-output .denom-table .denom-val {
  font-weight: 600;
}

/* Two column layout for PDF */
#pdf-output .pdf-columns {
  display: flex;
  gap: 12px;
}

#pdf-output .pdf-col {
  flex: 1;
}

/* Signatures */
#pdf-output .pdf-signatures {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #333;
}

#pdf-output .pdf-sig-box {
  text-align: center;
}

#pdf-output .pdf-sig-label {
  font-size: 10px;
  color: #666;
}

#pdf-output .pdf-sig-name {
  font-size: 12px;
  font-weight: 600;
  min-width: 80px;
  border-bottom: 1px solid #333;
  padding: 2px 8px;
}

/* Discrepancy */
#pdf-output .pdf-discrepancy-ok {
  color: #000;
}

#pdf-output .pdf-discrepancy-ng {
  color: #d93025;
  font-weight: 700;
}

/* Memo */
#pdf-output .pdf-memo {
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid #333;
  min-height: 30px;
  font-size: 10px;
}

#pdf-output .pdf-memo-label {
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 2px;
}

@media print {
  body * { visibility: hidden; }
  #pdf-output, #pdf-output * { visibility: visible; }
  #pdf-output {
    position: static;
    width: 100%;
  }
}
