/* Printdocumenten (Beheer → Afdrukken): A4-vellen, zwart-wit vriendelijk. Geen paginamarge, dan zet de browser
   geen URL/datum in de kop- en voettekst; de witruimte zit binnen elk vel. */
@page { size: A4 portrait; margin: 0; }
@page land { size: A4 landscape; margin: 0; }

body.printdoc { background: #e9e7e1; color: #000; margin: 0; font-size: 11pt; }
.print-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 16px; background: var(--ink); color: #fff; }
.print-bar .btn-ghost { background: #fff; }
.pb-title { font-family: var(--font-head); font-size: 1.05rem; }
.pb-count { opacity: .85; font-size: .9rem; }
.pb-hint { flex-basis: 100%; font-size: .8rem; opacity: .8; }

.sheets { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 0 40px; }
.sheet { width: 210mm; height: 297mm; overflow: hidden; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .15); position: relative; box-sizing: border-box; }
.empty-msg { padding: 30mm; font-size: 14pt; }
.muted { color: #555; }

/* Wedstrijdbriefjes: 2 × A5 liggend op een A4, knipregel in het midden */
.sheet-slips { display: grid; grid-template-rows: 1fr 1fr; }
.slip { padding: 11mm 14mm 8mm; display: flex; flex-direction: column; gap: 4mm; box-sizing: border-box; min-height: 0; }
.slip + .slip { border-top: 1.2px dashed #000; position: relative; }
.slip + .slip::before { content: "✂"; position: absolute; top: -9px; left: 6mm; background: #fff; font-size: 13px; line-height: 1; padding: 0 3px; }
.slip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; border-bottom: 2.5px solid #000; padding-bottom: 2.5mm; }
.slip-title { font-family: var(--font-head); font-size: 17pt; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.slip-field { font-family: var(--font-head); font-size: 26pt; font-weight: 700; line-height: .95; text-align: right; white-space: nowrap; }
.slip-field small { display: block; font-family: var(--font); font-size: 9pt; font-weight: 600; margin-top: 1mm; }
.slip-meta { display: grid; grid-template-columns: 30mm 1fr auto auto; gap: 1mm 3mm; margin: 0; font-size: 10.5pt; }
.slip-meta dt { font-weight: 700; }
.slip-meta dd { margin: 0; }
.slip-meta dd.wide { grid-column: span 3; }
.slip-meta .r { text-align: right; }
.slip-meta .slip-ref { font-weight: 700; font-size: 12pt; }
.slip-rules { margin: 0; padding-left: 5mm; font-size: 9pt; line-height: 1.35; }
.slip-score { width: 100%; border-collapse: collapse; margin-top: auto; }
.slip-score thead th { font-family: var(--font-head); font-size: 14pt; font-weight: 700; text-align: center; padding: 0 2mm 2.5mm; width: 42%; vertical-align: bottom; line-height: 1.1; }
.slip-score thead th:first-child { width: 22mm; }
.slip-score thead th.dash { width: 6mm; }
.slip-score .nr { display: inline-block; font-family: var(--font); font-size: 8.5pt; border: 1px solid #000; border-radius: 50%; width: 4.6mm; height: 4.6mm; line-height: 4.6mm; margin-right: 1.5mm; vertical-align: .15em; }
.slip-score tbody th { text-align: left; font-size: 10.5pt; padding: 1mm 0; white-space: nowrap; }
.slip-score tbody th small { font-weight: 400; }
.slip-score td.box { border: 1.4px solid #000; height: 10mm; }
.slip-score td.dash { text-align: center; font-weight: 700; }
.slip-score tr + tr td.box { border-top-width: 0; }
.slip-score tr.total td.box { border-top: 2.5px solid #000; height: 11mm; }
.slip-score tr.total th { padding-top: 2mm; }
.slip-foot { font-size: 8.5pt; border-top: 1px solid #999; padding-top: 2mm; }
.slip.empty { border-top: 1.2px dashed #bbb; }
.slip.empty::before { display: none; }

/* Matrix (liggend A4) */
.sheet-land { page: land; width: 297mm; height: 210mm; }
.sheet-mx { padding: 12mm 14mm 10mm; display: flex; flex-direction: column; gap: 4mm; }
.mx-print { display: flex; justify-content: center; }
.mx-print .mx-wrap { overflow: visible; }
.mx-print .matrix { font-size: 11pt; }
.prog-poule small { display: block; font-family: var(--font); font-size: 11pt; font-weight: 700; }
.st-print { font-size: 12pt; }
.rank-print { font-size: 9.5pt; }
.rank-print td { padding: .7mm 1.2mm; }
.rank-print tr.first td { background: var(--green-soft); }
.win-print { border: 1.5px solid #000; border-radius: 3mm; padding: 4mm 5mm; margin: 5mm 0 0; }
.wp-kicker { font-size: 9pt; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.wp-name { font-family: var(--font-head); font-size: 20pt; font-weight: 700; margin: 1mm 0; }
.wp-stats { font-size: 9.5pt; }
.wp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }
.wp-cols .wp-name { font-size: 15pt; }
.fdot { display: inline-block; width: .72em; height: .72em; border-radius: 50%; background: var(--tc); margin-right: 1.4mm; vertical-align: .02em; }
.mijn-print { font-size: 9.5pt; }
.mijn-print td { padding: .6mm 1.2mm; }
.st-print td { padding: 2mm 1.5mm; }

/* Programma per veld */
.sheet-prog, .sheet-ind, .sheet-vp { padding: 14mm 15mm 12mm; display: flex; flex-direction: column; }
.prog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8mm; border-bottom: 2.5px solid #000; padding-bottom: 2mm; }
.prog-field { font-family: var(--font-head); font-size: 22pt; font-weight: 700; }
.prog-poule { font-family: var(--font-head); font-size: 15pt; font-weight: 600; text-align: right; }
.prog-day { font-size: 13pt; margin: 5mm 0 1.5mm; color: #000; }
.prog-day::first-letter { text-transform: uppercase; }
.prog-table { width: 100%; border-collapse: collapse; font-size: 10.5pt; }
.prog-table th { text-align: left; font-size: 9pt; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1.5px solid #000; padding: 1mm 1.5mm; }
.prog-table td { padding: .75mm 1.5mm; border-bottom: .6px solid #bbb; }
.prog-table .n { width: 12mm; white-space: nowrap; }
.prog-table tr.bye td { color: #555; }
.prog-foot { margin-top: auto; padding-top: 3mm; font-size: 8.5pt; color: #555; border-top: .6px solid #bbb; }

/* Poule-indeling */
.ind-title { font-size: 18pt; color: #000; text-align: center; border-bottom: 2.5px solid #000; padding-bottom: 2mm; margin: 0 0 6mm; }
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7mm 6mm; }
.ind-poule h2 { font-size: 11pt; margin: 0; color: #000; }
.ind-field { font-weight: 700; font-size: 10pt; margin-bottom: 1mm; }
.ind-poule ol { margin: 0; padding-left: 5mm; font-size: 10pt; line-height: 1.35; }

/* Veld ↔ poule */
.vp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; align-items: start; }
.vp-table { width: 100%; border-collapse: collapse; font-size: 15pt; }
.vp-table thead tr:first-child th { font-family: var(--font-head); font-size: 17pt; text-align: left; border-bottom: 2.5px solid #000; padding: 1mm 0; }
.vp-table thead tr + tr th { font-size: 10pt; text-align: left; text-transform: uppercase; color: #555; padding: 2mm 0 1mm; }
.vp-table td { padding: 2mm 0; border-bottom: .6px solid #bbb; vertical-align: top; }
.vp-nr { font-family: var(--font-head); font-weight: 700; width: 34mm; padding-right: 3mm !important; }
.vp-nr small { display: block; font-family: var(--font); font-size: 8pt; font-weight: 600; }

@media print {
  body.printdoc { background: #fff; }
  .no-print { display: none !important; }
  .sheets { display: block; padding: 0; }
  .sheet { box-shadow: none; break-after: page; page-break-after: always; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* QR-codes (getekend door js/qr.js) */
[data-qr] svg { display: block; width: 100%; height: 100%; }
.slip-qr { width: 20mm; height: 20mm; flex: none; margin: -2mm -2mm -1mm 0; }
.slip-head .slip-field { margin-left: auto; }
.prog-head { align-items: center; }
.prog-qr { display: flex; align-items: center; gap: 2mm; font-size: 8pt; max-width: 42mm; }
.prog-qr .qr { width: 22mm; height: 22mm; flex: none; }
.sheet-qr { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18mm; gap: 4mm; }
.qr-kicker { font-size: 14pt; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.qr-title { font-family: var(--font-head); font-size: 72pt; line-height: 1; margin: 0; }
.qr-sub { font-size: 18pt; font-weight: 600; margin: 0; }
.qr-big { width: 130mm; height: 130mm; margin: 6mm 0; }
.qr-help { font-size: 16pt; margin: 0; max-width: 150mm; }
.qr-url { font-size: 11pt; color: #444; margin: 0; word-break: break-all; }
/* Afdruktijdstip (app.js): rechtsonder op schema's en exports van publieke pagina's */
.print-stamp { position: absolute; right: 8mm; bottom: 3mm; font-size: 7pt; color: #666; white-space: nowrap; }
