
        .custom-scrollbar::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        .custom-scrollbar::-webkit-scrollbar-track {
            background: transparent;
        }
        .custom-scrollbar::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 4px;
        }
        .custom-scrollbar::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }
        @media print {
            .page-break-inside-avoid {
                page-break-inside: avoid;
                break-inside: avoid;
            }
        }
        #export-pdf-stage {
            position: fixed;
            left: -100000px;
            top: 0;
            width: 710px;
            background: #ffffff;
        }
        .pdf-doc-header {
            padding: 4px 0 14px;
            border-bottom: 2px solid #1e3a8a;
            margin-bottom: 14px;
        }
        .pdf-doc-header h1 {
            font-size: 20px;
            font-weight: 800;
            color: #0f172a;
            margin: 0 0 4px;
        }
        .pdf-doc-header p {
            font-size: 11px;
            color: #475569;
            margin: 1px 0;
        }
        .pdf-block {
            padding: 4px 0 12px;
        }
        .pdf-break-inside-avoid {
            page-break-inside: avoid;
            break-inside: avoid;
        }
        .pdf-block h1, .pdf-block h2, .pdf-block h3, .pdf-block h4 {
            orphans: 3;
            widows: 3;
        }
        .pdf-block [class*="max-h-"] { max-height: none !important; }
        .pdf-block [class*="overflow-"] { overflow: visible !important; }
        .pdf-block canvas { width: 100% !important; max-width: 100% !important; height: auto !important; display: block; }
        .pdf-block .h-64, .pdf-block .h-72 { height: auto !important; }
        .pdf-block > * { max-width: 100%; }

        /* ===== Reporte de detalle pregunta a pregunta (Apoderado) ===== */
        .pdf-qr-sum {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 8px;
            margin: 0 0 16px;
        }
        .pdf-qr-sum-item {
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 7px 9px;
            background: #f8fafc;
        }
        .pdf-qr-sum-item.wide { grid-column: span 2; }
        .pdf-qr-sum-item.full { grid-column: 1 / -1; }
        .pdf-qr-sum-k {
            font-size: 8px;
            letter-spacing: .06em;
            text-transform: uppercase;
            color: #64748b;
            font-weight: 700;
        }
        .pdf-qr-sum-v {
            font-size: 11px;
            font-weight: 700;
            color: #0f172a;
            margin-top: 2px;
            word-break: break-word;
        }
        .pdf-qr-title {
            font-size: 12px;
            font-weight: 700;
            color: #0f172a;
            margin: 0 0 8px;
        }
        .pdf-qr-warn {
            background: #fffbeb;
            border: 1px solid #fcd34d;
            color: #92400e;
            border-radius: 8px;
            padding: 8px 10px;
            font-size: 10px;
            margin: 0 0 12px;
        }
        .pdf-qr-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 10px;
            table-layout: fixed;
        }
        .pdf-qr-table th {
            background: #1e3a8a;
            color: #ffffff;
            font-size: 9px;
            font-weight: 700;
            letter-spacing: .03em;
            text-align: left;
            padding: 6px 7px;
        }
        .pdf-qr-table td {
            padding: 5px 7px;
            border-bottom: 1px solid #e2e8f0;
            vertical-align: middle;
            color: #334155;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }
        .pdf-qr-table tbody tr:nth-child(even) td { background: #f8fafc; }
        /* Una fila nunca debe partirse entre dos páginas del PDF. */
        .pdf-qr-table tr { page-break-inside: avoid; break-inside: avoid; }
        .pdf-qr-table thead tr { page-break-inside: avoid; break-inside: avoid; }
        .pdf-qr-num {
            font-weight: 700;
            color: #0f172a;
            text-align: center;
        }
        .pdf-qr-badge {
            display: inline-block;
            min-width: 20px;
            padding: 2px 0;
            border-radius: 5px;
            text-align: center;
            font-size: 10px;
            font-weight: 700;
            color: #ffffff;
            background: #1e3a8a;
        }
        .pdf-qr-badge.ok { background: #16a34a; }
        .pdf-qr-badge.bad { background: #dc2626; }
        .pdf-qr-badge.none { background: #cbd5e1; color: #475569; }
        .pdf-qr-res-ok { color: #15803d; font-weight: 700; }
        .pdf-qr-res-bad { color: #b91c1c; font-weight: 700; }
        .pdf-qr-res-none { color: #64748b; font-weight: 700; }
        .pdf-qr-dim { color: #475569; }
        .pdf-qr-foot {
            margin-top: 12px;
            font-size: 9px;
            color: #64748b;
        }
    