/* Print documents: prescription (A5), receipt / token (80mm), lab report (A4).
   Each print page sets body class: .doc-a5 / .doc-a4 / .doc-80 */
body.doc { background: #e5e9ef; color: #111; padding: 24px 12px; }
.doc-toolbar { max-width: 820px; margin: 0 auto 16px; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.paper { background: #fff; color: #111; margin: 0 auto; box-shadow: 0 6px 30px rgba(0,0,0,.15); position: relative; }
.doc-a5 .paper { width: 148mm; min-height: 210mm; padding: 10mm 11mm; }
.doc-a4 .paper { width: 210mm; min-height: 297mm; padding: 14mm 15mm; }
.doc-80 .paper { width: 80mm; padding: 5mm 4mm; font-size: 12px; font-family: ui-monospace, Consolas, monospace; }
.paper .muted { color: #555; }

.letterhead { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 2px solid #0e7c86; }
.letterhead__doc h2 { font-size: 17px; color: #0e7c86; }
.letterhead__doc p { font-size: 11px; line-height: 1.45; }
.letterhead__clinic { text-align: right; font-size: 11px; line-height: 1.45; }
.letterhead__clinic b { font-size: 13px; color: #111; }
.letterhead .ur { font-size: 11px; line-height: 1.9; }
.doc-patient { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 14px; font-size: 11px; padding: 7px 0; border-bottom: 1px solid #ddd; }
.doc-patient b { font-weight: 650; }
.doc-body { display: grid; grid-template-columns: 34% 1fr; gap: 12px; padding-top: 10px; font-size: 11.5px; min-height: 120mm; }
.doc-side { border-right: 1px solid #ddd; padding-right: 10px; display: flex; flex-direction: column; gap: 10px; }
.doc-side h5 { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #0e7c86; margin-bottom: 3px; }
.rx-list { display: flex; flex-direction: column; gap: 9px; }
.rx-item { display: grid; grid-template-columns: 18px 1fr; gap: 4px; }
.rx-item__name { font-weight: 700; font-size: 12.5px; }
.rx-item__sig { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rx-item .ur { font-size: 12px; line-height: 1.9; }
.doc-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 10px; padding-top: 8px; border-top: 1px solid #ddd; font-size: 10.5px; }
.signature { text-align: center; font-size: 10.5px; }
.signature__line { width: 130px; border-top: 1px solid #333; margin: 26px auto 3px; }
.watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-size: 64px; font-weight: 800; color: rgba(14,124,134,.05); transform: rotate(-25deg); }

.receipt { display: flex; flex-direction: column; gap: 6px; }
.receipt .center { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #333; margin: 6px 0; }
.receipt table td { padding: 2px 0; vertical-align: top; }
.receipt .big { font-size: 15px; font-weight: 800; }
.token-big { font-size: 64px; font-weight: 900; text-align: center; line-height: 1; letter-spacing: -.03em; font-family: var(--font-sans); }

.lab-table { width: 100%; font-size: 11.5px; margin-top: 8px; }
.lab-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1.5px solid #111; padding: 5px 4px; }
.lab-table td { padding: 5px 4px; border-bottom: 1px solid #e3e3e3; }
.lab-table .grp td { font-weight: 700; background: #f2f6f7; color: #0e7c86; }
.lab-table .abn { font-weight: 800; }

@media print {
  body.doc { background: #fff; padding: 0; }
  .doc-toolbar, .no-print { display: none !important; }
  .paper { box-shadow: none; margin: 0; }
}
/* Each print page sets its own size inline, e.g. <style>@page { size: A5; margin: 0 }</style> */
