/* Pdf Viewer */
    img{
        width: 100%;
    }
    
    .document-link {
        display: block;
        padding: 15px 20px;
        margin-bottom: 10px;
        background: #f8f9fa;
        border: 2px solid #dee2e6;
        border-radius: 8px;
        text-decoration: none;
        color: #495057;
        transition: all 0.3s ease;
        cursor: pointer;
        position: relative;
    }
    
    .document-link:hover {
        background: #e9ecef;
        border-color: #007bff;
        transform: translateX(5px);
        text-decoration: none;
        color: #007bff;
    }
    
    .document-link.active {
        background: #007bff;
        color: white;
        border-color: #0056b3;
    }
    
    .document-link::before {
        content: "📄 ";
        margin-right: 8px;
    }

    /* Visor modal con PDF más abajo */
    .pdf-viewer-container {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.95);
        z-index: 9999;
        overflow: hidden;
    }

    .pdf-viewer-container.active {
        display: flex;
        flex-direction: column;
    }

    .pdf-header {
        background: #2c3e50;
        color: white;
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        flex-wrap: wrap;
        gap: 15px;
    }

    .pdf-title {
        font-size: 1.2rem;
        font-weight: bold;
        flex: 1;
        min-width: 200px;
    }

    .close-viewer {
        background: #e74c3c;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 16px;
        font-weight: bold;
        transition: background 0.3s;
    }

    .close-viewer:hover {
        background: #c0392b;
        transform: scale(1.05);
    }

    .pdf-content {
        flex: 1;
        position: relative;
        background: #2c3e50;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        overflow: auto;
        padding: 20px;
        padding-top: 60px;
    }

    .pdf-controls {
        display: flex;
        gap: 10px;
        align-items: center;
        background: rgba(52, 152, 219, 0.1);
        padding: 8px 15px;
        border-radius: 20px;
        flex-wrap: wrap;
    }

    .pdf-controls button {
        background: #3498db;
        color: white;
        border: none;
        padding: 6px 10px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 13px;
        transition: background 0.3s;
        white-space: nowrap;
    }

    .pdf-controls button:hover {
        background: #2980b9;
    }

    .pdf-controls button:disabled {
        background: #95a5a6;
        cursor: not-allowed;
    }

    .pdf-controls span {
        font-size: 13px;
        white-space: nowrap;
    }

    .pdf-controls .separator {
        color: rgba(255,255,255,0.5);
        margin: 0 5px;
    }

    .pdf-canvas {
        display: block;
        margin: 0 auto;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        background: white;
        max-width: none;
        max-height: none;
    }

    .pdf-watermark {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-size: 3rem;
        color: rgba(52, 152, 219, 0.1);
        pointer-events: none;
        z-index: 999;
        user-select: none;
        font-weight: bold;
    }

    .pdf-loading {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 1.2rem;
        color: #7f8c8d;
        text-align: center;
    }

    .pdf-error {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        color: #e74c3c;
        font-size: 1.1rem;
        display: none;
    }

    /* Protecciones de seguridad */
    .pdf-content {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

        @media (max-width: 768px) {
            .pdf-header {
                flex-direction: column;
                text-align: center;
                gap: 10px;
                padding: 15px;
            }
            
            .pdf-title {
                min-width: auto;
                font-size: 1rem;
            }
            
            .pdf-controls {
                gap: 6px;
                padding: 6px 10px;
                justify-content: center;
            }
            
            .pdf-controls button {
                padding: 5px 8px;
                font-size: 12px;
            }
            
            .pdf-controls span {
                font-size: 12px;
            }
            
            .pdf-content {
                padding: 10px;
                padding-top: 40px;
            }
        }