  /* ---------- Voucher print design ---------- */
  .print-toolbar{
    display:flex;align-items:center;justify-content:space-between;
    max-width:1000px;margin:0 auto 20px;padding:0 4px;
  }
  .print-toolbar .info{color:var(--muted);font-size:.85rem;}
  .print-toolbar .actions{display:flex;gap:10px;}
  .print-area{max-width:1080px;margin:0 auto;}

  /* ---------- Fee Voucher (Challan grid style, 3 stacked copies) ---------- */
  .voucher-sheet{
    background:#fff;border:1px solid #d9dde5;border-radius:6px;
    margin-bottom:22px;overflow:hidden;box-shadow:var(--shadow-sm);
  }
  .voucher-copy{
    width:100%;position:relative;font-family:'Times New Roman', Times, serif;color:#000;
    padding:10px 14px 8px;
    transform:translateZ(0);
    isolation:isolate;
  }
  .voucher-copy + .voucher-copy{border-top:2px dashed #c9ccd6;}
  .scissor-tag{
    display:block;text-align:center;background:var(--paper);color:#000;font-size:.64rem;
    padding:2px 0;letter-spacing:1px;
  }

  /* Voucher tables: no rounded/clipped edges so every black line meets its neighbour cleanly */
  .ch-grid, .ch-feegrid{border-radius:0 !important;overflow:visible !important;border:none !important;}
  .ch-grid{width:100%;border-collapse:collapse;table-layout:fixed;font-size:.72rem;}
  .ch-grid td{border:1px solid #000;padding:3px 6px;vertical-align:middle;}
  .ch-grid tbody tr:hover td, .ch-feegrid tbody tr:hover td{background:inherit;}
  .ch-logo{text-align:center;}
  .ch-schoolname{font-weight:800;font-size:1.05rem;letter-spacing:.3px;text-align:center;}
  .ch-schooladdr{font-weight:800;font-size:.82rem;text-align:center;}
  .ch-challanlbl{font-weight:800;font-size:.68rem;text-align:center;}
  .ch-challanval{font-weight:800;font-size:.78rem;text-align:center;}
  .ch-lbl{font-size:.66rem;font-weight:700;}
  .ch-lbl b{font-size:.74rem;font-weight:800;}
  .ch-val{font-size:.74rem;font-weight:700;text-align:center;}
  .ch-grid, .ch-feegrid{ -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact; }
  .ch-bar{background:#000;background-image:linear-gradient(#000,#000);box-shadow:inset 0 0 0 100px #000;color:#fff;font-weight:800;font-size:.66rem;text-align:center;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .ch-duebar{background:#000;background-image:linear-gradient(#000,#000);box-shadow:inset 0 0 0 100px #000;color:#fff;font-weight:800;font-size:.64rem;text-align:center;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .ch-duebar b{color:#fff;}
  .ch-new{background:#f3d9d9;background-image:linear-gradient(#f3d9d9,#f3d9d9);box-shadow:inset 0 0 0 100px #f3d9d9;font-weight:800;font-size:.78rem;text-align:center;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .ch-rightbox{vertical-align:top;padding:4px 6px;}
  .ch-kin-body{font-size:.62rem;font-weight:700;line-height:1.5;}

  .ch-feegrid{width:100%;border-collapse:collapse;table-layout:fixed;font-size:.7rem;margin-top:-1px;}
  .ch-feegrid th, .ch-feegrid td{border:1px solid #000;padding:4px 5px;text-align:center;font-weight:700;color:#000;}
  .ch-feegrid th{font-family:var(--sans);font-size:.6rem;font-weight:800;background:#eee;background-image:linear-gradient(#eee,#eee);box-shadow:inset 0 0 0 100px #eee;border-radius:0;}
  .ch-armonths{font-size:.58rem;font-weight:700;line-height:1.15;margin-top:1px;}
  .ch-feegrid td.ch-total{font-weight:800;font-size:.76rem;}

  .ch-copylabel{font-size:.7rem;font-weight:700;margin-top:3px;}
  .ch-barcode-row{display:flex;align-items:center;gap:10px;margin-top:5px;}
  .ch-barcode-text{font-size:.64rem;font-weight:800;letter-spacing:1.5px;color:#000;font-family:var(--sans);}

  @page{ size: A4 portrait; margin: 12mm; }
  @page voucherpage{ size: A4 portrait; margin: 8mm; }
  .voucher-sheet{ page: voucherpage; }

  /* ---------- Thermal Receipt (80mm / 58mm printers) ---------- */
  .thermal-receipt{
    width:100%; max-width:70mm; margin:0 auto 6mm; box-sizing:border-box;
    font-family:'Courier New', Courier, monospace; color:#000; font-size:11px; line-height:1.4;
  }
  .thermal-receipt:not(:last-child){ page-break-after:always; }
  .thermal-receipt.size-58{ max-width:48mm; font-size:10px; }
  .th-center{text-align:center;}
  .th-school{font-weight:800;font-size:13px;letter-spacing:.3px;}
  .th-addr{font-size:10px;}
  .th-hr{border:none;border-top:1px dashed #000;margin:5px 0;}
  .th-row{display:flex;justify-content:space-between;gap:6px;font-size:10.5px;}
  .th-row b{font-weight:800;}
  .th-item{display:flex;justify-content:space-between;gap:6px;}
  .th-total{display:flex;justify-content:space-between;gap:6px;font-weight:800;font-size:12.5px;border-top:1px solid #000;padding-top:4px;margin-top:2px;}
  .th-foot{text-align:center;font-size:9.5px;margin-top:6px;}
  .th-barcode{display:flex;flex-direction:column;align-items:center;margin-top:8px;}
  .th-barcode div{font-size:9px;letter-spacing:1px;margin-top:2px;font-weight:700;}

  @media print{
    .no-print{display:none !important;}
    .toast{display:none !important;}
    body{background:#fff;}
    .print-area{max-width:100%;}
    .voucher-sheet{box-shadow:none;border-color:#000;}
    .voucher-sheet:not(:last-child){page-break-after:always;}
    .admission-sheet{page-break-after:always;box-shadow:none;}
    .test-report{page-break-after:always;box-shadow:none;}
    .student-report{page-break-after:auto;}
    main{padding:0;max-width:100%;}
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
    /* No animations when printing — otherwise the page can be captured at opacity 0 (a blank white print) */
    *, *::before, *::after{animation:none !important;transition:none !important;}
    .fade-in{opacity:1 !important;transform:none !important;}
  }


  /* Fee history strip (last 6 months) on every voucher copy */
  .ch-hist{width:100%;border-collapse:collapse;table-layout:fixed;margin-top:-1px;font-size:.58rem;}
  .ch-hist th,.ch-hist td{border:1px solid #000;padding:2px 3px;text-align:center;font-weight:700;color:#000;line-height:1.15;}
  .ch-hist th{background:#eee;background-image:linear-gradient(#eee,#eee);box-shadow:inset 0 0 0 100px #eee;font-size:.56rem;font-weight:800;}
  .ch-hist .hl{width:17%;text-align:left;}
  .ch-hist .hp{font-weight:800;}
  .ch-hist .hd{font-weight:800;}
  .ch-hist{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .ch-hist{border-radius:0 !important;overflow:visible !important;border:none !important;}
  .ch-hist th,.ch-hist td{border-radius:0 !important;}
  .ch-hist tbody tr:hover td{background:inherit;}

  /* Watermark "DHS LMS" across every voucher copy (drawn on top, very light, ignores clicks) */
  .voucher-copy::after{
    content:'DHS LMS';
    position:absolute;left:50%;top:50%;
    transform:translate(-50%,-50%) rotate(-14deg);
    font-family:Arial,Helvetica,sans-serif;font-weight:900;font-size:78px;letter-spacing:10px;white-space:nowrap;
    color:rgba(0,0,0,0.20);
    pointer-events:none;z-index:5;user-select:none;
    -webkit-print-color-adjust:exact;print-color-adjust:exact;
  }
