/* QR-only print: show only QR code and small name */
@media print {
  body.qr-print-active .qr-display {
      display: block !important;
      text-align: center;
      margin: 0 auto;
      padding: 10px;
      background: white;
      border: 2px solid #ccc;
      border-radius: 8px;
      width: 320px;
  }
  body.qr-print-active .qr-display canvas,
  body.qr-print-active .qr-display img {
      max-width: 300px !important;
      width: 300px !important;
      border: 1px solid #999;
      padding: 8px;
      background: white;
      margin: 0 auto 6px auto;
      display: block;
      border-radius: 4px;
  }
  body.qr-print-active .qr-display h3 {
      display: none;
  }
  /* Show student name under QR in print */
  body.qr-print-active .qr-display::after {
      content: attr(data-student-name);
      display: block;
      font-size: 14px;
      font-weight: bold;
      margin-top: 6px;
      text-align: center;
  }
}

/* Print specific sections per tab */
@media print {
  .tab-content {
      display: none !important;
  }
  .tab-content.active {
      display: block !important;
  }

  /* Students tab print */
  #students-tab.active table {
      font-size: 12px;
  }

  /* Records tab print */
  #records-tab.active table {
      font-size: 12px;
  }

  /* Hall lists tab print */
  #hall-lists-tab.active table {
      font-size: 12px;
  }

  /* Exam tab print */
  #exam-tab.active .hall-list {
      display: grid !important;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
      font-size: 12px;
  }
  #exam-tab.active .hall-card {
      border: 1px solid #000;
      padding: 10px;
      margin: 0;
  }
}