.alumnos-qr-panel { position: relative; display: flex; flex-direction: column; width: min(960px, calc(100% - 24px)); max-height: calc(100vh - 24px); margin: 12px auto; overflow: hidden; border: 1px solid #dbe3ed; border-radius: 8px; background: #fff; box-shadow: 0 18px 44px #0f172a30; }
.alumnos-qr-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e2e8f0; }
.alumnos-qr-toolbar h2 { margin: 0; font-size: 20px; font-weight: 800; }
.alumnos-qr-toolbar p { margin: 2px 0 0; color: #64748b; font-size: 13px; }
.alumnos-qr-modes { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #dbe3ed; border-radius: 6px; background: #f1f5f9; }
.alumnos-qr-modes button { min-height: 34px; padding: 5px 12px; border: 0; border-radius: 4px; background: transparent; color: #475569; font-size: 13px; font-weight: 700; }
.alumnos-qr-modes button[aria-pressed="true"] { background: #fff; color: #137fec; box-shadow: 0 1px 3px #0f172a20; }
.alumnos-qr-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.alumnos-qr-actions label { color: #475569; font-size: 13px; font-weight: 700; }
.alumnos-qr-actions select { min-width: 190px; min-height: 40px; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.alumnos-qr-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px; }
#alumnos-qr-print { border-color: #137fec; background: #137fec; color: #fff; font-weight: 700; }
#alumnos-qr-print:disabled { opacity: .5; cursor: not-allowed; }
#alumnos-qr-status { min-height: 20px; margin: 0; padding: 8px 20px 0; color: #475569; font-size: 13px; }
.alumnos-qr-privacy { margin: 0; padding: 4px 20px 0; color: #9a3412; font-size: 12px; font-weight: 700; }
.alumnos-qr-preview { overflow: auto; padding: 14px 20px 20px; }
.alumnos-qr-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 8px; min-height: 680px; margin: 0 auto 18px; }
.alumnos-qr-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px dashed #94a3b8; border-radius: 6px; background: #fff; break-inside: avoid; }
.alumnos-qr-image { flex: 0 0 auto; width: 142px; height: 142px; display: grid; place-items: center; }
.alumnos-qr-image img { width: 100%; height: 100%; image-rendering: auto; }
.alumnos-qr-details { min-width: 0; overflow-wrap: anywhere; }
.alumnos-qr-details strong { display: block; font-size: 15px; line-height: 1.3; }
.alumnos-qr-details span { display: block; margin-top: 7px; font-size: 14px; font-weight: 700; }
.alumnos-qr-details small { display: block; margin-top: 4px; color: #475569; font-size: 11px; }
.alumnos-qr-details .alumnos-qr-key { display: block; margin-top: 6px; font-family: ui-monospace, monospace; font-size: 11px; line-height: 1.25; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .alumnos-qr-actions { width: 100%; }
  .alumnos-qr-actions select { flex: 1; min-width: 0; }
  .alumnos-qr-sheet { display: flex; flex-direction: column; min-height: 0; }
  .alumnos-qr-card { min-height: 160px; }
  .alumnos-qr-preview { padding: 12px; }
}
@page { size: letter portrait; margin: 8mm; }
@media print {
  body { display: block !important; height: auto !important; overflow: visible !important; background: #fff !important; }
  body > :not(#alumnos-qr-modal) { display: none !important; }
  #alumnos-qr-modal { position: static !important; display: block !important; }
  #alumnos-qr-backdrop, .alumnos-qr-toolbar, #alumnos-qr-status, #alumnos-qr-privacy { display: none !important; }
  .alumnos-qr-panel, .alumnos-qr-preview { position: static; display: block; width: 100%; max-height: none; margin: 0; padding: 0; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
  .alumnos-qr-sheet { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 3mm; width: 100%; height: 260mm; min-height: 0; margin: 0; break-after: page; page-break-after: always; }
  .alumnos-qr-sheet:last-child { break-after: auto; page-break-after: auto; }
  .alumnos-qr-card { min-height: 0; padding: 3mm; border: 0.3mm dashed #94a3b8; border-radius: 0; }
  .alumnos-qr-image { width: 39mm; height: 39mm; }
  .alumnos-qr-details strong { font-size: 10pt; }
  .alumnos-qr-details span { font-size: 9pt; }
  .alumnos-qr-details small { font-size: 8pt; }
  .alumnos-qr-details .alumnos-qr-key { font-size: 8pt; }
}
