/* ==========================================================================
   print.css (v2) — printable Work Order / Invoice + Payslip documents.
   Two-tone: navy structure + single blue accent. The .print-doc is rendered in
   a modal for preview and is the only thing kept when printing.
   ========================================================================== */

.print-doc {
  background: #fff; color: #15171c; font-family: var(--font-body);
  width: 100%; max-width: 820px; margin: 0 auto; padding: 36px 40px; border-radius: var(--r-md);
}
.print-doc * { color: inherit; }
.print-doc .pd-header { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; padding-bottom: 16px; border-bottom: 2px solid #0f1c2e; }
.print-doc .pd-header img { height: 42px; }
.print-doc .pd-company { font-size: 12px; color: #4b5563; line-height: 1.6; text-align: right; }
.print-doc .pd-company .nm { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: #0f1c2e; }
.print-doc .pd-titlebar { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 4px; }
.print-doc .pd-title { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; color: #0f1c2e; }
.print-doc .pd-ref { font-family: var(--font-mono); font-size: 13px; color: #2563eb; font-weight: 600; }
.print-doc .pd-exec { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #2563eb; border: 1px solid #2563eb; border-radius: 999px; padding: 2px 10px; }

/* Two/four-column meta grids */
.print-doc .pd-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 18px 0 22px; font-size: 12.5px; }
.print-doc .pd-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 18px; margin: 14px 0 20px; font-size: 12.5px; }
.print-doc .pd-meta .lbl, .print-doc .pd-grid4 .lbl { color: #6b7280; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.print-doc .pd-meta .val, .print-doc .pd-grid4 .val { font-weight: 600; margin-top: 1px; }

.print-doc .pd-desc { background: #f5f2ed; border: 1px solid #e2e4e9; border-radius: 6px; padding: 12px 14px;
  font-size: 12.5px; line-height: 1.6; margin-bottom: 18px; white-space: pre-wrap; }

.print-doc table.pd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 6px; }
.print-doc table.pd-table th { text-align: left; background: #0f1c2e; color: #f5f2ed; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; }
.print-doc table.pd-table th.num, .print-doc table.pd-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.print-doc table.pd-table td { padding: 8px 10px; border-bottom: 1px solid #eceff5; }
.print-doc .pd-section-label { font-family: var(--font-display); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.05em; color: #2563eb; margin: 18px 0 6px; }

.print-doc .pd-lower { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; margin-top: 18px; align-items: start; }
.print-doc .pd-pay { border: 1px solid #e2e4e9; border-radius: 6px; padding: 14px; font-size: 12px; line-height: 1.7; }
.print-doc .pd-pay .lbl { color: #6b7280; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.print-doc .pd-pay b { font-family: var(--font-display); }
.print-doc .pd-pay .mono { font-family: var(--font-mono); }

.print-doc .pd-totals { font-size: 13px; }
.print-doc .pd-totals .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f0f1f4; }
.print-doc .pd-totals .row .num { font-family: var(--font-mono); }
.print-doc .pd-totals .row.grand { border-top: 2px solid #0f1c2e; border-bottom: none; margin-top: 4px; padding-top: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 17px; color: #0f1c2e; }

.print-doc .pd-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 30px; font-size: 12px; }
.print-doc .pd-sign .line { border-top: 1px solid #0f1c2e; margin-top: 34px; padding-top: 5px; color: #6b7280; }

/* Payslip-specific (carried over) */
.print-doc .pd-net { margin-top: 18px; background: #e9eefb; border: 1px solid #bcd0fb; border-radius: 8px;
  padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.print-doc .pd-net .lbl { font-family: var(--font-display); font-weight: 700; color: #0f1c2e; }
.print-doc .pd-net .amt { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: #2563eb; }

.print-doc .pd-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid #e2e4e9;
  font-size: 11px; color: #6b7280; text-align: center; line-height: 1.6; }

@media print {
  body * { visibility: hidden !important; }
  .print-doc, .print-doc * { visibility: visible !important; }
  .print-doc { position: absolute; inset: 0; margin: 0; max-width: none; padding: 24px; box-shadow: none; }
  .modal-backdrop { background: #fff !important; backdrop-filter: none !important; }
  .modal { box-shadow: none !important; border: none !important; max-width: none !important; }
  .modal-head, .modal-foot, .no-print { display: none !important; }
  @page { margin: 12mm; }
}
