/* ── PRINT STYLES (A5 slips + stickers) ── */
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  @page { size: A4; margin: 5mm; }
}
#print-area { display: none; }
.a4-page {
  width: 200mm; height: 287mm; background: white;
  page-break-after: always; page-break-inside: avoid;
  font-family: Arial, Helvetica, sans-serif; display: flex; flex-direction: column;
}
.a4-page:last-child { page-break-after: auto; }
.cut-line { height: 4mm; display: flex; align-items: center; justify-content: center; font-size: 6pt; color: #ccc; letter-spacing: 2px; flex-shrink: 0; }
.a5-slip { width:100%; height:141.5mm; display:flex; flex-direction:column; overflow:hidden; flex-shrink:0; box-sizing:border-box; font-family:Arial,Helvetica,sans-serif; }
/* Header: logo + order no + class badge */
.sh { display:flex; align-items:center; justify-content:space-between; padding:5mm 6mm 4mm; border-bottom:2px solid #111; flex-shrink:0; }
.sh img { height:42px; width:auto; }
.sh-right { display:flex; align-items:center; gap:10px; }
.sh-ol { font-size:7pt; color:#999; font-weight:700; text-transform:uppercase; letter-spacing:.6px; line-height:1; margin-bottom:2px; }
.sh-on { font-size:15pt; font-weight:800; color:#111; line-height:1; }
.sh-badge { border:2px solid #111; border-radius:5px; padding:4px 12px; font-size:13pt; font-weight:800; text-align:center; line-height:1.3; white-space:nowrap; }
/* Recipient + Student row — equal columns, same text size */
.sm { display:grid; grid-template-columns:1fr 1fr; padding:3mm 6mm; border-bottom:1px solid #e0e0e0; flex-shrink:0; align-items:start; }
.ib .lbl { font-size:6.5pt; text-transform:uppercase; letter-spacing:.7px; color:#aaa; font-weight:700; margin-bottom:2px; }
.ib .val { font-size:13pt; font-weight:700; color:#111; line-height:1.2; }
.ib .sub { font-size:10pt; color:#555; margin-top:2px; }
.ib.r { padding-left:4mm; border-left:1px solid #e8e8e8; }
/* Address — largest section, biggest font */
.sa { padding:3mm 6mm; border-bottom:1px solid #e0e0e0; flex:0 0 30mm; display:flex; flex-direction:column; justify-content:center; }
.sa .lbl { font-size:6.5pt; text-transform:uppercase; letter-spacing:.7px; color:#aaa; font-weight:700; margin-bottom:3px; }
.sa .val { font-size:13pt; color:#111; line-height:1.65; font-weight:600; }
/* Contents */
.sc { padding:3mm 6mm; background:#f7f7f7; border-bottom:1px solid #e0e0e0; flex:1; display:flex; flex-direction:column; justify-content:center; min-height:0; }
.sc .lbl { font-size:6.5pt; text-transform:uppercase; letter-spacing:.7px; color:#aaa; font-weight:700; margin-bottom:3px; }
.si { display:flex; align-items:center; gap:7px; margin-bottom:3px; font-size:10.5pt; color:#111; line-height:1.4; }
.sd { width:4px; height:4px; border-radius:50%; background:#999; flex-shrink:0; }
/* Weight box */
.sw { padding:2mm 6mm; border-bottom:1px solid #e0e0e0; flex-shrink:0; display:flex; align-items:center; gap:4mm; background:#fff; }
.sw .lbl { font-size:6.5pt; text-transform:uppercase; letter-spacing:.7px; color:#aaa; font-weight:700; white-space:nowrap; }
.sw .wbox { flex:1; border:2px solid #111; border-radius:4px; height:12mm; display:flex; align-items:center; padding:0 4mm; }
.sw .wnum { font-size:26pt; font-weight:800; color:#111; letter-spacing:1px; min-width:30mm; }
.sw .wunit { font-size:14pt; font-weight:700; color:#444; margin-left:2mm; align-self:flex-end; padding-bottom:1mm; }
/* Footer: courier + date */
.sf { padding:3mm 6mm; display:flex; justify-content:space-between; align-items:center; border-top:1px solid #e0e0e0; flex-shrink:0; }
.sf .lbl { font-size:6.5pt; text-transform:uppercase; letter-spacing:.7px; color:#aaa; font-weight:700; margin-bottom:2px; }
.sf .val { font-size:11pt; color:#111; font-weight:700; }
/* ── STICKER: 24-up A4 (3x8 grid, Avery L7159 style 64x34mm cells) ── */
.sticker-page { width:210mm; height:297mm; background:white; page-break-after:always; page-break-inside:avoid; font-family:Arial,Helvetica,sans-serif; box-sizing:border-box; padding:13mm 7mm 13mm 7mm; }
.sticker-page:last-child { page-break-after:auto; }
.sticker-grid { display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(8,1fr); gap:0mm; height:100%; width:100%; }
.sticker { padding:2.5mm 3mm; display:flex; flex-direction:column; justify-content:center; overflow:hidden; border:0.5px solid #ccc; box-sizing:border-box; }
.sticker .s-order { font-size:6.5pt; color:#888; font-weight:700; letter-spacing:.3px; line-height:1; margin-bottom:1px; }
.sticker .sn { font-size:9pt; font-weight:800; color:#111; line-height:1.2; margin-bottom:0px; }
.sticker .s-stu { font-size:7.5pt; color:#333; font-weight:600; line-height:1.2; margin-bottom:1px; }
.sticker .sp { font-size:8pt; color:#222; margin-bottom:1px; font-weight:600; }
.sticker .sa2 { font-size:7pt; color:#444; line-height:1.35; }
.sticker.empty { background:#fafafa; }
@media print {
  body[data-print="slips"] .sticker-page { display: none !important; }
  body[data-print="stickers"] .slip-page { display: none !important; }
  body[data-print="stickers"] .a4-page { display: none !important; }
}
