/* Settlement statement print sheet.
 *
 * Shared by shipments.html (what a supplier sees) and admin.html (what staff
 * see), so both print the same document — a supplier should not be able to
 * tell which side generated the copy in their hand.
 *
 * On screen the statement is hidden; printing hides the app instead and shows
 * it. Plain black on white with real text: this goes to a supplier's treasury
 * team, and a screenshot-looking PDF does not.
 *
 * Print rules must override app table chrome (border-radius, overflow:hidden,
 * nowrap headings, dark-mode thead). Those leak into #stmt and shift the
 * financial-breakdown header relative to the body columns in the PDF.
 */

#stmt { display:none; }
@media print {
  body { background:#fff; }
  body > *:not(#stmt) { display:none !important; }
  #stmt { display:block !important; color:#000; font-family:Georgia,'Times New Roman',serif; }
  @page { size: letter; margin: 20mm 18mm; }
  #stmt h1 { font-size:20pt; margin:0 0 2pt; letter-spacing:.5pt; }
  #stmt .issuer { font-size:10pt; line-height:1.4; margin-bottom:14pt; }
  #stmt .meta { width:100%; font-size:10pt; margin-bottom:14pt; border:none; border-radius:0;
    overflow:visible; background:transparent; }
  #stmt .meta td { border:none; padding:1pt 0; background:transparent; }
  #stmt h2 { font-size:11pt; text-transform:uppercase; letter-spacing:.6pt;
    border-bottom:1pt solid #000; padding-bottom:3pt; margin:16pt 0 8pt; }
  #stmt table.grid {
    width:100%;
    table-layout:fixed;
    border-collapse:collapse;
    border-spacing:0;
    border:none;
    border-radius:0;
    overflow:visible;
    background:transparent;
    margin:0 0 4pt;
    font-size:10pt;
  }
  #stmt table.grid th,
  #stmt table.grid td {
    border:0.6pt solid #666;
    padding:5pt 7pt;
    text-align:left;
    vertical-align:top;
    white-space:normal;
    word-wrap:break-word;
    overflow-wrap:anywhere;
    background:transparent;
    color:#000;
  }
  #stmt table.grid thead th,
  #stmt table.grid th {
    background:#eee !important;
    color:#000 !important;
    font-weight:600;
  }
  #stmt table.grid td.num,
  #stmt table.grid th.num {
    text-align:right;
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
  }
  /* Key/value summary: label column stays readable, value takes the rest. */
  #stmt table.grid.kv col.k { width:42%; }
  #stmt table.grid.kv col.v { width:58%; }
  /* Line-item breakdown: keep Amount flush right and columns stable with colspan totals. */
  #stmt table.grid.breakdown col.ref { width:34%; }
  #stmt table.grid.breakdown col.ship { width:22%; }
  #stmt table.grid.breakdown col.date { width:24%; }
  #stmt table.grid.breakdown col.amt { width:20%; }
  #stmt tr.total td { font-weight:bold; border-top:1.4pt solid #000; }
  #stmt .foot { margin-top:20pt; font-size:9pt; font-style:italic; }
  #stmt .pay { font-size:10pt; line-height:1.7; }
}
