@media (max-width: 768px) {
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .dashboard-table {
        min-width: 800px;
    }
    
    .doc-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Stack filter buttons on mobile */
    .filter-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-container button {
        flex: 1 1 45%;
        min-width: 120px;
    }
}

/* PDF viewer styles */
#pdf-viewer {
    position: relative;
    background: #525659;
    overflow: auto;
}

#pdf-canvas {
    display: block;
    margin: 0 auto;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pdf-controls {
    background: #f3f4f6;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #6b7280;
}

.pdf-loading .spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
    margin-bottom: 1rem;
}

/* Modal z-index fix */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.modal-content {
    position: fixed;
    inset: 0;
    z-index: 50;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-dialog {
    position: relative;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90vw;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
